ai-station/.venv/lib/python3.12/site-packages/chainlit/frontend/dist/assets/react-plotly-X7Qwg0tb.js

3486 lines
3.6 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{r as O0,p as B0,n as N0}from"./index-D9fGsswH.js";function U0(Cs,El){for(var $s=0;$s<El.length;$s++){const di=El[$s];if(typeof di!="string"&&!Array.isArray(di)){for(const Zi in di)if(Zi!=="default"&&!(Zi in Cs)){const Cl=Object.getOwnPropertyDescriptor(di,Zi);Cl&&Object.defineProperty(Cs,Zi,Cl.get?Cl:{enumerable:!0,get:()=>di[Zi]})}}}return Object.freeze(Object.defineProperty(Cs,Symbol.toStringTag,{value:"Module"}))}var Ph={},Ov={};(function(Cs){function El(u){"@babel/helpers - typeof";return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},El(u)}Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=c;var $s=te(O0),di=Zi(B0);function Zi(u){return u&&u.__esModule?u:{default:u}}function Cl(u){if(typeof WeakMap!="function")return null;var l=new WeakMap,y=new WeakMap;return(Cl=function(T){return T?y:l})(u)}function te(u,l){if(u&&u.__esModule)return u;if(u===null||El(u)!=="object"&&typeof u!="function")return{default:u};var y=Cl(l);if(y&&y.has(u))return y.get(u);var h={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in u)if(f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)){var n=T?Object.getOwnPropertyDescriptor(u,f):null;n&&(n.get||n.set)?Object.defineProperty(h,f,n):h[f]=u[f]}return h.default=u,y&&y.set(u,h),h}function X(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function e(u,l){for(var y=0;y<l.length;y++){var h=l[y];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(u,h.key,h)}}function A(u,l,y){return e(u.prototype,l),Object.defineProperty(u,"prototype",{writable:!1}),u}function P(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),l&&o(u,l)}function o(u,l){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,T){return h.__proto__=T,h},o(u,l)}function L(u){var l=g();return function(){var h=r(u),T;if(l){var f=r(this).constructor;T=Reflect.construct(h,arguments,f)}else T=h.apply(this,arguments);return M(this,T)}}function M(u,l){if(l&&(El(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(u)}function d(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function g(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function r(u){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y)},r(u)}var t=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],s=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],a=typeof window<"u";function c(u){var l=function(y){P(T,y);var h=L(T);function T(f){var n;return X(this,T),n=h.call(this,f),n.p=Promise.resolve(),n.resizeHandler=null,n.handlers={},n.syncWindowResize=n.syncWindowResize.bind(d(n)),n.syncEventHandlers=n.syncEventHandlers.bind(d(n)),n.attachUpdateEvents=n.attachUpdateEvents.bind(d(n)),n.getRef=n.getRef.bind(d(n)),n.handleUpdate=n.handleUpdate.bind(d(n)),n.figureCallback=n.figureCallback.bind(d(n)),n.updatePlotly=n.updatePlotly.bind(d(n)),n}return A(T,[{key:"updatePlotly",value:function(n,v,m){var b=this;this.p=this.p.then(function(){if(!b.unmounting){if(!b.el)throw new Error("Missing element reference");return u.react(b.el,{data:b.props.data,layout:b.props.layout,config:b.props.config,frames:b.props.frames})}}).then(function(){b.unmounting||(b.syncWindowResize(n),b.syncEventHandlers(),b.figureCallback(v),m&&b.attachUpdateEvents())}).catch(function(E){b.props.onError&&b.props.onError(E)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(n){this.unmounting=!1;var v=n.frames&&n.frames.length?n.frames.length:0,m=this.props.frames&&this.props.frames.length?this.props.frames.length:0,b=!(n.layout===this.props.layout&&n.data===this.props.data&&n.config===this.props.config&&m===v),E=n.revision!==void 0,p=n.revision!==this.props.revision;!b&&(!E||E&&!p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&a&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var n=this;!this.el||!this.el.removeListener||s.forEach(function(v){n.el.on(v,n.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var n=this;!this.el||!this.el.removeListener||s.forEach(function(v){n.el.removeListener(v,n.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(n){if(typeof n=="function"){var v=this.el,m=v.data,b=v.layout,E=this.el._transitionData?this.el._transitionData._frames:null,p={data:m,layout:b,frames:E};n(p,this.el)}}},{key:"syncWindowResize",value:function(n){var v=this;a&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(v.el)},window.addEventListener("resize",this.resizeHandler),n&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(n){this.el=n,this.props.debug&&a&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var n=this;t.forEach(function(v){var m=n.props["on"+v],b=n.handlers[v],E=!!b;m&&!E?n.addEventHandler(v,m):!m&&E?n.removeEventHandler(v):m&&E&&m!==b&&(n.removeEventHandler(v),n.addEventHandler(v,m))})}},{key:"addEventHandler",value:function(n,v){this.handlers[n]=v,this.el.on(this.getPlotlyEventName(n),this.handlers[n])}},{key:"removeEventHandler",value:function(n){this.el.removeListener(this.getPlotlyEventName(n),this.handlers[n]),delete this.handlers[n]}},{key:"getPlotlyEventName",value:function(n){return"plotly_"+n.toLowerCase()}},{key:"render",value:function(){return $s.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),T}($s.Component);return l.propTypes={data:di.default.arrayOf(di.default.object),config:di.default.object,layout:di.default.object,frames:di.default.arrayOf(di.default.object),revision:di.default.number,onInitialized:di.default.func,onPurge:di.default.func,onError:di.default.func,onUpdate:di.default.func,debug:di.default.bool,style:di.default.object,className:di.default.string,useResizeHandler:di.default.bool,divId:di.default.string},t.forEach(function(y){l.propTypes["on"+y]=di.default.func}),l.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},l}})(Ov);var Bv={exports:{}};(function(Cs,El){(function(di,Zi){Cs.exports=Zi()})(self,function(){return function(){var $s={79288:function(te,X,e){var A=e(3400),P={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",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 o in P){var L=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");A.addStyleRule(L,P[o])}},86712:function(te,X,e){te.exports=e(84224)},37240:function(te,X,e){te.exports=e(51132)},29744:function(te,X,e){te.exports=e(94456)},29352:function(te,X,e){te.exports=e(67244)},96144:function(te,X,e){te.exports=e(97776)},53219:function(te,X,e){te.exports=e(61712)},4624:function(te,X,e){te.exports=e(95856)},54543:function(te,X,e){te.exports=e(54272)},45e3:function(te,X,e){te.exports=e(85404)},62300:function(te,X,e){te.exports=e(26048)},6920:function(te,X,e){te.exports=e(66240)},10264:function(te,X,e){te.exports=e(40448)},32016:function(te,X,e){te.exports=e(64884)},27528:function(te,X,e){te.exports=e(15088)},75556:function(te,X,e){te.exports=e(76744)},39204:function(te,X,e){te.exports=e(94704)},73996:function(te,X,e){te.exports=e(62396)},16489:function(te,X,e){te.exports=e(32028)},5e3:function(te,X,e){te.exports=e(81932)},77280:function(te,X,e){te.exports=e(45536)},33992:function(te,X,e){te.exports=e(42600)},17600:function(te,X,e){te.exports=e(21536)},49116:function(te,X,e){te.exports=e(65664)},46808:function(te,X,e){te.exports=e(29044)},36168:function(te,X,e){te.exports=e(48928)},13792:function(te,X,e){var A=e(32016);A.register([e(37240),e(29352),e(5e3),e(33992),e(17600),e(49116),e(6920),e(67484),e(79440),e(39204),e(83096),e(36168),e(20260),e(63560),e(65832),e(46808),e(73996),e(48824),e(89904),e(25120),e(13752),e(4340),e(62300),e(29800),e(8363),e(54543),e(86636),e(42192),e(32140),e(77280),e(89296),e(56816),e(70192),e(45e3),e(27528),e(84764),e(3920),e(50248),e(4624),e(69967),e(10264),e(86152),e(53219),e(81604),e(63796),e(29744),e(89336),e(86712),e(75556),e(16489),e(97312),e(96144)]),te.exports=A},3920:function(te,X,e){te.exports=e(43480)},25120:function(te,X,e){te.exports=e(6296)},4340:function(te,X,e){te.exports=e(7404)},86152:function(te,X,e){te.exports=e(65456)},56816:function(te,X,e){te.exports=e(22020)},89296:function(te,X,e){te.exports=e(29928)},20260:function(te,X,e){te.exports=e(75792)},32140:function(te,X,e){te.exports=e(156)},84764:function(te,X,e){te.exports=e(45499)},48824:function(te,X,e){te.exports=e(3296)},69967:function(te,X,e){te.exports=e(4184)},8363:function(te,X,e){te.exports=e(36952)},86636:function(te,X,e){te.exports=e(38983)},70192:function(te,X,e){te.exports=e(11572)},81604:function(te,X,e){te.exports=e(76924)},63796:function(te,X,e){te.exports=e(62944)},89336:function(te,X,e){te.exports=e(95443)},67484:function(te,X,e){te.exports=e(34864)},97312:function(te,X,e){te.exports=e(76272)},42192:function(te,X,e){te.exports=e(97924)},29800:function(te,X,e){te.exports=e(15436)},63560:function(te,X,e){te.exports=e(5621)},89904:function(te,X,e){te.exports=e(91304)},50248:function(te,X,e){te.exports=e(41724)},65832:function(te,X,e){te.exports=e(31991)},79440:function(te,X,e){te.exports=e(22869)},13752:function(te,X,e){te.exports=e(67776)},83096:function(te,X,e){te.exports=e(95952)},72196:function(te){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}]},13916:function(te,X,e){var A=e(72196),P=e(25376),o=e(33816),L=e(31780).templatedArray;e(36208),te.exports=L("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:P({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:A.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:A.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",o.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",o.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",o.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:P({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(te,X,e){var A=e(3400),P=e(54460),o=e(23816).draw;te.exports=function(g){var r=g._fullLayout,t=A.filterVisible(r.annotations);if(t.length&&g._fullData.length)return A.syncOrAsync([o,L],g)};function L(d){var g=d._fullLayout;A.filterVisible(g.annotations).forEach(function(r){var t=P.getFromId(d,r.xref),s=P.getFromId(d,r.yref),a=P.getRefType(r.xref),c=P.getRefType(r.yref);r._extremes={},a==="range"&&M(r,t),c==="range"&&M(r,s)})}function M(d,g){var r=g._id,t=r.charAt(0),s=d[t],a=d["a"+t],c=d[t+"ref"],u=d["a"+t+"ref"],l=d["_"+t+"padplus"],y=d["_"+t+"padminus"],h={x:1,y:-1}[t]*d[t+"shift"],T=3*d.arrowsize*d.arrowwidth||0,f=T+h,n=T-h,v=3*d.startarrowsize*d.arrowwidth||0,m=v+h,b=v-h,E;if(u===c){var p=P.findExtremes(g,[g.r2c(s)],{ppadplus:f,ppadminus:n}),S=P.findExtremes(g,[g.r2c(a)],{ppadplus:Math.max(l,m),ppadminus:Math.max(y,b)});E={min:[p.min[0],S.min[0]],max:[p.max[0],S.max[0]]}}else m=a?m+a:m,b=a?b-a:b,E=P.findExtremes(g,[g.r2c(s)],{ppadplus:Math.max(l,f,m),ppadminus:Math.max(y,n,b)});d._extremes[r]=E}},42300:function(te,X,e){var A=e(3400),P=e(24040),o=e(31780).arrayEditor;te.exports={hasClickToShow:L,onClick:M};function L(r,t){var s=d(r,t);return s.on.length>0||s.explicitOff.length>0}function M(r,t){var s=d(r,t),a=s.on,c=s.off.concat(s.explicitOff),u={},l=r._fullLayout.annotations,y,h;if(a.length||c.length){for(y=0;y<a.length;y++)h=o(r.layout,"annotations",l[a[y]]),h.modifyItem("visible",!0),A.extendFlat(u,h.getUpdateObj());for(y=0;y<c.length;y++)h=o(r.layout,"annotations",l[c[y]]),h.modifyItem("visible",!1),A.extendFlat(u,h.getUpdateObj());return P.call("update",r,{},u)}}function d(r,t){var s=r._fullLayout.annotations,a=[],c=[],u=[],l=(t||[]).length,y,h,T,f,n,v,m,b;for(y=0;y<s.length;y++)if(T=s[y],f=T.clicktoshow,f){for(h=0;h<l;h++)if(n=t[h],v=n.xaxis,m=n.yaxis,v._id===T.xref&&m._id===T.yref&&v.d2r(n.x)===g(T._xclick,v)&&m.d2r(n.y)===g(T._yclick,m)){T.visible?f==="onout"?b=c:b=u:b=a,b.push(y);break}h===l&&T.visible&&f==="onout"&&c.push(y)}return{on:a,off:c,explicitOff:u}}function g(r,t){return t.type==="log"?t.l2r(r):t.d2r(r)}},87192:function(te,X,e){var A=e(3400),P=e(76308);te.exports=function(L,M,d,g){g("opacity");var r=g("bgcolor"),t=g("bordercolor"),s=P.opacity(t);g("borderpad");var a=g("borderwidth"),c=g("showarrow");g("text",c?" ":d._dfltTitle.annotation),g("textangle"),A.coerceFont(g,"font",d.font),g("width"),g("align");var u=g("height");if(u&&g("valign"),c){var l=g("arrowside"),y,h;l.indexOf("end")!==-1&&(y=g("arrowhead"),h=g("arrowsize")),l.indexOf("start")!==-1&&(g("startarrowhead",y),g("startarrowsize",h)),g("arrowcolor",s?M.bordercolor:P.defaultLine),g("arrowwidth",(s&&a||1)*2),g("standoff"),g("startstandoff")}var T=g("hovertext"),f=d.hoverlabel||{};if(T){var n=g("hoverlabel.bgcolor",f.bgcolor||(P.opacity(r)?P.rgb(r):P.defaultLine)),v=g("hoverlabel.bordercolor",f.bordercolor||P.contrast(n));A.coerceFont(g,"hoverlabel.font",{family:f.font.family,size:f.font.size,color:f.font.color||v})}g("captureevents",!!T)}},26828:function(te,X,e){var A=e(38248),P=e(36896);te.exports=function(L,M,d,g){M=M||{};var r=d==="log"&&M.type==="linear",t=d==="linear"&&M.type==="log";if(!(r||t))return;var s=L._fullLayout.annotations,a=M._id.charAt(0),c,u;function l(h){var T=c[h],f=null;r?f=P(T,M.range):f=Math.pow(10,T),A(f)||(f=null),g(u+h,f)}for(var y=0;y<s.length;y++)c=s[y],u="annotations["+y+"].",c[a+"ref"]===M._id&&l(a),c["a"+a+"ref"]===M._id&&l("a"+a)}},45216:function(te,X,e){var A=e(3400),P=e(54460),o=e(51272),L=e(87192),M=e(13916);te.exports=function(r,t){o(r,t,{name:"annotations",handleItemDefaults:d})};function d(g,r,t){function s(w,i){return A.coerce(g,r,M,w,i)}var a=s("visible"),c=s("clicktoshow");if(a||c){L(g,r,t,s);for(var u=r.showarrow,l=["x","y"],y=[-10,-30],h={_fullLayout:t},T=0;T<2;T++){var f=l[T],n=P.coerceRef(g,r,h,f,"","paper");if(n!=="paper"){var v=P.getFromId(h,n);v._annIndices.push(r._index)}if(P.coercePosition(r,h,s,n,f,.5),u){var m="a"+f,b=P.coerceRef(g,r,h,m,"pixel",["pixel","paper"]);b!=="pixel"&&b!==n&&(b=r[m]="pixel");var E=b==="pixel"?y[T]:.4;P.coercePosition(r,h,s,b,m,E)}s(f+"anchor"),s(f+"shift")}if(A.noneOrAll(g,r,["x","y"]),u&&A.noneOrAll(g,r,["ax","ay"]),c){var p=s("xclick"),S=s("yclick");r._xclick=p===void 0?r.x:P.cleanPosition(p,h,r.xref),r._yclick=S===void 0?r.y:P.cleanPosition(S,h,r.yref)}}}},23816:function(te,X,e){var A=e(33428),P=e(24040),o=e(7316),L=e(3400),M=L.strTranslate,d=e(54460),g=e(76308),r=e(43616),t=e(93024),s=e(72736),a=e(93972),c=e(86476),u=e(31780).arrayEditor,l=e(33652);te.exports={draw:y,drawOne:h,drawRaw:f};function y(n){var v=n._fullLayout;v._infolayer.selectAll(".annotation").remove();for(var m=0;m<v.annotations.length;m++)v.annotations[m].visible&&h(n,m);return o.previousPromises(n)}function h(n,v){var m=n._fullLayout,b=m.annotations[v]||{},E=d.getFromId(n,b.xref),p=d.getFromId(n,b.yref);E&&E.setScale(),p&&p.setScale(),f(n,b,v,!1,E,p)}function T(n,v,m,b,E){var p=E[m],S=E[m+"ref"],w=m.indexOf("y")!==-1,i=d.getRefType(S)==="domain",C=w?b.h:b.w;return n?i?p+(w?-v:v)/n._length:n.p2r(n.r2p(p)+v):p+(w?-v:v)/C}function f(n,v,m,b,E,p){var S=n._fullLayout,w=n._fullLayout._size,i=n._context.edits,C,x;b?(C="annotation-"+b,x=b+".annotations"):(C="annotation",x="annotations");var k=u(n.layout,x,v),I=k.modifyBase,B=k.modifyItem,_=k.getUpdateObj;S._infolayer.selectAll("."+C+'[data-index="'+m+'"]').remove();var z="clip"+S._uid+"_ann"+m;if(!v._input||v.visible===!1){A.selectAll("#"+z).remove();return}var O={x:{},y:{}},F=+v.textangle||0,N=S._infolayer.append("g").classed(C,!0).attr("data-index",String(m)).style("opacity",v.opacity),V=N.append("g").classed("annotation-text-g",!0),j=i[v.showarrow?"annotationTail":"annotationPosition"],$=v.captureevents||i.annotationText||j;function q(de){var we={index:m,annotation:v._input,fullAnnotation:v,event:de};return b&&(we.subplotId=b),we}var oe=V.append("g").style("pointer-events",$?"all":null).call(a,"pointer").on("click",function(){n._dragging=!1,n.emit("plotly_clickannotation",q(A.event))});v.hovertext&&oe.on("mouseover",function(){var de=v.hoverlabel,we=de.font,me=this.getBoundingClientRect(),Le=n.getBoundingClientRect();t.loneHover({x0:me.left-Le.left,x1:me.right-Le.left,y:(me.top+me.bottom)/2-Le.top,text:v.hovertext,color:de.bgcolor,borderColor:de.bordercolor,fontFamily:we.family,fontSize:we.size,fontColor:we.color},{container:S._hoverlayer.node(),outerContainer:S._paper.node(),gd:n})}).on("mouseout",function(){t.loneUnhover(S._hoverlayer.node())});var Z=v.borderwidth,G=v.borderpad,re=Z+G,H=oe.append("rect").attr("class","bg").style("stroke-width",Z+"px").call(g.stroke,v.bordercolor).call(g.fill,v.bgcolor),J=v.width||v.height,ae=S._topclips.selectAll("#"+z).data(J?[0]:[]);ae.enter().append("clipPath").classed("annclip",!0).attr("id",z).append("rect"),ae.exit().remove();var K=v.font,Y=S._meta?L.templateString(v.text,S._meta):v.text,ie=oe.append("text").classed("annotation-text",!0).text(Y);function ne(de){return de.call(r.font,K).attr({"text-anchor":{left:"start",right:"end"}[v.align]||"middle"}),s.convertToTspans(de,n,le),de}function le(){var de=ie.selectAll("a");if(de.size()===1&&de.text()===ie.text()){var we=oe.insert("a",":first-child").attr({"xlink:xlink:href":de.attr("xlink:href"),"xlink:xlink:show":de.attr("xlink:show")}).style({cursor:"pointer"});we.node().appendChild(H.node())}var me=oe.select(".annotation-text-math-group"),Le=!me.empty(),ve=r.bBox((Le?me:ie).node()),Ae=ve.width,ye=ve.height,Se=v.width||Ae,_e=v.height||ye,ze=Math.round(Se+2*re),Ie=Math.round(_e+2*re);function Ne(cr,er){return er==="auto"&&(cr<.3333333333333333?er="left":cr>.6666666666666666?er="right":er="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[er]}for(var et=!1,st=["x","y"],Ze=0;Ze<st.length;Ze++){var Ke=st[Ze],nt=v[Ke+"ref"]||Ke,it=v["a"+Ke+"ref"],lt={x:E,y:p}[Ke],vt=(F+(Ke==="x"?0:-90))*Math.PI/180,xt=ze*Math.cos(vt),Je=Ie*Math.sin(vt),Pe=Math.abs(xt)+Math.abs(Je),Ue=v[Ke+"anchor"],He=v[Ke+"shift"]*(Ke==="x"?1:-1),Oe=O[Ke],Ce,ge,pe,Te,be,ke=d.getRefType(nt);if(lt&&ke!=="domain"){var Ve=lt.r2fraction(v[Ke]);(Ve<0||Ve>1)&&(it===nt?(Ve=lt.r2fraction(v["a"+Ke]),(Ve<0||Ve>1)&&(et=!0)):et=!0),Ce=lt._offset+lt.r2p(v[Ke]),Te=.5}else{var je=ke==="domain";Ke==="x"?(pe=v[Ke],Ce=je?lt._offset+lt._length*pe:Ce=w.l+w.w*pe):(pe=1-v[Ke],Ce=je?lt._offset+lt._length*pe:Ce=w.t+w.h*pe),Te=v.showarrow?.5:pe}if(v.showarrow){Oe.head=Ce;var at=v["a"+Ke];if(be=xt*Ne(.5,v.xanchor)-Je*Ne(.5,v.yanchor),it===nt){var ut=d.getRefType(it);ut==="domain"?(Ke==="y"&&(at=1-at),Oe.tail=lt._offset+lt._length*at):ut==="paper"?Ke==="y"?(at=1-at,Oe.tail=w.t+w.h*at):Oe.tail=w.l+w.w*at:Oe.tail=lt._offset+lt.r2p(at),ge=be}else Oe.tail=Ce+at,ge=be+at;Oe.text=Oe.tail+be;var Nt=S[Ke==="x"?"width":"height"];if(nt==="paper"&&(Oe.head=L.constrain(Oe.head,1,Nt-1)),it==="pixel"){var Vt=-Math.max(Oe.tail-3,Oe.text),gt=Math.min(Oe.tail+3,Oe.text)-Nt;Vt>0?(Oe.tail+=Vt,Oe.text+=Vt):gt>0&&(Oe.tail-=gt,Oe.text-=gt)}Oe.tail+=He,Oe.head+=He}else be=Pe*Ne(Te,Ue),ge=be,Oe.text=Ce+be;Oe.text+=He,be+=He,ge+=He,v["_"+Ke+"padplus"]=Pe/2+ge,v["_"+Ke+"padminus"]=Pe/2-ge,v["_"+Ke+"size"]=Pe,v["_"+Ke+"shift"]=be}if(et){oe.remove();return}var Ct=0,Yt=0;if(v.align!=="left"&&(Ct=(Se-Ae)*(v.align==="center"?.5:1)),v.valign!=="top"&&(Yt=(_e-ye)*(v.valign==="middle"?.5:1)),Le)me.select("svg").attr({x:re+Ct-1,y:re+Yt}).call(r.setClipUrl,J?z:null,n);else{var gr=re+Yt-ve.top,ht=re+Ct-ve.left;ie.call(s.positionText,ht,gr).call(r.setClipUrl,J?z:null,n)}ae.select("rect").call(r.setRect,re,re,Se,_e),H.call(r.setRect,Z/2,Z/2,ze-Z,Ie-Z),oe.call(r.setTranslate,Math.round(O.x.text-ze/2),Math.round(O.y.text-Ie/2)),V.attr({transform:"rotate("+F+","+O.x.text+","+O.y.text+")"});var Ht=function(cr,er){N.selectAll(".annotation-arrow-g").remove();var ct=O.x.head,qe=O.y.head,dt=O.x.tail+cr,bt=O.y.tail+er,Et=O.x.text+cr,Mt=O.y.text+er,_t=L.rotationXYMatrix(F,Et,Mt),It=L.apply2DTransform(_t),Gt=L.apply2DTransform2(_t),nr=+H.attr("width"),ar=+H.attr("height"),ir=Et-.5*nr,Be=ir+nr,Fe=Mt-.5*ar,Rt=Fe+ar,Lt=[[ir,Fe,ir,Rt],[ir,Rt,Be,Rt],[Be,Rt,Be,Fe],[Be,Fe,ir,Fe]].map(Gt);if(!Lt.reduce(function(Ar,sn){return Ar^!!L.segmentsIntersect(ct,qe,ct+1e6,qe+1e6,sn[0],sn[1],sn[2],sn[3])},!1)){Lt.forEach(function(Ar){var sn=L.segmentsIntersect(dt,bt,ct,qe,Ar[0],Ar[1],Ar[2],Ar[3]);sn&&(dt=sn.x,bt=sn.y)});var Ut=v.arrowwidth,Qt=v.arrowcolor,rr=v.arrowside,Kt=N.append("g").style({opacity:g.opacity(Qt)}).classed("annotation-arrow-g",!0),Dt=Kt.append("path").attr("d","M"+dt+","+bt+"L"+ct+","+qe).style("stroke-width",Ut+"px").call(g.stroke,g.rgb(Qt));if(l(Dt,rr,v),i.annotationPosition&&Dt.node().parentNode&&!b){var sr=ct,fr=qe;if(v.standoff){var vr=Math.sqrt(Math.pow(ct-dt,2)+Math.pow(qe-bt,2));sr+=v.standoff*(dt-ct)/vr,fr+=v.standoff*(bt-qe)/vr}var lr=Kt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(dt-sr)+","+(bt-fr),transform:M(sr,fr)}).style("stroke-width",Ut+6+"px").call(g.stroke,"rgba(0,0,0,0)").call(g.fill,"rgba(0,0,0,0)"),Or,Sr;c.init({element:lr.node(),gd:n,prepFn:function(){var Ar=r.getTranslate(oe);Or=Ar.x,Sr=Ar.y,E&&E.autorange&&I(E._name+".autorange",!0),p&&p.autorange&&I(p._name+".autorange",!0)},moveFn:function(Ar,sn){var Jr=It(Or,Sr),bn=Jr[0]+Ar,xn=Jr[1]+sn;oe.call(r.setTranslate,bn,xn),B("x",T(E,Ar,"x",w,v)),B("y",T(p,sn,"y",w,v)),v.axref===v.xref&&B("ax",T(E,Ar,"ax",w,v)),v.ayref===v.yref&&B("ay",T(p,sn,"ay",w,v)),Kt.attr("transform",M(Ar,sn)),V.attr({transform:"rotate("+F+","+bn+","+xn+")"})},doneFn:function(){P.call("_guiRelayout",n,_());var Ar=document.querySelector(".js-notes-box-panel");Ar&&Ar.redraw(Ar.selectedObj)}})}}};if(v.showarrow&&Ht(0,0),j){var Wt;c.init({element:oe.node(),gd:n,prepFn:function(){Wt=V.attr("transform")},moveFn:function(cr,er){var ct="pointer";if(v.showarrow)v.axref===v.xref?B("ax",T(E,cr,"ax",w,v)):B("ax",v.ax+cr),v.ayref===v.yref?B("ay",T(p,er,"ay",w.w,v)):B("ay",v.ay+er),Ht(cr,er);else{if(b)return;var qe,dt;if(E)qe=T(E,cr,"x",w,v);else{var bt=v._xsize/w.w,Et=v.x+(v._xshift-v.xshift)/w.w-bt/2;qe=c.align(Et+cr/w.w,bt,0,1,v.xanchor)}if(p)dt=T(p,er,"y",w,v);else{var Mt=v._ysize/w.h,_t=v.y-(v._yshift+v.yshift)/w.h-Mt/2;dt=c.align(_t-er/w.h,Mt,0,1,v.yanchor)}B("x",qe),B("y",dt),(!E||!p)&&(ct=c.getCursor(E?.5:qe,p?.5:dt,v.xanchor,v.yanchor))}V.attr({transform:M(cr,er)+Wt}),a(oe,ct)},clickFn:function(cr,er){v.captureevents&&n.emit("plotly_clickannotation",q(er))},doneFn:function(){a(oe),P.call("_guiRelayout",n,_());var cr=document.querySelector(".js-notes-box-panel");cr&&cr.redraw(cr.selectedObj)}})}}i.annotationText?ie.call(s.makeEditable,{delegate:oe,gd:n}).call(ne).on("edit",function(de){v.text=de,this.call(ne),B("text",de),E&&E.autorange&&I(E._name+".autorange",!0),p&&p.autorange&&I(p._name+".autorange",!0),P.call("_guiRelayout",n,_())}):ie.call(ne)}},33652:function(te,X,e){var A=e(33428),P=e(76308),o=e(72196),L=e(3400),M=L.strScale,d=L.strRotate,g=L.strTranslate;te.exports=function(t,s,a){var c=t.node(),u=o[a.arrowhead||0],l=o[a.startarrowhead||0],y=(a.arrowwidth||1)*(a.arrowsize||1),h=(a.arrowwidth||1)*(a.startarrowsize||1),T=s.indexOf("start")>=0,f=s.indexOf("end")>=0,n=u.backoff*y+a.standoff,v=l.backoff*h+a.startstandoff,m,b,E,p;if(c.nodeName==="line"){m={x:+t.attr("x1"),y:+t.attr("y1")},b={x:+t.attr("x2"),y:+t.attr("y2")};var S=m.x-b.x,w=m.y-b.y;if(E=Math.atan2(w,S),p=E+Math.PI,n&&v&&n+v>Math.sqrt(S*S+w*w)){V();return}if(n){if(n*n>S*S+w*w){V();return}var i=n*Math.cos(E),C=n*Math.sin(E);b.x+=i,b.y+=C,t.attr({x2:b.x,y2:b.y})}if(v){if(v*v>S*S+w*w){V();return}var x=v*Math.cos(E),k=v*Math.sin(E);m.x-=x,m.y-=k,t.attr({x1:m.x,y1:m.y})}}else if(c.nodeName==="path"){var I=c.getTotalLength(),B="";if(I<n+v){V();return}var _=c.getPointAtLength(0),z=c.getPointAtLength(.1);E=Math.atan2(_.y-z.y,_.x-z.x),m=c.getPointAtLength(Math.min(v,I)),B="0px,"+v+"px,";var O=c.getPointAtLength(I),F=c.getPointAtLength(I-.1);p=Math.atan2(O.y-F.y,O.x-F.x),b=c.getPointAtLength(Math.max(0,I-n));var N=B?v+n:n;B+=I-N+"px,"+I+"px",t.style("stroke-dasharray",B)}function V(){t.style("stroke-dasharray","0px,100px")}function j($,q,oe,Z){$.path&&($.noRotate&&(oe=0),A.select(c.parentNode).append("path").attr({class:t.attr("class"),d:$.path,transform:g(q.x,q.y)+d(oe*180/Math.PI)+M(Z)}).style({fill:P.rgb(a.arrowcolor),"stroke-width":0}))}T&&j(l,m,E,h),f&&j(u,b,p,y)}},79180:function(te,X,e){var A=e(23816),P=e(42300);te.exports={moduleType:"component",name:"annotations",layoutAttributes:e(13916),supplyLayoutDefaults:e(45216),includeBasePlot:e(36632)("annotations"),calcAutorange:e(90272),draw:A.draw,drawOne:A.drawOne,drawRaw:A.drawRaw,hasClickToShow:P.hasClickToShow,onClick:P.onClick,convertCoords:e(26828)}},45899:function(te,X,e){var A=e(13916),P=e(67824).overrideAll,o=e(31780).templatedArray;te.exports=P(o("annotation",{visible:A.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:A.xanchor,xshift:A.xshift,yanchor:A.yanchor,yshift:A.yshift,text:A.text,textangle:A.textangle,font:A.font,width:A.width,height:A.height,opacity:A.opacity,align:A.align,valign:A.valign,bgcolor:A.bgcolor,bordercolor:A.bordercolor,borderpad:A.borderpad,borderwidth:A.borderwidth,showarrow:A.showarrow,arrowcolor:A.arrowcolor,arrowhead:A.arrowhead,startarrowhead:A.startarrowhead,arrowside:A.arrowside,arrowsize:A.arrowsize,startarrowsize:A.startarrowsize,arrowwidth:A.arrowwidth,standoff:A.standoff,startstandoff:A.startstandoff,hovertext:A.hovertext,hoverlabel:A.hoverlabel,captureevents:A.captureevents}),"calc","from-root")},42456:function(te,X,e){var A=e(3400),P=e(54460);te.exports=function(M){for(var d=M.fullSceneLayout,g=d.annotations,r=0;r<g.length;r++)o(g[r],M);M.fullLayout._infolayer.selectAll(".annotation-"+M.id).remove()};function o(L,M){var d=M.fullSceneLayout,g=d.domain,r=M.fullLayout._size,t={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};L._xa={},A.extendFlat(L._xa,t),P.setConvert(L._xa),L._xa._offset=r.l+g.x[0]*r.w,L._xa.l2p=function(){return .5*(1+L._pdata[0]/L._pdata[3])*r.w*(g.x[1]-g.x[0])},L._ya={},A.extendFlat(L._ya,t),P.setConvert(L._ya),L._ya._offset=r.t+(1-g.y[1])*r.h,L._ya.l2p=function(){return .5*(1-L._pdata[1]/L._pdata[3])*r.h*(g.y[1]-g.y[0])}}},52808:function(te,X,e){var A=e(3400),P=e(54460),o=e(51272),L=e(87192),M=e(45899);te.exports=function(r,t,s){o(r,t,{name:"annotations",handleItemDefaults:d,fullLayout:s.fullLayout})};function d(g,r,t,s){function a(l,y){return A.coerce(g,r,M,l,y)}function c(l){var y=l+"axis",h={_fullLayout:{}};return h._fullLayout[y]=t[y],P.coercePosition(r,h,a,l,l,.5)}var u=a("visible");u&&(L(g,r,s.fullLayout,a),c("x"),c("y"),c("z"),A.noneOrAll(g,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",a("ax",-10),a("ay",-30),A.noneOrAll(g,r,["ax","ay"])))}},71836:function(te,X,e){var A=e(23816).drawRaw,P=e(94424),o=["x","y","z"];te.exports=function(M){for(var d=M.fullSceneLayout,g=M.dataScale,r=d.annotations,t=0;t<r.length;t++){for(var s=r[t],a=!1,c=0;c<3;c++){var u=o[c],l=s[u],y=d[u+"axis"],h=y.r2fraction(l);if(h<0||h>1){a=!0;break}}a?M.fullLayout._infolayer.select(".annotation-"+M.id+'[data-index="'+t+'"]').remove():(s._pdata=P(M.glplot.cameraParams,[d.xaxis.r2l(s.x)*g[0],d.yaxis.r2l(s.y)*g[1],d.zaxis.r2l(s.z)*g[2]]),A(M.graphDiv,s,t,M.id,s._xa,s._ya))}}},56864:function(te,X,e){var A=e(24040),P=e(3400);te.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(45899)}}},layoutAttributes:e(45899),handleDefaults:e(52808),includeBasePlot:o,convert:e(42456),draw:e(71836)};function o(L,M){var d=A.subplotsRegistry.gl3d;if(d)for(var g=d.attrRegex,r=Object.keys(L),t=0;t<r.length;t++){var s=r[t];g.test(s)&&(L[s].annotations||[]).length&&(P.pushUnique(M._basePlotModules,d),P.pushUnique(M._subplots.gl3d,s))}}},54976:function(te,X,e){te.exports=e(38700),e(15168),e(67020),e(89792),e(55668),e(65168),e(2084),e(26368),e(24747),e(65616),e(30632),e(73040),e(1104),e(51456),e(4592),e(45348)},97776:function(te,X,e){var A=e(54976),P=e(3400),o=e(39032),L=o.EPOCHJD,M=o.ONEDAY,d={valType:"enumerated",values:P.sortObjectKeys(A.calendars),editType:"calc",dflt:"gregorian"},g=function(E,p,S,w){var i={};return i[S]=d,P.coerce(E,p,i,S,w)},r=function(E,p,S,w){for(var i=0;i<S.length;i++)g(E,p,S[i]+"calendar",w.calendar)},t={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"},s={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"},a={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"]},c="##",u={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:c,w:c,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function l(E,p,S){for(var w=Math.floor((p+.05)/M)+L,i=h(S).fromJD(w),C=0,x,k,I,B,_;(C=E.indexOf("%",C))!==-1;)x=E.charAt(C+1),x==="0"||x==="-"||x==="_"?(I=3,k=E.charAt(C+2),x==="_"&&(x="-")):(k=x,x="0",I=2),B=u[k],B?(B===c?_=c:_=i.formatDate(B[x]),E=E.substr(0,C)+_+E.substr(C+I),C+=_.length):C+=I;return E}var y={};function h(E){var p=y[E];return p||(p=y[E]=A.instance(E),p)}function T(E){return P.extendFlat({},d,{description:E})}function f(E){return"Sets the calendar system to use with `"+E+"` date data."}var n={xcalendar:T(f("x"))},v=P.extendFlat({},n,{ycalendar:T(f("y"))}),m=P.extendFlat({},v,{zcalendar:T(f("z"))}),b=T(["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(" "));te.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:m,surface:m,mesh3d:m,scattergl:v,ohlc:n,candlestick:n},layout:{calendar:T(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:b},yaxis:{calendar:b},scene:{xaxis:{calendar:b},yaxis:{calendar:b},zaxis:{calendar:b}},polar:{radialaxis:{calendar:b}}},transforms:{filter:{valuecalendar:T(["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:T(["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:d,handleDefaults:g,handleTraceDefaults:r,CANONICAL_SUNDAY:s,CANONICAL_TICK:t,DFLTRANGE:a,getCal:h,worldCalFmt:l}},22548:function(te,X){X.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],X.defaultLine="#444",X.lightLine="#eee",X.background="#fff",X.borderLine="#BEC8D9",X.lightFraction=90.9090909090909},76308:function(te,X,e){var A=e(49760),P=e(38248),o=e(38116).isTypedArray,L=te.exports={},M=e(22548);L.defaults=M.defaults;var d=L.defaultLine=M.defaultLine;L.lightLine=M.lightLine;var g=L.background=M.background;L.tinyRGB=function(t){var s=t.toRgb();return"rgb("+Math.round(s.r)+", "+Math.round(s.g)+", "+Math.round(s.b)+")"},L.rgb=function(t){return L.tinyRGB(A(t))},L.opacity=function(t){return t?A(t).getAlpha():0},L.addOpacity=function(t,s){var a=A(t).toRgb();return"rgba("+Math.round(a.r)+", "+Math.round(a.g)+", "+Math.round(a.b)+", "+s+")"},L.combine=function(t,s){var a=A(t).toRgb();if(a.a===1)return A(t).toRgbString();var c=A(s||g).toRgb(),u=c.a===1?c:{r:255*(1-c.a)+c.r*c.a,g:255*(1-c.a)+c.g*c.a,b:255*(1-c.a)+c.b*c.a},l={r:u.r*(1-a.a)+a.r*a.a,g:u.g*(1-a.a)+a.g*a.a,b:u.b*(1-a.a)+a.b*a.a};return A(l).toRgbString()},L.interpolate=function(t,s,a){var c=A(t).toRgb(),u=A(s).toRgb(),l={r:a*c.r+(1-a)*u.r,g:a*c.g+(1-a)*u.g,b:a*c.b+(1-a)*u.b};return A(l).toRgbString()},L.contrast=function(t,s,a){var c=A(t);c.getAlpha()!==1&&(c=A(L.combine(t,g)));var u=c.isDark()?s?c.lighten(s):g:a?c.darken(a):d;return u.toString()},L.stroke=function(t,s){var a=A(s);t.style({stroke:L.tinyRGB(a),"stroke-opacity":a.getAlpha()})},L.fill=function(t,s){var a=A(s);t.style({fill:L.tinyRGB(a),"fill-opacity":a.getAlpha()})},L.clean=function(t){if(!(!t||typeof t!="object")){var s=Object.keys(t),a,c,u,l;for(a=0;a<s.length;a++)if(u=s[a],l=t[u],u.substr(u.length-5)==="color")if(Array.isArray(l))for(c=0;c<l.length;c++)l[c]=r(l[c]);else t[u]=r(l);else if(u.substr(u.length-10)==="colorscale"&&Array.isArray(l))for(c=0;c<l.length;c++)Array.isArray(l[c])&&(l[c][1]=r(l[c][1]));else if(Array.isArray(l)){var y=l[0];if(!Array.isArray(y)&&y&&typeof y=="object")for(c=0;c<l.length;c++)L.clean(l[c])}else l&&typeof l=="object"&&!o(l)&&L.clean(l)}};function r(t){if(P(t)||typeof t!="string")return t;var s=t.trim();if(s.substr(0,3)!=="rgb")return t;var a=s.match(/^rgba?\s*\(([^()]*)\)$/);if(!a)return t;var c=a[1].trim().split(/\s*[\s,]\s*/),u=s.charAt(3)==="a"&&c.length===4;if(!u&&c.length!==3)return t;for(var l=0;l<c.length;l++){if(!c[l].length||(c[l]=Number(c[l]),!(c[l]>=0)))return t;if(l===3)c[l]>1&&(c[l]=1);else if(c[l]>=1)return t}var y=Math.round(c[0]*255)+", "+Math.round(c[1]*255)+", "+Math.round(c[2]*255);return u?"rgba("+y+", "+c[3]+")":"rgb("+y+")"}},42996:function(te,X,e){var A=e(94724),P=e(25376),o=e(92880).extendFlat,L=e(67824).overrideAll;te.exports=L({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"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:A.linecolor,outlinewidth:A.linewidth,bordercolor:A.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:A.minor.tickmode,nticks:A.nticks,tick0:A.tick0,dtick:A.dtick,tickvals:A.tickvals,ticktext:A.ticktext,ticks:o({},A.ticks,{dflt:""}),ticklabeloverflow:o({},A.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:A.ticklen,tickwidth:A.tickwidth,tickcolor:A.tickcolor,ticklabelstep:A.ticklabelstep,showticklabels:A.showticklabels,labelalias:A.labelalias,tickfont:P({}),tickangle:A.tickangle,tickformat:A.tickformat,tickformatstops:A.tickformatstops,tickprefix:A.tickprefix,showtickprefix:A.showtickprefix,ticksuffix:A.ticksuffix,showticksuffix:A.showticksuffix,separatethousands:A.separatethousands,exponentformat:A.exponentformat,minexponent:A.minexponent,showexponent:A.showexponent,title:{text:{valType:"string"},font:P({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:P({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(te){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"}}},64013:function(te,X,e){var A=e(3400),P=e(31780),o=e(26332),L=e(25404),M=e(95936),d=e(42568),g=e(42996);te.exports=function(t,s,a){var c=P.newContainer(s,"colorbar"),u=t.colorbar||{};function l(O,F){return A.coerce(u,c,g,O,F)}var y=a.margin||{t:0,b:0,l:0,r:0},h=a.width-y.l-y.r,T=a.height-y.t-y.b,f=l("orientation"),n=f==="v",v=l("thicknessmode");l("thickness",v==="fraction"?30/(n?h:T):30);var m=l("lenmode");l("len",m==="fraction"?1:n?T:h);var b=l("yref"),E=l("xref"),p=b==="paper",S=E==="paper",w,i,C,x="left";n?(C="middle",x=S?"left":"right",w=S?1.02:1,i=.5):(C=p?"bottom":"top",x="center",w=.5,i=p?1.02:1),A.coerce(u,c,{x:{valType:"number",min:S?-2:0,max:S?3:1,dflt:w}},"x"),A.coerce(u,c,{y:{valType:"number",min:p?-2:0,max:p?3:1,dflt:i}},"y"),l("xanchor",x),l("xpad"),l("yanchor",C),l("ypad"),A.noneOrAll(u,c,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var k=A.coerce(u,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:n?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":"hide past div"),o(u,c,l,"linear");var I=a.font,B={noAutotickangles:!0,outerTicks:!1,font:I};k.indexOf("inside")!==-1&&(B.bgColor="black"),d(u,c,l,"linear",B),M(u,c,l,"linear",B),L(u,c,l,"linear",B),l("title.text",a._dfltTitle.colorbar);var _=c.showticklabels?c.tickfont:I,z=A.extendFlat({},_,{color:I.color,size:A.bigFont(_.size)});A.coerceFont(l,"title.font",z),l("title.side",n?"top":"right")}},37848:function(te,X,e){var A=e(33428),P=e(49760),o=e(7316),L=e(24040),M=e(54460),d=e(86476),g=e(3400),r=g.strTranslate,t=e(92880).extendFlat,s=e(93972),a=e(43616),c=e(76308),u=e(81668),l=e(72736),y=e(94288).flipScale,h=e(28336),T=e(37668),f=e(94724),n=e(84284),v=n.LINE_SPACING,m=n.FROM_TL,b=n.FROM_BR,E=e(63964).cn;function p(k){var I=k._fullLayout,B=I._infolayer.selectAll("g."+E.colorbar).data(S(k),function(_){return _._id});B.enter().append("g").attr("class",function(_){return _._id}).classed(E.colorbar,!0),B.each(function(_){var z=A.select(this);g.ensureSingle(z,"rect",E.cbbg),g.ensureSingle(z,"g",E.cbfills),g.ensureSingle(z,"g",E.cblines),g.ensureSingle(z,"g",E.cbaxis,function(F){F.classed(E.crisp,!0)}),g.ensureSingle(z,"g",E.cbtitleunshift,function(F){F.append("g").classed(E.cbtitle,!0)}),g.ensureSingle(z,"rect",E.cboutline);var O=w(z,_,k);O&&O.then&&(k._promises||[]).push(O),k._context.edits.colorbarPosition&&i(z,_,k)}),B.exit().each(function(_){o.autoMargin(k,_._id)}).remove(),B.order()}function S(k){var I=k._fullLayout,B=k.calcdata,_=[],z,O,F,N;function V(K){return t(K,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function j(){typeof N.calc=="function"?N.calc(k,F,z):(z._fillgradient=O.reversescale?y(O.colorscale):O.colorscale,z._zrange=[O[N.min],O[N.max]])}for(var $=0;$<B.length;$++){var q=B[$];if(F=q[0].trace,!!F._module){var oe=F._module.colorbar;if(F.visible===!0&&oe)for(var Z=Array.isArray(oe),G=Z?oe:[oe],re=0;re<G.length;re++){N=G[re];var H=N.container;O=H?F[H]:F,O&&O.showscale&&(z=V(O.colorbar),z._id="cb"+F.uid+(Z&&H?"-"+H:""),z._traceIndex=F.index,z._propPrefix=(H?H+".":"")+"colorbar.",z._meta=F._meta,j(),_.push(z))}}}for(var J in I._colorAxes)if(O=I[J],O.showscale){var ae=I._colorAxes[J];z=V(O.colorbar),z._id="cb"+J,z._propPrefix=J+".colorbar.",z._meta=I._meta,N={min:"cmin",max:"cmax"},ae[0]!=="heatmap"&&(F=ae[1],N.calc=F._module.colorbar.calc),j(),_.push(z)}return _}function w(k,I,B){var _=I.orientation==="v",z=I.len,O=I.lenmode,F=I.thickness,N=I.thicknessmode,V=I.outlinewidth,j=I.borderwidth,$=I.bgcolor,q=I.xanchor,oe=I.yanchor,Z=I.xpad,G=I.ypad,re=I.x,H=_?I.y:1-I.y,J=I.yref==="paper",ae=I.xref==="paper",K=B._fullLayout,Y=K._size,ie=I._fillcolor,ne=I._line,le=I.title,de=le.side,we=I._zrange||A.extent((typeof ie=="function"?ie:ne.color).domain()),me=typeof ne.color=="function"?ne.color:function(){return ne.color},Le=typeof ie=="function"?ie:function(){return ie},ve=I._levels,Ae=C(B,I,we),ye=Ae.fill,Se=Ae.line,_e=Math.round(F*(N==="fraction"?_?Y.w:Y.h:1)),ze=_e/(_?Y.w:Y.h),Ie=Math.round(z*(O==="fraction"?_?Y.h:Y.w:1)),Ne=Ie/(_?Y.h:Y.w),et=ae?Y.w:B._fullLayout.width,st=J?Y.h:B._fullLayout.height,Ze=Math.round(_?re*et+Z:H*st+G),Ke={center:.5,right:1}[q]||0,nt={top:1,middle:.5}[oe]||0,it=_?re-Ke*ze:H-nt*ze,lt=_?H-nt*Ne:re-Ke*Ne,vt=Math.round(_?st*(1-lt):et*lt);I._lenFrac=Ne,I._thickFrac=ze,I._uFrac=it,I._vFrac=lt;var xt=I._axis=x(B,I,we);xt.position=ze+(_?re+Z/Y.w:H+G/Y.h);var Je=["top","bottom"].indexOf(de)!==-1;if(_&&Je&&(xt.title.side=de,xt.titlex=re+Z/Y.w,xt.titley=lt+(le.side==="top"?Ne-G/Y.h:G/Y.h)),!_&&!Je&&(xt.title.side=de,xt.titley=H+G/Y.h,xt.titlex=lt+Z/Y.w),ne.color&&I.tickmode==="auto"){xt.tickmode="linear",xt.tick0=ve.start;var Pe=ve.size,Ue=g.constrain(Ie/50,4,15)+1,He=(we[1]-we[0])/((I.nticks||Ue)*Pe);if(He>1){var Oe=Math.pow(10,Math.floor(Math.log(He)/Math.LN10));Pe*=Oe*g.roundUp(He/Oe,[2,5,10]),(Math.abs(ve.start)/ve.size+1e-6)%1<2e-6&&(xt.tick0=0)}xt.dtick=Pe}xt.domain=_?[lt+G/Y.h,lt+Ne-G/Y.h]:[lt+Z/Y.w,lt+Ne-Z/Y.w],xt.setScale(),k.attr("transform",r(Math.round(Y.l),Math.round(Y.t)));var Ce=k.select("."+E.cbtitleunshift).attr("transform",r(-Math.round(Y.l),-Math.round(Y.t))),ge=xt.ticklabelposition,pe=xt.title.font.size,Te=k.select("."+E.cbaxis),be,ke=0,Ve=0;function je(gt,Ct){var Yt={propContainer:xt,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:K._dfltTitle.colorbar,containerGroup:k.select("."+E.cbtitle)},gr=gt.charAt(0)==="h"?gt.substr(1):"h"+gt;k.selectAll("."+gr+",."+gr+"-math-group").remove(),u.draw(B,gt,t(Yt,Ct||{}))}function at(){if(_&&Je||!_&&!Je){var gt,Ct;de==="top"&&(gt=Z+Y.l+et*re,Ct=G+Y.t+st*(1-lt-Ne)+3+pe*.75),de==="bottom"&&(gt=Z+Y.l+et*re,Ct=G+Y.t+st*(1-lt)-3-pe*.25),de==="right"&&(Ct=G+Y.t+st*H+3+pe*.75,gt=Z+Y.l+et*lt),je(xt._id+"title",{attributes:{x:gt,y:Ct,"text-anchor":_?"start":"middle"}})}}function ut(){if(_&&!Je||!_&&Je){var gt=xt.position||0,Ct=xt._offset+xt._length/2,Yt,gr;if(de==="right")gr=Ct,Yt=Y.l+et*gt+10+pe*(xt.showticklabels?1:.5);else if(Yt=Ct,de==="bottom"&&(gr=Y.t+st*gt+10+(ge.indexOf("inside")===-1?xt.tickfont.size:0)+(xt.ticks!=="intside"&&I.ticklen||0)),de==="top"){var ht=le.text.split("<br>").length;gr=Y.t+st*gt+10-_e-v*pe*ht}je((_?"h":"v")+xt._id+"title",{avoid:{selection:A.select(B).selectAll("g."+xt._id+"tick"),side:de,offsetTop:_?0:Y.t,offsetLeft:_?Y.l:0,maxShift:_?K.width:K.height},attributes:{x:Yt,y:gr,"text-anchor":"middle"},transform:{rotate:_?-90:0,offset:0}})}}function Nt(){if(!_&&!Je||_&&Je){var gt=k.select("."+E.cbtitle),Ct=gt.select("text"),Yt=[-V/2,V/2],gr=gt.select(".h"+xt._id+"title-math-group").node(),ht=15.6;Ct.node()&&(ht=parseInt(Ct.node().style.fontSize,10)*v);var Ht;if(gr?(Ht=a.bBox(gr),Ve=Ht.width,ke=Ht.height,ke>ht&&(Yt[1]-=(ke-ht)/2)):Ct.node()&&!Ct.classed(E.jsPlaceholder)&&(Ht=a.bBox(Ct.node()),Ve=Ht.width,ke=Ht.height),_){if(ke){if(ke+=5,de==="top")xt.domain[1]-=ke/Y.h,Yt[1]*=-1;else{xt.domain[0]+=ke/Y.h;var Wt=l.lineCount(Ct);Yt[1]+=(1-Wt)*ht}gt.attr("transform",r(Yt[0],Yt[1])),xt.setScale()}}else Ve&&(de==="right"&&(xt.domain[0]+=(Ve+pe/2)/Y.w),gt.attr("transform",r(Yt[0],Yt[1])),xt.setScale())}k.selectAll("."+E.cbfills+",."+E.cblines).attr("transform",_?r(0,Math.round(Y.h*(1-xt.domain[1]))):r(Math.round(Y.w*xt.domain[0]),0)),Te.attr("transform",_?r(0,Math.round(-Y.t)):r(Math.round(-Y.l),0));var cr=k.select("."+E.cbfills).selectAll("rect."+E.cbfill).attr("style","").data(ye);cr.enter().append("rect").classed(E.cbfill,!0).attr("style",""),cr.exit().remove();var er=we.map(xt.c2p).map(Math.round).sort(function(Et,Mt){return Et-Mt});cr.each(function(Et,Mt){var _t=[Mt===0?we[0]:(ye[Mt]+ye[Mt-1])/2,Mt===ye.length-1?we[1]:(ye[Mt]+ye[Mt+1])/2].map(xt.c2p).map(Math.round);_&&(_t[1]=g.constrain(_t[1]+(_t[1]>_t[0])?1:-1,er[0],er[1]));var It=A.select(this).attr(_?"x":"y",Ze).attr(_?"y":"x",A.min(_t)).attr(_?"width":"height",Math.max(_e,2)).attr(_?"height":"width",Math.max(A.max(_t)-A.min(_t),2));if(I._fillgradient)a.gradient(It,B,I._id,_?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var Gt=Le(Et).replace("e-","");It.attr("fill",P(Gt).toHexString())}});var ct=k.select("."+E.cblines).selectAll("path."+E.cbline).data(ne.color&&ne.width?Se:[]);ct.enter().append("path").classed(E.cbline,!0),ct.exit().remove(),ct.each(function(Et){var Mt=Ze,_t=Math.round(xt.c2p(Et))+ne.width/2%1;A.select(this).attr("d","M"+(_?Mt+","+_t:_t+","+Mt)+(_?"h":"v")+_e).call(a.lineGroupStyle,ne.width,me(Et),ne.dash)}),Te.selectAll("g."+xt._id+"tick,path").remove();var qe=Ze+_e+(V||0)/2-(I.ticks==="outside"?1:0),dt=M.calcTicks(xt),bt=M.getTickSigns(xt)[2];return M.drawTicks(B,xt,{vals:xt.ticks==="inside"?M.clipEnds(xt,dt):dt,layer:Te,path:M.makeTickPath(xt,qe,bt),transFn:M.makeTransTickFn(xt)}),M.drawLabels(B,xt,{vals:dt,layer:Te,transFn:M.makeTransTickLabelFn(xt),labelFns:M.makeLabelFns(xt,qe)})}function Vt(){var gt,Ct=_e+V/2;ge.indexOf("inside")===-1&&(gt=a.bBox(Te.node()),Ct+=_?gt.width:gt.height),be=Ce.select("text");var Yt=0,gr=_&&de==="top",ht=!_&&de==="right",Ht=0;if(be.node()&&!be.classed(E.jsPlaceholder)){var Wt,cr=Ce.select(".h"+xt._id+"title-math-group").node();cr&&(_&&Je||!_&&!Je)?(gt=a.bBox(cr),Yt=gt.width,Wt=gt.height):(gt=a.bBox(Ce.node()),Yt=gt.right-Y.l-(_?Ze:vt),Wt=gt.bottom-Y.t-(_?vt:Ze),!_&&de==="top"&&(Ct+=gt.height,Ht=gt.height)),ht&&(be.attr("transform",r(Yt/2+pe/2,0)),Yt*=2),Ct=Math.max(Ct,_?Yt:Wt)}var er=(_?Z:G)*2+Ct+j+V/2,ct=0;!_&&le.text&&oe==="bottom"&&H<=0&&(ct=er/2,er+=ct,Ht+=ct),K._hColorbarMoveTitle=ct,K._hColorbarMoveCBTitle=Ht;var qe=j+V,dt=(_?Ze:vt)-qe/2-(_?Z:0),bt=(_?vt:Ze)-(_?Ie:G+Ht-ct);k.select("."+E.cbbg).attr("x",dt).attr("y",bt).attr(_?"width":"height",Math.max(er-ct,2)).attr(_?"height":"width",Math.max(Ie+qe,2)).call(c.fill,$).call(c.stroke,I.bordercolor).style("stroke-width",j);var Et=ht?Math.max(Yt-10,0):0;k.selectAll("."+E.cboutline).attr("x",(_?Ze:vt+Z)+Et).attr("y",(_?vt+G-Ie:Ze)+(gr?ke:0)).attr(_?"width":"height",Math.max(_e,2)).attr(_?"height":"width",Math.max(Ie-(_?2*G+ke:2*Z+Et),2)).call(c.stroke,I.outlinecolor).style({fill:"none","stroke-width":V});var Mt=_?Ke*er:0,_t=_?0:(1-nt)*er-Ht;if(Mt=ae?Y.l-Mt:-Mt,_t=J?Y.t-_t:-_t,k.attr("transform",r(Mt,_t)),!_&&(j||P($).getAlpha()&&!P.equals(K.paper_bgcolor,$))){var It=Te.selectAll("text"),Gt=It[0].length,nr=k.select("."+E.cbbg).node(),ar=a.bBox(nr),ir=a.getTranslate(k),Be=2;It.each(function(fr,vr){var lr=0,Or=Gt-1;if(vr===lr||vr===Or){var Sr=a.bBox(this),Ar=a.getTranslate(this),sn;if(vr===Or){var Jr=Sr.right+Ar.x,bn=ar.right+ir.x+vt-j-Be+re;sn=bn-Jr,sn>0&&(sn=0)}else if(vr===lr){var xn=Sr.left+Ar.x,or=ar.left+ir.x+vt+j+Be;sn=or-xn,sn<0&&(sn=0)}sn&&(Gt<3?this.setAttribute("transform","translate("+sn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Fe={},Rt=m[q],Lt=b[q],Ut=m[oe],Qt=b[oe],rr=er-_e;_?(O==="pixels"?(Fe.y=H,Fe.t=Ie*Ut,Fe.b=Ie*Qt):(Fe.t=Fe.b=0,Fe.yt=H+z*Ut,Fe.yb=H-z*Qt),N==="pixels"?(Fe.x=re,Fe.l=er*Rt,Fe.r=er*Lt):(Fe.l=rr*Rt,Fe.r=rr*Lt,Fe.xl=re-F*Rt,Fe.xr=re+F*Lt)):(O==="pixels"?(Fe.x=re,Fe.l=Ie*Rt,Fe.r=Ie*Lt):(Fe.l=Fe.r=0,Fe.xl=re+z*Rt,Fe.xr=re-z*Lt),N==="pixels"?(Fe.y=1-H,Fe.t=er*Ut,Fe.b=er*Qt):(Fe.t=rr*Ut,Fe.b=rr*Qt,Fe.yt=H-F*Ut,Fe.yb=H+F*Qt));var Kt=I.y<.5?"b":"t",Dt=I.x<.5?"l":"r";B._fullLayout._reservedMargin[I._id]={};var sr={r:K.width-dt-Mt,l:dt+Fe.r,b:K.height-bt-_t,t:bt+Fe.b};ae&&J?o.autoMargin(B,I._id,Fe):ae?B._fullLayout._reservedMargin[I._id][Kt]=sr[Kt]:J||_?B._fullLayout._reservedMargin[I._id][Dt]=sr[Dt]:B._fullLayout._reservedMargin[I._id][Kt]=sr[Kt]}return g.syncOrAsync([o.previousPromises,at,Nt,ut,o.previousPromises,Vt],B)}function i(k,I,B){var _=I.orientation==="v",z=B._fullLayout,O=z._size,F,N,V;d.init({element:k.node(),gd:B,prepFn:function(){F=k.attr("transform"),s(k)},moveFn:function(j,$){k.attr("transform",F+r(j,$)),N=d.align((_?I._uFrac:I._vFrac)+j/O.w,_?I._thickFrac:I._lenFrac,0,1,I.xanchor),V=d.align((_?I._vFrac:1-I._uFrac)-$/O.h,_?I._lenFrac:I._thickFrac,0,1,I.yanchor);var q=d.getCursor(N,V,I.xanchor,I.yanchor);s(k,q)},doneFn:function(){if(s(k),N!==void 0&&V!==void 0){var j={};j[I._propPrefix+"x"]=N,j[I._propPrefix+"y"]=V,I._traceIndex!==void 0?L.call("_guiRestyle",B,j,I._traceIndex):L.call("_guiRelayout",B,j)}}})}function C(k,I,B){var _=I._levels,z=[],O=[],F,N,V=_.end+_.size/100,j=_.size,$=1.001*B[0]-.001*B[1],q=1.001*B[1]-.001*B[0];for(N=0;N<1e5&&(F=_.start+N*j,!(j>0?F>=V:F<=V));N++)F>$&&F<q&&z.push(F);if(I._fillgradient)O=[0];else if(typeof I._fillcolor=="function"){var oe=I._filllevels;if(oe)for(V=oe.end+oe.size/100,j=oe.size,N=0;N<1e5&&(F=oe.start+N*j,!(j>0?F>=V:F<=V));N++)F>B[0]&&F<B[1]&&O.push(F);else O=z.map(function(Z){return Z-_.size/2}),O.push(O[O.length-1]+_.size)}else I._fillcolor&&typeof I._fillcolor=="string"&&(O=[0]);return _.size<0&&(z.reverse(),O.reverse()),{line:z,fill:O}}function x(k,I,B){var _=k._fullLayout,z=I.orientation==="v",O={type:"linear",range:B,tickmode:I.tickmode,nticks:I.nticks,tick0:I.tick0,dtick:I.dtick,tickvals:I.tickvals,ticktext:I.ticktext,ticks:I.ticks,ticklen:I.ticklen,tickwidth:I.tickwidth,tickcolor:I.tickcolor,showticklabels:I.showticklabels,labelalias:I.labelalias,ticklabelposition:I.ticklabelposition,ticklabeloverflow:I.ticklabeloverflow,ticklabelstep:I.ticklabelstep,tickfont:I.tickfont,tickangle:I.tickangle,tickformat:I.tickformat,exponentformat:I.exponentformat,minexponent:I.minexponent,separatethousands:I.separatethousands,showexponent:I.showexponent,showtickprefix:I.showtickprefix,tickprefix:I.tickprefix,showticksuffix:I.showticksuffix,ticksuffix:I.ticksuffix,title:I.title,showline:!0,anchor:"free",side:z?"right":"bottom",position:1},F=z?"y":"x",N={type:"linear",_id:F+I._id},V={letter:F,font:_.font,noAutotickangles:F==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:_.calendar};function j($,q){return g.coerce(O,N,f,$,q)}return h(O,N,j,V,_),T(O,N,j,V),N}te.exports={draw:p}},90553:function(te,X,e){var A=e(3400);te.exports=function(o){return A.isPlainObject(o.colorbar)}},55080:function(te,X,e){te.exports={moduleType:"component",name:"colorbar",attributes:e(42996),supplyDefaults:e(64013),draw:e(37848).draw,hasColorbar:e(90553)}},49084:function(te,X,e){var A=e(42996),P=e(53756).counter,o=e(95376),L=e(88304).scales;o(L),te.exports=function(d,g){d=d||"",g=g||{};var r=g.cLetter||"c";"onlyIfNumerical"in g&&g.onlyIfNumerical;var t="noScale"in g?g.noScale:d==="marker.line",s="showScaleDflt"in g?g.showScaleDflt:r==="z",a=typeof g.colorscaleDflt=="string"?L[g.colorscaleDflt]:null,c=g.editTypeOverride||"",u;"colorAttr"in g?(u=g.colorAttr,g.colorAttr):u={z:"z",c:"color"}[r];var l=r+"auto",y=r+"min",h=r+"max",T=r+"mid",f={};f[y]=f[h]=void 0;var n={};n[l]=!1;var v={};return u==="color"&&(v.color={valType:"color",arrayOk:!0,editType:c||"style"},g.anim&&(v.color.anim=!0)),v[l]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:f},v[y]={valType:"number",dflt:null,editType:c||"plot",impliedEdits:n},v[h]={valType:"number",dflt:null,editType:c||"plot",impliedEdits:n},v[T]={valType:"number",dflt:null,editType:"calc",impliedEdits:f},v.colorscale={valType:"colorscale",editType:"calc",dflt:a,impliedEdits:{autocolorscale:!1}},v.autocolorscale={valType:"boolean",dflt:g.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},v.reversescale={valType:"boolean",dflt:!1,editType:"plot"},t||(v.showscale={valType:"boolean",dflt:s,editType:"calc"},v.colorbar=A),g.noColorAxis||(v.coloraxis={valType:"subplotid",regex:P("coloraxis"),dflt:null,editType:"calc"}),v}},47128:function(te,X,e){var A=e(38248),P=e(3400),o=e(94288).extractOpts;te.exports=function(M,d,g){var r=M._fullLayout,t=g.vals,s=g.containerStr,a=s?P.nestedProperty(d,s).get():d,c=o(a),u=c.auto!==!1,l=c.min,y=c.max,h=c.mid,T=function(){return P.aggNums(Math.min,null,t)},f=function(){return P.aggNums(Math.max,null,t)};if(l===void 0?l=T():u&&(a._colorAx&&A(l)?l=Math.min(l,T()):l=T()),y===void 0?y=f():u&&(a._colorAx&&A(y)?y=Math.max(y,f()):y=f()),u&&h!==void 0&&(y-h>h-l?l=h-(y-h):y-h<h-l&&(y=h+(h-l))),l===y&&(l-=.5,y+=.5),c._sync("min",l),c._sync("max",y),c.autocolorscale){var n;l*y<0?n=r.colorscale.diverging:l>=0?n=r.colorscale.sequential:n=r.colorscale.sequentialminus,c._sync("colorscale",n)}}},95504:function(te,X,e){var A=e(3400),P=e(94288).hasColorscale,o=e(94288).extractOpts;te.exports=function(M,d){function g(l,y){var h=l["_"+y];h!==void 0&&(l[y]=h)}function r(l,y){var h=y.container?A.nestedProperty(l,y.container).get():l;if(h)if(h.coloraxis)h._colorAx=d[h.coloraxis];else{var T=o(h),f=T.auto;(f||T.min===void 0)&&g(h,y.min),(f||T.max===void 0)&&g(h,y.max),T.autocolorscale&&g(h,"colorscale")}}for(var t=0;t<M.length;t++){var s=M[t],a=s._module.colorbar;if(a)if(Array.isArray(a))for(var c=0;c<a.length;c++)r(s,a[c]);else r(s,a);P(s,"marker.line")&&r(s,{container:"marker.line",min:"cmin",max:"cmax"})}for(var u in d._colorAxes)r(d[u],{min:"cmin",max:"cmax"})}},27260:function(te,X,e){var A=e(38248),P=e(3400),o=e(90553),L=e(64013),M=e(88304).isValid,d=e(24040).traceIs;function g(r,t){var s=t.slice(0,t.length-1);return t?P.nestedProperty(r,s).get()||{}:r}te.exports=function r(t,s,a,c,u){var l=u.prefix,y=u.cLetter,h="_module"in s,T=g(t,l),f=g(s,l),n=g(s._template||{},l)||{},v=function(){return delete t.coloraxis,delete s.coloraxis,r(t,s,a,c,u)};if(h){var m=a._colorAxes||{},b=c(l+"coloraxis");if(b){var E=d(s,"contour")&&P.nestedProperty(s,"contours.coloring").get()||"heatmap",p=m[b];p?(p[2].push(v),p[0]!==E&&(p[0]=!1,P.warn(["Ignoring coloraxis:",b,"setting","as it is linked to incompatible colorscales."].join(" ")))):m[b]=[E,s,[v]];return}}var S=T[y+"min"],w=T[y+"max"],i=A(S)&&A(w)&&S<w,C=c(l+y+"auto",!i);C?c(l+y+"mid"):(c(l+y+"min"),c(l+y+"max"));var x=T.colorscale,k=n.colorscale,I;if(x!==void 0&&(I=!M(x)),k!==void 0&&(I=!M(k)),c(l+"autocolorscale",I),c(l+"colorscale"),c(l+"reversescale"),l!=="marker.line."){var B;l&&h&&(B=o(T));var _=c(l+"showscale",B);_&&(l&&n&&(f._template=n),L(T,f,a))}}},94288:function(te,X,e){var A=e(33428),P=e(49760),o=e(38248),L=e(3400),M=e(76308),d=e(88304).isValid;function g(h,T,f){var n=T?L.nestedProperty(h,T).get()||{}:h,v=n[f||"color"];v&&v._inputArray&&(v=v._inputArray);var m=!1;if(L.isArrayOrTypedArray(v)){for(var b=0;b<v.length;b++)if(o(v[b])){m=!0;break}}return L.isPlainObject(n)&&(m||n.showscale===!0||o(n.cmin)&&o(n.cmax)||d(n.colorscale)||L.isPlainObject(n.colorbar))}var r=["showscale","autocolorscale","colorscale","reversescale","colorbar"],t=["min","max","mid","auto"];function s(h){var T=h._colorAx,f=T||h,n={},v,m,b;for(m=0;m<r.length;m++)b=r[m],n[b]=f[b];if(T)for(v="c",m=0;m<t.length;m++)b=t[m],n[b]=f["c"+b];else{var E;for(m=0;m<t.length;m++){if(b=t[m],E="c"+b,E in f){n[b]=f[E];continue}E="z"+b,E in f&&(n[b]=f[E])}v=E.charAt(0)}return n._sync=function(p,S){var w=t.indexOf(p)!==-1?v+p:p;f[w]=f["_"+w]=S},n}function a(h){for(var T=s(h),f=T.min,n=T.max,v=T.reversescale?c(T.colorscale):T.colorscale,m=v.length,b=new Array(m),E=new Array(m),p=0;p<m;p++){var S=v[p];b[p]=f+S[0]*(n-f),E[p]=S[1]}return{domain:b,range:E}}function c(h){for(var T=h.length,f=new Array(T),n=T-1,v=0;n>=0;n--,v++){var m=h[n];f[v]=[1-m[0],m[1]]}return f}function u(h,T){T=T||{};for(var f=h.domain,n=h.range,v=n.length,m=new Array(v),b=0;b<v;b++){var E=P(n[b]).toRgb();m[b]=[E.r,E.g,E.b,E.a]}var p=A.scale.linear().domain(f).range(m).clamp(!0),S=T.noNumericCheck,w=T.returnArray,i;return S&&w?i=p:S?i=function(C){return y(p(C))}:w?i=function(C){return o(C)?p(C):P(C).isValid()?C:M.defaultLine}:i=function(C){return o(C)?y(p(C)):P(C).isValid()?C:M.defaultLine},i.domain=p.domain,i.range=function(){return n},i}function l(h,T){return u(a(h),T)}function y(h){var T={r:h[0],g:h[1],b:h[2],a:h[3]};return P(T).toRgbString()}te.exports={hasColorscale:g,extractOpts:s,extractScale:a,flipScale:c,makeColorScaleFunc:u,makeColorScaleFuncFromTrace:l}},8932:function(te,X,e){var A=e(88304),P=e(94288);te.exports={moduleType:"component",name:"colorscale",attributes:e(49084),layoutAttributes:e(92332),supplyLayoutDefaults:e(51608),handleDefaults:e(27260),crossTraceDefaults:e(95504),calc:e(47128),scales:A.scales,defaultScale:A.defaultScale,getScale:A.get,isValidScale:A.isValid,hasColorscale:P.hasColorscale,extractOpts:P.extractOpts,extractScale:P.extractScale,flipScale:P.flipScale,makeColorScaleFunc:P.makeColorScaleFunc,makeColorScaleFuncFromTrace:P.makeColorScaleFuncFromTrace}},92332:function(te,X,e){var A=e(92880).extendFlat,P=e(49084),o=e(88304).scales;te.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc"}},coloraxis:A({_isSubplotObj:!0,editType:"calc"},P("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},51608:function(te,X,e){var A=e(3400),P=e(31780),o=e(92332),L=e(27260);te.exports=function(d,g){function r(h,T){return A.coerce(d,g,o,h,T)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var t=g._colorAxes,s,a;function c(h,T){return A.coerce(s,a,o.coloraxis,h,T)}for(var u in t){var l=t[u];if(l[0])s=d[u]||{},a=P.newContainer(g,u,"coloraxis"),a._name=u,L(s,a,g,c,{prefix:"",cLetter:"c"});else{for(var y=0;y<l[2].length;y++)l[2][y]();delete g._colorAxes[u]}}}},88304:function(te,X,e){var A=e(49760),P={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)"]]},o=P.RdBu;function L(g,r){if(r||(r=o),!g)return r;function t(){try{g=P[g]||JSON.parse(g)}catch{g=r}}return typeof g=="string"&&(t(),typeof g=="string"&&t()),M(g)?g:r}function M(g){var r=0;if(!Array.isArray(g)||g.length<2||!g[0]||!g[g.length-1]||+g[0][0]!=0||+g[g.length-1][0]!=1)return!1;for(var t=0;t<g.length;t++){var s=g[t];if(s.length!==2||+s[0]<r||!A(s[1]).isValid())return!1;r=+s[0]}return!0}function d(g){return P[g]!==void 0?!0:M(g)}te.exports={scales:P,defaultScale:o,get:L,isValid:d}},78316:function(te){te.exports=function(e,A,P,o,L){var M=(e-P)/(o-P),d=M+A/(o-P),g=(M+d)/2;return L==="left"||L==="bottom"?M:L==="center"||L==="middle"?g:L==="right"||L==="top"?d:M<.6666666666666666-g?M:d>1.3333333333333333-g?d:g}},67416:function(te,X,e){var A=e(3400),P=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];te.exports=function(L,M,d,g){return d==="left"?L=0:d==="center"?L=1:d==="right"?L=2:L=A.constrain(Math.floor(L*3),0,2),g==="bottom"?M=0:g==="middle"?M=1:g==="top"?M=2:M=A.constrain(Math.floor(M*3),0,2),P[M][L]}},72760:function(te,X){X.selectMode=function(e){return e==="lasso"||e==="select"},X.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},X.openMode=function(e){return e==="drawline"||e==="drawopenpath"},X.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},X.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},X.selectingOrDrawing=function(e){return X.freeMode(e)||X.rectMode(e)}},86476:function(te,X,e){var A=e(29128),P=e(52264),o=e(89184),L=e(3400).removeElement,M=e(33816),d=te.exports={};d.align=e(78316),d.getCursor=e(67416);var g=e(2616);d.unhover=g.wrapped,d.unhoverRaw=g.raw,d.init=function(a){var c=a.gd,u=1,l=c._context.doubleClickDelay,y=a.element,h,T,f,n,v,m,b,E;c._mouseDownTime||(c._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=w,o?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=w,y.addEventListener("touchstart",w,{passive:!1})):y.ontouchstart=w;function p(x,k,I){return Math.abs(x)<I&&(x=0),Math.abs(k)<I&&(k=0),[x,k]}var S=a.clampFn||p;function w(x){c._dragged=!1,c._dragging=!0;var k=t(x);h=k[0],T=k[1],b=x.target,m=x,E=x.buttons===2||x.ctrlKey,typeof x.clientX>"u"&&typeof x.clientY>"u"&&(x.clientX=h,x.clientY=T),f=new Date().getTime(),f-c._mouseDownTime<l?u+=1:(u=1,c._mouseDownTime=f),a.prepFn&&a.prepFn(x,h,T),P&&!E?(v=r(),v.style.cursor=window.getComputedStyle(y).cursor):P||(v=document,n=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(y).cursor),document.addEventListener("mouseup",C),document.addEventListener("touchend",C),a.dragmode!==!1&&(x.preventDefault(),document.addEventListener("mousemove",i),document.addEventListener("touchmove",i,{passive:!1}))}function i(x){x.preventDefault();var k=t(x),I=a.minDrag||M.MINDRAG,B=S(k[0]-h,k[1]-T,I),_=B[0],z=B[1];(_||z)&&(c._dragged=!0,d.unhover(c,x)),c._dragged&&a.moveFn&&!E&&(c._dragdata={element:y,dx:_,dy:z},a.moveFn(_,z))}function C(x){if(delete c._dragdata,a.dragmode!==!1&&(x.preventDefault(),document.removeEventListener("mousemove",i),document.removeEventListener("touchmove",i)),document.removeEventListener("mouseup",C),document.removeEventListener("touchend",C),P?L(v):n&&(v.documentElement.style.cursor=n,n=null),!c._dragging){c._dragged=!1;return}if(c._dragging=!1,new Date().getTime()-c._mouseDownTime>l&&(u=Math.max(u-1,1)),c._dragged)a.doneFn&&a.doneFn();else if(a.clickFn&&a.clickFn(u,m),!E){var k;try{k=new MouseEvent("click",x)}catch{var I=t(x);k=document.createEvent("MouseEvents"),k.initMouseEvent("click",x.bubbles,x.cancelable,x.view,x.detail,x.screenX,x.screenY,I[0],I[1],x.ctrlKey,x.altKey,x.shiftKey,x.metaKey,x.button,x.relatedTarget)}b.dispatchEvent(k)}c._dragging=!1,c._dragged=!1}};function r(){var s=document.createElement("div");s.className="dragcover";var a=s.style;return a.position="fixed",a.left=0,a.right=0,a.top=0,a.bottom=0,a.zIndex=999999999,a.background="none",document.body.appendChild(s),s}d.coverSlip=r;function t(s){return A(s.changedTouches?s.changedTouches[0]:s,document.body)}},2616:function(te,X,e){var A=e(95924),P=e(91200),o=e(52200).getGraphDiv,L=e(92456),M=te.exports={};M.wrapped=function(d,g,r){d=o(d),d._fullLayout&&P.clear(d._fullLayout._uid+L.HOVERID),M.raw(d,g,r)},M.raw=function(g,r){var t=g._fullLayout,s=g._hoverdata;r||(r={}),!(r.target&&!g._dragged&&A.triggerHandler(g,"plotly_beforehover",r)===!1)&&(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),g._hoverdata=void 0,r.target&&s&&g.emit("plotly_unhover",{event:r,points:s}))}},98192:function(te,X){X.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},X.c={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"}},43616:function(te,X,e){var A=e(33428),P=e(3400),o=P.numberFormat,L=e(38248),M=e(49760),d=e(24040),g=e(76308),r=e(8932),t=P.strTranslate,s=e(72736),a=e(9616),c=e(84284),u=c.LINE_SPACING,l=e(13448).DESELECTDIM,y=e(43028),h=e(7152),T=e(10624).appendArrayPointValue,f=te.exports={};f.font=function(ve,Ae,ye,Se){P.isPlainObject(Ae)&&(Se=Ae.color,ye=Ae.size,Ae=Ae.family),Ae&&ve.style("font-family",Ae),ye+1&&ve.style("font-size",ye+"px"),Se&&ve.call(g.fill,Se)},f.setPosition=function(ve,Ae,ye){ve.attr("x",Ae).attr("y",ye)},f.setSize=function(ve,Ae,ye){ve.attr("width",Ae).attr("height",ye)},f.setRect=function(ve,Ae,ye,Se,_e){ve.call(f.setPosition,Ae,ye).call(f.setSize,Se,_e)},f.translatePoint=function(ve,Ae,ye,Se){var _e=ye.c2p(ve.x),ze=Se.c2p(ve.y);if(L(_e)&&L(ze)&&Ae.node())Ae.node().nodeName==="text"?Ae.attr("x",_e).attr("y",ze):Ae.attr("transform",t(_e,ze));else return!1;return!0},f.translatePoints=function(ve,Ae,ye){ve.each(function(Se){var _e=A.select(this);f.translatePoint(Se,_e,Ae,ye)})},f.hideOutsideRangePoint=function(ve,Ae,ye,Se,_e,ze){Ae.attr("display",ye.isPtWithinRange(ve,_e)&&Se.isPtWithinRange(ve,ze)?null:"none")},f.hideOutsideRangePoints=function(ve,Ae){if(Ae._hasClipOnAxisFalse){var ye=Ae.xaxis,Se=Ae.yaxis;ve.each(function(_e){var ze=_e[0].trace,Ie=ze.xcalendar,Ne=ze.ycalendar,et=d.traceIs(ze,"bar-like")?".bartext":".point,.textpoint";ve.selectAll(et).each(function(st){f.hideOutsideRangePoint(st,A.select(this),ye,Se,Ie,Ne)})})}},f.crispRound=function(ve,Ae,ye){return!Ae||!L(Ae)?ye||0:ve._context.staticPlot?Ae:Ae<1?1:Math.round(Ae)},f.singleLineStyle=function(ve,Ae,ye,Se,_e){Ae.style("fill","none");var ze=(((ve||[])[0]||{}).trace||{}).line||{},Ie=ye||ze.width||0,Ne=_e||ze.dash||"";g.stroke(Ae,Se||ze.color),f.dashLine(Ae,Ne,Ie)},f.lineGroupStyle=function(ve,Ae,ye,Se){ve.style("fill","none").each(function(_e){var ze=(((_e||[])[0]||{}).trace||{}).line||{},Ie=Ae||ze.width||0,Ne=Se||ze.dash||"";A.select(this).call(g.stroke,ye||ze.color).call(f.dashLine,Ne,Ie)})},f.dashLine=function(ve,Ae,ye){ye=+ye||0,Ae=f.dashStyle(Ae,ye),ve.style({"stroke-dasharray":Ae,"stroke-width":ye+"px"})},f.dashStyle=function(ve,Ae){Ae=+Ae||1;var ye=Math.max(Ae,3);return ve==="solid"?ve="":ve==="dot"?ve=ye+"px,"+ye+"px":ve==="dash"?ve=3*ye+"px,"+3*ye+"px":ve==="longdash"?ve=5*ye+"px,"+5*ye+"px":ve==="dashdot"?ve=3*ye+"px,"+ye+"px,"+ye+"px,"+ye+"px":ve==="longdashdot"&&(ve=5*ye+"px,"+2*ye+"px,"+ye+"px,"+2*ye+"px"),ve};function n(ve,Ae,ye,Se){var _e=Ae.fillpattern,ze=Ae.fillgradient,Ie=_e&&f.getPatternAttr(_e.shape,0,"");if(Ie){var Ne=f.getPatternAttr(_e.bgcolor,0,null),et=f.getPatternAttr(_e.fgcolor,0,null),st=_e.fgopacity,Ze=f.getPatternAttr(_e.size,0,8),Ke=f.getPatternAttr(_e.solidity,0,.3),nt=Ae.uid;f.pattern(ve,"point",ye,nt,Ie,Ze,Ke,void 0,_e.fillmode,Ne,et,st)}else if(ze&&ze.type!=="none"){var it=ze.type,lt="scatterfill-"+Ae.uid;if(Se&&(lt="legendfill-"+Ae.uid),!Se&&(ze.start!==void 0||ze.stop!==void 0)){var vt,xt;it==="horizontal"?(vt={x:ze.start,y:0},xt={x:ze.stop,y:0}):it==="vertical"&&(vt={x:0,y:ze.start},xt={x:0,y:ze.stop}),vt.x=Ae._xA.c2p(vt.x===void 0?Ae._extremes.x.min[0].val:vt.x,!0),vt.y=Ae._yA.c2p(vt.y===void 0?Ae._extremes.y.min[0].val:vt.y,!0),xt.x=Ae._xA.c2p(xt.x===void 0?Ae._extremes.x.max[0].val:xt.x,!0),xt.y=Ae._yA.c2p(xt.y===void 0?Ae._extremes.y.max[0].val:xt.y,!0),ve.call(w,ye,lt,"linear",ze.colorscale,"fill",vt,xt,!0,!1)}else it==="horizontal"&&(it=it+"reversed"),ve.call(f.gradient,ye,lt,it,ze.colorscale,"fill")}else Ae.fillcolor&&ve.call(g.fill,Ae.fillcolor)}f.singleFillStyle=function(ve,Ae){var ye=A.select(ve.node()),Se=ye.data(),_e=((Se[0]||[])[0]||{}).trace||{};n(ve,_e,Ae,!1)},f.fillGroupStyle=function(ve,Ae,ye){ve.style("stroke-width",0).each(function(Se){var _e=A.select(this);Se[0].trace&&n(_e,Se[0].trace,Ae,ye)})};var v=e(71984);f.symbolNames=[],f.symbolFuncs=[],f.symbolBackOffs=[],f.symbolNeedLines={},f.symbolNoDot={},f.symbolNoFill={},f.symbolList=[],Object.keys(v).forEach(function(ve){var Ae=v[ve],ye=Ae.n;f.symbolList.push(ye,String(ye),ve,ye+100,String(ye+100),ve+"-open"),f.symbolNames[ye]=ve,f.symbolFuncs[ye]=Ae.f,f.symbolBackOffs[ye]=Ae.backoff||0,Ae.needLine&&(f.symbolNeedLines[ye]=!0),Ae.noDot?f.symbolNoDot[ye]=!0:f.symbolList.push(ye+200,String(ye+200),ve+"-dot",ye+300,String(ye+300),ve+"-open-dot"),Ae.noFill&&(f.symbolNoFill[ye]=!0)});var m=f.symbolNames.length,b="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";f.symbolNumber=function(ve){if(L(ve))ve=+ve;else if(typeof ve=="string"){var Ae=0;ve.indexOf("-open")>0&&(Ae=100,ve=ve.replace("-open","")),ve.indexOf("-dot")>0&&(Ae+=200,ve=ve.replace("-dot","")),ve=f.symbolNames.indexOf(ve),ve>=0&&(ve+=Ae)}return ve%100>=m||ve>=400?0:Math.floor(Math.max(ve,0))};function E(ve,Ae,ye,Se){var _e=ve%100;return f.symbolFuncs[_e](Ae,ye,Se)+(ve>=200?b:"")}var p=o("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};f.gradient=function(ve,Ae,ye,Se,_e,ze){var Ie=S[Se];return w(ve,Ae,ye,Ie.type,_e,ze,Ie.start,Ie.stop,!1,Ie.reversed)};function w(ve,Ae,ye,Se,_e,ze,Ie,Ne,et,st){var Ze=_e.length,Ke;Se==="linear"?Ke={node:"linearGradient",attrs:{x1:Ie.x,y1:Ie.y,x2:Ne.x,y2:Ne.y,gradientUnits:et?"userSpaceOnUse":"objectBoundingBox"},reversed:st}:Se==="radial"&&(Ke={node:"radialGradient",reversed:st});for(var nt=new Array(Ze),it=0;it<Ze;it++)Ke.reversed?nt[Ze-1-it]=[p((1-_e[it][0])*100),_e[it][1]]:nt[it]=[p(_e[it][0]*100),_e[it][1]];var lt=Ae._fullLayout,vt="g"+lt._uid+"-"+ye,xt=lt._defs.select(".gradients").selectAll("#"+vt).data([Se+nt.join(";")],P.identity);xt.exit().remove(),xt.enter().append(Ke.node).each(function(){var Je=A.select(this);Ke.attrs&&Je.attr(Ke.attrs),Je.attr("id",vt);var Pe=Je.selectAll("stop").data(nt);Pe.exit().remove(),Pe.enter().append("stop"),Pe.each(function(Ue){var He=M(Ue[1]);A.select(this).attr({offset:Ue[0]+"%","stop-color":g.tinyRGB(He),"stop-opacity":He.getAlpha()})})}),ve.style(ze,Z(vt,Ae)).style(ze+"-opacity",null),ve.classed("gradient_filled",!0)}f.pattern=function(ve,Ae,ye,Se,_e,ze,Ie,Ne,et,st,Ze,Ke){var nt=Ae==="legend";Ne&&(et==="overlay"?(st=Ne,Ze=g.contrast(st)):(st=void 0,Ze=Ne));var it=ye._fullLayout,lt="p"+it._uid+"-"+Se,vt,xt,Je=function(je,at,ut,Nt,Vt){return Nt+(Vt-Nt)*(je-at)/(ut-at)},Pe,Ue,He,Oe,Ce={},ge=M(Ze),pe=g.tinyRGB(ge),Te=ge.getAlpha(),be=Ke*Te;switch(_e){case"/":vt=ze*Math.sqrt(2),xt=ze*Math.sqrt(2),Pe="M-"+vt/4+","+xt/4+"l"+vt/2+",-"+xt/2+"M0,"+xt+"L"+vt+",0M"+vt/4*3+","+xt/4*5+"l"+vt/2+",-"+xt/2,Ue=Ie*ze,Oe="path",Ce={d:Pe,opacity:be,stroke:pe,"stroke-width":Ue+"px"};break;case"\\":vt=ze*Math.sqrt(2),xt=ze*Math.sqrt(2),Pe="M"+vt/4*3+",-"+xt/4+"l"+vt/2+","+xt/2+"M0,0L"+vt+","+xt+"M-"+vt/4+","+xt/4*3+"l"+vt/2+","+xt/2,Ue=Ie*ze,Oe="path",Ce={d:Pe,opacity:be,stroke:pe,"stroke-width":Ue+"px"};break;case"x":vt=ze*Math.sqrt(2),xt=ze*Math.sqrt(2),Pe="M-"+vt/4+","+xt/4+"l"+vt/2+",-"+xt/2+"M0,"+xt+"L"+vt+",0M"+vt/4*3+","+xt/4*5+"l"+vt/2+",-"+xt/2+"M"+vt/4*3+",-"+xt/4+"l"+vt/2+","+xt/2+"M0,0L"+vt+","+xt+"M-"+vt/4+","+xt/4*3+"l"+vt/2+","+xt/2,Ue=ze-ze*Math.sqrt(1-Ie),Oe="path",Ce={d:Pe,opacity:be,stroke:pe,"stroke-width":Ue+"px"};break;case"|":vt=ze,xt=ze,Oe="path",Pe="M"+vt/2+",0L"+vt/2+","+xt,Ue=Ie*ze,Oe="path",Ce={d:Pe,opacity:be,stroke:pe,"stroke-width":Ue+"px"};break;case"-":vt=ze,xt=ze,Oe="path",Pe="M0,"+xt/2+"L"+vt+","+xt/2,Ue=Ie*ze,Oe="path",Ce={d:Pe,opacity:be,stroke:pe,"stroke-width":Ue+"px"};break;case"+":vt=ze,xt=ze,Oe="path",Pe="M"+vt/2+",0L"+vt/2+","+xt+"M0,"+xt/2+"L"+vt+","+xt/2,Ue=ze-ze*Math.sqrt(1-Ie),Oe="path",Ce={d:Pe,opacity:be,stroke:pe,"stroke-width":Ue+"px"};break;case".":vt=ze,xt=ze,Ie<Math.PI/4?He=Math.sqrt(Ie*ze*ze/Math.PI):He=Je(Ie,Math.PI/4,1,ze/2,ze/Math.sqrt(2)),Oe="circle",Ce={cx:vt/2,cy:xt/2,r:He,opacity:be,fill:pe};break}var ke=[_e||"noSh",st||"noBg",Ze||"noFg",ze,Ie].join(";"),Ve=it._defs.select(".patterns").selectAll("#"+lt).data([ke],P.identity);Ve.exit().remove(),Ve.enter().append("pattern").each(function(){var je=A.select(this);if(je.attr({id:lt,width:vt+"px",height:xt+"px",patternUnits:"userSpaceOnUse",patternTransform:nt?"scale(0.8)":""}),st){var at=M(st),ut=g.tinyRGB(at),Nt=at.getAlpha(),Vt=je.selectAll("rect").data([0]);Vt.exit().remove(),Vt.enter().append("rect").attr({width:vt+"px",height:xt+"px",fill:ut,"fill-opacity":Nt})}var gt=je.selectAll(Oe).data([0]);gt.exit().remove(),gt.enter().append(Oe).attr(Ce)}),ve.style("fill",Z(lt,ye)).style("fill-opacity",null),ve.classed("pattern_filled",!0)},f.initGradients=function(ve){var Ae=ve._fullLayout,ye=P.ensureSingle(Ae._defs,"g","gradients");ye.selectAll("linearGradient,radialGradient").remove(),A.select(ve).selectAll(".gradient_filled").classed("gradient_filled",!1)},f.initPatterns=function(ve){var Ae=ve._fullLayout,ye=P.ensureSingle(Ae._defs,"g","patterns");ye.selectAll("pattern").remove(),A.select(ve).selectAll(".pattern_filled").classed("pattern_filled",!1)},f.getPatternAttr=function(ve,Ae,ye){return ve&&P.isArrayOrTypedArray(ve)?Ae<ve.length?ve[Ae]:ye:ve},f.pointStyle=function(ve,Ae,ye,Se){if(ve.size()){var _e=f.makePointStyleFns(Ae);ve.each(function(ze){f.singlePointStyle(ze,A.select(this),Ae,_e,ye,Se)})}},f.singlePointStyle=function(ve,Ae,ye,Se,_e,ze){var Ie=ye.marker,Ne=Ie.line;if(ze&&ze.i>=0&&ve.i===void 0&&(ve.i=ze.i),Ae.style("opacity",Se.selectedOpacityFn?Se.selectedOpacityFn(ve):ve.mo===void 0?Ie.opacity:ve.mo),Se.ms2mrc){var et;ve.ms==="various"||Ie.size==="various"?et=3:et=Se.ms2mrc(ve.ms),ve.mrc=et,Se.selectedSizeFn&&(et=ve.mrc=Se.selectedSizeFn(ve));var st=f.symbolNumber(ve.mx||Ie.symbol)||0;ve.om=st%200>=100;var Ze=Le(ve,ye),Ke=H(ve,ye);Ae.attr("d",E(st,et,Ze,Ke))}var nt=!1,it,lt,vt;if(ve.so)vt=Ne.outlierwidth,lt=Ne.outliercolor,it=Ie.outliercolor;else{var xt=(Ne||{}).width;vt=(ve.mlw+1||xt+1||(ve.trace?(ve.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in ve?lt=ve.mlcc=Se.lineScale(ve.mlc):P.isArrayOrTypedArray(Ne.color)?lt=g.defaultLine:lt=Ne.color,P.isArrayOrTypedArray(Ie.color)&&(it=g.defaultLine,nt=!0),"mc"in ve?it=ve.mcc=Se.markerScale(ve.mc):it=Ie.color||Ie.colors||"rgba(0,0,0,0)",Se.selectedColorFn&&(it=Se.selectedColorFn(ve))}if(ve.om)Ae.call(g.stroke,it).style({"stroke-width":(vt||1)+"px",fill:"none"});else{Ae.style("stroke-width",(ve.isBlank?0:vt)+"px");var Je=Ie.gradient,Pe=ve.mgt;Pe?nt=!0:Pe=Je&&Je.type,P.isArrayOrTypedArray(Pe)&&(Pe=Pe[0],S[Pe]||(Pe=0));var Ue=Ie.pattern,He=Ue&&f.getPatternAttr(Ue.shape,ve.i,"");if(Pe&&Pe!=="none"){var Oe=ve.mgc;Oe?nt=!0:Oe=Je.color;var Ce=ye.uid;nt&&(Ce+="-"+ve.i),f.gradient(Ae,_e,Ce,Pe,[[0,Oe],[1,it]],"fill")}else if(He){var ge=!1,pe=Ue.fgcolor;!pe&&ze&&ze.color&&(pe=ze.color,ge=!0);var Te=f.getPatternAttr(pe,ve.i,ze&&ze.color||null),be=f.getPatternAttr(Ue.bgcolor,ve.i,null),ke=Ue.fgopacity,Ve=f.getPatternAttr(Ue.size,ve.i,8),je=f.getPatternAttr(Ue.solidity,ve.i,.3);ge=ge||ve.mcc||P.isArrayOrTypedArray(Ue.shape)||P.isArrayOrTypedArray(Ue.bgcolor)||P.isArrayOrTypedArray(Ue.fgcolor)||P.isArrayOrTypedArray(Ue.size)||P.isArrayOrTypedArray(Ue.solidity);var at=ye.uid;ge&&(at+="-"+ve.i),f.pattern(Ae,"point",_e,at,He,Ve,je,ve.mcc,Ue.fillmode,be,Te,ke)}else P.isArrayOrTypedArray(it)?g.fill(Ae,it[ve.i]):g.fill(Ae,it);vt&&g.stroke(Ae,lt)}},f.makePointStyleFns=function(ve){var Ae={},ye=ve.marker;return Ae.markerScale=f.tryColorscale(ye,""),Ae.lineScale=f.tryColorscale(ye,"line"),d.traceIs(ve,"symbols")&&(Ae.ms2mrc=y.isBubble(ve)?h(ve):function(){return(ye.size||6)/2}),ve.selectedpoints&&P.extendFlat(Ae,f.makeSelectedPointStyleFns(ve)),Ae},f.makeSelectedPointStyleFns=function(ve){var Ae={},ye=ve.selected||{},Se=ve.unselected||{},_e=ve.marker||{},ze=ye.marker||{},Ie=Se.marker||{},Ne=_e.opacity,et=ze.opacity,st=Ie.opacity,Ze=et!==void 0,Ke=st!==void 0;(P.isArrayOrTypedArray(Ne)||Ze||Ke)&&(Ae.selectedOpacityFn=function(He){var Oe=He.mo===void 0?_e.opacity:He.mo;return He.selected?Ze?et:Oe:Ke?st:l*Oe});var nt=_e.color,it=ze.color,lt=Ie.color;(it||lt)&&(Ae.selectedColorFn=function(He){var Oe=He.mcc||nt;return He.selected?it||Oe:lt||Oe});var vt=_e.size,xt=ze.size,Je=Ie.size,Pe=xt!==void 0,Ue=Je!==void 0;return d.traceIs(ve,"symbols")&&(Pe||Ue)&&(Ae.selectedSizeFn=function(He){var Oe=He.mrc||vt/2;return He.selected?Pe?xt/2:Oe:Ue?Je/2:Oe}),Ae},f.makeSelectedTextStyleFns=function(ve){var Ae={},ye=ve.selected||{},Se=ve.unselected||{},_e=ve.textfont||{},ze=ye.textfont||{},Ie=Se.textfont||{},Ne=_e.color,et=ze.color,st=Ie.color;return Ae.selectedTextColorFn=function(Ze){var Ke=Ze.tc||Ne;return Ze.selected?et||Ke:st||(et?Ke:g.addOpacity(Ke,l))},Ae},f.selectedPointStyle=function(ve,Ae){if(!(!ve.size()||!Ae.selectedpoints)){var ye=f.makeSelectedPointStyleFns(Ae),Se=Ae.marker||{},_e=[];ye.selectedOpacityFn&&_e.push(function(ze,Ie){ze.style("opacity",ye.selectedOpacityFn(Ie))}),ye.selectedColorFn&&_e.push(function(ze,Ie){g.fill(ze,ye.selectedColorFn(Ie))}),ye.selectedSizeFn&&_e.push(function(ze,Ie){var Ne=Ie.mx||Se.symbol||0,et=ye.selectedSizeFn(Ie);ze.attr("d",E(f.symbolNumber(Ne),et,Le(Ie,Ae),H(Ie,Ae))),Ie.mrc2=et}),_e.length&&ve.each(function(ze){for(var Ie=A.select(this),Ne=0;Ne<_e.length;Ne++)_e[Ne](Ie,ze)})}},f.tryColorscale=function(ve,Ae){var ye=Ae?P.nestedProperty(ve,Ae).get():ve;if(ye){var Se=ye.color;if((ye.colorscale||ye._colorAx)&&P.isArrayOrTypedArray(Se))return r.makeColorScaleFuncFromTrace(ye)}return P.identity};var i={start:1,end:-1,middle:0,bottom:1,top:-1};function C(ve,Ae,ye,Se,_e){var ze=A.select(ve.node().parentNode),Ie=Ae.indexOf("top")!==-1?"top":Ae.indexOf("bottom")!==-1?"bottom":"middle",Ne=Ae.indexOf("left")!==-1?"end":Ae.indexOf("right")!==-1?"start":"middle",et=Se?Se/.8+1:0,st=(s.lineCount(ve)-1)*u+1,Ze=i[Ne]*et,Ke=ye*.75+i[Ie]*et+(i[Ie]-1)*st*ye/2;ve.attr("text-anchor",Ne),_e||ze.attr("transform",t(Ze,Ke))}function x(ve,Ae){var ye=ve.ts||Ae.textfont.size;return L(ye)&&ye>0?ye:0}f.textPointStyle=function(ve,Ae,ye){if(ve.size()){var Se;if(Ae.selectedpoints){var _e=f.makeSelectedTextStyleFns(Ae);Se=_e.selectedTextColorFn}var ze=Ae.texttemplate,Ie=ye._fullLayout;ve.each(function(Ne){var et=A.select(this),st=ze?P.extractOption(Ne,Ae,"txt","texttemplate"):P.extractOption(Ne,Ae,"tx","text");if(!st&&st!==0){et.remove();return}if(ze){var Ze=Ae._module.formatLabels,Ke=Ze?Ze(Ne,Ae,Ie):{},nt={};T(nt,Ae,Ne.i);var it=Ae._meta||{};st=P.texttemplateString(st,Ke,Ie._d3locale,nt,Ne,it)}var lt=Ne.tp||Ae.textposition,vt=x(Ne,Ae),xt=Se?Se(Ne):Ne.tc||Ae.textfont.color;et.call(f.font,Ne.tf||Ae.textfont.family,vt,xt).text(st).call(s.convertToTspans,ye).call(C,lt,vt,Ne.mrc)})}},f.selectedTextStyle=function(ve,Ae){if(!(!ve.size()||!Ae.selectedpoints)){var ye=f.makeSelectedTextStyleFns(Ae);ve.each(function(Se){var _e=A.select(this),ze=ye.selectedTextColorFn(Se),Ie=Se.tp||Ae.textposition,Ne=x(Se,Ae);g.fill(_e,ze);var et=d.traceIs(Ae,"bar-like");C(_e,Ie,Ne,Se.mrc2||Se.mrc,et)})}};var k=.5;f.smoothopen=function(ve,Ae){if(ve.length<3)return"M"+ve.join("L");var ye="M"+ve[0],Se=[],_e;for(_e=1;_e<ve.length-1;_e++)Se.push(F(ve[_e-1],ve[_e],ve[_e+1],Ae));for(ye+="Q"+Se[0][0]+" "+ve[1],_e=2;_e<ve.length-1;_e++)ye+="C"+Se[_e-2][1]+" "+Se[_e-1][0]+" "+ve[_e];return ye+="Q"+Se[ve.length-3][1]+" "+ve[ve.length-1],ye},f.smoothclosed=function(ve,Ae){if(ve.length<3)return"M"+ve.join("L")+"Z";var ye="M"+ve[0],Se=ve.length-1,_e=[F(ve[Se],ve[0],ve[1],Ae)],ze;for(ze=1;ze<Se;ze++)_e.push(F(ve[ze-1],ve[ze],ve[ze+1],Ae));for(_e.push(F(ve[Se-1],ve[Se],ve[0],Ae)),ze=1;ze<=Se;ze++)ye+="C"+_e[ze-1][1]+" "+_e[ze][0]+" "+ve[ze];return ye+="C"+_e[Se][1]+" "+_e[0][0]+" "+ve[0]+"Z",ye};var I,B;function _(ve,Ae,ye){return ye&&(ve=j(ve)),Ae?O(ve[1]):z(ve[0])}function z(ve){var Ae=A.round(ve,2);return I=Ae,Ae}function O(ve){var Ae=A.round(ve,2);return B=Ae,Ae}function F(ve,Ae,ye,Se){var _e=ve[0]-Ae[0],ze=ve[1]-Ae[1],Ie=ye[0]-Ae[0],Ne=ye[1]-Ae[1],et=Math.pow(_e*_e+ze*ze,k/2),st=Math.pow(Ie*Ie+Ne*Ne,k/2),Ze=(st*st*_e-et*et*Ie)*Se,Ke=(st*st*ze-et*et*Ne)*Se,nt=3*st*(et+st),it=3*et*(et+st);return[[z(Ae[0]+(nt&&Ze/nt)),O(Ae[1]+(nt&&Ke/nt))],[z(Ae[0]-(it&&Ze/it)),O(Ae[1]-(it&&Ke/it))]]}var N={hv:function(ve,Ae,ye){return"H"+z(Ae[0])+"V"+_(Ae,1,ye)},vh:function(ve,Ae,ye){return"V"+O(Ae[1])+"H"+_(Ae,0,ye)},hvh:function(ve,Ae,ye){return"H"+z((ve[0]+Ae[0])/2)+"V"+O(Ae[1])+"H"+_(Ae,0,ye)},vhv:function(ve,Ae,ye){return"V"+O((ve[1]+Ae[1])/2)+"H"+z(Ae[0])+"V"+_(Ae,1,ye)}},V=function(ve,Ae,ye){return"L"+_(Ae,0,ye)+","+_(Ae,1,ye)};f.steps=function(ve){var Ae=N[ve]||V;return function(ye){for(var Se="M"+z(ye[0][0])+","+O(ye[0][1]),_e=ye.length,ze=1;ze<_e;ze++)Se+=Ae(ye[ze-1],ye[ze],ze===_e-1);return Se}};function j(ve,Ae){var ye=ve.backoff,Se=ve.trace,_e=ve.d,ze=ve.i;if(ye&&Se&&Se.marker&&Se.marker.angle%360===0&&Se.line&&Se.line.shape!=="spline"){var Ie=P.isArrayOrTypedArray(ye),Ne=ve,et=Ae?Ae[0]:I||0,st=Ae?Ae[1]:B||0,Ze=Ne[0],Ke=Ne[1],nt=Ze-et,it=Ke-st,lt=Math.atan2(it,nt),vt=Ie?ye[ze]:ye;if(vt==="auto"){var xt=Ne.i;Se.type==="scatter"&&xt--;var Je=Ne.marker,Pe=Je.symbol;P.isArrayOrTypedArray(Pe)&&(Pe=Pe[xt]);var Ue=Je.size;P.isArrayOrTypedArray(Ue)&&(Ue=Ue[xt]),vt=Je?f.symbolBackOffs[f.symbolNumber(Pe)]*Ue:0,vt+=f.getMarkerStandoff(_e[xt],Se)||0}var He=Ze-vt*Math.cos(lt),Oe=Ke-vt*Math.sin(lt);(He<=Ze&&He>=et||He>=Ze&&He<=et)&&(Oe<=Ke&&Oe>=st||Oe>=Ke&&Oe<=st)&&(ve=[He,Oe])}return ve}f.applyBackoff=j,f.makeTester=function(){var ve=P.ensureSingleById(A.select("body"),"svg","js-plotly-tester",function(ye){ye.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Ae=P.ensureSingle(ve,"path","js-reference-point",function(ye){ye.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});f.tester=ve,f.testref=Ae},f.savedBBoxes={};var $=0,q=1e4;f.bBox=function(ve,Ae,ye){ye||(ye=oe(ve));var Se;if(ye){if(Se=f.savedBBoxes[ye],Se)return P.extendFlat({},Se)}else if(ve.childNodes.length===1){var _e=ve.childNodes[0];if(ye=oe(_e),ye){var ze=+_e.getAttribute("x")||0,Ie=+_e.getAttribute("y")||0,Ne=_e.getAttribute("transform");if(!Ne){var et=f.bBox(_e,!1,ye);return ze&&(et.left+=ze,et.right+=ze),Ie&&(et.top+=Ie,et.bottom+=Ie),et}if(ye+="~"+ze+"~"+Ie+"~"+Ne,Se=f.savedBBoxes[ye],Se)return P.extendFlat({},Se)}}var st,Ze;Ae?st=ve:(Ze=f.tester.node(),st=ve.cloneNode(!0),Ze.appendChild(st)),A.select(st).attr("transform",null).call(s.positionText,0,0);var Ke=st.getBoundingClientRect(),nt=f.testref.node().getBoundingClientRect();Ae||Ze.removeChild(st);var it={height:Ke.height,width:Ke.width,left:Ke.left-nt.left,top:Ke.top-nt.top,right:Ke.right-nt.left,bottom:Ke.bottom-nt.top};return $>=q&&(f.savedBBoxes={},$=0),ye&&(f.savedBBoxes[ye]=it),$++,P.extendFlat({},it)};function oe(ve){var Ae=ve.getAttribute("data-unformatted");if(Ae!==null)return Ae+ve.getAttribute("data-math")+ve.getAttribute("text-anchor")+ve.getAttribute("style")}f.setClipUrl=function(ve,Ae,ye){ve.attr("clip-path",Z(Ae,ye))};function Z(ve,Ae){if(!ve)return null;var ye=Ae._context,Se=ye._exportedPlot?"":ye._baseUrl||"";return Se?"url('"+Se+"#"+ve+"')":"url(#"+ve+")"}f.getTranslate=function(ve){var Ae=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ye=ve.attr?"attr":"getAttribute",Se=ve[ye]("transform")||"",_e=Se.replace(Ae,function(ze,Ie,Ne){return[Ie,Ne].join(" ")}).split(" ");return{x:+_e[0]||0,y:+_e[1]||0}},f.setTranslate=function(ve,Ae,ye){var Se=/(\btranslate\(.*?\);?)/,_e=ve.attr?"attr":"getAttribute",ze=ve.attr?"attr":"setAttribute",Ie=ve[_e]("transform")||"";return Ae=Ae||0,ye=ye||0,Ie=Ie.replace(Se,"").trim(),Ie+=t(Ae,ye),Ie=Ie.trim(),ve[ze]("transform",Ie),Ie},f.getScale=function(ve){var Ae=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ye=ve.attr?"attr":"getAttribute",Se=ve[ye]("transform")||"",_e=Se.replace(Ae,function(ze,Ie,Ne){return[Ie,Ne].join(" ")}).split(" ");return{x:+_e[0]||1,y:+_e[1]||1}},f.setScale=function(ve,Ae,ye){var Se=/(\bscale\(.*?\);?)/,_e=ve.attr?"attr":"getAttribute",ze=ve.attr?"attr":"setAttribute",Ie=ve[_e]("transform")||"";return Ae=Ae||1,ye=ye||1,Ie=Ie.replace(Se,"").trim(),Ie+="scale("+Ae+","+ye+")",Ie=Ie.trim(),ve[ze]("transform",Ie),Ie};var G=/\s*sc.*/;f.setPointGroupScale=function(ve,Ae,ye){if(Ae=Ae||1,ye=ye||1,!!ve){var Se=Ae===1&&ye===1?"":"scale("+Ae+","+ye+")";ve.each(function(){var _e=(this.getAttribute("transform")||"").replace(G,"");_e+=Se,_e=_e.trim(),this.setAttribute("transform",_e)})}};var re=/translate\([^)]*\)\s*$/;f.setTextPointsScale=function(ve,Ae,ye){ve&&ve.each(function(){var Se,_e=A.select(this),ze=_e.select("text");if(ze.node()){var Ie=parseFloat(ze.attr("x")||0),Ne=parseFloat(ze.attr("y")||0),et=(_e.attr("transform")||"").match(re);Ae===1&&ye===1?Se=[]:Se=[t(Ie,Ne),"scale("+Ae+","+ye+")",t(-Ie,-Ne)],et&&Se.push(et),_e.attr("transform",Se.join(""))}})};function H(ve,Ae){var ye;return ve&&(ye=ve.mf),ye===void 0&&(ye=Ae.marker&&Ae.marker.standoff||0),!Ae._geo&&!Ae._xA?-ye:ye}f.getMarkerStandoff=H;var J=Math.atan2,ae=Math.cos,K=Math.sin;function Y(ve,Ae){var ye=Ae[0],Se=Ae[1];return[ye*ae(ve)-Se*K(ve),ye*K(ve)+Se*ae(ve)]}var ie,ne,le,de,we,me;function Le(ve,Ae){var ye=ve.ma;ye===void 0&&(ye=Ae.marker.angle,(!ye||P.isArrayOrTypedArray(ye))&&(ye=0));var Se,_e,ze=Ae.marker.angleref;if(ze==="previous"||ze==="north"){if(Ae._geo){var Ie=Ae._geo.project(ve.lonlat);Se=Ie[0],_e=Ie[1]}else{var Ne=Ae._xA,et=Ae._yA;if(Ne&&et)Se=Ne.c2p(ve.x),_e=et.c2p(ve.y);else return 90}if(Ae._geo){var st=ve.lonlat[0],Ze=ve.lonlat[1],Ke=Ae._geo.project([st,Ze+1e-5]),nt=Ae._geo.project([st+1e-5,Ze]),it=J(nt[1]-_e,nt[0]-Se),lt=J(Ke[1]-_e,Ke[0]-Se),vt;if(ze==="north")vt=ye/180*Math.PI;else if(ze==="previous"){var xt=st/180*Math.PI,Je=Ze/180*Math.PI,Pe=ie/180*Math.PI,Ue=ne/180*Math.PI,He=Pe-xt,Oe=ae(Ue)*K(He),Ce=K(Ue)*ae(Je)-ae(Ue)*K(Je)*ae(He);vt=-J(Oe,Ce)-Math.PI,ie=st,ne=Ze}var ge=Y(it,[ae(vt),0]),pe=Y(lt,[K(vt),0]);ye=J(ge[1]+pe[1],ge[0]+pe[0])/Math.PI*180,ze==="previous"&&!(me===Ae.uid&&ve.i===we+1)&&(ye=null)}if(ze==="previous"&&!Ae._geo)if(me===Ae.uid&&ve.i===we+1&&L(Se)&&L(_e)){var Te=Se-le,be=_e-de,ke=Ae.line&&Ae.line.shape||"",Ve=ke.slice(ke.length-1);Ve==="h"&&(be=0),Ve==="v"&&(Te=0),ye+=J(be,Te)/Math.PI*180+90}else ye=null}return le=Se,de=_e,we=ve.i,me=Ae.uid,ye}f.getMarkerAngle=Le},71984:function(te,X,e){var A=e(21984),P=e(33428).round,o="M0,0Z",L=Math.sqrt(2),M=Math.sqrt(3),d=Math.PI,g=Math.cos,r=Math.sin;te.exports={circle:{n:0,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n="M"+f+",0A"+f+","+f+" 0 1,1 0,-"+f+"A"+f+","+f+" 0 0,1 "+f+",0Z";return T?l(h,T,n):n}},square:{n:1,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"H-"+f+"V-"+f+"H"+f+"Z")}},diamond:{n:2,f:function(y,h,T){if(t(h))return o;var f=P(y*1.3,2);return l(h,T,"M"+f+",0L0,"+f+"L-"+f+",0L0,-"+f+"Z")}},cross:{n:3,f:function(y,h,T){if(t(h))return o;var f=P(y*.4,2),n=P(y*1.2,2);return l(h,T,"M"+n+","+f+"H"+f+"V"+n+"H-"+f+"V"+f+"H-"+n+"V-"+f+"H-"+f+"V-"+n+"H"+f+"V-"+f+"H"+n+"Z")}},x:{n:4,f:function(y,h,T){if(t(h))return o;var f=P(y*.8/L,2),n="l"+f+","+f,v="l"+f+",-"+f,m="l-"+f+",-"+f,b="l-"+f+","+f;return l(h,T,"M0,"+f+n+v+m+v+m+b+m+b+n+b+n+"Z")}},"triangle-up":{n:5,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M-"+f+","+n+"H"+f+"L0,-"+v+"Z")}},"triangle-down":{n:6,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M-"+f+",-"+n+"H"+f+"L0,"+v+"Z")}},"triangle-left":{n:7,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M"+n+",-"+f+"V"+f+"L-"+v+",0Z")}},"triangle-right":{n:8,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M-"+n+",-"+f+"V"+f+"L"+v+",0Z")}},"triangle-ne":{n:9,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M-"+n+",-"+f+"H"+f+"V"+n+"Z")}},"triangle-se":{n:10,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M"+f+",-"+n+"V"+f+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M"+n+","+f+"H-"+f+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M-"+f+","+n+"V-"+f+"H"+n+"Z")}},pentagon:{n:13,f:function(y,h,T){if(t(h))return o;var f=P(y*.951,2),n=P(y*.588,2),v=P(-y,2),m=P(y*-.309,2),b=P(y*.809,2);return l(h,T,"M"+f+","+m+"L"+n+","+b+"H-"+n+"L-"+f+","+m+"L0,"+v+"Z")}},hexagon:{n:14,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y/2,2),v=P(y*M/2,2);return l(h,T,"M"+v+",-"+n+"V"+n+"L0,"+f+"L-"+v+","+n+"V-"+n+"L0,-"+f+"Z")}},hexagon2:{n:15,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y/2,2),v=P(y*M/2,2);return l(h,T,"M-"+n+","+v+"H"+n+"L"+f+",0L"+n+",-"+v+"H-"+n+"L-"+f+",0Z")}},octagon:{n:16,f:function(y,h,T){if(t(h))return o;var f=P(y*.924,2),n=P(y*.383,2);return l(h,T,"M-"+n+",-"+f+"H"+n+"L"+f+",-"+n+"V"+n+"L"+n+","+f+"H-"+n+"L-"+f+","+n+"V-"+n+"Z")}},star:{n:17,f:function(y,h,T){if(t(h))return o;var f=y*1.4,n=P(f*.225,2),v=P(f*.951,2),m=P(f*.363,2),b=P(f*.588,2),E=P(-f,2),p=P(f*-.309,2),S=P(f*.118,2),w=P(f*.809,2),i=P(f*.382,2);return l(h,T,"M"+n+","+p+"H"+v+"L"+m+","+S+"L"+b+","+w+"L0,"+i+"L-"+b+","+w+"L-"+m+","+S+"L-"+v+","+p+"H-"+n+"L0,"+E+"Z")}},hexagram:{n:18,f:function(y,h,T){if(t(h))return o;var f=P(y*.66,2),n=P(y*.38,2),v=P(y*.76,2);return l(h,T,"M-"+v+",0l-"+n+",-"+f+"h"+v+"l"+n+",-"+f+"l"+n+","+f+"h"+v+"l-"+n+","+f+"l"+n+","+f+"h-"+v+"l-"+n+","+f+"l-"+n+",-"+f+"h-"+v+"Z")}},"star-triangle-up":{n:19,f:function(y,h,T){if(t(h))return o;var f=P(y*M*.8,2),n=P(y*.8,2),v=P(y*1.6,2),m=P(y*4,2),b="A "+m+","+m+" 0 0 1 ";return l(h,T,"M-"+f+","+n+b+f+","+n+b+"0,-"+v+b+"-"+f+","+n+"Z")}},"star-triangle-down":{n:20,f:function(y,h,T){if(t(h))return o;var f=P(y*M*.8,2),n=P(y*.8,2),v=P(y*1.6,2),m=P(y*4,2),b="A "+m+","+m+" 0 0 1 ";return l(h,T,"M"+f+",-"+n+b+"-"+f+",-"+n+b+"0,"+v+b+f+",-"+n+"Z")}},"star-square":{n:21,f:function(y,h,T){if(t(h))return o;var f=P(y*1.1,2),n=P(y*2,2),v="A "+n+","+n+" 0 0 1 ";return l(h,T,"M-"+f+",-"+f+v+"-"+f+","+f+v+f+","+f+v+f+",-"+f+v+"-"+f+",-"+f+"Z")}},"star-diamond":{n:22,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2),n=P(y*1.9,2),v="A "+n+","+n+" 0 0 1 ";return l(h,T,"M-"+f+",0"+v+"0,"+f+v+f+",0"+v+"0,-"+f+v+"-"+f+",0Z")}},"diamond-tall":{n:23,f:function(y,h,T){if(t(h))return o;var f=P(y*.7,2),n=P(y*1.4,2);return l(h,T,"M0,"+n+"L"+f+",0L0,-"+n+"L-"+f+",0Z")}},"diamond-wide":{n:24,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2),n=P(y*.7,2);return l(h,T,"M0,"+n+"L"+f+",0L0,-"+n+"L-"+f+",0Z")}},hourglass:{n:25,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"H-"+f+"L"+f+",-"+f+"H-"+f+"Z")},noDot:!0},bowtie:{n:26,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"V-"+f+"L-"+f+","+f+"V-"+f+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f+"M"+f+",0A"+f+","+f+" 0 1,1 0,-"+f+"A"+f+","+f+" 0 0,1 "+f+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y/L,2);return l(h,T,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+f+",0A"+f+","+f+" 0 1,1 0,-"+f+"A"+f+","+f+" 0 0,1 "+f+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f+"M"+f+","+f+"H-"+f+"V-"+f+"H"+f+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"L-"+f+",-"+f+"M"+f+",-"+f+"L-"+f+","+f+"M"+f+","+f+"H-"+f+"V-"+f+"H"+f+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,h,T){if(t(h))return o;var f=P(y*1.3,2);return l(h,T,"M"+f+",0L0,"+f+"L-"+f+",0L0,-"+f+"ZM0,-"+f+"V"+f+"M-"+f+",0H"+f)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,h,T){if(t(h))return o;var f=P(y*1.3,2),n=P(y*.65,2);return l(h,T,"M"+f+",0L0,"+f+"L-"+f+",0L0,-"+f+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"L-"+f+",-"+f+"M"+f+",-"+f+"L-"+f+","+f)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*.85,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,h,T){if(t(h))return o;var f=P(y/2,2),n=P(y,2);return l(h,T,"M"+f+","+n+"V-"+n+"M"+(f-n)+",-"+n+"V"+n+"M"+n+","+f+"H-"+n+"M-"+n+","+(f-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M-"+f+","+v+"L0,0M"+f+","+v+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M-"+f+",-"+v+"L0,0M"+f+",-"+v+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M"+v+","+f+"L0,0M"+v+",-"+f+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M-"+v+","+f+"L0,0M-"+v+",-"+f+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2);return l(h,T,"M"+f+",0H-"+f)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2);return l(h,T,"M0,"+f+"V-"+f)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+",-"+f+"L-"+f+","+f)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"L-"+f+",-"+f)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M0,0L-"+f+","+n+"H"+f+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M0,0L-"+f+",-"+n+"H"+f+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,0L"+f+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,0L-"+f+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M-"+f+",0H"+f+"M0,0L-"+f+","+n+"H"+f+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M-"+f+",0H"+f+"M0,0L-"+f+",-"+n+"H"+f+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,-"+n+"V"+n+"M0,0L"+f+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,-"+n+"V"+n+"M0,0L-"+f+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,h,T){if(t(h))return o;var f=d/2.5,n=2*y*g(f),v=2*y*r(f);return l(h,T,"M0,0L"+-n+","+v+"L"+n+","+v+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,h,T){if(t(h))return o;var f=d/4,n=2*y*g(f),v=2*y*r(f);return l(h,T,"M0,0L"+-n+","+v+"A "+2*y+","+2*y+" 0 0 1 "+n+","+v+"Z")},backoff:.4,noDot:!0}};function t(y){return y===null}var s,a,c,u;function l(y,h,T){if((!y||y%360===0)&&!h)return T;if(c===y&&u===h&&s===T)return a;c=y,u=h,s=T;function f(I,B){var _=g(I),z=r(I),O=B[0],F=B[1]+(h||0);return[O*_-F*z,O*z+F*_]}for(var n=y/180*d,v=0,m=0,b=A(T),E="",p=0;p<b.length;p++){var S=b[p],w=S[0],i=v,C=m;if(w==="M"||w==="L")v=+S[1],m=+S[2];else if(w==="m"||w==="l")v+=+S[1],m+=+S[2];else if(w==="H")v=+S[1];else if(w==="h")v+=+S[1];else if(w==="V")m=+S[1];else if(w==="v")m+=+S[1];else if(w==="A"){v=+S[1],m=+S[2];var x=f(n,[+S[6],+S[7]]);S[6]=x[0],S[7]=x[1],S[3]=+S[3]+y}(w==="H"||w==="V")&&(w="L"),(w==="h"||w==="v")&&(w="l"),(w==="m"||w==="l")&&(v-=i,m-=C);var k=f(n,[v,m]);(w==="H"||w==="V")&&(w="L"),(w==="M"||w==="L"||w==="m"||w==="l")&&(S[1]=k[0],S[2]=k[1]),S[0]=w,E+=S[0]+S.slice(1).join(",")}return a=E,E}},97644:function(te){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"}}}},14880:function(te,X,e){var A=e(38248),P=e(24040),o=e(54460),L=e(3400),M=e(93792);te.exports=function(r){for(var t=r.calcdata,s=0;s<t.length;s++){var a=t[s],c=a[0].trace;if(c.visible===!0&&P.traceIs(c,"errorBarsOK")){var u=o.getFromId(r,c.xaxis),l=o.getFromId(r,c.yaxis);d(a,c,u,"x"),d(a,c,l,"y")}}};function d(g,r,t,s){var a=r["error_"+s]||{},c=a.visible&&["linear","log"].indexOf(t.type)!==-1,u=[];if(c){for(var l=M(a),y=0;y<g.length;y++){var h=g[y],T=h.i;if(T===void 0)T=y;else if(T===null)continue;var f=h[s];if(A(t.c2l(f))){var n=l(f,T);if(A(n[0])&&A(n[1])){var v=h[s+"s"]=f-n[0],m=h[s+"h"]=f+n[1];u.push(v,m)}}}var b=t._id,E=r._extremes[b],p=o.findExtremes(t,u,L.extendFlat({tozero:E.opts.tozero},{padded:!0}));E.min=E.min.concat(p.min),E.max=E.max.concat(p.max)}}},93792:function(te){te.exports=function(A){var P=A.type,o=A.symmetric;if(P==="data"){var L=A.array||[];if(o)return function(t,s){var a=+L[s];return[a,a]};var M=A.arrayminus||[];return function(t,s){var a=+L[s],c=+M[s];return!isNaN(a)||!isNaN(c)?[c||0,a||0]:[NaN,NaN]}}else{var d=X(P,A.value),g=X(P,A.valueminus);return o||A.valueminus===void 0?function(t){var s=d(t);return[s,s]}:function(t){return[g(t),d(t)]}}};function X(e,A){if(e==="percent")return function(P){return Math.abs(P*A/100)};if(e==="constant")return function(){return Math.abs(A)};if(e==="sqrt")return function(P){return Math.sqrt(Math.abs(P))}}},65200:function(te,X,e){var A=e(38248),P=e(24040),o=e(3400),L=e(31780),M=e(97644);te.exports=function(d,g,r,t){var s="error_"+t.axis,a=L.newContainer(g,s),c=d[s]||{};function u(v,m){return o.coerce(c,a,M,v,m)}var l=c.array!==void 0||c.value!==void 0||c.type==="sqrt",y=u("visible",l);if(y!==!1){var h=u("type","array"in c?"data":"percent"),T=!0;h!=="sqrt"&&(T=u("symmetric",!((h==="data"?"arrayminus":"valueminus")in c))),h==="data"?(u("array"),u("traceref"),T||(u("arrayminus"),u("tracerefminus"))):(h==="percent"||h==="constant")&&(u("value"),T||u("valueminus"));var f="copy_"+t.inherit+"style";if(t.inherit){var n=g["error_"+t.inherit];(n||{}).visible&&u(f,!(c.color||A(c.thickness)||A(c.width)))}(!t.inherit||!a[f])&&(u("color",r),u("thickness"),u("width",P.traceIs(g,"gl3d")?0:4))}}},64968:function(te,X,e){var A=e(3400),P=e(67824).overrideAll,o=e(97644),L={error_x:A.extendFlat({},o),error_y:A.extendFlat({},o)};delete L.error_x.copy_zstyle,delete L.error_y.copy_zstyle,delete L.error_y.copy_ystyle;var M={error_x:A.extendFlat({},o),error_y:A.extendFlat({},o),error_z:A.extendFlat({},o)};delete M.error_x.copy_ystyle,delete M.error_y.copy_ystyle,delete M.error_z.copy_ystyle,delete M.error_z.copy_zstyle,te.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:L,bar:L,histogram:L,scatter3d:P(M,"calc","nested"),scattergl:P(L,"calc","nested")}},supplyDefaults:e(65200),calc:e(14880),makeComputeError:e(93792),plot:e(78512),style:e(92036),hoverInfo:d};function d(g,r,t){(r.error_y||{}).visible&&(t.yerr=g.yh-g.y,r.error_y.symmetric||(t.yerrneg=g.y-g.ys)),(r.error_x||{}).visible&&(t.xerr=g.xh-g.x,r.error_x.symmetric||(t.xerrneg=g.x-g.xs))}},78512:function(te,X,e){var A=e(33428),P=e(38248),o=e(43616),L=e(43028);te.exports=function(g,r,t,s){var a,c=t.xaxis,u=t.yaxis,l=s&&s.duration>0,y=g._context.staticPlot;r.each(function(h){var T=h[0].trace,f=T.error_x||{},n=T.error_y||{},v;T.ids&&(v=function(p){return p.id});var m=L.hasMarkers(T)&&T.marker.maxdisplayed>0;!n.visible&&!f.visible&&(h=[]);var b=A.select(this).selectAll("g.errorbar").data(h,v);if(b.exit().remove(),!!h.length){f.visible||b.selectAll("path.xerror").remove(),n.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var E=b.enter().append("g").classed("errorbar",!0);l&&E.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(b,t.layerClipId,g),b.each(function(p){var S=A.select(this),w=M(p,c,u);if(!(m&&!p.vis)){var i,C=S.select("path.yerror");if(n.visible&&P(w.x)&&P(w.yh)&&P(w.ys)){var x=n.width;i="M"+(w.x-x)+","+w.yh+"h"+2*x+"m-"+x+",0V"+w.ys,w.noYS||(i+="m-"+x+",0h"+2*x),a=!C.size(),a?C=S.append("path").style("vector-effect",y?"none":"non-scaling-stroke").classed("yerror",!0):l&&(C=C.transition().duration(s.duration).ease(s.easing)),C.attr("d",i)}else C.remove();var k=S.select("path.xerror");if(f.visible&&P(w.y)&&P(w.xh)&&P(w.xs)){var I=(f.copy_ystyle?n:f).width;i="M"+w.xh+","+(w.y-I)+"v"+2*I+"m0,-"+I+"H"+w.xs,w.noXS||(i+="m0,-"+I+"v"+2*I),a=!k.size(),a?k=S.append("path").style("vector-effect",y?"none":"non-scaling-stroke").classed("xerror",!0):l&&(k=k.transition().duration(s.duration).ease(s.easing)),k.attr("d",i)}else k.remove()}})}})};function M(d,g,r){var t={x:g.c2p(d.x),y:r.c2p(d.y)};return d.yh!==void 0&&(t.yh=r.c2p(d.yh),t.ys=r.c2p(d.ys),P(t.ys)||(t.noYS=!0,t.ys=r.c2p(d.ys,!0))),d.xh!==void 0&&(t.xh=g.c2p(d.xh),t.xs=g.c2p(d.xs),P(t.xs)||(t.noXS=!0,t.xs=g.c2p(d.xs,!0))),t}},92036:function(te,X,e){var A=e(33428),P=e(76308);te.exports=function(L){L.each(function(M){var d=M[0].trace,g=d.error_y||{},r=d.error_x||{},t=A.select(this);t.selectAll("path.yerror").style("stroke-width",g.thickness+"px").call(P.stroke,g.color),r.copy_ystyle&&(r=g),t.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(P.stroke,r.color)})}},55756:function(te,X,e){var A=e(25376),P=e(65460).hoverlabel,o=e(92880).extendFlat;te.exports={hoverlabel:{bgcolor:o({},P.bgcolor,{arrayOk:!0}),bordercolor:o({},P.bordercolor,{arrayOk:!0}),font:A({arrayOk:!0,editType:"none"}),align:o({},P.align,{arrayOk:!0}),namelength:o({},P.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(te,X,e){var A=e(3400),P=e(24040);te.exports=function(M){var d=M.calcdata,g=M._fullLayout;function r(u){return function(l){return A.coerceHoverinfo({hoverinfo:l},{_module:u._module},g)}}for(var t=0;t<d.length;t++){var s=d[t],a=s[0].trace;if(!P.traceIs(a,"pie-like")){var c=P.traceIs(a,"2dMap")?o:A.fillArray;c(a.hoverinfo,s,"hi",r(a)),a.hovertemplate&&c(a.hovertemplate,s,"ht"),a.hoverlabel&&(c(a.hoverlabel.bgcolor,s,"hbg"),c(a.hoverlabel.bordercolor,s,"hbc"),c(a.hoverlabel.font.size,s,"hts"),c(a.hoverlabel.font.color,s,"htc"),c(a.hoverlabel.font.family,s,"htf"),c(a.hoverlabel.namelength,s,"hnl"),c(a.hoverlabel.align,s,"hta"))}}};function o(L,M,d,g){g=g||A.identity,Array.isArray(L)&&(M[0][d]=g(L))}},62376:function(te,X,e){var A=e(24040),P=e(83292).hover;te.exports=function(L,M,d){var g=A.getComponentMethod("annotations","onClick")(L,L._hoverdata);d!==void 0&&P(L,M,d,!0);function r(){L.emit("plotly_click",{points:L._hoverdata,event:M})}L._hoverdata&&M&&M.target&&(g&&g.then?g.then(r):r(),M.stopImmediatePropagation&&M.stopImmediatePropagation())}},92456:function(te){te.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},95448:function(te,X,e){var A=e(3400),P=e(55756),o=e(16132);te.exports=function(M,d,g,r){function t(a,c){return A.coerce(M,d,P,a,c)}var s=A.extendFlat({},r.hoverlabel);d.hovertemplate&&(s.namelength=-1),o(M,d,t,s)}},10624:function(te,X,e){var A=e(3400);X.getSubplot=function(g){return g.subplot||g.xaxis+g.yaxis||g.geo},X.isTraceInSubplots=function(g,r){if(g.type==="splom"){for(var t=g.xaxes||[],s=g.yaxes||[],a=0;a<t.length;a++)for(var c=0;c<s.length;c++)if(r.indexOf(t[a]+s[c])!==-1)return!0;return!1}return r.indexOf(X.getSubplot(g))!==-1},X.flat=function(g,r){for(var t=new Array(g.length),s=0;s<g.length;s++)t[s]=r;return t},X.p2c=function(g,r){for(var t=new Array(g.length),s=0;s<g.length;s++)t[s]=g[s].p2c(r);return t},X.getDistanceFunction=function(g,r,t,s){return g==="closest"?s||X.quadrature(r,t):g.charAt(0)==="x"?r:t},X.getClosest=function(g,r,t){if(t.index!==!1)t.index>=0&&t.index<g.length?t.distance=0:t.index=!1;else for(var s=0;s<g.length;s++){var a=r(g[s]);a<=t.distance&&(t.index=s,t.distance=a)}return t},X.inbox=function(g,r,t){return g*r<0||g===0?t:1/0},X.quadrature=function(g,r){return function(t){var s=g(t),a=r(t);return Math.sqrt(s*s+a*a)}},X.makeEventData=function(g,r,t){var s="index"in g?g.index:g.pointNumber,a={data:r._input,fullData:r,curveNumber:r.index,pointNumber:s};if(r._indexToPoints){var c=r._indexToPoints[s];c.length===1?a.pointIndex=c[0]:a.pointIndices=c}else a.pointIndex=s;return r._module.eventData?a=r._module.eventData(a,g,r,t,s):("xVal"in g?a.x=g.xVal:"x"in g&&(a.x=g.x),"yVal"in g?a.y=g.yVal:"y"in g&&(a.y=g.y),g.xa&&(a.xaxis=g.xa),g.ya&&(a.yaxis=g.ya),g.zLabelVal!==void 0&&(a.z=g.zLabelVal)),X.appendArrayPointValue(a,r,s),a},X.appendArrayPointValue=function(g,r,t){var s=r._arrayAttrs;if(s)for(var a=0;a<s.length;a++){var c=s[a],u=o(c);if(g[u]===void 0){var l=A.nestedProperty(r,c).get(),y=L(l,t);y!==void 0&&(g[u]=y)}}},X.appendArrayMultiPointValues=function(g,r,t){var s=r._arrayAttrs;if(s)for(var a=0;a<s.length;a++){var c=s[a],u=o(c);if(g[u]===void 0){for(var l=A.nestedProperty(r,c).get(),y=new Array(t.length),h=0;h<t.length;h++)y[h]=L(l,t[h]);g[u]=y}}};var P={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function o(g){return P[g]||g}function L(g,r){if(Array.isArray(r)){if(Array.isArray(g)&&Array.isArray(g[r[0]]))return g[r[0]][r[1]]}else return g[r]}var M={x:!0,y:!0},d={"x unified":!0,"y unified":!0};X.isUnifiedHover=function(g){return typeof g!="string"?!1:!!d[g]},X.isXYhover=function(g){return typeof g!="string"?!1:!!M[g]}},83292:function(te,X,e){var A=e(33428),P=e(38248),o=e(49760),L=e(3400),M=L.strTranslate,d=L.strRotate,g=e(95924),r=e(72736),t=e(72213),s=e(43616),a=e(76308),c=e(86476),u=e(54460),l=e(24040),y=e(10624),h=e(92456),T=e(77864),f=e(31140),n=h.YANGLE,v=Math.PI*n/180,m=1/Math.sin(v),b=Math.cos(v),E=Math.sin(v),p=h.HOVERARROWSIZE,S=h.HOVERTEXTPAD,w={box:!0,ohlc:!0,violin:!0,candlestick:!0},i={scatter:!0,scattergl:!0,splom:!0};X.hover=function(ae,K,Y,ie){ae=L.getGraphDiv(ae);var ne=K.target;L.throttle(ae._fullLayout._uid+h.HOVERID,h.HOVERMINTIME,function(){C(ae,K,Y,ie,ne)})},X.loneHover=function(ae,K){var Y=!0;Array.isArray(ae)||(Y=!1,ae=[ae]);var ie=K.gd,ne=G(ie),le=re(ie),de=ae.map(function(ze){var Ie=ze._x0||ze.x0||ze.x||0,Ne=ze._x1||ze.x1||ze.x||0,et=ze._y0||ze.y0||ze.y||0,st=ze._y1||ze.y1||ze.y||0,Ze=ze.eventData;if(Ze){var Ke=Math.min(Ie,Ne),nt=Math.max(Ie,Ne),it=Math.min(et,st),lt=Math.max(et,st),vt=ze.trace;if(l.traceIs(vt,"gl3d")){var xt=ie._fullLayout[vt.scene]._scene.container,Je=xt.offsetLeft,Pe=xt.offsetTop;Ke+=Je,nt+=Je,it+=Pe,lt+=Pe}Ze.bbox={x0:Ke+le,x1:nt+le,y0:it+ne,y1:lt+ne},K.inOut_bbox&&K.inOut_bbox.push(Ze.bbox)}else Ze=!1;return{color:ze.color||a.defaultLine,x0:ze.x0||ze.x||0,x1:ze.x1||ze.x||0,y0:ze.y0||ze.y||0,y1:ze.y1||ze.y||0,xLabel:ze.xLabel,yLabel:ze.yLabel,zLabel:ze.zLabel,text:ze.text,name:ze.name,idealAlign:ze.idealAlign,borderColor:ze.borderColor,fontFamily:ze.fontFamily,fontSize:ze.fontSize,fontColor:ze.fontColor,nameLength:ze.nameLength,textAlign:ze.textAlign,trace:ze.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:ze.hovertemplate||!1,hovertemplateLabels:ze.hovertemplateLabels||!1,eventData:Ze}}),we=!1,me=I(de,{gd:ie,hovermode:"closest",rotateLabels:we,bgColor:K.bgColor||a.background,container:A.select(K.container),outerContainer:K.outerContainer||K.container}),Le=me.hoverLabels,ve=5,Ae=0,ye=0;Le.sort(function(ze,Ie){return ze.y0-Ie.y0}).each(function(ze,Ie){var Ne=ze.y0-ze.by/2;Ne-ve<Ae?ze.offset=Ae-Ne+ve:ze.offset=0,Ae=Ne+ze.by+ze.offset,Ie===K.anchorIndex&&(ye=ze.offset)}).each(function(ze){ze.offset-=ye});var Se=ie._fullLayout._invScaleX,_e=ie._fullLayout._invScaleY;return F(Le,we,Se,_e),Y?Le:Le.node()};function C(J,ae,K,Y,ie){K||(K="xy");var ne=Array.isArray(K)?K:[K],le=J._fullLayout,de=le._plots||[],we=de[K],me=le._has("cartesian");if(we){var Le=we.overlays.map(function(or){return or.id});ne=ne.concat(Le)}for(var ve=ne.length,Ae=new Array(ve),ye=new Array(ve),Se=!1,_e=0;_e<ve;_e++){var ze=ne[_e];if(de[ze])Se=!0,Ae[_e]=de[ze].xaxis,ye[_e]=de[ze].yaxis;else if(le[ze]&&le[ze]._subplot){var Ie=le[ze]._subplot;Ae[_e]=Ie.xaxis,ye[_e]=Ie.yaxis}else{L.warn("Unrecognized subplot: "+ze);return}}var Ne=ae.hovermode||le.hovermode;if(Ne&&!Se&&(Ne="closest"),["x","y","closest","x unified","y unified"].indexOf(Ne)===-1||!J.calcdata||J.querySelector(".zoombox")||J._dragging)return c.unhoverRaw(J,ae);var et=le.hoverdistance;et===-1&&(et=1/0);var st=le.spikedistance;st===-1&&(st=1/0);var Ze=[],Ke=[],nt,it,lt,vt,xt,Je,Pe,Ue,He,Oe,Ce,ge,pe,Te={hLinePoint:null,vLinePoint:null},be=!1;if(Array.isArray(ae))for(Ne="array",lt=0;lt<ae.length;lt++)xt=J.calcdata[ae[lt].curveNumber||0],xt&&(Je=xt[0].trace,xt[0].trace.hoverinfo!=="skip"&&(Ke.push(xt),Je.orientation==="h"&&(be=!0)));else{for(vt=0;vt<J.calcdata.length;vt++)xt=J.calcdata[vt],Je=xt[0].trace,Je.hoverinfo!=="skip"&&y.isTraceInSubplots(Je,ne)&&(Ke.push(xt),Je.orientation==="h"&&(be=!0));var ke=!ie,Ve,je;if(ke)"xpx"in ae?Ve=ae.xpx:Ve=Ae[0]._length/2,"ypx"in ae?je=ae.ypx:je=ye[0]._length/2;else{if(g.triggerHandler(J,"plotly_beforehover",ae)===!1)return;var at=ie.getBoundingClientRect();Ve=ae.clientX-at.left,je=ae.clientY-at.top,le._calcInverseTransform(J);var ut=L.apply3DTransform(le._invTransform)(Ve,je);if(Ve=ut[0],je=ut[1],Ve<0||Ve>Ae[0]._length||je<0||je>ye[0]._length)return c.unhoverRaw(J,ae)}if(ae.pointerX=Ve+Ae[0]._offset,ae.pointerY=je+ye[0]._offset,"xval"in ae?nt=y.flat(ne,ae.xval):nt=y.p2c(Ae,Ve),"yval"in ae?it=y.flat(ne,ae.yval):it=y.p2c(ye,je),!P(nt[0])||!P(it[0]))return L.warn("Fx.hover failed",ae,J),c.unhoverRaw(J,ae)}var Nt=1/0;function Vt(or,Lr){for(vt=0;vt<Ke.length;vt++)if(xt=Ke[vt],!(!xt||!xt[0]||!xt[0].trace)&&(Je=xt[0].trace,!(Je.visible!==!0||Je._length===0)&&["carpet","contourcarpet"].indexOf(Je._module.name)===-1)){if(Je.type==="splom"?(Ue=0,Pe=ne[Ue]):(Pe=y.getSubplot(Je),Ue=ne.indexOf(Pe)),He=Ne,y.isUnifiedHover(He)&&(He=He.charAt(0)),ge={cd:xt,trace:Je,xa:Ae[Ue],ya:ye[Ue],maxHoverDistance:et,maxSpikeDistance:st,index:!1,distance:Math.min(Nt,et),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:a.defaultLine,name:Je.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},le[Pe]&&(ge.subplot=le[Pe]._subplot),le._splomScenes&&le._splomScenes[Je.uid]&&(ge.scene=le._splomScenes[Je.uid]),pe=Ze.length,He==="array"){var Br=ae[vt];"pointNumber"in Br?(ge.index=Br.pointNumber,He="closest"):(He="","xval"in Br&&(Oe=Br.xval,He="x"),"yval"in Br&&(Ce=Br.yval,He=He?"closest":"y"))}else or!==void 0&&Lr!==void 0?(Oe=or,Ce=Lr):(Oe=nt[Ue],Ce=it[Ue]);if(et!==0)if(Je._module&&Je._module.hoverPoints){var _r=Je._module.hoverPoints(ge,Oe,Ce,He,{finiteRange:!0,hoverLayer:le._hoverlayer});if(_r)for(var Qr,un=0;un<_r.length;un++)Qr=_r[un],P(Qr.x0)&&P(Qr.y0)&&Ze.push(N(Qr,Ne))}else L.log("Unrecognized trace type in hover:",Je);if(Ne==="closest"&&Ze.length>pe&&(Ze.splice(0,pe),Nt=Ze[0].distance),me&&st!==0&&Ze.length===0){ge.distance=st,ge.index=!1;var ln=Je._module.hoverPoints(ge,Oe,Ce,"closest",{hoverLayer:le._hoverlayer});if(ln&&(ln=ln.filter(function(Jn){return Jn.spikeDistance<=st})),ln&&ln.length){var Mn,Dn=ln.filter(function(Jn){return Jn.xa.showspikes&&Jn.xa.spikesnap!=="hovered data"});if(Dn.length){var Kn=Dn[0];P(Kn.x0)&&P(Kn.y0)&&(Mn=Ct(Kn),(!Te.vLinePoint||Te.vLinePoint.spikeDistance>Mn.spikeDistance)&&(Te.vLinePoint=Mn))}var sa=ln.filter(function(Jn){return Jn.ya.showspikes&&Jn.ya.spikesnap!=="hovered data"});if(sa.length){var na=sa[0];P(na.x0)&&P(na.y0)&&(Mn=Ct(na),(!Te.hLinePoint||Te.hLinePoint.spikeDistance>Mn.spikeDistance)&&(Te.hLinePoint=Mn))}}}}}Vt();function gt(or,Lr,Br){for(var _r=null,Qr=1/0,un,ln=0;ln<or.length;ln++)un=or[ln].spikeDistance,Br&&ln===0&&(un=-1/0),un<=Qr&&un<=Lr&&(_r=or[ln],Qr=un);return _r}function Ct(or){return or?{xa:or.xa,ya:or.ya,x:or.xSpike!==void 0?or.xSpike:(or.x0+or.x1)/2,y:or.ySpike!==void 0?or.ySpike:(or.y0+or.y1)/2,distance:or.distance,spikeDistance:or.spikeDistance,curveNumber:or.trace.index,color:or.color,pointNumber:or.index}:null}var Yt={fullLayout:le,container:le._hoverlayer,event:ae};J._spikepoints;var gr={vLinePoint:Te.vLinePoint,hLinePoint:Te.hLinePoint};J._spikepoints=gr;var ht=function(){Ze.sort(function(or,Lr){return or.distance-Lr.distance}),Ze=oe(Ze,Ne)};ht();var Ht=Ne.charAt(0),Wt=(Ht==="x"||Ht==="y")&&Ze[0]&&i[Ze[0].trace.type];if(me&&st!==0&&Ze.length!==0){var cr=Ze.filter(function(or){return or.ya.showspikes}),er=gt(cr,st,Wt);Te.hLinePoint=Ct(er);var ct=Ze.filter(function(or){return or.xa.showspikes}),qe=gt(ct,st,Wt);Te.vLinePoint=Ct(qe)}if(Ze.length===0){var dt=c.unhoverRaw(J,ae);return me&&(Te.hLinePoint!==null||Te.vLinePoint!==null)&&$()&&V(J,Te,Yt),dt}if(me&&$()&&V(J,Te,Yt),y.isXYhover(He)&&Ze[0].length!==0&&Ze[0].trace.type!=="splom"){var bt=Ze[0];w[bt.trace.type]?Ze=Ze.filter(function(or){return or.trace.index===bt.trace.index}):Ze=[bt];var Et=Ze.length,Mt=Z("x",bt,le),_t=Z("y",bt,le);Vt(Mt,_t);var It=[],Gt={},nr=0,ar=function(or){var Lr=w[or.trace.type]?x(or):or.trace.index;if(!Gt[Lr])nr++,Gt[Lr]=nr,It.push(or);else{var Br=Gt[Lr]-1,_r=It[Br];Br>0&&Math.abs(or.distance)<Math.abs(_r.distance)&&(It[Br]=or)}},ir;for(ir=0;ir<Et;ir++)ar(Ze[ir]);for(ir=Ze.length-1;ir>Et-1;ir--)ar(Ze[ir]);Ze=It,ht()}var Be=J._hoverdata,Fe=[],Rt=G(J),Lt=re(J);for(lt=0;lt<Ze.length;lt++){var Ut=Ze[lt],Qt=y.makeEventData(Ut,Ut.trace,Ut.cd);if(Ut.hovertemplate!==!1){var rr=!1;Ut.cd[Ut.index]&&Ut.cd[Ut.index].ht&&(rr=Ut.cd[Ut.index].ht),Ut.hovertemplate=rr||Ut.trace.hovertemplate||!1}if(Ut.xa&&Ut.ya){var Kt=Ut.x0+Ut.xa._offset,Dt=Ut.x1+Ut.xa._offset,sr=Ut.y0+Ut.ya._offset,fr=Ut.y1+Ut.ya._offset,vr=Math.min(Kt,Dt),lr=Math.max(Kt,Dt),Or=Math.min(sr,fr),Sr=Math.max(sr,fr);Qt.bbox={x0:vr+Lt,x1:lr+Lt,y0:Or+Rt,y1:Sr+Rt}}Ut.eventData=[Qt],Fe.push(Qt)}J._hoverdata=Fe;var Ar=Ne==="y"&&(Ke.length>1||Ze.length>1)||Ne==="closest"&&be&&Ze.length>1,sn=a.combine(le.plot_bgcolor||a.background,le.paper_bgcolor),Jr=I(Ze,{gd:J,hovermode:Ne,rotateLabels:Ar,bgColor:sn,container:le._hoverlayer,outerContainer:le._paper.node(),commonLabelOpts:le.hoverlabel,hoverdistance:le.hoverdistance}),bn=Jr.hoverLabels;if(y.isUnifiedHover(Ne)||(_(bn,Ar,le,Jr.commonLabelBoundingBox),F(bn,Ar,le._invScaleX,le._invScaleY)),ie&&ie.tagName){var xn=l.getComponentMethod("annotations","hasClickToShow")(J,Fe);t(A.select(ie),xn?"pointer":"")}!ie||Y||!j(J,ae,Be)||(Be&&J.emit("plotly_unhover",{event:ae,points:Be}),J.emit("plotly_hover",{event:ae,points:J._hoverdata,xaxes:Ae,yaxes:ye,xvals:nt,yvals:it}))}function x(J){return[J.trace.index,J.index,J.x0,J.y0,J.name,J.attr,J.xa?J.xa._id:"",J.ya?J.ya._id:""].join(",")}var k=/<extra>([\s\S]*)<\/extra>/;function I(J,ae){var K=ae.gd,Y=K._fullLayout,ie=ae.hovermode,ne=ae.rotateLabels,le=ae.bgColor,de=ae.container,we=ae.outerContainer,me=ae.commonLabelOpts||{};if(J.length===0)return[[]];var Le=ae.fontFamily||h.HOVERFONT,ve=ae.fontSize||h.HOVERFONTSIZE,Ae=J[0],ye=Ae.xa,Se=Ae.ya,_e=ie.charAt(0),ze=_e+"Label",Ie=Ae[ze];if(Ie===void 0&&ye.type==="multicategory")for(var Ne=0;Ne<J.length&&(Ie=J[Ne][ze],Ie===void 0);Ne++);var et=H(K,we),st=et.top,Ze=et.width,Ke=et.height,nt=Ie!==void 0&&Ae.distance<=ae.hoverdistance&&(ie==="x"||ie==="y");if(nt){var it=!0,lt,vt;for(lt=0;lt<J.length;lt++)if(it&&J[lt].zLabel===void 0&&(it=!1),vt=J[lt].hoverinfo||J[lt].trace.hoverinfo,vt){var xt=Array.isArray(vt)?vt:vt.split("+");if(xt.indexOf("all")===-1&&xt.indexOf(ie)===-1){nt=!1;break}}it&&(nt=!1)}var Je=de.selectAll("g.axistext").data(nt?[0]:[]);Je.enter().append("g").classed("axistext",!0),Je.exit().remove();var Pe={minX:0,maxX:0,minY:0,maxY:0};if(Je.each(function(){var Mt=A.select(this),_t=L.ensureSingle(Mt,"path","",function(Ar){Ar.style({"stroke-width":"1px"})}),It=L.ensureSingle(Mt,"text","",function(Ar){Ar.attr("data-notex",1)}),Gt=me.bgcolor||a.defaultLine,nr=me.bordercolor||a.contrast(Gt),ar=a.contrast(Gt),ir={family:me.font.family||Le,size:me.font.size||ve,color:me.font.color||ar};_t.style({fill:Gt,stroke:nr}),It.text(Ie).call(s.font,ir).call(r.positionText,0,0).call(r.convertToTspans,K),Mt.attr("transform","");var Be=H(K,It.node()),Fe,Rt;if(ie==="x"){var Lt=ye.side==="top"?"-":"";It.attr("text-anchor","middle").call(r.positionText,0,ye.side==="top"?st-Be.bottom-p-S:st-Be.top+p+S),Fe=ye._offset+(Ae.x0+Ae.x1)/2,Rt=Se._offset+(ye.side==="top"?0:Se._length);var Ut=Be.width/2+S,Qt=Fe;Fe<Ut?Qt=Ut:Fe>Y.width-Ut&&(Qt=Y.width-Ut),_t.attr("d","M"+(Fe-Qt)+",0L"+(Fe-Qt+p)+","+Lt+p+"H"+Ut+"v"+Lt+(S*2+Be.height)+"H"+-Ut+"V"+Lt+p+"H"+(Fe-Qt-p)+"Z"),Fe=Qt,Pe.minX=Fe-Ut,Pe.maxX=Fe+Ut,ye.side==="top"?(Pe.minY=Rt-(S*2+Be.height),Pe.maxY=Rt-S):(Pe.minY=Rt+S,Pe.maxY=Rt+(S*2+Be.height))}else{var rr,Kt,Dt;Se.side==="right"?(rr="start",Kt=1,Dt="",Fe=ye._offset+ye._length):(rr="end",Kt=-1,Dt="-",Fe=ye._offset),Rt=Se._offset+(Ae.y0+Ae.y1)/2,It.attr("text-anchor",rr),_t.attr("d","M0,0L"+Dt+p+","+p+"V"+(S+Be.height/2)+"h"+Dt+(S*2+Be.width)+"V-"+(S+Be.height/2)+"H"+Dt+p+"V-"+p+"Z"),Pe.minY=Rt-(S+Be.height/2),Pe.maxY=Rt+(S+Be.height/2),Se.side==="right"?(Pe.minX=Fe+p,Pe.maxX=Fe+p+(S*2+Be.width)):(Pe.minX=Fe-p-(S*2+Be.width),Pe.maxX=Fe-p);var sr=Be.height/2,fr=st-Be.top-sr,vr="clip"+Y._uid+"commonlabel"+Se._id,lr;if(Fe<Be.width+2*S+p){lr="M-"+(p+S)+"-"+sr+"h-"+(Be.width-S)+"V"+sr+"h"+(Be.width-S)+"Z";var Or=Be.width-Fe+S;r.positionText(It,Or,fr),rr==="end"&&It.selectAll("tspan").each(function(){var Ar=A.select(this),sn=s.tester.append("text").text(Ar.text()).call(s.font,ir),Jr=H(K,sn.node());Math.round(Jr.width)<Math.round(Be.width)&&Ar.attr("x",Or-Jr.width),sn.remove()})}else r.positionText(It,Kt*(S+p),fr),lr=null;var Sr=Y._topclips.selectAll("#"+vr).data(lr?[0]:[]);Sr.enter().append("clipPath").attr("id",vr).append("path"),Sr.exit().remove(),Sr.select("path").attr("d",lr),s.setClipUrl(It,lr?vr:null,K)}Mt.attr("transform",M(Fe,Rt))}),y.isUnifiedHover(ie)){de.selectAll("g.hovertext").remove();var Ue=J.filter(function(Mt){return Mt.hoverinfo!=="none"});if(Ue.length===0)return[];var He=Y.hoverlabel,Oe=He.font,Ce={showlegend:!0,legend:{title:{text:Ie,font:Oe},font:Oe,bgcolor:He.bgcolor,bordercolor:He.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:Y.legend?Y.legend.traceorder:void 0,orientation:"v"}},ge={font:Oe};T(Ce,ge,K._fullData);var pe=ge.legend;pe.entries=[];for(var Te=0;Te<Ue.length;Te++){var be=Ue[Te];if(be.hoverinfo!=="none"){var ke=B(be,!0,ie,Y,Ie),Ve=ke[0],je=ke[1];be.name=je,je!==""?be.text=je+" : "+Ve:be.text=Ve;var at=be.cd[be.index];at&&(at.mc&&(be.mc=at.mc),at.mcc&&(be.mc=at.mcc),at.mlc&&(be.mlc=at.mlc),at.mlcc&&(be.mlc=at.mlcc),at.mlw&&(be.mlw=at.mlw),at.mrc&&(be.mrc=at.mrc),at.dir&&(be.dir=at.dir)),be._distinct=!0,pe.entries.push([be])}}pe.entries.sort(function(Mt,_t){return Mt[0].trace.index-_t[0].trace.index}),pe.layer=de,pe._inHover=!0,pe._groupTitleFont=He.grouptitlefont,f(K,pe);var ut=de.select("g.legend"),Nt=H(K,ut.node()),Vt=Nt.width+2*S,gt=Nt.height+2*S,Ct=Ue[0],Yt=(Ct.x0+Ct.x1)/2,gr=(Ct.y0+Ct.y1)/2,ht=!(l.traceIs(Ct.trace,"bar-like")||l.traceIs(Ct.trace,"box-violin")),Ht,Wt;_e==="y"?ht?(Wt=gr-S,Ht=gr+S):(Wt=Math.min.apply(null,Ue.map(function(Mt){return Math.min(Mt.y0,Mt.y1)})),Ht=Math.max.apply(null,Ue.map(function(Mt){return Math.max(Mt.y0,Mt.y1)}))):Wt=Ht=L.mean(Ue.map(function(Mt){return(Mt.y0+Mt.y1)/2}))-gt/2;var cr,er;_e==="x"?ht?(cr=Yt+S,er=Yt-S):(cr=Math.max.apply(null,Ue.map(function(Mt){return Math.max(Mt.x0,Mt.x1)})),er=Math.min.apply(null,Ue.map(function(Mt){return Math.min(Mt.x0,Mt.x1)}))):cr=er=L.mean(Ue.map(function(Mt){return(Mt.x0+Mt.x1)/2}))-Vt/2;var ct=ye._offset,qe=Se._offset;Ht+=qe,cr+=ct,er+=ct-Vt,Wt+=qe-gt;var dt,bt;return cr+Vt<Ze&&cr>=0?dt=cr:er+Vt<Ze&&er>=0?dt=er:ct+Vt<Ze?dt=ct:cr-Yt<Yt-er+Vt?dt=Ze-Vt:dt=0,dt+=S,Ht+gt<Ke&&Ht>=0?bt=Ht:Wt+gt<Ke&&Wt>=0?bt=Wt:qe+gt<Ke?bt=qe:Ht-gr<gr-Wt+gt?bt=Ke-gt:bt=0,bt+=S,ut.attr("transform",M(dt-1,bt-1)),ut}var Et=de.selectAll("g.hovertext").data(J,function(Mt){return x(Mt)});return Et.enter().append("g").classed("hovertext",!0).each(function(){var Mt=A.select(this);Mt.append("rect").call(a.fill,a.addOpacity(le,.8)),Mt.append("text").classed("name",!0),Mt.append("path").style("stroke-width","1px"),Mt.append("text").classed("nums",!0).call(s.font,Le,ve)}),Et.exit().remove(),Et.each(function(Mt){var _t=A.select(this).attr("transform",""),It=Mt.color;Array.isArray(It)&&(It=It[Mt.eventData[0].pointNumber]);var Gt=Mt.bgcolor||It,nr=a.combine(a.opacity(Gt)?Gt:a.defaultLine,le),ar=a.combine(a.opacity(It)?It:a.defaultLine,le),ir=Mt.borderColor||a.contrast(nr),Be=B(Mt,nt,ie,Y,Ie,_t),Fe=Be[0],Rt=Be[1],Lt=_t.select("text.nums").call(s.font,Mt.fontFamily||Le,Mt.fontSize||ve,Mt.fontColor||ir).text(Fe).attr("data-notex",1).call(r.positionText,0,0).call(r.convertToTspans,K),Ut=_t.select("text.name"),Qt=0,rr=0;if(Rt&&Rt!==Fe){Ut.call(s.font,Mt.fontFamily||Le,Mt.fontSize||ve,ar).text(Rt).attr("data-notex",1).call(r.positionText,0,0).call(r.convertToTspans,K);var Kt=H(K,Ut.node());Qt=Kt.width+2*S,rr=Kt.height+2*S}else Ut.remove(),_t.select("rect").remove();_t.select("path").style({fill:nr,stroke:ir});var Dt=Mt.xa._offset+(Mt.x0+Mt.x1)/2,sr=Mt.ya._offset+(Mt.y0+Mt.y1)/2,fr=Math.abs(Mt.x1-Mt.x0),vr=Math.abs(Mt.y1-Mt.y0),lr=H(K,Lt.node()),Or=lr.width/Y._invScaleX,Sr=lr.height/Y._invScaleY;Mt.ty0=(st-lr.top)/Y._invScaleY,Mt.bx=Or+2*S,Mt.by=Math.max(Sr+2*S,rr),Mt.anchor="start",Mt.txwidth=Or,Mt.tx2width=Qt,Mt.offset=0;var Ar=(Or+p+S+Qt)*Y._invScaleX,sn,Jr;if(ne)Mt.pos=Dt,sn=sr+vr/2+Ar<=Ke,Jr=sr-vr/2-Ar>=0,(Mt.idealAlign==="top"||!sn)&&Jr?(sr-=vr/2,Mt.anchor="end"):sn?(sr+=vr/2,Mt.anchor="start"):Mt.anchor="middle",Mt.crossPos=sr;else{if(Mt.pos=sr,sn=Dt+fr/2+Ar<=Ze,Jr=Dt-fr/2-Ar>=0,(Mt.idealAlign==="left"||!sn)&&Jr)Dt-=fr/2,Mt.anchor="end";else if(sn)Dt+=fr/2,Mt.anchor="start";else{Mt.anchor="middle";var bn=Ar/2,xn=Dt+bn-Ze,or=Dt-bn;xn>0&&(Dt-=xn),or<0&&(Dt+=-or)}Mt.crossPos=Dt}Lt.attr("text-anchor",Mt.anchor),Qt&&Ut.attr("text-anchor",Mt.anchor),_t.attr("transform",M(Dt,sr)+(ne?d(n):""))}),{hoverLabels:Et,commonLabelBoundingBox:Pe}}function B(J,ae,K,Y,ie,ne){var le="",de="";J.nameOverride!==void 0&&(J.name=J.nameOverride),J.name&&(J.trace._meta&&(J.name=L.templateString(J.name,J.trace._meta)),le=q(J.name,J.nameLength));var we=K.charAt(0),me=we==="x"?"y":"x";J.zLabel!==void 0?(J.xLabel!==void 0&&(de+="x: "+J.xLabel+"<br>"),J.yLabel!==void 0&&(de+="y: "+J.yLabel+"<br>"),J.trace.type!=="choropleth"&&J.trace.type!=="choroplethmapbox"&&(de+=(de?"z: ":"")+J.zLabel)):ae&&J[we+"Label"]===ie?de=J[me+"Label"]||"":J.xLabel===void 0?J.yLabel!==void 0&&J.trace.type!=="scattercarpet"&&(de=J.yLabel):J.yLabel===void 0?de=J.xLabel:de="("+J.xLabel+", "+J.yLabel+")",(J.text||J.text===0)&&!Array.isArray(J.text)&&(de+=(de?"<br>":"")+J.text),J.extraText!==void 0&&(de+=(de?"<br>":"")+J.extraText),ne&&de===""&&!J.hovertemplate&&(le===""&&ne.remove(),de=le);var Le=J.hovertemplate||!1;if(Le){var ve=J.hovertemplateLabels||J;J[we+"Label"]!==ie&&(ve[we+"other"]=ve[we+"Val"],ve[we+"otherLabel"]=ve[we+"Label"]),de=L.hovertemplateString(Le,ve,Y._d3locale,J.eventData[0]||{},J.trace._meta),de=de.replace(k,function(Ae,ye){return le=q(ye,J.nameLength),""})}return[de,le]}function _(J,ae,K,Y){var ie=ae?"xa":"ya",ne=ae?"ya":"xa",le=0,de=1,we=J.size(),me=new Array(we),Le=0,ve=Y.minX,Ae=Y.maxX,ye=Y.minY,Se=Y.maxY,_e=function(Oe){return Oe*K._invScaleX},ze=function(Oe){return Oe*K._invScaleY};J.each(function(Oe){var Ce=Oe[ie],ge=Oe[ne],pe=Ce._id.charAt(0)==="x",Te=Ce.range;Le===0&&Te&&Te[0]>Te[1]!==pe&&(de=-1);var be=0,ke=pe?K.width:K.height;if(K.hovermode==="x"||K.hovermode==="y"){var Ve=z(Oe,ae),je=Oe.anchor,at=je==="end"?-1:1,ut,Nt;if(je==="middle")ut=Oe.crossPos+(pe?ze(Ve.y-Oe.by/2):_e(Oe.bx/2+Oe.tx2width/2)),Nt=ut+(pe?ze(Oe.by):_e(Oe.bx));else if(pe)ut=Oe.crossPos+ze(p+Ve.y)-ze(Oe.by/2-p),Nt=ut+ze(Oe.by);else{var Vt=_e(at*p+Ve.x),gt=Vt+_e(at*Oe.bx);ut=Oe.crossPos+Math.min(Vt,gt),Nt=Oe.crossPos+Math.max(Vt,gt)}pe?ye!==void 0&&Se!==void 0&&Math.min(Nt,Se)-Math.max(ut,ye)>1&&(ge.side==="left"?(be=ge._mainLinePosition,ke=K.width):ke=ge._mainLinePosition):ve!==void 0&&Ae!==void 0&&Math.min(Nt,Ae)-Math.max(ut,ve)>1&&(ge.side==="top"?(be=ge._mainLinePosition,ke=K.height):ke=ge._mainLinePosition)}me[Le++]=[{datum:Oe,traceIndex:Oe.trace.index,dp:0,pos:Oe.pos,posref:Oe.posref,size:Oe.by*(pe?m:1)/2,pmin:be,pmax:ke}]}),me.sort(function(Oe,Ce){return Oe[0].posref-Ce[0].posref||de*(Ce[0].traceIndex-Oe[0].traceIndex)});var Ie,Ne,et,st,Ze,Ke,nt;function it(Oe){var Ce=Oe[0],ge=Oe[Oe.length-1];if(Ne=Ce.pmin-Ce.pos-Ce.dp+Ce.size,et=ge.pos+ge.dp+ge.size-Ce.pmax,Ne>.01){for(Ze=Oe.length-1;Ze>=0;Ze--)Oe[Ze].dp+=Ne;Ie=!1}if(!(et<.01)){if(Ne<-.01){for(Ze=Oe.length-1;Ze>=0;Ze--)Oe[Ze].dp-=et;Ie=!1}if(Ie){var pe=0;for(st=0;st<Oe.length;st++)Ke=Oe[st],Ke.pos+Ke.dp+Ke.size>Ce.pmax&&pe++;for(st=Oe.length-1;st>=0&&!(pe<=0);st--)Ke=Oe[st],Ke.pos>Ce.pmax-1&&(Ke.del=!0,pe--);for(st=0;st<Oe.length&&!(pe<=0);st++)if(Ke=Oe[st],Ke.pos<Ce.pmin+1)for(Ke.del=!0,pe--,et=Ke.size*2,Ze=Oe.length-1;Ze>=0;Ze--)Oe[Ze].dp-=et;for(st=Oe.length-1;st>=0&&!(pe<=0);st--)Ke=Oe[st],Ke.pos+Ke.dp+Ke.size>Ce.pmax&&(Ke.del=!0,pe--)}}}for(;!Ie&&le<=we;){for(le++,Ie=!0,st=0;st<me.length-1;){var lt=me[st],vt=me[st+1],xt=lt[lt.length-1],Je=vt[0];if(Ne=xt.pos+xt.dp+xt.size-Je.pos-Je.dp+Je.size,Ne>.01&&xt.pmin===Je.pmin&&xt.pmax===Je.pmax){for(Ze=vt.length-1;Ze>=0;Ze--)vt[Ze].dp+=Ne;for(lt.push.apply(lt,vt),me.splice(st+1,1),nt=0,Ze=lt.length-1;Ze>=0;Ze--)nt+=lt[Ze].dp;for(et=nt/lt.length,Ze=lt.length-1;Ze>=0;Ze--)lt[Ze].dp-=et;Ie=!1}else st++}me.forEach(it)}for(st=me.length-1;st>=0;st--){var Pe=me[st];for(Ze=Pe.length-1;Ze>=0;Ze--){var Ue=Pe[Ze],He=Ue.datum;He.offset=Ue.dp,He.del=Ue.del}}}function z(J,ae){var K=0,Y=J.offset;return ae&&(Y*=-E,K=J.offset*b),{x:K,y:Y}}function O(J){var ae={start:1,end:-1,middle:0}[J.anchor],K=ae*(p+S),Y=K+ae*(J.txwidth+S),ie=J.anchor==="middle";return ie&&(K-=J.tx2width/2,Y+=J.txwidth/2+S),{alignShift:ae,textShiftX:K,text2ShiftX:Y}}function F(J,ae,K,Y){var ie=function(le){return le*K},ne=function(le){return le*Y};J.each(function(le){var de=A.select(this);if(le.del)return de.remove();var we=de.select("text.nums"),me=le.anchor,Le=me==="end"?-1:1,ve=O(le),Ae=z(le,ae),ye=Ae.x,Se=Ae.y,_e=me==="middle";de.select("path").attr("d",_e?"M-"+ie(le.bx/2+le.tx2width/2)+","+ne(Se-le.by/2)+"h"+ie(le.bx)+"v"+ne(le.by)+"h-"+ie(le.bx)+"Z":"M0,0L"+ie(Le*p+ye)+","+ne(p+Se)+"v"+ne(le.by/2-p)+"h"+ie(Le*le.bx)+"v-"+ne(le.by)+"H"+ie(Le*p+ye)+"V"+ne(Se-p)+"Z");var ze=ye+ve.textShiftX,Ie=Se+le.ty0-le.by/2+S,Ne=le.textAlign||"auto";Ne!=="auto"&&(Ne==="left"&&me!=="start"?(we.attr("text-anchor","start"),ze=_e?-le.bx/2-le.tx2width/2+S:-le.bx-S):Ne==="right"&&me!=="end"&&(we.attr("text-anchor","end"),ze=_e?le.bx/2-le.tx2width/2-S:le.bx+S)),we.call(r.positionText,ie(ze),ne(Ie)),le.tx2width&&(de.select("text.name").call(r.positionText,ie(ve.text2ShiftX+ve.alignShift*S+ye),ne(Se+le.ty0-le.by/2+S)),de.select("rect").call(s.setRect,ie(ve.text2ShiftX+(ve.alignShift-1)*le.tx2width/2+ye),ne(Se-le.by/2-1),ie(le.tx2width),ne(le.by+2)))})}function N(J,ae){var K=J.index,Y=J.trace||{},ie=J.cd[0],ne=J.cd[K]||{};function le(Ae){return Ae||P(Ae)&&Ae===0}var de=Array.isArray(K)?function(Ae,ye){var Se=L.castOption(ie,K,Ae);return le(Se)?Se:L.extractOption({},Y,"",ye)}:function(Ae,ye){return L.extractOption(ne,Y,Ae,ye)};function we(Ae,ye,Se){var _e=de(ye,Se);le(_e)&&(J[Ae]=_e)}if(we("hoverinfo","hi","hoverinfo"),we("bgcolor","hbg","hoverlabel.bgcolor"),we("borderColor","hbc","hoverlabel.bordercolor"),we("fontFamily","htf","hoverlabel.font.family"),we("fontSize","hts","hoverlabel.font.size"),we("fontColor","htc","hoverlabel.font.color"),we("nameLength","hnl","hoverlabel.namelength"),we("textAlign","hta","hoverlabel.align"),J.posref=ae==="y"||ae==="closest"&&Y.orientation==="h"?J.xa._offset+(J.x0+J.x1)/2:J.ya._offset+(J.y0+J.y1)/2,J.x0=L.constrain(J.x0,0,J.xa._length),J.x1=L.constrain(J.x1,0,J.xa._length),J.y0=L.constrain(J.y0,0,J.ya._length),J.y1=L.constrain(J.y1,0,J.ya._length),J.xLabelVal!==void 0&&(J.xLabel="xLabel"in J?J.xLabel:u.hoverLabelText(J.xa,J.xLabelVal,Y.xhoverformat),J.xVal=J.xa.c2d(J.xLabelVal)),J.yLabelVal!==void 0&&(J.yLabel="yLabel"in J?J.yLabel:u.hoverLabelText(J.ya,J.yLabelVal,Y.yhoverformat),J.yVal=J.ya.c2d(J.yLabelVal)),J.zLabelVal!==void 0&&J.zLabel===void 0&&(J.zLabel=String(J.zLabelVal)),!isNaN(J.xerr)&&!(J.xa.type==="log"&&J.xerr<=0)){var me=u.tickText(J.xa,J.xa.c2l(J.xerr),"hover").text;J.xerrneg!==void 0?J.xLabel+=" +"+me+" / -"+u.tickText(J.xa,J.xa.c2l(J.xerrneg),"hover").text:J.xLabel+=" ± "+me,ae==="x"&&(J.distance+=1)}if(!isNaN(J.yerr)&&!(J.ya.type==="log"&&J.yerr<=0)){var Le=u.tickText(J.ya,J.ya.c2l(J.yerr),"hover").text;J.yerrneg!==void 0?J.yLabel+=" +"+Le+" / -"+u.tickText(J.ya,J.ya.c2l(J.yerrneg),"hover").text:J.yLabel+=" ± "+Le,ae==="y"&&(J.distance+=1)}var ve=J.hoverinfo||J.trace.hoverinfo;return ve&&ve!=="all"&&(ve=Array.isArray(ve)?ve:ve.split("+"),ve.indexOf("x")===-1&&(J.xLabel=void 0),ve.indexOf("y")===-1&&(J.yLabel=void 0),ve.indexOf("z")===-1&&(J.zLabel=void 0),ve.indexOf("text")===-1&&(J.text=void 0),ve.indexOf("name")===-1&&(J.name=void 0)),J}function V(J,ae,K){var Y=K.container,ie=K.fullLayout,ne=ie._size,le=K.event,de=!!ae.hLinePoint,we=!!ae.vLinePoint,me,Le;if(Y.selectAll(".spikeline").remove(),!!(we||de)){var ve=a.combine(ie.plot_bgcolor,ie.paper_bgcolor);if(de){var Ae=ae.hLinePoint,ye,Se;me=Ae&&Ae.xa,Le=Ae&&Ae.ya;var _e=Le.spikesnap;_e==="cursor"?(ye=le.pointerX,Se=le.pointerY):(ye=me._offset+Ae.x,Se=Le._offset+Ae.y);var ze=o.readability(Ae.color,ve)<1.5?a.contrast(ve):Ae.color,Ie=Le.spikemode,Ne=Le.spikethickness,et=Le.spikecolor||ze,st=u.getPxPosition(J,Le),Ze,Ke;if(Ie.indexOf("toaxis")!==-1||Ie.indexOf("across")!==-1){if(Ie.indexOf("toaxis")!==-1&&(Ze=st,Ke=ye),Ie.indexOf("across")!==-1){var nt=Le._counterDomainMin,it=Le._counterDomainMax;Le.anchor==="free"&&(nt=Math.min(nt,Le.position),it=Math.max(it,Le.position)),Ze=ne.l+nt*ne.w,Ke=ne.l+it*ne.w}Y.insert("line",":first-child").attr({x1:Ze,x2:Ke,y1:Se,y2:Se,"stroke-width":Ne,stroke:et,"stroke-dasharray":s.dashStyle(Le.spikedash,Ne)}).classed("spikeline",!0).classed("crisp",!0),Y.insert("line",":first-child").attr({x1:Ze,x2:Ke,y1:Se,y2:Se,"stroke-width":Ne+2,stroke:ve}).classed("spikeline",!0).classed("crisp",!0)}Ie.indexOf("marker")!==-1&&Y.insert("circle",":first-child").attr({cx:st+(Le.side!=="right"?Ne:-Ne),cy:Se,r:Ne,fill:et}).classed("spikeline",!0)}if(we){var lt=ae.vLinePoint,vt,xt;me=lt&&lt.xa,Le=lt&&lt.ya;var Je=me.spikesnap;Je==="cursor"?(vt=le.pointerX,xt=le.pointerY):(vt=me._offset+lt.x,xt=Le._offset+lt.y);var Pe=o.readability(lt.color,ve)<1.5?a.contrast(ve):lt.color,Ue=me.spikemode,He=me.spikethickness,Oe=me.spikecolor||Pe,Ce=u.getPxPosition(J,me),ge,pe;if(Ue.indexOf("toaxis")!==-1||Ue.indexOf("across")!==-1){if(Ue.indexOf("toaxis")!==-1&&(ge=Ce,pe=xt),Ue.indexOf("across")!==-1){var Te=me._counterDomainMin,be=me._counterDomainMax;me.anchor==="free"&&(Te=Math.min(Te,me.position),be=Math.max(be,me.position)),ge=ne.t+(1-be)*ne.h,pe=ne.t+(1-Te)*ne.h}Y.insert("line",":first-child").attr({x1:vt,x2:vt,y1:ge,y2:pe,"stroke-width":He,stroke:Oe,"stroke-dasharray":s.dashStyle(me.spikedash,He)}).classed("spikeline",!0).classed("crisp",!0),Y.insert("line",":first-child").attr({x1:vt,x2:vt,y1:ge,y2:pe,"stroke-width":He+2,stroke:ve}).classed("spikeline",!0).classed("crisp",!0)}Ue.indexOf("marker")!==-1&&Y.insert("circle",":first-child").attr({cx:vt,cy:Ce-(me.side!=="top"?He:-He),r:He,fill:Oe}).classed("spikeline",!0)}}}function j(J,ae,K){if(!K||K.length!==J._hoverdata.length)return!0;for(var Y=K.length-1;Y>=0;Y--){var ie=K[Y],ne=J._hoverdata[Y];if(ie.curveNumber!==ne.curveNumber||String(ie.pointNumber)!==String(ne.pointNumber)||String(ie.pointNumbers)!==String(ne.pointNumbers))return!0}return!1}function $(J,ae){return!0}function q(J,ae){return r.plainText(J||"",{len:ae,allowedTags:["br","sub","sup","b","i","em"]})}function oe(J,ae){for(var K=ae.charAt(0),Y=[],ie=[],ne=[],le=0;le<J.length;le++){var de=J[le];l.traceIs(de.trace,"bar-like")||l.traceIs(de.trace,"box-violin")?ne.push(de):de.trace[K+"period"]?ie.push(de):Y.push(de)}return Y.concat(ie).concat(ne)}function Z(J,ae,K){var Y=ae[J+"a"],ie=ae[J+"Val"],ne=ae.cd[0];if(Y.type==="category"||Y.type==="multicategory")ie=Y._categoriesMap[ie];else if(Y.type==="date"){var le=ae.trace[J+"periodalignment"];if(le){var de=ae.cd[ae.index],we=de[J+"Start"];we===void 0&&(we=de[J]);var me=de[J+"End"];me===void 0&&(me=de[J]);var Le=me-we;le==="end"?ie+=Le:le==="middle"&&(ie+=Le/2)}ie=Y.d2c(ie)}return ne&&ne.t&&ne.t.posLetter===Y._id&&(K.boxmode==="group"||K.violinmode==="group")&&(ie+=ne.t.dPos),ie}function G(J){return J.offsetTop+J.clientTop}function re(J){return J.offsetLeft+J.clientLeft}function H(J,ae){var K=J._fullLayout,Y=ae.getBoundingClientRect(),ie=Y.left,ne=Y.top,le=ie+Y.width,de=ne+Y.height,we=L.apply3DTransform(K._invTransform)(ie,ne),me=L.apply3DTransform(K._invTransform)(le,de),Le=we[0],ve=we[1],Ae=me[0],ye=me[1];return{x:Le,y:ve,width:Ae-Le,height:ye-ve,top:Math.min(ve,ye),left:Math.min(Le,Ae),right:Math.max(Le,Ae),bottom:Math.max(ve,ye)}}},16132:function(te,X,e){var A=e(3400),P=e(76308),o=e(10624).isUnifiedHover;te.exports=function(M,d,g,r){r=r||{};var t=d.legend;function s(a){r.font[a]||(r.font[a]=t?d.legend.font[a]:d.font[a])}d&&o(d.hovermode)&&(r.font||(r.font={}),s("size"),s("family"),s("color"),t?(r.bgcolor||(r.bgcolor=P.combine(d.legend.bgcolor,d.paper_bgcolor)),r.bordercolor||(r.bordercolor=d.legend.bordercolor)):r.bgcolor||(r.bgcolor=d.paper_bgcolor)),g("hoverlabel.bgcolor",r.bgcolor),g("hoverlabel.bordercolor",r.bordercolor),g("hoverlabel.namelength",r.namelength),A.coerceFont(g,"hoverlabel.font",r.font),g("hoverlabel.align",r.align)}},41008:function(te,X,e){var A=e(3400),P=e(65460);te.exports=function(L,M){function d(g,r){return M[g]!==void 0?M[g]:A.coerce(L,M,P,g,r)}return d("clickmode"),d("hovermode")}},93024:function(te,X,e){var A=e(33428),P=e(3400),o=e(86476),L=e(10624),M=e(65460),d=e(83292);te.exports={moduleType:"component",name:"fx",constants:e(92456),schema:{layout:M},attributes:e(55756),layoutAttributes:M,supplyLayoutGlobalDefaults:e(81976),supplyDefaults:e(95448),supplyLayoutDefaults:e(88336),calc:e(55056),getDistanceFunction:L.getDistanceFunction,getClosest:L.getClosest,inbox:L.inbox,quadrature:L.quadrature,appendArrayPointValue:L.appendArrayPointValue,castHoverOption:r,castHoverinfo:t,hover:d.hover,unhover:o.unhover,loneHover:d.loneHover,loneUnhover:g,click:e(62376)};function g(s){var a=P.isD3Selection(s)?s:A.select(s);a.selectAll("g.hovertext").remove(),a.selectAll(".spikeline").remove()}function r(s,a,c){return P.castOption(s,a,"hoverlabel."+c)}function t(s,a,c){function u(l){return P.coerceHoverinfo({hoverinfo:l},{_module:s._module},a)}return P.castOption(s,c,"hoverinfo",u)}},65460:function(te,X,e){var A=e(92456),P=e(25376),o=P({editType:"none"});o.family.dflt=A.HOVERFONT,o.size.dflt=A.HOVERFONTSIZE,te.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:o,grouptitlefont:P({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"}}},88336:function(te,X,e){var A=e(3400),P=e(65460),o=e(41008),L=e(16132);te.exports=function(d,g){function r(l,y){return A.coerce(d,g,P,l,y)}var t=o(d,g);t&&(r("hoverdistance"),r("spikedistance"));var s=r("dragmode");s==="select"&&r("selectdirection");var a=g._has("mapbox"),c=g._has("geo"),u=g._basePlotModules.length;g.dragmode==="zoom"&&((a||c)&&u===1||a&&c&&u===2)&&(g.dragmode="pan"),L(d,g,r),A.coerceFont(r,"hoverlabel.grouptitlefont",g.hoverlabel.font)}},81976:function(te,X,e){var A=e(3400),P=e(16132),o=e(65460);te.exports=function(M,d){function g(r,t){return A.coerce(M,d,o,r,t)}P(M,d,g)}},12704:function(te,X,e){var A=e(3400),P=e(53756).counter,o=e(86968).u,L=e(33816).idRegex,M=e(31780),d={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:[P("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[L.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[L.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:o({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 g(c,u,l){var y=u[l+"axes"],h=Object.keys((c._splomAxes||{})[l]||{});if(Array.isArray(y))return y;if(h.length)return h}function r(c,u){var l=c.grid||{},y=g(u,l,"x"),h=g(u,l,"y");if(!c.grid&&!y&&!h)return;var T=Array.isArray(l.subplots)&&Array.isArray(l.subplots[0]),f=Array.isArray(y),n=Array.isArray(h),v=f&&y!==l.xaxes&&n&&h!==l.yaxes,m,b;T?(m=l.subplots.length,b=l.subplots[0].length):(n&&(m=h.length),f&&(b=y.length));var E=M.newContainer(u,"grid");function p(z,O){return A.coerce(l,E,d,z,O)}var S=p("rows",m),w=p("columns",b);if(!(S*w>1)){delete u.grid;return}if(!T&&!f&&!n){var i=p("pattern")==="independent";i&&(T=!0)}E._hasSubplotGrid=T;var C=p("roworder"),x=C==="top to bottom",k=T?.2:.1,I=T?.3:.1,B,_;v&&u._splomGridDflt&&(B=u._splomGridDflt.xside,_=u._splomGridDflt.yside),E._domains={x:t("x",p,k,B,w),y:t("y",p,I,_,S,x)}}function t(c,u,l,y,h,T){var f=u(c+"gap",l),n=u("domain."+c);u(c+"side",y);for(var v=new Array(h),m=n[0],b=(n[1]-m)/(h-f),E=b*(1-f),p=0;p<h;p++){var S=m+b*p;v[T?h-1-p:p]=[S,S+E]}return v}function s(c,u){var l=u.grid;if(!(!l||!l._domains)){var y=c.grid||{},h=u._subplots,T=l._hasSubplotGrid,f=l.rows,n=l.columns,v=l.pattern==="independent",m,b,E,p,S,w,i,C=l._axisMap={};if(T){var x=y.subplots||[];w=l.subplots=new Array(f);var k=1;for(m=0;m<f;m++){var I=w[m]=new Array(n),B=x[m]||[];for(b=0;b<n;b++)if(v?(S=k===1?"xy":"x"+k+"y"+k,k++):S=B[b],I[b]="",h.cartesian.indexOf(S)!==-1){if(i=S.indexOf("y"),E=S.slice(0,i),p=S.slice(i),C[E]!==void 0&&C[E]!==b||C[p]!==void 0&&C[p]!==m)continue;I[b]=S,C[E]=b,C[p]=m}}}else{var _=g(u,y,"x"),z=g(u,y,"y");l.xaxes=a(_,h.xaxis,n,C,"x"),l.yaxes=a(z,h.yaxis,f,C,"y")}var O=l._anchors={},F=l.roworder==="top to bottom";for(var N in C){var V=N.charAt(0),j=l[V+"side"],$,q,oe;if(j.length<8)O[N]="free";else if(V==="x"){if(j.charAt(0)==="t"===F?($=0,q=1,oe=f):($=f-1,q=-1,oe=-1),T){var Z=C[N];for(m=$;m!==oe;m+=q)if(S=w[m][Z],!!S&&(i=S.indexOf("y"),S.slice(0,i)===N)){O[N]=S.slice(i);break}}else for(m=$;m!==oe;m+=q)if(p=l.yaxes[m],h.cartesian.indexOf(N+p)!==-1){O[N]=p;break}}else if(j.charAt(0)==="l"?($=0,q=1,oe=n):($=n-1,q=-1,oe=-1),T){var G=C[N];for(m=$;m!==oe;m+=q)if(S=w[G][m],!!S&&(i=S.indexOf("y"),S.slice(i)===N)){O[N]=S.slice(0,i);break}}else for(m=$;m!==oe;m+=q)if(E=l.xaxes[m],h.cartesian.indexOf(E+N)!==-1){O[N]=E;break}}}}function a(c,u,l,y,h){var T=new Array(l),f;function n(v,m){u.indexOf(m)!==-1&&y[m]===void 0?(T[v]=m,y[m]=v):T[v]=""}if(Array.isArray(c))for(f=0;f<l;f++)n(f,c[f]);else for(n(0,h),f=1;f<l;f++)n(f,h+(f+1));return T}te.exports={moduleType:"component",name:"grid",schema:{layout:{grid:d}},layoutAttributes:d,sizeDefaults:r,contentDefaults:s}},65760:function(te,X,e){var A=e(33816),P=e(31780).templatedArray;e(36208),te.exports=P("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",A.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",A.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},63556:function(te,X,e){var A=e(38248),P=e(36896);te.exports=function(L,M,d,g){M=M||{};var r=d==="log"&&M.type==="linear",t=d==="linear"&&M.type==="log";if(r||t){for(var s=L._fullLayout.images,a=M._id.charAt(0),c,u,l=0;l<s.length;l++)if(c=s[l],u="images["+l+"].",c[a+"ref"]===M._id){var y=c[a],h=c["size"+a],T=null,f=null;if(r){T=P(y,M.range);var n=h/Math.pow(10,T)/2;f=2*Math.log(n+Math.sqrt(1+n*n))/Math.LN10}else T=Math.pow(10,y),f=T*(Math.pow(10,h/2)-Math.pow(10,-h/2));A(T)?A(f)||(f=null):(T=null,f=null),g(u+a,T),g(u+"size"+a,f)}}}},25024:function(te,X,e){var A=e(3400),P=e(54460),o=e(51272),L=e(65760),M="images";te.exports=function(r,t){var s={name:M,handleItemDefaults:d};o(r,t,s)};function d(g,r,t){function s(n,v){return A.coerce(g,r,L,n,v)}var a=s("source"),c=s("visible",!!a);if(!c)return r;s("layer"),s("xanchor"),s("yanchor"),s("sizex"),s("sizey"),s("sizing"),s("opacity");for(var u={_fullLayout:t},l=["x","y"],y=0;y<2;y++){var h=l[y],T=P.coerceRef(g,r,u,h,"paper",void 0);if(T!=="paper"){var f=P.getFromId(u,T);f._imgIndices.push(r._index)}P.coercePosition(r,u,s,T,h,0)}return r}},60963:function(te,X,e){var A=e(33428),P=e(43616),o=e(54460),L=e(79811),M=e(9616);te.exports=function(g){var r=g._fullLayout,t=[],s={},a=[],c,u;for(u=0;u<r.images.length;u++){var l=r.images[u];if(l.visible)if(l.layer==="below"&&l.xref!=="paper"&&l.yref!=="paper"){c=L.ref2id(l.xref)+L.ref2id(l.yref);var y=r._plots[c];if(!y){a.push(l);continue}y.mainplot&&(c=y.mainplot.id),s[c]||(s[c]=[]),s[c].push(l)}else l.layer==="above"?t.push(l):a.push(l)}var h={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function T(p){var S=A.select(this);if(this._imgSrc!==p.source)if(S.attr("xmlns",M.svg),p.source&&p.source.slice(0,5)==="data:")S.attr("xlink:href",p.source),this._imgSrc=p.source;else{var w=new Promise((function(i){var C=new Image;this.img=C,C.setAttribute("crossOrigin","anonymous"),C.onerror=x,C.onload=function(){var k=document.createElement("canvas");k.width=this.width,k.height=this.height;var I=k.getContext("2d",{willReadFrequently:!0});I.drawImage(this,0,0);var B=k.toDataURL("image/png");S.attr("xlink:href",B),i()},S.on("error",x),C.src=p.source,this._imgSrc=p.source;function x(){S.remove(),i()}}).bind(this));g._promises.push(w)}}function f(p){var S=A.select(this),w=o.getFromId(g,p.xref),i=o.getFromId(g,p.yref),C=o.getRefType(p.xref)==="domain",x=o.getRefType(p.yref)==="domain",k=r._size,I,B;w!==void 0?I=typeof p.xref=="string"&&C?w._length*p.sizex:Math.abs(w.l2p(p.sizex)-w.l2p(0)):I=p.sizex*k.w,i!==void 0?B=typeof p.yref=="string"&&x?i._length*p.sizey:Math.abs(i.l2p(p.sizey)-i.l2p(0)):B=p.sizey*k.h;var _=I*h.x[p.xanchor].offset,z=B*h.y[p.yanchor].offset,O=h.x[p.xanchor].sizing+h.y[p.yanchor].sizing,F,N;switch(w!==void 0?F=typeof p.xref=="string"&&C?w._length*p.x+w._offset:w.r2p(p.x)+w._offset:F=p.x*k.w+k.l,F+=_,i!==void 0?N=typeof p.yref=="string"&&x?i._length*(1-p.y)+i._offset:i.r2p(p.y)+i._offset:N=k.h-p.y*k.h+k.t,N+=z,p.sizing){case"fill":O+=" slice";break;case"stretch":O="none";break}S.attr({x:F,y:N,width:I,height:B,preserveAspectRatio:O,opacity:p.opacity});var V=w&&o.getRefType(p.xref)!=="domain"?w._id:"",j=i&&o.getRefType(p.yref)!=="domain"?i._id:"",$=V+j;P.setClipUrl(S,$?"clip"+r._uid+$:null,g)}var n=r._imageLowerLayer.selectAll("image").data(a),v=r._imageUpperLayer.selectAll("image").data(t);n.enter().append("image"),v.enter().append("image"),n.exit().remove(),v.exit().remove(),n.each(function(p){T.bind(this)(p),f.bind(this)(p)}),v.each(function(p){T.bind(this)(p),f.bind(this)(p)});var m=Object.keys(r._plots);for(u=0;u<m.length;u++){c=m[u];var b=r._plots[c];if(b.imagelayer){var E=b.imagelayer.selectAll("image").data(s[c]||[]);E.enter().append("image"),E.exit().remove(),E.each(function(p){T.bind(this)(p),f.bind(this)(p)})}}}},7402:function(te,X,e){te.exports={moduleType:"component",name:"images",layoutAttributes:e(65760),supplyLayoutDefaults:e(25024),includeBasePlot:e(36632)("images"),draw:e(60963),convertCoords:e(63556)}},3800:function(te,X,e){var A=e(25376),P=e(22548);te.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:P.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:A({editType:"legend"}),grouptitlefont:A({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"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,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",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},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:A({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},65196:function(te){te.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},77864:function(te,X,e){var A=e(24040),P=e(3400),o=e(31780),L=e(45464),M=e(3800),d=e(64859),g=e(42451);function r(t,s,a,c){var u=s[t]||{},l=o.newContainer(a,t);function y(oe,Z){return P.coerce(u,l,M,oe,Z)}var h=P.coerceFont(y,"font",a.font);y("bgcolor",a.paper_bgcolor),y("bordercolor");var T=y("visible");if(T){for(var f,n=function(oe,Z){var G=f._input,re=f;return P.coerce(G,re,L,oe,Z)},v=a.font||{},m=P.coerceFont(y,"grouptitlefont",P.extendFlat({},v,{size:Math.round(v.size*1.1)})),b=0,E=!1,p="normal",S=(a.shapes||[]).filter(function(oe){return oe.showlegend}),w=c.concat(S).filter(function(oe){return t===(oe.legend||"legend")}),i=0;i<w.length;i++)if(f=w[i],!!f.visible){var C=f._isShape;(f.showlegend||f._dfltShowLegend&&!(f._module&&f._module.attributes&&f._module.attributes.showlegend&&f._module.attributes.showlegend.dflt===!1))&&(b++,f.showlegend&&(E=!0,(!C&&A.traceIs(f,"pie-like")||f._input.showlegend===!0)&&b++),P.coerceFont(n,"legendgrouptitle.font",m)),(!C&&A.traceIs(f,"bar")&&a.barmode==="stack"||["tonextx","tonexty"].indexOf(f.fill)!==-1)&&(p=g.isGrouped({traceorder:p})?"grouped+reversed":"reversed"),f.legendgroup!==void 0&&f.legendgroup!==""&&(p=g.isReversed({traceorder:p})?"reversed+grouped":"grouped")}var x=P.coerce(s,a,d,"showlegend",E&&b>(t==="legend"?1:0));if(x===!1&&(a[t]=void 0),!(x===!1&&!u.uirevision)&&(y("uirevision",a.uirevision),x!==!1)){y("borderwidth");var k=y("orientation"),I=y("yref"),B=y("xref"),_=k==="h",z=I==="paper",O=B==="paper",F,N,V,j="left";_?(F=0,A.getComponentMethod("rangeslider","isVisible")(s.xaxis)?z?(N=1.1,V="bottom"):(N=1,V="top"):z?(N=-.1,V="top"):(N=0,V="bottom")):(N=1,V="auto",O?F=1.02:(F=1,j="right")),P.coerce(u,l,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:F}},"x"),P.coerce(u,l,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:N}},"y"),y("traceorder",p),g.isGrouped(a[t])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",j),y("yanchor",V),y("valign"),P.noneOrAll(u,l,["x","y"]);var $=y("title.text");if($){y("title.side",_?"left":"top");var q=P.extendFlat({},h,{size:P.bigFont(h.size)});P.coerceFont(y,"title.font",q)}}}}te.exports=function(s,a,c){var u,l=c.slice(),y=a.shapes;if(y)for(u=0;u<y.length;u++){var h=y[u];if(h.showlegend){var T={_input:h._input,visible:h.visible,showlegend:h.showlegend,legend:h.legend};l.push(T)}}var f=["legend"];for(u=0;u<l.length;u++)P.pushUnique(f,l[u].legend);for(a._legends=[],u=0;u<f.length;u++){var n=f[u];r(n,s,a,l),a[n]&&a[n].visible&&(a[n]._id=n),a._legends.push(n)}}},31140:function(te,X,e){var A=e(33428),P=e(3400),o=e(7316),L=e(24040),M=e(95924),d=e(86476),g=e(43616),r=e(76308),t=e(72736),s=e(33048),a=e(65196),c=e(84284),u=c.LINE_SPACING,l=c.FROM_TL,y=c.FROM_BR,h=e(35456),T=e(2012),f=e(42451),n=1,v=/^legend[0-9]*$/;te.exports=function(N,V){if(V)b(N,V);else{var j=N._fullLayout,$=j._legends,q=j._infolayer.selectAll('[class^="legend"]');q.each(function(){var re=A.select(this),H=re.attr("class"),J=H.split(" ")[0];J.match(v)&&$.indexOf(J)===-1&&re.remove()});for(var oe=0;oe<$.length;oe++){var Z=$[oe],G=N._fullLayout[Z];b(N,G)}}};function m(F,N,V){if(!(N.title.side!=="top center"&&N.title.side!=="top right")){var j=N.title.font,$=j.size*u,q=0,oe=F.node(),Z=g.bBox(oe).width;N.title.side==="top center"?q=.5*(N._width-2*V-2*a.titlePad-Z):N.title.side==="top right"&&(q=N._width-2*V-2*a.titlePad-Z),t.positionText(F,V+a.titlePad+q,V+$)}}function b(F,N){var V=N||{},j=F._fullLayout,$=O(V),q,oe,Z=V._inHover;if(Z?(oe=V.layer,q="hover"):(oe=j._infolayer,q=$),!!oe){q+=j._uid,F._legendMouseDownTime||(F._legendMouseDownTime=0);var G;if(Z){if(!V.entries)return;G=h(V.entries,V)}else{for(var re=(F.calcdata||[]).slice(),H=j.shapes,J=0;J<H.length;J++){var ae=H[J];if(ae.showlegend){var K={_isShape:!0,_fullInput:ae,index:ae._index,name:ae.name||ae.label.text||"shape "+ae._index,legend:ae.legend,legendgroup:ae.legendgroup,legendgrouptitle:ae.legendgrouptitle,legendrank:ae.legendrank,legendwidth:ae.legendwidth,showlegend:ae.showlegend,visible:ae.visible,opacity:ae.opacity,mode:ae.type==="line"?"lines":"markers",line:ae.line,marker:{line:ae.line,color:ae.fillcolor,size:12,symbol:ae.type==="rect"?"square":ae.type==="circle"?"circle":"hexagon2"}};re.push([{trace:K}])}}G=j.showlegend&&h(re,V,j._legends.length>1)}var Y=j.hiddenlabels||[];if(!Z&&(!j.showlegend||!G.length))return oe.selectAll("."+$).remove(),j._topdefs.select("#"+q).remove(),o.autoMargin(F,$);var ie=P.ensureSingle(oe,"g",$,function(ye){Z||ye.attr("pointer-events","all")}),ne=P.ensureSingleById(j._topdefs,"clipPath",q,function(ye){ye.append("rect")}),le=P.ensureSingle(ie,"rect","bg",function(ye){ye.attr("shape-rendering","crispEdges")});le.call(r.stroke,V.bordercolor).call(r.fill,V.bgcolor).style("stroke-width",V.borderwidth+"px");var de=P.ensureSingle(ie,"g","scrollbox"),we=V.title;V._titleWidth=0,V._titleHeight=0;var me;we.text?(me=P.ensureSingle(de,"text",$+"titletext"),me.attr("text-anchor","start").call(g.font,we.font).text(we.text),C(me,de,F,V,n)):de.selectAll("."+$+"titletext").remove();var Le=P.ensureSingle(ie,"rect","scrollbar",function(ye){ye.attr(a.scrollBarEnterAttrs).call(r.fill,a.scrollBarColor)}),ve=de.selectAll("g.groups").data(G);ve.enter().append("g").attr("class","groups"),ve.exit().remove();var Ae=ve.selectAll("g.traces").data(P.identity);Ae.enter().append("g").attr("class","traces"),Ae.exit().remove(),Ae.style("opacity",function(ye){var Se=ye[0].trace;return L.traceIs(Se,"pie-like")?Y.indexOf(ye[0].label)!==-1?.5:1:Se.visible==="legendonly"?.5:1}).each(function(){A.select(this).call(S,F,V)}).call(T,F,V).each(function(){Z||A.select(this).call(i,F,$)}),P.syncOrAsync([o.previousPromises,function(){return I(F,ve,Ae,V)},function(){var ye=j._size,Se=V.borderwidth,_e=V.xref==="paper",ze=V.yref==="paper";if(we.text&&m(me,V,Se),!Z){var Ie,Ne;_e?Ie=ye.l+ye.w*V.x-l[_(V)]*V._width:Ie=j.width*V.x-l[_(V)]*V._width,ze?Ne=ye.t+ye.h*(1-V.y)-l[z(V)]*V._effHeight:Ne=j.height*(1-V.y)-l[z(V)]*V._effHeight;var et=B(F,$,Ie,Ne);if(et)return;if(j.margin.autoexpand){var st=Ie,Ze=Ne;Ie=_e?P.constrain(Ie,0,j.width-V._width):st,Ne=ze?P.constrain(Ne,0,j.height-V._effHeight):Ze,Ie!==st&&P.log("Constrain "+$+".x to make legend fit inside graph"),Ne!==Ze&&P.log("Constrain "+$+".y to make legend fit inside graph")}g.setTranslate(ie,Ie,Ne)}if(Le.on(".drag",null),ie.on("wheel",null),Z||V._height<=V._maxHeight||F._context.staticPlot){var Ke=V._effHeight;Z&&(Ke=V._height),le.attr({width:V._width-Se,height:Ke-Se,x:Se/2,y:Se/2}),g.setTranslate(de,0,0),ne.select("rect").attr({width:V._width-2*Se,height:Ke-2*Se,x:Se,y:Se}),g.setClipUrl(de,q,F),g.setRect(Le,0,0,0,0),delete V._scrollY}else{var nt=Math.max(a.scrollBarMinHeight,V._effHeight*V._effHeight/V._height),it=V._effHeight-nt-2*a.scrollBarMargin,lt=V._height-V._effHeight,vt=it/lt,xt=Math.min(V._scrollY||0,lt);le.attr({width:V._width-2*Se+a.scrollBarWidth+a.scrollBarMargin,height:V._effHeight-Se,x:Se/2,y:Se/2}),ne.select("rect").attr({width:V._width-2*Se+a.scrollBarWidth+a.scrollBarMargin,height:V._effHeight-2*Se,x:Se,y:Se+xt}),g.setClipUrl(de,q,F),pe(xt,nt,vt),ie.on("wheel",function(){xt=P.constrain(V._scrollY+A.event.deltaY/it*lt,0,lt),pe(xt,nt,vt),xt!==0&&xt!==lt&&A.event.preventDefault()});var Je,Pe,Ue,He=function(je,at,ut){var Nt=(ut-at)/vt+je;return P.constrain(Nt,0,lt)},Oe=function(je,at,ut){var Nt=(at-ut)/vt+je;return P.constrain(Nt,0,lt)},Ce=A.behavior.drag().on("dragstart",function(){var je=A.event.sourceEvent;je.type==="touchstart"?Je=je.changedTouches[0].clientY:Je=je.clientY,Ue=xt}).on("drag",function(){var je=A.event.sourceEvent;je.buttons===2||je.ctrlKey||(je.type==="touchmove"?Pe=je.changedTouches[0].clientY:Pe=je.clientY,xt=He(Ue,Je,Pe),pe(xt,nt,vt))});Le.call(Ce);var ge=A.behavior.drag().on("dragstart",function(){var je=A.event.sourceEvent;je.type==="touchstart"&&(Je=je.changedTouches[0].clientY,Ue=xt)}).on("drag",function(){var je=A.event.sourceEvent;je.type==="touchmove"&&(Pe=je.changedTouches[0].clientY,xt=Oe(Ue,Je,Pe),pe(xt,nt,vt))});de.call(ge)}function pe(je,at,ut){V._scrollY=F._fullLayout[$]._scrollY=je,g.setTranslate(de,0,-je),g.setRect(Le,V._width,a.scrollBarMargin+je*ut,a.scrollBarWidth,at),ne.select("rect").attr("y",Se+je)}if(F._context.edits.legendPosition){var Te,be,ke,Ve;ie.classed("cursor-move",!0),d.init({element:ie.node(),gd:F,prepFn:function(){var je=g.getTranslate(ie);ke=je.x,Ve=je.y},moveFn:function(je,at){var ut=ke+je,Nt=Ve+at;g.setTranslate(ie,ut,Nt),Te=d.align(ut,V._width,ye.l,ye.l+ye.w,V.xanchor),be=d.align(Nt+V._height,-V._height,ye.t+ye.h,ye.t,V.yanchor)},doneFn:function(){if(Te!==void 0&&be!==void 0){var je={};je[$+".x"]=Te,je[$+".y"]=be,L.call("_guiRelayout",F,je)}},clickFn:function(je,at){var ut=oe.selectAll("g.traces").filter(function(){var Nt=this.getBoundingClientRect();return at.clientX>=Nt.left&&at.clientX<=Nt.right&&at.clientY>=Nt.top&&at.clientY<=Nt.bottom});ut.size()>0&&p(F,ie,ut,je,at)}})}}],F)}}function E(F,N,V){var j=F[0],$=j.width,q=N.entrywidthmode,oe=j.trace.legendwidth||N.entrywidth;return q==="fraction"?N._maxWidth*oe:V+(oe||$)}function p(F,N,V,j,$){var q=V.data()[0][0].trace,oe={event:$,node:V.node(),curveNumber:q.index,expandedIndex:q._expandedIndex,data:F.data,layout:F.layout,frames:F._transitionData._frames,config:F._context,fullData:F._fullData,fullLayout:F._fullLayout};q._group&&(oe.group=q._group),L.traceIs(q,"pie-like")&&(oe.label=V.datum()[0].label);var Z=M.triggerHandler(F,"plotly_legendclick",oe);if(j===1){if(Z===!1)return;N._clickTimeout=setTimeout(function(){F._fullLayout&&s(V,F,j)},F._context.doubleClickDelay)}else if(j===2){N._clickTimeout&&clearTimeout(N._clickTimeout),F._legendMouseDownTime=0;var G=M.triggerHandler(F,"plotly_legenddoubleclick",oe);G!==!1&&Z!==!1&&s(V,F,j)}}function S(F,N,V){var j=O(V),$=F.data()[0][0],q=$.trace,oe=L.traceIs(q,"pie-like"),Z=!V._inHover&&N._context.edits.legendText&&!oe,G=V._maxNameLength,re,H;$.groupTitle?(re=$.groupTitle.text,H=$.groupTitle.font):(H=V.font,V.entries?re=$.text:(re=oe?$.label:q.name,q._meta&&(re=P.templateString(re,q._meta))));var J=P.ensureSingle(F,"text",j+"text");J.attr("text-anchor","start").call(g.font,H).text(Z?w(re,G):re);var ae=V.indentation+V.itemwidth+a.itemGap*2;t.positionText(J,ae,0),Z?J.call(t.makeEditable,{gd:N,text:re}).call(C,F,N,V).on("edit",function(K){this.text(w(K,G)).call(C,F,N,V);var Y=$.trace._fullInput||{},ie={};if(L.hasTransform(Y,"groupby")){var ne=L.getTransformIndices(Y,"groupby"),le=ne[ne.length-1],de=P.keyedContainer(Y,"transforms["+le+"].styles","target","value.name");de.set($.trace._group,K),ie=de.constructUpdate()}else ie.name=K;return Y._isShape?L.call("_guiRelayout",N,"shapes["+q.index+"].name",ie.name):L.call("_guiRestyle",N,ie,q.index)}):C(J,F,N,V)}function w(F,N){var V=Math.max(4,N);if(F&&F.trim().length>=V/2)return F;F=F||"";for(var j=V-F.length;j>0;j--)F+=" ";return F}function i(F,N,V){var j=N._context.doubleClickDelay,$,q=1,oe=P.ensureSingle(F,"rect",V+"toggle",function(Z){N._context.staticPlot||Z.style("cursor","pointer").attr("pointer-events","all"),Z.call(r.fill,"rgba(0,0,0,0)")});N._context.staticPlot||(oe.on("mousedown",function(){$=new Date().getTime(),$-N._legendMouseDownTime<j?q+=1:(q=1,N._legendMouseDownTime=$)}),oe.on("mouseup",function(){if(!(N._dragged||N._editing)){var Z=N._fullLayout[V];new Date().getTime()-N._legendMouseDownTime>j&&(q=Math.max(q-1,1)),p(N,Z,F,q,A.event)}}))}function C(F,N,V,j,$){j._inHover&&F.attr("data-notex",!0),t.convertToTspans(F,V,function(){x(N,V,j,$)})}function x(F,N,V,j){var $=F.data()[0][0];if(!V._inHover&&$&&!$.trace.showlegend){F.remove();return}var q=F.select("g[class*=math-group]"),oe=q.node(),Z=O(V);V||(V=N._fullLayout[Z]);var G=V.borderwidth,re;j===n?re=V.title.font:$.groupTitle?re=$.groupTitle.font:re=V.font;var H=re.size*u,J,ae;if(oe){var K=g.bBox(oe);J=K.height,ae=K.width,j===n?g.setTranslate(q,G,G+J*.75):g.setTranslate(q,0,J*.25)}else{var Y="."+Z+(j===n?"title":"")+"text",ie=F.select(Y),ne=t.lineCount(ie),le=ie.node();if(J=H*ne,ae=le?g.bBox(le).width:0,j===n)V.title.side==="left"&&(ae+=a.itemGap*2),t.positionText(ie,G+a.titlePad,G+H);else{var de=a.itemGap*2+V.indentation+V.itemwidth;$.groupTitle&&(de=a.itemGap,ae-=V.indentation+V.itemwidth),t.positionText(ie,de,-H*((ne-1)/2-.3))}}j===n?(V._titleWidth=ae,V._titleHeight=J):($.lineHeight=H,$.height=Math.max(J,16)+3,$.width=ae)}function k(F){var N=0,V=0,j=F.title.side;return j&&(j.indexOf("left")!==-1&&(N=F._titleWidth),j.indexOf("top")!==-1&&(V=F._titleHeight)),[N,V]}function I(F,N,V,j){var $=F._fullLayout,q=O(j);j||(j=$[q]);var oe=$._size,Z=f.isVertical(j),G=f.isGrouped(j),re=j.entrywidthmode==="fraction",H=j.borderwidth,J=2*H,ae=a.itemGap,K=j.indentation+j.itemwidth+ae*2,Y=2*(H+ae),ie=z(j),ne=j.y<0||j.y===0&&ie==="top",le=j.y>1||j.y===1&&ie==="bottom",de=j.tracegroupgap,we={};j._maxHeight=Math.max(ne||le?$.height/2:oe.h,30);var me=0;j._width=0,j._height=0;var Le=k(j);if(Z)V.each(function(Ue){var He=Ue[0].height;g.setTranslate(this,H+Le[0],H+Le[1]+j._height+He/2+ae),j._height+=He,j._width=Math.max(j._width,Ue[0].width)}),me=K+j._width,j._width+=ae+K+J,j._height+=Y,G&&(N.each(function(Ue,He){g.setTranslate(this,0,He*j.tracegroupgap)}),j._height+=(j._lgroupsLength-1)*j.tracegroupgap);else{var ve=_(j),Ae=j.x<0||j.x===0&&ve==="right",ye=j.x>1||j.x===1&&ve==="left",Se=le||ne,_e=$.width/2;j._maxWidth=Math.max(Ae?Se&&ve==="left"?oe.l+oe.w:_e:ye?Se&&ve==="right"?oe.r+oe.w:_e:oe.w,2*K);var ze=0,Ie=0;V.each(function(Ue){var He=E(Ue,j,K);ze=Math.max(ze,He),Ie+=He}),me=null;var Ne=0;if(G){var et=0,st=0,Ze=0;N.each(function(){var Ue=0,He=0;A.select(this).selectAll("g.traces").each(function(Ce){var ge=E(Ce,j,K),pe=Ce[0].height;g.setTranslate(this,Le[0],Le[1]+H+ae+pe/2+He),He+=pe,Ue=Math.max(Ue,ge),we[Ce[0].trace.legendgroup]=Ue});var Oe=Ue+ae;st>0&&Oe+H+st>j._maxWidth?(Ne=Math.max(Ne,st),st=0,Ze+=et+de,et=He):et=Math.max(et,He),g.setTranslate(this,st,Ze),st+=Oe}),j._width=Math.max(Ne,st)+H,j._height=Ze+et+Y}else{var Ke=V.size(),nt=Ie+J+(Ke-1)*ae<j._maxWidth,it=0,lt=0,vt=0,xt=0;V.each(function(Ue){var He=Ue[0].height,Oe=E(Ue,j,K),Ce=nt?Oe:ze;re||(Ce+=ae),Ce+H+lt-ae>=j._maxWidth&&(Ne=Math.max(Ne,xt),lt=0,vt+=it,j._height+=it,it=0),g.setTranslate(this,Le[0]+H+lt,Le[1]+H+vt+He/2+ae),xt=lt+Oe+ae,lt+=Ce,it=Math.max(it,He)}),nt?(j._width=lt+J,j._height=it+Y):(j._width=Math.max(Ne,xt)+J,j._height+=it+Y)}}j._width=Math.ceil(Math.max(j._width+Le[0],j._titleWidth+2*(H+a.titlePad))),j._height=Math.ceil(Math.max(j._height+Le[1],j._titleHeight+2*(H+a.itemGap))),j._effHeight=Math.min(j._height,j._maxHeight);var Je=F._context.edits,Pe=Je.legendText||Je.legendPosition;V.each(function(Ue){var He=A.select(this).select("."+q+"toggle"),Oe=Ue[0].height,Ce=Ue[0].trace.legendgroup,ge=E(Ue,j,K);G&&Ce!==""&&(ge=we[Ce]);var pe=Pe?K:me||ge;!Z&&!re&&(pe+=ae/2),g.setRect(He,0,-Oe/2,pe,Oe)})}function B(F,N,V,j){var $=F._fullLayout,q=$[N],oe=_(q),Z=z(q),G=q.xref==="paper",re=q.yref==="paper";F._fullLayout._reservedMargin[N]={};var H=q.y<.5?"b":"t",J=q.x<.5?"l":"r",ae={r:$.width-V,l:V+q._width,b:$.height-j,t:j+q._effHeight};if(G&&re)return o.autoMargin(F,N,{x:q.x,y:q.y,l:q._width*l[oe],r:q._width*y[oe],b:q._effHeight*y[Z],t:q._effHeight*l[Z]});G?F._fullLayout._reservedMargin[N][H]=ae[H]:re||q.orientation==="v"?F._fullLayout._reservedMargin[N][J]=ae[J]:F._fullLayout._reservedMargin[N][H]=ae[H]}function _(F){return P.isRightAnchor(F)?"right":P.isCenterAnchor(F)?"center":"left"}function z(F){return P.isBottomAnchor(F)?"bottom":P.isMiddleAnchor(F)?"middle":"top"}function O(F){return F._id||"legend"}},35456:function(te,X,e){var A=e(24040),P=e(42451);te.exports=function(L,M,d){var g=M._inHover,r=P.isGrouped(M),t=P.isReversed(M),s={},a=[],c=!1,u={},l=0,y=0,h,T;function f(F,N,V){if(M.visible!==!1&&!(d&&F!==M._id))if(N===""||!P.isGrouped(M)){var j="~~i"+l;a.push(j),s[j]=[V],l++}else a.indexOf(N)===-1?(a.push(N),c=!0,s[N]=[V]):s[N].push(V)}for(h=0;h<L.length;h++){var n=L[h],v=n[0],m=v.trace,b=m.legend,E=m.legendgroup;if(!(!g&&(!m.visible||!m.showlegend)))if(A.traceIs(m,"pie-like"))for(u[E]||(u[E]={}),T=0;T<n.length;T++){var p=n[T].label;u[E][p]||(f(b,E,{label:p,color:n[T].color,i:n[T].i,trace:m,pts:n[T].pts}),u[E][p]=!0,y=Math.max(y,(p||"").length))}else f(b,E,v),y=Math.max(y,(m.name||"").length)}if(!a.length)return[];var S=!c||!r,w=[];for(h=0;h<a.length;h++){var i=s[a[h]];S?w.push(i[0]):w.push(i)}for(S&&(w=[w]),h=0;h<w.length;h++){var C=1/0;for(T=0;T<w[h].length;T++){var x=w[h][T].trace.legendrank;C>x&&(C=x)}w[h][0]._groupMinRank=C,w[h][0]._preGroupSort=h}var k=function(F,N){return F[0]._groupMinRank-N[0]._groupMinRank||F[0]._preGroupSort-N[0]._preGroupSort},I=function(F,N){return F.trace.legendrank-N.trace.legendrank||F._preSort-N._preSort};for(w.forEach(function(F,N){F[0]._preGroupSort=N}),w.sort(k),h=0;h<w.length;h++){w[h].forEach(function(F,N){F._preSort=N}),w[h].sort(I);var B=w[h][0].trace,_=null;for(T=0;T<w[h].length;T++){var z=w[h][T].trace.legendgrouptitle;if(z&&z.text){_=z,g&&(z.font=M._groupTitleFont);break}}if(t&&w[h].reverse(),_){var O=!1;for(T=0;T<w[h].length;T++)if(A.traceIs(w[h][T].trace,"pie-like")){O=!0;break}w[h].unshift({i:-1,groupTitle:_,noClick:O,trace:{showlegend:B.showlegend,legendgroup:B.legendgroup,visible:M.groupclick==="toggleitem"?!0:B.visible}})}for(T=0;T<w[h].length;T++)w[h][T]=[w[h][T]]}return M._lgroupsLength=w.length,M._maxNameLength=y,w}},33048:function(te,X,e){var A=e(24040),P=e(3400),o=P.pushUnique,L=!0;te.exports=function(d,g,r){var t=g._fullLayout;if(g._dragged||g._editing)return;var s=t.legend.itemclick,a=t.legend.itemdoubleclick,c=t.legend.groupclick;r===1&&s==="toggle"&&a==="toggleothers"&&L&&g.data&&g._context.showTips&&P.notifier(P._(g,"Double-click on legend to isolate one trace"),"long"),L=!1;var u;if(r===1?u=s:r===2&&(u=a),!u)return;var l=c==="togglegroup",y=t.hiddenlabels?t.hiddenlabels.slice():[],h=d.data()[0][0];if(h.groupTitle&&h.noClick)return;var T=g._fullData,f=(t.shapes||[]).filter(function(_e){return _e.showlegend}),n=T.concat(f),v=h.trace;v._isShape&&(v=v._fullInput);var m=v.legendgroup,b,E,p,S,w,i,C={},x=[],k=[],I=[];function B(_e,ze){var Ie=x.indexOf(_e),Ne=C.visible;return Ne||(Ne=C.visible=[]),x.indexOf(_e)===-1&&(x.push(_e),Ie=x.length-1),Ne[Ie]=ze,Ie}var _=(t.shapes||[]).map(function(_e){return _e._input}),z=!1;function O(_e,ze){_[_e].visible=ze,z=!0}function F(_e,ze){if(!(h.groupTitle&&!l)){var Ie=_e._fullInput||_e,Ne=Ie._isShape,et=Ie.index;if(et===void 0&&(et=Ie._index),A.hasTransform(Ie,"groupby")){var st=k[et];if(!st){var Ze=A.getTransformIndices(Ie,"groupby"),Ke=Ze[Ze.length-1];st=P.keyedContainer(Ie,"transforms["+Ke+"].styles","target","value.visible"),k[et]=st}var nt=st.get(_e._group);nt===void 0&&(nt=!0),nt!==!1&&st.set(_e._group,ze),I[et]=B(et,Ie.visible!==!1)}else{var it=Ie.visible===!1?!1:ze;Ne?O(et,it):B(et,it)}}}var N=v.legend,V=v._fullInput,j=V&&V._isShape;if(!j&&A.traceIs(v,"pie-like")){var $=h.label,q=y.indexOf($);if(u==="toggle")q===-1?y.push($):y.splice(q,1);else if(u==="toggleothers"){var oe=q!==-1,Z=[];for(b=0;b<g.calcdata.length;b++){var G=g.calcdata[b];for(E=0;E<G.length;E++){var re=G[E],H=re.label;N===G[0].trace.legend&&$!==H&&(y.indexOf(H)===-1&&(oe=!0),o(y,H),Z.push(H))}}if(!oe)for(var J=0;J<Z.length;J++){var ae=y.indexOf(Z[J]);ae!==-1&&y.splice(ae,1)}}A.call("_guiRelayout",g,"hiddenlabels",y)}else{var K=m&&m.length,Y=[],ie;if(K)for(b=0;b<n.length;b++)ie=n[b],ie.visible&&ie.legendgroup===m&&Y.push(b);if(u==="toggle"){var ne;switch(v.visible){case!0:ne="legendonly";break;case!1:ne=!1;break;case"legendonly":ne=!0;break}if(K)if(l)for(b=0;b<n.length;b++){var le=n[b];le.visible!==!1&&le.legendgroup===m&&F(le,ne)}else F(v,ne);else F(v,ne)}else if(u==="toggleothers"){var de,we,me,Le,ve,Ae=!0;for(b=0;b<n.length;b++)if(ve=n[b],de=ve===v,me=ve.showlegend!==!0,!(de||me)&&(we=K&&ve.legendgroup===m,!we&&ve.legend===N&&ve.visible===!0&&!A.traceIs(ve,"notLegendIsolatable"))){Ae=!1;break}for(b=0;b<n.length;b++)if(ve=n[b],!(ve.visible===!1||ve.legend!==N)&&!A.traceIs(ve,"notLegendIsolatable"))switch(v.visible){case"legendonly":F(ve,!0);break;case!0:Le=Ae?!0:"legendonly",de=ve===v,me=ve.showlegend!==!0&&!ve.legendgroup,we=de||K&&ve.legendgroup===m,F(ve,we||me?!0:Le);break}}for(b=0;b<k.length;b++)if(p=k[b],!!p){var ye=p.constructUpdate(),Se=Object.keys(ye);for(E=0;E<Se.length;E++)S=Se[E],i=C[S]=C[S]||[],i[I[b]]=ye[S]}for(w=Object.keys(C),b=0;b<w.length;b++)for(S=w[b],E=0;E<x.length;E++)C[S].hasOwnProperty(E)||(C[S][E]=void 0);z?A.call("_guiUpdate",g,C,{shapes:_},x):A.call("_guiRestyle",g,C,x)}}},42451:function(te,X){X.isGrouped=function(A){return(A.traceorder||"").indexOf("grouped")!==-1},X.isVertical=function(A){return A.orientation!=="h"},X.isReversed=function(A){return(A.traceorder||"").indexOf("reversed")!==-1}},2780:function(te,X,e){te.exports={moduleType:"component",name:"legend",layoutAttributes:e(3800),supplyLayoutDefaults:e(77864),draw:e(31140),style:e(2012)}},2012:function(te,X,e){var A=e(33428),P=e(24040),o=e(3400),L=o.strTranslate,M=e(43616),d=e(76308),g=e(94288).extractOpts,r=e(43028),t=e(10528),s=e(69656).castOption,a=e(65196),c=12,u=5,l=2,y=10,h=5;te.exports=function(m,b,E){var p=b._fullLayout;E||(E=p.legend);var S=E.itemsizing==="constant",w=E.itemwidth,i=(w+a.itemGap*2)/2,C=L(i,0),x=function(Z,G,re,H){var J;if(Z+1)J=Z;else if(G&&G.width>0)J=G.width;else return 0;return S?H:Math.min(J,re)};m.each(function(Z){var G=A.select(this),re=o.ensureSingle(G,"g","layers");re.style("opacity",Z[0].trace.opacity);var H=E.indentation,J=E.valign,ae=Z[0].lineHeight,K=Z[0].height;if(J==="middle"&&H===0||!ae||!K)re.attr("transform",null);else{var Y={top:1,bottom:-1}[J],ie=Y*(.5*(ae-K+3))||0,ne=E.indentation;re.attr("transform",L(ne,ie))}var le=re.selectAll("g.legendfill").data([Z]);le.enter().append("g").classed("legendfill",!0);var de=re.selectAll("g.legendlines").data([Z]);de.enter().append("g").classed("legendlines",!0);var we=re.selectAll("g.legendsymbols").data([Z]);we.enter().append("g").classed("legendsymbols",!0),we.selectAll("g.legendpoints").data([Z]).enter().append("g").classed("legendpoints",!0)}).each(oe).each(B).each(z).each(_).each(F).each($).each(j).each(k).each(I).each(N).each(V);function k(Z){var G=f(Z),re=G.showFill,H=G.showLine,J=G.showGradientLine,ae=G.showGradientFill,K=G.anyFill,Y=G.anyLine,ie=Z[0],ne=ie.trace,le,de,we=g(ne),me=we.colorscale,Le=we.reversescale,ve=function(Ne){if(Ne.size())if(re)M.fillGroupStyle(Ne,b,!0);else{var et="legendfill-"+ne.uid;M.gradient(Ne,b,et,T(Le),me,"fill")}},Ae=function(Ne){if(Ne.size()){var et="legendline-"+ne.uid;M.lineGroupStyle(Ne),M.gradient(Ne,b,et,T(Le),me,"stroke")}},ye=r.hasMarkers(ne)||!K?"M5,0":Y?"M5,-2":"M5,-3",Se=A.select(this),_e=Se.select(".legendfill").selectAll("path").data(re||ae?[Z]:[]);if(_e.enter().append("path").classed("js-fill",!0),_e.exit().remove(),_e.attr("d",ye+"h"+w+"v6h-"+w+"z").call(ve),H||J){var ze=x(void 0,ne.line,y,u);de=o.minExtend(ne,{line:{width:ze}}),le=[o.minExtend(ie,{trace:de})]}var Ie=Se.select(".legendlines").selectAll("path").data(H||J?[le]:[]);Ie.enter().append("path").classed("js-line",!0),Ie.exit().remove(),Ie.attr("d",ye+(J?"l"+w+",0.0001":"h"+w)).call(H?M.lineGroupStyle:Ae)}function I(Z){var G=f(Z),re=G.anyFill,H=G.anyLine,J=G.showLine,ae=G.showMarker,K=Z[0],Y=K.trace,ie=!ae&&!H&&!re&&r.hasText(Y),ne,le;function de(_e,ze,Ie,Ne){var et=o.nestedProperty(Y,_e).get(),st=o.isArrayOrTypedArray(et)&&ze?ze(et):et;if(S&&st&&Ne!==void 0&&(st=Ne),Ie){if(st<Ie[0])return Ie[0];if(st>Ie[1])return Ie[1]}return st}function we(_e){return K._distinct&&K.index&&_e[K.index]?_e[K.index]:_e[0]}if(ae||ie||J){var me={},Le={};if(ae){me.mc=de("marker.color",we),me.mx=de("marker.symbol",we),me.mo=de("marker.opacity",o.mean,[.2,1]),me.mlc=de("marker.line.color",we),me.mlw=de("marker.line.width",o.mean,[0,5],l),Le.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ve=de("marker.size",o.mean,[2,16],c);me.ms=ve,Le.marker.size=ve}J&&(Le.line={width:de("line.width",we,[0,10],u)}),ie&&(me.tx="Aa",me.tp=de("textposition",we),me.ts=10,me.tc=de("textfont.color",we),me.tf=de("textfont.family",we)),ne=[o.minExtend(K,me)],le=o.minExtend(Y,Le),le.selectedpoints=null,le.texttemplate=null}var Ae=A.select(this).select("g.legendpoints"),ye=Ae.selectAll("path.scatterpts").data(ae?ne:[]);ye.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",C),ye.exit().remove(),ye.call(M.pointStyle,le,b),ae&&(ne[0].mrc=3);var Se=Ae.selectAll("g.pointtext").data(ie?ne:[]);Se.enter().append("g").classed("pointtext",!0).append("text").attr("transform",C),Se.exit().remove(),Se.selectAll("text").call(M.textPointStyle,le,b)}function B(Z){var G=Z[0].trace,re=G.type==="waterfall";if(Z[0]._distinct&&re){var H=Z[0].trace[Z[0].dir].marker;return Z[0].mc=H.color,Z[0].mlw=H.line.width,Z[0].mlc=H.line.color,O(Z,this,"waterfall")}var J=[];G.visible&&re&&(J=Z[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 ae=A.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(J);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",C).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(K){var Y=A.select(this),ie=G[K[0]].marker,ne=x(void 0,ie.line,h,l);Y.attr("d",K[1]).style("stroke-width",ne+"px").call(d.fill,ie.color),ne&&Y.call(d.stroke,ie.line.color)})}function _(Z){O(Z,this)}function z(Z){O(Z,this,"funnel")}function O(Z,G,re){var H=Z[0].trace,J=H.marker||{},ae=J.line||{},K=J.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Y=re?H.visible&&H.type===re:P.traceIs(H,"bar"),ie=A.select(G).select("g.legendpoints").selectAll("path.legend"+re).data(Y?[Z]:[]);ie.enter().append("path").classed("legend"+re,!0).attr("d",K).attr("transform",C),ie.exit().remove(),ie.each(function(ne){var le=A.select(this),de=ne[0],we=x(de.mlw,J.line,h,l);le.style("stroke-width",we+"px");var me=de.mcc;if(!E._inHover&&"mc"in de){var Le=g(J),ve=Le.mid;ve===void 0&&(ve=(Le.max+Le.min)/2),me=M.tryColorscale(J,"")(ve)}var Ae=me||de.mc||J.color,ye=J.pattern,Se=ye&&M.getPatternAttr(ye.shape,0,"");if(Se){var _e=M.getPatternAttr(ye.bgcolor,0,null),ze=M.getPatternAttr(ye.fgcolor,0,null),Ie=ye.fgopacity,Ne=n(ye.size,8,10),et=n(ye.solidity,.5,1),st="legend-"+H.uid;le.call(M.pattern,"legend",b,st,Se,Ne,et,me,ye.fillmode,_e,ze,Ie)}else le.call(d.fill,Ae);we&&d.stroke(le,de.mlc||ae.color)})}function F(Z){var G=Z[0].trace,re=A.select(this).select("g.legendpoints").selectAll("path.legendbox").data(G.visible&&P.traceIs(G,"box-violin")?[Z]:[]);re.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",C),re.exit().remove(),re.each(function(){var H=A.select(this);if((G.boxpoints==="all"||G.points==="all")&&d.opacity(G.fillcolor)===0&&d.opacity((G.line||{}).color)===0){var J=o.minExtend(G,{marker:{size:S?c:o.constrain(G.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});re.call(M.pointStyle,J,b)}else{var ae=x(void 0,G.line,h,l);H.style("stroke-width",ae+"px").call(d.fill,G.fillcolor),ae&&d.stroke(H,G.line.color)}})}function N(Z){var G=Z[0].trace,re=A.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(G.visible&&G.type==="candlestick"?[Z,Z]:[]);re.enter().append("path").classed("legendcandle",!0).attr("d",function(H,J){return J?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",C).style("stroke-miterlimit",1),re.exit().remove(),re.each(function(H,J){var ae=A.select(this),K=G[J?"increasing":"decreasing"],Y=x(void 0,K.line,h,l);ae.style("stroke-width",Y+"px").call(d.fill,K.fillcolor),Y&&d.stroke(ae,K.line.color)})}function V(Z){var G=Z[0].trace,re=A.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(G.visible&&G.type==="ohlc"?[Z,Z]:[]);re.enter().append("path").classed("legendohlc",!0).attr("d",function(H,J){return J?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",C).style("stroke-miterlimit",1),re.exit().remove(),re.each(function(H,J){var ae=A.select(this),K=G[J?"increasing":"decreasing"],Y=x(void 0,K.line,h,l);ae.style("fill","none").call(M.dashLine,K.line.dash,Y),Y&&d.stroke(ae,K.line.color)})}function j(Z){q(Z,this,"pie")}function $(Z){q(Z,this,"funnelarea")}function q(Z,G,re){var H=Z[0],J=H.trace,ae=re?J.visible&&J.type===re:P.traceIs(J,re),K=A.select(G).select("g.legendpoints").selectAll("path.legend"+re).data(ae?[Z]:[]);if(K.enter().append("path").classed("legend"+re,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",C),K.exit().remove(),K.size()){var Y=J.marker||{},ie=x(s(Y.line.width,H.pts),Y.line,h,l),ne="pieLike",le=o.minExtend(J,{marker:{line:{width:ie}}},ne),de=o.minExtend(H,{trace:le},ne);t(K,de,le,b)}}function oe(Z){var G=Z[0].trace,re,H=[];if(G.visible)switch(G.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],re=!0;break;case"choropleth":case"choroplethmapbox":H=[["M-6,-6V6H6V-6Z"]],re=!0;break;case"densitymapbox":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],re="radial";break;case"cone":H=[["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"]],re=!1;break;case"streamtube":H=[["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"]],re=!1;break;case"surface":H=[["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"]],re=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],re=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],re=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],re=!1;break}var J=A.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);J.enter().append("path").classed("legend3dandfriends",!0).attr("transform",C).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(ae,K){var Y=A.select(this),ie=g(G),ne=ie.colorscale,le=ie.reversescale,de=function(ve){if(ve.size()){var Ae="legendfill-"+G.uid;M.gradient(ve,b,Ae,T(le,re==="radial"),ne,"fill")}},we;if(ne){if(!re){var Le=ne.length;we=K===0?ne[le?Le-1:0][1]:K===1?ne[le?0:Le-1][1]:ne[Math.floor((Le-1)/2)][1]}}else{var me=G.vertexcolor||G.facecolor||G.color;we=o.isArrayOrTypedArray(me)?me[K]||me[0]:me}Y.attr("d",ae[0]),we?Y.call(d.fill,we):Y.call(de)})}};function T(v,m){var b=m?"radial":"horizontal";return b+(v?"":"reversed")}function f(v){var m=v[0].trace,b=m.contours,E=r.hasLines(m),p=r.hasMarkers(m),S=m.visible&&m.fill&&m.fill!=="none",w=!1,i=!1;if(b){var C=b.coloring;C==="lines"?w=!0:E=C==="none"||C==="heatmap"||b.showlines,b.type==="constraint"?S=b._operation!=="=":(C==="fill"||C==="heatmap")&&(i=!0)}return{showMarker:p,showLine:E,showFill:S,showGradientLine:w,showGradientFill:i,anyLine:E||w,anyFill:S||i}}function n(v,m,b){return v&&o.isArrayOrTypedArray(v)?m:v>b?b:v}},66540:function(te,X,e){e(76052),te.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"}}},44248:function(te,X,e){var A=e(24040),P=e(7316),o=e(79811),L=e(9224),M=e(4016).eraseActiveShape,d=e(3400),g=d._,r=te.exports={};r.toImage={name:"toImage",title:function(v){var m=v._context.toImageButtonOptions||{},b=m.format||"png";return b==="png"?g(v,"Download plot as a png"):g(v,"Download plot")},icon:L.camera,click:function(v){var m=v._context.toImageButtonOptions,b={format:m.format||"png"};d.notifier(g(v,"Taking snapshot - this may take a few seconds"),"long"),b.format!=="svg"&&d.isIE()&&(d.notifier(g(v,"IE only supports svg. Changing format to svg."),"long"),b.format="svg"),["filename","width","height","scale"].forEach(function(E){E in m&&(b[E]=m[E])}),A.call("downloadImage",v,b).then(function(E){d.notifier(g(v,"Snapshot succeeded")+" - "+E,"long")}).catch(function(){d.notifier(g(v,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(v){return g(v,"Edit in Chart Studio")},icon:L.disk,click:function(v){P.sendDataToCloud(v)}},r.editInChartStudio={name:"editInChartStudio",title:function(v){return g(v,"Edit in Chart Studio")},icon:L.pencil,click:function(v){P.sendDataToCloud(v)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(v){return g(v,"Zoom")},attr:"dragmode",val:"zoom",icon:L.zoombox,click:t},r.pan2d={name:"pan2d",_cat:"pan",title:function(v){return g(v,"Pan")},attr:"dragmode",val:"pan",icon:L.pan,click:t},r.select2d={name:"select2d",_cat:"select",title:function(v){return g(v,"Box Select")},attr:"dragmode",val:"select",icon:L.selectbox,click:t},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(v){return g(v,"Lasso Select")},attr:"dragmode",val:"lasso",icon:L.lasso,click:t},r.drawclosedpath={name:"drawclosedpath",title:function(v){return g(v,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:L.drawclosedpath,click:t},r.drawopenpath={name:"drawopenpath",title:function(v){return g(v,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:L.drawopenpath,click:t},r.drawline={name:"drawline",title:function(v){return g(v,"Draw line")},attr:"dragmode",val:"drawline",icon:L.drawline,click:t},r.drawrect={name:"drawrect",title:function(v){return g(v,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:L.drawrect,click:t},r.drawcircle={name:"drawcircle",title:function(v){return g(v,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:L.drawcircle,click:t},r.eraseshape={name:"eraseshape",title:function(v){return g(v,"Erase active shape")},icon:L.eraseshape,click:M},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(v){return g(v,"Zoom in")},attr:"zoom",val:"in",icon:L.zoom_plus,click:t},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(v){return g(v,"Zoom out")},attr:"zoom",val:"out",icon:L.zoom_minus,click:t},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(v){return g(v,"Autoscale")},attr:"zoom",val:"auto",icon:L.autoscale,click:t},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(v){return g(v,"Reset axes")},attr:"zoom",val:"reset",icon:L.home,click:t},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(v){return g(v,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:L.tooltip_basic,gravity:"ne",click:t},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(v){return g(v,"Compare data on hover")},attr:"hovermode",val:function(v){return v._fullLayout._isHoriz?"y":"x"},icon:L.tooltip_compare,gravity:"ne",click:t};function t(v,m){var b=m.currentTarget,E=b.getAttribute("data-attr"),p=b.getAttribute("data-val")||!0,S=v._fullLayout,w={},i=o.list(v,null,!0),C=S._cartesianSpikesEnabled,x,k;if(E==="zoom"){var I=p==="in"?.5:2,B=(1+I)/2,_=(1-I)/2,z;for(k=0;k<i.length;k++)if(x=i[k],!x.fixedrange)if(z=x._name,p==="auto")w[z+".autorange"]=!0;else if(p==="reset")x._rangeInitial0===void 0&&x._rangeInitial1===void 0?w[z+".autorange"]=!0:x._rangeInitial0===void 0?(w[z+".autorange"]=x._autorangeInitial,w[z+".range"]=[null,x._rangeInitial1]):x._rangeInitial1===void 0?(w[z+".range"]=[x._rangeInitial0,null],w[z+".autorange"]=x._autorangeInitial):w[z+".range"]=[x._rangeInitial0,x._rangeInitial1],x._showSpikeInitial!==void 0&&(w[z+".showspikes"]=x._showSpikeInitial,C==="on"&&!x._showSpikeInitial&&(C="off"));else{var O=[x.r2l(x.range[0]),x.r2l(x.range[1])],F=[B*O[0]+_*O[1],B*O[1]+_*O[0]];w[z+".range[0]"]=x.l2r(F[0]),w[z+".range[1]"]=x.l2r(F[1])}}else E==="hovermode"&&(p==="x"||p==="y")&&(p=S._isHoriz?"y":"x",b.setAttribute("data-val",p)),w[E]=p;S._cartesianSpikesEnabled=C,A.call("_guiRelayout",v,w)}r.zoom3d={name:"zoom3d",_cat:"zoom",title:function(v){return g(v,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:L.zoombox,click:s},r.pan3d={name:"pan3d",_cat:"pan",title:function(v){return g(v,"Pan")},attr:"scene.dragmode",val:"pan",icon:L.pan,click:s},r.orbitRotation={name:"orbitRotation",title:function(v){return g(v,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:L["3d_rotate"],click:s},r.tableRotation={name:"tableRotation",title:function(v){return g(v,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:L["z-axis"],click:s};function s(v,m){for(var b=m.currentTarget,E=b.getAttribute("data-attr"),p=b.getAttribute("data-val")||!0,S=v._fullLayout._subplots.gl3d||[],w={},i=E.split("."),C=0;C<S.length;C++)w[S[C]+"."+i[1]]=p;var x=p==="pan"?p:"zoom";w.dragmode=x,A.call("_guiRelayout",v,w)}r.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(v){return g(v,"Reset camera to default")},attr:"resetDefault",icon:L.home,click:a},r.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(v){return g(v,"Reset camera to last save")},attr:"resetLastSave",icon:L.movie,click:a};function a(v,m){for(var b=m.currentTarget,E=b.getAttribute("data-attr"),p=E==="resetLastSave",S=E==="resetDefault",w=v._fullLayout,i=w._subplots.gl3d||[],C={},x=0;x<i.length;x++){var k=i[x],I=k+".camera",B=k+".aspectratio",_=k+".aspectmode",z=w[k]._scene,O;p?(C[I+".up"]=z.viewInitial.up,C[I+".eye"]=z.viewInitial.eye,C[I+".center"]=z.viewInitial.center,O=!0):S&&(C[I+".up"]=null,C[I+".eye"]=null,C[I+".center"]=null,O=!0),O&&(C[B+".x"]=z.viewInitial.aspectratio.x,C[B+".y"]=z.viewInitial.aspectratio.y,C[B+".z"]=z.viewInitial.aspectratio.z,C[_]=z.viewInitial.aspectmode)}A.call("_guiRelayout",v,C)}r.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(v){return g(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:u};function c(v,m){var b=m.currentTarget,E=b._previousVal,p=v._fullLayout,S=p._subplots.gl3d||[],w=["xaxis","yaxis","zaxis"],i={},C={};if(E)C=E,b._previousVal=null;else{for(var x=0;x<S.length;x++){var k=S[x],I=p[k],B=k+".hovermode";i[B]=I.hovermode,C[B]=!1;for(var _=0;_<3;_++){var z=w[_],O=k+"."+z+".showspikes";C[O]=!1,i[O]=I[z].showspikes}}b._previousVal=i}return C}function u(v,m){var b=c(v,m);A.call("_guiRelayout",v,b)}r.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(v){return g(v,"Zoom in")},attr:"zoom",val:"in",icon:L.zoom_plus,click:l},r.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(v){return g(v,"Zoom out")},attr:"zoom",val:"out",icon:L.zoom_minus,click:l},r.resetGeo={name:"resetGeo",_cat:"reset",title:function(v){return g(v,"Reset")},attr:"reset",val:null,icon:L.autoscale,click:l},r.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(v){return g(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:h};function l(v,m){for(var b=m.currentTarget,E=b.getAttribute("data-attr"),p=b.getAttribute("data-val")||!0,S=v._fullLayout,w=S._subplots.geo||[],i=0;i<w.length;i++){var C=w[i],x=S[C];if(E==="zoom"){var k=x.projection.scale,I=p==="in"?2*k:.5*k;A.call("_guiRelayout",v,C+".projection.scale",I)}}E==="reset"&&n(v,"geo")}r.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(v){return g(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:h},r.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(v){return g(v,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:L.tooltip_basic,gravity:"ne",click:h};function y(v){var m=v._fullLayout;return m.hovermode?!1:m._has("cartesian")?m._isHoriz?"y":"x":"closest"}function h(v){var m=y(v);A.call("_guiRelayout",v,"hovermode",m)}r.resetViewSankey={name:"resetSankeyGroup",title:function(v){return g(v,"Reset view")},icon:L.home,click:function(v){for(var m={"node.groups":[],"node.x":[],"node.y":[]},b=0;b<v._fullData.length;b++){var E=v._fullData[b]._viewInitial;m["node.groups"].push(E.node.groups.slice()),m["node.x"].push(E.node.x.slice()),m["node.y"].push(E.node.y.slice())}A.call("restyle",v,m)}},r.toggleHover={name:"toggleHover",title:function(v){return g(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:function(v,m){var b=c(v,m);b.hovermode=y(v),A.call("_guiRelayout",v,b)}},r.resetViews={name:"resetViews",title:function(v){return g(v,"Reset views")},icon:L.home,click:function(v,m){var b=m.currentTarget;b.setAttribute("data-attr","zoom"),b.setAttribute("data-val","reset"),t(v,m),b.setAttribute("data-attr","resetLastSave"),a(v,m),n(v,"geo"),n(v,"mapbox")}},r.toggleSpikelines={name:"toggleSpikelines",title:function(v){return g(v,"Toggle Spike Lines")},icon:L.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(v){var m=v._fullLayout,b=m._cartesianSpikesEnabled;m._cartesianSpikesEnabled=b==="on"?"off":"on",A.call("_guiRelayout",v,T(v))}};function T(v){for(var m=v._fullLayout,b=m._cartesianSpikesEnabled==="on",E=o.list(v,null,!0),p={},S=0;S<E.length;S++){var w=E[S];p[w._name+".showspikes"]=b?!0:w._showSpikeInitial}return p}r.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(v){return g(v,"Reset view")},attr:"reset",icon:L.home,click:function(v){n(v,"mapbox")}},r.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(v){return g(v,"Zoom in")},attr:"zoom",val:"in",icon:L.zoom_plus,click:f},r.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(v){return g(v,"Zoom out")},attr:"zoom",val:"out",icon:L.zoom_minus,click:f};function f(v,m){for(var b=m.currentTarget,E=b.getAttribute("data-val"),p=v._fullLayout,S=p._subplots.mapbox||[],w=1.05,i={},C=0;C<S.length;C++){var x=S[C],k=p[x].zoom,I=E==="in"?w*k:k/w;i[x+".zoom"]=I}A.call("_guiRelayout",v,i)}function n(v,m){for(var b=v._fullLayout,E=b._subplots[m]||[],p={},S=0;S<E.length;S++)for(var w=E[S],i=b[w]._subplot,C=i.viewInitial,x=Object.keys(C),k=0;k<x.length;k++){var I=x[k];p[w+"."+I]=C[I]}A.call("_guiRelayout",v,p)}},76052:function(te,X,e){var A=e(44248),P=Object.keys(A),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],L=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),M=[],d=function(g){if(L.indexOf(g._cat||g.name)===-1){var r=g.name,t=(g._cat||g.name).toLowerCase();M.indexOf(r)===-1&&M.push(r),M.indexOf(t)===-1&&M.push(t)}};P.forEach(function(g){d(A[g])}),M.sort(),te.exports={DRAW_MODES:o,backButtons:L,foreButtons:M}},90824:function(te,X,e){var A=e(3400),P=e(76308),o=e(31780),L=e(66540);te.exports=function(d,g){var r=d.modebar||{},t=o.newContainer(g,"modebar");function s(c,u){return A.coerce(r,t,L,c,u)}s("orientation"),s("bgcolor",P.addOpacity(g.paper_bgcolor,.5));var a=P.contrast(P.rgb(g.modebar.bgcolor));s("color",P.addOpacity(a,.3)),s("activecolor",P.addOpacity(a,.7)),s("uirevision",g.uirevision),s("add"),s("remove")}},45460:function(te,X,e){te.exports={moduleType:"component",name:"modebar",layoutAttributes:e(66540),supplyLayoutDefaults:e(90824),manage:e(18816)}},18816:function(te,X,e){var A=e(79811),P=e(43028),o=e(24040),L=e(10624).isUnifiedHover,M=e(66400),d=e(44248),g=e(76052).DRAW_MODES,r=e(3400).extendDeep;te.exports=function(h){var T=h._fullLayout,f=h._context,n=T._modeBar;if(!f.displayModeBar&&!f.watermark){n&&(n.destroy(),delete T._modeBar);return}if(!Array.isArray(f.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(f.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var v=f.modeBarButtons,m;Array.isArray(v)&&v.length?m=l(v):!f.displayModeBar&&f.watermark?m=[]:m=t(h),n?n.update(h,m):T._modeBar=M(h,m)};function t(y){var h=y._fullLayout,T=y._fullData,f=y._context;function n(K,Y){if(typeof Y=="string"){if(Y.toLowerCase()===K.toLowerCase())return!0}else{var ie=Y.name,ne=Y._cat||Y.name;if(ie===K||ne===K.toLowerCase())return!0}return!1}var v=h.modebar.add;typeof v=="string"&&(v=[v]);var m=h.modebar.remove;typeof m=="string"&&(m=[m]);var b=f.modeBarButtonsToAdd.concat(v.filter(function(K){for(var Y=0;Y<f.modeBarButtonsToRemove.length;Y++)if(n(K,f.modeBarButtonsToRemove[Y]))return!1;return!0})),E=f.modeBarButtonsToRemove.concat(m.filter(function(K){for(var Y=0;Y<f.modeBarButtonsToAdd.length;Y++)if(n(K,f.modeBarButtonsToAdd[Y]))return!1;return!0})),p=h._has("cartesian"),S=h._has("gl3d"),w=h._has("geo"),i=h._has("pie"),C=h._has("funnelarea"),x=h._has("gl2d"),k=h._has("ternary"),I=h._has("mapbox"),B=h._has("polar"),_=h._has("smith"),z=h._has("sankey"),O=s(h),F=L(h.hovermode),N=[];function V(K){if(K.length){for(var Y=[],ie=0;ie<K.length;ie++){for(var ne=K[ie],le=d[ne],de=le.name.toLowerCase(),we=(le._cat||le.name).toLowerCase(),me=!1,Le=0;Le<E.length;Le++){var ve=E[Le].toLowerCase();if(ve===de||ve===we){me=!0;break}}me||Y.push(d[ne])}N.push(Y)}}var j=["toImage"];f.showEditInChartStudio?j.push("editInChartStudio"):f.showSendToCloud&&j.push("sendDataToCloud"),V(j);var $=[],q=[],oe=[],Z=[];(p||x||i||C||k)+w+S+I+B+_>1?(q=["toggleHover"],oe=["resetViews"]):w?($=["zoomInGeo","zoomOutGeo"],q=["hoverClosestGeo"],oe=["resetGeo"]):S?(q=["hoverClosest3d"],oe=["resetCameraDefault3d","resetCameraLastSave3d"]):I?($=["zoomInMapbox","zoomOutMapbox"],q=["toggleHover"],oe=["resetViewMapbox"]):x?q=["hoverClosestGl2d"]:i?q=["hoverClosestPie"]:z?(q=["hoverClosestCartesian","hoverCompareCartesian"],oe=["resetViewSankey"]):q=["toggleHover"],p&&(q=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(c(T)||F)&&(q=[]),(p||x)&&!O&&($=["zoomIn2d","zoomOut2d","autoScale2d"],oe[0]!=="resetViews"&&(oe=["resetScale2d"])),S?Z=["zoom3d","pan3d","orbitRotation","tableRotation"]:(p||x)&&!O||k?Z=["zoom2d","pan2d"]:I||w?Z=["pan2d"]:B&&(Z=["zoom2d"]),a(T)&&Z.push("select2d","lasso2d");var G=[],re=function(K){G.indexOf(K)===-1&&q.indexOf(K)!==-1&&G.push(K)};if(Array.isArray(b)){for(var H=[],J=0;J<b.length;J++){var ae=b[J];typeof ae=="string"?(ae=ae.toLowerCase(),g.indexOf(ae)!==-1?(h._has("mapbox")||h._has("cartesian"))&&Z.push(ae):ae==="togglespikelines"?re("toggleSpikelines"):ae==="togglehover"?re("toggleHover"):ae==="hovercompare"?re("hoverCompareCartesian"):ae==="hoverclosest"?(re("hoverClosestCartesian"),re("hoverClosestGeo"),re("hoverClosest3d"),re("hoverClosestGl2d"),re("hoverClosestPie")):ae==="v1hovermode"&&(re("toggleHover"),re("hoverClosestCartesian"),re("hoverCompareCartesian"),re("hoverClosestGeo"),re("hoverClosest3d"),re("hoverClosestGl2d"),re("hoverClosestPie"))):H.push(ae)}b=H}return V(Z),V($.concat(oe)),V(G),u(N,b)}function s(y){for(var h=A.list({_fullLayout:y},null,!0),T=0;T<h.length;T++)if(!h[T].fixedrange)return!1;return!0}function a(y){for(var h=!1,T=0;T<y.length&&!h;T++){var f=y[T];!f._module||!f._module.selectPoints||(o.traceIs(f,"scatter-like")?(P.hasMarkers(f)||P.hasText(f))&&(h=!0):o.traceIs(f,"box-violin")?(f.boxpoints==="all"||f.points==="all")&&(h=!0):h=!0)}return h}function c(y){for(var h=0;h<y.length;h++)if(!o.traceIs(y[h],"noHover"))return!1;return!0}function u(y,h){if(h.length)if(Array.isArray(h[0]))for(var T=0;T<h.length;T++)y.push(h[T]);else y.push(h);return y}function l(y){for(var h=r([],y),T=0;T<h.length;T++)for(var f=h[T],n=0;n<f.length;n++){var v=f[n];if(typeof v=="string")if(d[v]!==void 0)h[T][n]=d[v];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return h}},66400:function(te,X,e){var A=e(33428),P=e(38248),o=e(3400),L=e(9224),M=e(25788).version,d=new DOMParser;function g(a){this.container=a.container,this.element=document.createElement("div"),this.update(a.graphInfo,a.buttons),this.container.appendChild(this.element)}var r=g.prototype;r.update=function(a,c){this.graphInfo=a;var u=this.graphInfo._context,l=this.graphInfo._fullLayout,y="modebar-"+l._uid;this.element.setAttribute("id",y),this._uid=y,this.element.className="modebar",u.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),l.modebar.orientation==="v"&&(this.element.className+=" vertical",c=c.reverse());var h=l.modebar,T=u.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(y),o.addRelatedStyleRule(y,T+"#"+y+" .modebar-group","background-color: "+h.bgcolor),o.addRelatedStyleRule(y,"#"+y+" .modebar-btn .icon path","fill: "+h.color),o.addRelatedStyleRule(y,"#"+y+" .modebar-btn:hover .icon path","fill: "+h.activecolor),o.addRelatedStyleRule(y,"#"+y+" .modebar-btn.active .icon path","fill: "+h.activecolor);var f=!this.hasButtons(c),n=this.hasLogo!==u.displaylogo,v=this.locale!==u.locale;if(this.locale=u.locale,(f||n||v)&&(this.removeAllButtons(),this.updateButtons(c),u.watermark||u.displaylogo)){var m=this.getLogo();u.watermark&&(m.className=m.className+" watermark"),l.modebar.orientation==="v"?this.element.insertBefore(m,this.element.childNodes[0]):this.element.appendChild(m),this.hasLogo=!0}this.updateActiveButton()},r.updateButtons=function(a){var c=this;this.buttons=a,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(u){var l=c.createGroup();u.forEach(function(y){var h=y.name;if(!h)throw new Error("must provide button 'name' in button config");if(c.buttonsNames.indexOf(h)!==-1)throw new Error("button name '"+h+"' is taken");c.buttonsNames.push(h);var T=c.createButton(y);c.buttonElements.push(T),l.appendChild(T)}),c.element.appendChild(l)})},r.createGroup=function(){var a=document.createElement("div");return a.className="modebar-group",a},r.createButton=function(a){var c=this,u=document.createElement("a");u.setAttribute("rel","tooltip"),u.className="modebar-btn";var l=a.title;l===void 0?l=a.name:typeof l=="function"&&(l=l(this.graphInfo)),(l||l===0)&&u.setAttribute("data-title",l),a.attr!==void 0&&u.setAttribute("data-attr",a.attr);var y=a.val;y!==void 0&&(typeof y=="function"&&(y=y(this.graphInfo)),u.setAttribute("data-val",y));var h=a.click;if(typeof h!="function")throw new Error("must provide button 'click' function in button config");u.addEventListener("click",function(f){a.click(c.graphInfo,f),c.updateActiveButton(f.currentTarget)}),u.setAttribute("data-toggle",a.toggle||!1),a.toggle&&A.select(u).classed("active",!0);var T=a.icon;return typeof T=="function"?u.appendChild(T()):u.appendChild(this.createIcon(T||L.question)),u.setAttribute("data-gravity",a.gravity||"n"),u},r.createIcon=function(a){var c=P(a.height)?Number(a.height):a.ascent-a.descent,u="http://www.w3.org/2000/svg",l;if(a.path){l=document.createElementNS(u,"svg"),l.setAttribute("viewBox",[0,0,a.width,c].join(" ")),l.setAttribute("class","icon");var y=document.createElementNS(u,"path");y.setAttribute("d",a.path),a.transform?y.setAttribute("transform",a.transform):a.ascent!==void 0&&y.setAttribute("transform","matrix(1 0 0 -1 0 "+a.ascent+")"),l.appendChild(y)}if(a.svg){var h=d.parseFromString(a.svg,"application/xml");l=h.childNodes[0]}return l.setAttribute("height","1em"),l.setAttribute("width","1em"),l},r.updateActiveButton=function(a){var c=this.graphInfo._fullLayout,u=a!==void 0?a.getAttribute("data-attr"):null;this.buttonElements.forEach(function(l){var y=l.getAttribute("data-val")||!0,h=l.getAttribute("data-attr"),T=l.getAttribute("data-toggle")==="true",f=A.select(l);if(T)h===u&&f.classed("active",!f.classed("active"));else{var n=h===null?h:o.nestedProperty(c,h).get();f.classed("active",n===y)}})},r.hasButtons=function(a){var c=this.buttons;if(!c||a.length!==c.length)return!1;for(var u=0;u<a.length;++u){if(a[u].length!==c[u].length)return!1;for(var l=0;l<a[u].length;l++)if(a[u][l].name!==c[u][l].name)return!1}return!0};function t(a){return a+" (v"+M+")"}r.getLogo=function(){var a=this.createGroup(),c=document.createElement("a");return c.href="https://plotly.com/",c.target="_blank",c.setAttribute("data-title",t(o._(this.graphInfo,"Produced with Plotly.js"))),c.className="modebar-btn plotlyjsicon modebar-btn--logo",c.appendChild(this.createIcon(L.newplotlylogo)),a.appendChild(c),a},r.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},r.destroy=function(){o.removeElement(this.container.querySelector(".modebar")),o.deleteRelatedStyleRule(this._uid)};function s(a,c){var u=a._fullLayout,l=new g({graphInfo:a,container:u._modebardiv.node(),buttons:c});return u._privateplot&&A.select(l.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),l}te.exports=s},26680:function(te,X,e){var A=e(25376),P=e(22548),o=e(31780).templatedArray,L=o("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"});te.exports={visible:{valType:"boolean",editType:"plot"},buttons:L,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:A({editType:"plot"}),bgcolor:{valType:"color",dflt:P.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:P.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},85984:function(te){te.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},22148:function(te,X,e){var A=e(3400),P=e(76308),o=e(31780),L=e(51272),M=e(26680),d=e(85984);te.exports=function(s,a,c,u,l){var y=s.rangeselector||{},h=o.newContainer(a,"rangeselector");function T(b,E){return A.coerce(y,h,M,b,E)}var f=L(y,h,{name:"buttons",handleItemDefaults:g,calendar:l}),n=T("visible",f.length>0);if(n){var v=r(a,c,u);T("x",v[0]),T("y",v[1]),A.noneOrAll(s,a,["x","y"]),T("xanchor"),T("yanchor"),A.coerceFont(T,"font",c.font);var m=T("bgcolor");T("activecolor",P.contrast(m,d.lightAmount,d.darkAmount)),T("bordercolor"),T("borderwidth")}};function g(t,s,a,c){var u=c.calendar;function l(T,f){return A.coerce(t,s,M.buttons,T,f)}var y=l("visible");if(y){var h=l("step");h!=="all"&&(u&&u!=="gregorian"&&(h==="month"||h==="year")?s.stepmode="backward":l("stepmode"),l("count")),l("label")}}function r(t,s,a){for(var c=a.filter(function(h){return s[h].anchor===t._id}),u=0,l=0;l<c.length;l++){var y=s[c[l]].domain;y&&(u=Math.max(y[1],u))}return[t.domain[0],u+d.yPad]}},50216:function(te,X,e){var A=e(33428),P=e(24040),o=e(7316),L=e(76308),M=e(43616),d=e(3400),g=d.strTranslate,r=e(72736),t=e(79811),s=e(84284),a=s.LINE_SPACING,c=s.FROM_TL,u=s.FROM_BR,l=e(85984),y=e(48040);te.exports=function(S){var w=S._fullLayout,i=w._infolayer.selectAll(".rangeselector").data(h(S),T);i.enter().append("g").classed("rangeselector",!0),i.exit().remove(),i.style({cursor:"pointer","pointer-events":"all"}),i.each(function(C){var x=A.select(this),k=C,I=k.rangeselector,B=x.selectAll("g.button").data(d.filterVisible(I.buttons));B.enter().append("g").classed("button",!0),B.exit().remove(),B.each(function(_){var z=A.select(this),O=y(k,_);_._isActive=f(k,_,O),z.call(n,I,_),z.call(m,I,_,S),z.on("click",function(){S._dragged||P.call("_guiRelayout",S,O)}),z.on("mouseover",function(){_._isHovered=!0,z.call(n,I,_)}),z.on("mouseout",function(){_._isHovered=!1,z.call(n,I,_)})}),E(S,B,I,k._name,x)})};function h(p){for(var S=t.list(p,"x",!0),w=[],i=0;i<S.length;i++){var C=S[i];C.rangeselector&&C.rangeselector.visible&&w.push(C)}return w}function T(p){return p._id}function f(p,S,w){if(S.step==="all")return p.autorange===!0;var i=Object.keys(w);return p.range[0]===w[i[0]]&&p.range[1]===w[i[1]]}function n(p,S,w){var i=d.ensureSingle(p,"rect","selector-rect",function(C){C.attr("shape-rendering","crispEdges")});i.attr({rx:l.rx,ry:l.ry}),i.call(L.stroke,S.bordercolor).call(L.fill,v(S,w)).style("stroke-width",S.borderwidth+"px")}function v(p,S){return S._isActive||S._isHovered?p.activecolor:p.bgcolor}function m(p,S,w,i){function C(k){r.convertToTspans(k,i)}var x=d.ensureSingle(p,"text","selector-text",function(k){k.attr("text-anchor","middle")});x.call(M.font,S.font).text(b(w,i._fullLayout._meta)).call(C)}function b(p,S){return p.label?S?d.templateString(p.label,S):p.label:p.step==="all"?"all":p.count+p.step.charAt(0)}function E(p,S,w,i,C){var x=0,k=0,I=w.borderwidth;S.each(function(){var N=A.select(this),V=N.select(".selector-text"),j=w.font.size*a,$=Math.max(j*r.lineCount(V),16)+3;k=Math.max(k,$)}),S.each(function(){var N=A.select(this),V=N.select(".selector-rect"),j=N.select(".selector-text"),$=j.node()&&M.bBox(j.node()).width,q=w.font.size*a,oe=r.lineCount(j),Z=Math.max($+10,l.minButtonWidth);N.attr("transform",g(I+x,I)),V.attr({x:0,y:0,width:Z,height:k}),r.positionText(j,Z/2,k/2-(oe-1)*q/2+3),x+=Z+5});var B=p._fullLayout._size,_=B.l+B.w*w.x,z=B.t+B.h*(1-w.y),O="left";d.isRightAnchor(w)&&(_-=x,O="right"),d.isCenterAnchor(w)&&(_-=x/2,O="center");var F="top";d.isBottomAnchor(w)&&(z-=k,F="bottom"),d.isMiddleAnchor(w)&&(z-=k/2,F="middle"),x=Math.ceil(x),k=Math.ceil(k),_=Math.round(_),z=Math.round(z),o.autoMargin(p,i+"-range-selector",{x:w.x,y:w.y,l:x*c[O],r:x*u[O],b:k*u[F],t:k*c[F]}),C.attr("transform",g(_,z))}},48040:function(te,X,e){var A=e(73220),P=e(3400).titleCase;te.exports=function(M,d){var g=M._name,r={};if(d.step==="all")r[g+".autorange"]=!0;else{var t=o(M,d);r[g+".range[0]"]=t[0],r[g+".range[1]"]=t[1]}return r};function o(L,M){var d=L.range,g=new Date(L.r2l(d[1])),r=M.step,t=A["utc"+P(r)],s=M.count,a;switch(M.stepmode){case"backward":a=L.l2r(+t.offset(g,-s));break;case"todate":var c=t.offset(g,-s);a=L.l2r(+t.ceil(c));break}var u=d[1];return[a,u]}},41152:function(te,X,e){te.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e(26680)}}},layoutAttributes:e(26680),handleDefaults:e(22148),draw:e(50216)}},11200:function(te,X,e){var A=e(22548);te.exports={bgcolor:{valType:"color",dflt:A.background,editType:"plot"},bordercolor:{valType:"color",dflt:A.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"}},26652:function(te,X,e){var A=e(79811).list,P=e(19280).getAutoRange,o=e(74636);te.exports=function(M){for(var d=A(M,"x",!0),g=0;g<d.length;g++){var r=d[g],t=r[o.name];t&&t.visible&&t.autorange&&(t._input.autorange=!0,t._input.range=t.range=P(M,r))}}},74636:function(te){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-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},94040:function(te,X,e){var A=e(3400),P=e(31780),o=e(79811),L=e(11200),M=e(10936);te.exports=function(g,r,t){var s=g[t],a=r[t];if(!(s.rangeslider||r._requestRangeslider[a._id]))return;A.isPlainObject(s.rangeslider)||(s.rangeslider={});var c=s.rangeslider,u=P.newContainer(a,"rangeslider");function l(i,C){return A.coerce(c,u,L,i,C)}var y,h;function T(i,C){return A.coerce(y,h,M,i,C)}var f=l("visible");if(f){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(c.range)),l("range");var n=r._subplots;if(n)for(var v=n.cartesian.filter(function(i){return i.substr(0,i.indexOf("y"))===o.name2id(t)}).map(function(i){return i.substr(i.indexOf("y"),i.length)}),m=A.simpleMap(v,o.id2name),b=0;b<m.length;b++){var E=m[b];y=c[E]||{},h=P.newContainer(u,E,"yaxis");var p=r[E],S;y.range&&p.isValidRange(y.range)&&(S="fixed");var w=T("rangemode",S);w!=="match"&&T("range",p.range.slice())}u._input=c}}},20060:function(te,X,e){var A=e(33428),P=e(24040),o=e(7316),L=e(3400),M=L.strTranslate,d=e(43616),g=e(76308),r=e(81668),t=e(57952),s=e(79811),a=e(86476),c=e(93972),u=e(74636);te.exports=function(S){for(var w=S._fullLayout,i=w._rangeSliderData,C=0;C<i.length;C++){var x=i[C][u.name];x._clipId=x._id+"-"+w._uid}function k(B){return B._name}var I=w._infolayer.selectAll("g."+u.containerClassName).data(i,k);I.exit().each(function(B){var _=B[u.name];w._topdefs.select("#"+_._clipId).remove()}).remove(),i.length!==0&&(I.enter().append("g").classed(u.containerClassName,!0).attr("pointer-events","all"),I.each(function(B){var _=A.select(this),z=B[u.name],O=w[s.id2name(B.anchor)],F=z[s.id2name(B.anchor)];if(z.range){var N=L.simpleMap(z.range,B.r2l),V=L.simpleMap(B.range,B.r2l),j;V[0]<V[1]?j=[Math.min(N[0],V[0]),Math.max(N[1],V[1])]:j=[Math.max(N[0],V[0]),Math.min(N[1],V[1])],z.range=z._input.range=L.simpleMap(j,B.l2r)}B.cleanRange("rangeslider.range");var $=w._size,q=B.domain;z._width=$.w*(q[1]-q[0]);var oe=Math.round($.l+$.w*q[0]),Z=Math.round($.t+$.h*(1-B._counterDomainMin)+(B.side==="bottom"?B._depth:0)+z._offsetShift+u.extraPad);_.attr("transform",M(oe,Z)),z._rl=L.simpleMap(z.range,B.r2l);var G=z._rl[0],re=z._rl[1],H=re-G;if(z.p2d=function(me){return me/z._width*H+G},z.d2p=function(me){return(me-G)/H*z._width},B.rangebreaks){var J=B.locateBreaks(G,re);if(J.length){var ae,K,Y=0;for(ae=0;ae<J.length;ae++)K=J[ae],Y+=K.max-K.min;var ie=z._width/(re-G-Y),ne=[-ie*G];for(ae=0;ae<J.length;ae++)K=J[ae],ne.push(ne[ne.length-1]-ie*(K.max-K.min));for(z.d2p=function(me){for(var Le=ne[0],ve=0;ve<J.length;ve++){var Ae=J[ve];if(me>=Ae.max)Le=ne[ve+1];else if(me<Ae.min)break}return Le+ie*me},ae=0;ae<J.length;ae++)K=J[ae],K.pmin=z.d2p(K.min),K.pmax=z.d2p(K.max);z.p2d=function(me){for(var Le=ne[0],ve=0;ve<J.length;ve++){var Ae=J[ve];if(me>=Ae.pmax)Le=ne[ve+1];else if(me<Ae.pmin)break}return(me-Le)/ie}}}if(F.rangemode!=="match"){var le=O.r2l(F.range[0]),de=O.r2l(F.range[1]),we=de-le;z.d2pOppAxis=function(me){return(me-le)/we*z._height}}_.call(f,S,B,z).call(n,S,B,z).call(v,S,B,z).call(b,S,B,z,F).call(E,S,B,z).call(p,S,B,z),y(_,S,B,z),T(_,S,B,z,O,F),B.side==="bottom"&&r.draw(S,B._id+"title",{propContainer:B,propName:B._name+".title",placeholder:w._dfltTitle.x,attributes:{x:B._offset+B._length/2,y:Z+z._height+z._offsetShift+10+1.5*B.title.font.size,"text-anchor":"middle"}})}))};function l(S){return typeof S.clientX=="number"?S.clientX:S.touches&&S.touches.length>0?S.touches[0].clientX:0}function y(S,w,i,C){if(w._context.staticPlot)return;var x=S.select("rect."+u.slideBoxClassName).node(),k=S.select("rect."+u.grabAreaMinClassName).node(),I=S.select("rect."+u.grabAreaMaxClassName).node();function B(){var _=A.event,z=_.target,O=l(_),F=O-S.node().getBoundingClientRect().left,N=C.d2p(i._rl[0]),V=C.d2p(i._rl[1]),j=a.coverSlip();this.addEventListener("touchmove",$),this.addEventListener("touchend",q),j.addEventListener("mousemove",$),j.addEventListener("mouseup",q);function $(oe){var Z=l(oe),G=+Z-O,re,H,J;switch(z){case x:if(J="ew-resize",N+G>i._length||V+G<0)return;re=N+G,H=V+G;break;case k:if(J="col-resize",N+G>i._length)return;re=N+G,H=V;break;case I:if(J="col-resize",V+G<0)return;re=N,H=V+G;break;default:J="ew-resize",re=F,H=F+G;break}if(H<re){var ae=H;H=re,re=ae}C._pixelMin=re,C._pixelMax=H,c(A.select(j),J),h(S,w,i,C)}function q(){j.removeEventListener("mousemove",$),j.removeEventListener("mouseup",q),this.removeEventListener("touchmove",$),this.removeEventListener("touchend",q),L.removeElement(j)}}S.on("mousedown",B),S.on("touchstart",B)}function h(S,w,i,C){function x(B){return i.l2r(L.constrain(B,C._rl[0],C._rl[1]))}var k=x(C.p2d(C._pixelMin)),I=x(C.p2d(C._pixelMax));window.requestAnimationFrame(function(){P.call("_guiRelayout",w,i._name+".range",[k,I])})}function T(S,w,i,C,x,k){var I=u.handleWidth/2;function B(oe){return L.constrain(oe,0,C._width)}function _(oe){return L.constrain(oe,0,C._height)}function z(oe){return L.constrain(oe,-I,C._width+I)}var O=B(C.d2p(i._rl[0])),F=B(C.d2p(i._rl[1]));if(S.select("rect."+u.slideBoxClassName).attr("x",O).attr("width",F-O),S.select("rect."+u.maskMinClassName).attr("width",O),S.select("rect."+u.maskMaxClassName).attr("x",F).attr("width",C._width-F),k.rangemode!=="match"){var N=C._height-_(C.d2pOppAxis(x._rl[1])),V=C._height-_(C.d2pOppAxis(x._rl[0]));S.select("rect."+u.maskMinOppAxisClassName).attr("x",O).attr("height",N).attr("width",F-O),S.select("rect."+u.maskMaxOppAxisClassName).attr("x",O).attr("y",V).attr("height",C._height-V).attr("width",F-O),S.select("rect."+u.slideBoxClassName).attr("y",N).attr("height",V-N)}var j=.5,$=Math.round(z(O-I))-j,q=Math.round(z(F-I))+j;S.select("g."+u.grabberMinClassName).attr("transform",M($,j)),S.select("g."+u.grabberMaxClassName).attr("transform",M(q,j))}function f(S,w,i,C){var x=L.ensureSingle(S,"rect",u.bgClassName,function(_){_.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),k=C.borderwidth%2===0?C.borderwidth:C.borderwidth-1,I=-C._offsetShift,B=d.crispRound(w,C.borderwidth);x.attr({width:C._width+k,height:C._height+k,transform:M(I,I),"stroke-width":B}).call(g.stroke,C.bordercolor).call(g.fill,C.bgcolor)}function n(S,w,i,C){var x=w._fullLayout,k=L.ensureSingleById(x._topdefs,"clipPath",C._clipId,function(I){I.append("rect").attr({x:0,y:0})});k.select("rect").attr({width:C._width,height:C._height})}function v(S,w,i,C){var x=w.calcdata,k=S.selectAll("g."+u.rangePlotClassName).data(i._subplotsWith,L.identity);k.enter().append("g").attr("class",function(B){return u.rangePlotClassName+" "+B}).call(d.setClipUrl,C._clipId,w),k.order(),k.exit().remove();var I;k.each(function(B,_){var z=A.select(this),O=_===0,F=s.getFromId(w,B,"y"),N=F._name,V=C[N],j={data:[],layout:{xaxis:{type:i.type,domain:[0,1],range:C.range.slice(),calendar:i.calendar},width:C._width,height:C._height,margin:{t:0,b:0,l:0,r:0}},_context:w._context};i.rangebreaks&&(j.layout.xaxis.rangebreaks=i.rangebreaks),j.layout[N]={type:F.type,domain:[0,1],range:V.rangemode!=="match"?V.range.slice():F.range.slice(),calendar:F.calendar},F.rangebreaks&&(j.layout[N].rangebreaks=F.rangebreaks),o.supplyDefaults(j);var $=j._fullLayout.xaxis,q=j._fullLayout[N];$.clearCalc(),$.setScale(),q.clearCalc(),q.setScale();var oe={id:B,plotgroup:z,xaxis:$,yaxis:q,isRangePlot:!0};O?I=oe:(oe.mainplot="xy",oe.mainplotinfo=I),t.rangePlot(w,oe,m(x,B))})}function m(S,w){for(var i=[],C=0;C<S.length;C++){var x=S[C],k=x[0].trace;k.xaxis+k.yaxis===w&&i.push(x)}return i}function b(S,w,i,C,x){var k=L.ensureSingle(S,"rect",u.maskMinClassName,function(z){z.attr({x:0,y:0,"shape-rendering":"crispEdges"})});k.attr("height",C._height).call(g.fill,u.maskColor);var I=L.ensureSingle(S,"rect",u.maskMaxClassName,function(z){z.attr({y:0,"shape-rendering":"crispEdges"})});if(I.attr("height",C._height).call(g.fill,u.maskColor),x.rangemode!=="match"){var B=L.ensureSingle(S,"rect",u.maskMinOppAxisClassName,function(z){z.attr({y:0,"shape-rendering":"crispEdges"})});B.attr("width",C._width).call(g.fill,u.maskOppAxisColor);var _=L.ensureSingle(S,"rect",u.maskMaxOppAxisClassName,function(z){z.attr({y:0,"shape-rendering":"crispEdges"})});_.attr("width",C._width).style("border-top",u.maskOppBorder).call(g.fill,u.maskOppAxisColor)}}function E(S,w,i,C){if(!w._context.staticPlot){var x=L.ensureSingle(S,"rect",u.slideBoxClassName,function(k){k.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})});x.attr({height:C._height,fill:u.slideBoxFill})}}function p(S,w,i,C){var x=L.ensureSingle(S,"g",u.grabberMinClassName),k=L.ensureSingle(S,"g",u.grabberMaxClassName),I={x:0,width:u.handleWidth,rx:u.handleRadius,fill:g.background,stroke:g.defaultLine,"stroke-width":u.handleStrokeWidth,"shape-rendering":"crispEdges"},B={y:Math.round(C._height/4),height:Math.round(C._height/2)},_=L.ensureSingle(x,"rect",u.handleMinClassName,function(V){V.attr(I)});_.attr(B);var z=L.ensureSingle(k,"rect",u.handleMaxClassName,function(V){V.attr(I)});z.attr(B);var O={width:u.grabAreaWidth,x:0,y:0,fill:u.grabAreaFill,cursor:w._context.staticPlot?void 0:u.grabAreaCursor},F=L.ensureSingle(x,"rect",u.grabAreaMinClassName,function(V){V.attr(O)});F.attr("height",C._height);var N=L.ensureSingle(k,"rect",u.grabAreaMaxClassName,function(V){V.attr(O)});N.attr("height",C._height)}},97944:function(te,X,e){var A=e(79811),P=e(72736),o=e(74636),L=e(84284).LINE_SPACING,M=o.name;function d(g){var r=g&&g[M];return r&&r.visible}X.isVisible=d,X.makeData=function(g){var r=A.list({_fullLayout:g},"x",!0),t=g.margin,s=[];if(!g._has("gl2d"))for(var a=0;a<r.length;a++){var c=r[a];if(d(c)){s.push(c);var u=c[M];u._id=M+c._id,u._height=(g.height-t.b-t.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}g._rangeSliderData=s},X.autoMarginOpts=function(g,r){var t=g._fullLayout,s=r[M],a=r._id.charAt(0),c=0,u=0;if(r.side==="bottom"&&(c=r._depth,r.title.text!==t._dfltTitle[a])){u=1.5*r.title.font.size+10+s._offsetShift;var l=(r.title.text.match(P.BR_TAG_ALL)||[]).length;u+=l*r.title.font.size*L}return{x:0,y:r._counterDomainMin,l:0,r:0,t:0,b:s._height+c+Math.max(t.margin.b,u),pad:o.extraPad+s._offsetShift*2}}},49692:function(te,X,e){var A=e(3400),P=e(11200),o=e(10936),L=e(97944);te.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:A.extendFlat({},P,{yaxis:o})}}},layoutAttributes:e(11200),handleDefaults:e(94040),calcAutorange:e(26652),draw:e(20060),isVisible:L.isVisible,makeData:L.makeData,autoMarginOpts:L.autoMarginOpts}},10936:function(te){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"}},93956:function(te,X,e){var A=e(13916),P=e(52904).line,o=e(98192).u,L=e(92880).extendFlat,M=e(67824).overrideAll,d=e(31780).templatedArray;e(36208),te.exports=M(d("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:L({},A.xref,{}),yref:L({},A.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:P.color,width:L({},P.width,{min:1,dflt:1}),dash:L({},o,{dflt:"dot"})}}),"arraydraw","from-root")},83280:function(te){te.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},74224:function(te,X,e){var A=e(3400),P=e(54460),o=e(51272),L=e(93956),M=e(65152);te.exports=function(r,t){o(r,t,{name:"selections",handleItemDefaults:d});for(var s=t.selections,a=0;a<s.length;a++){var c=s[a];c&&c.path===void 0&&(c.x0===void 0||c.x1===void 0||c.y0===void 0||c.y1===void 0)&&(t.selections[a]=null)}};function d(g,r,t){function s(x,k){return A.coerce(g,r,L,x,k)}var a=s("path"),c=a?"path":"rect",u=s("type",c),l=u!=="path";l&&delete r.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var y=["x","y"],h=0;h<2;h++){var T=y[h],f={_fullLayout:t},n,v,m,b=P.coerceRef(g,r,f,T);if(n=P.getFromId(f,b),n._selectionIndices.push(r._index),m=M.rangeToShapePosition(n),v=M.shapePositionToRange(n),l){var E=T+"0",p=T+"1",S=g[E],w=g[p];g[E]=v(g[E],!0),g[p]=v(g[p],!0),P.coercePosition(r,f,s,b,E),P.coercePosition(r,f,s,b,p);var i=r[E],C=r[p];i!==void 0&&C!==void 0&&(r[E]=m(i),r[p]=m(C),g[E]=S,g[p]=w)}}l&&A.noneOrAll(g,r,["x0","x1","y0","y1"])}},23640:function(te,X,e){var A=e(9856).readPaths,P=e(55496),o=e(1936).clearOutlineControllers,L=e(76308),M=e(43616),d=e(31780).arrayEditor,g=e(65152),r=g.getPathString;te.exports={draw:t,drawOne:a,activateLastSelection:l};function t(h){var T=h._fullLayout;o(h),T._selectionLayer.selectAll("path").remove();for(var f in T._plots){var n=T._plots[f].selectionLayer;n&&n.selectAll("path").remove()}for(var v=0;v<T.selections.length;v++)a(h,v)}function s(h){return h._context.editSelection}function a(h,T){h._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+T+'"]').remove();var f=g.makeSelectionsOptionsAndPlotinfo(h,T),n=f.options,v=f.plotinfo;if(!n._input)return;m(h._fullLayout._selectionLayer);function m(b){var E=r(h,n),p={"data-index":T,"fill-rule":"evenodd",d:E},S=n.opacity,w="rgba(0,0,0,0)",i=n.line.color||L.contrast(h._fullLayout.plot_bgcolor),C=n.line.width,x=n.line.dash;C||(C=5,x="solid");var k=s(h)&&h._fullLayout._activeSelectionIndex===T;k&&(w=h._fullLayout.activeselection.fillcolor,S=h._fullLayout.activeselection.opacity);for(var I=[],B=1;B>=0;B--){var _=b.append("path").attr(p).style("opacity",B?.1:S).call(L.stroke,i).call(L.fill,w).call(M.dashLine,B?"solid":x,B?4+C:C);if(c(_,h,n),k){var z=d(h.layout,"selections",n);_.style({cursor:"move"});var O={element:_.node(),plotinfo:v,gd:h,editHelpers:z,isActiveSelection:!0},F=A(E,h);P(F,_,O)}else _.style("pointer-events",B?"all":"none");I[B]=_}var N=I[0],V=I[1];V.node().addEventListener("click",function(){return u(h,N)})}}function c(h,T,f){var n=f.xref+f.yref;M.setClipUrl(h,"clip"+T._fullLayout._uid+n,T)}function u(h,T){if(s(h)){var f=T.node(),n=+f.getAttribute("data-index");if(n>=0){if(n===h._fullLayout._activeSelectionIndex){y(h);return}h._fullLayout._activeSelectionIndex=n,h._fullLayout._deactivateSelection=y,t(h)}}}function l(h){if(s(h)){var T=h._fullLayout.selections.length-1;h._fullLayout._activeSelectionIndex=T,h._fullLayout._deactivateSelection=y,t(h)}}function y(h){if(s(h)){var T=h._fullLayout._activeSelectionIndex;T>=0&&(o(h),delete h._fullLayout._activeSelectionIndex,t(h))}}},34200:function(te,X,e){var A=e(98192).u,P=e(92880).extendFlat;te.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:P({},A,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(te){te.exports=function(e,A,P){P("newselection.mode");var o=P("newselection.line.width");o&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}},5968:function(te,X,e){var A=e(72760),P=A.selectMode,o=e(1936),L=o.clearOutline,M=e(9856),d=M.readPaths,g=M.writePaths,r=M.fixDatesForPaths;te.exports=function(s,a){if(s.length){var c=s[0][0];if(c){var u=c.getAttribute("d"),l=a.gd,y=l._fullLayout.newselection,h=a.plotinfo,T=h.xaxis,f=h.yaxis,n=a.isActiveSelection,v=a.dragmode,m=(l.layout||{}).selections||[];if(!P(v)&&n!==void 0){var b=l._fullLayout._activeSelectionIndex;if(b<m.length)switch(l._fullLayout.selections[b].type){case"rect":v="select";break;case"path":v="lasso";break}}var E=d(u,l,h,n),p={xref:T._id,yref:f._id,opacity:y.opacity,line:{color:y.line.color,width:y.line.width,dash:y.line.dash}},S;E.length===1&&(S=E[0]),S&&S.length===5&&v==="select"?(p.type="rect",p.x0=S[0][1],p.y0=S[0][2],p.x1=S[2][1],p.y1=S[2][2]):(p.type="path",T&&f&&r(E,T,f),p.path=g(E),S=null),L(l);for(var w=a.editHelpers,i=(w||{}).modifyItem,C=[],x=0;x<m.length;x++){var k=l._fullLayout.selections[x];if(!k){C[x]=k;continue}if(C[x]=k._input,n!==void 0&&x===l._fullLayout._activeSelectionIndex){var I=p;switch(k.type){case"rect":i("x0",I.x0),i("x1",I.x1),i("y0",I.y0),i("y1",I.y1);break;case"path":i("path",I.path);break}}}return n===void 0?(C.push(p),C):w?w.getUpdateObj():{}}}}},5840:function(te,X,e){var A=e(3400).strTranslate;function P(d,g){switch(d.type){case"log":return d.p2d(g);case"date":return d.p2r(g,0,d.calendar);default:return d.p2r(g)}}function o(d,g){switch(d.type){case"log":return d.d2p(g);case"date":return d.r2p(g,0,d.calendar);default:return d.r2p(g)}}function L(d){var g=d._id.charAt(0)==="y"?1:0;return function(r){return P(d,r[g])}}function M(d){return A(d.xaxis._offset,d.yaxis._offset)}te.exports={p2r:P,r2p:o,axValue:L,getTransform:M}},22676:function(te,X,e){var A=e(23640),P=e(43156);te.exports={moduleType:"component",name:"selections",layoutAttributes:e(93956),supplyLayoutDefaults:e(74224),supplyDrawNewSelectionDefaults:e(81004),includeBasePlot:e(36632)("selections"),draw:A.draw,drawOne:A.drawOne,reselect:P.reselect,prepSelect:P.prepSelect,clearOutline:P.clearOutline,clearSelectionsCache:P.clearSelectionsCache,selectOnClick:P.selectOnClick}},43156:function(te,X,e){var A=e(14756),P=e(61456),o=e(24040),L=e(43616).dashStyle,M=e(76308),d=e(93024),g=e(10624).makeEventData,r=e(72760),t=r.freeMode,s=r.rectMode,a=r.drawMode,c=r.openMode,u=r.selectMode,l=e(65152),y=e(85448),h=e(55496),T=e(1936).clearOutline,f=e(9856),n=f.handleEllipse,v=f.readPaths,m=e(93940).newShapes,b=e(5968),E=e(23640).activateLastSelection,p=e(3400),S=p.sorterAsc,w=e(92065),i=e(91200),C=e(79811).getFromId,x=e(73696),k=e(39172).redrawReglTraces,I=e(83280),B=I.MINSELECT,_=w.filter,z=w.tester,O=e(5840),F=O.p2r,N=O.axValue,V=O.getTransform;function j(Oe){return Oe.subplot!==void 0}function $(Oe,Ce,ge,pe,Te){var be=!j(pe),ke=t(Te),Ve=s(Te),je=c(Te),at=a(Te),ut=u(Te),Nt=Te==="drawline",Vt=Te==="drawcircle",gt=Nt||Vt,Ct=pe.gd,Yt=Ct._fullLayout,gr=ut&&Yt.newselection.mode==="immediate"&&be,ht=Yt._zoomlayer,Ht=pe.element.getBoundingClientRect(),Wt=pe.plotinfo,cr=V(Wt),er=Ce-Ht.left,ct=ge-Ht.top;Yt._calcInverseTransform(Ct);var qe=p.apply3DTransform(Yt._invTransform)(er,ct);er=qe[0],ct=qe[1];var dt=Yt._invScaleX,bt=Yt._invScaleY,Et=er,Mt=ct,_t="M"+er+","+ct,It=pe.xaxes[0],Gt=pe.yaxes[0],nr=It._length,ar=Gt._length,ir=Oe.altKey&&!(a(Te)&&je),Be,Fe,Rt,Lt,Ut,Qt,rr;H(Oe,Ct,pe),ke&&(Be=_([[er,ct]],I.BENDPX));var Kt=ht.selectAll("path.select-outline-"+Wt.id).data([1]),Dt=at?Yt.newshape:Yt.newselection;at&&(pe.hasText=Dt.label.text||Dt.label.texttemplate);var sr=at&&!je?Dt.fillcolor:"rgba(0,0,0,0)",fr=Dt.line.color||(be?M.contrast(Ct._fullLayout.plot_bgcolor):"#7f7f7f");Kt.enter().append("path").attr("class","select-outline select-outline-"+Wt.id).style({opacity:at?Dt.opacity/2:1,"stroke-dasharray":L(Dt.line.dash,Dt.line.width),"stroke-width":Dt.line.width+"px","shape-rendering":"crispEdges"}).call(M.stroke,fr).call(M.fill,sr).attr("fill-rule","evenodd").classed("cursor-move",!!at).attr("transform",cr).attr("d",_t+"Z");var vr=ht.append("path").attr("class","zoombox-corners").style({fill:M.background,stroke:M.defaultLine,"stroke-width":1}).attr("transform",cr).attr("d","M0,0Z");if(at&&pe.hasText){var lr=ht.select(".label-temp");lr.empty()&&(lr=ht.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Or=Yt._uid+I.SELECTID,Sr=[],Ar=ie(Ct,pe.xaxes,pe.yaxes,pe.subplot);gr&&!Oe.shiftKey&&(pe._clearSubplotSelections=function(){if(be){var Jr=It._id,bn=Gt._id;st(Ct,Jr,bn,Ar);for(var xn=(Ct.layout||{}).selections||[],or=[],Lr=!1,Br=0;Br<xn.length;Br++){var _r=Yt.selections[Br];_r.xref!==Jr||_r.yref!==bn?or.push(xn[Br]):Lr=!0}Lr&&(Ct._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",Ct,{selections:or}))}});var sn=Je(pe);pe.moveFn=function(Jr,bn){pe._clearSubplotSelections&&(pe._clearSubplotSelections(),pe._clearSubplotSelections=void 0),Et=Math.max(0,Math.min(nr,dt*Jr+er)),Mt=Math.max(0,Math.min(ar,bt*bn+ct));var xn=Math.abs(Et-er),or=Math.abs(Mt-ct);if(Ve){var Lr,Br,_r;if(ut){var Qr=Yt.selectdirection;switch(Qr==="any"?or<Math.min(xn*.6,B)?Lr="h":xn<Math.min(or*.6,B)?Lr="v":Lr="d":Lr=Qr,Lr){case"h":Br=Vt?ar/2:0,_r=ar;break;case"v":Br=Vt?nr/2:0,_r=nr;break}}if(at)switch(Yt.newshape.drawdirection){case"vertical":Lr="h",Br=Vt?ar/2:0,_r=ar;break;case"horizontal":Lr="v",Br=Vt?nr/2:0,_r=nr;break;case"ortho":xn<or?(Lr="h",Br=ct,_r=Mt):(Lr="v",Br=er,_r=Et);break;default:Lr="d"}Lr==="h"?(Lt=gt?n(Vt,[Et,Br],[Et,_r]):[[er,Br],[er,_r],[Et,_r],[Et,Br]],Lt.xmin=gt?Et:Math.min(er,Et),Lt.xmax=gt?Et:Math.max(er,Et),Lt.ymin=Math.min(Br,_r),Lt.ymax=Math.max(Br,_r),vr.attr("d","M"+Lt.xmin+","+(ct-B)+"h-4v"+2*B+"h4ZM"+(Lt.xmax-1)+","+(ct-B)+"h4v"+2*B+"h-4Z")):Lr==="v"?(Lt=gt?n(Vt,[Br,Mt],[_r,Mt]):[[Br,ct],[Br,Mt],[_r,Mt],[_r,ct]],Lt.xmin=Math.min(Br,_r),Lt.xmax=Math.max(Br,_r),Lt.ymin=gt?Mt:Math.min(ct,Mt),Lt.ymax=gt?Mt:Math.max(ct,Mt),vr.attr("d","M"+(er-B)+","+Lt.ymin+"v-4h"+2*B+"v4ZM"+(er-B)+","+(Lt.ymax-1)+"v4h"+2*B+"v-4Z")):Lr==="d"&&(Lt=gt?n(Vt,[er,ct],[Et,Mt]):[[er,ct],[er,Mt],[Et,Mt],[Et,ct]],Lt.xmin=Math.min(er,Et),Lt.xmax=Math.max(er,Et),Lt.ymin=Math.min(ct,Mt),Lt.ymax=Math.max(ct,Mt),vr.attr("d","M0,0Z"))}else ke&&(Be.addPt([Et,Mt]),Lt=Be.filtered);if(pe.selectionDefs&&pe.selectionDefs.length?(Rt=ye(pe.mergedPolygons,Lt,ir),Lt.subtract=ir,Fe=re(pe.selectionDefs.concat([Lt]))):(Rt=[Lt],Fe=z(Lt)),h(_e(Rt,je),Kt,pe),ut){var un=Ie(Ct,!1),ln=un.eventData?un.eventData.points.slice():[];un=Ie(Ct,!1,Fe,Ar,pe),Fe=un.selectionTesters,rr=un.eventData;var Mn;Be?Mn=Be.filtered:Mn=lt(Rt),i.throttle(Or,I.SELECTDELAY,function(){Sr=ze(Fe,Ar);for(var Dn=Sr.slice(),Kn=0;Kn<ln.length;Kn++){for(var sa=ln[Kn],na=!1,Jn=0;Jn<Dn.length;Jn++)if(Dn[Jn].curveNumber===sa.curveNumber&&Dn[Jn].pointNumber===sa.pointNumber){na=!0;break}na||Dn.push(sa)}Dn.length&&(rr||(rr={}),rr.points=Dn),sn(rr,Mn),Pe(Ct,rr)})}},pe.clickFn=function(Jr,bn){if(vr.remove(),Ct._fullLayout._activeShapeIndex>=0){Ct._fullLayout._deactivateShape(Ct);return}if(!at){var xn=Yt.clickmode;i.done(Or).then(function(){if(i.clear(Or),Jr===2){for(Kt.remove(),Ut=0;Ut<Ar.length;Ut++)Qt=Ar[Ut],Qt._module.selectPoints(Qt,!1);if(ve(Ct,Ar),K(pe),He(Ct),Ar.length){var or=Ar[0].xaxis,Lr=Ar[0].yaxis;if(or&&Lr){for(var Br=[],_r=Ct._fullLayout.selections,Qr=0;Qr<_r.length;Qr++){var un=_r[Qr];un&&(un.xref!==or._id||un.yref!==Lr._id)&&Br.push(un)}Br.length<_r.length&&(Ct._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",Ct,{selections:Br}))}}}else xn.indexOf("select")>-1&&q(bn,Ct,pe.xaxes,pe.yaxes,pe.subplot,pe,Kt),xn==="event"&&Ue(Ct,void 0);d.click(Ct,bn,Wt.id)}).catch(p.error)}},pe.doneFn=function(){vr.remove(),i.done(Or).then(function(){i.clear(Or),!gr&&Lt&&pe.selectionDefs&&(Lt.subtract=ir,pe.selectionDefs.push(Lt),pe.mergedPolygons.length=0,[].push.apply(pe.mergedPolygons,Rt)),(gr||at)&&K(pe,gr),pe.doneFnCompleted&&pe.doneFnCompleted(Sr),ut&&Ue(Ct,rr)}).catch(p.error)}}function q(Oe,Ce,ge,pe,Te,be,ke){var Ve=Ce._hoverdata,je=Ce._fullLayout,at=je.clickmode,ut=at.indexOf("event")>-1,Nt=[],Vt,gt,Ct,Yt,gr,ht,Ht,Wt,cr,er;if(le(Ve)){H(Oe,Ce,be),Vt=ie(Ce,ge,pe,Te);var ct=de(Ve,Vt),qe=ct.pointNumbers.length>0;if(qe?me(Vt,ct):Le(Vt)&&(Ht=we(ct))){for(ke&&ke.remove(),er=0;er<Vt.length;er++)gt=Vt[er],gt._module.selectPoints(gt,!1);ve(Ce,Vt),K(be),ut&&He(Ce)}else{Wt=Oe.shiftKey&&(Ht!==void 0?Ht:we(ct)),Ct=oe(ct.pointNumber,ct.searchInfo,Wt);var dt=be.selectionDefs.concat([Ct]);for(Yt=re(dt),er=0;er<Vt.length;er++)if(gr=Vt[er]._module.selectPoints(Vt[er],Yt),ht=Se(gr,Vt[er]),Nt.length)for(var bt=0;bt<ht.length;bt++)Nt.push(ht[bt]);else Nt=ht;if(cr={points:Nt},ve(Ce,Vt,cr),Ct&&be&&be.selectionDefs.push(Ct),ke){var Et=be.mergedPolygons,Mt=c(be.dragmode);h(_e(Et,Mt),ke,be)}ut&&Ue(Ce,cr)}}}function oe(Oe,Ce,ge){return{pointNumber:Oe,searchInfo:Ce,subtract:!!ge}}function Z(Oe){return"pointNumber"in Oe&&"searchInfo"in Oe}function G(Oe){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Ce,ge,pe,Te){var be=Oe.searchInfo.cd[0].trace._expandedIndex,ke=Te.cd[0].trace._expandedIndex;return ke===be&&pe===Oe.pointNumber},isRect:!1,degenerate:!1,subtract:!!Oe.subtract}}function re(Oe){if(!Oe.length)return;for(var Ce=[],ge=Z(Oe[0])?0:Oe[0][0][0],pe=ge,Te=Z(Oe[0])?0:Oe[0][0][1],be=Te,ke=0;ke<Oe.length;ke++)if(Z(Oe[ke]))Ce.push(G(Oe[ke]));else{var Ve=z(Oe[ke]);Ve.subtract=!!Oe[ke].subtract,Ce.push(Ve),ge=Math.min(ge,Ve.xmin),pe=Math.max(pe,Ve.xmax),Te=Math.min(Te,Ve.ymin),be=Math.max(be,Ve.ymax)}function je(at,ut,Nt,Vt){for(var gt=!1,Ct=0;Ct<Ce.length;Ct++)Ce[Ct].contains(at,ut,Nt,Vt)&&(gt=!Ce[Ct].subtract);return gt}return{xmin:ge,xmax:pe,ymin:Te,ymax:be,pts:[],contains:je,isRect:!1,degenerate:!1}}function H(Oe,Ce,ge){var pe=Ce._fullLayout,Te=ge.plotinfo,be=ge.dragmode,ke=pe._lastSelectedSubplot&&pe._lastSelectedSubplot===Te.id,Ve=(Oe.shiftKey||Oe.altKey)&&!(a(be)&&c(be));ke&&Ve&&Te.selection&&Te.selection.selectionDefs&&!ge.selectionDefs?(ge.selectionDefs=Te.selection.selectionDefs,ge.mergedPolygons=Te.selection.mergedPolygons):(!Ve||!Te.selection)&&K(ge),ke||(T(Ce),pe._lastSelectedSubplot=Te.id)}function J(Oe){return Oe._fullLayout._activeShapeIndex>=0}function ae(Oe){return Oe._fullLayout._activeSelectionIndex>=0}function K(Oe,Ce){var ge=Oe.dragmode,pe=Oe.plotinfo,Te=Oe.gd;J(Te)&&Te._fullLayout._deactivateShape(Te),ae(Te)&&Te._fullLayout._deactivateSelection(Te);var be=Te._fullLayout,ke=be._zoomlayer,Ve=a(ge),je=u(ge);if(Ve||je){var at=ke.selectAll(".select-outline-"+pe.id);if(at&&Te._fullLayout._outlining){var ut;Ve&&(ut=m(at,Oe)),ut&&o.call("_guiRelayout",Te,{shapes:ut});var Nt;je&&!j(Oe)&&(Nt=b(at,Oe)),Nt&&(Te._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",Te,{selections:Nt}).then(function(){Ce&&E(Te)})),Te._fullLayout._outlining=!1}}pe.selection={},pe.selection.selectionDefs=Oe.selectionDefs=[],pe.selection.mergedPolygons=Oe.mergedPolygons=[]}function Y(Oe){return Oe._id}function ie(Oe,Ce,ge,pe){if(!Oe.calcdata)return[];var Te=[],be=Ce.map(Y),ke=ge.map(Y),Ve,je,at;for(at=0;at<Oe.calcdata.length;at++)if(Ve=Oe.calcdata[at],je=Ve[0].trace,!(je.visible!==!0||!je._module||!je._module.selectPoints))if(j({subplot:pe})&&(je.subplot===pe||je.geo===pe))Te.push(ne(je._module,Ve,Ce[0],ge[0]));else if(je.type==="splom"){if(je._xaxes[be[0]]&&je._yaxes[ke[0]]){var ut=ne(je._module,Ve,Ce[0],ge[0]);ut.scene=Oe._fullLayout._splomScenes[je.uid],Te.push(ut)}}else if(je.type==="sankey"){var Nt=ne(je._module,Ve,Ce[0],ge[0]);Te.push(Nt)}else{if(be.indexOf(je.xaxis)===-1&&(!je._xA||!je._xA.overlaying)||ke.indexOf(je.yaxis)===-1&&(!je._yA||!je._yA.overlaying))continue;Te.push(ne(je._module,Ve,C(Oe,je.xaxis),C(Oe,je.yaxis)))}return Te}function ne(Oe,Ce,ge,pe){return{_module:Oe,cd:Ce,xaxis:ge,yaxis:pe}}function le(Oe){return Oe&&Array.isArray(Oe)&&Oe[0].hoverOnBox!==!0}function de(Oe,Ce){var ge=Oe[0],pe=-1,Te=[],be,ke;for(ke=0;ke<Ce.length;ke++)if(be=Ce[ke],ge.fullData._expandedIndex===be.cd[0].trace._expandedIndex){if(ge.hoverOnBox===!0)break;ge.pointNumber!==void 0?pe=ge.pointNumber:ge.binNumber!==void 0&&(pe=ge.binNumber,Te=ge.pointNumbers);break}return{pointNumber:pe,pointNumbers:Te,searchInfo:be}}function we(Oe){var Ce=Oe.searchInfo.cd[0].trace,ge=Oe.pointNumber,pe=Oe.pointNumbers,Te=pe.length>0,be=Te?pe[0]:ge;return Ce.selectedpoints?Ce.selectedpoints.indexOf(be)>-1:!1}function me(Oe,Ce){var ge=[],pe,Te,be,ke;for(ke=0;ke<Oe.length;ke++)pe=Oe[ke],pe.cd[0].trace.selectedpoints&&pe.cd[0].trace.selectedpoints.length>0&&ge.push(pe);if(ge.length===1&&(be=ge[0]===Ce.searchInfo,be&&(Te=Ce.searchInfo.cd[0].trace,Te.selectedpoints.length===Ce.pointNumbers.length))){for(ke=0;ke<Ce.pointNumbers.length;ke++)if(Te.selectedpoints.indexOf(Ce.pointNumbers[ke])<0)return!1;return!0}return!1}function Le(Oe){var Ce=0,ge,pe,Te;for(Te=0;Te<Oe.length;Te++)if(ge=Oe[Te],pe=ge.cd[0].trace,pe.selectedpoints&&(pe.selectedpoints.length>1||(Ce+=pe.selectedpoints.length,Ce>1)))return!1;return Ce===1}function ve(Oe,Ce,ge){var pe;for(pe=0;pe<Ce.length;pe++){var Te=Ce[pe].cd[0].trace._fullInput,be=Oe._fullLayout._tracePreGUI[Te.uid]||{};be.selectedpoints===void 0&&(be.selectedpoints=Te._input.selectedpoints||null)}var ke;if(ge){var Ve=ge.points||[];for(pe=0;pe<Ce.length;pe++)ke=Ce[pe].cd[0].trace,ke._input.selectedpoints=ke._fullInput.selectedpoints=[],ke._fullInput!==ke&&(ke.selectedpoints=[]);for(var je=0;je<Ve.length;je++){var at=Ve[je],ut=at.data,Nt=at.fullData,Vt=at.pointIndex,gt=at.pointIndices;gt?([].push.apply(ut.selectedpoints,gt),ke._fullInput!==ke&&[].push.apply(Nt.selectedpoints,gt)):(ut.selectedpoints.push(Vt),ke._fullInput!==ke&&Nt.selectedpoints.push(Vt))}}else for(pe=0;pe<Ce.length;pe++)ke=Ce[pe].cd[0].trace,delete ke.selectedpoints,delete ke._input.selectedpoints,ke._fullInput!==ke&&delete ke._fullInput.selectedpoints;Ae(Oe,Ce)}function Ae(Oe,Ce){for(var ge=!1,pe=0;pe<Ce.length;pe++){var Te=Ce[pe],be=Te.cd;o.traceIs(be[0].trace,"regl")&&(ge=!0);var ke=Te._module,Ve=ke.styleOnSelect||ke.style;Ve&&(Ve(Oe,be,be[0].node3),be[0].nodeRangePlot3&&Ve(Oe,be,be[0].nodeRangePlot3))}ge&&(x(Oe),k(Oe))}function ye(Oe,Ce,ge){for(var pe=ge?A.difference:A.union,Te=pe({regions:Oe},{regions:[Ce]}),be=Te.regions.reverse(),ke=0;ke<be.length;ke++){var Ve=be[ke];Ve.subtract=nt(Ve,be.slice(0,ke))}return be}function Se(Oe,Ce){if(Array.isArray(Oe))for(var ge=Ce.cd,pe=Ce.cd[0].trace,Te=0;Te<Oe.length;Te++)Oe[Te]=g(Oe[Te],pe,ge);return Oe}function _e(Oe,Ce){for(var ge=[],pe=0;pe<Oe.length;pe++){ge[pe]=[];for(var Te=0;Te<Oe[pe].length;Te++){ge[pe][Te]=[],ge[pe][Te][0]=Te?"L":"M";for(var be=0;be<Oe[pe][Te].length;be++)ge[pe][Te].push(Oe[pe][Te][be])}Ce||ge[pe].push(["Z",ge[pe][0][1],ge[pe][0][2]])}return ge}function ze(Oe,Ce){for(var ge=[],pe,Te,be=0;be<Ce.length;be++){var ke=Ce[be];Te=ke._module.selectPoints(ke,Oe),pe=Se(Te,ke),ge=ge.concat(pe)}return ge}function Ie(Oe,Ce,ge,pe,Te){var be=!!pe,ke,Ve,je;Te&&(ke=Te.plotinfo,Ve=Te.xaxes[0]._id,je=Te.yaxes[0]._id);var at=[],ut=[],Nt=Ke(Oe),Vt=Oe._fullLayout;if(ke){var gt=Vt._zoomlayer,Ct=Vt.dragmode,Yt=a(Ct),gr=u(Ct);if(Yt||gr){var ht=C(Oe,Ve,"x"),Ht=C(Oe,je,"y");if(ht&&Ht){var Wt=gt.selectAll(".select-outline-"+ke.id);if(Wt&&Oe._fullLayout._outlining&&Wt.length){for(var cr=Wt[0][0],er=cr.getAttribute("d"),ct=v(er,Oe,ke),qe=[],dt=0;dt<ct.length;dt++){for(var bt=ct[dt],Et=[],Mt=0;Mt<bt.length;Mt++)Et.push([it(ht,bt[Mt][1]),it(Ht,bt[Mt][2])]);Et.xref=Ve,Et.yref=je,Et.subtract=nt(Et,qe),qe.push(Et)}Nt=Nt.concat(qe)}}}}var _t=Ve&&je?[Ve+je]:Vt._subplots.cartesian;Ne(Oe);for(var It={},Gt=0;Gt<_t.length;Gt++){var nr=_t[Gt],ar=nr.indexOf("y"),ir=nr.slice(0,ar),Be=nr.slice(ar),Fe=Ve&&je?ge:void 0;if(Fe=Ze(Nt,ir,Be,Fe),Fe){var Rt=pe;if(!be){var Lt=C(Oe,ir,"x"),Ut=C(Oe,Be,"y");Rt=ie(Oe,[Lt],[Ut],nr);for(var Qt=0;Qt<Rt.length;Qt++){var rr=Rt[Qt],Kt=rr.cd[0],Dt=Kt.trace;if(rr._module.name==="scattergl"&&!Kt.t.xpx){var sr=Dt.x,fr=Dt.y,vr=Dt._length;Kt.t.xpx=[],Kt.t.ypx=[];for(var lr=0;lr<vr;lr++)Kt.t.xpx[lr]=Lt.c2p(sr[lr]),Kt.t.ypx[lr]=Ut.c2p(fr[lr])}rr._module.name==="splom"&&(It[Dt.uid]||(It[Dt.uid]=!0))}}var Or=ze(Fe,Rt);at=at.concat(Or),ut=ut.concat(Rt)}}var Sr={points:at};ve(Oe,ut,Sr);var Ar=Vt.clickmode,sn=Ar.indexOf("event")>-1&&Ce;if(!ke&&Ce){var Jr=Ke(Oe,!0);if(Jr.length){var bn=Jr[0].xref,xn=Jr[0].yref;if(bn&&xn){var or=lt(Jr),Lr=xt([C(Oe,bn,"x"),C(Oe,xn,"y")]);Lr(Sr,or)}}Oe._fullLayout._noEmitSelectedAtStart?Oe._fullLayout._noEmitSelectedAtStart=!1:sn&&Ue(Oe,Sr),Vt._reselect=!1}if(!ke&&Vt._deselect){var Br=Vt._deselect;Ve=Br.xref,je=Br.yref,et(Ve,je,ut)||st(Oe,Ve,je,pe),sn&&(Sr.points.length?Ue(Oe,Sr):He(Oe)),Vt._deselect=!1}return{eventData:Sr,selectionTesters:ge}}function Ne(Oe){var Ce=Oe.calcdata;if(Ce)for(var ge=0;ge<Ce.length;ge++){var pe=Ce[ge][0],Te=pe.trace,be=Oe._fullLayout._splomScenes;if(be){var ke=be[Te.uid];ke&&(ke.selectBatch=[])}}}function et(Oe,Ce,ge){for(var pe=0;pe<ge.length;pe++){var Te=ge[pe];if(Te.xaxis&&Te.xaxis._id===Oe&&Te.yaxis&&Te.yaxis._id===Ce)return!0}return!1}function st(Oe,Ce,ge,pe){pe=ie(Oe,[C(Oe,Ce,"x")],[C(Oe,ge,"y")],Ce+ge);for(var Te=0;Te<pe.length;Te++){var be=pe[Te];be._module.selectPoints(be,!1)}ve(Oe,pe)}function Ze(Oe,Ce,ge,pe){for(var Te,be=0;be<Oe.length;be++){var ke=Oe[be];if(!(Ce!==ke.xref||ge!==ke.yref))if(Te){var Ve=!!ke.subtract;Te=ye(Te,ke,Ve),pe=re(Te)}else Te=[ke],pe=z(ke)}return pe}function Ke(Oe,Ce){for(var ge=[],pe=Oe._fullLayout,Te=pe.selections,be=Te.length,ke=0;ke<be;ke++)if(!(Ce&&ke!==pe._activeSelectionIndex)){var Ve=Te[ke];if(Ve){var je=Ve.xref,at=Ve.yref,ut=C(Oe,je,"x"),Nt=C(Oe,at,"y"),Vt,gt,Ct,Yt,gr;if(Ve.type==="rect"){gr=[];var ht=it(ut,Ve.x0),Ht=it(ut,Ve.x1),Wt=it(Nt,Ve.y0),cr=it(Nt,Ve.y1);gr=[[ht,Wt],[ht,cr],[Ht,cr],[Ht,Wt]],Vt=Math.min(ht,Ht),gt=Math.max(ht,Ht),Ct=Math.min(Wt,cr),Yt=Math.max(Wt,cr),gr.xmin=Vt,gr.xmax=gt,gr.ymin=Ct,gr.ymax=Yt,gr.xref=je,gr.yref=at,gr.subtract=!1,gr.isRect=!0,ge.push(gr)}else if(Ve.type==="path")for(var er=Ve.path.split("Z"),ct=[],qe=0;qe<er.length;qe++){var dt=er[qe];if(dt){dt+="Z";var bt=l.extractPathCoords(dt,y.paramIsX,"raw"),Et=l.extractPathCoords(dt,y.paramIsY,"raw");Vt=1/0,gt=-1/0,Ct=1/0,Yt=-1/0,gr=[];for(var Mt=0;Mt<bt.length;Mt++){var _t=it(ut,bt[Mt]),It=it(Nt,Et[Mt]);gr.push([_t,It]),Vt=Math.min(_t,Vt),gt=Math.max(_t,gt),Ct=Math.min(It,Ct),Yt=Math.max(It,Yt)}gr.xmin=Vt,gr.xmax=gt,gr.ymin=Ct,gr.ymax=Yt,gr.xref=je,gr.yref=at,gr.subtract=nt(gr,ct),ct.push(gr),ge.push(gr)}}}}return ge}function nt(Oe,Ce){for(var ge=!1,pe=0;pe<Ce.length;pe++)for(var Te=Ce[pe],be=0;be<Oe.length;be++)if(P(Oe[be],Te)){ge=!ge;break}return ge}function it(Oe,Ce){return Oe.type==="date"&&(Ce=Ce.replace("_"," ")),Oe.type==="log"?Oe.c2p(Ce):Oe.r2p(Ce,null,Oe.calendar)}function lt(Oe){for(var Ce=Oe.length,ge=[],pe=0;pe<Ce;pe++){var Te=Oe[pe];ge=ge.concat(Te),ge=ge.concat([Te[0]])}return vt(ge)}function vt(Oe){return Oe.isRect=Oe.length===5&&Oe[0][0]===Oe[4][0]&&Oe[0][1]===Oe[4][1]&&Oe[0][0]===Oe[1][0]&&Oe[2][0]===Oe[3][0]&&Oe[0][1]===Oe[3][1]&&Oe[1][1]===Oe[2][1]||Oe[0][1]===Oe[1][1]&&Oe[2][1]===Oe[3][1]&&Oe[0][0]===Oe[3][0]&&Oe[1][0]===Oe[2][0],Oe.isRect&&(Oe.xmin=Math.min(Oe[0][0],Oe[2][0]),Oe.xmax=Math.max(Oe[0][0],Oe[2][0]),Oe.ymin=Math.min(Oe[0][1],Oe[2][1]),Oe.ymax=Math.max(Oe[0][1],Oe[2][1])),Oe}function xt(Oe){return function(Ce,ge){for(var pe,Te,be=0;be<Oe.length;be++){var ke=Oe[be],Ve=ke._id,je=Ve.charAt(0);if(ge.isRect){pe||(pe={});var at=ge[je+"min"],ut=ge[je+"max"];at!==void 0&&ut!==void 0&&(pe[Ve]=[F(ke,at),F(ke,ut)].sort(S))}else Te||(Te={}),Te[Ve]=ge.map(N(ke))}pe&&(Ce.range=pe),Te&&(Ce.lassoPoints=Te)}}function Je(Oe){var Ce=Oe.plotinfo;return Ce.fillRangeItems||xt(Oe.xaxes.concat(Oe.yaxes))}function Pe(Oe,Ce){Oe.emit("plotly_selecting",Ce)}function Ue(Oe,Ce){Ce&&(Ce.selections=(Oe.layout||{}).selections||[]),Oe.emit("plotly_selected",Ce)}function He(Oe){Oe.emit("plotly_deselect",null)}te.exports={reselect:Ie,prepSelect:$,clearOutline:T,clearSelectionsCache:K,selectOnClick:q}},46056:function(te,X,e){var A=e(13916),P=e(25376),o=e(52904).line,L=e(98192).u,M=e(92880).extendFlat,d=e(31780).templatedArray;e(36208);var g=e(45464),r=e(21776).ye,t=e(97728);te.exports=d("shape",{visible:M({},g.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:M({},g.legend,{editType:"calc+arraydraw"}),legendgroup:M({},g.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:M({},g.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:P({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:M({},g.legendrank,{editType:"calc+arraydraw"}),legendwidth:M({},g.legendwidth,{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:M({},A.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:M({},A.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:M({},o.color,{editType:"arraydraw"}),width:M({},o.width,{editType:"calc+arraydraw"}),dash:M({},L,{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"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:r({},{keys:Object.keys(t)}),font:P({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},96084:function(te,X,e){var A=e(3400),P=e(54460),o=e(85448),L=e(65152);te.exports=function(s){var a=s._fullLayout,c=A.filterVisible(a.shapes);if(!(!c.length||!s._fullData.length))for(var u=0;u<c.length;u++){var l=c[u];l._extremes={};var y,h,T=P.getRefType(l.xref),f=P.getRefType(l.yref);if(l.xref!=="paper"&&T!=="domain"){var n=l.xsizemode==="pixel"?l.xanchor:l.x0,v=l.xsizemode==="pixel"?l.xanchor:l.x1;y=P.getFromId(s,l.xref),h=r(y,n,v,l.path,o.paramIsX),h&&(l._extremes[y._id]=P.findExtremes(y,h,M(l)))}if(l.yref!=="paper"&&f!=="domain"){var m=l.ysizemode==="pixel"?l.yanchor:l.y0,b=l.ysizemode==="pixel"?l.yanchor:l.y1;y=P.getFromId(s,l.yref),h=r(y,m,b,l.path,o.paramIsY),h&&(l._extremes[y._id]=P.findExtremes(y,h,d(l)))}}};function M(t){return g(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function d(t){return g(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function g(t,s,a,c,u,l){var y=t/2,h=l;if(s==="pixel"){var T=u?L.extractPathCoords(u,l?o.paramIsY:o.paramIsX):[a,c],f=A.aggNums(Math.max,null,T),n=A.aggNums(Math.min,null,T),v=n<0?Math.abs(n)+y:y,m=f>0?f+y:y;return{ppad:y,ppadplus:h?v:m,ppadminus:h?m:v}}else return{ppad:y}}function r(t,s,a,c,u){var l=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(s!==void 0)return[l(s),l(a)];if(c){var y=1/0,h=-1/0,T=c.match(o.segmentRE),f,n,v,m,b;for(t.type==="date"&&(l=L.decodeDate(l)),f=0;f<T.length;f++)n=T[f],v=u[n.charAt(0)].drawn,v!==void 0&&(m=T[f].substr(1).match(o.paramRE),!(!m||m.length<v)&&(b=l(m[v]),b<y&&(y=b),b>h&&(h=b)));if(h>=y)return[y,h]}}},85448:function(te){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}}},43712:function(te,X,e){var A=e(3400),P=e(54460),o=e(51272),L=e(46056),M=e(65152);te.exports=function(t,s){o(t,s,{name:"shapes",handleItemDefaults:g})};function d(r,t){return r?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function g(r,t,s){function a(Z,G){return A.coerce(r,t,L,Z,G)}t._isShape=!0;var c=a("visible");if(c){var u=a("showlegend");u&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),A.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),y=l?"path":"rect",h=a("type",y),T=h!=="path";T&&delete t.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var n=a("xsizemode"),v=a("ysizemode"),m=["x","y"],b=0;b<2;b++){var E=m[b],p=E+"anchor",S=E==="x"?n:v,w={_fullLayout:s},i,C,x,k=P.coerceRef(r,t,w,E,void 0,"paper"),I=P.getRefType(k);if(I==="range"?(i=P.getFromId(w,k),i._shapeIndices.push(t._index),x=M.rangeToShapePosition(i),C=M.shapePositionToRange(i)):C=x=A.identity,T){var B=.25,_=.75,z=E+"0",O=E+"1",F=r[z],N=r[O];r[z]=C(r[z],!0),r[O]=C(r[O],!0),S==="pixel"?(a(z,0),a(O,10)):(P.coercePosition(t,w,a,k,z,B),P.coercePosition(t,w,a,k,O,_)),t[z]=x(t[z]),t[O]=x(t[O]),r[z]=F,r[O]=N}if(S==="pixel"){var V=r[p];r[p]=C(r[p],!0),P.coercePosition(t,w,a,k,p,.25),t[p]=x(t[p]),r[p]=V}}T&&A.noneOrAll(r,t,["x0","x1","y0","y1"]);var j=h==="line",$,q;if(T&&($=a("label.texttemplate")),$||(q=a("label.text")),q||$){a("label.textangle");var oe=a("label.textposition",j?"middle":"middle center");a("label.xanchor"),a("label.yanchor",d(j,oe)),a("label.padding"),A.coerceFont(a,"label.font",s.font)}}}},60728:function(te,X,e){var A=e(3400),P=e(54460),o=e(72736),L=e(43616),M=e(9856).readPaths,d=e(65152),g=d.getPathString,r=e(97728),t=e(84284).FROM_TL;te.exports=function(u,l,y,h){if(h.selectAll(".shape-label").remove(),!!(y.label.text||y.label.texttemplate)){var T;if(y.label.texttemplate){var f={};if(y.type!=="path"){var n=P.getFromId(u,y.xref),v=P.getFromId(u,y.yref);for(var m in r){var b=r[m](y,n,v);b!==void 0&&(f[m]=b)}}T=A.texttemplateStringForShapes(y.label.texttemplate,{},u._fullLayout._d3locale,f)}else T=y.label.text;var E={"data-index":l},p=y.label.font,S={"data-notex":1},w=h.append("g").attr(E).classed("shape-label",!0),i=w.append("text").attr(S).classed("shape-label-text",!0).text(T),C,x,k,I;if(y.path){var B=g(u,y),_=M(B,u);C=1/0,k=1/0,x=-1/0,I=-1/0;for(var z=0;z<_.length;z++)for(var O=0;O<_[z].length;O++)for(var F=_[z][O],N=1;N<F.length;N+=2){var V=F[N],j=F[N+1];C=Math.min(C,V),x=Math.max(x,V),k=Math.min(k,j),I=Math.max(I,j)}}else{var $=P.getFromId(u,y.xref),q=P.getRefType(y.xref),oe=P.getFromId(u,y.yref),Z=P.getRefType(y.yref),G=d.getDataToPixel(u,$,!1,q),re=d.getDataToPixel(u,oe,!0,Z);C=G(y.x0),x=G(y.x1),k=re(y.y0),I=re(y.y1)}var H=y.label.textangle;H==="auto"&&(y.type==="line"?H=s(C,k,x,I):H=0),i.call(function(ne){return ne.call(L.font,p).attr({}),o.convertToTspans(ne,u),ne});var J=L.bBox(i.node()),ae=a(C,k,x,I,y,H,J),K=ae.textx,Y=ae.texty,ie=ae.xanchor;i.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ie],y:Y,x:K,transform:"rotate("+H+","+K+","+Y+")"}).call(o.positionText,K,Y)}};function s(c,u,l,y){var h,T;return T=Math.abs(l-c),l>=c?h=u-y:h=y-u,-180/Math.PI*Math.atan2(h,T)}function a(c,u,l,y,h,T,f){var n=h.label.textposition,v=h.label.textangle,m=h.label.padding,b=h.type,E=Math.PI/180*T,p=Math.sin(E),S=Math.cos(E),w=h.label.xanchor,i=h.label.yanchor,C,x,k,I;if(b==="line"){n==="start"?(C=c,x=u):n==="end"?(C=l,x=y):(C=(c+l)/2,x=(u+y)/2),w==="auto"&&(n==="start"?v==="auto"?l>c?w="left":l<c?w="right":w="center":l>c?w="right":l<c?w="left":w="center":n==="end"?v==="auto"?l>c?w="right":l<c?w="left":w="center":l>c?w="left":l<c?w="right":w="center":w="center");var B={left:1,center:0,right:-1},_={bottom:-1,middle:0,top:1};if(v==="auto"){var z=_[i];k=-m*p*z,I=m*S*z}else{var O=B[w],F=_[i];k=m*O,I=m*F}C=C+k,x=x+I}else k=m+3,n.indexOf("right")!==-1?(C=Math.max(c,l)-k,w==="auto"&&(w="right")):n.indexOf("left")!==-1?(C=Math.min(c,l)+k,w==="auto"&&(w="left")):(C=(c+l)/2,w==="auto"&&(w="center")),n.indexOf("top")!==-1?x=Math.min(u,y):n.indexOf("bottom")!==-1?x=Math.max(u,y):x=(u+y)/2,I=m,i==="bottom"?x=x-I:i==="top"&&(x=x+I);var N=t[i],V=h.label.font.size,j=f.height,$=(j*N-V)*p,q=-(j*N-V)*S;return{textx:C+$,texty:x+q,xanchor:w}}},55496:function(te,X,e){var A=e(3400),P=A.strTranslate,o=e(86476),L=e(72760),M=L.drawMode,d=L.selectMode,g=e(24040),r=e(76308),t=e(7e3),s=t.i000,a=t.i090,c=t.i180,u=t.i270,l=e(1936),y=l.clearOutlineControllers,h=e(9856),T=h.pointsOnRectangle,f=h.pointsOnEllipse,n=h.writePaths,v=e(93940).newShapes,m=e(93940).createShapeObj,b=e(5968),E=e(60728);te.exports=function i(C,x,k,I){I||(I=0);var B=k.gd;function _(){i(C,x,k,I++),(f(C[0])||k.hasText)&&z({redrawing:!0})}function z(ye){var Se={};k.isActiveShape!==void 0&&(k.isActiveShape=!1,Se=v(x,k)),k.isActiveSelection!==void 0&&(k.isActiveSelection=!1,Se=b(x,k),B._fullLayout._reselect=!0),Object.keys(Se).length&&g.call((ye||{}).redrawing?"relayout":"_guiRelayout",B,Se)}var O=B._fullLayout,F=O._zoomlayer,N=k.dragmode,V=M(N),j=d(N);(V||j)&&(B._fullLayout._outlining=!0),y(B),x.attr("d",n(C));var $,q,oe,Z,G;if(!I&&(k.isActiveShape||k.isActiveSelection)){G=p([],C);var re=F.append("g").attr("class","outline-controllers");le(re),Ae()}if(V&&k.hasText){var H=F.select(".label-temp"),J=m(x,k,k.dragmode);E(B,"label-temp",J,H)}function ae(ye){oe=+ye.srcElement.getAttribute("data-i"),Z=+ye.srcElement.getAttribute("data-j"),$[oe][Z].moveFn=K}function K(ye,Se){if(C.length){var _e=G[oe][Z][1],ze=G[oe][Z][2],Ie=C[oe],Ne=Ie.length;if(T(Ie)){var et=ye,st=Se;if(k.isActiveSelection){var Ze=S(Ie,Z);Ze[1]===Ie[Z][1]?st=0:et=0}for(var Ke=0;Ke<Ne;Ke++)if(Ke!==Z){var nt=Ie[Ke];nt[1]===Ie[Z][1]&&(nt[1]=_e+et),nt[2]===Ie[Z][2]&&(nt[2]=ze+st)}if(Ie[Z][1]=_e+et,Ie[Z][2]=ze+st,!T(Ie))for(var it=0;it<Ne;it++)for(var lt=0;lt<Ie[it].length;lt++)Ie[it][lt]=G[oe][it][lt]}else Ie[Z][1]=_e+ye,Ie[Z][2]=ze+Se;_()}}function Y(){z()}function ie(){if(C.length&&C[oe]&&C[oe].length){for(var ye=[],Se=0;Se<C[oe].length;Se++)Se!==Z&&ye.push(C[oe][Se]);ye.length>1&&!(ye.length===2&&ye[1][0]==="Z")&&(Z===0&&(ye[0][0]="M"),C[oe]=ye,_(),z())}}function ne(ye,Se){if(ye===2){oe=+Se.srcElement.getAttribute("data-i"),Z=+Se.srcElement.getAttribute("data-j");var _e=C[oe];!T(_e)&&!f(_e)&&ie()}}function le(ye){$=[];for(var Se=0;Se<C.length;Se++){var _e=C[Se],ze=T(_e),Ie=!ze&&f(_e);$[Se]=[];for(var Ne=_e.length,et=0;et<Ne;et++)if(_e[et][0]!=="Z"&&!(Ie&&et!==s&&et!==a&&et!==c&&et!==u)){var st=ze&&k.isActiveSelection,Ze;st&&(Ze=S(_e,et));var Ke=_e[et][1],nt=_e[et][2],it=ye.append(st?"rect":"circle").attr("data-i",Se).attr("data-j",et).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(st){var lt=Ze[1]-Ke,vt=Ze[2]-nt,xt=vt?5:Math.max(Math.min(25,Math.abs(lt)-5),5),Je=lt?5:Math.max(Math.min(25,Math.abs(vt)-5),5);it.classed(vt?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",xt).attr("height",Je).attr("x",Ke-xt/2).attr("y",nt-Je/2).attr("transform",P(lt/2,vt/2))}else it.classed("cursor-grab",!0).attr("r",5).attr("cx",Ke).attr("cy",nt);$[Se][et]={element:it.node(),gd:B,prepFn:ae,doneFn:Y,clickFn:ne},o.init($[Se][et])}}}function de(ye,Se){if(C.length)for(var _e=0;_e<C.length;_e++)for(var ze=0;ze<C[_e].length;ze++)for(var Ie=0;Ie+2<C[_e][ze].length;Ie+=2)C[_e][ze][Ie+1]=G[_e][ze][Ie+1]+ye,C[_e][ze][Ie+2]=G[_e][ze][Ie+2]+Se}function we(ye,Se){de(ye,Se),_()}function me(ye){oe=+ye.srcElement.getAttribute("data-i"),oe||(oe=0),q[oe].moveFn=we}function Le(){z()}function ve(ye){ye===2&&w(B)}function Ae(){if(q=[],!!C.length){var ye=0;q[ye]={element:x[0][0],gd:B,prepFn:me,doneFn:Le,clickFn:ve},o.init(q[ye])}}};function p(i,C){for(var x=0;x<C.length;x++){var k=C[x];i[x]=[];for(var I=0;I<k.length;I++){i[x][I]=[];for(var B=0;B<k[I].length;B++)i[x][I][B]=k[I][B]}}return i}function S(i,C){var x=i[C][1],k=i[C][2],I=i.length,B,_,z;return B=(C+1)%I,_=i[B][1],z=i[B][2],_===x&&z===k&&(B=(C+2)%I,_=i[B][1],z=i[B][2]),[B,_,z]}function w(i){if(d(i._fullLayout.dragmode)){y(i);var C=i._fullLayout._activeSelectionIndex,x=(i.layout||{}).selections||[];if(C<x.length){for(var k=[],I=0;I<x.length;I++)I!==C&&k.push(x[I]);delete i._fullLayout._activeSelectionIndex;var B=i._fullLayout.selections[C];i._fullLayout._deselect={xref:B.xref,yref:B.yref},g.call("_guiRelayout",i,{selections:k})}}}},4016:function(te,X,e){var A=e(33428),P=e(24040),o=e(3400),L=e(54460),M=e(9856).readPaths,d=e(55496),g=e(60728),r=e(1936).clearOutlineControllers,t=e(76308),s=e(43616),a=e(31780).arrayEditor,c=e(86476),u=e(93972),l=e(85448),y=e(65152),h=y.getPathString;te.exports={draw:T,drawOne:v,eraseActiveShape:w,drawLabel:g};function T(i){var C=i._fullLayout;C._shapeUpperLayer.selectAll("path").remove(),C._shapeLowerLayer.selectAll("path").remove(),C._shapeUpperLayer.selectAll("text").remove(),C._shapeLowerLayer.selectAll("text").remove();for(var x in C._plots){var k=C._plots[x].shapelayer;k&&(k.selectAll("path").remove(),k.selectAll("text").remove())}for(var I=0;I<C.shapes.length;I++)C.shapes[I].visible===!0&&v(i,I)}function f(i){return!!i._fullLayout._outlining}function n(i){return!i._context.edits.shapePosition}function v(i,C){i._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+C+'"]').remove();var x=y.makeShapesOptionsAndPlotinfo(i,C),k=x.options,I=x.plotinfo;if(!k._input||k.visible!==!0)return;if(k.layer!=="below")_(i._fullLayout._shapeUpperLayer);else if(k.xref==="paper"||k.yref==="paper")_(i._fullLayout._shapeLowerLayer);else if(I._hadPlotinfo){var B=I.mainplotinfo||I;_(B.shapelayer)}else _(i._fullLayout._shapeLowerLayer);function _(z){var O=h(i,k),F={"data-index":C,"fill-rule":k.fillrule,d:O},N=k.opacity,V=k.fillcolor,j=k.line.width?k.line.color:"rgba(0,0,0,0)",$=k.line.width,q=k.line.dash;!$&&k.editable===!0&&($=5,q="solid");var oe=O[O.length-1]!=="Z",Z=n(i)&&k.editable&&i._fullLayout._activeShapeIndex===C;Z&&(V=oe?"rgba(0,0,0,0)":i._fullLayout.activeshape.fillcolor,N=i._fullLayout.activeshape.opacity);var G=z.append("g").classed("shape-group",!0).attr({"data-index":C}),re=G.append("path").attr(F).style("opacity",N).call(t.stroke,j).call(t.fill,V).call(s.dashLine,q,$);m(G,i,k),g(i,C,k,G);var H;if((Z||i._context.edits.shapePosition)&&(H=a(i.layout,"shapes",k)),Z){re.style({cursor:"move"});var J={element:re.node(),plotinfo:I,gd:i,editHelpers:H,hasText:k.label.text||k.label.texttemplate,isActiveShape:!0},ae=M(O,i);d(ae,re,J)}else i._context.edits.shapePosition?b(i,re,k,C,z,H):k.editable===!0&&re.style("pointer-events",oe||t.opacity(V)*N<=.5?"stroke":"all");re.node().addEventListener("click",function(){return p(i,re)})}}function m(i,C,x){var k=(x.xref+x.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");s.setClipUrl(i,k?"clip"+C._fullLayout._uid+k:null,C)}function b(i,C,x,k,I,B){var _=10,z=10,O=x.xsizemode==="pixel",F=x.ysizemode==="pixel",N=x.type==="line",V=x.type==="path",j=B.modifyItem,$,q,oe,Z,G,re,H,J,ae,K,Y,ie,ne,le,de,we=A.select(C.node().parentNode),me=L.getFromId(i,x.xref),Le=L.getRefType(x.xref),ve=L.getFromId(i,x.yref),Ae=L.getRefType(x.yref),ye=y.getDataToPixel(i,me,!1,Le),Se=y.getDataToPixel(i,ve,!0,Ae),_e=y.getPixelToData(i,me,!1,Le),ze=y.getPixelToData(i,ve,!0,Ae),Ie=st(),Ne={element:Ie.node(),gd:i,prepFn:nt,doneFn:it,clickFn:lt},et;c.init(Ne),Ie.node().onmousemove=Ke;function st(){return N?Ze():C}function Ze(){var He=10,Oe=Math.max(x.line.width,He),Ce=I.append("g").attr("data-index",k).attr("drag-helper",!0);Ce.append("path").attr("d",C.attr("d")).style({cursor:"move","stroke-width":Oe,"stroke-opacity":"0"});var ge={"fill-opacity":"0"},pe=Math.max(Oe/2,He);return Ce.append("circle").attr({"data-line-point":"start-point",cx:O?ye(x.xanchor)+x.x0:ye(x.x0),cy:F?Se(x.yanchor)-x.y0:Se(x.y0),r:pe}).style(ge).classed("cursor-grab",!0),Ce.append("circle").attr({"data-line-point":"end-point",cx:O?ye(x.xanchor)+x.x1:ye(x.x1),cy:F?Se(x.yanchor)-x.y1:Se(x.y1),r:pe}).style(ge).classed("cursor-grab",!0),Ce}function Ke(He){if(f(i)){et=null;return}if(N)He.target.tagName==="path"?et="move":et=He.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Oe=Ne.element.getBoundingClientRect(),Ce=Oe.right-Oe.left,ge=Oe.bottom-Oe.top,pe=He.clientX-Oe.left,Te=He.clientY-Oe.top,be=!V&&Ce>_&&ge>z&&!He.shiftKey?c.getCursor(pe/Ce,1-Te/ge):"move";u(C,be),et=be.split("-")[0]}}function nt(He){f(i)||(O&&(G=ye(x.xanchor)),F&&(re=Se(x.yanchor)),x.type==="path"?de=x.path:($=O?x.x0:ye(x.x0),q=F?x.y0:Se(x.y0),oe=O?x.x1:ye(x.x1),Z=F?x.y1:Se(x.y1)),$<oe?(ae=$,ne="x0",K=oe,le="x1"):(ae=oe,ne="x1",K=$,le="x0"),!F&&q<Z||F&&q>Z?(H=q,Y="y0",J=Z,ie="y1"):(H=Z,Y="y1",J=q,ie="y0"),Ke(He),Je(I,x),Ue(C,x,i),Ne.moveFn=et==="move"?vt:xt,Ne.altKey=He.altKey)}function it(){f(i)||(u(C),Pe(I),m(C,i,x),P.call("_guiRelayout",i,B.getUpdateObj()))}function lt(){f(i)||Pe(I)}function vt(He,Oe){if(x.type==="path"){var Ce=function(Te){return Te},ge=Ce,pe=Ce;O?j("xanchor",x.xanchor=_e(G+He)):(ge=function(be){return _e(ye(be)+He)},me&&me.type==="date"&&(ge=y.encodeDate(ge))),F?j("yanchor",x.yanchor=ze(re+Oe)):(pe=function(be){return ze(Se(be)+Oe)},ve&&ve.type==="date"&&(pe=y.encodeDate(pe))),j("path",x.path=E(de,ge,pe))}else O?j("xanchor",x.xanchor=_e(G+He)):(j("x0",x.x0=_e($+He)),j("x1",x.x1=_e(oe+He))),F?j("yanchor",x.yanchor=ze(re+Oe)):(j("y0",x.y0=ze(q+Oe)),j("y1",x.y1=ze(Z+Oe)));C.attr("d",h(i,x)),Je(I,x),g(i,k,x,we)}function xt(He,Oe){if(V){var Ce=function(ht){return ht},ge=Ce,pe=Ce;O?j("xanchor",x.xanchor=_e(G+He)):(ge=function(Ht){return _e(ye(Ht)+He)},me&&me.type==="date"&&(ge=y.encodeDate(ge))),F?j("yanchor",x.yanchor=ze(re+Oe)):(pe=function(Ht){return ze(Se(Ht)+Oe)},ve&&ve.type==="date"&&(pe=y.encodeDate(pe))),j("path",x.path=E(de,ge,pe))}else if(N){if(et==="resize-over-start-point"){var Te=$+He,be=F?q-Oe:q+Oe;j("x0",x.x0=O?Te:_e(Te)),j("y0",x.y0=F?be:ze(be))}else if(et==="resize-over-end-point"){var ke=oe+He,Ve=F?Z-Oe:Z+Oe;j("x1",x.x1=O?ke:_e(ke)),j("y1",x.y1=F?Ve:ze(Ve))}}else{var je=function(ht){return et.indexOf(ht)!==-1},at=je("n"),ut=je("s"),Nt=je("w"),Vt=je("e"),gt=at?H+Oe:H,Ct=ut?J+Oe:J,Yt=Nt?ae+He:ae,gr=Vt?K+He:K;F&&(at&&(gt=H-Oe),ut&&(Ct=J-Oe)),(!F&&Ct-gt>z||F&&gt-Ct>z)&&(j(Y,x[Y]=F?gt:ze(gt)),j(ie,x[ie]=F?Ct:ze(Ct))),gr-Yt>_&&(j(ne,x[ne]=O?Yt:_e(Yt)),j(le,x[le]=O?gr:_e(gr)))}C.attr("d",h(i,x)),Je(I,x),g(i,k,x,we)}function Je(He,Oe){(O||F)&&Ce();function Ce(){var ge=Oe.type!=="path",pe=He.selectAll(".visual-cue").data([0]),Te=1;pe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Te}).classed("visual-cue",!0);var be=ye(O?Oe.xanchor:o.midRange(ge?[Oe.x0,Oe.x1]:y.extractPathCoords(Oe.path,l.paramIsX))),ke=Se(F?Oe.yanchor:o.midRange(ge?[Oe.y0,Oe.y1]:y.extractPathCoords(Oe.path,l.paramIsY)));if(be=y.roundPositionForSharpStrokeRendering(be,Te),ke=y.roundPositionForSharpStrokeRendering(ke,Te),O&&F){var Ve="M"+(be-1-Te)+","+(ke-1-Te)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";pe.attr("d",Ve)}else if(O){var je="M"+(be-1-Te)+","+(ke-9-Te)+"v18 h2 v-18 Z";pe.attr("d",je)}else{var at="M"+(be-9-Te)+","+(ke-1-Te)+"h18 v2 h-18 Z";pe.attr("d",at)}}}function Pe(He){He.selectAll(".visual-cue").remove()}function Ue(He,Oe,Ce){var ge=Oe.xref,pe=Oe.yref,Te=L.getFromId(Ce,ge),be=L.getFromId(Ce,pe),ke="";ge!=="paper"&&!Te.autorange&&(ke+=ge),pe!=="paper"&&!be.autorange&&(ke+=pe),s.setClipUrl(He,ke?"clip"+Ce._fullLayout._uid+ke:null,Ce)}}function E(i,C,x){return i.replace(l.segmentRE,function(k){var I=0,B=k.charAt(0),_=l.paramIsX[B],z=l.paramIsY[B],O=l.numParams[B],F=k.substr(1).replace(l.paramRE,function(N){return I>=O||(_[I]?N=C(N):z[I]&&(N=x(N)),I++),N});return B+F})}function p(i,C){if(n(i)){var x=C.node(),k=+x.getAttribute("data-index");if(k>=0){if(k===i._fullLayout._activeShapeIndex){S(i);return}i._fullLayout._activeShapeIndex=k,i._fullLayout._deactivateShape=S,T(i)}}}function S(i){if(n(i)){var C=i._fullLayout._activeShapeIndex;C>=0&&(r(i),delete i._fullLayout._activeShapeIndex,T(i))}}function w(i){if(n(i)){r(i);var C=i._fullLayout._activeShapeIndex,x=(i.layout||{}).shapes||[];if(C<x.length){for(var k=[],I=0;I<x.length;I++)I!==C&&k.push(x[I]);return delete i._fullLayout._activeShapeIndex,P.call("_guiRelayout",i,{shapes:k})}}}},92872:function(te,X,e){var A=e(67824).overrideAll,P=e(45464),o=e(25376),L=e(98192).u,M=e(92880).extendFlat,d=e(21776).ye,g=e(97728);te.exports=A({newshape:{visible:M({},P.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:M({},P.legend,{}),legendgroup:M({},P.legendgroup,{}),legendgrouptitle:{text:M({},P.legendgrouptitle.text,{}),font:o({})},legendrank:M({},P.legendrank,{}),legendwidth:M({},P.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:M({},L,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:M({},P.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:d({newshape:!0},{keys:Object.keys(g)}),font:o({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},7e3:function(te){var X=32;te.exports={CIRCLE_SIDES:X,i000:0,i090:X/4,i180:X/2,i270:X/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},65144:function(te,X,e){var A=e(76308),P=e(3400);function o(L,M){return L?"bottom":M.indexOf("top")!==-1?"top":M.indexOf("bottom")!==-1?"bottom":"middle"}te.exports=function(M,d,g){g("newshape.visible"),g("newshape.name"),g("newshape.showlegend"),g("newshape.legend"),g("newshape.legendwidth"),g("newshape.legendgroup"),g("newshape.legendgrouptitle.text"),P.coerceFont(g,"newshape.legendgrouptitle.font"),g("newshape.legendrank"),g("newshape.drawdirection"),g("newshape.layer"),g("newshape.fillcolor"),g("newshape.fillrule"),g("newshape.opacity");var r=g("newshape.line.width");if(r){var t=(M||{}).plot_bgcolor||"#FFF";g("newshape.line.color",A.contrast(t)),g("newshape.line.dash")}var s=M.dragmode==="drawline",a=g("newshape.label.text"),c=g("newshape.label.texttemplate");if(a||c){g("newshape.label.textangle");var u=g("newshape.label.textposition",s?"middle":"middle center");g("newshape.label.xanchor"),g("newshape.label.yanchor",o(s,u)),g("newshape.label.padding"),P.coerceFont(g,"newshape.label.font",d.font)}g("activeshape.fillcolor"),g("activeshape.opacity")}},9856:function(te,X,e){var A=e(21984),P=e(7e3),o=P.CIRCLE_SIDES,L=P.SQRT2,M=e(5840),d=M.p2r,g=M.r2p,r=[0,3,4,5,6,1,2],t=[0,3,4,1,2];X.writePaths=function(c){var u=c.length;if(!u)return"M0,0Z";for(var l="",y=0;y<u;y++)for(var h=c[y].length,T=0;T<h;T++){var f=c[y][T][0];if(f==="Z")l+="Z";else for(var n=c[y][T].length,v=0;v<n;v++){var m=v;f==="Q"||f==="S"?m=t[v]:f==="C"&&(m=r[v]),l+=c[y][T][m],v>0&&v<n-1&&(l+=",")}}return l},X.readPaths=function(c,u,l,y){var h=A(c),T=[],f=-1,n=function(){f++,T[f]=[]},v,m=0,b=0,E,p,S=function(){E=m,p=b};S();for(var w=0;w<h.length;w++){var i=[],C,x,k,I,B=h[w][0],_=B;switch(B){case"M":n(),m=+h[w][1],b=+h[w][2],i.push([_,m,b]),S();break;case"Q":case"S":C=+h[w][1],k=+h[w][2],m=+h[w][3],b=+h[w][4],i.push([_,m,b,C,k]);break;case"C":C=+h[w][1],k=+h[w][2],x=+h[w][3],I=+h[w][4],m=+h[w][5],b=+h[w][6],i.push([_,m,b,C,k,x,I]);break;case"T":case"L":m=+h[w][1],b=+h[w][2],i.push([_,m,b]);break;case"H":_="L",m=+h[w][1],i.push([_,m,b]);break;case"V":_="L",b=+h[w][1],i.push([_,m,b]);break;case"A":_="L";var z=+h[w][1],O=+h[w][2];+h[w][4]||(z=-z,O=-O);var F=m-z,N=b;for(v=1;v<=o/2;v++){var V=2*Math.PI*v/o;i.push([_,F+z*Math.cos(V),N+O*Math.sin(V)])}break;case"Z":(m!==E||b!==p)&&(m=E,b=p,i.push([_,m,b]));break}for(var j=(l||{}).domain,$=u._fullLayout._size,q=l&&l.xsizemode==="pixel",oe=l&&l.ysizemode==="pixel",Z=y===!1,G=0;G<i.length;G++){for(v=0;v+2<7;v+=2){var re=i[G][v+1],H=i[G][v+2];re===void 0||H===void 0||(m=re,b=H,l&&(l.xaxis&&l.xaxis.p2r?(Z&&(re-=l.xaxis._offset),q?re=g(l.xaxis,l.xanchor)+re:re=d(l.xaxis,re)):(Z&&(re-=$.l),j?re=j.x[0]+re/$.w:re=re/$.w),l.yaxis&&l.yaxis.p2r?(Z&&(H-=l.yaxis._offset),oe?H=g(l.yaxis,l.yanchor)-H:H=d(l.yaxis,H)):(Z&&(H-=$.t),j?H=j.y[1]-H/$.h:H=1-H/$.h)),i[G][v+1]=re,i[G][v+2]=H)}T[f].push(i[G].slice())}}return T};function s(c,u){return Math.abs(c-u)<=1e-6}function a(c,u){var l=u[1]-c[1],y=u[2]-c[2];return Math.sqrt(l*l+y*y)}X.pointsOnRectangle=function(c){var u=c.length;if(u!==5)return!1;for(var l=1;l<3;l++){var y=c[0][l]-c[1][l],h=c[3][l]-c[2][l];if(!s(y,h))return!1;var T=c[0][l]-c[3][l],f=c[1][l]-c[2][l];if(!s(T,f))return!1}return!s(c[0][1],c[1][1])&&!s(c[0][1],c[3][1])?!1:!!(a(c[0],c[1])*a(c[0],c[3]))},X.pointsOnEllipse=function(c){var u=c.length;if(u!==o+1)return!1;u=o;for(var l=0;l<u;l++){var y=(u*2-l)%u,h=(u/2+y)%u,T=(u/2+l)%u;if(!s(a(c[l],c[T]),a(c[y],c[h])))return!1}return!0},X.handleEllipse=function(c,u,l){if(!c)return[u,l];var y=X.ellipseOver({x0:u[0],y0:u[1],x1:l[0],y1:l[1]}),h=(y.x1+y.x0)/2,T=(y.y1+y.y0)/2,f=(y.x1-y.x0)/2,n=(y.y1-y.y0)/2;f||(f=n=n/L),n||(n=f=f/L);for(var v=[],m=0;m<o;m++){var b=m*2*Math.PI/o;v.push([h+f*Math.cos(b),T+n*Math.sin(b)])}return v},X.ellipseOver=function(c){var u=c.x0,l=c.y0,y=c.x1,h=c.y1,T=y-u,f=h-l;u-=T,l-=f;var n=(u+y)/2,v=(l+h)/2,m=L;return T*=m,f*=m,{x0:n-T,y0:v-f,x1:n+T,y1:v+f}},X.fixDatesForPaths=function(c,u,l){var y=u.type==="date",h=l.type==="date";if(!y&&!h)return c;for(var T=0;T<c.length;T++)for(var f=0;f<c[T].length;f++)for(var n=0;n+2<c[T][f].length;n+=2)y&&(c[T][f][n+1]=c[T][f][n+1].replace(" ","_")),h&&(c[T][f][n+2]=c[T][f][n+2].replace(" ","_"));return c}},93940:function(te,X,e){var A=e(72760),P=A.drawMode,o=A.openMode,L=e(7e3),M=L.i000,d=L.i090,g=L.i180,r=L.i270,t=L.cos45,s=L.sin45,a=e(5840),c=a.p2r,u=a.r2p,l=e(1936),y=l.clearOutline,h=e(9856),T=h.readPaths,f=h.writePaths,n=h.ellipseOver,v=h.fixDatesForPaths;function m(E,p){if(E.length){var S=E[0][0];if(S){var w=p.gd,i=p.isActiveShape,C=p.dragmode,x=(w.layout||{}).shapes||[];if(!P(C)&&i!==void 0){var k=w._fullLayout._activeShapeIndex;if(k<x.length)switch(w._fullLayout.shapes[k].type){case"rect":C="drawrect";break;case"circle":C="drawcircle";break;case"line":C="drawline";break;case"path":var I=x[k].path||"";I[I.length-1]==="Z"?C="drawclosedpath":C="drawopenpath";break}}var B=b(E,p,C);y(w);for(var _=p.editHelpers,z=(_||{}).modifyItem,O=[],F=0;F<x.length;F++){var N=w._fullLayout.shapes[F];if(O[F]=N._input,i!==void 0&&F===w._fullLayout._activeShapeIndex){var V=B;switch(N.type){case"line":case"rect":case"circle":z("x0",V.x0),z("x1",V.x1),z("y0",V.y0),z("y1",V.y1);break;case"path":z("path",V.path);break}}}return i===void 0?(O.push(B),O):_?_.getUpdateObj():{}}}}function b(E,p,S){var w=E[0][0],i=p.gd,C=w.getAttribute("d"),x=i._fullLayout.newshape,k=p.plotinfo,I=p.isActiveShape,B=k.xaxis,_=k.yaxis,z=!!k.domain||!k.xaxis,O=!!k.domain||!k.yaxis,F=o(S),N=T(C,i,k,I),V={editable:!0,visible:x.visible,name:x.name,showlegend:x.showlegend,legend:x.legend,legendwidth:x.legendwidth,legendgroup:x.legendgroup,legendgrouptitle:{text:x.legendgrouptitle.text,font:x.legendgrouptitle.font},legendrank:x.legendrank,label:x.label,xref:z?"paper":B._id,yref:O?"paper":_._id,layer:x.layer,opacity:x.opacity,line:{color:x.line.color,width:x.line.width,dash:x.line.dash}};F||(V.fillcolor=x.fillcolor,V.fillrule=x.fillrule);var j;if(N.length===1&&(j=N[0]),j&&j.length===5&&S==="drawrect")V.type="rect",V.x0=j[0][1],V.y0=j[0][2],V.x1=j[2][1],V.y1=j[2][2];else if(j&&S==="drawline")V.type="line",V.x0=j[0][1],V.y0=j[0][2],V.x1=j[1][1],V.y1=j[1][2];else if(j&&S==="drawcircle"){V.type="circle";var $=j[M][1],q=j[d][1],oe=j[g][1],Z=j[r][1],G=j[M][2],re=j[d][2],H=j[g][2],J=j[r][2],ae=k.xaxis&&(k.xaxis.type==="date"||k.xaxis.type==="log"),K=k.yaxis&&(k.yaxis.type==="date"||k.yaxis.type==="log");ae&&($=u(k.xaxis,$),q=u(k.xaxis,q),oe=u(k.xaxis,oe),Z=u(k.xaxis,Z)),K&&(G=u(k.yaxis,G),re=u(k.yaxis,re),H=u(k.yaxis,H),J=u(k.yaxis,J));var Y=(q+Z)/2,ie=(G+H)/2,ne=(Z-q+oe-$)/2,le=(J-re+H-G)/2,de=n({x0:Y,y0:ie,x1:Y+ne*t,y1:ie+le*s});ae&&(de.x0=c(k.xaxis,de.x0),de.x1=c(k.xaxis,de.x1)),K&&(de.y0=c(k.yaxis,de.y0),de.y1=c(k.yaxis,de.y1)),V.x0=de.x0,V.y0=de.y0,V.x1=de.x1,V.y1=de.y1}else V.type="path",B&&_&&v(N,B,_),V.path=f(N),j=null;return V}te.exports={newShapes:m,createShapeObj:b}},1936:function(te){function X(A){var P=A._fullLayout._zoomlayer;P&&P.selectAll(".outline-controllers").remove()}function e(A){var P=A._fullLayout._zoomlayer;P&&P.selectAll(".select-outline").remove(),A._fullLayout._outlining=!1}te.exports={clearOutlineControllers:X,clearOutline:e}},65152:function(te,X,e){var A=e(85448),P=e(3400),o=e(54460);X.rangeToShapePosition=function(M){return M.type==="log"?M.r2d:function(d){return d}},X.shapePositionToRange=function(M){return M.type==="log"?M.d2r:function(d){return d}},X.decodeDate=function(M){return function(d){return d.replace&&(d=d.replace("_"," ")),M(d)}},X.encodeDate=function(M){return function(d){return M(d).replace(" ","_")}},X.extractPathCoords=function(M,d,g){var r=[],t=M.match(A.segmentRE);return t.forEach(function(s){var a=d[s.charAt(0)].drawn;if(a!==void 0){var c=s.substr(1).match(A.paramRE);if(!(!c||c.length<a)){var u=c[a],l=g?u:P.cleanNumber(u);r.push(l)}}}),r},X.getDataToPixel=function(M,d,g,r){var t=M._fullLayout._size,s;if(d)if(r==="domain")s=function(c){return d._length*(g?1-c:c)+d._offset};else{var a=X.shapePositionToRange(d);s=function(c){return d._offset+d.r2p(a(c,!0))},d.type==="date"&&(s=X.decodeDate(s))}else g?s=function(c){return t.t+t.h*(1-c)}:s=function(c){return t.l+t.w*c};return s},X.getPixelToData=function(M,d,g,r){var t=M._fullLayout._size,s;if(d)if(r==="domain")s=function(c){var u=(c-d._offset)/d._length;return g?1-u:u};else{var a=X.rangeToShapePosition(d);s=function(c){return a(d.p2r(c-d._offset))}}else g?s=function(c){return 1-(c-t.t)/t.h}:s=function(c){return(c-t.l)/t.w};return s},X.roundPositionForSharpStrokeRendering=function(M,d){var g=Math.round(d%2)===1,r=Math.round(M);return g?r+.5:r},X.makeShapesOptionsAndPlotinfo=function(M,d){var g=M._fullLayout.shapes[d]||{},r=M._fullLayout._plots[g.xref+g.yref],t=!!r;return t?r._hadPlotinfo=!0:(r={},g.xref&&g.xref!=="paper"&&(r.xaxis=M._fullLayout[g.xref+"axis"]),g.yref&&g.yref!=="paper"&&(r.yaxis=M._fullLayout[g.yref+"axis"])),r.xsizemode=g.xsizemode,r.ysizemode=g.ysizemode,r.xanchor=g.xanchor,r.yanchor=g.yanchor,{options:g,plotinfo:r}},X.makeSelectionsOptionsAndPlotinfo=function(M,d){var g=M._fullLayout.selections[d]||{},r=M._fullLayout._plots[g.xref+g.yref],t=!!r;return t?r._hadPlotinfo=!0:(r={},g.xref&&(r.xaxis=M._fullLayout[g.xref+"axis"]),g.yref&&(r.yaxis=M._fullLayout[g.yref+"axis"])),{options:g,plotinfo:r}},X.getPathString=function(M,d){var g=d.type,r=o.getRefType(d.xref),t=o.getRefType(d.yref),s=o.getFromId(M,d.xref),a=o.getFromId(M,d.yref),c=M._fullLayout._size,u,l,y,h,T,f,n,v;if(s?r==="domain"?l=function(k){return s._offset+s._length*k}:(u=X.shapePositionToRange(s),l=function(k){return s._offset+s.r2p(u(k,!0))}):l=function(k){return c.l+c.w*k},a?t==="domain"?h=function(k){return a._offset+a._length*(1-k)}:(y=X.shapePositionToRange(a),h=function(k){return a._offset+a.r2p(y(k,!0))}):h=function(k){return c.t+c.h*(1-k)},g==="path")return s&&s.type==="date"&&(l=X.decodeDate(l)),a&&a.type==="date"&&(h=X.decodeDate(h)),L(d,l,h);if(d.xsizemode==="pixel"){var m=l(d.xanchor);T=m+d.x0,f=m+d.x1}else T=l(d.x0),f=l(d.x1);if(d.ysizemode==="pixel"){var b=h(d.yanchor);n=b-d.y0,v=b-d.y1}else n=h(d.y0),v=h(d.y1);if(g==="line")return"M"+T+","+n+"L"+f+","+v;if(g==="rect")return"M"+T+","+n+"H"+f+"V"+v+"H"+T+"Z";var E=(T+f)/2,p=(n+v)/2,S=Math.abs(E-T),w=Math.abs(p-n),i="A"+S+","+w,C=E+S+","+p,x=E+","+(p-w);return"M"+C+i+" 0 1,1 "+x+i+" 0 0,1 "+C+"Z"};function L(M,d,g){var r=M.path,t=M.xsizemode,s=M.ysizemode,a=M.xanchor,c=M.yanchor;return r.replace(A.segmentRE,function(u){var l=0,y=u.charAt(0),h=A.paramIsX[y],T=A.paramIsY[y],f=A.numParams[y],n=u.substr(1).replace(A.paramRE,function(v){return h[l]?t==="pixel"?v=d(a)+Number(v):v=d(v):T[l]&&(s==="pixel"?v=g(c)-Number(v):v=g(v)),l++,l>f&&(v="X"),v});return l>f&&(n=n.replace(/[\s,]*X.*/,""),P.log("Ignoring extra params in segment "+u)),y+n})}},41592:function(te,X,e){var A=e(4016);te.exports={moduleType:"component",name:"shapes",layoutAttributes:e(46056),supplyLayoutDefaults:e(43712),supplyDrawNewShapeDefaults:e(65144),includeBasePlot:e(36632)("shapes"),calcAutorange:e(96084),draw:A.draw,drawOne:A.drawOne}},97728:function(te){function X(u,l){return l?l.d2l(u):u}function e(u,l){return l?l.l2d(u):u}function A(u){return u.x0}function P(u){return u.x1}function o(u){return u.y0}function L(u){return u.y1}function M(u,l){return X(u.x1,l)-X(u.x0,l)}function d(u,l,y){return X(u.y1,y)-X(u.y0,y)}function g(u,l){return Math.abs(M(u,l))}function r(u,l,y){return Math.abs(d(u,l,y))}function t(u,l,y){return u.type!=="line"?void 0:Math.sqrt(Math.pow(M(u,l),2)+Math.pow(d(u,l,y),2))}function s(u,l){return e((X(u.x1,l)+X(u.x0,l))/2,l)}function a(u,l,y){return e((X(u.y1,y)+X(u.y0,y))/2,y)}function c(u,l,y){return u.type!=="line"?void 0:d(u,l,y)/M(u,l)}te.exports={x0:A,x1:P,y0:o,y1:L,slope:c,dx:M,dy:d,width:g,height:r,length:t,xcenter:s,ycenter:a}},89861:function(te,X,e){var A=e(25376),P=e(66741),o=e(92880).extendDeepAll,L=e(67824).overrideAll,M=e(85656),d=e(31780).templatedArray,g=e(60876),r=d("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}});te.exports=L(d("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,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:o(P({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:M.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:A({})},font:A({}),activebgcolor:{valType:"color",dflt:g.gripBgActiveColor},bgcolor:{valType:"color",dflt:g.railBgColor},bordercolor:{valType:"color",dflt:g.railBorderColor},borderwidth:{valType:"number",min:0,dflt:g.railBorderWidth},ticklen:{valType:"number",min:0,dflt:g.tickLength},tickcolor:{valType:"color",dflt:g.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:g.minorTickLength}}),"arraydraw","from-root")},60876:function(te){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}},8132:function(te,X,e){var A=e(3400),P=e(51272),o=e(89861),L=e(60876),M=L.name,d=o.steps;te.exports=function(s,a){P(s,a,{name:M,handleItemDefaults:g})};function g(t,s,a){function c(v,m){return A.coerce(t,s,o,v,m)}for(var u=P(t,s,{name:"steps",handleItemDefaults:r}),l=0,y=0;y<u.length;y++)u[y].visible&&l++;var h;if(l<2?h=s.visible=!1:h=c("visible"),!!h){s._stepCount=l;var T=s._visibleSteps=A.filterVisible(u),f=c("active");(u[f]||{}).visible||(s.active=T[0]._index),c("x"),c("y"),A.noneOrAll(t,s,["x","y"]),c("xanchor"),c("yanchor"),c("len"),c("lenmode"),c("pad.t"),c("pad.r"),c("pad.b"),c("pad.l"),A.coerceFont(c,"font",a.font);var n=c("currentvalue.visible");n&&(c("currentvalue.xanchor"),c("currentvalue.prefix"),c("currentvalue.suffix"),c("currentvalue.offset"),A.coerceFont(c,"currentvalue.font",s.font)),c("transition.duration"),c("transition.easing"),c("bgcolor"),c("activebgcolor"),c("bordercolor"),c("borderwidth"),c("ticklen"),c("tickwidth"),c("tickcolor"),c("minorticklen")}}function r(t,s){function a(l,y){return A.coerce(t,s,d,l,y)}var c;if(t.method!=="skip"&&!Array.isArray(t.args)?c=s.visible=!1:c=a("visible"),c){a("method"),a("args");var u=a("label","step-"+s._index);a("value",u),a("execute")}}},79664:function(te,X,e){var A=e(33428),P=e(7316),o=e(76308),L=e(43616),M=e(3400),d=M.strTranslate,g=e(72736),r=e(31780).arrayEditor,t=e(60876),s=e(84284),a=s.LINE_SPACING,c=s.FROM_TL,u=s.FROM_BR;te.exports=function(z){var O=z._context.staticPlot,F=z._fullLayout,N=y(F,z),V=F._infolayer.selectAll("g."+t.containerClassName).data(N.length>0?[0]:[]);V.enter().append("g").classed(t.containerClassName,!0).style("cursor",O?null:"ew-resize");function j(Z){Z._commandObserver&&(Z._commandObserver.remove(),delete Z._commandObserver),P.autoMargin(z,l(Z))}if(V.exit().each(function(){A.select(this).selectAll("g."+t.groupClassName).each(j)}).remove(),N.length!==0){var $=V.selectAll("g."+t.groupClassName).data(N,h);$.enter().append("g").classed(t.groupClassName,!0),$.exit().each(j).remove();for(var q=0;q<N.length;q++){var oe=N[q];T(z,oe)}$.each(function(Z){var G=A.select(this);i(Z),P.manageCommandObserver(z,Z,Z._visibleSteps,function(re){var H=G.data()[0];H.active!==re.index&&(H._dragging||p(z,G,H,re.index,!1,!0))}),f(z,A.select(this),Z)})}};function l(_){return t.autoMarginIdRoot+_._index}function y(_,z){for(var O=_[t.name],F=[],N=0;N<O.length;N++){var V=O[N];V.visible&&(V._gd=z,F.push(V))}return F}function h(_){return _._index}function T(_,z){var O=L.tester.selectAll("g."+t.labelGroupClass).data(z._visibleSteps);O.enter().append("g").classed(t.labelGroupClass,!0);var F=0,N=0;O.each(function(J){var ae=A.select(this),K=m(ae,{step:J},z),Y=K.node();if(Y){var ie=L.bBox(Y);N=Math.max(N,ie.height),F=Math.max(F,ie.width)}}),O.remove();var V=z._dims={};V.inputAreaWidth=Math.max(t.railWidth,t.gripHeight);var j=_._fullLayout._size;V.lx=j.l+j.w*z.x,V.ly=j.t+j.h*(1-z.y),z.lenmode==="fraction"?V.outerLength=Math.round(j.w*z.len):V.outerLength=z.len,V.inputAreaStart=0,V.inputAreaLength=Math.round(V.outerLength-z.pad.l-z.pad.r);var $=V.inputAreaLength-2*t.stepInset,q=$/(z._stepCount-1),oe=F+t.labelPadding;if(V.labelStride=Math.max(1,Math.ceil(oe/q)),V.labelHeight=N,V.currentValueMaxWidth=0,V.currentValueHeight=0,V.currentValueTotalHeight=0,V.currentValueMaxLines=1,z.currentvalue.visible){var Z=L.tester.append("g");O.each(function(J){var ae=n(Z,z,J.label),K=ae.node()&&L.bBox(ae.node())||{width:0,height:0},Y=g.lineCount(ae);V.currentValueMaxWidth=Math.max(V.currentValueMaxWidth,Math.ceil(K.width)),V.currentValueHeight=Math.max(V.currentValueHeight,Math.ceil(K.height)),V.currentValueMaxLines=Math.max(V.currentValueMaxLines,Y)}),V.currentValueTotalHeight=V.currentValueHeight+z.currentvalue.offset,Z.remove()}V.height=V.currentValueTotalHeight+t.tickOffset+z.ticklen+t.labelOffset+V.labelHeight+z.pad.t+z.pad.b;var G="left";M.isRightAnchor(z)&&(V.lx-=V.outerLength,G="right"),M.isCenterAnchor(z)&&(V.lx-=V.outerLength/2,G="center");var re="top";M.isBottomAnchor(z)&&(V.ly-=V.height,re="bottom"),M.isMiddleAnchor(z)&&(V.ly-=V.height/2,re="middle"),V.outerLength=Math.ceil(V.outerLength),V.height=Math.ceil(V.height),V.lx=Math.round(V.lx),V.ly=Math.round(V.ly);var H={y:z.y,b:V.height*u[re],t:V.height*c[re]};z.lenmode==="fraction"?(H.l=0,H.xl=z.x-z.len*c[G],H.r=0,H.xr=z.x+z.len*u[G]):(H.x=z.x,H.l=V.outerLength*c[G],H.r=V.outerLength*u[G]),P.autoMargin(_,l(z),H)}function f(_,z,O){(O.steps[O.active]||{}).visible||(O.active=O._visibleSteps[0]._index),z.call(n,O).call(B,O).call(b,O).call(w,O).call(I,_,O).call(v,_,O);var F=O._dims;L.setTranslate(z,F.lx+O.pad.l,F.ly+O.pad.t),z.call(C,O,!1),z.call(n,O)}function n(_,z,O){if(z.currentvalue.visible){var F=z._dims,N,V;switch(z.currentvalue.xanchor){case"right":N=F.inputAreaLength-t.currentValueInset-F.currentValueMaxWidth,V="left";break;case"center":N=F.inputAreaLength*.5,V="middle";break;default:N=t.currentValueInset,V="left"}var j=M.ensureSingle(_,"text",t.labelClass,function(re){re.attr({"text-anchor":V,"data-notex":1})}),$=z.currentvalue.prefix?z.currentvalue.prefix:"";if(typeof O=="string")$+=O;else{var q=z.steps[z.active].label,oe=z._gd._fullLayout._meta;oe&&(q=M.templateString(q,oe)),$+=q}z.currentvalue.suffix&&($+=z.currentvalue.suffix),j.call(L.font,z.currentvalue.font).text($).call(g.convertToTspans,z._gd);var Z=g.lineCount(j),G=(F.currentValueMaxLines+1-Z)*z.currentvalue.font.size*a;return g.positionText(j,N,G),j}}function v(_,z,O){var F=M.ensureSingle(_,"rect",t.gripRectClass,function(N){N.call(S,z,_,O).style("pointer-events","all")});F.attr({width:t.gripWidth,height:t.gripHeight,rx:t.gripRadius,ry:t.gripRadius}).call(o.stroke,O.bordercolor).call(o.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px")}function m(_,z,O){var F=M.ensureSingle(_,"text",t.labelClass,function(j){j.attr({"text-anchor":"middle","data-notex":1})}),N=z.step.label,V=O._gd._fullLayout._meta;return V&&(N=M.templateString(N,V)),F.call(L.font,O.font).text(N).call(g.convertToTspans,O._gd),F}function b(_,z){var O=M.ensureSingle(_,"g",t.labelsClass),F=z._dims,N=O.selectAll("g."+t.labelGroupClass).data(F.labelSteps);N.enter().append("g").classed(t.labelGroupClass,!0),N.exit().remove(),N.each(function(V){var j=A.select(this);j.call(m,V,z),L.setTranslate(j,x(z,V.fraction),t.tickOffset+z.ticklen+z.font.size*a+t.labelOffset+F.currentValueTotalHeight)})}function E(_,z,O,F,N){var V=Math.round(F*(O._stepCount-1)),j=O._visibleSteps[V]._index;j!==O.active&&p(_,z,O,j,!0,N)}function p(_,z,O,F,N,V){var j=O.active;O.active=F,r(_.layout,t.name,O).applyUpdate("active",F);var $=O.steps[O.active];z.call(C,O,V),z.call(n,O),_.emit("plotly_sliderchange",{slider:O,step:O.steps[O.active],interaction:N,previousActive:j}),$&&$.method&&N&&(z._nextMethod?(z._nextMethod.step=$,z._nextMethod.doCallback=N,z._nextMethod.doTransition=V):(z._nextMethod={step:$,doCallback:N,doTransition:V},z._nextMethodRaf=window.requestAnimationFrame(function(){var q=z._nextMethod.step;q.method&&(q.execute&&P.executeAPICommand(_,q.method,q.args),z._nextMethod=null,z._nextMethodRaf=null)})))}function S(_,z,O){if(z._context.staticPlot)return;var F=O.node(),N=A.select(z);function V(){return O.data()[0]}function j(){var $=V();z.emit("plotly_sliderstart",{slider:$});var q=O.select("."+t.gripRectClass);A.event.stopPropagation(),A.event.preventDefault(),q.call(o.fill,$.activebgcolor);var oe=k($,A.mouse(F)[0]);E(z,O,$,oe,!0),$._dragging=!0;function Z(){var re=V(),H=k(re,A.mouse(F)[0]);E(z,O,re,H,!1)}N.on("mousemove",Z),N.on("touchmove",Z);function G(){var re=V();re._dragging=!1,q.call(o.fill,re.bgcolor),N.on("mouseup",null),N.on("mousemove",null),N.on("touchend",null),N.on("touchmove",null),z.emit("plotly_sliderend",{slider:re,step:re.steps[re.active]})}N.on("mouseup",G),N.on("touchend",G)}_.on("mousedown",j),_.on("touchstart",j)}function w(_,z){var O=_.selectAll("rect."+t.tickRectClass).data(z._visibleSteps),F=z._dims;O.enter().append("rect").classed(t.tickRectClass,!0),O.exit().remove(),O.attr({width:z.tickwidth+"px","shape-rendering":"crispEdges"}),O.each(function(N,V){var j=V%F.labelStride===0,$=A.select(this);$.attr({height:j?z.ticklen:z.minorticklen}).call(o.fill,z.tickcolor),L.setTranslate($,x(z,V/(z._stepCount-1))-.5*z.tickwidth,(j?t.tickOffset:t.minorTickOffset)+F.currentValueTotalHeight)})}function i(_){var z=_._dims;z.labelSteps=[];for(var O=_._stepCount,F=0;F<O;F+=z.labelStride)z.labelSteps.push({fraction:F/(O-1),step:_._visibleSteps[F]})}function C(_,z,O){for(var F=_.select("rect."+t.gripRectClass),N=0,V=0;V<z._stepCount;V++)if(z._visibleSteps[V]._index===z.active){N=V;break}var j=x(z,N/(z._stepCount-1));if(!z._invokingCommand){var $=F;O&&z.transition.duration>0&&($=$.transition().duration(z.transition.duration).ease(z.transition.easing)),$.attr("transform",d(j-t.gripWidth*.5,z._dims.currentValueTotalHeight))}}function x(_,z){var O=_._dims;return O.inputAreaStart+t.stepInset+(O.inputAreaLength-2*t.stepInset)*Math.min(1,Math.max(0,z))}function k(_,z){var O=_._dims;return Math.min(1,Math.max(0,(z-t.stepInset-O.inputAreaStart)/(O.inputAreaLength-2*t.stepInset-2*O.inputAreaStart)))}function I(_,z,O){var F=O._dims,N=M.ensureSingle(_,"rect",t.railTouchRectClass,function(V){V.call(S,z,_,O).style("pointer-events","all")});N.attr({width:F.inputAreaLength,height:Math.max(F.inputAreaWidth,t.tickOffset+O.ticklen+F.labelHeight)}).call(o.fill,O.bgcolor).attr("opacity",0),L.setTranslate(N,0,F.currentValueTotalHeight)}function B(_,z){var O=z._dims,F=O.inputAreaLength-t.railInset*2,N=M.ensureSingle(_,"rect",t.railRectClass);N.attr({width:F,height:t.railWidth,rx:t.railRadius,ry:t.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,z.bordercolor).call(o.fill,z.bgcolor).style("stroke-width",z.borderwidth+"px"),L.setTranslate(N,t.railInset,(O.inputAreaWidth-t.railWidth)*.5+O.currentValueTotalHeight)}},97544:function(te,X,e){var A=e(60876);te.exports={moduleType:"component",name:A.name,layoutAttributes:e(89861),supplyLayoutDefaults:e(8132),draw:e(79664)}},81668:function(te,X,e){var A=e(33428),P=e(38248),o=e(7316),L=e(24040),M=e(3400),d=M.strTranslate,g=e(43616),r=e(76308),t=e(72736),s=e(13448),a=e(84284).OPPOSITE_SIDE,c=/ [XY][0-9]* /;function u(l,y,h){var T=h.propContainer,f=h.propName,n=h.placeholder,v=h.traceIndex,m=h.avoid||{},b=h.attributes,E=h.transform,p=h.containerGroup,S=l._fullLayout,w=1,i=!1,C=T.title,x=(C&&C.text?C.text:"").trim(),k=C&&C.font?C.font:{},I=k.family,B=k.size,_=k.color,z;f==="title.text"?z="titleText":f.indexOf("axis")!==-1?z="axisTitleText":f.indexOf("colorbar"!==-1)&&(z="colorbarTitleText");var O=l._context.edits[z];x===""?w=0:x.replace(c," % ")===n.replace(c," % ")&&(w=.2,i=!0,O||(x="")),h._meta?x=M.templateString(x,h._meta):S._meta&&(x=M.templateString(x,S._meta));var F=x||O,N;p||(p=M.ensureSingle(S._infolayer,"g","g-"+y),N=S._hColorbarMoveTitle);var V=p.selectAll("text").data(F?[0]:[]);if(V.enter().append("text"),V.text(x).attr("class",y),V.exit().remove(),!F)return p;function j(Z){M.syncOrAsync([$,q],Z)}function $(Z){var G;return!E&&N&&(E={}),E?(G="",E.rotate&&(G+="rotate("+[E.rotate,b.x,b.y]+")"),(E.offset||N)&&(G+=d(0,(E.offset||0)-(N||0)))):G=null,Z.attr("transform",G),Z.style({"font-family":I,"font-size":A.round(B,2)+"px",fill:r.rgb(_),opacity:w*r.opacity(_),"font-weight":o.fontWeight}).attr(b).call(t.convertToTspans,l),o.previousPromises(l)}function q(Z){var G=A.select(Z.node().parentNode);if(m.selection&&m.side&&x){G.attr("transform",null);var re=a[m.side],H=m.side==="left"||m.side==="top"?-1:1,J=P(m.pad)?m.pad:2,ae=g.bBox(G.node()),K={t:0,b:0,l:0,r:0},Y=l._fullLayout._reservedMargin;for(var ie in Y)for(var ne in Y[ie]){var le=Y[ie][ne];K[ne]=Math.max(K[ne],le)}var de={left:K.l,top:K.t,right:S.width-K.r,bottom:S.height-K.b},we=m.maxShift||H*(de[m.side]-ae[m.side]),me=0;if(we<0)me=we;else{var Le=m.offsetLeft||0,ve=m.offsetTop||0;ae.left-=Le,ae.right-=Le,ae.top-=ve,ae.bottom-=ve,m.selection.each(function(){var ye=g.bBox(this);M.bBoxIntersect(ae,ye,J)&&(me=Math.max(me,H*(ye[m.side]-ae[re])+J))}),me=Math.min(we,me),T._titleScoot=Math.abs(me)}if(me>0||we<0){var Ae={left:[-me,0],right:[me,0],top:[0,-me],bottom:[0,me]}[m.side];G.attr("transform",d(Ae[0],Ae[1]))}}}V.call(j);function oe(){w=0,i=!0,V.text(n).on("mouseover.opacity",function(){A.select(this).transition().duration(s.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){A.select(this).transition().duration(s.HIDE_PLACEHOLDER).style("opacity",0)})}return O&&(x?V.on(".opacity",null):oe(),V.call(t.makeEditable,{gd:l}).on("edit",function(Z){v!==void 0?L.call("_guiRestyle",l,f,Z,v):L.call("_guiRelayout",l,f,Z)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(Z){this.text(Z||" ").call(t.positionText,b.x,b.y)})),V.classed("js-placeholder",i),p}te.exports={draw:u}},88444:function(te,X,e){var A=e(25376),P=e(22548),o=e(92880).extendFlat,L=e(67824).overrideAll,M=e(66741),d=e(31780).templatedArray,g=d("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}});te.exports=L(d("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:g,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:o(M({editType:"arraydraw"}),{}),font:A({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:P.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(te){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:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(te,X,e){var A=e(3400),P=e(51272),o=e(88444),L=e(73712),M=L.name,d=o.buttons;te.exports=function(s,a){var c={name:M,handleItemDefaults:g};P(s,a,c)};function g(t,s,a){function c(y,h){return A.coerce(t,s,o,y,h)}var u=P(t,s,{name:"buttons",handleItemDefaults:r}),l=c("visible",u.length>0);l&&(c("active"),c("direction"),c("type"),c("showactive"),c("x"),c("y"),A.noneOrAll(t,s,["x","y"]),c("xanchor"),c("yanchor"),c("pad.t"),c("pad.r"),c("pad.b"),c("pad.l"),A.coerceFont(c,"font",a.font),c("bgcolor",a.paper_bgcolor),c("bordercolor"),c("borderwidth"))}function r(t,s){function a(u,l){return A.coerce(t,s,d,u,l)}var c=a("visible",t.method==="skip"||Array.isArray(t.args));c&&(a("method"),a("args"),a("args2"),a("label"),a("execute"))}},14420:function(te,X,e){var A=e(33428),P=e(7316),o=e(76308),L=e(43616),M=e(3400),d=e(72736),g=e(31780).arrayEditor,r=e(84284).LINE_SPACING,t=e(73712),s=e(37400);te.exports=function(k){var I=k._fullLayout,B=M.filterVisible(I[t.name]);function _(q){P.autoMargin(k,w(q))}var z=I._menulayer.selectAll("g."+t.containerClassName).data(B.length>0?[0]:[]);if(z.enter().append("g").classed(t.containerClassName,!0).style("cursor","pointer"),z.exit().each(function(){A.select(this).selectAll("g."+t.headerGroupClassName).each(_)}).remove(),B.length!==0){var O=z.selectAll("g."+t.headerGroupClassName).data(B,a);O.enter().append("g").classed(t.headerGroupClassName,!0);for(var F=M.ensureSingle(z,"g",t.dropdownButtonGroupClassName,function(q){q.style("pointer-events","all")}),N=0;N<B.length;N++){var V=B[N];S(k,V)}var j="updatemenus"+I._uid,$=new s(k,F,j);O.enter().size()&&(F.node().parentNode.appendChild(F.node()),F.call(C)),O.exit().each(function(q){F.call(C),_(q)}).remove(),O.each(function(q){var oe=A.select(this),Z=q.type==="dropdown"?F:null;P.manageCommandObserver(k,q,q.buttons,function(G){l(k,q,q.buttons[G.index],oe,Z,$,G.index,!0)}),q.type==="dropdown"?(y(k,oe,F,$,q),u(F,q)&&h(k,oe,F,$,q)):h(k,oe,null,null,q)})}};function a(x){return x._index}function c(x){return+x.attr(t.menuIndexAttrName)==-1}function u(x,k){return+x.attr(t.menuIndexAttrName)===k._index}function l(x,k,I,B,_,z,O,F){k.active=O,g(x.layout,t.name,k).applyUpdate("active",O),k.type==="buttons"?h(x,B,null,null,k):k.type==="dropdown"&&(_.attr(t.menuIndexAttrName,"-1"),y(x,B,_,z,k),F||h(x,B,_,z,k))}function y(x,k,I,B,_){var z=M.ensureSingle(k,"g",t.headerClassName,function(q){q.style("pointer-events","all")}),O=_._dims,F=_.active,N=_.buttons[F]||t.blankHeaderOpts,V={y:_.pad.t,yPad:0,x:_.pad.l,xPad:0,index:0},j={width:O.headerWidth,height:O.headerHeight};z.call(n,_,N,x).call(i,_,V,j);var $=M.ensureSingle(k,"text",t.headerArrowClassName,function(q){q.attr("text-anchor","end").call(L.font,_.font).text(t.arrowSymbol[_.direction])});$.attr({x:O.headerWidth-t.arrowOffsetX+_.pad.l,y:O.headerHeight/2+t.textOffsetY+_.pad.t}),z.on("click",function(){I.call(C,String(u(I,_)?-1:_._index)),h(x,k,I,B,_)}),z.on("mouseover",function(){z.call(E)}),z.on("mouseout",function(){z.call(p,_)}),L.setTranslate(k,O.lx,O.ly)}function h(x,k,I,B,_){I||(I=k,I.attr("pointer-events","all"));var z=!c(I)||_.type==="buttons"?_.buttons:[],O=_.type==="dropdown"?t.dropdownButtonClassName:t.buttonClassName,F=I.selectAll("g."+O).data(M.filterVisible(z)),N=F.enter().append("g").classed(O,!0),V=F.exit();_.type==="dropdown"?(N.attr("opacity","0").transition().attr("opacity","1"),V.transition().attr("opacity","0").remove()):V.remove();var j=0,$=0,q=_._dims,oe=["up","down"].indexOf(_.direction)!==-1;_.type==="dropdown"&&(oe?$=q.headerHeight+t.gapButtonHeader:j=q.headerWidth+t.gapButtonHeader),_.type==="dropdown"&&_.direction==="up"&&($=-t.gapButtonHeader+t.gapButton-q.openHeight),_.type==="dropdown"&&_.direction==="left"&&(j=-t.gapButtonHeader+t.gapButton-q.openWidth);var Z={x:q.lx+j+_.pad.l,y:q.ly+$+_.pad.t,yPad:t.gapButton,xPad:t.gapButton,index:0},G={l:Z.x+_.borderwidth,t:Z.y+_.borderwidth};F.each(function(re,H){var J=A.select(this);J.call(n,_,re,x).call(i,_,Z),J.on("click",function(){A.event.defaultPrevented||(re.execute&&(re.args2&&_.active===H?(l(x,_,re,k,I,B,-1),P.executeAPICommand(x,re.method,re.args2)):(l(x,_,re,k,I,B,H),P.executeAPICommand(x,re.method,re.args))),x.emit("plotly_buttonclicked",{menu:_,button:re,active:_.active}))}),J.on("mouseover",function(){J.call(E)}),J.on("mouseout",function(){J.call(p,_),F.call(b,_)})}),F.call(b,_),oe?(G.w=Math.max(q.openWidth,q.headerWidth),G.h=Z.y-G.t):(G.w=Z.x-G.l,G.h=Math.max(q.openHeight,q.headerHeight)),G.direction=_.direction,B&&(F.size()?T(x,k,I,B,_,G):f(B))}function T(x,k,I,B,_,z){var O=_.direction,F=O==="up"||O==="down",N=_._dims,V=_.active,j,$,q;if(F)for($=0,q=0;q<V;q++)$+=N.heights[q]+t.gapButton;else for(j=0,q=0;q<V;q++)j+=N.widths[q]+t.gapButton;B.enable(z,j,$),B.hbar&&B.hbar.attr("opacity","0").transition().attr("opacity","1"),B.vbar&&B.vbar.attr("opacity","0").transition().attr("opacity","1")}function f(x){var k=!!x.hbar,I=!!x.vbar;k&&x.hbar.transition().attr("opacity","0").each("end",function(){k=!1,I||x.disable()}),I&&x.vbar.transition().attr("opacity","0").each("end",function(){I=!1,k||x.disable()})}function n(x,k,I,B){x.call(v,k).call(m,k,I,B)}function v(x,k){var I=M.ensureSingle(x,"rect",t.itemRectClassName,function(B){B.attr({rx:t.rx,ry:t.ry,"shape-rendering":"crispEdges"})});I.call(o.stroke,k.bordercolor).call(o.fill,k.bgcolor).style("stroke-width",k.borderwidth+"px")}function m(x,k,I,B){var _=M.ensureSingle(x,"text",t.itemTextClassName,function(F){F.attr({"text-anchor":"start","data-notex":1})}),z=I.label,O=B._fullLayout._meta;O&&(z=M.templateString(z,O)),_.call(L.font,k.font).text(z).call(d.convertToTspans,B)}function b(x,k){var I=k.active;x.each(function(B,_){var z=A.select(this);_===I&&k.showactive&&z.select("rect."+t.itemRectClassName).call(o.fill,t.activeColor)})}function E(x){x.select("rect."+t.itemRectClassName).call(o.fill,t.hoverColor)}function p(x,k){x.select("rect."+t.itemRectClassName).call(o.fill,k.bgcolor)}function S(x,k){var I=k._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},B=L.tester.selectAll("g."+t.dropdownButtonClassName).data(M.filterVisible(k.buttons));B.enter().append("g").classed(t.dropdownButtonClassName,!0);var _=["up","down"].indexOf(k.direction)!==-1;B.each(function(j,$){var q=A.select(this);q.call(n,k,j,x);var oe=q.select("."+t.itemTextClassName),Z=oe.node()&&L.bBox(oe.node()).width,G=Math.max(Z+t.textPadX,t.minWidth),re=k.font.size*r,H=d.lineCount(oe),J=Math.max(re*H,t.minHeight)+t.textOffsetY;J=Math.ceil(J),G=Math.ceil(G),I.widths[$]=G,I.heights[$]=J,I.height1=Math.max(I.height1,J),I.width1=Math.max(I.width1,G),_?(I.totalWidth=Math.max(I.totalWidth,G),I.openWidth=I.totalWidth,I.totalHeight+=J+t.gapButton,I.openHeight+=J+t.gapButton):(I.totalWidth+=G+t.gapButton,I.openWidth+=G+t.gapButton,I.totalHeight=Math.max(I.totalHeight,J),I.openHeight=I.totalHeight)}),_?I.totalHeight-=t.gapButton:I.totalWidth-=t.gapButton,I.headerWidth=I.width1+t.arrowPadX,I.headerHeight=I.height1,k.type==="dropdown"&&(_?(I.width1+=t.arrowPadX,I.totalHeight=I.height1):I.totalWidth=I.width1,I.totalWidth+=t.arrowPadX),B.remove();var z=I.totalWidth+k.pad.l+k.pad.r,O=I.totalHeight+k.pad.t+k.pad.b,F=x._fullLayout._size;I.lx=F.l+F.w*k.x,I.ly=F.t+F.h*(1-k.y);var N="left";M.isRightAnchor(k)&&(I.lx-=z,N="right"),M.isCenterAnchor(k)&&(I.lx-=z/2,N="center");var V="top";M.isBottomAnchor(k)&&(I.ly-=O,V="bottom"),M.isMiddleAnchor(k)&&(I.ly-=O/2,V="middle"),I.totalWidth=Math.ceil(I.totalWidth),I.totalHeight=Math.ceil(I.totalHeight),I.lx=Math.round(I.lx),I.ly=Math.round(I.ly),P.autoMargin(x,w(k),{x:k.x,y:k.y,l:z*({right:1,center:.5}[N]||0),r:z*({left:1,center:.5}[N]||0),b:O*({top:1,middle:.5}[V]||0),t:O*({bottom:1,middle:.5}[V]||0)})}function w(x){return t.autoMarginIdRoot+x._index}function i(x,k,I,B){B=B||{};var _=x.select("."+t.itemRectClassName),z=x.select("."+t.itemTextClassName),O=k.borderwidth,F=I.index,N=k._dims;L.setTranslate(x,O+I.x,O+I.y);var V=["up","down"].indexOf(k.direction)!==-1,j=B.height||(V?N.heights[F]:N.height1);_.attr({x:0,y:0,width:B.width||(V?N.width1:N.widths[F]),height:j});var $=k.font.size*r,q=d.lineCount(z),oe=(q-1)*$/2;d.positionText(z,t.textOffsetX,j/2-oe+t.textOffsetY),V?I.y+=N.heights[F]+I.yPad:I.x+=N.widths[F]+I.xPad,I.index++}function C(x,k){x.attr(t.menuIndexAttrName,k||"-1").selectAll("g."+t.dropdownButtonClassName).remove()}},76908:function(te,X,e){var A=e(73712);te.exports={moduleType:"component",name:A.name,layoutAttributes:e(88444),supplyLayoutDefaults:e(91384),draw:e(14420)}},37400:function(te,X,e){te.exports=M;var A=e(33428),P=e(76308),o=e(43616),L=e(3400);function M(d,g,r){this.gd=d,this.container=g,this.id=r,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})}M.barWidth=2,M.barLength=20,M.barRadius=2,M.barPad=1,M.barColor="#808BA4",M.prototype.enable=function(g,r,t){var s=this.gd._fullLayout,a=s.width,c=s.height;this.position=g;var u=this.position.l,l=this.position.w,y=this.position.t,h=this.position.h,T=this.position.direction,f=T==="down",n=T==="left",v=T==="right",m=T==="up",b=l,E=h,p,S,w,i;!f&&!n&&!v&&!m&&(this.position.direction="down",f=!0);var C=f||m;C?(p=u,S=p+b,f?(w=y,i=Math.min(w+E,c),E=i-w):(i=y+E,w=Math.max(i-E,0),E=i-w)):(w=y,i=w+E,n?(S=u+b,p=Math.max(S-b,0),b=S-p):(p=u,S=Math.min(p+b,a),b=S-p)),this._box={l:p,t:w,w:b,h:E};var x=l>b,k=M.barLength+2*M.barPad,I=M.barWidth+2*M.barPad,B=u,_=y+h;_+I>c&&(_=c-I);var z=this.container.selectAll("rect.scrollbar-horizontal").data(x?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(P.fill,M.barColor),x?(this.hbar=z.attr({rx:M.barRadius,ry:M.barRadius,x:B,y:_,width:k,height:I}),this._hbarXMin=B+k/2,this._hbarTranslateMax=b-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=h>E,F=M.barWidth+2*M.barPad,N=M.barLength+2*M.barPad,V=u+l,j=y;V+F>a&&(V=a-F);var $=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);$.exit().on(".drag",null).remove(),$.enter().append("rect").classed("scrollbar-vertical",!0).call(P.fill,M.barColor),O?(this.vbar=$.attr({rx:M.barRadius,ry:M.barRadius,x:V,y:j,width:F,height:N}),this._vbarYMin=j+N/2,this._vbarTranslateMax=E-N):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var q=this.id,oe=p-.5,Z=O?S+F+.5:S+.5,G=w-.5,re=x?i+I+.5:i+.5,H=s._topdefs.selectAll("#"+q).data(x||O?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",q).append("rect"),x||O?(this._clipRect=H.select("rect").attr({x:Math.floor(oe),y:Math.floor(G),width:Math.ceil(Z)-Math.floor(oe),height:Math.ceil(re)-Math.floor(G)}),this.container.call(o.setClipUrl,q,this.gd),this.bg.attr({x:u,y,width:l,height:h})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),x||O){var J=A.behavior.drag().on("dragstart",function(){A.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 ae=A.behavior.drag().on("dragstart",function(){A.event.sourceEvent.preventDefault(),A.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));x&&this.hbar.on(".drag",null).call(ae),O&&this.vbar.on(".drag",null).call(ae)}this.setTranslate(r,t)},M.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.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)},M.prototype._onBoxDrag=function(){var g=this.translateX,r=this.translateY;this.hbar&&(g-=A.event.dx),this.vbar&&(r-=A.event.dy),this.setTranslate(g,r)},M.prototype._onBoxWheel=function(){var g=this.translateX,r=this.translateY;this.hbar&&(g+=A.event.deltaY),this.vbar&&(r+=A.event.deltaY),this.setTranslate(g,r)},M.prototype._onBarDrag=function(){var g=this.translateX,r=this.translateY;if(this.hbar){var t=g+this._hbarXMin,s=t+this._hbarTranslateMax,a=L.constrain(A.event.x,t,s),c=(a-t)/(s-t),u=this.position.w-this._box.w;g=c*u}if(this.vbar){var l=r+this._vbarYMin,y=l+this._vbarTranslateMax,h=L.constrain(A.event.y,l,y),T=(h-l)/(y-l),f=this.position.h-this._box.h;r=T*f}this.setTranslate(g,r)},M.prototype.setTranslate=function(g,r){var t=this.position.w-this._box.w,s=this.position.h-this._box.h;if(g=L.constrain(g||0,0,t),r=L.constrain(r||0,0,s),this.translateX=g,this.translateY=r,this.container.call(o.setTranslate,this._box.l-this.position.l-g,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+g-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=g/t;this.hbar.call(o.setTranslate,g+a*this._hbarTranslateMax,r)}if(this.vbar){var c=r/s;this.vbar.call(o.setTranslate,g,r+c*this._vbarTranslateMax)}}},84284:function(te){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"}}},36208:function(te){te.exports={axisRefDescription:function(X,e,A){return["If set to a",X,"axis id (e.g. *"+X+"* or","*"+X+"2*), the `"+X+"` position refers to a",X,"coordinate. If set to *paper*, the `"+X+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+A+"). If set to a",X,"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",e,"of the domain of that axis: e.g.,","*"+X+"2 domain* refers to the domain of the second",X," axis and a",X,"position of 0.5 refers to the","point between the",e,"and the",A,"of the domain of the","second",X,"axis."].join(" ")}}},48164:function(te){te.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880:function(te){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"}},69104:function(te){te.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(te){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]}},87792:function(te){te.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(te){te.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(te){te.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,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:""}},2264:function(te,X){X.CSS_DECLARATIONS=[["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"]],X.STYLE=X.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")},9616:function(te,X){X.xmlns="http://www.w3.org/2000/xmlns/",X.svg="http://www.w3.org/2000/svg",X.xlink="http://www.w3.org/1999/xlink",X.svgAttrs={xmlns:X.svg,"xmlns:xlink":X.xlink}},64884:function(te,X,e){X.version=e(25788).version,e(88324),e(79288);for(var A=e(24040),P=X.register=A.register,o=e(22448),L=Object.keys(o),M=0;M<L.length;M++){var d=L[M];d.charAt(0)!=="_"&&(X[d]=o[d]),P({moduleType:"apiMethod",name:d,fn:o[d]})}P(e(65875)),P([e(79180),e(56864),e(22676),e(41592),e(7402),e(76908),e(97544),e(49692),e(41152),e(12704),e(64968),e(8932),e(55080),e(2780),e(93024),e(45460)]),P([e(6580),e(11680)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(P(window.PlotlyLocales),delete window.PlotlyLocales),X.Icons=e(9224);var g=e(93024),r=e(7316);X.Plots={resize:r.resize,graphJson:r.graphJson,sendDataToCloud:r.sendDataToCloud},X.Fx={hover:g.hover,unhover:g.unhover,loneHover:g.loneHover,loneUnhover:g.loneUnhover},X.Snapshot=e(78904),X.PlotSchema=e(73060)},9224:function(te){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)"},"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.64,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-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' 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-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},98308:function(te,X){X.isLeftAnchor=function(A){return A.xanchor==="left"||A.xanchor==="auto"&&A.x<=.3333333333333333},X.isCenterAnchor=function(A){return A.xanchor==="center"||A.xanchor==="auto"&&A.x>.3333333333333333&&A.x<.6666666666666666},X.isRightAnchor=function(A){return A.xanchor==="right"||A.xanchor==="auto"&&A.x>=.6666666666666666},X.isTopAnchor=function(A){return A.yanchor==="top"||A.yanchor==="auto"&&A.y>=.6666666666666666},X.isMiddleAnchor=function(A){return A.yanchor==="middle"||A.yanchor==="auto"&&A.y>.3333333333333333&&A.y<.6666666666666666},X.isBottomAnchor=function(A){return A.yanchor==="bottom"||A.yanchor==="auto"&&A.y<=.3333333333333333}},11864:function(te,X,e){var A=e(20435),P=A.mod,o=A.modHalf,L=Math.PI,M=2*L;function d(T){return T/180*L}function g(T){return T/L*180}function r(T){return Math.abs(T[1]-T[0])>M-1e-14}function t(T,f){return o(f-T,M)}function s(T,f){return Math.abs(t(T,f))}function a(T,f){if(r(f))return!0;var n,v;f[0]<f[1]?(n=f[0],v=f[1]):(n=f[1],v=f[0]),n=P(n,M),v=P(v,M),n>v&&(v+=M);var m=P(T,M),b=m+M;return m>=n&&m<=v||b>=n&&b<=v}function c(T,f,n,v){if(!a(f,v))return!1;var m,b;return n[0]<n[1]?(m=n[0],b=n[1]):(m=n[1],b=n[0]),T>=m&&T<=b}function u(T,f,n,v,m,b,E){m=m||0,b=b||0;var p=r([n,v]),S,w,i,C,x;p?(S=0,w=L,i=M):n<v?(S=n,i=v):(S=v,i=n),T<f?(C=T,x=f):(C=f,x=T);function k(z,O){return[z*Math.cos(O)+m,b-z*Math.sin(O)]}var I=Math.abs(i-S)<=L?0:1;function B(z,O,F){return"A"+[z,z]+" "+[0,I,F]+" "+k(z,O)}var _;return p?C===null?_="M"+k(x,S)+B(x,w,0)+B(x,i,0)+"Z":_="M"+k(C,S)+B(C,w,0)+B(C,i,0)+"ZM"+k(x,S)+B(x,w,1)+B(x,i,1)+"Z":C===null?(_="M"+k(x,S)+B(x,i,0),E&&(_+="L0,0Z")):_="M"+k(C,S)+"L"+k(x,S)+B(x,i,0)+"L"+k(C,i)+B(C,S,1)+"Z",_}function l(T,f,n,v,m){return u(null,T,f,n,v,m,0)}function y(T,f,n,v,m){return u(null,T,f,n,v,m,1)}function h(T,f,n,v,m,b){return u(T,f,n,v,m,b,1)}te.exports={deg2rad:d,rad2deg:g,angleDelta:t,angleDist:s,isFullCircle:r,isAngleInsideSector:a,isPtInsideSector:c,pathArc:l,pathSector:y,pathAnnulus:h}},38116:function(te,X,e){var A=e(83160).decode,P=e(63620),o=Array.isArray,L=ArrayBuffer,M=DataView;function d(u){return L.isView(u)&&!(u instanceof M)}X.isTypedArray=d;function g(u){return o(u)||d(u)}X.isArrayOrTypedArray=g;function r(u){return!g(u[0])}X.isArray1D=r,X.ensureArray=function(u,l){return o(u)||(u=[]),u.length=l,u};var t={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};t.uint8c=t.u1c,t.uint8=t.u1,t.int8=t.i1,t.uint16=t.u2,t.int16=t.i2,t.uint32=t.u4,t.int32=t.i4,t.float32=t.f4,t.float64=t.f8;function s(u){return u.constructor===ArrayBuffer}X.isArrayBuffer=s,X.decodeTypedArraySpec=function(u){var l=[],y=a(u),h=y.dtype,T=t[h];if(!T)throw new Error('Error in dtype: "'+h+'"');var f=T.BYTES_PER_ELEMENT,n=y.bdata;s(n)||(n=A(n));var v=y.shape===void 0?[n.byteLength/f]:(""+y.shape).split(",");v.reverse();var m=v.length,b,E,p=+v[0],S=f*p,w=0;if(m===1)l=new T(n);else if(m===2)for(b=+v[1],E=0;E<b;E++)l[E]=new T(n,w,p),w+=S;else if(m===3){b=+v[1];for(var i=+v[2],C=0;C<i;C++)for(l[C]=[],E=0;E<b;E++)l[C][E]=new T(n,w,p),w+=S}else throw new Error("ndim: "+m+'is not supported with the shape:"'+y.shape+'"');return l.bdata=y.bdata,l.dtype=y.dtype,l.shape=v.reverse().join(","),u._inputArray=l,l},X.isTypedArraySpec=function(u){return P(u)&&u.hasOwnProperty("dtype")&&typeof u.dtype=="string"&&u.hasOwnProperty("bdata")&&(typeof u.bdata=="string"||s(u.bdata))&&(u.shape===void 0||u.hasOwnProperty("shape")&&(typeof u.shape=="string"||typeof u.shape=="number"))};function a(u){return{bdata:u.bdata,dtype:u.dtype,shape:u.shape}}X.concat=function(){var u=[],l=!0,y=0,h,T,f,n,v,m,b,E;for(f=0;f<arguments.length;f++)n=arguments[f],m=n.length,m&&(T?u.push(n):(T=n,v=m),o(n)?h=!1:(l=!1,y?h!==n.constructor&&(h=!1):h=n.constructor),y+=m);if(!y)return[];if(!u.length)return T;if(l)return T.concat.apply(T,u);if(h){for(b=new h(y),b.set(T),f=0;f<u.length;f++)n=u[f],b.set(n,v),v+=n.length;return b}for(b=new Array(y),E=0;E<T.length;E++)b[E]=T[E];for(f=0;f<u.length;f++){for(n=u[f],E=0;E<n.length;E++)b[v+E]=n[E];v+=E}return b},X.maxRowLength=function(u){return c(u,Math.max,0)},X.minRowLength=function(u){return c(u,Math.min,1/0)};function c(u,l,y){if(g(u))if(g(u[0])){for(var h=y,T=0;T<u.length;T++)h=l(h,u[T].length);return h}else return u.length;return 0}},54037:function(te,X,e){var A=e(38248),P=e(39032).BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;te.exports=function(M){return typeof M=="string"&&(M=M.replace(o,"")),A(M)?Number(M):P}},73696:function(te){te.exports=function(e){var A=e._fullLayout;A._glcanvas&&A._glcanvas.size()&&A._glcanvas.each(function(P){P.regl&&P.regl.clear({color:!0,depth:!0})})}},75352:function(te){te.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},63064:function(te,X,e){var A=e(38248),P=e(49760),o=e(45464),L=e(88304),M=e(76308),d=e(13448).DESELECTDIM,g=e(22296),r=e(53756).counter,t=e(20435).modHalf,s=e(38116).isArrayOrTypedArray,a=e(38116).isTypedArraySpec,c=e(38116).decodeTypedArraySpec;X.valObjectMeta={data_array:{coerceFunction:function(l,y,h){y.set(s(l)?l:a(l)?c(l):h)}},enumerated:{coerceFunction:function(l,y,h,T){T.coerceNumber&&(l=+l),T.values.indexOf(l)===-1?y.set(h):y.set(l)},validateFunction:function(l,y){y.coerceNumber&&(l=+l);for(var h=y.values,T=0;T<h.length;T++){var f=String(h[T]);if(f.charAt(0)==="/"&&f.charAt(f.length-1)==="/"){var n=new RegExp(f.substr(1,f.length-2));if(n.test(l))return!0}else if(l===h[T])return!0}return!1}},boolean:{coerceFunction:function(l,y,h){l===!0||l===!1?y.set(l):y.set(h)}},number:{coerceFunction:function(l,y,h,T){!A(l)||T.min!==void 0&&l<T.min||T.max!==void 0&&l>T.max?y.set(h):y.set(+l)}},integer:{coerceFunction:function(l,y,h,T){l%1||!A(l)||T.min!==void 0&&l<T.min||T.max!==void 0&&l>T.max?y.set(h):y.set(+l)}},string:{coerceFunction:function(l,y,h,T){if(typeof l!="string"){var f=typeof l=="number";T.strict===!0||!f?y.set(h):y.set(String(l))}else T.noBlank&&!l?y.set(h):y.set(l)}},color:{coerceFunction:function(l,y,h){P(l).isValid()?y.set(l):y.set(h)}},colorlist:{coerceFunction:function(l,y,h){function T(f){return P(f).isValid()}!Array.isArray(l)||!l.length?y.set(h):l.every(T)?y.set(l):y.set(h)}},colorscale:{coerceFunction:function(l,y,h){y.set(L.get(l,h))}},angle:{coerceFunction:function(l,y,h){l==="auto"?y.set("auto"):A(l)?y.set(t(+l,360)):y.set(h)}},subplotid:{coerceFunction:function(l,y,h,T){var f=T.regex||r(h);if(typeof l=="string"&&f.test(l)){y.set(l);return}y.set(h)},validateFunction:function(l,y){var h=y.dflt;return l===h?!0:typeof l!="string"?!1:!!r(h).test(l)}},flaglist:{coerceFunction:function(l,y,h,T){if((T.extras||[]).indexOf(l)!==-1){y.set(l);return}if(typeof l!="string"){y.set(h);return}for(var f=l.split("+"),n=0;n<f.length;){var v=f[n];T.flags.indexOf(v)===-1||f.indexOf(v)<n?f.splice(n,1):n++}f.length?y.set(f.join("+")):y.set(h)}},any:{coerceFunction:function(l,y,h){l===void 0?y.set(h):y.set(a(l)?c(l):l)}},info_array:{coerceFunction:function(l,y,h,T){function f(B,_,z){var O,F={set:function(N){O=N}};return z===void 0&&(z=_.dflt),X.valObjectMeta[_.valType].coerceFunction(B,F,z,_),O}if(a(l)&&(l=c(l)),!s(l)){y.set(h);return}var n=T.dimensions===2||T.dimensions==="1-2"&&Array.isArray(l)&&s(l[0]),v=T.items,m=[],b=Array.isArray(v),E=b&&n&&s(v[0]),p=n&&b&&!E,S=b&&!p?v.length:l.length,w,i,C,x,k,I;if(h=Array.isArray(h)?h:[],n)for(w=0;w<S;w++)for(m[w]=[],C=s(l[w])?l[w]:[],p?k=v.length:b?k=v[w].length:k=C.length,i=0;i<k;i++)p?x=v[i]:b?x=v[w][i]:x=v,I=f(C[i],x,(h[w]||[])[i]),I!==void 0&&(m[w][i]=I);else for(w=0;w<S;w++)I=f(l[w],b?v[w]:v,h[w]),I!==void 0&&(m[w]=I);y.set(m)},validateFunction:function(l,y){if(!s(l))return!1;var h=y.items,T=Array.isArray(h),f=y.dimensions===2;if(!y.freeLength&&l.length!==h.length)return!1;for(var n=0;n<l.length;n++)if(f){if(!s(l[n])||!y.freeLength&&l[n].length!==h[n].length)return!1;for(var v=0;v<l[n].length;v++)if(!u(l[n][v],T?h[n][v]:h))return!1}else if(!u(l[n],T?h[n]:h))return!1;return!0}}},X.coerce=function(l,y,h,T,f){var n=g(h,T).get(),v=g(l,T),m=g(y,T),b=v.get(),E=y._template;if(b===void 0&&E&&(b=g(E,T).get(),E=0),f===void 0&&(f=n.dflt),n.arrayOk){if(s(b))return m.set(b),b;if(a(b))return b=c(b),m.set(b),b}var p=X.valObjectMeta[n.valType].coerceFunction;p(b,m,f,n);var S=m.get();return E&&S===f&&!u(b,n)&&(b=g(E,T).get(),p(b,m,f,n),S=m.get()),S},X.coerce2=function(l,y,h,T,f){var n=g(l,T),v=X.coerce(l,y,h,T,f),m=n.get();return m!=null?v:!1},X.coerceFont=function(l,y,h){var T={};return h=h||{},T.family=l(y+".family",h.family),T.size=l(y+".size",h.size),T.color=l(y+".color",h.color),T},X.coercePattern=function(l,y,h,T){var f=l(y+".shape");if(f){l(y+".solidity"),l(y+".size");var n=l(y+".fillmode"),v=n==="overlay";if(!T){var m=l(y+".bgcolor",v?h:void 0);l(y+".fgcolor",v?M.contrast(m):h)}l(y+".fgopacity",v?.5:1)}},X.coerceHoverinfo=function(l,y,h){var T=y._module.attributes,f=T.hoverinfo?T:o,n=f.hoverinfo,v;if(h._dataLength===1){var m=n.dflt==="all"?n.flags.slice():n.dflt.split("+");m.splice(m.indexOf("name"),1),v=m.join("+")}return X.coerce(l,y,f,"hoverinfo",v)},X.coerceSelectionMarkerOpacity=function(l,y){if(l.marker){var h=l.marker.opacity;if(h!==void 0){var T,f;!s(h)&&!l.selected&&!l.unselected&&(T=h,f=d*h),y("selected.marker.opacity",T),y("unselected.marker.opacity",f)}}};function u(l,y){var h=X.valObjectMeta[y.valType];if(y.arrayOk&&s(l))return!0;if(h.validateFunction)return h.validateFunction(l,y);var T={},f=T,n={set:function(v){f=v}};return h.coerceFunction(l,n,T,y),f!==T}X.validate=u},67555:function(te,X,e){var A=e(94336).Yn,P=e(38248),o=e(24248),L=e(20435).mod,M=e(39032),d=M.BADNUM,g=M.ONEDAY,r=M.ONEHOUR,t=M.ONEMIN,s=M.ONESEC,a=M.EPOCHJD,c=e(24040),u=e(94336).E9,l=/^\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,y=/^\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,h=new Date().getFullYear()-70;function T(_){return _&&c.componentsRegistry.calendars&&typeof _=="string"&&_!=="gregorian"}X.dateTick0=function(_,z){var O=f(_,!!z);if(z<2)return O;var F=X.dateTime2ms(O,_);return F+=g*(z-1),X.ms2DateTime(F,0,_)};function f(_,z){return T(_)?z?c.getComponentMethod("calendars","CANONICAL_SUNDAY")[_]:c.getComponentMethod("calendars","CANONICAL_TICK")[_]:z?"2000-01-02":"2000-01-01"}X.dfltRange=function(_){return T(_)?c.getComponentMethod("calendars","DFLTRANGE")[_]:["2000-01-01","2001-01-01"]},X.isJSDate=function(_){return typeof _=="object"&&_!==null&&typeof _.getTime=="function"};var n,v;X.dateTime2ms=function(_,z){if(X.isJSDate(_)){var O=_.getTimezoneOffset()*t,F=(_.getUTCMinutes()-_.getMinutes())*t+(_.getUTCSeconds()-_.getSeconds())*s+(_.getUTCMilliseconds()-_.getMilliseconds());if(F){var N=3*t;O=O-N/2+L(F-O+N/2,N)}return _=Number(_)-O,_>=n&&_<=v?_:d}if(typeof _!="string"&&typeof _!="number")return d;_=String(_);var V=T(z),j=_.charAt(0);V&&(j==="G"||j==="g")&&(_=_.substr(1),z="");var $=V&&z.substr(0,7)==="chinese",q=_.match($?y:l);if(!q)return d;var oe=q[1],Z=q[3]||"1",G=Number(q[5]||1),re=Number(q[7]||0),H=Number(q[9]||0),J=Number(q[11]||0);if(V){if(oe.length===2)return d;oe=Number(oe);var ae;try{var K=c.getComponentMethod("calendars","getCal")(z);if($){var Y=Z.charAt(Z.length-1)==="i";Z=parseInt(Z,10),ae=K.newDate(oe,K.toMonthIndex(oe,Z,Y),G)}else ae=K.newDate(oe,Number(Z),G)}catch{return d}return ae?(ae.toJD()-a)*g+re*r+H*t+J*s:d}oe.length===2?oe=(Number(oe)+2e3-h)%100+h:oe=Number(oe),Z-=1;var ie=new Date(Date.UTC(2e3,Z,G,re,H));return ie.setUTCFullYear(oe),ie.getUTCMonth()!==Z||ie.getUTCDate()!==G?d:ie.getTime()+J*s},n=X.MIN_MS=X.dateTime2ms("-9999"),v=X.MAX_MS=X.dateTime2ms("9999-12-31 23:59:59.9999"),X.isDateTime=function(_,z){return X.dateTime2ms(_,z)!==d};function m(_,z){return String(_+Math.pow(10,z)).substr(1)}var b=90*g,E=3*r,p=5*t;X.ms2DateTime=function(_,z,O){if(typeof _!="number"||!(_>=n&&_<=v))return d;z||(z=0);var F=Math.floor(L(_+.05,1)*10),N=Math.round(_-F/10),V,j,$,q,oe,Z;if(T(O)){var G=Math.floor(N/g)+a,re=Math.floor(L(_,g));try{V=c.getComponentMethod("calendars","getCal")(O).fromJD(G).formatDate("yyyy-mm-dd")}catch{V=u("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;j=z<b?Math.floor(re/r):0,$=z<b?Math.floor(re%r/t):0,q=z<E?Math.floor(re%t/s):0,oe=z<p?re%s*10+F:0}else Z=new Date(N),V=u("%Y-%m-%d")(Z),j=z<b?Z.getUTCHours():0,$=z<b?Z.getUTCMinutes():0,q=z<E?Z.getUTCSeconds():0,oe=z<p?Z.getUTCMilliseconds()*10+F:0;return S(V,j,$,q,oe)},X.ms2DateTimeLocal=function(_){if(!(_>=n+g&&_<=v-g))return d;var z=Math.floor(L(_+.05,1)*10),O=new Date(Math.round(_-z/10)),F=A("%Y-%m-%d")(O),N=O.getHours(),V=O.getMinutes(),j=O.getSeconds(),$=O.getUTCMilliseconds()*10+z;return S(F,N,V,j,$)};function S(_,z,O,F,N){if((z||O||F||N)&&(_+=" "+m(z,2)+":"+m(O,2),(F||N)&&(_+=":"+m(F,2),N))){for(var V=4;N%10===0;)V-=1,N/=10;_+="."+m(N,V)}return _}X.cleanDate=function(_,z,O){if(_===d)return z;if(X.isJSDate(_)||typeof _=="number"&&isFinite(_)){if(T(O))return o.error("JS Dates and milliseconds are incompatible with world calendars",_),z;if(_=X.ms2DateTimeLocal(+_),!_&&z!==void 0)return z}else if(!X.isDateTime(_,O))return o.error("unrecognized date",_),z;return _};var w=/%\d?f/g,i=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function x(_,z,O,F){_=_.replace(w,function(V){var j=Math.min(+V.charAt(1)||6,6),$=(z/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return $});var N=new Date(Math.floor(z+.05));if(_=_.replace(i,function(){return C[O("%q")(N)]}),T(F))try{_=c.getComponentMethod("calendars","worldCalFmt")(_,z,F)}catch{return"Invalid"}return O(_)(N)}var k=[59,59.9,59.99,59.999,59.9999];function I(_,z){var O=L(_+.05,g),F=m(Math.floor(O/r),2)+":"+m(L(Math.floor(O/t),60),2);if(z!=="M"){P(z)||(z=0);var N=Math.min(L(_/s,60),k[z]),V=(100+N).toFixed(z).substr(1);z>0&&(V=V.replace(/0+$/,"").replace(/[\.]$/,"")),F+=":"+V}return F}X.formatDate=function(_,z,O,F,N,V){if(N=T(N)&&N,!z)if(O==="y")z=V.year;else if(O==="m")z=V.month;else if(O==="d")z=V.dayMonth+`
`+V.year;else return I(_,O)+`
`+x(V.dayMonthYear,_,F,N);return x(z,_,F,N)};var B=3*g;X.incrementMonth=function(_,z,O){O=T(O)&&O;var F=L(_,g);if(_=Math.round(_-F),O)try{var N=Math.round(_/g)+a,V=c.getComponentMethod("calendars","getCal")(O),j=V.fromJD(N);return z%12?V.add(j,z,"m"):V.add(j,z/12,"y"),(j.toJD()-a)*g+F}catch{o.error("invalid ms "+_+" in calendar "+O)}var $=new Date(_+B);return $.setUTCMonth($.getUTCMonth()+z)+F-B},X.findExactDates=function(_,z){for(var O=0,F=0,N=0,V=0,j,$,q=T(z)&&c.getComponentMethod("calendars","getCal")(z),oe=0;oe<_.length;oe++){if($=_[oe],!P($)){V++;continue}if(!($%g))if(q)try{j=q.fromJD($/g+a),j.day()===1?j.month()===1?O++:F++:N++}catch{}else j=new Date($),j.getUTCDate()===1?j.getUTCMonth()===0?O++:F++:N++}F+=O,N+=F;var Z=_.length-V;return{exactYears:O/Z,exactMonths:F/Z,exactDays:N/Z}}},52200:function(te,X,e){var A=e(33428),P=e(24248),o=e(52248),L=e(36524);function M(h){var T;if(typeof h=="string"){if(T=document.getElementById(h),T===null)throw new Error("No DOM element with id '"+h+"' exists on the page.");return T}else if(h==null)throw new Error("DOM element provided is null or undefined");return h}function d(h){var T=A.select(h);return T.node()instanceof HTMLElement&&T.size()&&T.classed("js-plotly-plot")}function g(h){var T=h&&h.parentNode;T&&T.removeChild(h)}function r(h,T){t("global",h,T)}function t(h,T,f){var n="plotly.js-style-"+h,v=document.getElementById(n);v||(v=document.createElement("style"),v.setAttribute("id",n),v.appendChild(document.createTextNode("")),document.head.appendChild(v));var m=v.sheet;m.insertRule?m.insertRule(T+"{"+f+"}",0):m.addRule?m.addRule(T,f,0):P.warn("addStyleRule failed")}function s(h){var T="plotly.js-style-"+h,f=document.getElementById(T);f&&g(f)}function a(h){var T=u(h),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return T.forEach(function(n){var v=c(n);if(v){var m=o.convertCssMatrix(v);f=L.multiply(f,f,m)}}),f}function c(h){var T=window.getComputedStyle(h,null),f=T.getPropertyValue("-webkit-transform")||T.getPropertyValue("-moz-transform")||T.getPropertyValue("-ms-transform")||T.getPropertyValue("-o-transform")||T.getPropertyValue("transform");return f==="none"?null:f.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function u(h){for(var T=[];l(h);)T.push(h),h=h.parentNode;return T}function l(h){return h&&(h instanceof Element||h instanceof HTMLElement)}function y(h,T){return h&&T&&h.top===T.top&&h.left===T.left&&h.right===T.right&&h.bottom===T.bottom}te.exports={getGraphDiv:M,isPlotDiv:d,removeElement:g,addStyleRule:r,addRelatedStyleRule:t,deleteRelatedStyleRule:s,getFullTransformMatrix:a,getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:y}},95924:function(te,X,e){var A=e(61252).EventEmitter,P={init:function(o){if(o._ev instanceof A)return o;var L=new A,M=new A;return o._ev=L,o._internalEv=M,o.on=L.on.bind(L),o.once=L.once.bind(L),o.removeListener=L.removeListener.bind(L),o.removeAllListeners=L.removeAllListeners.bind(L),o._internalOn=M.on.bind(M),o._internalOnce=M.once.bind(M),o._removeInternalListener=M.removeListener.bind(M),o._removeAllInternalListeners=M.removeAllListeners.bind(M),o.emit=function(d,g){typeof jQuery<"u"&&jQuery(o).trigger(d,g),L.emit(d,g),M.emit(d,g)},o},triggerHandler:function(o,L,M){var d,g;typeof jQuery<"u"&&(d=jQuery(o).triggerHandler(L,M));var r=o._ev;if(!r)return d;var t=r._events[L];if(!t)return d;function s(c){if(c.listener){if(r.removeListener(L,c.listener),!c.fired)return c.fired=!0,c.listener.apply(r,[M])}else return c.apply(r,[M])}t=Array.isArray(t)?t:[t];var a;for(a=0;a<t.length-1;a++)s(t[a]);return g=s(t[a]),d!==void 0?d:g},purge:function(o){return delete o._ev,delete o.on,delete o.once,delete o.removeListener,delete o.removeAllListeners,delete o.emit,delete o._ev,delete o._internalEv,delete o._internalOn,delete o._internalOnce,delete o._removeInternalListener,delete o._removeAllInternalListeners,o}};te.exports=P},92880:function(te,X,e){var A=e(63620),P=Array.isArray;function o(M,d){var g,r;for(g=0;g<M.length;g++){if(r=M[g],r!==null&&typeof r=="object")return!1;r!==void 0&&(d[g]=r)}return!0}X.extendFlat=function(){return L(arguments,!1,!1,!1)},X.extendDeep=function(){return L(arguments,!0,!1,!1)},X.extendDeepAll=function(){return L(arguments,!0,!0,!1)},X.extendDeepNoArrays=function(){return L(arguments,!0,!1,!0)};function L(M,d,g,r){var t=M[0],s=M.length,a,c,u,l,y,h,T;if(s===2&&P(t)&&P(M[1])&&t.length===0){if(T=o(M[1],t),T)return t;t.splice(0,t.length)}for(var f=1;f<s;f++){a=M[f];for(c in a)u=t[c],l=a[c],r&&P(l)?t[c]=l:d&&l&&(A(l)||(y=P(l)))?(y?(y=!1,h=u&&P(u)?u:[]):h=u&&A(u)?u:{},t[c]=L([h,l],d,g,r)):(typeof l<"u"||g)&&(t[c]=l)}return t}},68944:function(te){te.exports=function(e){for(var A={},P=[],o=0,L=0;L<e.length;L++){var M=e[L];A[M]!==1&&(A[M]=1,P[o++]=M)}return P}},43880:function(te){te.exports=function(o){for(var L=A(o)?e:X,M=[],d=0;d<o.length;d++){var g=o[d];L(g)&&M.push(g)}return M};function X(P){return P.visible===!0}function e(P){var o=P[0].trace;return o.visible===!0&&o._length!==0}function A(P){return Array.isArray(P)&&Array.isArray(P[0])&&P[0][0]&&P[0][0].trace}},27144:function(te,X,e){var A=e(33428),P=e(36116),o=e(40440),L=e(77844),M=e(42428),d=e(35536),g=e(24248),r=e(63620),t=e(22296),s=e(92065),a=Object.keys(P),c={"ISO-3":d,"USA-states":d,"country names":u};function u(m){for(var b=0;b<a.length;b++){var E=a[b],p=new RegExp(P[E]);if(p.test(m.trim().toLowerCase()))return E}return g.log("Unrecognized country name: "+m+"."),!1}function l(m,b,E){if(!b||typeof b!="string")return!1;var p=c[m](b),S,w,i;if(p){if(m==="USA-states")for(S=[],i=0;i<E.length;i++)w=E[i],w.properties&&w.properties.gu&&w.properties.gu==="USA"&&S.push(w);else S=E;for(i=0;i<S.length;i++)if(w=S[i],w.id===p)return w;g.log(["Location with id",p,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function y(m){var b=m.geometry,E=b.coordinates,p=m.id,S=[],w,i,C,x;function k(I){for(var B=0;B<I.length-1;B++)if(I[B][0]>0&&I[B+1][0]<0)return B;return null}switch(p==="RUS"||p==="FJI"?w=function(I){var B;if(k(I)===null)B=I;else for(B=new Array(I.length),x=0;x<I.length;x++)B[x]=[I[x][0]<0?I[x][0]+360:I[x][0],I[x][1]];S.push(s.tester(B))}:p==="ATA"?w=function(I){var B=k(I);if(B===null)return S.push(s.tester(I));var _=new Array(I.length+1),z=0;for(x=0;x<I.length;x++)x>B?_[z++]=[I[x][0]+360,I[x][1]]:x===B?(_[z++]=I[x],_[z++]=[I[x][0],-90]):_[z++]=I[x];var O=s.tester(_);O.pts.pop(),S.push(O)}:w=function(I){S.push(s.tester(I))},b.type){case"MultiPolygon":for(i=0;i<E.length;i++)for(C=0;C<E[i].length;C++)w(E[i][C]);break;case"Polygon":for(i=0;i<E.length;i++)w(E[i]);break}return S}function h(m){var b=m.geojson,E=window.PlotlyGeoAssets||{},p=typeof b=="string"?E[b]:b;return r(p)?p:(g.error("Oops ... something went wrong when fetching "+b),!1)}function T(m){var b=m[0].trace,E=h(b);if(!E)return!1;var p={},S=[],w;for(w=0;w<b._length;w++){var i=m[w];(i.loc||i.loc===0)&&(p[i.loc]=i)}function C(I){var B=t(I,b.featureidkey||"id").get(),_=p[B];if(_){var z=I.geometry;if(z.type==="Polygon"||z.type==="MultiPolygon"){var O={type:"Feature",id:B,geometry:z,properties:{}};O.properties.ct=f(O),_.fIn=I,_.fOut=O,S.push(O)}else g.log(["Location",_.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete p[B]}switch(E.type){case"FeatureCollection":var x=E.features;for(w=0;w<x.length;w++)C(x[w]);break;case"Feature":C(E);break;default:return g.warn(["Invalid GeoJSON type",(E.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var k in p)g.log(["Location *"+k+"*","does not have a matching feature with id-key","*"+b.featureidkey+"*."].join(" "));return S}function f(m){var b=m.geometry,E;if(b.type==="MultiPolygon")for(var p=b.coordinates,S=0,w=0;w<p.length;w++){var i={type:"Polygon",coordinates:p[w]},C=o.default(i);C>S&&(S=C,E=i)}else E=b;return L.default(E).geometry.coordinates}function n(m){var b=window.PlotlyGeoAssets||{},E=[];function p(x){return new Promise(function(k,I){A.json(x,function(B,_){if(B){delete b[x];var z=B.status===404?'GeoJSON at URL "'+x+'" does not exist.':"Unexpected error while fetching from "+x;return I(new Error(z))}return b[x]=_,k(_)})})}function S(x){return new Promise(function(k,I){var B=0,_=setInterval(function(){if(b[x]&&b[x]!=="pending")return clearInterval(_),k(b[x]);if(B>100)return clearInterval(_),I("Unexpected error while fetching from "+x);B++},50)})}for(var w=0;w<m.length;w++){var i=m[w][0].trace,C=i.geojson;typeof C=="string"&&(b[C]?b[C]==="pending"&&E.push(S(C)):(b[C]="pending",E.push(p(C))))}return E}function v(m){return M.default(m)}te.exports={locationToFeature:l,feature2polygons:y,getTraceGeojson:h,extractTraceFeature:T,fetchTraceGeoData:n,computeBbox:v}},44808:function(te,X,e){var A=e(39032).BADNUM;X.calcTraceToLineCoords=function(P){for(var o=P[0].trace,L=o.connectgaps,M=[],d=[],g=0;g<P.length;g++){var r=P[g],t=r.lonlat;t[0]!==A?d.push(t):!L&&d.length>0&&(M.push(d),d=[])}return d.length>0&&M.push(d),M},X.makeLine=function(P){return P.length===1?{type:"LineString",coordinates:P[0]}:{type:"MultiLineString",coordinates:P}},X.makePolygon=function(P){if(P.length===1)return{type:"Polygon",coordinates:P};for(var o=new Array(P.length),L=0;L<P.length;L++)o[L]=[P[L]];return{type:"MultiPolygon",coordinates:o}},X.makeBlank=function(){return{type:"Point",coordinates:[]}}},92348:function(te,X,e){var A=e(20435).mod;X.segmentsIntersect=P;function P(g,r,t,s,a,c,u,l){var y=t-g,h=a-g,T=u-a,f=s-r,n=c-r,v=l-c,m=y*v-T*f;if(m===0)return null;var b=(h*v-T*n)/m,E=(h*f-y*n)/m;return E<0||E>1||b<0||b>1?null:{x:g+y*b,y:r+f*b}}X.segmentDistance=function(r,t,s,a,c,u,l,y){if(P(r,t,s,a,c,u,l,y))return 0;var h=s-r,T=a-t,f=l-c,n=y-u,v=h*h+T*T,m=f*f+n*n,b=Math.min(o(h,T,v,c-r,u-t),o(h,T,v,l-r,y-t),o(f,n,m,r-c,t-u),o(f,n,m,s-c,a-u));return Math.sqrt(b)};function o(g,r,t,s,a){var c=s*g+a*r;if(c<0)return s*s+a*a;if(c>t){var u=s-g,l=a-r;return u*u+l*l}else{var y=s*r-a*g;return y*y/t}}var L,M,d;X.getTextLocation=function(r,t,s,a){if((r!==M||a!==d)&&(L={},M=r,d=a),L[s])return L[s];var c=r.getPointAtLength(A(s-a/2,t)),u=r.getPointAtLength(A(s+a/2,t)),l=Math.atan((u.y-c.y)/(u.x-c.x)),y=r.getPointAtLength(A(s,t)),h=(y.x*4+c.x+u.x)/6,T=(y.y*4+c.y+u.y)/6,f={x:h,y:T,theta:l};return L[s]=f,f},X.clearLocationCache=function(){M=null},X.getVisibleSegment=function(r,t,s){var a=t.left,c=t.right,u=t.top,l=t.bottom,y=0,h=r.getTotalLength(),T=h,f,n;function v(b){var E=r.getPointAtLength(b);b===0?f=E:b===h&&(n=E);var p=E.x<a?a-E.x:E.x>c?E.x-c:0,S=E.y<u?u-E.y:E.y>l?E.y-l:0;return Math.sqrt(p*p+S*S)}for(var m=v(y);m;){if(y+=m+s,y>T)return;m=v(y)}for(m=v(T);m;){if(T-=m+s,y>T)return;m=v(T)}return{min:y,max:T,len:T-y,total:h,isClosed:y===0&&T===h&&Math.abs(f.x-n.x)<.1&&Math.abs(f.y-n.y)<.1}},X.findPointOnPath=function(r,t,s,a){a=a||{};for(var c=a.pathLength||r.getTotalLength(),u=a.tolerance||.001,l=a.iterationLimit||30,y=r.getPointAtLength(0)[s]>r.getPointAtLength(c)[s]?-1:1,h=0,T=0,f=c,n,v,m;h<l;){if(n=(T+f)/2,v=r.getPointAtLength(n),m=v[s]-t,Math.abs(m)<u)return v;y*m>0?f=n:T=n,h++}return v}},33040:function(te,X,e){var A=e(38248),P=e(49760),o=e(72160),L=e(8932),M=e(22548).defaultLine,d=e(38116).isArrayOrTypedArray,g=o(M),r=1;function t(l,y){var h=l;return h[3]*=y,h}function s(l){if(A(l))return g;var y=o(l);return y.length?y:g}function a(l){return A(l)?l:r}function c(l,y,h){var T=l.color;T&&T._inputArray&&(T=T._inputArray);var f=d(T),n=d(y),v=L.extractOpts(l),m=[],b,E,p,S,w;if(v.colorscale!==void 0?b=L.makeColorScaleFuncFromTrace(l):b=s,f?E=function(C,x){return C[x]===void 0?g:o(b(C[x]))}:E=s,n?p=function(C,x){return C[x]===void 0?r:a(C[x])}:p=a,f||n)for(var i=0;i<h;i++)S=E(T,i),w=p(y,i),m[i]=t(S,w);else m=t(o(T),y);return m}function u(l){var y=L.extractOpts(l),h=y.colorscale;return y.reversescale&&(h=L.flipScale(y.colorscale)),h.map(function(T){var f=T[0],n=P(T[1]),v=n.toRgb();return{index:f,rgb:[v.r,v.g,v.b,v.a]}})}te.exports={formatColor:c,parseColorScale:u}},71688:function(te,X,e){var A=e(35536);function P(o){return[o]}te.exports={keyFun:function(o){return o.key},repeat:P,descend:A,wrap:P,unwrap:function(o){return o[0]}}},35536:function(te){te.exports=function(e){return e}},1396:function(te){te.exports=function(e,A){if(!A)return e;var P=1/Math.abs(A),o=P>1?(P*e+P*A)/P:e+A,L=String(o).length;if(L>16){var M=String(A).length,d=String(e).length;if(L>=d+M){var g=parseFloat(o).toPrecision(12);g.indexOf("e+")===-1&&(o=+g)}}return o}},3400:function(te,X,e){var A=e(33428),P=e(94336).E9,o=e(57624).E9,L=e(38248),M=e(39032),d=M.FP_SAFE,g=-d,r=M.BADNUM,t=te.exports={};t.adjustFormat=function(ae){return!ae||/^\d[.]\df/.test(ae)||/[.]\d%/.test(ae)?ae:ae==="0.f"?"~f":/^\d%/.test(ae)?"~%":/^\ds/.test(ae)?"~s":!/^[~,.0$]/.test(ae)&&/[&fps]/.test(ae)?"~"+ae:ae};var s={};t.warnBadFormat=function(J){var ae=String(J);s[ae]||(s[ae]=1,t.warn('encountered bad format: "'+ae+'"'))},t.noFormat=function(J){return String(J)},t.numberFormat=function(J){var ae;try{ae=o(t.adjustFormat(J))}catch{return t.warnBadFormat(J),t.noFormat}return ae},t.nestedProperty=e(22296),t.keyedContainer=e(37804),t.relativeAttr=e(23193),t.isPlainObject=e(63620),t.toLogRange=e(36896),t.relinkPrivateKeys=e(51528);var a=e(38116);t.isArrayBuffer=a.isArrayBuffer,t.isTypedArray=a.isTypedArray,t.isArrayOrTypedArray=a.isArrayOrTypedArray,t.isArray1D=a.isArray1D,t.ensureArray=a.ensureArray,t.concat=a.concat,t.maxRowLength=a.maxRowLength,t.minRowLength=a.minRowLength;var c=e(20435);t.mod=c.mod,t.modHalf=c.modHalf;var u=e(63064);t.valObjectMeta=u.valObjectMeta,t.coerce=u.coerce,t.coerce2=u.coerce2,t.coerceFont=u.coerceFont,t.coercePattern=u.coercePattern,t.coerceHoverinfo=u.coerceHoverinfo,t.coerceSelectionMarkerOpacity=u.coerceSelectionMarkerOpacity,t.validate=u.validate;var l=e(67555);t.dateTime2ms=l.dateTime2ms,t.isDateTime=l.isDateTime,t.ms2DateTime=l.ms2DateTime,t.ms2DateTimeLocal=l.ms2DateTimeLocal,t.cleanDate=l.cleanDate,t.isJSDate=l.isJSDate,t.formatDate=l.formatDate,t.incrementMonth=l.incrementMonth,t.dateTick0=l.dateTick0,t.dfltRange=l.dfltRange,t.findExactDates=l.findExactDates,t.MIN_MS=l.MIN_MS,t.MAX_MS=l.MAX_MS;var y=e(14952);t.findBin=y.findBin,t.sorterAsc=y.sorterAsc,t.sorterDes=y.sorterDes,t.distinctVals=y.distinctVals,t.roundUp=y.roundUp,t.sort=y.sort,t.findIndexOfMin=y.findIndexOfMin,t.sortObjectKeys=e(95376);var h=e(63084);t.aggNums=h.aggNums,t.len=h.len,t.mean=h.mean,t.median=h.median,t.midRange=h.midRange,t.variance=h.variance,t.stdev=h.stdev,t.interp=h.interp;var T=e(52248);t.init2dArray=T.init2dArray,t.transposeRagged=T.transposeRagged,t.dot=T.dot,t.translationMatrix=T.translationMatrix,t.rotationMatrix=T.rotationMatrix,t.rotationXYMatrix=T.rotationXYMatrix,t.apply3DTransform=T.apply3DTransform,t.apply2DTransform=T.apply2DTransform,t.apply2DTransform2=T.apply2DTransform2,t.convertCssMatrix=T.convertCssMatrix,t.inverseTransformMatrix=T.inverseTransformMatrix;var f=e(11864);t.deg2rad=f.deg2rad,t.rad2deg=f.rad2deg,t.angleDelta=f.angleDelta,t.angleDist=f.angleDist,t.isFullCircle=f.isFullCircle,t.isAngleInsideSector=f.isAngleInsideSector,t.isPtInsideSector=f.isPtInsideSector,t.pathArc=f.pathArc,t.pathSector=f.pathSector,t.pathAnnulus=f.pathAnnulus;var n=e(98308);t.isLeftAnchor=n.isLeftAnchor,t.isCenterAnchor=n.isCenterAnchor,t.isRightAnchor=n.isRightAnchor,t.isTopAnchor=n.isTopAnchor,t.isMiddleAnchor=n.isMiddleAnchor,t.isBottomAnchor=n.isBottomAnchor;var v=e(92348);t.segmentsIntersect=v.segmentsIntersect,t.segmentDistance=v.segmentDistance,t.getTextLocation=v.getTextLocation,t.clearLocationCache=v.clearLocationCache,t.getVisibleSegment=v.getVisibleSegment,t.findPointOnPath=v.findPointOnPath;var m=e(92880);t.extendFlat=m.extendFlat,t.extendDeep=m.extendDeep,t.extendDeepAll=m.extendDeepAll,t.extendDeepNoArrays=m.extendDeepNoArrays;var b=e(24248);t.log=b.log,t.warn=b.warn,t.error=b.error;var E=e(53756);t.counterRegex=E.counter;var p=e(91200);t.throttle=p.throttle,t.throttleDone=p.done,t.clearThrottle=p.clear;var S=e(52200);t.getGraphDiv=S.getGraphDiv,t.isPlotDiv=S.isPlotDiv,t.removeElement=S.removeElement,t.addStyleRule=S.addStyleRule,t.addRelatedStyleRule=S.addRelatedStyleRule,t.deleteRelatedStyleRule=S.deleteRelatedStyleRule,t.getFullTransformMatrix=S.getFullTransformMatrix,t.getElementTransformMatrix=S.getElementTransformMatrix,t.getElementAndAncestors=S.getElementAndAncestors,t.equalDomRects=S.equalDomRects,t.clearResponsive=e(75352),t.preserveDrawingBuffer=e(34296),t.makeTraceGroups=e(30988),t._=e(98356),t.notifier=e(41792),t.filterUnique=e(68944),t.filterVisible=e(43880),t.pushUnique=e(52416),t.increment=e(1396),t.cleanNumber=e(54037),t.ensureNumber=function(ae){return L(ae)?(ae=Number(ae),ae>d||ae<g?r:ae):r},t.isIndex=function(J,ae){return ae!==void 0&&J>=ae?!1:L(J)&&J>=0&&J%1===0},t.noop=e(16628),t.identity=e(35536),t.repeat=function(J,ae){for(var K=new Array(ae),Y=0;Y<ae;Y++)K[Y]=J;return K},t.swapAttrs=function(J,ae,K,Y){K||(K="x"),Y||(Y="y");for(var ie=0;ie<ae.length;ie++){var ne=ae[ie],le=t.nestedProperty(J,ne.replace("?",K)),de=t.nestedProperty(J,ne.replace("?",Y)),we=le.get();le.set(de.get()),de.set(we)}},t.raiseToTop=function(ae){ae.parentNode.appendChild(ae)},t.cancelTransition=function(J){return J.transition().duration(0)},t.constrain=function(J,ae,K){return ae>K?Math.max(K,Math.min(ae,J)):Math.max(ae,Math.min(K,J))},t.bBoxIntersect=function(J,ae,K){return K=K||0,J.left<=ae.right+K&&ae.left<=J.right+K&&J.top<=ae.bottom+K&&ae.top<=J.bottom+K},t.simpleMap=function(J,ae,K,Y,ie){for(var ne=J.length,le=new Array(ne),de=0;de<ne;de++)le[de]=ae(J[de],K,Y,ie);return le},t.randstr=function J(ae,K,Y,ie){if(Y||(Y=16),K===void 0&&(K=24),K<=0)return"0";var ne=Math.log(Math.pow(2,K))/Math.log(Y),le="",de,we,me;for(de=2;ne===1/0;de*=2)ne=Math.log(Math.pow(2,K/de))/Math.log(Y)*de;var Le=ne-Math.floor(ne);for(de=0;de<Math.floor(ne);de++)me=Math.floor(Math.random()*Y).toString(Y),le=me+le;Le&&(we=Math.pow(Y,Le),me=Math.floor(Math.random()*we).toString(Y),le=me+le);var ve=parseInt(le,Y);return ae&&ae[le]||ve!==1/0&&ve>=Math.pow(2,K)?ie>10?(t.warn("randstr failed uniqueness"),le):J(ae,K,Y,(ie||0)+1):le},t.OptionControl=function(J,ae){J||(J={}),ae||(ae="opt");var K={};return K.optionList=[],K._newoption=function(Y){Y[ae]=J,K[Y.name]=Y,K.optionList.push(Y)},K["_"+ae]=J,K},t.smooth=function(J,ae){if(ae=Math.round(ae)||0,ae<2)return J;var K=J.length,Y=2*K,ie=2*ae-1,ne=new Array(ie),le=new Array(K),de,we,me,Le;for(de=0;de<ie;de++)ne[de]=(1-Math.cos(Math.PI*(de+1)/ae))/(2*ae);for(de=0;de<K;de++){for(Le=0,we=0;we<ie;we++)me=de+we+1-ae,me<-K?me-=Y*Math.round(me/Y):me>=Y&&(me-=Y*Math.floor(me/Y)),me<0?me=-1-me:me>=K&&(me=Y-1-me),Le+=J[me]*ne[we];le[de]=Le}return le},t.syncOrAsync=function(J,ae,K){var Y,ie;function ne(){return t.syncOrAsync(J,ae,K)}for(;J.length;)if(ie=J.splice(0,1)[0],Y=ie(ae),Y&&Y.then)return Y.then(ne);return K&&K(ae)},t.stripTrailingSlash=function(J){return J.substr(-1)==="/"?J.substr(0,J.length-1):J},t.noneOrAll=function(J,ae,K){if(J){var Y=!1,ie=!0,ne,le;for(ne=0;ne<K.length;ne++)le=J[K[ne]],le!=null?Y=!0:ie=!1;if(Y&&!ie)for(ne=0;ne<K.length;ne++)J[K[ne]]=ae[K[ne]]}},t.mergeArray=function(J,ae,K,Y){var ie=typeof Y=="function";if(t.isArrayOrTypedArray(J))for(var ne=Math.min(J.length,ae.length),le=0;le<ne;le++){var de=J[le];ae[le][K]=ie?Y(de):de}},t.mergeArrayCastPositive=function(J,ae,K){return t.mergeArray(J,ae,K,function(Y){var ie=+Y;return isFinite(ie)&&ie>0?ie:0})},t.fillArray=function(J,ae,K,Y){if(Y=Y||t.identity,t.isArrayOrTypedArray(J))for(var ie=0;ie<ae.length;ie++)ae[ie][K]=Y(J[ie])},t.castOption=function(J,ae,K,Y){Y=Y||t.identity;var ie=t.nestedProperty(J,K).get();return t.isArrayOrTypedArray(ie)?Array.isArray(ae)&&t.isArrayOrTypedArray(ie[ae[0]])?Y(ie[ae[0]][ae[1]]):Y(ie[ae]):ie},t.extractOption=function(J,ae,K,Y){if(K in J)return J[K];var ie=t.nestedProperty(ae,Y).get();if(!Array.isArray(ie))return ie};function w(J){var ae={};for(var K in J)for(var Y=J[K],ie=0;ie<Y.length;ie++)ae[Y[ie]]=+K;return ae}t.tagSelected=function(J,ae,K){var Y=ae.selectedpoints,ie=ae._indexToPoints,ne;ie&&(ne=w(ie));function le(ve){return ve!==void 0&&ve<J.length}for(var de=0;de<Y.length;de++){var we=Y[de];if(t.isIndex(we)||t.isArrayOrTypedArray(we)&&t.isIndex(we[0])&&t.isIndex(we[1])){var me=ne?ne[we]:we,Le=K?K[me]:me;le(Le)&&(J[Le].selected=1)}}},t.selIndices2selPoints=function(J){var ae=J.selectedpoints,K=J._indexToPoints;if(K){for(var Y=w(K),ie=[],ne=0;ne<ae.length;ne++){var le=ae[ne];if(t.isIndex(le)){var de=Y[le];t.isIndex(de)&&ie.push(de)}}return ie}else return ae},t.getTargetArray=function(J,ae){var K=ae.target;if(typeof K=="string"&&K){var Y=t.nestedProperty(J,K).get();return t.isArrayOrTypedArray(Y)?Y:!1}else if(t.isArrayOrTypedArray(K))return K;return!1};function i(J,ae,K){var Y={};typeof ae!="object"&&(ae={});var ie=K==="pieLike"?-1:3,ne=Object.keys(J),le,de,we;for(le=0;le<ne.length;le++)de=ne[le],we=J[de],!(de.charAt(0)==="_"||typeof we=="function")&&(de==="module"?Y[de]=we:Array.isArray(we)?de==="colorscale"||ie===-1?Y[de]=we.slice():Y[de]=we.slice(0,ie):t.isTypedArray(we)?ie===-1?Y[de]=we.subarray():Y[de]=we.subarray(0,ie):we&&typeof we=="object"?Y[de]=i(J[de],ae[de],K):Y[de]=we);for(ne=Object.keys(ae),le=0;le<ne.length;le++)de=ne[le],we=ae[de],(typeof we!="object"||!(de in Y)||typeof Y[de]!="object")&&(Y[de]=we);return Y}t.minExtend=i,t.titleCase=function(J){return J.charAt(0).toUpperCase()+J.substr(1)},t.containsAny=function(J,ae){for(var K=0;K<ae.length;K++)if(J.indexOf(ae[K])!==-1)return!0;return!1},t.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var C=/Version\/[\d\.]+.*Safari/;t.isSafari=function(){return C.test(window.navigator.userAgent)};var x=/iPad|iPhone|iPod/;t.isIOS=function(){return x.test(window.navigator.userAgent)};var k=/Firefox\/(\d+)\.\d+/;t.getFirefoxVersion=function(){var J=k.exec(window.navigator.userAgent);if(J&&J.length===2){var ae=parseInt(J[1]);if(!isNaN(ae))return ae}return null},t.isD3Selection=function(J){return J instanceof A.selection},t.ensureSingle=function(J,ae,K,Y){var ie=J.select(ae+(K?"."+K:""));if(ie.size())return ie;var ne=J.append(ae);return K&&ne.classed(K,!0),Y&&ne.call(Y),ne},t.ensureSingleById=function(J,ae,K,Y){var ie=J.select(ae+"#"+K);if(ie.size())return ie;var ne=J.append(ae).attr("id",K);return Y&&ne.call(Y),ne},t.objectFromPath=function(J,ae){for(var K=J.split("."),Y,ie=Y={},ne=0;ne<K.length;ne++){var le=K[ne],de=null,we=K[ne].match(/(.*)\[([0-9]+)\]/);we?(le=we[1],de=we[2],Y=Y[le]=[],ne===K.length-1?Y[de]=ae:Y[de]={},Y=Y[de]):(ne===K.length-1?Y[le]=ae:Y[le]={},Y=Y[le])}return ie};var I=/^([^\[\.]+)\.(.+)?/,B=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function _(J){return J.slice(0,2)==="__"}t.expandObjectPaths=function(J){var ae,K,Y,ie,ne,le,de;if(typeof J=="object"&&!Array.isArray(J)){for(K in J)if(J.hasOwnProperty(K))if(ae=K.match(I)){if(ie=J[K],Y=ae[1],_(Y))continue;delete J[K],J[Y]=t.extendDeepNoArrays(J[Y]||{},t.objectFromPath(K,t.expandObjectPaths(ie))[Y])}else if(ae=K.match(B)){if(ie=J[K],Y=ae[1],_(Y))continue;if(ne=parseInt(ae[2]),delete J[K],J[Y]=J[Y]||[],ae[3]===".")de=ae[4],le=J[Y][ne]=J[Y][ne]||{},t.extendDeepNoArrays(le,t.objectFromPath(de,t.expandObjectPaths(ie)));else{if(_(Y))continue;J[Y][ne]=t.expandObjectPaths(ie)}}else{if(_(K))continue;J[K]=t.expandObjectPaths(J[K])}}return J},t.numSeparate=function(J,ae,K){if(K||(K=!1),typeof ae!="string"||ae.length===0)throw new Error("Separator string required for formatting!");typeof J=="number"&&(J=String(J));var Y=/(\d+)(\d{3})/,ie=ae.charAt(0),ne=ae.charAt(1),le=J.split("."),de=le[0],we=le.length>1?ie+le[1]:"";if(ne&&(le.length>1||de.length>4||K))for(;Y.test(de);)de=de.replace(Y,"$1"+ne+"$2");return de+we},t.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;t.templateString=function(J,ae){var K={};return J.replace(t.TEMPLATE_STRING_REGEX,function(Y,ie){var ne;return z.test(ie)?ne=ae[ie]:(K[ie]=K[ie]||t.nestedProperty(ae,ie).get,ne=K[ie]()),t.isValidTextValue(ne)?ne:""})};var O={max:10,count:0,name:"hovertemplate"};t.hovertemplateString=function(){return q.apply(O,arguments)};var F={max:10,count:0,name:"texttemplate"};t.texttemplateString=function(){return q.apply(F,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function V(J){var ae=J.match(N);return ae?{key:ae[1],op:ae[2],number:Number(ae[3])}:{key:J,op:null,number:null}}var j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};t.texttemplateStringForShapes=function(){return q.apply(j,arguments)};var $=/^[:|\|]/;function q(J,ae,K){var Y=this,ie=arguments;ae||(ae={});var ne={};return J.replace(t.TEMPLATE_STRING_REGEX,function(le,de,we){var me=de==="xother"||de==="yother",Le=de==="_xother"||de==="_yother",ve=de==="_xother_"||de==="_yother_",Ae=de==="xother_"||de==="yother_",ye=me||Le||Ae||ve,Se=de;(Le||ve)&&(Se=Se.substring(1)),(Ae||ve)&&(Se=Se.substring(0,Se.length-1));var _e=null,ze=null;if(Y.parseMultDiv){var Ie=V(Se);Se=Ie.key,_e=Ie.op,ze=Ie.number}var Ne;if(ye){if(Ne=ae[Se],Ne===void 0)return""}else{var et,st;for(st=3;st<ie.length;st++)if(et=ie[st],!!et){if(et.hasOwnProperty(Se)){Ne=et[Se];break}if(z.test(Se)||(Ne=t.nestedProperty(et,Se).get(),Ne=ne[Se]||t.nestedProperty(et,Se).get(),Ne&&(ne[Se]=Ne)),Ne!==void 0)break}}if(Ne!==void 0&&(_e==="*"&&(Ne*=ze),_e==="/"&&(Ne/=ze)),Ne===void 0&&Y)return Y.count<Y.max&&(t.warn("Variable '"+Se+"' in "+Y.name+" could not be found!"),Ne=le),Y.count===Y.max&&t.warn("Too many "+Y.name+" warnings - additional warnings will be suppressed"),Y.count++,le;if(we){var Ze;if(we[0]===":"&&(Ze=K?K.numberFormat:t.numberFormat,Ne!==""&&(Ne=Ze(we.replace($,""))(Ne))),we[0]==="|"){Ze=K?K.timeFormat:P;var Ke=t.dateTime2ms(Ne);Ne=t.formatDate(Ke,we.replace($,""),!1,Ze)}}else{var nt=Se+"Label";ae.hasOwnProperty(nt)&&(Ne=ae[nt])}return ye&&(Ne="("+Ne+")",(Le||ve)&&(Ne=" "+Ne),(Ae||ve)&&(Ne=Ne+" ")),Ne})}var oe=48,Z=57;t.subplotSort=function(J,ae){for(var K=Math.min(J.length,ae.length)+1,Y=0,ie=0,ne=0;ne<K;ne++){var le=J.charCodeAt(ne)||0,de=ae.charCodeAt(ne)||0,we=le>=oe&&le<=Z,me=de>=oe&&de<=Z;if(we&&(Y=10*Y+le-oe),me&&(ie=10*ie+de-oe),!we||!me){if(Y!==ie)return Y-ie;if(le!==de)return le-de}}return ie-Y};var G=2e9;t.seedPseudoRandom=function(){G=2e9},t.pseudoRandom=function(){var J=G;return G=(69069*G+1)%4294967296,Math.abs(G-J)<429496729?t.pseudoRandom():G/4294967296},t.fillText=function(J,ae,K){var Y=Array.isArray(K)?function(le){K.push(le)}:function(le){K.text=le},ie=t.extractOption(J,ae,"htx","hovertext");if(t.isValidTextValue(ie))return Y(ie);var ne=t.extractOption(J,ae,"tx","text");if(t.isValidTextValue(ne))return Y(ne)},t.isValidTextValue=function(J){return J||J===0},t.formatPercent=function(J,ae){ae=ae||0;for(var K=(Math.round(100*J*Math.pow(10,ae))*Math.pow(.1,ae)).toFixed(ae)+"%",Y=0;Y<ae;Y++)K.indexOf(".")!==-1&&(K=K.replace("0%","%"),K=K.replace(".%","%"));return K},t.isHidden=function(J){var ae=window.getComputedStyle(J).display;return!ae||ae==="none"},t.strTranslate=function(J,ae){return J||ae?"translate("+J+","+ae+")":""},t.strRotate=function(J){return J?"rotate("+J+")":""},t.strScale=function(J){return J!==1?"scale("+J+")":""},t.getTextTransform=function(J){var ae=J.noCenter,K=J.textX,Y=J.textY,ie=J.targetX,ne=J.targetY,le=J.anchorX||0,de=J.anchorY||0,we=J.rotate,me=J.scale;return me?me>1&&(me=1):me=0,t.strTranslate(ie-me*(K+le),ne-me*(Y+de))+t.strScale(me)+(we?"rotate("+we+(ae?"":" "+K+" "+Y)+")":"")},t.setTransormAndDisplay=function(J,ae){J.attr("transform",t.getTextTransform(ae)),J.style("display",ae.scale?null:"none")},t.ensureUniformFontSize=function(J,ae){var K=t.extendFlat({},ae);return K.size=Math.max(ae.size,J._fullLayout.uniformtext.minsize||0),K},t.join2=function(J,ae,K){var Y=J.length;return Y>1?J.slice(0,-1).join(ae)+K+J[Y-1]:J.join(ae)},t.bigFont=function(J){return Math.round(1.2*J)};var re=t.getFirefoxVersion(),H=re!==null&&re<86;t.getPositionFromD3Event=function(){return H?[A.event.layerX,A.event.layerY]:[A.event.offsetX,A.event.offsetY]}},63620:function(te){te.exports=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},37804:function(te,X,e){var A=e(22296),P=/^\w*$/,o=0,L=1,M=2,d=3,g=4;te.exports=function(t,s,a,c){a=a||"name",c=c||"value";var u,l,y,h={};s&&s.length?(y=A(t,s),l=y.get()):l=t,s=s||"";var T={};if(l)for(u=0;u<l.length;u++)T[l[u][a]]=u;var f=P.test(c),n={set:function(v,m){var b=m===null?g:o;if(!l){if(!y||b===g)return;l=[],y.set(l)}var E=T[v];if(E===void 0){if(b===g)return;b=b|d,E=l.length,T[v]=E}else m!==(f?l[E][c]:A(l[E],c).get())&&(b=b|M);var p=l[E]=l[E]||{};return p[a]=v,f?p[c]=m:A(p,c).set(m),m!==null&&(b=b&-5),h[E]=h[E]|b,n},get:function(v){if(l){var m=T[v];if(m!==void 0)return f?l[m][c]:A(l[m],c).get()}},rename:function(v,m){var b=T[v];return b===void 0||(h[b]=h[b]|L,T[m]=b,delete T[v],l[b][a]=m),n},remove:function(v){var m=T[v];if(m===void 0)return n;var b=l[m];if(Object.keys(b).length>2)return h[m]=h[m]|M,n.set(v,null);if(f){for(u=m;u<l.length;u++)h[u]=h[u]|d;for(u=m;u<l.length;u++)T[l[u][a]]--;l.splice(m,1),delete T[v]}else A(b,c).set(null),h[m]=h[m]|M|g;return n},constructUpdate:function(){for(var v,m,b={},E=Object.keys(h),p=0;p<E.length;p++)m=E[p],v=s+"["+m+"]",l[m]?(h[m]&L&&(b[v+"."+a]=l[m][a]),h[m]&M&&(f?b[v+"."+c]=h[m]&g?null:l[m][c]:b[v+"."+c]=h[m]&g?null:A(l[m],c).get())):b[v]=null;return b}};return n}},98356:function(te,X,e){var A=e(24040);te.exports=function(o,L){for(var M=o._context.locale,d=0;d<2;d++){for(var g=o._context.locales,r=0;r<2;r++){var t=(g[M]||{}).dictionary;if(t){var s=t[L];if(s)return s}g=A.localeRegistry}var a=M.split("-")[0];if(a===M)break;M=a}return L}},24248:function(te,X,e){var A=e(20556).dfltConfig,P=e(41792),o=te.exports={};o.log=function(){var L;if(A.logging>1){var M=["LOG:"];for(L=0;L<arguments.length;L++)M.push(arguments[L]);console.trace.apply(console,M)}if(A.notifyOnLogging>1){var d=[];for(L=0;L<arguments.length;L++)d.push(arguments[L]);P(d.join("<br>"),"long")}},o.warn=function(){var L;if(A.logging>0){var M=["WARN:"];for(L=0;L<arguments.length;L++)M.push(arguments[L]);console.trace.apply(console,M)}if(A.notifyOnLogging>0){var d=[];for(L=0;L<arguments.length;L++)d.push(arguments[L]);P(d.join("<br>"),"stick")}},o.error=function(){var L;if(A.logging>0){var M=["ERROR:"];for(L=0;L<arguments.length;L++)M.push(arguments[L]);console.error.apply(console,M)}if(A.notifyOnLogging>0){var d=[];for(L=0;L<arguments.length;L++)d.push(arguments[L]);P(d.join("<br>"),"stick")}}},30988:function(te,X,e){var A=e(33428);te.exports=function(o,L,M){var d=o.selectAll("g."+M.replace(/\s/g,".")).data(L,function(r){return r[0].trace.uid});d.exit().remove(),d.enter().append("g").attr("class",M),d.order();var g=o.classed("rangeplot")?"nodeRangePlot3":"node3";return d.each(function(r){r[0][g]=A.select(this)}),d}},52248:function(te,X,e){var A=e(36524);X.init2dArray=function(P,o){for(var L=new Array(P),M=0;M<P;M++)L[M]=new Array(o);return L},X.transposeRagged=function(P){var o=0,L=P.length,M,d;for(M=0;M<L;M++)o=Math.max(o,P[M].length);var g=new Array(o);for(M=0;M<o;M++)for(g[M]=new Array(L),d=0;d<L;d++)g[M][d]=P[d][M];return g},X.dot=function(P,o){if(!(P.length&&o.length)||P.length!==o.length)return null;var L=P.length,M,d;if(P[0].length)for(M=new Array(L),d=0;d<L;d++)M[d]=X.dot(P[d],o);else if(o[0].length){var g=X.transposeRagged(o);for(M=new Array(g.length),d=0;d<g.length;d++)M[d]=X.dot(P,g[d])}else for(M=0,d=0;d<L;d++)M+=P[d]*o[d];return M},X.translationMatrix=function(P,o){return[[1,0,P],[0,1,o],[0,0,1]]},X.rotationMatrix=function(P){var o=P*Math.PI/180;return[[Math.cos(o),-Math.sin(o),0],[Math.sin(o),Math.cos(o),0],[0,0,1]]},X.rotationXYMatrix=function(P,o,L){return X.dot(X.dot(X.translationMatrix(o,L),X.rotationMatrix(P)),X.translationMatrix(-o,-L))},X.apply3DTransform=function(P){return function(){var o=arguments,L=arguments.length===1?o[0]:[o[0],o[1],o[2]||0];return X.dot(P,[L[0],L[1],L[2],1]).slice(0,3)}},X.apply2DTransform=function(P){return function(){var o=arguments;o.length===3&&(o=o[0]);var L=arguments.length===1?o[0]:[o[0],o[1]];return X.dot(P,[L[0],L[1],1]).slice(0,2)}},X.apply2DTransform2=function(P){var o=X.apply2DTransform(P);return function(L){return o(L.slice(0,2)).concat(o(L.slice(2,4)))}},X.convertCssMatrix=function(P){if(P){var o=P.length;if(o===16)return P;if(o===6)return[P[0],P[1],0,0,P[2],P[3],0,0,0,0,1,0,P[4],P[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},X.inverseTransformMatrix=function(P){var o=[];return A.invert(o,P),[[o[0],o[1],o[2],o[3]],[o[4],o[5],o[6],o[7]],[o[8],o[9],o[10],o[11]],[o[12],o[13],o[14],o[15]]]}},20435:function(te){function X(A,P){var o=A%P;return o<0?o+P:o}function e(A,P){return Math.abs(A)>P/2?A-Math.round(A/P)*P:A}te.exports={mod:X,modHalf:e}},22296:function(te,X,e){var A=e(38248),P=e(38116).isArrayOrTypedArray;te.exports=function(c,u){if(A(u))u=String(u);else if(typeof u!="string"||u.substr(u.length-4)==="[-1]")throw"bad property string";var l=u.split("."),y,h,T,f;for(f=0;f<l.length;f++)if(String(l[f]).slice(0,2)==="__")throw"bad property string";for(f=0;f<l.length;){if(y=String(l[f]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),y){if(y[1])l[f]=y[1];else if(f===0)l.splice(0,1);else throw"bad property string";for(h=y[2].substr(1,y[2].length-2).split("]["),T=0;T<h.length;T++)f++,l.splice(f,0,Number(h[T]))}f++}return typeof c!="object"?s(c,u,l):{set:d(c,l,u),get:o(c,l),astr:u,parts:l,obj:c}};function o(a,c){return function(){var u=a,l,y,h,T,f;for(T=0;T<c.length-1;T++){if(l=c[T],l===-1){for(y=!0,h=[],f=0;f<u.length;f++)h[f]=o(u[f],c.slice(T+1))(),h[f]!==h[0]&&(y=!1);return y?h[0]:h}if(typeof l=="number"&&!P(u)||(u=u[l],typeof u!="object"||u===null))return}if(!(typeof u!="object"||u===null)&&(h=u[c[T]],h!==null))return h}}var L=/(^|\.)args\[/;function M(a,c){return a===void 0||a===null&&!c.match(L)}function d(a,c,u){return function(l){var y=a,h="",T=M(l,u),f,n;for(n=0;n<c.length-1;n++){if(f=c[n],typeof f=="number"&&!P(y))throw"array index but container is not an array";if(f===-1){if(T=!r(y,c.slice(n+1),l,u),T)break;return}if(!t(y,f,c[n+1],T))break;if(y=y[f],typeof y!="object"||y===null)throw"container is not an object";h=g(h,f)}if(T){if(n===c.length-1&&(delete y[c[n]],Array.isArray(y)&&+c[n]===y.length-1))for(;y.length&&y[y.length-1]===void 0;)y.pop()}else y[c[n]]=l}}function g(a,c){var u=c;return A(c)?u="["+c+"]":a&&(u="."+c),a+u}function r(a,c,u,l){var y=P(u),h=!0,T=u,f=l.replace("-1",0),n=y?!1:M(u,f),v=c[0],m;for(m=0;m<a.length;m++)f=l.replace("-1",m),y&&(T=u[m%u.length],n=M(T,f)),n&&(h=!1),t(a,m,v,n)&&d(a[m],c,l.replace("-1",m))(T);return h}function t(a,c,u,l){if(a[c]===void 0){if(l)return!1;typeof u=="number"?a[c]=[]:a[c]={}}return!0}function s(a,c,u){return{set:function(){throw"bad container"},get:function(){},astr:c,parts:u,obj:a}}},16628:function(te){te.exports=function(){}},41792:function(te,X,e){var A=e(33428),P=e(38248),o=[];te.exports=function(L,M){if(o.indexOf(L)!==-1)return;o.push(L);var d=1e3;P(M)?d=M:M==="long"&&(d=3e3);var g=A.select("body").selectAll(".plotly-notifier").data([0]);g.enter().append("div").classed("plotly-notifier",!0);var r=g.selectAll(".notifier-note").data(o);function t(s){s.duration(700).style("opacity",0).each("end",function(a){var c=o.indexOf(a);c!==-1&&o.splice(c,1),A.select(this).remove()})}r.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var a=A.select(this);a.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){a.transition().call(t)});for(var c=a.append("p"),u=s.split(/<br\s*\/?>/g),l=0;l<u.length;l++)l&&c.append("br"),c.append("span").text(u[l]);M==="stick"?a.transition().duration(350).style("opacity",1):a.transition().duration(700).style("opacity",1).transition().delay(d).call(t)})}},72213:function(te,X,e){var A=e(93972),P="data-savedcursor",o="!!";te.exports=function(M,d){var g=M.attr(P);if(d){if(!g){for(var r=(M.attr("class")||"").split(" "),t=0;t<r.length;t++){var s=r[t];s.indexOf("cursor-")===0&&M.attr(P,s.substr(7)).classed(s,!1)}M.attr(P)||M.attr(P,o)}A(M,d)}else g&&(M.attr(P,null),g===o?A(M):A(M,g))}},92065:function(te,X,e){var A=e(52248).dot,P=e(39032).BADNUM,o=te.exports={};o.tester=function(M){var d=M.slice(),g=d[0][0],r=g,t=d[0][1],s=t,a;for((d[d.length-1][0]!==d[0][0]||d[d.length-1][1]!==d[0][1])&&d.push(d[0]),a=1;a<d.length;a++)g=Math.min(g,d[a][0]),r=Math.max(r,d[a][0]),t=Math.min(t,d[a][1]),s=Math.max(s,d[a][1]);var c=!1,u;d.length===5&&(d[0][0]===d[1][0]?d[2][0]===d[3][0]&&d[0][1]===d[3][1]&&d[1][1]===d[2][1]&&(c=!0,u=function(f){return f[0]===d[0][0]}):d[0][1]===d[1][1]&&d[2][1]===d[3][1]&&d[0][0]===d[3][0]&&d[1][0]===d[2][0]&&(c=!0,u=function(f){return f[1]===d[0][1]}));function l(f,n){var v=f[0],m=f[1];return!(v===P||v<g||v>r||m===P||m<t||m>s||n&&u(f))}function y(f,n){var v=f[0],m=f[1];if(v===P||v<g||v>r||m===P||m<t||m>s)return!1;var b=d.length,E=d[0][0],p=d[0][1],S=0,w,i,C,x,k;for(w=1;w<b;w++)if(i=E,C=p,E=d[w][0],p=d[w][1],x=Math.min(i,E),!(v<x||v>Math.max(i,E)||m>Math.max(C,p)))if(m<Math.min(C,p))v!==x&&S++;else{if(E===i?k=m:k=C+(v-i)*(p-C)/(E-i),m===k)return!(w===1&&n);m<=k&&v!==x&&S++}return S%2===1}var h=!0,T=d[0];for(a=1;a<d.length;a++)if(T[0]!==d[a][0]||T[1]!==d[a][1]){h=!1;break}return{xmin:g,xmax:r,ymin:t,ymax:s,pts:d,contains:c?l:y,isRect:c,degenerate:h}},o.isSegmentBent=function(M,d,g,r){var t=M[d],s=[M[g][0]-t[0],M[g][1]-t[1]],a=A(s,s),c=Math.sqrt(a),u=[-s[1]/c,s[0]/c],l,y,h;for(l=d+1;l<g;l++)if(y=[M[l][0]-t[0],M[l][1]-t[1]],h=A(y,s),h<0||h>a||Math.abs(A(y,u))>r)return!0;return!1},o.filter=function(M,d){var g=[M[0]],r=0,t=0;function s(c){M.push(c);var u=g.length,l=r;g.splice(t+1);for(var y=l+1;y<M.length;y++)(y===M.length-1||o.isSegmentBent(M,l,y+1,d))&&(g.push(M[y]),g.length<u-2&&(r=y,t=g.length-1),l=y)}if(M.length>1){var a=M.pop();s(a)}return{addPt:s,raw:M,filtered:g}}},5048:function(te,X,e){var A=e(16576),P=e(28624);te.exports=function(L,M,d){var g=L._fullLayout,r=!0;return g._glcanvas.each(function(t){if(t.regl){t.regl.preloadCachedCode(d);return}if(!(t.pick&&!g._has("parcoords"))){try{t.regl=P({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:L._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:M||[],cachedCode:d||{}})}catch{r=!1}t.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(s){L&&L.emit&&L.emit("plotly_webglcontextlost",{event:s,layer:t.key})},!1)}}),r||A({container:g._glcontainer.node()}),r}},34296:function(te,X,e){var A=e(38248),P=e(25928);te.exports=function(M){var d;if(M&&M.hasOwnProperty("userAgent")?d=M.userAgent:d=o(),typeof d!="string")return!0;var g=P({ua:{headers:{"user-agent":d}},tablet:!0,featureDetect:!1});if(!g)for(var r=d.split(" "),t=1;t<r.length;t++){var s=r[t];if(s.indexOf("Safari")!==-1)for(var a=t-1;a>-1;a--){var c=r[a];if(c.substr(0,8)==="Version/"){var u=c.substr(8).split(".")[0];if(A(u)&&(u=+u),u>=13)return!0}}}return g};function o(){var L;return typeof navigator<"u"&&(L=navigator.userAgent),L&&L.headers&&typeof L.headers["user-agent"]=="string"&&(L=L.headers["user-agent"]),L}},52416:function(te){te.exports=function(e,A){if(A instanceof RegExp){for(var P=A.toString(),o=0;o<e.length;o++)if(e[o]instanceof RegExp&&e[o].toString()===P)return e;e.push(A)}else(A||A===0)&&e.indexOf(A)===-1&&e.push(A);return e}},94552:function(te,X,e){var A=e(3400),P=e(20556).dfltConfig;function o(M,d){for(var g=[],r,t=0;t<d.length;t++)r=d[t],r===M?g[t]=r:typeof r=="object"?g[t]=Array.isArray(r)?A.extendDeep([],r):A.extendDeepAll({},r):g[t]=r;return g}var L={};L.add=function(M,d,g,r,t){var s,a;if(M.undoQueue=M.undoQueue||{index:0,queue:[],sequence:!1},a=M.undoQueue.index,M.autoplay){M.undoQueue.inSequence||(M.autoplay=!1);return}!M.undoQueue.sequence||M.undoQueue.beginSequence?(s={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},M.undoQueue.queue.splice(a,M.undoQueue.queue.length-a,s),M.undoQueue.index+=1):s=M.undoQueue.queue[a-1],M.undoQueue.beginSequence=!1,s&&(s.undo.calls.unshift(d),s.undo.args.unshift(g),s.redo.calls.push(r),s.redo.args.push(t)),M.undoQueue.queue.length>P.queueLength&&(M.undoQueue.queue.shift(),M.undoQueue.index--)},L.startSequence=function(M){M.undoQueue=M.undoQueue||{index:0,queue:[],sequence:!1},M.undoQueue.sequence=!0,M.undoQueue.beginSequence=!0},L.stopSequence=function(M){M.undoQueue=M.undoQueue||{index:0,queue:[],sequence:!1},M.undoQueue.sequence=!1,M.undoQueue.beginSequence=!1},L.undo=function(d){var g,r;if(!(d.undoQueue===void 0||isNaN(d.undoQueue.index)||d.undoQueue.index<=0)){for(d.undoQueue.index--,g=d.undoQueue.queue[d.undoQueue.index],d.undoQueue.inSequence=!0,r=0;r<g.undo.calls.length;r++)L.plotDo(d,g.undo.calls[r],g.undo.args[r]);d.undoQueue.inSequence=!1,d.autoplay=!1}},L.redo=function(d){var g,r;if(!(d.undoQueue===void 0||isNaN(d.undoQueue.index)||d.undoQueue.index>=d.undoQueue.queue.length)){for(g=d.undoQueue.queue[d.undoQueue.index],d.undoQueue.inSequence=!0,r=0;r<g.redo.calls.length;r++)L.plotDo(d,g.redo.calls[r],g.redo.args[r]);d.undoQueue.inSequence=!1,d.autoplay=!1,d.undoQueue.index++}},L.plotDo=function(M,d,g){M.autoplay=!0,g=o(M,g),d.apply(null,g)},te.exports=L},53756:function(te,X){X.counter=function(e,A,P,o){var L=(A||"")+(P?"":"$"),M=o===!1?"":"^";return e==="xy"?new RegExp(M+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+L):new RegExp(M+e+"([2-9]|[1-9][0-9]+)?"+L)}},23193:function(te){var X=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,e=/^[^\.\[\]]+$/;te.exports=function(A,P){for(;P;){var o=A.match(X);if(o)A=o[1];else if(A.match(e))A="";else throw new Error("bad relativeAttr call:"+[A,P]);if(P.charAt(0)==="^")P=P.slice(1);else break}return A&&P.charAt(0)!=="["?A+"."+P:A+P}},51528:function(te,X,e){var A=e(38116).isArrayOrTypedArray,P=e(63620);te.exports=function o(L,M){for(var d in M){var g=M[d],r=L[d];if(r!==g)if(d.charAt(0)==="_"||typeof g=="function"){if(d in L)continue;L[d]=g}else if(A(g)&&A(r)&&P(g[0])){if(d==="customdata"||d==="ids")continue;for(var t=Math.min(g.length,r.length),s=0;s<t;s++)r[s]!==g[s]&&P(g[s])&&P(r[s])&&o(r[s],g[s])}else P(g)&&P(r)&&(o(r,g),Object.keys(r).length||delete L[d])}}},14952:function(te,X,e){var A=e(38248),P=e(24248),o=e(35536),L=e(39032).BADNUM,M=1e-9;X.findBin=function(s,a,c){if(A(a.start))return c?Math.ceil((s-a.start)/a.size-M)-1:Math.floor((s-a.start)/a.size+M);var u=0,l=a.length,y=0,h=l>1?(a[l-1]-a[0])/(l-1):1,T,f;for(h>=0?f=c?d:g:f=c?t:r,s+=h*M*(c?-1:1)*(h>=0?1:-1);u<l&&y++<100;)T=Math.floor((u+l)/2),f(a[T],s)?u=T+1:l=T;return y>90&&P.log("Long binary search..."),u-1};function d(s,a){return s<a}function g(s,a){return s<=a}function r(s,a){return s>a}function t(s,a){return s>=a}X.sorterAsc=function(s,a){return s-a},X.sorterDes=function(s,a){return a-s},X.distinctVals=function(s){var a=s.slice();a.sort(X.sorterAsc);var c;for(c=a.length-1;c>-1&&a[c]===L;c--);for(var u=a[c]-a[0]||1,l=u/(c||1)/1e4,y=[],h,T=0;T<=c;T++){var f=a[T],n=f-h;h===void 0?(y.push(f),h=f):n>l&&(u=Math.min(u,n),y.push(f),h=f)}return{vals:y,minDiff:u}},X.roundUp=function(s,a,c){for(var u=0,l=a.length-1,y,h=0,T=c?0:1,f=c?1:0,n=c?Math.ceil:Math.floor;u<l&&h++<100;)y=n((u+l)/2),a[y]<=s?u=y+T:l=y-f;return a[u]},X.sort=function(s,a){for(var c=0,u=0,l=1;l<s.length;l++){var y=a(s[l],s[l-1]);if(y<0?c=1:y>0&&(u=1),c&&u)return s.sort(a)}return u?s:s.reverse()},X.findIndexOfMin=function(s,a){a=a||o;for(var c=1/0,u,l=0;l<s.length;l++){var y=a(s[l]);y<c&&(c=y,u=l)}return u}},93972:function(te){te.exports=function(e,A){(e.attr("class")||"").split(" ").forEach(function(P){P.indexOf("cursor-")===0&&e.classed(P,!1)}),A&&e.classed("cursor-"+A,!0)}},16576:function(te,X,e){var A=e(76308),P=function(){};te.exports=function(L){for(var M in L)typeof L[M]=="function"&&(L[M]=P);L.destroy=function(){L.container.parentNode.removeChild(L.container)};var d=document.createElement("div");d.className="no-webgl",d.style.cursor="pointer",d.style.fontSize="24px",d.style.color=A.defaults[0],d.style.position="absolute",d.style.left=d.style.top="0px",d.style.width=d.style.height="100%",d.style["background-color"]=A.lightLine,d.style["z-index"]=30;var g=document.createElement("p");return g.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",g.style.position="relative",g.style.top="50%",g.style.left="50%",g.style.height="30%",g.style.width="50%",g.style.margin="-15% 0 0 -25%",d.appendChild(g),L.container.appendChild(d),L.container.style.background="#FFFFFF",L.container.onclick=function(){window.open("https://get.webgl.org")},!1}},95376:function(te){te.exports=function(e){return Object.keys(e).sort()}},63084:function(te,X,e){var A=e(38248),P=e(38116).isArrayOrTypedArray;X.aggNums=function(o,L,M,d){var g,r;if((!d||d>M.length)&&(d=M.length),A(L)||(L=!1),P(M[0])){for(r=new Array(d),g=0;g<d;g++)r[g]=X.aggNums(o,L,M[g]);M=r}for(g=0;g<d;g++)A(L)?A(M[g])&&(L=o(+L,+M[g])):L=M[g];return L},X.len=function(o){return X.aggNums(function(L){return L+1},0,o)},X.mean=function(o,L){return L||(L=X.len(o)),X.aggNums(function(M,d){return M+d},0,o)/L},X.midRange=function(o){if(!(o===void 0||o.length===0))return(X.aggNums(Math.max,null,o)+X.aggNums(Math.min,null,o))/2},X.variance=function(o,L,M){return L||(L=X.len(o)),A(M)||(M=X.mean(o,L)),X.aggNums(function(d,g){return d+Math.pow(g-M,2)},0,o)/L},X.stdev=function(o,L,M){return Math.sqrt(X.variance(o,L,M))},X.median=function(o){var L=o.slice().sort();return X.interp(L,.5)},X.interp=function(o,L){if(!A(L))throw"n should be a finite number";if(L=L*o.length-.5,L<0)return o[0];if(L>o.length-1)return o[o.length-1];var M=L%1;return M*o[Math.ceil(L)]+(1-M)*o[Math.floor(L)]}},43080:function(te,X,e){var A=e(72160);function P(o){return o?A(o):[0,0,0,1]}te.exports=P},9188:function(te,X,e){var A=e(2264),P=e(43616),o=e(3400),L=null;function M(){if(L!==null)return L;L=!1;var d=o.isIE()||o.isSafari()||o.isIOS();if(window.navigator.userAgent&&!d){var g=Array.from(A.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")L=g.some(function(c){return r.apply(null,c)});else{var t=P.tester.append("image").attr("style",A.STYLE),s=window.getComputedStyle(t.node()),a=s.imageRendering;L=g.some(function(c){var u=c[1];return a===u||a===u.toLowerCase()}),t.remove()}}return L}te.exports=M},72736:function(te,X,e){var A=e(33428),P=e(3400),o=P.strTranslate,L=e(9616),M=e(84284).LINE_SPACING,d=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;X.convertToTspans=function(O,F,N){var V=O.text(),j=!O.attr("data-notex")&&F&&F._context.typesetMath&&typeof MathJax<"u"&&V.match(d),$=A.select(O.node().parentNode);if($.empty())return;var q=O.attr("class")?O.attr("class").split(" ")[0]:"text";q+="-math",$.selectAll("svg."+q).remove(),$.selectAll("g."+q+"-group").remove(),O.style("display",null).attr({"data-unformatted":V,"data-math":"N"});function oe(){$.empty()||(q=O.attr("class")+"-math",$.select("svg."+q).remove()),O.text("").style("white-space","pre");var Z=I(O.node(),V);Z&&O.style("pointer-events","all"),X.positionText(O),N&&N.call(O)}return j?(F&&F._promises||[]).push(new Promise(function(Z){O.style("display","none");var G=parseInt(O.node().style.fontSize,10),re={fontSize:G};a(j[2],re,function(H,J,ae){$.selectAll("svg."+q).remove(),$.selectAll("g."+q+"-group").remove();var K=H&&H.select("svg");if(!K||!K.node()){oe(),Z();return}var Y=$.append("g").classed(q+"-group",!0).attr({"pointer-events":"none","data-unformatted":V,"data-math":"Y"});Y.node().appendChild(K.node()),J&&J.node()&&K.node().insertBefore(J.node().cloneNode(!0),K.node().firstChild);var ie=ae.width,ne=ae.height;K.attr({class:q,height:ne,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var le=O.node().style.fill||"black",de=K.select("g");de.attr({fill:le,stroke:le});var we=de.node().getBoundingClientRect(),me=we.width,Le=we.height;(me>ie||Le>ne)&&(K.style("overflow","hidden"),we=K.node().getBoundingClientRect(),me=we.width,Le=we.height);var ve=+O.attr("x"),Ae=+O.attr("y"),ye=G||O.node().getBoundingClientRect().height,Se=-ye/4;if(q[0]==="y")Y.attr({transform:"rotate("+[-90,ve,Ae]+")"+o(-me/2,Se-Le/2)});else if(q[0]==="l")Ae=Se-Le/2;else if(q[0]==="a"&&q.indexOf("atitle")!==0)ve=0,Ae=Se;else{var _e=O.attr("text-anchor");ve=ve-me*(_e==="middle"?.5:_e==="end"?1:0),Ae=Ae+Se-Le/2}K.attr({x:ve,y:Ae}),N&&N.call(O,Y),Z(Y)})})):oe(),O};var g=/(<|&lt;|&#60;)/g,r=/(>|&gt;|&#62;)/g;function t(O){return O.replace(g,"\\lt ").replace(r,"\\gt ")}var s=[["$","$"],["\\(","\\)"]];function a(O,F,N){var V=parseInt((MathJax.version||"").split(".")[0]);if(V!==2&&V!==3){P.warn("No MathJax version:",MathJax.version);return}var j,$,q,oe,Z=function(){return $=P.extendDeepAll({},MathJax.Hub.config),q=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:s},displayAlign:"left"})},G=function(){$=P.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=s},re=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},H=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},J=function(){var le="math-output-"+P.randstr({},64);oe=A.select("body").append("div").attr({id:le}).style({visibility:"hidden",position:"absolute","font-size":F.fontSize+"px"}).text(t(O));var de=oe.node();return V===2?MathJax.Hub.Typeset(de):MathJax.typeset([de])},ae=function(){var le=oe.select(V===2?".MathJax_SVG":".MathJax"),de=!le.empty()&&oe.select("svg").node();if(!de)P.log("There was an error in the tex syntax.",O),N();else{var we=de.getBoundingClientRect(),me;V===2?me=A.select("body").select("#MathJax_SVG_glyphs"):me=le.select("defs"),N(le,me,we)}oe.remove()},K=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},Y=function(){j!=="svg"&&(MathJax.config.startup.output=j)},ie=function(){return q!==void 0&&(MathJax.Hub.processSectionDelay=q),MathJax.Hub.Config($)},ne=function(){MathJax.config=$};V===2?MathJax.Hub.Queue(Z,re,J,ae,K,ie):V===3&&(G(),H(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){J(),ae(),Y(),ne()}))}var c={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"},u={sub:"0.3em",sup:"-0.6em"},l={sub:"-0.21em",sup:"0.42em"},y="",h=["http:","https:","mailto:","",void 0,":"],T=X.NEWLINES=/(\r\n?|\n)/g,f=/(<[^<>]*>)/,n=/<(\/?)([^ >]*)(\s+(.*))?>/i,v=/<br(\s+.*)?>/i;X.BR_TAG_ALL=/<br(\s+.*)?>/gi;var m=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,p=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(O,F){if(!O)return null;var N=O.match(F),V=N&&(N[3]||N[4]);return V&&x(V)}var w=/(^|;)\s*color:/;X.plainText=function(O,F){F=F||{};for(var N=F.len!==void 0&&F.len!==-1?F.len:1/0,V=F.allowedTags!==void 0?F.allowedTags:["br"],j="...",$=j.length,q=O.split(f),oe=[],Z="",G=0,re=0;re<q.length;re++){var H=q[re],J=H.match(n),ae=J&&J[2].toLowerCase();if(ae)V.indexOf(ae)!==-1&&(oe.push(H),Z=ae);else{var K=H.length;if(G+K<N)oe.push(H),G+=K;else if(G<N){var Y=N-G;Z&&(Z!=="br"||Y<=$||K<=$)&&oe.pop(),N>$?oe.push(H.substr(0,Y-$)+j):oe.push(H.substr(0,Y));break}Z=""}}return oe.join("")};var i={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function x(O){return O.replace(C,function(F,N){var V;return N.charAt(0)==="#"?V=k(N.charAt(1)==="x"?parseInt(N.substr(2),16):parseInt(N.substr(1),10)):V=i[N],V||F})}X.convertEntities=x;function k(O){if(!(O>1114111)){var F=String.fromCodePoint;if(F)return F(O);var N=String.fromCharCode;return O<=65535?N(O):N((O>>10)+55232,O%1024+56320)}}function I(O,F){F=F.replace(T," ");var N=!1,V=[],j,$=-1;function q(){$++;var Le=document.createElementNS(L.svg,"tspan");A.select(Le).attr({class:"line",dy:$*M+"em"}),O.appendChild(Le),j=Le;var ve=V;if(V=[{node:Le}],ve.length>1)for(var Ae=1;Ae<ve.length;Ae++)oe(ve[Ae])}function oe(Le){var ve=Le.type,Ae={},ye;if(ve==="a"){ye="a";var Se=Le.target,_e=Le.href,ze=Le.popup;_e&&(Ae={"xlink:xlink:show":Se==="_blank"||Se.charAt(0)!=="_"?"new":"replace",target:Se,"xlink:xlink:href":_e},ze&&(Ae.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+ze+'");return false;'))}else ye="tspan";Le.style&&(Ae.style=Le.style);var Ie=document.createElementNS(L.svg,ye);if(ve==="sup"||ve==="sub"){Z(j,y),j.appendChild(Ie);var Ne=document.createElementNS(L.svg,"tspan");Z(Ne,y),A.select(Ne).attr("dy",l[ve]),Ae.dy=u[ve],j.appendChild(Ie),j.appendChild(Ne)}else j.appendChild(Ie);A.select(Ie).attr(Ae),j=Le.node=Ie,V.push(Le)}function Z(Le,ve){Le.appendChild(document.createTextNode(ve))}function G(Le){if(V.length===1){P.log("Ignoring unexpected end tag </"+Le+">.",F);return}var ve=V.pop();Le!==ve.type&&P.log("Start tag <"+ve.type+"> doesnt match end tag <"+Le+">. Pretending it did match.",F),j=V[V.length-1].node}var re=v.test(F);re?q():(j=O,V=[{node:O}]);for(var H=F.split(f),J=0;J<H.length;J++){var ae=H[J],K=ae.match(n),Y=K&&K[2].toLowerCase(),ie=c[Y];if(Y==="br")q();else if(ie===void 0)Z(j,x(ae));else if(K[1])G(Y);else{var ne=K[4],le={type:Y},de=S(ne,m);if(de?(de=de.replace(w,"$1 fill:"),ie&&(de+=";"+ie)):ie&&(de=ie),de&&(le.style=de),Y==="a"){N=!0;var we=S(ne,b);if(we){var me=B(we);me&&(le.href=me,le.target=S(ne,E)||"_blank",le.popup=S(ne,p))}}oe(le)}}return N}function B(O){var F=encodeURI(decodeURI(O)),N=document.createElement("a"),V=document.createElement("a");N.href=O,V.href=F;var j=N.protocol,$=V.protocol;return h.indexOf(j)!==-1&&h.indexOf($)!==-1?F:""}X.sanitizeHTML=function(F){F=F.replace(T," ");for(var N=document.createElement("p"),V=N,j=[],$=F.split(f),q=0;q<$.length;q++){var oe=$[q],Z=oe.match(n),G=Z&&Z[2].toLowerCase();if(G in c)if(Z[1])j.length&&(V=j.pop());else{var re=Z[4],H=S(re,m),J=H?{style:H}:{};if(G==="a"){var ae=S(re,b);if(ae){var K=B(ae);if(K){J.href=K;var Y=S(re,E);Y&&(J.target=Y)}}}var ie=document.createElement(G);V.appendChild(ie),A.select(ie).attr(J),V=ie,j.push(ie)}else V.appendChild(document.createTextNode(x(oe)))}var ne="innerHTML";return N[ne]},X.lineCount=function(F){return F.selectAll("tspan.line").size()||1},X.positionText=function(F,N,V){return F.each(function(){var j=A.select(this);function $(Z,G){return G===void 0?(G=j.attr(Z),G===null&&(j.attr(Z,0),G=0)):j.attr(Z,G),G}var q=$("x",N),oe=$("y",V);this.nodeName==="text"&&j.selectAll("tspan.line").attr({x:q,y:oe})})};function _(O,F,N){var V=N.horizontalAlign,j=N.verticalAlign||"top",$=O.node().getBoundingClientRect(),q=F.node().getBoundingClientRect(),oe,Z,G;return j==="bottom"?Z=function(){return $.bottom-oe.height}:j==="middle"?Z=function(){return $.top+($.height-oe.height)/2}:Z=function(){return $.top},V==="right"?G=function(){return $.right-oe.width}:V==="center"?G=function(){return $.left+($.width-oe.width)/2}:G=function(){return $.left},function(){oe=this.node().getBoundingClientRect();var re=G()-q.left,H=Z()-q.top,J=N.gd||{};if(N.gd){J._fullLayout._calcInverseTransform(J);var ae=P.apply3DTransform(J._fullLayout._invTransform)(re,H);re=ae[0],H=ae[1]}return this.style({top:H+"px",left:re+"px","z-index":1e3}),this}}var z="1px ";X.makeTextShadow=function(O){var F=z,N=z,V=z;return F+N+V+O+", -"+F+"-"+N+V+O+", "+F+"-"+N+V+O+", -"+F+N+V+O},X.makeEditable=function(O,F){var N=F.gd,V=F.delegate,j=A.dispatch("edit","input","cancel"),$=V||O;if(O.style({"pointer-events":V?"none":"all"}),O.size()!==1)throw new Error("boo");function q(){Z(),O.style({opacity:0});var G=$.attr("class"),re;G?re="."+G.split(" ")[0]+"-math-group":re="[class*=-math-group]",re&&A.select(O.node().parentNode).select(re).style({opacity:0})}function oe(G){var re=G.node(),H=document.createRange();H.selectNodeContents(re);var J=window.getSelection();J.removeAllRanges(),J.addRange(H),re.focus()}function Z(){var G=A.select(N),re=G.select(".svg-container"),H=re.append("div"),J=O.node().style,ae=parseFloat(J.fontSize||12),K=F.text;K===void 0&&(K=O.attr("data-unformatted")),H.classed("plugin-editable editable",!0).style({position:"absolute","font-family":J.fontFamily||"Arial","font-size":ae,color:F.fill||J.fill||"black",opacity:1,"background-color":F.background||"transparent",outline:"#ffffff33 1px solid",margin:[-ae/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(K).call(_(O,re,F)).on("blur",function(){N._editing=!1,O.text(this.textContent).style({opacity:1});var Y=A.select(this).attr("class"),ie;Y?ie="."+Y.split(" ")[0]+"-math-group":ie="[class*=-math-group]",ie&&A.select(O.node().parentNode).select(ie).style({opacity:0});var ne=this.textContent;A.select(this).transition().duration(0).remove(),A.select(document).on("mouseup",null),j.edit.call(O,ne)}).on("focus",function(){var Y=this;N._editing=!0,A.select(document).on("mouseup",function(){if(A.event.target===Y)return!1;document.activeElement===H.node()&&H.node().blur()})}).on("keyup",function(){A.event.which===27?(N._editing=!1,O.style({opacity:1}),A.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),j.cancel.call(O,this.textContent)):(j.input.call(O,this.textContent),A.select(this).call(_(O,re,F)))}).on("keydown",function(){A.event.which===13&&this.blur()}).call(oe)}return F.immediate?q():$.on("click",q),A.rebind(O,j,"on")}},91200:function(te,X){var e={};X.throttle=function(o,L,M){var d=e[o],g=Date.now();if(!d){for(var r in e)e[r].ts<g-6e4&&delete e[r];d=e[o]={ts:0,timer:null}}A(d);function t(){M(),d.ts=Date.now(),d.onDone&&(d.onDone(),d.onDone=null)}if(g>d.ts+L){t();return}d.timer=setTimeout(function(){t(),d.timer=null},L)},X.done=function(P){var o=e[P];return!o||!o.timer?Promise.resolve():new Promise(function(L){var M=o.onDone;o.onDone=function(){M&&M(),L(),o.onDone=null}})},X.clear=function(P){if(P)A(e[P]),delete e[P];else for(var o in e)X.clear(o)};function A(P){P&&P.timer!==null&&(clearTimeout(P.timer),P.timer=null)}},36896:function(te,X,e){var A=e(38248);te.exports=function(o,L){if(o>0)return Math.log(o)/Math.LN10;var M=Math.log(Math.min(L[0],L[1]))/Math.LN10;return A(M)||(M=Math.log(Math.max(L[0],L[1]))/Math.LN10-6),M}},59972:function(te,X,e){var A=te.exports={},P=e(79552).locationmodeToLayer,o=e(55712).NO;A.getTopojsonName=function(L){return[L.scope.replace(/ /g,"-"),"_",L.resolution.toString(),"m"].join("")},A.getTopojsonPath=function(L,M){return L+M+".json"},A.getTopojsonFeatures=function(L,M){var d=P[L.locationmode],g=M.objects[d];return o(M,g).features}},11680:function(te){te.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(te){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"}}},69820:function(te,X,e){var A=e(24040);te.exports=function(o){for(var L=A.layoutArrayContainers,M=A.layoutArrayRegexes,d=o.split("[")[0],g,r,t=0;t<M.length;t++)if(r=o.match(M[t]),r&&r.index===0){g=r[0];break}if(g||(g=L[L.indexOf(d)]),!g)return!1;var s=o.substr(g.length);return s?(r=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),r?{array:g,index:Number(r[1]),property:r[3]||""}:!1):{array:g,index:"",property:""}}},67824:function(te,X,e){var A=e(92880).extendFlat,P=e(63620),o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},L={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},M=o.flags.slice().concat(["fullReplot"]),d=L.flags.slice().concat("layoutReplot");te.exports={traces:o,layout:L,traceFlags:function(){return g(M)},layoutFlags:function(){return g(d)},update:function(s,a){var c=a.editType;if(c&&c!=="none")for(var u=c.split("+"),l=0;l<u.length;l++)s[u[l]]=!0},overrideAll:r};function g(s){for(var a={},c=0;c<s.length;c++)a[s[c]]=!1;return a}function r(s,a,c){var u=A({},s);for(var l in u){var y=u[l];P(y)&&(u[l]=t(y,a,c,l))}return c==="from-root"&&(u.editType=a),u}function t(s,a,c,u){if(s.valType){var l=A({},s);if(l.editType=a,Array.isArray(s.items)){l.items=new Array(s.items.length);for(var y=0;y<s.items.length;y++)l.items[y]=t(s.items[y],a)}return l}else return r(s,a,u.charAt(0)==="_"?"nested":"from-root")}},93404:function(te,X,e){var A=e(38248),P=e(61784),o=e(24040),L=e(3400),M=e(7316),d=e(79811),g=e(76308),r=d.cleanId,t=d.getFromTrace,s=o.traceIs;X.clearPromiseQueue=function(v){Array.isArray(v._promises)&&v._promises.length>0&&L.log("Clearing previous rejected promises from queue."),v._promises=[]},X.cleanLayout=function(v){var m,b;v||(v={}),v.xaxis1&&(v.xaxis||(v.xaxis=v.xaxis1),delete v.xaxis1),v.yaxis1&&(v.yaxis||(v.yaxis=v.yaxis1),delete v.yaxis1),v.scene1&&(v.scene||(v.scene=v.scene1),delete v.scene1);var E=(M.subplotsRegistry.cartesian||{}).attrRegex,p=(M.subplotsRegistry.polar||{}).attrRegex,S=(M.subplotsRegistry.ternary||{}).attrRegex,w=(M.subplotsRegistry.gl3d||{}).attrRegex,i=Object.keys(v);for(m=0;m<i.length;m++){var C=i[m];if(E&&E.test(C)){var x=v[C];x.anchor&&x.anchor!=="free"&&(x.anchor=r(x.anchor)),x.overlaying&&(x.overlaying=r(x.overlaying)),x.type||(x.isdate?x.type="date":x.islog?x.type="log":x.isdate===!1&&x.islog===!1&&(x.type="linear")),(x.autorange==="withzero"||x.autorange==="tozero")&&(x.autorange=!0,x.rangemode="tozero"),x.insiderange&&delete x.range,delete x.islog,delete x.isdate,delete x.categories,h(x,"domain")&&delete x.domain,x.autotick!==void 0&&(x.tickmode===void 0&&(x.tickmode=x.autotick?"auto":"linear"),delete x.autotick),c(x)}else if(p&&p.test(C)){var k=v[C];c(k.radialaxis)}else if(S&&S.test(C)){var I=v[C];c(I.aaxis),c(I.baxis),c(I.caxis)}else if(w&&w.test(C)){var B=v[C],_=B.cameraposition;if(Array.isArray(_)&&_[0].length===4){var z=_[0],O=_[1],F=_[2],N=P([],z),V=[];for(b=0;b<3;++b)V[b]=O[b]+F*N[2+4*b];B.camera={eye:{x:V[0],y:V[1],z:V[2]},center:{x:O[0],y:O[1],z:O[2]},up:{x:0,y:0,z:1}},delete B.cameraposition}c(B.xaxis),c(B.yaxis),c(B.zaxis)}}var j=Array.isArray(v.annotations)?v.annotations.length:0;for(m=0;m<j;m++){var $=v.annotations[m];L.isPlainObject($)&&($.ref&&($.ref==="paper"?($.xref="paper",$.yref="paper"):$.ref==="data"&&($.xref="x",$.yref="y"),delete $.ref),a($,"xref"),a($,"yref"))}var q=Array.isArray(v.shapes)?v.shapes.length:0;for(m=0;m<q;m++){var oe=v.shapes[m];L.isPlainObject(oe)&&(a(oe,"xref"),a(oe,"yref"))}var Z=Array.isArray(v.images)?v.images.length:0;for(m=0;m<Z;m++){var G=v.images[m];L.isPlainObject(G)&&(a(G,"xref"),a(G,"yref"))}var re=v.legend;return re&&(re.x>3?(re.x=1.02,re.xanchor="left"):re.x<-2&&(re.x=-.02,re.xanchor="right"),re.y>3?(re.y=1.02,re.yanchor="bottom"):re.y<-2&&(re.y=-.02,re.yanchor="top")),c(v),v.dragmode==="rotate"&&(v.dragmode="orbit"),g.clean(v),v.template&&v.template.layout&&X.cleanLayout(v.template.layout),v};function a(v,m){var b=v[m],E=m.charAt(0);b&&b!=="paper"&&(v[m]=r(b,E,!0))}function c(v){v&&((typeof v.title=="string"||typeof v.title=="number")&&(v.title={text:v.title}),m("titlefont","font"),m("titleposition","position"),m("titleside","side"),m("titleoffset","offset"));function m(b,E){var p=v[b],S=v.title&&v.title[E];p&&!S&&(v.title||(v.title={}),v.title[E]=v[b],delete v[b])}}X.cleanData=function(v){for(var m=0;m<v.length;m++){var b=v[m],E;if(b.type==="histogramy"&&"xbins"in b&&!("ybins"in b)&&(b.ybins=b.xbins,delete b.xbins),b.error_y&&"opacity"in b.error_y){var p=g.defaults,S=b.error_y.color||(s(b,"bar")?g.defaultLine:p[m%p.length]);b.error_y.color=g.addOpacity(g.rgb(S),g.opacity(S)*b.error_y.opacity),delete b.error_y.opacity}if("bardir"in b&&(b.bardir==="h"&&(s(b,"bar")||b.type.substr(0,9)==="histogram")&&(b.orientation="h",X.swapXYData(b)),delete b.bardir),b.type==="histogramy"&&X.swapXYData(b),(b.type==="histogramx"||b.type==="histogramy")&&(b.type="histogram"),"scl"in b&&!("colorscale"in b)&&(b.colorscale=b.scl,delete b.scl),"reversescl"in b&&!("reversescale"in b)&&(b.reversescale=b.reversescl,delete b.reversescl),b.xaxis&&(b.xaxis=r(b.xaxis,"x")),b.yaxis&&(b.yaxis=r(b.yaxis,"y")),s(b,"gl3d")&&b.scene&&(b.scene=M.subplotsRegistry.gl3d.cleanId(b.scene)),!s(b,"pie-like")&&!s(b,"bar-like"))if(Array.isArray(b.textposition))for(E=0;E<b.textposition.length;E++)b.textposition[E]=y(b.textposition[E]);else b.textposition&&(b.textposition=y(b.textposition));var w=o.getModule(b);if(w&&w.colorbar){var i=w.colorbar.container,C=i?b[i]:b;C&&C.colorscale&&(C.colorscale==="YIGnBu"&&(C.colorscale="YlGnBu"),C.colorscale==="YIOrRd"&&(C.colorscale="YlOrRd"))}if(b.type==="surface"&&L.isPlainObject(b.contours)){var x=["x","y","z"];for(E=0;E<x.length;E++){var k=b.contours[x[E]];L.isPlainObject(k)&&(k.highlightColor&&(k.highlightcolor=k.highlightColor,delete k.highlightColor),k.highlightWidth&&(k.highlightwidth=k.highlightWidth,delete k.highlightWidth))}}if(b.type==="candlestick"||b.type==="ohlc"){var I=(b.increasing||{}).showlegend!==!1,B=(b.decreasing||{}).showlegend!==!1,_=u(b.increasing),z=u(b.decreasing);if(_!==!1&&z!==!1){var O=l(_,z,I,B);O&&(b.name=O)}else(_||z)&&!b.name&&(b.name=_||z)}if(Array.isArray(b.transforms)){var F=b.transforms;for(E=0;E<F.length;E++){var N=F[E];if(L.isPlainObject(N))switch(N.type){case"filter":N.filtersrc&&(N.target=N.filtersrc,delete N.filtersrc),N.calendar&&(N.valuecalendar||(N.valuecalendar=N.calendar),delete N.calendar);break;case"groupby":if(N.styles=N.styles||N.style,N.styles&&!Array.isArray(N.styles)){var V=N.styles,j=Object.keys(V);N.styles=[];for(var $=0;$<j.length;$++)N.styles.push({target:j[$],value:V[j[$]]})}break}}}h(b,"line")&&delete b.line,"marker"in b&&(h(b.marker,"line")&&delete b.marker.line,h(b,"marker")&&delete b.marker),g.clean(b),b.autobinx&&(delete b.autobinx,delete b.xbins),b.autobiny&&(delete b.autobiny,delete b.ybins),c(b),b.colorbar&&c(b.colorbar),b.marker&&b.marker.colorbar&&c(b.marker.colorbar),b.line&&b.line.colorbar&&c(b.line.colorbar),b.aaxis&&c(b.aaxis),b.baxis&&c(b.baxis)}};function u(v){if(!L.isPlainObject(v))return!1;var m=v.name;return delete v.name,delete v.showlegend,(typeof m=="string"||typeof m=="number")&&String(m)}function l(v,m,b,E){if(b&&!E)return v;if(E&&!b||!v.trim())return m;if(!m.trim())return v;var p=Math.min(v.length,m.length),S;for(S=0;S<p&&v.charAt(S)===m.charAt(S);S++);var w=v.substr(0,S);return w.trim()}function y(v){var m="middle",b="center";return typeof v=="string"&&(v.indexOf("top")!==-1?m="top":v.indexOf("bottom")!==-1&&(m="bottom"),v.indexOf("left")!==-1?b="left":v.indexOf("right")!==-1&&(b="right")),m+" "+b}function h(v,m){return m in v&&typeof v[m]=="object"&&Object.keys(v[m]).length===0}X.swapXYData=function(v){var m;if(L.swapAttrs(v,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(v.z)&&Array.isArray(v.z[0])&&(v.transpose?delete v.transpose:v.transpose=!0),v.error_x&&v.error_y){var b=v.error_y,E="copy_ystyle"in b?b.copy_ystyle:!(b.color||b.thickness||b.width);L.swapAttrs(v,["error_?.copy_ystyle"]),E&&L.swapAttrs(v,["error_?.color","error_?.thickness","error_?.width"])}if(typeof v.hoverinfo=="string"){var p=v.hoverinfo.split("+");for(m=0;m<p.length;m++)p[m]==="x"?p[m]="y":p[m]==="y"&&(p[m]="x");v.hoverinfo=p.join("+")}},X.coerceTraceIndices=function(v,m){if(A(m))return[m];if(!Array.isArray(m)||!m.length)return v.data.map(function(p,S){return S});if(Array.isArray(m)){for(var b=[],E=0;E<m.length;E++)L.isIndex(m[E],v.data.length)?b.push(m[E]):L.warn("trace index (",m[E],") is not a number or is out of bounds");return b}return m},X.manageArrayContainers=function(v,m,b){var E=v.obj,p=v.parts,S=p.length,w=p[S-1],i=A(w);if(i&&m===null){var C=p.slice(0,S-1).join("."),x=L.nestedProperty(E,C).get();x.splice(w,1)}else i&&v.get()===void 0&&v.get()===void 0&&(b[v.astr]=null),v.set(m)};var T=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function f(v){var m=v.search(T);if(m>0)return v.substr(0,m)}X.hasParent=function(v,m){for(var b=f(m);b;){if(b in v)return!0;b=f(b)}return!1};var n=["x","y","z"];X.clearAxisTypes=function(v,m,b){for(var E=0;E<m.length;E++)for(var p=v._fullData[E],S=0;S<3;S++){var w=t(v,p,n[S]);if(w&&w.type!=="log"){var i=w._name,C=w._id.substr(1);if(C.substr(0,5)==="scene"){if(b[C]!==void 0)continue;i=C+"."+i}var x=i+".type";b[i]===void 0&&b[x]===void 0&&L.nestedProperty(v.layout,x).set(null)}}}},22448:function(te,X,e){var A=e(36424);X._doPlot=A._doPlot,X.newPlot=A.newPlot,X.restyle=A.restyle,X.relayout=A.relayout,X.redraw=A.redraw,X.update=A.update,X._guiRestyle=A._guiRestyle,X._guiRelayout=A._guiRelayout,X._guiUpdate=A._guiUpdate,X._storeDirectGUIEdit=A._storeDirectGUIEdit,X.react=A.react,X.extendTraces=A.extendTraces,X.prependTraces=A.prependTraces,X.addTraces=A.addTraces,X.deleteTraces=A.deleteTraces,X.moveTraces=A.moveTraces,X.purge=A.purge,X.addFrames=A.addFrames,X.deleteFrames=A.deleteFrames,X.animate=A.animate,X.setPlotConfig=A.setPlotConfig;var P=e(52200).getGraphDiv,o=e(4016).eraseActiveShape;X.deleteActiveShape=function(M){return o(P(M))},X.toImage=e(67024),X.validate=e(21480),X.downloadImage=e(39792);var L=e(94828);X.makeTemplate=L.makeTemplate,X.validateTemplate=L.validateTemplate},17680:function(te,X,e){var A=e(63620),P=e(16628),o=e(24248),L=e(14952).sorterAsc,M=e(24040);X.containerArrayMatch=e(69820);var d=X.isAddVal=function(t){return t==="add"||A(t)},g=X.isRemoveVal=function(t){return t===null||t==="remove"};X.applyContainerArrayChanges=function(t,s,a,c,u){var l=s.astr,y=M.getComponentMethod(l,"supplyLayoutDefaults"),h=M.getComponentMethod(l,"draw"),T=M.getComponentMethod(l,"drawOne"),f=c.replot||c.recalc||y===P||h===P,n=t.layout,v=t._fullLayout;if(a[""]){Object.keys(a).length>1&&o.warn("Full array edits are incompatible with other edits",l);var m=a[""][""];if(g(m))s.set(null);else if(Array.isArray(m))s.set(m);else return o.warn("Unrecognized full array edit value",l,m),!0;return f?!1:(y(n,v),h(t),!0)}var b=Object.keys(a).map(Number).sort(L),E=s.get(),p=E||[],S=u(v,l).get(),w=[],i=-1,C=p.length,x,k,I,B,_,z,O,F;for(x=0;x<b.length;x++){if(I=b[x],B=a[I],_=Object.keys(B),z=B[""],O=d(z),I<0||I>p.length-(O?0:1)){o.warn("index out of range",l,I);continue}if(z!==void 0)_.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",l,I),g(z)?w.push(I):O?(z==="add"&&(z={}),p.splice(I,0,z),S&&S.splice(I,0,{})):o.warn("Unrecognized full object edit value",l,I,z),i===-1&&(i=I);else for(k=0;k<_.length;k++)F=l+"["+I+"].",u(p[I],_[k],F).set(B[_[k]])}for(x=w.length-1;x>=0;x--)p.splice(w[x],1),S&&S.splice(w[x],1);if(p.length?E||s.set(p):s.set(null),f)return!1;if(y(n,v),T!==P){var N;if(i===-1)N=b;else{for(C=Math.max(p.length,C),N=[],x=0;x<b.length&&(I=b[x],!(I>=i));x++)N.push(I);for(x=i;x<C;x++)N.push(x)}for(x=0;x<N.length;x++)T(t,N[x])}else h(t);return!0}},36424:function(te,X,e){var A=e(33428),P=e(38248),o=e(52264),L=e(3400),M=L.nestedProperty,d=e(95924),g=e(94552),r=e(24040),t=e(73060),s=e(7316),a=e(54460),c=e(96312),u=e(94724),l=e(43616),y=e(76308),h=e(42464).initInteractions,T=e(9616),f=e(22676).clearOutline,n=e(20556).dfltConfig,v=e(17680),m=e(93404),b=e(39172),E=e(67824),p=e(33816).AX_NAME_PATTERN,S=0,w=5;function i(be,ke,Ve,je){var at;if(be=L.getGraphDiv(be),d.init(be),L.isPlainObject(ke)){var ut=ke;ke=ut.data,Ve=ut.layout,je=ut.config,at=ut.frames}var Nt=d.triggerHandler(be,"plotly_beforeplot",[ke,Ve,je]);if(Nt===!1)return Promise.reject();!ke&&!Ve&&!L.isPlotDiv(be)&&L.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",be);function Vt(){if(at)return X.addFrames(be,at)}B(be,je),Ve||(Ve={}),A.select(be).classed("js-plotly-plot",!0),l.makeTester(),Array.isArray(be._promises)||(be._promises=[]);var gt=(be.data||[]).length===0&&Array.isArray(ke);Array.isArray(ke)&&(m.cleanData(ke),gt?be.data=ke:be.data.push.apply(be.data,ke),be.empty=!1),(!be.layout||gt)&&(be.layout=m.cleanLayout(Ve)),s.supplyDefaults(be);var Ct=be._fullLayout,Yt=Ct._has("cartesian");Ct._replotting=!0,(gt||Ct._shouldCreateBgLayer)&&(Te(be),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),l.initGradients(be),l.initPatterns(be),gt&&a.saveShowSpikeInitial(be);var gr=!be.calcdata||be.calcdata.length!==(be._fullData||[]).length;gr&&s.doCalcdata(be);for(var ht=0;ht<be.calcdata.length;ht++)be.calcdata[ht][0].trace=be._fullData[ht];be._context.responsive?be._responsiveChartHandler||(be._responsiveChartHandler=function(){L.isHidden(be)||s.resize(be)},window.addEventListener("resize",be._responsiveChartHandler)):L.clearResponsive(be);var Ht=L.extendFlat({},Ct._size),Wt=0;function cr(){for(var _t=Ct._basePlotModules,It=0;It<_t.length;It++)_t[It].drawFramework&&_t[It].drawFramework(be);!Ct._glcanvas&&Ct._has("gl")&&(Ct._glcanvas=Ct._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(ir){return ir.key}),Ct._glcanvas.enter().append("canvas").attr("class",function(ir){return"gl-canvas gl-canvas-"+ir.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Gt=be._context.plotGlPixelRatio;if(Ct._glcanvas){Ct._glcanvas.attr("width",Ct.width*Gt).attr("height",Ct.height*Gt).style("width",Ct.width+"px").style("height",Ct.height+"px");var nr=Ct._glcanvas.data()[0].regl;if(nr&&(Math.floor(Ct.width*Gt)!==nr._gl.drawingBufferWidth||Math.floor(Ct.height*Gt)!==nr._gl.drawingBufferHeight)){var ar="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(Wt)L.error(ar);else return L.log(ar+" Clearing graph and plotting again."),s.cleanPlot([],{},be._fullData,Ct),s.supplyDefaults(be),Ct=be._fullLayout,s.doCalcdata(be),Wt++,cr()}}return Ct.modebar.orientation==="h"?Ct._modebardiv.style("height",null).style("width","100%"):Ct._modebardiv.style("width",null).style("height",Ct.height+"px"),s.previousPromises(be)}function er(){if(s.clearAutoMarginIds(be),b.drawMarginPushers(be),a.allowAutoMargin(be),be._fullLayout.title.text&&be._fullLayout.title.automargin&&s.allowAutoMargin(be,"title.automargin"),Ct._has("pie"))for(var _t=be._fullData,It=0;It<_t.length;It++){var Gt=_t[It];Gt.type==="pie"&&Gt.automargin&&s.allowAutoMargin(be,"pie."+Gt.uid+".automargin")}return s.doAutoMargin(be),s.previousPromises(be)}function ct(){if(s.didMarginChange(Ht,Ct._size))return L.syncOrAsync([er,b.layoutStyles],be)}function qe(){if(!gr){dt();return}return L.syncOrAsync([r.getComponentMethod("shapes","calcAutorange"),r.getComponentMethod("annotations","calcAutorange"),dt],be)}function dt(){be._transitioning||(b.doAutoRangeAndConstraints(be),gt&&a.saveRangeInitial(be),r.getComponentMethod("rangeslider","calcAutorange")(be))}function bt(){return a.draw(be,gt?"":"redraw")}var Et=[s.previousPromises,Vt,cr,er,ct];Yt&&Et.push(qe),Et.push(b.layoutStyles),Yt&&Et.push(bt,function(It){var Gt=It._fullLayout._insideTickLabelsUpdaterange;if(Gt)return It._fullLayout._insideTickLabelsUpdaterange=void 0,we(It,Gt).then(function(){a.saveRangeInitial(It,!0)})}),Et.push(b.drawData,b.finalDraw,h,s.addLinks,s.rehover,s.redrag,s.reselect,s.doAutoMargin,s.previousPromises);var Mt=L.syncOrAsync(Et,be);return(!Mt||!Mt.then)&&(Mt=Promise.resolve()),Mt.then(function(){return C(be),be})}function C(be){var ke=be._fullLayout;ke._redrawFromAutoMarginCount?ke._redrawFromAutoMarginCount--:be.emit("plotly_afterplot")}function x(be){return L.extendFlat(n,be)}function k(be,ke){try{be._fullLayout._paper.style("background",ke)}catch(Ve){L.error(Ve)}}function I(be,ke){var Ve=y.combine(ke,"white");k(be,Ve)}function B(be,ke){if(!be._context){be._context=L.extendDeep({},n);var Ve=A.select("base");be._context._baseUrl=Ve.size()&&Ve.attr("href")?window.location.href.split("#")[0]:""}var je=be._context,at,ut,Nt;if(ke){for(ut=Object.keys(ke),at=0;at<ut.length;at++)Nt=ut[at],!(Nt==="editable"||Nt==="edits")&&Nt in je&&(Nt==="setBackground"&&ke[Nt]==="opaque"?je[Nt]=I:je[Nt]=ke[Nt]);ke.plot3dPixelRatio&&!je.plotGlPixelRatio&&(je.plotGlPixelRatio=je.plot3dPixelRatio);var Vt=ke.editable;if(Vt!==void 0)for(je.editable=Vt,ut=Object.keys(je.edits),at=0;at<ut.length;at++)je.edits[ut[at]]=Vt;if(ke.edits)for(ut=Object.keys(ke.edits),at=0;at<ut.length;at++)Nt=ut[at],Nt in je.edits&&(je.edits[Nt]=ke.edits[Nt]);je._exportedPlot=ke._exportedPlot}je.staticPlot&&(je.editable=!1,je.edits={},je.autosizable=!1,je.scrollZoom=!1,je.doubleClick=!1,je.showTips=!1,je.showLink=!1,je.displayModeBar=!1),je.displayModeBar==="hover"&&!o&&(je.displayModeBar=!0),(je.setBackground==="transparent"||typeof je.setBackground!="function")&&(je.setBackground=k),je._hasZeroHeight=je._hasZeroHeight||be.clientHeight===0,je._hasZeroWidth=je._hasZeroWidth||be.clientWidth===0;var gt=je.scrollZoom,Ct=je._scrollZoom={};if(gt===!0)Ct.cartesian=1,Ct.gl3d=1,Ct.geo=1,Ct.mapbox=1;else if(typeof gt=="string"){var Yt=gt.split("+");for(at=0;at<Yt.length;at++)Ct[Yt[at]]=1}else gt!==!1&&(Ct.gl3d=1,Ct.geo=1,Ct.mapbox=1)}function _(be){if(be=L.getGraphDiv(be),!L.isPlotDiv(be))throw new Error("This element is not a Plotly plot: "+be);return m.cleanData(be.data),m.cleanLayout(be.layout),be.calcdata=void 0,X._doPlot(be).then(function(){return be.emit("plotly_redraw"),be})}function z(be,ke,Ve,je){return be=L.getGraphDiv(be),s.cleanPlot([],{},be._fullData||[],be._fullLayout||{}),s.purge(be),X._doPlot(be,ke,Ve,je)}function O(be,ke){var Ve=ke+1,je=[],at,ut;for(at=0;at<be.length;at++)ut=be[at],ut<0?je.push(Ve+ut):je.push(ut);return je}function F(be,ke,Ve){var je,at;for(je=0;je<ke.length;je++){if(at=ke[je],at!==parseInt(at,10))throw new Error("all values in "+Ve+" must be integers");if(at>=be.data.length||at<-be.data.length)throw new Error(Ve+" must be valid indices for gd.data.");if(ke.indexOf(at,je+1)>-1||at>=0&&ke.indexOf(-be.data.length+at)>-1||at<0&&ke.indexOf(be.data.length+at)>-1)throw new Error("each index in "+Ve+" must be unique.")}}function N(be,ke,Ve){if(!Array.isArray(be.data))throw new Error("gd.data must be an array.");if(typeof ke>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(ke)||(ke=[ke]),F(be,ke,"currentIndices"),typeof Ve<"u"&&!Array.isArray(Ve)&&(Ve=[Ve]),typeof Ve<"u"&&F(be,Ve,"newIndices"),typeof Ve<"u"&&ke.length!==Ve.length)throw new Error("current and new indices must be of equal length.")}function V(be,ke,Ve){var je,at;if(!Array.isArray(be.data))throw new Error("gd.data must be an array.");if(typeof ke>"u")throw new Error("traces must be defined.");for(Array.isArray(ke)||(ke=[ke]),je=0;je<ke.length;je++)if(at=ke[je],typeof at!="object"||Array.isArray(at)||at===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ve<"u"&&!Array.isArray(Ve)&&(Ve=[Ve]),typeof Ve<"u"&&Ve.length!==ke.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function j(be,ke,Ve,je){var at=L.isPlainObject(je);if(!Array.isArray(be.data))throw new Error("gd.data must be an array");if(!L.isPlainObject(ke))throw new Error("update must be a key:value object");if(typeof Ve>"u")throw new Error("indices must be an integer or array of integers");F(be,Ve,"indices");for(var ut in ke){if(!Array.isArray(ke[ut])||ke[ut].length!==Ve.length)throw new Error("attribute "+ut+" must be an array of length equal to indices array length");if(at&&(!(ut in je)||!Array.isArray(je[ut])||je[ut].length!==ke[ut].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")}}function $(be,ke,Ve,je){var at=L.isPlainObject(je),ut=[],Nt,Vt,gt,Ct,Yt;Array.isArray(Ve)||(Ve=[Ve]),Ve=O(Ve,be.data.length-1);for(var gr in ke)for(var ht=0;ht<Ve.length;ht++){if(Nt=be.data[Ve[ht]],gt=M(Nt,gr),Vt=gt.get(),Ct=ke[gr][ht],!L.isArrayOrTypedArray(Ct))throw new Error("attribute: "+gr+" index: "+ht+" must be an array");if(!L.isArrayOrTypedArray(Vt))throw new Error("cannot extend missing or non-array attribute: "+gr);if(Vt.constructor!==Ct.constructor)throw new Error("cannot extend array with an array of a different type: "+gr);Yt=at?je[gr][ht]:je,P(Yt)||(Yt=-1),ut.push({prop:gt,target:Vt,insert:Ct,maxp:Math.floor(Yt)})}return ut}function q(be,ke,Ve,je,at){j(be,ke,Ve,je);for(var ut=$(be,ke,Ve,je),Nt={},Vt={},gt=0;gt<ut.length;gt++){var Ct=ut[gt].prop,Yt=ut[gt].maxp,gr=at(ut[gt].target,ut[gt].insert,Yt);Ct.set(gr[0]),Array.isArray(Nt[Ct.astr])||(Nt[Ct.astr]=[]),Nt[Ct.astr].push(gr[1]),Array.isArray(Vt[Ct.astr])||(Vt[Ct.astr]=[]),Vt[Ct.astr].push(ut[gt].target.length)}return{update:Nt,maxPoints:Vt}}function oe(be,ke){var Ve=new be.constructor(be.length+ke.length);return Ve.set(be),Ve.set(ke,be.length),Ve}function Z(be,ke,Ve,je){be=L.getGraphDiv(be);function at(gt,Ct,Yt){var gr,ht;if(L.isTypedArray(gt))if(Yt<0){var Ht=new gt.constructor(0),Wt=oe(gt,Ct);Yt<0?(gr=Wt,ht=Ht):(gr=Ht,ht=Wt)}else if(gr=new gt.constructor(Yt),ht=new gt.constructor(gt.length+Ct.length-Yt),Yt===Ct.length)gr.set(Ct),ht.set(gt);else if(Yt<Ct.length){var cr=Ct.length-Yt;gr.set(Ct.subarray(cr)),ht.set(gt),ht.set(Ct.subarray(0,cr),gt.length)}else{var er=Yt-Ct.length,ct=gt.length-er;gr.set(gt.subarray(ct)),gr.set(Ct,er),ht.set(gt.subarray(0,ct))}else gr=gt.concat(Ct),ht=Yt>=0&&Yt<gr.length?gr.splice(0,gr.length-Yt):[];return[gr,ht]}var ut=q(be,ke,Ve,je,at),Nt=X.redraw(be),Vt=[be,ut.update,Ve,ut.maxPoints];return g.add(be,X.prependTraces,Vt,Z,arguments),Nt}function G(be,ke,Ve,je){be=L.getGraphDiv(be);function at(gt,Ct,Yt){var gr,ht;if(L.isTypedArray(gt))if(Yt<=0){var Ht=new gt.constructor(0),Wt=oe(Ct,gt);Yt<0?(gr=Wt,ht=Ht):(gr=Ht,ht=Wt)}else if(gr=new gt.constructor(Yt),ht=new gt.constructor(gt.length+Ct.length-Yt),Yt===Ct.length)gr.set(Ct),ht.set(gt);else if(Yt<Ct.length){var cr=Ct.length-Yt;gr.set(Ct.subarray(0,cr)),ht.set(Ct.subarray(cr)),ht.set(gt,cr)}else{var er=Yt-Ct.length;gr.set(Ct),gr.set(gt.subarray(0,er),Ct.length),ht.set(gt.subarray(er))}else gr=Ct.concat(gt),ht=Yt>=0&&Yt<gr.length?gr.splice(Yt,gr.length):[];return[gr,ht]}var ut=q(be,ke,Ve,je,at),Nt=X.redraw(be),Vt=[be,ut.update,Ve,ut.maxPoints];return g.add(be,X.extendTraces,Vt,G,arguments),Nt}function re(be,ke,Ve){be=L.getGraphDiv(be);var je=[],at=X.deleteTraces,ut=re,Nt=[be,je],Vt=[be,ke],gt,Ct;for(V(be,ke,Ve),Array.isArray(ke)||(ke=[ke]),ke=ke.map(function(Yt){return L.extendFlat({},Yt)}),m.cleanData(ke),gt=0;gt<ke.length;gt++)be.data.push(ke[gt]);for(gt=0;gt<ke.length;gt++)je.push(-ke.length+gt);if(typeof Ve>"u")return Ct=X.redraw(be),g.add(be,at,Nt,ut,Vt),Ct;Array.isArray(Ve)||(Ve=[Ve]);try{N(be,je,Ve)}catch(Yt){throw be.data.splice(be.data.length-ke.length,ke.length),Yt}return g.startSequence(be),g.add(be,at,Nt,ut,Vt),Ct=X.moveTraces(be,je,Ve),g.stopSequence(be),Ct}function H(be,ke){be=L.getGraphDiv(be);var Ve=[],je=X.addTraces,at=H,ut=[be,Ve,ke],Nt=[be,ke],Vt,gt;if(typeof ke>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(ke)||(ke=[ke]),F(be,ke,"indices"),ke=O(ke,be.data.length-1),ke.sort(L.sorterDes),Vt=0;Vt<ke.length;Vt+=1)gt=be.data.splice(ke[Vt],1)[0],Ve.push(gt);var Ct=X.redraw(be);return g.add(be,je,ut,at,Nt),Ct}function J(be,ke,Ve){be=L.getGraphDiv(be);var je=[],at=[],ut=J,Nt=J,Vt=[be,Ve,ke],gt=[be,ke,Ve],Ct;if(N(be,ke,Ve),ke=Array.isArray(ke)?ke:[ke],typeof Ve>"u")for(Ve=[],Ct=0;Ct<ke.length;Ct++)Ve.push(-ke.length+Ct);for(Ve=Array.isArray(Ve)?Ve:[Ve],ke=O(ke,be.data.length-1),Ve=O(Ve,be.data.length-1),Ct=0;Ct<be.data.length;Ct++)ke.indexOf(Ct)===-1&&je.push(be.data[Ct]);for(Ct=0;Ct<ke.length;Ct++)at.push({newIndex:Ve[Ct],trace:be.data[ke[Ct]]});for(at.sort(function(gr,ht){return gr.newIndex-ht.newIndex}),Ct=0;Ct<at.length;Ct+=1)je.splice(at[Ct].newIndex,0,at[Ct].trace);be.data=je;var Yt=X.redraw(be);return g.add(be,ut,Vt,Nt,gt),Yt}function ae(be,ke,Ve,je){be=L.getGraphDiv(be),m.clearPromiseQueue(be);var at={};if(typeof ke=="string")at[ke]=Ve;else if(L.isPlainObject(ke))at=L.extendFlat({},ke),je===void 0&&(je=Ve);else return L.warn("Restyle fail.",ke,Ve,je),Promise.reject();Object.keys(at).length&&(be.changed=!0);var ut=m.coerceTraceIndices(be,je),Nt=le(be,at,ut),Vt=Nt.flags;Vt.calc&&(be.calcdata=void 0),Vt.clearAxisTypes&&m.clearAxisTypes(be,ut,{});var gt=[];Vt.fullReplot?gt.push(X._doPlot):(gt.push(s.previousPromises),s.supplyDefaults(be),Vt.markerSize&&(s.doCalcdata(be),Le(gt)),Vt.style&&gt.push(b.doTraceStyle),Vt.colorbars&&gt.push(b.doColorBars),gt.push(C)),gt.push(s.rehover,s.redrag,s.reselect),g.add(be,ae,[be,Nt.undoit,Nt.traces],ae,[be,Nt.redoit,Nt.traces]);var Ct=L.syncOrAsync(gt,be);return(!Ct||!Ct.then)&&(Ct=Promise.resolve()),Ct.then(function(){return be.emit("plotly_restyle",Nt.eventData),be})}function K(be){return be===void 0?null:be}function Y(be,ke){return ke?function(Ve,je,at){var ut=M(Ve,je),Nt=ut.set;return ut.set=function(Vt){var gt=(at||"")+je;ie(gt,ut.get(),Vt,be),Nt(Vt)},ut}:M}function ie(be,ke,Ve,je){if(Array.isArray(ke)||Array.isArray(Ve))for(var at=Array.isArray(ke)?ke:[],ut=Array.isArray(Ve)?Ve:[],Nt=Math.max(at.length,ut.length),Vt=0;Vt<Nt;Vt++)ie(be+"["+Vt+"]",at[Vt],ut[Vt],je);else if(L.isPlainObject(ke)||L.isPlainObject(Ve)){var gt=L.isPlainObject(ke)?ke:{},Ct=L.isPlainObject(Ve)?Ve:{},Yt=L.extendFlat({},gt,Ct);for(var gr in Yt)ie(be+"."+gr,gt[gr],Ct[gr],je)}else je[be]===void 0&&(je[be]=K(ke))}function ne(be,ke,Ve){for(var je in Ve){var at=M(be,je);ie(je,at.get(),Ve[je],ke)}}function le(be,ke,Ve){var je=be._fullLayout,at=be._fullData,ut=be.data,Nt=je._guiEditing,Vt=Y(je._preGUI,Nt),gt=L.extendDeepAll({},ke),Ct;de(ke);var Yt=E.traceFlags(),gr={},ht={},Ht;function Wt(){return Ve.map(function(){})}function cr(xn){var or=a.id2name(xn);Ht.indexOf(or)===-1&&Ht.push(or)}function er(xn){return"LAYOUT"+xn+".autorange"}function ct(xn){return"LAYOUT"+xn+".range"}function qe(xn){for(var or=xn;or<at.length;or++)if(at[or]._input===ut[xn])return at[or]}function dt(xn,or,Lr){if(Array.isArray(xn)){xn.forEach(function(un){dt(un,or,Lr)});return}if(!(xn in ke||m.hasParent(ke,xn))){var Br;if(xn.substr(0,6)==="LAYOUT")Br=Vt(be.layout,xn.replace("LAYOUT",""));else{var _r=Ve[Lr],Qr=je._tracePreGUI[qe(_r)._fullInput.uid];Br=Y(Qr,Nt)(ut[_r],xn)}xn in ht||(ht[xn]=Wt()),ht[xn][Lr]===void 0&&(ht[xn][Lr]=K(Br.get())),or!==void 0&&Br.set(or)}}function bt(xn){return function(or){return at[or][xn]}}function Et(xn){return function(or,Lr){return or===!1?at[Ve[Lr]][xn]:null}}for(var Mt in ke){if(m.hasParent(ke,Mt))throw new Error("cannot set "+Mt+" and a parent attribute simultaneously");var _t=ke[Mt],It,Gt,nr,ar,ir,Be;if((Mt==="autobinx"||Mt==="autobiny")&&(Mt=Mt.charAt(Mt.length-1)+"bins",Array.isArray(_t)?_t=_t.map(Et(Mt)):_t===!1?_t=Ve.map(bt(Mt)):_t=null),gr[Mt]=_t,Mt.substr(0,6)==="LAYOUT"){nr=Vt(be.layout,Mt.replace("LAYOUT","")),ht[Mt]=[K(nr.get())],nr.set(Array.isArray(_t)?_t[0]:_t),Yt.calc=!0;continue}for(ht[Mt]=Wt(),Ct=0;Ct<Ve.length;Ct++){It=ut[Ve[Ct]],Gt=qe(Ve[Ct]);var Fe=je._tracePreGUI[Gt._fullInput.uid];if(nr=Y(Fe,Nt)(It,Mt),ar=nr.get(),ir=Array.isArray(_t)?_t[Ct%_t.length]:_t,ir!==void 0){var Rt=nr.parts[nr.parts.length-1],Lt=Mt.substr(0,Mt.length-Rt.length-1),Ut=Lt?Lt+".":"",Qt=Lt?M(Gt,Lt).get():Gt;if(Be=t.getTraceValObject(Gt,nr.parts),Be&&Be.impliedEdits&&ir!==null)for(var rr in Be.impliedEdits)dt(L.relativeAttr(Mt,rr),Be.impliedEdits[rr],Ct);else if((Rt==="thicknessmode"||Rt==="lenmode")&&ar!==ir&&(ir==="fraction"||ir==="pixels")&&Qt){var Kt=je._size,Dt=Qt.orient,sr=Dt==="top"||Dt==="bottom";if(Rt==="thicknessmode"){var fr=sr?Kt.h:Kt.w;dt(Ut+"thickness",Qt.thickness*(ir==="fraction"?1/fr:fr),Ct)}else{var vr=sr?Kt.w:Kt.h;dt(Ut+"len",Qt.len*(ir==="fraction"?1/vr:vr),Ct)}}else if(Mt==="type"&&(ir==="pie"!=(ar==="pie")||ir==="funnelarea"!=(ar==="funnelarea"))){var lr="x",Or="y";(ir==="bar"||ar==="bar")&&It.orientation==="h"&&(lr="y",Or="x"),L.swapAttrs(It,["?","?src"],"labels",lr),L.swapAttrs(It,["d?","?0"],"label",lr),L.swapAttrs(It,["?","?src"],"values",Or),ar==="pie"||ar==="funnelarea"?(M(It,"marker.color").set(M(It,"marker.colors").get()),je._pielayer.selectAll("g.trace").remove()):r.traceIs(It,"cartesian")&&M(It,"marker.colors").set(M(It,"marker.color").get())}ht[Mt][Ct]=K(ar);var Sr=["swapxy","swapxyaxes","orientation","orientationaxes"];if(Sr.indexOf(Mt)!==-1){if(Mt==="orientation"){nr.set(ir);var Ar=It.x&&!It.y?"h":"v";if((nr.get()||Ar)===Gt.orientation)continue}else Mt==="orientationaxes"&&(It.orientation={v:"h",h:"v"}[Gt.orientation]);m.swapXYData(It),Yt.calc=Yt.clearAxisTypes=!0}else s.dataArrayContainers.indexOf(nr.parts[0])!==-1?(m.manageArrayContainers(nr,ir,ht),Yt.calc=!0):(Be?Be.arrayOk&&!r.traceIs(Gt,"regl")&&(L.isArrayOrTypedArray(ir)||L.isArrayOrTypedArray(ar))?Yt.calc=!0:E.update(Yt,Be):Yt.calc=!0,nr.set(ir))}}if(["swapxyaxes","orientationaxes"].indexOf(Mt)!==-1&&a.swap(be,Ve),Mt==="orientationaxes"){var sn=M(be.layout,"hovermode"),Jr=sn.get();Jr==="x"?sn.set("y"):Jr==="y"?sn.set("x"):Jr==="x unified"?sn.set("y unified"):Jr==="y unified"&&sn.set("x unified")}if(["orientation","type"].indexOf(Mt)!==-1){for(Ht=[],Ct=0;Ct<Ve.length;Ct++){var bn=ut[Ve[Ct]];r.traceIs(bn,"cartesian")&&(cr(bn.xaxis||"x"),cr(bn.yaxis||"y"))}dt(Ht.map(er),!0,0),dt(Ht.map(ct),[0,1],0)}}return(Yt.calc||Yt.plot)&&(Yt.fullReplot=!0),{flags:Yt,undoit:ht,redoit:gr,traces:Ve,eventData:L.extendDeepNoArrays([],[gt,Ve])}}function de(be){var ke=L.counterRegex("axis",".title",!1,!1),Ve=/colorbar\.title$/,je=Object.keys(be),at,ut,Nt;for(at=0;at<je.length;at++)ut=je[at],Nt=be[ut],(ut==="title"||ke.test(ut)||Ve.test(ut))&&(typeof Nt=="string"||typeof Nt=="number")?Vt(ut,ut.replace("title","title.text")):ut.indexOf("titlefont")>-1&&ut.indexOf("grouptitlefont")===-1?Vt(ut,ut.replace("titlefont","title.font")):ut.indexOf("titleposition")>-1?Vt(ut,ut.replace("titleposition","title.position")):ut.indexOf("titleside")>-1?Vt(ut,ut.replace("titleside","title.side")):ut.indexOf("titleoffset")>-1&&Vt(ut,ut.replace("titleoffset","title.offset"));function Vt(gt,Ct){be[Ct]=be[gt],delete be[gt]}}function we(be,ke,Ve){be=L.getGraphDiv(be),m.clearPromiseQueue(be);var je={};if(typeof ke=="string")je[ke]=Ve;else if(L.isPlainObject(ke))je=L.extendFlat({},ke);else return L.warn("Relayout fail.",ke,Ve),Promise.reject();Object.keys(je).length&&(be.changed=!0);var at=Se(be,je),ut=at.flags;ut.calc&&(be.calcdata=void 0);var Nt=[s.previousPromises];ut.layoutReplot?Nt.push(b.layoutReplot):Object.keys(je).length&&(me(be,ut,at)||s.supplyDefaults(be),ut.legend&&Nt.push(b.doLegend),ut.layoutstyle&&Nt.push(b.layoutStyles),ut.axrange&&Le(Nt,at.rangesAltered),ut.ticks&&Nt.push(b.doTicksRelayout),ut.modebar&&Nt.push(b.doModeBar),ut.camera&&Nt.push(b.doCamera),ut.colorbars&&Nt.push(b.doColorBars),Nt.push(C)),Nt.push(s.rehover,s.redrag,s.reselect),g.add(be,we,[be,at.undoit],we,[be,at.redoit]);var Vt=L.syncOrAsync(Nt,be);return(!Vt||!Vt.then)&&(Vt=Promise.resolve(be)),Vt.then(function(){return be.emit("plotly_relayout",at.eventData),be})}function me(be,ke,Ve){var je=be._fullLayout;if(!ke.axrange)return!1;for(var at in ke)if(at!=="axrange"&&ke[at])return!1;var ut,Nt,Vt=function(Ht,Wt){return L.coerce(ut,Nt,u,Ht,Wt)},gt={};for(var Ct in Ve.rangesAltered){var Yt=a.id2name(Ct);if(ut=be.layout[Yt],Nt=je[Yt],c(ut,Nt,Vt,gt),Nt._matchGroup){for(var gr in Nt._matchGroup)if(gr!==Ct){var ht=je[a.id2name(gr)];ht.autorange=Nt.autorange,ht.range=Nt.range.slice(),ht._input.range=Nt.range.slice()}}}return!0}function Le(be,ke){var Ve=ke?function(je){var at=[],ut=!0;for(var Nt in ke){var Vt=a.getFromId(je,Nt);if(at.push(Nt),(Vt.ticklabelposition||"").indexOf("inside")!==-1&&Vt._anchorAxis&&at.push(Vt._anchorAxis._id),Vt._matchGroup)for(var gt in Vt._matchGroup)ke[gt]||at.push(gt)}return a.draw(je,at,{skipTitle:ut})}:function(je){return a.draw(je,"redraw")};be.push(f,b.doAutoRangeAndConstraints,Ve,b.drawData,b.finalDraw)}var ve=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Ae=/^[xyz]axis[0-9]*\.autorange$/,ye=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Se(be,ke){var Ve=be.layout,je=be._fullLayout,at=je._guiEditing,ut=Y(je._preGUI,at),Nt=Object.keys(ke),Vt=a.list(be),gt=L.extendDeepAll({},ke),Ct={},Yt,gr,ht;for(de(ke),Nt=Object.keys(ke),gr=0;gr<Nt.length;gr++)if(Nt[gr].indexOf("allaxes")===0){for(ht=0;ht<Vt.length;ht++){var Ht=Vt[ht]._id.substr(1),Wt=Ht.indexOf("scene")!==-1?Ht+".":"",cr=Nt[gr].replace("allaxes",Wt+Vt[ht]._name);ke[cr]||(ke[cr]=ke[Nt[gr]])}delete ke[Nt[gr]]}var er=E.layoutFlags(),ct={},qe={};function dt(Qr,un){if(Array.isArray(Qr)){Qr.forEach(function(Mn){dt(Mn,un)});return}if(!(Qr in ke||m.hasParent(ke,Qr))){var ln=ut(Ve,Qr);Qr in qe||(qe[Qr]=K(ln.get())),un!==void 0&&ln.set(un)}}var bt={},Et;function Mt(Qr){var un=a.name2id(Qr.split(".")[0]);return bt[un]=1,un}for(var _t in ke){if(m.hasParent(ke,_t))throw new Error("cannot set "+_t+" and a parent attribute simultaneously");for(var It=ut(Ve,_t),Gt=ke[_t],nr=It.parts.length,ar=nr-1;ar>0&&typeof It.parts[ar]!="string";)ar--;var ir=It.parts[ar],Be=It.parts[ar-1]+"."+ir,Fe=It.parts.slice(0,ar).join("."),Rt=M(be.layout,Fe).get(),Lt=M(je,Fe).get(),Ut=It.get();if(Gt!==void 0){ct[_t]=Gt,qe[_t]=ir==="reverse"?Gt:K(Ut);var Qt=t.getLayoutValObject(je,It.parts);if(Qt&&Qt.impliedEdits&&Gt!==null)for(var rr in Qt.impliedEdits)dt(L.relativeAttr(_t,rr),Qt.impliedEdits[rr]);if(["width","height"].indexOf(_t)!==-1)if(Gt){dt("autosize",null);var Kt=_t==="height"?"width":"height";dt(Kt,je[Kt])}else je[_t]=be._initialAutoSize[_t];else if(_t==="autosize")dt("width",Gt?null:je.width),dt("height",Gt?null:je.height);else if(Be.match(ve))Mt(Be),M(je,Fe+"._inputRange").set(null);else if(Be.match(Ae)){Mt(Be),M(je,Fe+"._inputRange").set(null);var Dt=M(je,Fe).get();Dt._inputDomain&&(Dt._input.domain=Dt._inputDomain.slice())}else Be.match(ye)&&M(je,Fe+"._inputDomain").set(null);if(ir==="type"){Et=Rt;var sr=Lt.type==="linear"&&Gt==="log",fr=Lt.type==="log"&&Gt==="linear";if(sr||fr){if(!Et||!Et.range)dt(Fe+".autorange",!0);else if(Lt.autorange)sr&&(Et.range=Et.range[1]>Et.range[0]?[1,2]:[2,1]);else{var vr=Et.range[0],lr=Et.range[1];sr?(vr<=0&&lr<=0&&dt(Fe+".autorange",!0),vr<=0?vr=lr/1e6:lr<=0&&(lr=vr/1e6),dt(Fe+".range[0]",Math.log(vr)/Math.LN10),dt(Fe+".range[1]",Math.log(lr)/Math.LN10)):(dt(Fe+".range[0]",Math.pow(10,vr)),dt(Fe+".range[1]",Math.pow(10,lr)))}Array.isArray(je._subplots.polar)&&je._subplots.polar.length&&je[It.parts[0]]&&It.parts[1]==="radialaxis"&&delete je[It.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(be,Lt,Gt,dt),r.getComponentMethod("images","convertCoords")(be,Lt,Gt,dt)}else dt(Fe+".autorange",!0),dt(Fe+".range",null);M(je,Fe+"._inputRange").set(null)}else if(ir.match(p)){var Or=M(je,_t).get(),Sr=(Gt||{}).type;(!Sr||Sr==="-")&&(Sr="linear"),r.getComponentMethod("annotations","convertCoords")(be,Or,Sr,dt),r.getComponentMethod("images","convertCoords")(be,Or,Sr,dt)}var Ar=v.containerArrayMatch(_t);if(Ar){Yt=Ar.array,gr=Ar.index;var sn=Ar.property,Jr=Qt||{editType:"calc"};gr!==""&&sn===""&&(v.isAddVal(Gt)?qe[_t]=null:v.isRemoveVal(Gt)?qe[_t]=(M(Ve,Yt).get()||[])[gr]:L.warn("unrecognized full object value",ke)),E.update(er,Jr),Ct[Yt]||(Ct[Yt]={});var bn=Ct[Yt][gr];bn||(bn=Ct[Yt][gr]={}),bn[sn]=Gt,delete ke[_t]}else ir==="reverse"?(Rt.range?Rt.range.reverse():(dt(Fe+".autorange",!0),Rt.range=[1,0]),Lt.autorange?er.calc=!0:er.plot=!0):(_t==="dragmode"&&(Gt===!1&&Ut!==!1||Gt!==!1&&Ut===!1)||je._has("scatter-like")&&je._has("regl")&&_t==="dragmode"&&(Gt==="lasso"||Gt==="select")&&!(Ut==="lasso"||Ut==="select")||je._has("gl2d")?er.plot=!0:Qt?E.update(er,Qt):er.calc=!0,It.set(Gt))}}for(Yt in Ct){var xn=v.applyContainerArrayChanges(be,ut(Ve,Yt),Ct[Yt],er,ut);xn||(er.plot=!0)}for(var or in bt){Et=a.getFromId(be,or);var Lr=Et&&Et._constraintGroup;if(Lr){er.calc=!0;for(var Br in Lr)bt[Br]||(a.getFromId(be,Br)._constraintShrinkable=!0)}}(_e(be)||ke.height||ke.width)&&(er.plot=!0);var _r=je.shapes;for(gr=0;gr<_r.length;gr++)if(_r[gr].showlegend){er.calc=!0;break}return(er.plot||er.calc)&&(er.layoutReplot=!0),{flags:er,rangesAltered:bt,undoit:qe,redoit:ct,eventData:gt}}function _e(be){var ke=be._fullLayout,Ve=ke.width,je=ke.height;return be.layout.autosize&&s.plotAutoSize(be,be.layout,ke),ke.width!==Ve||ke.height!==je}function ze(be,ke,Ve,je){be=L.getGraphDiv(be),m.clearPromiseQueue(be),L.isPlainObject(ke)||(ke={}),L.isPlainObject(Ve)||(Ve={}),Object.keys(ke).length&&(be.changed=!0),Object.keys(Ve).length&&(be.changed=!0);var at=m.coerceTraceIndices(be,je),ut=le(be,L.extendFlat({},ke),at),Nt=ut.flags,Vt=Se(be,L.extendFlat({},Ve)),gt=Vt.flags;(Nt.calc||gt.calc)&&(be.calcdata=void 0),Nt.clearAxisTypes&&m.clearAxisTypes(be,at,Ve);var Ct=[];gt.layoutReplot?Ct.push(b.layoutReplot):Nt.fullReplot?Ct.push(X._doPlot):(Ct.push(s.previousPromises),me(be,gt,Vt)||s.supplyDefaults(be),Nt.style&&Ct.push(b.doTraceStyle),(Nt.colorbars||gt.colorbars)&&Ct.push(b.doColorBars),gt.legend&&Ct.push(b.doLegend),gt.layoutstyle&&Ct.push(b.layoutStyles),gt.axrange&&Le(Ct,Vt.rangesAltered),gt.ticks&&Ct.push(b.doTicksRelayout),gt.modebar&&Ct.push(b.doModeBar),gt.camera&&Ct.push(b.doCamera),Ct.push(C)),Ct.push(s.rehover,s.redrag,s.reselect),g.add(be,ze,[be,ut.undoit,Vt.undoit,ut.traces],ze,[be,ut.redoit,Vt.redoit,ut.traces]);var Yt=L.syncOrAsync(Ct,be);return(!Yt||!Yt.then)&&(Yt=Promise.resolve(be)),Yt.then(function(){return be.emit("plotly_update",{data:ut.eventData,layout:Vt.eventData}),be})}function Ie(be){return function(Ve){Ve._fullLayout._guiEditing=!0;var je=be.apply(null,arguments);return Ve._fullLayout._guiEditing=!1,je}}var Ne=[{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"}],et=[{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 st(be,ke){for(var Ve=0;Ve<ke.length;Ve++){var je=ke[Ve],at=be.match(je.pattern);if(at){var ut=at[1]||"";return{head:ut,tail:be.substr(ut.length+1),attr:je.attr}}}}function Ze(be,ke){var Ve=M(ke,be).get();if(Ve!==void 0)return Ve;var je=be.split(".");for(je.pop();je.length>1;)if(je.pop(),Ve=M(ke,je.join(".")+".uirevision").get(),Ve!==void 0)return Ve;return ke.uirevision}function Ke(be,ke){for(var Ve=0;Ve<ke.length;Ve++)if(ke[Ve]._fullInput.uid===be)return Ve;return-1}function nt(be,ke,Ve){for(var je=0;je<ke.length;je++)if(ke[je].uid===be)return je;return!ke[Ve]||ke[Ve].uid?-1:Ve}function it(be,ke){var Ve=L.isPlainObject(be),je=Array.isArray(be);return Ve||je?(Ve&&L.isPlainObject(ke)||je&&Array.isArray(ke))&&JSON.stringify(be)===JSON.stringify(ke):be===ke}function lt(be,ke,Ve,je){var at=je._preGUI,ut,Nt,Vt,gt,Ct,Yt,gr,ht,Ht,Wt,cr=[],er={},ct={};for(ut in at){if(Ct=st(ut,Ne),Ct){if(Ht=Ct.head,Wt=Ct.tail,Nt=Ct.attr||Ht+".uirevision",Vt=M(je,Nt).get(),gt=Vt&&Ze(Nt,ke),gt&&gt===Vt){if(Yt=at[ut],Yt===null&&(Yt=void 0),gr=M(ke,ut),ht=gr.get(),it(ht,Yt)){ht===void 0&&Wt==="autorange"&&cr.push(Ht),gr.set(K(M(je,ut).get()));continue}else if(Wt==="autorange"||Wt.substr(0,6)==="range["){var qe=at[Ht+".range[0]"],dt=at[Ht+".range[1]"],bt=at[Ht+".autorange"];if(bt||bt===null&&qe===null&&dt===null){if(!(Ht in er)){var Et=M(ke,Ht).get();er[Ht]=Et&&(Et.autorange||Et.autorange!==!1&&(!Et.range||Et.range.length!==2))}if(er[Ht]){gr.set(K(M(je,ut).get()));continue}}}}}else L.warn("unrecognized GUI edit: "+ut);delete at[ut],Ct&&Ct.tail.substr(0,6)==="range["&&(ct[Ct.head]=1)}for(var Mt=0;Mt<cr.length;Mt++){var _t=cr[Mt];if(ct[_t]){var It=M(ke,_t).get();It&&delete It.autorange}}var Gt=je._tracePreGUI;for(var nr in Gt){var ar=Gt[nr],ir=null,Be;for(ut in ar){if(!ir){var Fe=Ke(nr,Ve);if(Fe<0){delete Gt[nr];break}var Rt=Ve[Fe];Be=Rt._fullInput;var Lt=nt(nr,be,Be.index);if(Lt<0){delete Gt[nr];break}ir=be[Lt]}if(Ct=st(ut,et),Ct){if(Ct.attr?(Vt=M(je,Ct.attr).get(),gt=Vt&&Ze(Ct.attr,ke)):(Vt=Be.uirevision,gt=ir.uirevision,gt===void 0&&(gt=ke.uirevision)),gt&&gt===Vt&&(Yt=ar[ut],Yt===null&&(Yt=void 0),gr=M(ir,ut),ht=gr.get(),it(ht,Yt))){gr.set(K(M(Be,ut).get()));continue}}else L.warn("unrecognized GUI edit: "+ut+" in trace uid "+nr);delete ar[ut]}}}function vt(be,ke,Ve,je){var at,ut;function Nt(){return X.addFrames(be,at)}be=L.getGraphDiv(be),m.clearPromiseQueue(be);var Vt=be._fullData,gt=be._fullLayout;if(!L.isPlotDiv(be)||!Vt||!gt)ut=X.newPlot(be,ke,Ve,je);else{if(L.isPlainObject(ke)){var Ct=ke;ke=Ct.data,Ve=Ct.layout,je=Ct.config,at=Ct.frames}var Yt=!1;if(je){var gr=L.extendDeep({},be._context);be._context=void 0,B(be,je),Yt=Ue(gr,be._context)}be.data=ke||[],m.cleanData(be.data),be.layout=Ve||{},m.cleanLayout(be.layout),lt(be.data,be.layout,Vt,gt),s.supplyDefaults(be,{skipUpdateCalc:!0});var ht=be._fullData,Ht=be._fullLayout,Wt=Ht.datarevision===void 0,cr=Ht.transition,er=Je(be,gt,Ht,Wt,cr),ct=er.newDataRevision,qe=xt(be,Vt,ht,Wt,cr,ct);if(_e(be)&&(er.layoutReplot=!0),qe.calc||er.calc){be.calcdata=void 0;for(var dt=Object.getOwnPropertyNames(Ht),bt=0;bt<dt.length;bt++){var Et=dt[bt],Mt=Et.substring(0,5);if(Mt==="xaxis"||Mt==="yaxis"){var _t=Ht[Et]._emptyCategories;_t&&_t()}}}else s.supplyDefaultsUpdateCalc(be.calcdata,ht);var It=[];if(at&&(be._transitionData={},s.createTransitionData(be),It.push(Nt)),Ht.transition&&!Yt&&(qe.anim||er.anim))er.ticks&&It.push(b.doTicksRelayout),s.doCalcdata(be),b.doAutoRangeAndConstraints(be),It.push(function(){return s.transitionFromReact(be,qe,er,gt)});else if(qe.fullReplot||er.layoutReplot||Yt)be._fullLayout._skipDefaults=!0,It.push(X._doPlot);else{for(var Gt in er.arrays){var nr=er.arrays[Gt];if(nr.length){var ar=r.getComponentMethod(Gt,"drawOne");if(ar!==L.noop)for(var ir=0;ir<nr.length;ir++)ar(be,nr[ir]);else{var Be=r.getComponentMethod(Gt,"draw");if(Be===L.noop)throw new Error("cannot draw components: "+Gt);Be(be)}}}It.push(s.previousPromises),qe.style&&It.push(b.doTraceStyle),(qe.colorbars||er.colorbars)&&It.push(b.doColorBars),er.legend&&It.push(b.doLegend),er.layoutstyle&&It.push(b.layoutStyles),er.axrange&&Le(It),er.ticks&&It.push(b.doTicksRelayout),er.modebar&&It.push(b.doModeBar),er.camera&&It.push(b.doCamera),It.push(C)}It.push(s.rehover,s.redrag,s.reselect),ut=L.syncOrAsync(It,be),(!ut||!ut.then)&&(ut=Promise.resolve(be))}return ut.then(function(){return be.emit("plotly_react",{data:ke,layout:Ve}),be})}function xt(be,ke,Ve,je,at,ut){var Nt=ke.length===Ve.length;if(!at&&!Nt)return{fullReplot:!0,calc:!0};var Vt=E.traceFlags();Vt.arrays={},Vt.nChanges=0,Vt.nChangesAnim=0;var gt,Ct;function Yt(Ht){var Wt=t.getTraceValObject(Ct,Ht);return!Ct._module.animatable&&Wt.anim&&(Wt.anim=!1),Wt}var gr={getValObject:Yt,flags:Vt,immutable:je,transition:at,newDataRevision:ut,gd:be},ht={};for(gt=0;gt<ke.length;gt++)if(Ve[gt]){if(Ct=Ve[gt]._fullInput,s.hasMakesDataTransform(Ct)&&(Ct=Ve[gt]),ht[Ct.uid])continue;ht[Ct.uid]=1,Pe(ke[gt]._fullInput,Ct,[],gr)}return(Vt.calc||Vt.plot)&&(Vt.fullReplot=!0),at&&Vt.nChanges&&Vt.nChangesAnim&&(Vt.anim=Vt.nChanges===Vt.nChangesAnim&&Nt?"all":"some"),Vt}function Je(be,ke,Ve,je,at){var ut=E.layoutFlags();ut.arrays={},ut.rangesAltered={},ut.nChanges=0,ut.nChangesAnim=0;function Nt(gt){return t.getLayoutValObject(Ve,gt)}var Vt={getValObject:Nt,flags:ut,immutable:je,transition:at,gd:be};return Pe(ke,Ve,[],Vt),(ut.plot||ut.calc)&&(ut.layoutReplot=!0),at&&ut.nChanges&&ut.nChangesAnim&&(ut.anim=ut.nChanges===ut.nChangesAnim?"all":"some"),ut}function Pe(be,ke,Ve,je){var at,ut,Nt,Vt=je.getValObject,gt=je.flags,Ct=je.immutable,Yt=je.inArray,gr=je.arrayIndex;function ht(){var Fe=at.editType;if(Yt&&Fe.indexOf("arraydraw")!==-1){L.pushUnique(gt.arrays[Yt],gr);return}E.update(gt,at),Fe!=="none"&&gt.nChanges++,je.transition&&at.anim&&gt.nChangesAnim++,(ve.test(Nt)||Ae.test(Nt))&&(gt.rangesAltered[Ve[0]]=1),ye.test(Nt)&&M(ke,"_inputDomain").set(null),ut==="datarevision"&&(gt.newDataRevision=1)}function Ht(Fe){return Fe.valType==="data_array"||Fe.arrayOk}for(ut in be){if(gt.calc&&!je.transition)return;var Wt=be[ut],cr=ke[ut],er=Ve.concat(ut);if(Nt=er.join("."),!(ut.charAt(0)==="_"||typeof Wt=="function"||Wt===cr)){if((ut==="tick0"||ut==="dtick")&&Ve[0]!=="geo"){var ct=ke.tickmode;if(ct==="auto"||ct==="array"||!ct)continue}if(!(ut==="range"&&ke.autorange)&&!((ut==="zmin"||ut==="zmax")&&ke.type==="contourcarpet")&&(at=Vt(er),!!at&&!(at._compareAsJSON&&JSON.stringify(Wt)===JSON.stringify(cr)))){var qe=at.valType,dt,bt=Ht(at),Et=Array.isArray(Wt),Mt=Array.isArray(cr);if(Et&&Mt){var _t="_input_"+ut,It=be[_t],Gt=ke[_t];if(Array.isArray(It)&&It===Gt)continue}if(cr===void 0)bt&&Et?gt.calc=!0:ht();else if(at._isLinkedToArray){var nr=[],ar=!1;Yt||(gt.arrays[ut]=nr);var ir=Math.min(Wt.length,cr.length),Be=Math.max(Wt.length,cr.length);if(ir!==Be)if(at.editType==="arraydraw")ar=!0;else{ht();continue}for(dt=0;dt<ir;dt++)Pe(Wt[dt],cr[dt],er.concat(dt),L.extendFlat({inArray:ut,arrayIndex:dt},je));if(ar)for(dt=ir;dt<Be;dt++)nr.push(dt)}else!qe&&L.isPlainObject(Wt)?Pe(Wt,cr,er,je):bt?Et&&Mt?(Ct&&(gt.calc=!0),(Ct||je.newDataRevision)&&ht()):Et!==Mt?gt.calc=!0:ht():Et&&Mt?(Wt.length!==cr.length||String(Wt)!==String(cr))&&ht():ht()}}}for(ut in ke)if(!(ut in be||ut.charAt(0)==="_"||typeof ke[ut]=="function"))if(at=Vt(Ve.concat(ut)),Ht(at)&&Array.isArray(ke[ut])){gt.calc=!0;return}else ht()}function Ue(be,ke){var Ve;for(Ve in be)if(Ve.charAt(0)!=="_"){var je=be[Ve],at=ke[Ve];if(je!==at)if(L.isPlainObject(je)&&L.isPlainObject(at)){if(Ue(je,at))return!0}else if(Array.isArray(je)&&Array.isArray(at)){if(je.length!==at.length)return!0;for(var ut=0;ut<je.length;ut++)if(je[ut]!==at[ut])if(L.isPlainObject(je[ut])&&L.isPlainObject(at[ut])){if(Ue(je[ut],at[ut]))return!0}else return!0}else return!0}}function He(be,ke,Ve){if(be=L.getGraphDiv(be),!L.isPlotDiv(be))throw new Error("This element is not a Plotly plot: "+be+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var je=be._transitionData;je._frameQueue||(je._frameQueue=[]),Ve=s.supplyAnimationDefaults(Ve);var at=Ve.transition,ut=Ve.frame;je._frameWaitingCnt===void 0&&(je._frameWaitingCnt=0);function Nt(Ct){return Array.isArray(at)?Ct>=at.length?at[0]:at[Ct]:at}function Vt(Ct){return Array.isArray(ut)?Ct>=ut.length?ut[0]:ut[Ct]:ut}function gt(Ct,Yt){var gr=0;return function(){if(Ct&&++gr===Yt)return Ct()}}return new Promise(function(Ct,Yt){function gr(){if(je._frameQueue.length!==0){for(;je._frameQueue.length;){var ir=je._frameQueue.pop();ir.onInterrupt&&ir.onInterrupt()}be.emit("plotly_animationinterrupted",[])}}function ht(ir){if(ir.length!==0){for(var Be=0;Be<ir.length;Be++){var Fe;ir[Be].type==="byname"?Fe=s.computeFrame(be,ir[Be].name):Fe=ir[Be].data;var Rt=Vt(Be),Lt=Nt(Be);Lt.duration=Math.min(Lt.duration,Rt.duration);var Ut={frame:Fe,name:ir[Be].name,frameOpts:Rt,transitionOpts:Lt};Be===ir.length-1&&(Ut.onComplete=gt(Ct,2),Ut.onInterrupt=Yt),je._frameQueue.push(Ut)}Ve.mode==="immediate"&&(je._lastFrameAt=-1/0),je._animationRaf||cr()}}function Ht(){be.emit("plotly_animated"),window.cancelAnimationFrame(je._animationRaf),je._animationRaf=null}function Wt(){je._currentFrame&&je._currentFrame.onComplete&&je._currentFrame.onComplete();var ir=je._currentFrame=je._frameQueue.shift();if(ir){var Be=ir.name?ir.name.toString():null;be._fullLayout._currentFrame=Be,je._lastFrameAt=Date.now(),je._timeToNext=ir.frameOpts.duration,s.transition(be,ir.frame.data,ir.frame.layout,m.coerceTraceIndices(be,ir.frame.traces),ir.frameOpts,ir.transitionOpts).then(function(){ir.onComplete&&ir.onComplete()}),be.emit("plotly_animatingframe",{name:Be,frame:ir.frame,animation:{frame:ir.frameOpts,transition:ir.transitionOpts}})}else Ht()}function cr(){be.emit("plotly_animating"),je._lastFrameAt=-1/0,je._timeToNext=0,je._runningTransitions=0,je._currentFrame=null;var ir=function(){je._animationRaf=window.requestAnimationFrame(ir),Date.now()-je._lastFrameAt>je._timeToNext&&Wt()};ir()}var er=0;function ct(ir){return Array.isArray(at)?er>=at.length?ir.transitionOpts=at[er]:ir.transitionOpts=at[0]:ir.transitionOpts=at,er++,ir}var qe,dt,bt=[],Et=ke==null,Mt=Array.isArray(ke),_t=!Et&&!Mt&&L.isPlainObject(ke);if(_t)bt.push({type:"object",data:ct(L.extendFlat({},ke))});else if(Et||["string","number"].indexOf(typeof ke)!==-1)for(qe=0;qe<je._frames.length;qe++)dt=je._frames[qe],dt&&(Et||String(dt.group)===String(ke))&&bt.push({type:"byname",name:String(dt.name),data:ct({name:dt.name})});else if(Mt)for(qe=0;qe<ke.length;qe++){var It=ke[qe];["number","string"].indexOf(typeof It)!==-1?(It=String(It),bt.push({type:"byname",name:It,data:ct({name:It})})):L.isPlainObject(It)&&bt.push({type:"object",data:ct(L.extendFlat({},It))})}for(qe=0;qe<bt.length;qe++)if(dt=bt[qe],dt.type==="byname"&&!je._frameHash[dt.data.name]){L.warn('animate failure: frame not found: "'+dt.data.name+'"'),Yt();return}["next","immediate"].indexOf(Ve.mode)!==-1&&gr(),Ve.direction==="reverse"&&bt.reverse();var Gt=be._fullLayout._currentFrame;if(Gt&&Ve.fromcurrent){var nr=-1;for(qe=0;qe<bt.length;qe++)if(dt=bt[qe],dt.type==="byname"&&dt.name===Gt){nr=qe;break}if(nr>0&&nr<bt.length-1){var ar=[];for(qe=0;qe<bt.length;qe++)dt=bt[qe],(bt[qe].type!=="byname"||qe>nr)&&ar.push(dt);bt=ar}}bt.length>0?ht(bt):(be.emit("plotly_animated"),Ct())})}function Oe(be,ke,Ve){if(be=L.getGraphDiv(be),ke==null)return Promise.resolve();if(!L.isPlotDiv(be))throw new Error("This element is not a Plotly plot: "+be+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var je,at,ut,Nt,Vt=be._transitionData._frames,gt=be._transitionData._frameHash;if(!Array.isArray(ke))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+ke);var Ct=Vt.length+ke.length*2,Yt=[],gr={};for(je=ke.length-1;je>=0;je--)if(L.isPlainObject(ke[je])){var ht=ke[je].name,Ht=(gt[ht]||gr[ht]||{}).name,Wt=ke[je].name,cr=gt[Ht]||gr[Ht];Ht&&Wt&&typeof Wt=="number"&&cr&&S<w&&(S++,L.warn('addFrames: overwriting frame "'+(gt[Ht]||gr[Ht]).name+'" with a frame whose name of type "number" also equates to "'+Ht+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),S===w&&L.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.")),gr[ht]={name:ht},Yt.push({frame:s.supplyFrameDefaults(ke[je]),index:Ve&&Ve[je]!==void 0&&Ve[je]!==null?Ve[je]:Ct+je})}Yt.sort(function(_t,It){return _t.index>It.index?-1:_t.index<It.index?1:0});var er=[],ct=[],qe=Vt.length;for(je=Yt.length-1;je>=0;je--){if(at=Yt[je].frame,typeof at.name=="number"&&L.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!at.name)for(;gt[at.name="frame "+be._transitionData._counter++];);if(gt[at.name]){for(ut=0;ut<Vt.length&&(Vt[ut]||{}).name!==at.name;ut++);er.push({type:"replace",index:ut,value:at}),ct.unshift({type:"replace",index:ut,value:Vt[ut]})}else Nt=Math.max(0,Math.min(Yt[je].index,qe)),er.push({type:"insert",index:Nt,value:at}),ct.unshift({type:"delete",index:Nt}),qe++}var dt=s.modifyFrames,bt=s.modifyFrames,Et=[be,ct],Mt=[be,er];return g&&g.add(be,dt,Et,bt,Mt),s.modifyFrames(be,er)}function Ce(be,ke){if(be=L.getGraphDiv(be),!L.isPlotDiv(be))throw new Error("This element is not a Plotly plot: "+be);var Ve,je,at=be._transitionData._frames,ut=[],Nt=[];if(!ke)for(ke=[],Ve=0;Ve<at.length;Ve++)ke.push(Ve);for(ke=ke.slice(),ke.sort(),Ve=ke.length-1;Ve>=0;Ve--)je=ke[Ve],ut.push({type:"delete",index:je}),Nt.unshift({type:"insert",index:je,value:at[je]});var Vt=s.modifyFrames,gt=s.modifyFrames,Ct=[be,Nt],Yt=[be,ut];return g&&g.add(be,Vt,Ct,gt,Yt),s.modifyFrames(be,ut)}function ge(be){be=L.getGraphDiv(be);var ke=be._fullLayout||{},Ve=be._fullData||[];return s.cleanPlot([],{},Ve,ke),s.purge(be),d.purge(be),ke._container&&ke._container.remove(),delete be._context,be}function pe(be){var ke=be._fullLayout,Ve=be.getBoundingClientRect();if(!L.equalDomRects(Ve,ke._lastBBox)){var je=ke._invTransform=L.inverseTransformMatrix(L.getFullTransformMatrix(be));ke._invScaleX=Math.sqrt(je[0][0]*je[0][0]+je[0][1]*je[0][1]+je[0][2]*je[0][2]),ke._invScaleY=Math.sqrt(je[1][0]*je[1][0]+je[1][1]*je[1][1]+je[1][2]*je[1][2]),ke._lastBBox=Ve}}function Te(be){var ke=A.select(be),Ve=be._fullLayout;if(Ve._calcInverseTransform=pe,Ve._calcInverseTransform(be),Ve._container=ke.selectAll(".plot-container").data([0]),Ve._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),Ve._paperdiv=Ve._container.selectAll(".svg-container").data([0]),Ve._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ve._glcontainer=Ve._paperdiv.selectAll(".gl-container").data([{}]),Ve._glcontainer.enter().append("div").classed("gl-container",!0),Ve._paperdiv.selectAll(".main-svg").remove(),Ve._paperdiv.select(".modebar-container").remove(),Ve._paper=Ve._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ve._toppaper=Ve._paperdiv.append("svg").classed("main-svg",!0),Ve._modebardiv=Ve._paperdiv.append("div"),delete Ve._modeBar,Ve._hoverpaper=Ve._paperdiv.append("svg").classed("main-svg",!0),!Ve._uid){var je={};A.selectAll("defs").each(function(){this.id&&(je[this.id.split("-")[1]]=1)}),Ve._uid=L.randstr(je)}Ve._paperdiv.selectAll(".main-svg").attr(T.svgAttrs),Ve._defs=Ve._paper.append("defs").attr("id","defs-"+Ve._uid),Ve._clips=Ve._defs.append("g").classed("clips",!0),Ve._topdefs=Ve._toppaper.append("defs").attr("id","topdefs-"+Ve._uid),Ve._topclips=Ve._topdefs.append("g").classed("clips",!0),Ve._bgLayer=Ve._paper.append("g").classed("bglayer",!0),Ve._draggers=Ve._paper.append("g").classed("draglayer",!0);var at=Ve._paper.append("g").classed("layer-below",!0);Ve._imageLowerLayer=at.append("g").classed("imagelayer",!0),Ve._shapeLowerLayer=at.append("g").classed("shapelayer",!0),Ve._cartesianlayer=Ve._paper.append("g").classed("cartesianlayer",!0),Ve._polarlayer=Ve._paper.append("g").classed("polarlayer",!0),Ve._smithlayer=Ve._paper.append("g").classed("smithlayer",!0),Ve._ternarylayer=Ve._paper.append("g").classed("ternarylayer",!0),Ve._geolayer=Ve._paper.append("g").classed("geolayer",!0),Ve._funnelarealayer=Ve._paper.append("g").classed("funnelarealayer",!0),Ve._pielayer=Ve._paper.append("g").classed("pielayer",!0),Ve._iciclelayer=Ve._paper.append("g").classed("iciclelayer",!0),Ve._treemaplayer=Ve._paper.append("g").classed("treemaplayer",!0),Ve._sunburstlayer=Ve._paper.append("g").classed("sunburstlayer",!0),Ve._indicatorlayer=Ve._toppaper.append("g").classed("indicatorlayer",!0),Ve._glimages=Ve._paper.append("g").classed("glimages",!0);var ut=Ve._toppaper.append("g").classed("layer-above",!0);Ve._imageUpperLayer=ut.append("g").classed("imagelayer",!0),Ve._shapeUpperLayer=ut.append("g").classed("shapelayer",!0),Ve._selectionLayer=Ve._toppaper.append("g").classed("selectionlayer",!0),Ve._infolayer=Ve._toppaper.append("g").classed("infolayer",!0),Ve._menulayer=Ve._toppaper.append("g").classed("menulayer",!0),Ve._zoomlayer=Ve._toppaper.append("g").classed("zoomlayer",!0),Ve._hoverlayer=Ve._hoverpaper.append("g").classed("hoverlayer",!0),Ve._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),be.emit("plotly_framework")}X.animate=He,X.addFrames=Oe,X.deleteFrames=Ce,X.addTraces=re,X.deleteTraces=H,X.extendTraces=Z,X.moveTraces=J,X.prependTraces=G,X.newPlot=z,X._doPlot=i,X.purge=ge,X.react=vt,X.redraw=_,X.relayout=we,X.restyle=ae,X.setPlotConfig=x,X.update=ze,X._guiRelayout=Ie(we),X._guiRestyle=Ie(ae),X._guiUpdate=Ie(ze),X._storeDirectGUIEdit=ne},20556:function(te){var X={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}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},e={};function A(P,o){for(var L in P){var M=P[L];M.valType?o[L]=M.dflt:(o[L]||(o[L]={}),A(M,o[L]))}}A(X,e),te.exports={configAttributes:X,dfltConfig:e}},73060:function(te,X,e){var A=e(24040),P=e(3400),o=e(45464),L=e(64859),M=e(16672),d=e(85656),g=e(20556).configAttributes,r=e(67824),t=P.extendDeepAll,s=P.isPlainObject,a=P.isArrayOrTypedArray,c=P.nestedProperty,u=P.valObjectMeta,l="_isSubplotObj",y="_isLinkedToArray",h="_arrayAttrRegexps",T="_deprecated",f=[l,y,h,T];X.IS_SUBPLOT_OBJ=l,X.IS_LINKED_TO_ARRAY=y,X.DEPRECATED=T,X.UNDERSCORE_ATTRS=f,X.get=function(){var B={};A.allTypes.forEach(function(z){B[z]=b(z)});var _={};return Object.keys(A.transformsRegistry).forEach(function(z){_[z]=p(z)}),{defs:{valObjects:u,metaKeys:f.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:B,layout:E(),transforms:_,frames:S(),animation:w(d),config:w(g)}},X.crawl=function(B,_,z,O){var F=z||0;O=O||"",Object.keys(B).forEach(function(N){var V=B[N];if(f.indexOf(N)===-1){var j=(O?O+".":"")+N;_(V,N,B,F,j),!X.isValObject(V)&&s(V)&&N!=="impliedEdits"&&X.crawl(V,_,F+1,j)}})},X.isValObject=function(B){return B&&B.valType!==void 0},X.findArrayAttributes=function(B){var _=[],z=[],O=[],F,N;function V(G,re,H,J){z=z.slice(0,J).concat([re]),O=O.slice(0,J).concat([G&&G._isLinkedToArray]);var ae=G&&(G.valType==="data_array"||G.arrayOk===!0)&&!(z[J-1]==="colorbar"&&(re==="ticktext"||re==="tickvals"));ae&&j(F,0,"")}function j(G,re,H){var J=G[z[re]],ae=H+z[re];if(re===z.length-1)a(J)&&_.push(N+ae);else if(O[re]){if(Array.isArray(J))for(var K=0;K<J.length;K++)s(J[K])&&j(J[K],re+1,ae+"["+K+"].")}else s(J)&&j(J,re+1,ae+".")}F=B,N="",X.crawl(o,V),B._module&&B._module.attributes&&X.crawl(B._module.attributes,V);var $=B.transforms;if($)for(var q=0;q<$.length;q++){var oe=$[q],Z=oe._module;Z&&(N="transforms["+q+"].",F=oe,X.crawl(Z.attributes,V))}return _},X.getTraceValObject=function(B,_){var z=_[0],O=1,F,N;if(z==="transforms"){if(_.length===1)return o.transforms;var V=B.transforms;if(!Array.isArray(V)||!V.length)return!1;var j=_[1];if(!m(j)||j>=V.length)return!1;F=(A.transformsRegistry[V[j].type]||{}).attributes,N=F&&F[_[2]],O=3}else{var $=B._module;if($||($=(A.modules[B.type||o.type.dflt]||{})._module),!$)return!1;if(F=$.attributes,N=F&&F[z],!N){var q=$.basePlotModule;q&&q.attributes&&(N=q.attributes[z])}N||(N=o[z])}return v(N,_,O)},X.getLayoutValObject=function(B,_){var z=n(B,_[0]);return v(z,_,1)};function n(B,_){var z,O,F,N,V=B._basePlotModules;if(V){var j;for(z=0;z<V.length;z++){if(F=V[z],F.attrRegex&&F.attrRegex.test(_)){if(F.layoutAttrOverrides)return F.layoutAttrOverrides;!j&&F.layoutAttributes&&(j=F.layoutAttributes)}var $=F.baseLayoutAttrOverrides;if($&&_ in $)return $[_]}if(j)return j}var q=B._modules;if(q){for(z=0;z<q.length;z++)if(N=q[z].layoutAttributes,N&&_ in N)return N[_]}for(O in A.componentsRegistry){if(F=A.componentsRegistry[O],F.name==="colorscale"&&_.indexOf("coloraxis")===0)return F.layoutAttributes[_];if(!F.schema&&_===F.name)return F.layoutAttributes}return _ in L?L[_]:!1}function v(B,_,z){if(!B)return!1;if(B._isLinkedToArray){if(m(_[z]))z++;else if(z<_.length)return!1}for(;z<_.length;z++){var O=B[_[z]];if(s(O))B=O;else break;if(z===_.length-1)break;if(B._isLinkedToArray){if(z++,!m(_[z]))return!1}else if(B.valType==="info_array"){z++;var F=_[z];if(!m(F))return!1;var N=B.items;if(Array.isArray(N)){if(F>=N.length)return!1;if(B.dimensions===2){if(z++,_.length===z)return B;var V=_[z];if(!m(V))return!1;B=N[F][V]}else B=N[F]}else B=N}}return B}function m(B){return B===Math.round(B)&&B>=0}function b(B){var _,z;_=A.modules[B]._module,z=_.basePlotModule;var O={};O.type=null;var F=t({},o),N=t({},_.attributes);X.crawl(N,function($,q,oe,Z,G){c(F,G).set(void 0),$===void 0&&c(N,G).set(void 0)}),t(O,F),A.traceIs(B,"noOpacity")&&delete O.opacity,A.traceIs(B,"showLegend")||(delete O.showlegend,delete O.legendgroup),A.traceIs(B,"noHover")&&(delete O.hoverinfo,delete O.hoverlabel),_.selectPoints||delete O.selectedpoints,t(O,N),z.attributes&&t(O,z.attributes),O.type=B;var V={meta:_.meta||{},categories:_.categories||{},animatable:!!_.animatable,type:B,attributes:w(O)};if(_.layoutAttributes){var j={};t(j,_.layoutAttributes),V.layoutAttributes=w(j)}return _.animatable||X.crawl(V,function($){X.isValObject($)&&"anim"in $&&delete $.anim}),V}function E(){var B={},_,z;t(B,L);for(_ in A.subplotsRegistry)if(z=A.subplotsRegistry[_],!!z.layoutAttributes)if(Array.isArray(z.attr))for(var O=0;O<z.attr.length;O++)k(B,z,z.attr[O]);else{var F=z.attr==="subplot"?z.name:z.attr;k(B,z,F)}for(_ in A.componentsRegistry){z=A.componentsRegistry[_];var N=z.schema;if(N&&(N.subplots||N.layout)){var V=N.subplots;if(V&&V.xaxis&&!V.yaxis)for(var j in V.xaxis)delete B.yaxis[j];delete B.xaxis.shift,delete B.xaxis.autoshift}else z.name==="colorscale"?t(B,z.layoutAttributes):z.layoutAttributes&&I(B,z.layoutAttributes,z.name)}return{layoutAttributes:w(B)}}function p(B){var _=A.transformsRegistry[B],z=t({},_.attributes);return Object.keys(A.componentsRegistry).forEach(function(O){var F=A.componentsRegistry[O];F.schema&&F.schema.transforms&&F.schema.transforms[B]&&Object.keys(F.schema.transforms[B]).forEach(function(N){I(z,F.schema.transforms[B][N],N)})}),{attributes:w(z)}}function S(){var B={frames:t({},M)};return w(B),B.frames}function w(B){return i(B),C(B),x(B),B}function i(B){function _(O){return{valType:"string",editType:"none"}}function z(O,F,N){X.isValObject(O)?(O.arrayOk===!0||O.valType==="data_array")&&(N[F+"src"]=_()):s(O)&&(O.role="object")}X.crawl(B,z)}function C(B){function _(z,O,F){if(z){var N=z[y];N&&(delete z[y],F[O]={items:{}},F[O].items[N]=z,F[O].role="object")}}X.crawl(B,_)}function x(B){function _(z){for(var O in z)if(s(z[O]))_(z[O]);else if(Array.isArray(z[O]))for(var F=0;F<z[O].length;F++)_(z[O][F]);else z[O]instanceof RegExp&&(z[O]=z[O].toString())}_(B)}function k(B,_,z){var O=c(B,z),F=t({},_.layoutAttributes);F[l]=!0,O.set(F)}function I(B,_,z){var O=c(B,z);O.set(t(O.get()||{},_))}},31780:function(te,X,e){var A=e(3400),P=e(45464),o="templateitemname",L={name:{valType:"string",editType:"none"}};L[o]={valType:"string",editType:"calc"},X.templatedArray=function(g,r){return r._isLinkedToArray=g,r.name=L.name,r[o]=L[o],r},X.traceTemplater=function(g){var r={},t,s;for(t in g)s=g[t],Array.isArray(s)&&s.length&&(r[t]=0);function a(c){t=A.coerce(c,{},P,"type");var u={type:t,_template:null};if(t in r){s=g[t];var l=r[t]%s.length;r[t]++,u._template=s[l]}return u}return{newTrace:a}},X.newContainer=function(g,r,t){var s=g._template,a=s&&(s[r]||t&&s[t]);A.isPlainObject(a)||(a=null);var c=g[r]={_template:a};return c},X.arrayTemplater=function(g,r,t){var s=g._template,a=s&&s[d(r)],c=s&&s[r];(!Array.isArray(c)||!c.length)&&(c=[]);var u={};function l(h){var T={name:h.name,_input:h},f=T[o]=h[o];if(!M(f))return T._template=a,T;for(var n=0;n<c.length;n++){var v=c[n];if(v.name===f)return u[f]=1,T._template=v,T}return T[t]=h[t]||!1,T._template=!1,T}function y(){for(var h=[],T=0;T<c.length;T++){var f=c[T],n=f.name;if(M(n)&&!u[n]){var v={_template:f,name:n,_input:{_templateitemname:n}};v[o]=f[o],h.push(v),u[n]=1}}return h}return{newItem:l,defaultItems:y}};function M(g){return g&&typeof g=="string"}function d(g){var r=g.length-1;return g.charAt(r)!=="s"&&A.warn("bad argument to arrayDefaultKey: "+g),g.substr(0,g.length-1)+"defaults"}X.arrayDefaultKey=d,X.arrayEditor=function(g,r,t){var s=(A.nestedProperty(g,r).get()||[]).length,a=t._index,c=a>=s&&(t._input||{})._templateitemname;c&&(a=s);var u=r+"["+a+"]",l;function y(){l={},c&&(l[u]={},l[u][o]=c)}y();function h(v,m){l[v]=m}function T(v,m){c?A.nestedProperty(l[u],v).set(m):l[u+"."+v]=m}function f(){var v=l;return y(),v}function n(v,m){v&&T(v,m);var b=f();for(var E in b)A.nestedProperty(g,E).set(b[E])}return{modifyBase:h,modifyItem:T,getUpdateObj:f,applyUpdate:n}}},39172:function(te,X,e){var A=e(33428),P=e(24040),o=e(7316),L=e(3400),M=e(72736),d=e(73696),g=e(76308),r=e(43616),t=e(81668),s=e(45460),a=e(54460),c=e(84284),u=e(71888),l=u.enforce,y=u.clean,h=e(19280).doAutoRange,T="start",f="middle",n="end";X.layoutStyles=function(z){return L.syncOrAsync([o.doAutoMargin,m],z)};function v(z,O,F){for(var N=0;N<F.length;N++){var V=F[N][0],j=F[N][1];if(!(V[0]>=z[1]||V[1]<=z[0])&&j[0]<O[1]&&j[1]>O[0])return!0}return!1}function m(z){var O=z._fullLayout,F=O._size,N=F.p,V=a.list(z,"",!0),j,$,q,oe,Z,G;if(O._paperdiv.style({width:z._context.responsive&&O.autosize&&!z._context._hasZeroWidth&&!z.layout.width?"100%":O.width+"px",height:z._context.responsive&&O.autosize&&!z._context._hasZeroHeight&&!z.layout.height?"100%":O.height+"px"}).selectAll(".main-svg").call(r.setSize,O.width,O.height),z._context.setBackground(z,O.paper_bgcolor),X.drawMainTitle(z),s.manage(z),!O._has("cartesian"))return o.previousPromises(z);function re(ge,pe,Te){var be=ge._lw/2;if(ge._id.charAt(0)==="x"){if(pe){if(Te==="top")return pe._offset-N-be}else return F.t+F.h*(1-(ge.position||0))+be%1;return pe._offset+pe._length+N+be}if(pe){if(Te==="right")return pe._offset+pe._length+N+be}else return F.l+F.w*(ge.position||0)+be%1;return pe._offset-N-be}for(j=0;j<V.length;j++){oe=V[j];var H=oe._anchorAxis;oe._linepositions={},oe._lw=r.crispRound(z,oe.linewidth,1),oe._mainLinePosition=re(oe,H,oe.side),oe._mainMirrorPosition=oe.mirror&&H?re(oe,H,c.OPPOSITE_SIDE[oe.side]):null}var J=[],ae=[],K=[],Y=g.opacity(O.paper_bgcolor)===1&&g.opacity(O.plot_bgcolor)===1&&O.paper_bgcolor===O.plot_bgcolor;for($ in O._plots)if(q=O._plots[$],q.mainplot)q.bg&&q.bg.remove(),q.bg=void 0;else{var ie=q.xaxis.domain,ne=q.yaxis.domain,le=q.plotgroup;if(v(ie,ne,K)){var de=le.node(),we=q.bg=L.ensureSingle(le,"rect","bg");de.insertBefore(we.node(),de.childNodes[0]),ae.push($)}else le.select("rect.bg").remove(),K.push([ie,ne]),Y||(J.push($),ae.push($))}var me=O._bgLayer.selectAll(".bg").data(J);for(me.enter().append("rect").classed("bg",!0),me.exit().remove(),me.each(function(ge){O._plots[ge].bg=A.select(this)}),j=0;j<ae.length;j++)q=O._plots[ae[j]],Z=q.xaxis,G=q.yaxis,q.bg&&Z._offset!==void 0&&G._offset!==void 0&&q.bg.call(r.setRect,Z._offset-N,G._offset-N,Z._length+2*N,G._length+2*N).call(g.fill,O.plot_bgcolor).style("stroke-width",0);if(!O._hasOnlyLargeSploms)for($ in O._plots){q=O._plots[$],Z=q.xaxis,G=q.yaxis;var Le=q.clipId="clip"+O._uid+$+"plot",ve=L.ensureSingleById(O._clips,"clipPath",Le,function(ge){ge.classed("plotclip",!0).append("rect")});q.clipRect=ve.select("rect").attr({width:Z._length,height:G._length}),r.setTranslate(q.plot,Z._offset,G._offset);var Ae,ye;q._hasClipOnAxisFalse?(Ae=null,ye=Le):(Ae=Le,ye=null),r.setClipUrl(q.plot,Ae,z),q.layerClipId=ye}var Se,_e,ze,Ie,Ne,et,st,Ze,Ke,nt,it,lt,vt;function xt(ge){return"M"+Se+","+ge+"H"+_e}function Je(ge){return"M"+Z._offset+","+ge+"h"+Z._length}function Pe(ge){return"M"+ge+","+Ze+"V"+st}function Ue(ge){return G._shift!==void 0&&(ge+=G._shift),"M"+ge+","+G._offset+"v"+G._length}function He(ge,pe,Te){if(!ge.showline||$!==ge._mainSubplot)return"";if(!ge._anchorAxis)return Te(ge._mainLinePosition);var be=pe(ge._mainLinePosition);return ge.mirror&&(be+=pe(ge._mainMirrorPosition)),be}for($ in O._plots){q=O._plots[$],Z=q.xaxis,G=q.yaxis;var Oe="M0,0";b(Z,$)&&(Ne=p(Z,"left",G,V),Se=Z._offset-(Ne?N+Ne:0),et=p(Z,"right",G,V),_e=Z._offset+Z._length+(et?N+et:0),ze=re(Z,G,"bottom"),Ie=re(Z,G,"top"),vt=!Z._anchorAxis||$!==Z._mainSubplot,vt&&(Z.mirror==="allticks"||Z.mirror==="all")&&(Z._linepositions[$]=[ze,Ie]),Oe=He(Z,xt,Je),vt&&Z.showline&&(Z.mirror==="all"||Z.mirror==="allticks")&&(Oe+=xt(ze)+xt(Ie)),q.xlines.style("stroke-width",Z._lw+"px").call(g.stroke,Z.showline?Z.linecolor:"rgba(0,0,0,0)")),q.xlines.attr("d",Oe);var Ce="M0,0";b(G,$)&&(it=p(G,"bottom",Z,V),st=G._offset+G._length+(it?N:0),lt=p(G,"top",Z,V),Ze=G._offset-(lt?N:0),Ke=re(G,Z,"left"),nt=re(G,Z,"right"),vt=!G._anchorAxis||$!==G._mainSubplot,vt&&(G.mirror==="allticks"||G.mirror==="all")&&(G._linepositions[$]=[Ke,nt]),Ce=He(G,Pe,Ue),vt&&G.showline&&(G.mirror==="all"||G.mirror==="allticks")&&(Ce+=Pe(Ke)+Pe(nt)),q.ylines.style("stroke-width",G._lw+"px").call(g.stroke,G.showline?G.linecolor:"rgba(0,0,0,0)")),q.ylines.attr("d",Ce)}return a.makeClipPaths(z),o.previousPromises(z)}function b(z,O){return(z.ticks||z.showline)&&(O===z._mainSubplot||z.mirror==="all"||z.mirror==="allticks")}function E(z,O,F){if(!F.showline||!F._lw)return!1;if(F.mirror==="all"||F.mirror==="allticks")return!0;var N=F._anchorAxis;if(!N)return!1;var V=c.FROM_BL[O];return F.side===O?N.domain[V]===z.domain[V]:F.mirror&&N.domain[1-V]===z.domain[1-V]}function p(z,O,F,N){if(E(z,O,F))return F._lw;for(var V=0;V<N.length;V++){var j=N[V];if(j._mainAxis===F._mainAxis&&E(z,O,j))return j._lw}return 0}X.drawMainTitle=function(z){var O=z._fullLayout.title,F=z._fullLayout,N=B(F),V=_(F),j=k(F,V),$=x(F,N);if(t.draw(z,"gtitle",{propContainer:F,propName:"title.text",placeholder:F._dfltTitle.plot,attributes:{x:$,y:j,"text-anchor":N,dy:V}}),O.text&&O.automargin){var q=A.selectAll(".gtitle"),oe=r.bBox(q.node()).height,Z=i(z,O,oe);if(Z>0){C(z,j,Z,oe),q.attr({x:$,y:j,"text-anchor":N,dy:I(O.yanchor)}).call(M.positionText,$,j);var G=(O.text.match(M.BR_TAG_ALL)||[]).length;if(G){var re=c.LINE_SPACING*G+c.MID_SHIFT;O.y===0&&(re=-re),q.selectAll(".line").each(function(){var H=+this.getAttribute("dy").slice(0,-2)-re+"em";this.setAttribute("dy",H)})}}}};function S(z,O,F,N,V){var j=O.yref==="paper"?z._fullLayout._size.h:z._fullLayout.height,$=L.isTopAnchor(O)?N:N-V,q=F==="b"?j-$:$;return L.isTopAnchor(O)&&F==="t"||L.isBottomAnchor(O)&&F==="b"?!1:q<V}function w(z,O,F,N,V){var j=0;return F==="middle"&&(j+=V/2),z==="t"?(F==="top"&&(j+=V),j+=N-O*N):(F==="bottom"&&(j+=V),j+=O*N),j}function i(z,O,F){var N=O.y,V=O.yanchor,j=N>.5?"t":"b",$=z._fullLayout.margin[j],q=0;return O.yref==="paper"?q=F+O.pad.t+O.pad.b:O.yref==="container"&&(q=w(j,N,V,z._fullLayout.height,F)+O.pad.t+O.pad.b),q>$?q:0}function C(z,O,F,N){var V="title.automargin",j=z._fullLayout.title,$=j.y>.5?"t":"b",q={x:j.x,y:j.y,t:0,b:0},oe={};j.yref==="paper"&&S(z,j,$,O,N)?q[$]=F:j.yref==="container"&&(oe[$]=F,z._fullLayout._reservedMargin[V]=oe),o.allowAutoMargin(z,V),o.autoMargin(z,V,q)}function x(z,O){var F=z.title,N=z._size,V=0;switch(O===T?V=F.pad.l:O===n&&(V=-F.pad.r),F.xref){case"paper":return N.l+N.w*F.x+V;case"container":default:return z.width*F.x+V}}function k(z,O){var F=z.title,N=z._size,V=0;if(O==="0em"||!O?V=-F.pad.b:O===c.CAP_SHIFT+"em"&&(V=F.pad.t),F.y==="auto")return N.t/2;switch(F.yref){case"paper":return N.t+N.h-N.h*F.y+V;case"container":default:return z.height-z.height*F.y+V}}function I(z){return z==="top"?c.CAP_SHIFT+.3+"em":z==="bottom"?"-0.3em":c.MID_SHIFT+"em"}function B(z){var O=z.title,F=f;return L.isRightAnchor(O)?F=n:L.isLeftAnchor(O)&&(F=T),F}function _(z){var O=z.title,F="0em";return L.isTopAnchor(O)?F=c.CAP_SHIFT+"em":L.isMiddleAnchor(O)&&(F=c.MID_SHIFT+"em"),F}X.doTraceStyle=function(z){var O=z.calcdata,F=[],N;for(N=0;N<O.length;N++){var V=O[N],j=V[0]||{},$=j.trace||{},q=$._module||{},oe=q.arraysToCalcdata;oe&&oe(V,$);var Z=q.editStyle;Z&&F.push({fn:Z,cd0:j})}if(F.length){for(N=0;N<F.length;N++){var G=F[N];G.fn(z,G.cd0)}d(z),X.redrawReglTraces(z)}return o.style(z),P.getComponentMethod("legend","draw")(z),o.previousPromises(z)},X.doColorBars=function(z){return P.getComponentMethod("colorbar","draw")(z),o.previousPromises(z)},X.layoutReplot=function(z){var O=z.layout;return z.layout=void 0,P.call("_doPlot",z,"",O)},X.doLegend=function(z){return P.getComponentMethod("legend","draw")(z),o.previousPromises(z)},X.doTicksRelayout=function(z){return a.draw(z,"redraw"),z._fullLayout._hasOnlyLargeSploms&&(P.subplotsRegistry.splom.updateGrid(z),d(z),X.redrawReglTraces(z)),X.drawMainTitle(z),o.previousPromises(z)},X.doModeBar=function(z){var O=z._fullLayout;s.manage(z);for(var F=0;F<O._basePlotModules.length;F++){var N=O._basePlotModules[F].updateFx;N&&N(z)}return o.previousPromises(z)},X.doCamera=function(z){for(var O=z._fullLayout,F=O._subplots.gl3d,N=0;N<F.length;N++){var V=O[F[N]],j=V._scene;j.setViewport(V)}},X.drawData=function(z){var O=z._fullLayout;d(z);for(var F=O._basePlotModules,N=0;N<F.length;N++)F[N].plot(z);return X.redrawReglTraces(z),o.style(z),P.getComponentMethod("selections","draw")(z),P.getComponentMethod("shapes","draw")(z),P.getComponentMethod("annotations","draw")(z),P.getComponentMethod("images","draw")(z),O._replotting=!1,o.previousPromises(z)},X.redrawReglTraces=function(z){var O=z._fullLayout;if(O._has("regl")){var F=z._fullData,N=[],V=[],j,$;for(O._hasOnlyLargeSploms&&O._splomGrid.draw(),j=0;j<F.length;j++){var q=F[j];q.visible===!0&&q._length!==0&&(q.type==="splom"?O._splomScenes[q.uid].draw():q.type==="scattergl"?L.pushUnique(N,q.xaxis+q.yaxis):q.type==="scatterpolargl"&&L.pushUnique(V,q.subplot))}for(j=0;j<N.length;j++)$=O._plots[N[j]],$._scene&&$._scene.draw();for(j=0;j<V.length;j++)$=O[V[j]]._subplot,$._scene&&$._scene.draw()}},X.doAutoRangeAndConstraints=function(z){for(var O=a.list(z,"",!0),F,N={},V=0;V<O.length;V++)if(F=O[V],!N[F._id]){N[F._id]=1,y(z,F),h(z,F);var j=F._matchGroup;if(j)for(var $ in j){var q=a.getFromId(z,$);h(z,q,F.range),N[$]=1}}l(z)},X.finalDraw=function(z){P.getComponentMethod("rangeslider","draw")(z),P.getComponentMethod("rangeselector","draw")(z)},X.drawMarginPushers=function(z){P.getComponentMethod("legend","draw")(z),P.getComponentMethod("rangeselector","draw")(z),P.getComponentMethod("sliders","draw")(z),P.getComponentMethod("updatemenus","draw")(z),P.getComponentMethod("colorbar","draw")(z)}},94828:function(te,X,e){var A=e(3400),P=A.isPlainObject,o=e(73060),L=e(7316),M=e(45464),d=e(31780),g=e(20556).dfltConfig;X.makeTemplate=function(h){h=A.isPlainObject(h)?h:A.getGraphDiv(h),h=A.extendDeep({_context:g},{data:h.data,layout:h.layout}),L.supplyDefaults(h);var T=h.data||[],f=h.layout||{};f._basePlotModules=h._fullLayout._basePlotModules,f._modules=h._fullLayout._modules;var n={data:{},layout:{}};T.forEach(function(x){var k={};s(x,k,c.bind(null,x));var I=A.coerce(x,{},M,"type"),B=n.data[I];B||(B=n.data[I]=[]),B.push(k)}),s(f,n.layout,a.bind(null,f)),delete n.layout.template;var v=f.template;if(P(v)){var m=v.layout,b,E,p,S,w,i;P(m)&&r(m,n.layout);var C=v.data;if(P(C)){for(E in n.data)if(p=C[E],Array.isArray(p)){for(w=n.data[E],i=w.length,S=p.length,b=0;b<i;b++)r(p[b%S],w[b]);for(b=i;b<S;b++)w.push(A.extendDeep({},p[b]))}for(E in C)E in n.data||(n.data[E]=A.extendDeep([],C[E]))}}return n};function r(h,T){h=A.extendDeep({},h);var f=Object.keys(h).sort(),n,v;function m(w,i,C){if(P(i)&&P(w))r(w,i);else if(Array.isArray(i)&&Array.isArray(w)){var x=d.arrayTemplater({_template:h},C);for(v=0;v<i.length;v++){var k=i[v],I=x.newItem(k)._template;I&&r(I,k)}var B=x.defaultItems();for(v=0;v<B.length;v++)i.push(B[v]._template);for(v=0;v<i.length;v++)delete i[v].templateitemname}}for(n=0;n<f.length;n++){var b=f[n],E=h[b];if(b in T?m(E,T[b],b):T[b]=E,t(b)===b)for(var p in T){var S=t(p);p!==S&&S===b&&!(p in h)&&m(E,T[p],b)}}}function t(h){return h.replace(/[0-9]+$/,"")}function s(h,T,f,n,v){var m=v&&f(v);for(var b in h){var E=h[b],p=u(h,b,n),S=u(h,b,v),w=f(S);if(!w){var i=t(b);i!==b&&(S=u(h,i,v),w=f(S))}if(!(m&&m===w)&&!(!w||w._noTemplating||w.valType==="data_array"||w.arrayOk&&Array.isArray(E)))if(!w.valType&&P(E))s(E,T,f,p,S);else if(w._isLinkedToArray&&Array.isArray(E))for(var C=!1,x=0,k={},I=0;I<E.length;I++){var B=E[I];if(P(B)){var _=B.name;if(_)k[_]||(s(B,T,f,u(E,x,p),u(E,x,S)),x++,k[_]=1);else if(!C){var z=d.arrayDefaultKey(b),O=u(h,z,n),F=u(E,x,p);s(B,T,f,F,u(E,x,S));var N=A.nestedProperty(T,F),V=A.nestedProperty(T,O);V.set(N.get()),N.set(null),C=!0}}}else{var j=A.nestedProperty(T,p);j.set(E)}}}function a(h,T){return o.getLayoutValObject(h,A.nestedProperty({},T).parts)}function c(h,T){return o.getTraceValObject(h,A.nestedProperty({},T).parts)}function u(h,T,f){var n;return f?Array.isArray(h)?n=f+"["+T+"]":n=f+"."+T:n=T,n}X.validateTemplate=function(h,T){var f=A.extendDeep({},{_context:g,data:h.data,layout:h.layout}),n=f.layout||{};P(T)||(T=n.template||{});var v=T.layout,m=T.data,b=[];f.layout=n,f.layout.template=T,L.supplyDefaults(f);var E=f._fullLayout,p=f._fullData,S={};function w(O,F){for(var N in O)if(N.charAt(0)!=="_"&&P(O[N])){var V=t(N),j=[],$;for($=0;$<F.length;$++)j.push(u(O,N,F[$])),V!==N&&j.push(u(O,V,F[$]));for($=0;$<j.length;$++)S[j[$]]=1;w(O[N],j)}}function i(O,F){for(var N in O)if(N.indexOf("defaults")===-1&&P(O[N])){var V=u(O,N,F);S[V]?i(O[N],V):b.push({code:"unused",path:V})}}if(P(v)?(w(E,["layout"]),i(v,"layout")):b.push({code:"layout"}),!P(m))b.push({code:"data"});else{for(var C={},x,k=0;k<p.length;k++){var I=p[k];x=I.type,C[x]=(C[x]||0)+1,I._fullInput._template||b.push({code:"missing",index:I._fullInput.index,traceType:x})}for(x in m){var B=m[x].length,_=C[x]||0;B>_?b.push({code:"unused",traceType:x,templateCount:B,dataCount:_}):_>B&&b.push({code:"reused",traceType:x,templateCount:B,dataCount:_})}}function z(O,F){for(var N in O)if(N.charAt(0)!=="_"){var V=O[N],j=u(O,N,F);P(V)?(Array.isArray(O)&&V._template===!1&&V.templateitemname&&b.push({code:"missing",path:j,templateitemname:V.templateitemname}),z(V,j)):Array.isArray(V)&&l(V)&&z(V,j)}}if(z({data:p,layout:E},""),b.length)return b.map(y)};function l(h){for(var T=0;T<h.length;T++)if(P(h[T]))return!0}function y(h){var T;switch(h.code){case"data":T="The template has no key data.";break;case"layout":T="The template has no key layout.";break;case"missing":h.path?T="There are no templates for item "+h.path+" with name "+h.templateitemname:T="There are no templates for trace "+h.index+", of type "+h.traceType+".";break;case"unused":h.path?T="The template item at "+h.path+" was not used in constructing the plot.":h.dataCount?T="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.":T="The template has "+h.templateCount+" traces of type "+h.traceType+" but there are none in the data.";break;case"reused":T="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.";break}return h.msg=T,h}},67024:function(te,X,e){var A=e(38248),P=e(36424),o=e(7316),L=e(3400),M=e(81792),d=e(37164),g=e(63268),r=e(25788).version,t={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},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function s(a,c){c=c||{};var u,l,y,h;L.isPlainObject(a)?(u=a.data||[],l=a.layout||{},y=a.config||{},h={}):(a=L.getGraphDiv(a),u=L.extendDeep([],a.data),l=L.extendDeep({},a.layout),y=a._context,h=a._fullLayout||{});function T(_){return!(_ in c)||L.validate(c[_],t[_])}if(!T("width")&&c.width!==null||!T("height")&&c.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+L.join2(t.format.values,", "," or ")+".");var f={};function n(_,z){return L.coerce(c,f,t,_,z)}var v=n("format"),m=n("width"),b=n("height"),E=n("scale"),p=n("setBackground"),S=n("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var i=L.extendFlat({},l);m?i.width=m:c.width===null&&A(h.width)&&(i.width=h.width),b?i.height=b:c.height===null&&A(h.height)&&(i.height=h.height);var C=L.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:p}),x=M.getRedrawFunc(w);function k(){return new Promise(function(_){setTimeout(_,M.getDelay(w._fullLayout))})}function I(){return new Promise(function(_,z){var O=d(w,v,E),F=w._fullLayout.width,N=w._fullLayout.height;function V(){P.purge(w),document.body.removeChild(w)}if(v==="full-json"){var j=o.graphJson(w,!1,"keepdata","object",!0,!0);return j.version=r,j=JSON.stringify(j),V(),_(S?j:M.encodeJSON(j))}if(V(),v==="svg")return _(S?O:M.encodeSVG(O));var $=document.createElement("canvas");$.id=L.randstr(),g({format:v,width:F,height:N,scale:E,canvas:$,svg:O,promise:!0}).then(_).catch(z)})}function B(_){return S?_.replace(M.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,z){P.newPlot(w,u,i,C).then(x).then(k).then(I).then(function(O){_(B(O))}).catch(function(O){z(O)})})}te.exports=s},21480:function(te,X,e){var A=e(3400),P=e(7316),o=e(73060),L=e(20556).dfltConfig,M=A.isPlainObject,d=Array.isArray,g=A.isArrayOrTypedArray;te.exports=function(n,v){n===void 0&&(n=[]),v===void 0&&(v={});var m=o.get(),b=[],E={_context:A.extendFlat({},L)},p,S;d(n)?(E.data=A.extendDeep([],n),p=n):(E.data=[],p=[],b.push(c("array","data"))),M(v)?(E.layout=A.extendDeep({},v),S=v):(E.layout={},S={},arguments.length>1&&b.push(c("object","layout"))),P.supplyDefaults(E);for(var w=E._fullData,i=p.length,C=0;C<i;C++){var x=p[C],k=["data",C];if(!M(x)){b.push(c("object",k));continue}var I=w[C],B=I.type,_=m.traces[B].attributes;_.type={valType:"enumerated",values:[B]},I.visible===!1&&x.visible!==!1&&b.push(c("invisible",k)),r(x,I,_,b,k);var z=x.transforms,O=I.transforms;if(z){d(z)||b.push(c("array",k,["transforms"])),k.push("transforms");for(var F=0;F<z.length;F++){var N=["transforms",F],V=z[F].type;if(!M(z[F])){b.push(c("object",k,N));continue}var j=m.transforms[V]?m.transforms[V].attributes:{};j.type={valType:"enumerated",values:Object.keys(m.transforms)},r(z[F],O[F],j,b,k,N)}}}var $=E._fullLayout,q=t(m,w);return r(S,$,q,b,"layout"),b.length===0?void 0:b};function r(f,n,v,m,b,E){E=E||[];for(var p=Object.keys(f),S=0;S<p.length;S++){var w=p[S];if(w!=="transforms"){var i=E.slice();i.push(w);var C=f[w],x=n[w],k=l(v,w),I=(k||{}).valType,B=I==="info_array",_=I==="colorscale",z=(k||{}).items;if(!u(v,w))m.push(c("schema",b,i));else if(M(C)&&M(x)&&I!=="any")r(C,x,k,m,b,i);else if(B&&d(C)){C.length>x.length&&m.push(c("unused",b,i.concat(x.length)));var O=x.length,F=Array.isArray(z);F&&(O=Math.min(O,z.length));var N,V,j,$,q;if(k.dimensions===2)for(V=0;V<O;V++)if(d(C[V])){C[V].length>x[V].length&&m.push(c("unused",b,i.concat(V,x[V].length)));var oe=x[V].length;for(N=0;N<(F?Math.min(oe,z[V].length):oe);N++)j=F?z[V][N]:z,$=C[V][N],q=x[V][N],A.validate($,j)?q!==$&&q!==+$&&m.push(c("dynamic",b,i.concat(V,N),$,q)):m.push(c("value",b,i.concat(V,N),$))}else m.push(c("array",b,i.concat(V),C[V]));else for(V=0;V<O;V++)j=F?z[V]:z,$=C[V],q=x[V],A.validate($,j)?q!==$&&q!==+$&&m.push(c("dynamic",b,i.concat(V),$,q)):m.push(c("value",b,i.concat(V),$))}else if(k.items&&!B&&d(C)){var Z=z[Object.keys(z)[0]],G=[],re,H;for(re=0;re<x.length;re++){var J=x[re]._index||re;if(H=i.slice(),H.push(J),M(C[J])&&M(x[re])){G.push(J);var ae=C[J],K=x[re];M(ae)&&ae.visible!==!1&&K.visible===!1?m.push(c("invisible",b,H)):r(ae,K,Z,m,b,H)}}for(re=0;re<C.length;re++)H=i.slice(),H.push(re),M(C[re])?G.indexOf(re)===-1&&m.push(c("unused",b,H)):m.push(c("object",b,H,C[re]))}else!M(C)&&M(x)?m.push(c("object",b,i,C)):!g(C)&&g(x)&&!B&&!_?m.push(c("array",b,i,C)):w in n?A.validate(C,k)?k.valType==="enumerated"&&(k.coerceNumber&&C!==+x||C!==x)&&m.push(c("dynamic",b,i,C,x)):m.push(c("value",b,i,C)):m.push(c("unused",b,i,C))}}return m}function t(f,n){for(var v=f.layout.layoutAttributes,m=0;m<n.length;m++){var b=n[m],E=f.traces[b.type],p=E.layoutAttributes;p&&(b.subplot?A.extendFlat(v[E.attributes.subplot.dflt],p):A.extendFlat(v,p))}return v}var s={object:function(f,n){var v;return f==="layout"&&n===""?v="The layout argument":f[0]==="data"&&n===""?v="Trace "+f[1]+" in the data argument":v=a(f)+"key "+n,v+" must be linked to an object container"},array:function(f,n){var v;return f==="data"?v="The data argument":v=a(f)+"key "+n,v+" must be linked to an array container"},schema:function(f,n){return a(f)+"key "+n+" is not part of the schema"},unused:function(f,n,v){var m=M(v)?"container":"key";return a(f)+m+" "+n+" did not get coerced"},dynamic:function(f,n,v,m){return[a(f)+"key",n,"(set to '"+v+"')","got reset to","'"+m+"'","during defaults."].join(" ")},invisible:function(f,n){return(n?a(f)+"item "+n:"Trace "+f[1])+" got defaulted to be not visible"},value:function(f,n,v){return[a(f)+"key "+n,"is set to an invalid value ("+v+")"].join(" ")}};function a(f){return d(f)?"In data trace "+f[1]+", ":"In "+f+", "}function c(f,n,v,m,b){v=v||"";var E,p;d(n)?(E=n[0],p=n[1]):(E=n,p=null);var S=T(v),w=s[f](n,S,m,b);return A.log(w),{code:f,container:E,trace:p,path:v,astr:S,msg:w}}function u(f,n){var v=h(n),m=v.keyMinusId,b=v.id;return m in f&&f[m]._isSubplotObj&&b?!0:n in f}function l(f,n){if(n in f)return f[n];var v=h(n);return f[v.keyMinusId]}var y=A.counterRegex("([a-z]+)");function h(f){var n=f.match(y);return{keyMinusId:n&&n[1],id:n&&n[2]}}function T(f){if(!d(f))return String(f);for(var n="",v=0;v<f.length;v++){var m=f[v];typeof m=="number"?n=n.substr(0,n.length-1)+"["+m+"]":n+=m,v<f.length-1&&(n+=".")}return n}},85656:function(te){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"}}}},51272:function(te,X,e){var A=e(3400),P=e(31780);te.exports=function(L,M,d){var g=d.name,r=d.inclusionAttr||"visible",t=M[g],s=A.isArrayOrTypedArray(L[g])?L[g]:[],a=M[g]=[],c=P.arrayTemplater(M,g,r),u,l;for(u=0;u<s.length;u++){var y=s[u];A.isPlainObject(y)?l=c.newItem(y):(l=c.newItem({}),l[r]=!1),l._index=u,l[r]!==!1&&d.handleItemDefaults(y,l,M,d),a.push(l)}var h=c.defaultItems();for(u=0;u<h.length;u++)l=h[u],l._index=a.length,d.handleItemDefaults({},l,M,d,{}),a.push(l);if(A.isArrayOrTypedArray(t)){var T=Math.min(t.length,a.length);for(u=0;u<T;u++)A.relinkPrivateKeys(a[u],t[u])}return a}},45464:function(te,X,e){var A=e(25376),P=e(55756);te.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"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:A({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,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:P.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"}}},1220:function(te,X,e){var A=e(38248),P=e(3400),o=P.dateTime2ms,L=P.incrementMonth,M=e(39032),d=M.ONEAVGMONTH;te.exports=function(r,t,s,a){if(t.type!=="date")return{vals:a};var c=r[s+"periodalignment"];if(!c)return{vals:a};var u=r[s+"period"],l;if(A(u)){if(u=+u,u<=0)return{vals:a}}else if(typeof u=="string"&&u.charAt(0)==="M"){var y=+u.substring(1);if(y>0&&Math.round(y)===y)l=y;else return{vals:a}}for(var h=t.calendar,T=c==="start",f=c==="end",n=r[s+"period0"],v=o(n,h)||0,m=[],b=[],E=[],p=a.length,S=0;S<p;S++){var w=a[S],i,C,x;if(l){for(i=Math.round((w-v)/(l*d)),x=L(v,l*i,h);x>w;)x=L(x,-l,h);for(;x<=w;)x=L(x,l,h);C=L(x,-l,h)}else{for(i=Math.round((w-v)/u),x=v+i*u;x>w;)x-=u;for(;x<=w;)x+=u;C=x-u}m[S]=T?C:f?x:(C+x)/2,b[S]=C,E[S]=x}return{vals:m,starts:b,ends:E}}},26720:function(te){te.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(te,X,e){var A=e(33428),P=e(38248),o=e(3400),L=e(39032).FP_SAFE,M=e(24040),d=e(43616),g=e(79811),r=g.getFromId,t=g.isLinked;te.exports={applyAutorangeOptions:i,getAutoRange:s,makePadFn:c,doAutoRange:h,findExtremes:T,concatExtremes:y};function s(C,x){var k,I,B=[],_=C._fullLayout,z=c(_,x,0),O=c(_,x,1),F=y(C,x),N=F.min,V=F.max;if(N.length===0||V.length===0)return o.simpleMap(x.range,x.r2l);var j=N[0].val,$=V[0].val;for(k=1;k<N.length&&j===$;k++)j=Math.min(j,N[k].val);for(k=1;k<V.length&&j===$;k++)$=Math.max($,V[k].val);var q=x.autorange,oe=q==="reversed"||q==="min reversed"||q==="max reversed";if(!oe&&x.range){var Z=o.simpleMap(x.range,x.r2l);oe=Z[1]<Z[0]}x.autorange==="reversed"&&(x.autorange=!0);var G=x.rangemode,re=G==="tozero",H=G==="nonnegative",J=x._length,ae=J/10,K=0,Y,ie,ne,le,de,we;for(k=0;k<N.length;k++)for(Y=N[k],I=0;I<V.length;I++)ie=V[I],we=ie.val-Y.val-a(x,Y.val,ie.val),we>0&&(de=J-z(Y)-O(ie),de>ae?we/de>K&&(ne=Y,le=ie,K=we/de):we/J>K&&(ne={val:Y.val,nopad:1},le={val:ie.val,nopad:1},K=we/J));function me(Se,_e){return Math.max(Se,O(_e))}if(j===$){var Le=j-1,ve=j+1;if(re)if(j===0)B=[0,1];else{var Ae=(j>0?V:N).reduce(me,0),ye=j/(1-Math.min(.5,Ae/J));B=j>0?[0,ye]:[ye,0]}else H?B=[Math.max(0,Le),Math.max(1,ve)]:B=[Le,ve]}else re?(ne.val>=0&&(ne={val:0,nopad:1}),le.val<=0&&(le={val:0,nopad:1})):H&&(ne.val-K*z(ne)<0&&(ne={val:0,nopad:1}),le.val<=0&&(le={val:1,nopad:1})),K=(le.val-ne.val-a(x,Y.val,ie.val))/(J-z(ne)-O(le)),B=[ne.val-K*z(ne),le.val+K*O(le)];return B=i(B,x),x.limitRange&&x.limitRange(),oe&&B.reverse(),o.simpleMap(B,x.l2r||Number)}function a(C,x,k){var I=0;if(C.rangebreaks)for(var B=C.locateBreaks(x,k),_=0;_<B.length;_++){var z=B[_];I+=z.max-z.min}return I}function c(C,x,k){var I=.05*x._length,B=x._anchorAxis||{};if((x.ticklabelposition||"").indexOf("inside")!==-1||(B.ticklabelposition||"").indexOf("inside")!==-1){var _=x.isReversed();if(!_){var z=o.simpleMap(x.range,x.r2l);_=z[1]<z[0]}_&&(k=!k)}var O=0;return t(C,x._id)||(O=l(C,x,k)),I=Math.max(O,I),x.constrain==="domain"&&x._inputDomain&&(I*=(x._inputDomain[1]-x._inputDomain[0])/(x.domain[1]-x.domain[0])),function(N){return N.nopad?0:N.pad+(N.extrapad?I:O)}}var u=3;function l(C,x,k){var I=0,B=x._id.charAt(0)==="x";for(var _ in C._plots){var z=C._plots[_];if(!(x._id!==z.xaxis._id&&x._id!==z.yaxis._id)){var O=(B?z.yaxis:z.xaxis)||{};if((O.ticklabelposition||"").indexOf("inside")!==-1&&(!k&&(O.side==="left"||O.side==="bottom")||k&&(O.side==="top"||O.side==="right"))){if(O._vals){var F=o.deg2rad(O._tickAngles[O._id+"tick"]||0),N=Math.abs(Math.cos(F)),V=Math.abs(Math.sin(F));if(!O._vals[0].bb){var j=O._id+"tick",$=O._selections[j];$.each(function(H){var J=A.select(this),ae=J.select(".text-math-group");ae.empty()&&(H.bb=d.bBox(J.node()))})}for(var q=0;q<O._vals.length;q++){var oe=O._vals[q],Z=oe.bb;if(Z){var G=2*u+Z.width,re=2*u+Z.height;I=Math.max(I,B?Math.max(G*N,re*V):Math.max(re*N,G*V))}}}O.ticks==="inside"&&O.ticklabelposition==="inside"&&(I+=O.ticklen||0)}}}return I}function y(C,x,k){var I=x._id,B=C._fullData,_=C._fullLayout,z=[],O=[],F,N,V;function j(G,re){for(F=0;F<re.length;F++){var H=G[re[F]],J=(H._extremes||{})[I];if(H.visible===!0&&J){for(N=0;N<J.min.length;N++)V=J.min[N],f(z,V.val,V.pad,{extrapad:V.extrapad});for(N=0;N<J.max.length;N++)V=J.max[N],n(O,V.val,V.pad,{extrapad:V.extrapad})}}}if(j(B,x._traceIndices),j(_.annotations||[],x._annIndices||[]),j(_.shapes||[],x._shapeIndices||[]),x._matchGroup&&!k){for(var $ in x._matchGroup)if($!==x._id){var q=r(C,$),oe=y(C,q,!0),Z=x._length/q._length;for(N=0;N<oe.min.length;N++)V=oe.min[N],f(z,V.val,V.pad*Z,{extrapad:V.extrapad});for(N=0;N<oe.max.length;N++)V=oe.max[N],n(O,V.val,V.pad*Z,{extrapad:V.extrapad})}}return{min:z,max:O}}function h(C,x,k){if(x.setScale(),x.autorange){x.range=k?k.slice():s(C,x),x._r=x.range.slice(),x._rl=o.simpleMap(x._r,x.r2l);var I=x._input,B={};B[x._attr+".range"]=x.range,B[x._attr+".autorange"]=x.autorange,M.call("_storeDirectGUIEdit",C.layout,C._fullLayout._preGUI,B),I.range=x.range.slice(),I.autorange=x.autorange}var _=x._anchorAxis;if(_&&_.rangeslider){var z=_.rangeslider[x._name];z&&z.rangemode==="auto"&&(z.range=s(C,x)),_._input.rangeslider[x._name]=o.extendFlat({},z)}}function T(C,x,k){k||(k={}),C._m||C.setScale();var I=[],B=[],_=x.length,z=k.padded||!1,O=k.tozero&&(C.type==="linear"||C.type==="-"),F=C.type==="log",N=!1,V=k.vpadLinearized||!1,j,$,q,oe,Z,G,re,H,J;function ae(me){if(Array.isArray(me))return N=!0,function(ve){return Math.max(Number(me[ve]||0),0)};var Le=Math.max(Number(me||0),0);return function(){return Le}}var K=ae((C._m>0?k.ppadplus:k.ppadminus)||k.ppad||0),Y=ae((C._m>0?k.ppadminus:k.ppadplus)||k.ppad||0),ie=ae(k.vpadplus||k.vpad),ne=ae(k.vpadminus||k.vpad);if(!N){if(H=1/0,J=-1/0,F)for(j=0;j<_;j++)$=x[j],$<H&&$>0&&(H=$),$>J&&$<L&&(J=$);else for(j=0;j<_;j++)$=x[j],$<H&&$>-L&&(H=$),$>J&&$<L&&(J=$);x=[H,J],_=2}var le={tozero:O,extrapad:z};function de(me){q=x[me],P(q)&&(G=K(me),re=Y(me),V?(oe=C.c2l(q)-ne(me),Z=C.c2l(q)+ie(me)):(H=q-ne(me),J=q+ie(me),F&&H<J/10&&(H=J/10),oe=C.c2l(H),Z=C.c2l(J)),O&&(oe=Math.min(0,oe),Z=Math.max(0,Z)),m(oe)&&f(I,oe,re,le),m(Z)&&n(B,Z,G,le))}var we=Math.min(6,_);for(j=0;j<we;j++)de(j);for(j=_-1;j>=we;j--)de(j);return{min:I,max:B,opts:k}}function f(C,x,k,I){v(C,x,k,I,b)}function n(C,x,k,I){v(C,x,k,I,E)}function v(C,x,k,I,B){for(var _=I.tozero,z=I.extrapad,O=!0,F=0;F<C.length&&O;F++){var N=C[F];if(B(N.val,x)&&N.pad>=k&&(N.extrapad||!z)){O=!1;break}else B(x,N.val)&&N.pad<=k&&(z||!N.extrapad)&&(C.splice(F,1),F--)}if(O){var V=_&&x===0;C.push({val:x,pad:V?0:k,extrapad:V?!1:z})}}function m(C){return P(C)&&Math.abs(C)<L}function b(C,x){return C<=x}function E(C,x){return C>=x}function p(C,x){var k=x.autorangeoptions;return k&&k.minallowed!==void 0&&w(x,k.minallowed,k.maxallowed)?k.minallowed:k&&k.clipmin!==void 0&&w(x,k.clipmin,k.clipmax)?Math.max(C,x.d2l(k.clipmin)):C}function S(C,x){var k=x.autorangeoptions;return k&&k.maxallowed!==void 0&&w(x,k.minallowed,k.maxallowed)?k.maxallowed:k&&k.clipmax!==void 0&&w(x,k.clipmin,k.clipmax)?Math.min(C,x.d2l(k.clipmax)):C}function w(C,x,k){return x!==void 0&&k!==void 0?(x=C.d2l(x),k=C.d2l(k),x<k):!0}function i(C,x){if(!x||!x.autorangeoptions)return C;var k=C[0],I=C[1],B=x.autorangeoptions.include;if(B!==void 0){var _=x.d2l(k),z=x.d2l(I);o.isArrayOrTypedArray(B)||(B=[B]);for(var O=0;O<B.length;O++){var F=x.d2l(B[O]);_>=F&&(_=F,k=F),z<=F&&(z=F,I=F)}}return k=p(k,x),I=S(I,x),[k,I]}},76808:function(te){te.exports=function(e,A,P){var o,L;if(P){var M=A==="reversed"||A==="min reversed"||A==="max reversed";o=P[M?1:0],L=P[M?0:1]}var d=e("autorangeoptions.minallowed",L===null?o:void 0),g=e("autorangeoptions.maxallowed",o===null?L:void 0);d===void 0&&e("autorangeoptions.clipmin"),g===void 0&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},54460:function(te,X,e){var A=e(33428),P=e(38248),o=e(7316),L=e(24040),M=e(3400),d=M.strTranslate,g=e(72736),r=e(81668),t=e(76308),s=e(43616),a=e(94724),c=e(98728),u=e(39032),l=u.ONEMAXYEAR,y=u.ONEAVGYEAR,h=u.ONEMINYEAR,T=u.ONEMAXQUARTER,f=u.ONEAVGQUARTER,n=u.ONEMINQUARTER,v=u.ONEMAXMONTH,m=u.ONEAVGMONTH,b=u.ONEMINMONTH,E=u.ONEWEEK,p=u.ONEDAY,S=p/2,w=u.ONEHOUR,i=u.ONEMIN,C=u.ONESEC,x=u.MINUS_SIGN,k=u.BADNUM,I={K:"zeroline"},B={K:"gridline",L:"path"},_={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},O={K:"tick",L:"text"},F={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},N=e(84284),V=N.MID_SHIFT,j=N.CAP_SHIFT,$=N.LINE_SPACING,q=N.OPPOSITE_SIDE,oe=3,Z=te.exports={};Z.setConvert=e(78344);var G=e(52976),re=e(79811),H=re.idSort,J=re.isLinked;Z.id2name=re.id2name,Z.name2id=re.name2id,Z.cleanId=re.cleanId,Z.list=re.list,Z.listIds=re.listIds,Z.getFromId=re.getFromId,Z.getFromTrace=re.getFromTrace;var ae=e(19280);Z.getAutoRange=ae.getAutoRange,Z.findExtremes=ae.findExtremes;var K=1e-4;function Y(Be){var Fe=(Be[1]-Be[0])*K;return[Be[0]-Fe,Be[1]+Fe]}Z.coerceRef=function(Be,Fe,Rt,Lt,Ut,Qt){var rr=Lt.charAt(Lt.length-1),Kt=Rt._fullLayout._subplots[rr+"axis"],Dt=Lt+"ref",sr={};return Ut||(Ut=Kt[0]||(typeof Qt=="string"?Qt:Qt[0])),Qt||(Qt=Ut),Kt=Kt.concat(Kt.map(function(fr){return fr+" domain"})),sr[Dt]={valType:"enumerated",values:Kt.concat(Qt?typeof Qt=="string"?[Qt]:Qt:[]),dflt:Ut},M.coerce(Be,Fe,sr,Dt)},Z.getRefType=function(Be){return Be===void 0?Be:Be==="paper"?"paper":Be==="pixel"?"pixel":/( domain)$/.test(Be)?"domain":"range"},Z.coercePosition=function(Be,Fe,Rt,Lt,Ut,Qt){var rr,Kt,Dt=Z.getRefType(Lt);if(Dt!=="range")rr=M.ensureNumber,Kt=Rt(Ut,Qt);else{var sr=Z.getFromId(Fe,Lt);Qt=sr.fraction2r(Qt),Kt=Rt(Ut,Qt),rr=sr.cleanPos}Be[Ut]=rr(Kt)},Z.cleanPosition=function(Be,Fe,Rt){var Lt=Rt==="paper"||Rt==="pixel"?M.ensureNumber:Z.getFromId(Fe,Rt).cleanPos;return Lt(Be)},Z.redrawComponents=function(Be,Fe){Fe=Fe||Z.listIds(Be);var Rt=Be._fullLayout;function Lt(Ut,Qt,rr,Kt){for(var Dt=L.getComponentMethod(Ut,Qt),sr={},fr=0;fr<Fe.length;fr++)for(var vr=Rt[Z.id2name(Fe[fr])],lr=vr[rr],Or=0;Or<lr.length;Or++){var Sr=lr[Or];if(!sr[Sr]&&(Dt(Be,Sr),sr[Sr]=1,Kt))return}}Lt("annotations","drawOne","_annIndices"),Lt("shapes","drawOne","_shapeIndices"),Lt("images","draw","_imgIndices",!0),Lt("selections","drawOne","_selectionIndices")};var ie=Z.getDataConversions=function(Be,Fe,Rt,Lt){var Ut,Qt=Rt==="x"||Rt==="y"||Rt==="z"?Rt:Lt;if(M.isArrayOrTypedArray(Qt)){if(Ut={type:G(Lt,void 0,{autotypenumbers:Be._fullLayout.autotypenumbers}),_categories:[]},Z.setConvert(Ut),Ut.type==="category")for(var rr=0;rr<Lt.length;rr++)Ut.d2c(Lt[rr])}else Ut=Z.getFromTrace(Be,Fe,Qt);return Ut?{d2c:Ut.d2c,c2d:Ut.c2d}:Qt==="ids"?{d2c:le,c2d:le}:{d2c:ne,c2d:ne}};function ne(Be){return+Be}function le(Be){return String(Be)}Z.getDataToCoordFunc=function(Be,Fe,Rt,Lt){return ie(Be,Fe,Rt,Lt).d2c},Z.counterLetter=function(Be){var Fe=Be.charAt(0);if(Fe==="x")return"y";if(Fe==="y")return"x"},Z.minDtick=function(Be,Fe,Rt,Lt){["log","category","multicategory"].indexOf(Be.type)!==-1||!Lt?Be._minDtick=0:Be._minDtick===void 0?(Be._minDtick=Fe,Be._forceTick0=Rt):Be._minDtick&&((Be._minDtick/Fe+1e-6)%1<2e-6&&((Rt-Be._forceTick0)/Fe%1+1.000001)%1<2e-6?(Be._minDtick=Fe,Be._forceTick0=Rt):((Fe/Be._minDtick+1e-6)%1>2e-6||((Rt-Be._forceTick0)/Be._minDtick%1+1.000001)%1>2e-6)&&(Be._minDtick=0))},Z.saveRangeInitial=function(Be,Fe){for(var Rt=Z.list(Be,"",!0),Lt=!1,Ut=0;Ut<Rt.length;Ut++){var Qt=Rt[Ut],rr=Qt._rangeInitial0===void 0&&Qt._rangeInitial1===void 0,Kt=rr||Qt.range[0]!==Qt._rangeInitial0||Qt.range[1]!==Qt._rangeInitial1,Dt=Qt.autorange;(rr&&Dt!==!0||Fe&&Kt)&&(Qt._rangeInitial0=Dt==="min"||Dt==="max reversed"?void 0:Qt.range[0],Qt._rangeInitial1=Dt==="max"||Dt==="min reversed"?void 0:Qt.range[1],Qt._autorangeInitial=Dt,Lt=!0)}return Lt},Z.saveShowSpikeInitial=function(Be,Fe){for(var Rt=Z.list(Be,"",!0),Lt=!1,Ut="on",Qt=0;Qt<Rt.length;Qt++){var rr=Rt[Qt],Kt=rr._showSpikeInitial===void 0,Dt=Kt||rr.showspikes!==rr._showspikes;(Kt||Fe&&Dt)&&(rr._showSpikeInitial=rr.showspikes,Lt=!0),Ut==="on"&&!rr.showspikes&&(Ut="off")}return Be._fullLayout._cartesianSpikesEnabled=Ut,Lt},Z.autoBin=function(Be,Fe,Rt,Lt,Ut,Qt){var rr=M.aggNums(Math.min,null,Be),Kt=M.aggNums(Math.max,null,Be);if(Fe.type==="category"||Fe.type==="multicategory")return{start:rr-.5,end:Kt+.5,size:Math.max(1,Math.round(Qt)||1),_dataSpan:Kt-rr};Ut||(Ut=Fe.calendar);var Dt;if(Fe.type==="log"?Dt={type:"linear",range:[rr,Kt]}:Dt={type:Fe.type,range:M.simpleMap([rr,Kt],Fe.c2r,0,Ut),calendar:Ut},Z.setConvert(Dt),Qt=Qt&&c.dtick(Qt,Dt.type),Qt)Dt.dtick=Qt,Dt.tick0=c.tick0(void 0,Dt.type,Ut);else{var sr;if(Rt)sr=(Kt-rr)/Rt;else{var fr=M.distinctVals(Be),vr=Math.pow(10,Math.floor(Math.log(fr.minDiff)/Math.LN10)),lr=vr*M.roundUp(fr.minDiff/vr,[.9,1.9,4.9,9.9],!0);sr=Math.max(lr,2*M.stdev(Be)/Math.pow(Be.length,Lt?.25:.4)),P(sr)||(sr=1)}Z.autoTicks(Dt,sr)}var Or=Dt.dtick,Sr=Z.tickIncrement(Z.tickFirst(Dt),Or,"reverse",Ut),Ar,sn;if(typeof Or=="number")Sr=de(Sr,Be,Dt,rr,Kt),sn=1+Math.floor((Kt-Sr)/Or),Ar=Sr+sn*Or;else for(Dt.dtick.charAt(0)==="M"&&(Sr=we(Sr,Be,Or,rr,Ut)),Ar=Sr,sn=0;Ar<=Kt;)Ar=Z.tickIncrement(Ar,Or,!1,Ut),sn++;return{start:Fe.c2r(Sr,0,Ut),end:Fe.c2r(Ar,0,Ut),size:Or,_dataSpan:Kt-rr}};function de(Be,Fe,Rt,Lt,Ut){var Qt=0,rr=0,Kt=0,Dt=0;function sr(Or){return(1+(Or-Be)*100/Rt.dtick)%100<2}for(var fr=0;fr<Fe.length;fr++)Fe[fr]%1===0?Kt++:P(Fe[fr])||Dt++,sr(Fe[fr])&&Qt++,sr(Fe[fr]+Rt.dtick/2)&&rr++;var vr=Fe.length-Dt;if(Kt===vr&&Rt.type!=="date")Rt.dtick<1?Be=Lt-.5*Rt.dtick:(Be-=.5,Be+Rt.dtick<Lt&&(Be+=Rt.dtick));else if(rr<vr*.1&&(Qt>vr*.3||sr(Lt)||sr(Ut))){var lr=Rt.dtick/2;Be+=Be+lr<Lt?lr:-lr}return Be}function we(Be,Fe,Rt,Lt,Ut){var Qt=M.findExactDates(Fe,Ut),rr=.8;if(Qt.exactDays>rr){var Kt=Number(Rt.substr(1));Qt.exactYears>rr&&Kt%12===0?Be=Z.tickIncrement(Be,"M6","reverse")+p*1.5:Qt.exactMonths>rr?Be=Z.tickIncrement(Be,"M1","reverse")+p*15.5:Be-=S;var Dt=Z.tickIncrement(Be,Rt);if(Dt<=Lt)return Dt}return Be}Z.prepMinorTicks=function(Be,Fe,Rt){if(!Fe.minor.dtick){delete Be.dtick;var Lt=Fe.dtick&&P(Fe._tmin),Ut;if(Lt){var Qt=Z.tickIncrement(Fe._tmin,Fe.dtick,!0);Ut=[Fe._tmin,Qt*.99+Fe._tmin*.01]}else{var rr=M.simpleMap(Fe.range,Fe.r2l);Ut=[rr[0],.8*rr[0]+.2*rr[1]]}if(Be.range=M.simpleMap(Ut,Fe.l2r),Be._isMinor=!0,Z.prepTicks(Be,Rt),Lt){var Kt=P(Fe.dtick),Dt=P(Be.dtick),sr=Kt?Fe.dtick:+Fe.dtick.substring(1),fr=Dt?Be.dtick:+Be.dtick.substring(1);Kt&&Dt?me(sr,fr)?sr===2*E&&fr===2*p&&(Be.dtick=E):sr===2*E&&fr===3*p?Be.dtick=E:sr===E&&!(Fe._input.minor||{}).nticks?Be.dtick=p:Le(sr/fr,2.5)?Be.dtick=sr/2:Be.dtick=sr:String(Fe.dtick).charAt(0)==="M"?Dt?Be.dtick="M1":me(sr,fr)?sr>=12&&fr===2&&(Be.dtick="M3"):Be.dtick=Fe.dtick:String(Be.dtick).charAt(0)==="L"?String(Fe.dtick).charAt(0)==="L"?me(sr,fr)||(Be.dtick=Le(sr/fr,2.5)?Fe.dtick/2:Fe.dtick):Be.dtick="D1":Be.dtick==="D2"&&+Fe.dtick>1&&(Be.dtick=1)}Be.range=Fe.range}Fe.minor._tick0Init===void 0&&(Be.tick0=Fe.tick0)};function me(Be,Fe){return Math.abs((Be/Fe+.5)%1-.5)<.001}function Le(Be,Fe){return Math.abs(Be/Fe-1)<.001}Z.prepTicks=function(Be,Fe){var Rt=M.simpleMap(Be.range,Be.r2l,void 0,void 0,Fe);if(Be.tickmode==="auto"||!Be.dtick){var Lt=Be.nticks,Ut;Lt||(Be.type==="category"||Be.type==="multicategory"?(Ut=Be.tickfont?M.bigFont(Be.tickfont.size||12):15,Lt=Be._length/Ut):(Ut=Be._id.charAt(0)==="y"?40:80,Lt=M.constrain(Be._length/Ut,4,9)+1),Be._name==="radialaxis"&&(Lt*=2)),Be.minor&&Be.minor.tickmode!=="array"||Be.tickmode==="array"&&(Lt*=100),Be._roughDTick=Math.abs(Rt[1]-Rt[0])/Lt,Z.autoTicks(Be,Be._roughDTick),Be._minDtick>0&&Be.dtick<Be._minDtick*2&&(Be.dtick=Be._minDtick,Be.tick0=Be.l2r(Be._forceTick0))}Be.ticklabelmode==="period"&&Ae(Be),Be.tick0||(Be.tick0=Be.type==="date"?"2000-01-01":0),Be.type==="date"&&Be.dtick<.1&&(Be.dtick=.1),lt(Be)};function ve(Be){return+Be.substring(1)}function Ae(Be){var Fe;function Rt(){return!(P(Be.dtick)||Be.dtick.charAt(0)!=="M")}var Lt=Rt(),Ut=Z.getTickFormat(Be);if(Ut){var Qt=Be._dtickInit!==Be.dtick;/%[fLQsSMX]/.test(Ut)||(/%[HI]/.test(Ut)?(Fe=w,Qt&&!Lt&&Be.dtick<w&&(Be.dtick=w)):/%p/.test(Ut)?(Fe=S,Qt&&!Lt&&Be.dtick<S&&(Be.dtick=S)):/%[Aadejuwx]/.test(Ut)?(Fe=p,Qt&&!Lt&&Be.dtick<p&&(Be.dtick=p)):/%[UVW]/.test(Ut)?(Fe=E,Qt&&!Lt&&Be.dtick<E&&(Be.dtick=E)):/%[Bbm]/.test(Ut)?(Fe=m,Qt&&(Lt?ve(Be.dtick)<1:Be.dtick<b)&&(Be.dtick="M1")):/%[q]/.test(Ut)?(Fe=f,Qt&&(Lt?ve(Be.dtick)<3:Be.dtick<n)&&(Be.dtick="M3")):/%[Yy]/.test(Ut)&&(Fe=y,Qt&&(Lt?ve(Be.dtick)<12:Be.dtick<h)&&(Be.dtick="M12")))}Lt=Rt(),Lt&&Be.tick0===Be._dowTick0&&(Be.tick0=Be._rawTick0),Be._definedDelta=Fe}function ye(Be,Fe,Rt){for(var Lt=0;Lt<Be.length;Lt++){var Ut=Be[Lt].value,Qt=Lt,rr=Lt+1;Lt<Be.length-1?(Qt=Lt,rr=Lt+1):Lt>0?(Qt=Lt-1,rr=Lt):(Qt=Lt,rr=Lt);var Kt=Be[Qt].value,Dt=Be[rr].value,sr=Math.abs(Dt-Kt),fr=Rt||sr,vr=0;fr>=h?sr>=h&&sr<=l?vr=sr:vr=y:Rt===f&&fr>=n?sr>=n&&sr<=T?vr=sr:vr=f:fr>=b?sr>=b&&sr<=v?vr=sr:vr=m:Rt===E&&fr>=E?vr=E:fr>=p?vr=p:Rt===S&&fr>=S?vr=S:Rt===w&&fr>=w&&(vr=w);var lr;vr>=sr&&(vr=sr,lr=!0);var Or=Ut+vr;if(Fe.rangebreaks&&vr>0){for(var Sr=84,Ar=0,sn=0;sn<Sr;sn++){var Jr=(sn+.5)/Sr;Fe.maskBreaks(Ut*(1-Jr)+Jr*Or)!==k&&Ar++}vr*=Ar/Sr,vr||(Be[Lt].drop=!0),lr&&sr>E&&(vr=sr)}(vr>0||Lt===0)&&(Be[Lt].periodX=Ut+vr/2)}}Z.calcTicks=function(Fe,Rt){for(var Lt=Fe.type,Ut=Fe.calendar,Qt=Fe.ticklabelstep,rr=Fe.ticklabelmode==="period",Kt=M.simpleMap(Fe.range,Fe.r2l,void 0,void 0,Rt),Dt=Kt[1]<Kt[0],sr=Math.min(Kt[0],Kt[1]),fr=Math.max(Kt[0],Kt[1]),vr=Math.max(1e3,Fe._length||0),lr=[],Or=[],Sr=[],Ar=[],sn=Fe.minor&&(Fe.minor.ticks||Fe.minor.showgrid),Jr=1;Jr>=(sn?0:1);Jr--){var bn=!Jr;Jr?(Fe._dtickInit=Fe.dtick,Fe._tick0Init=Fe.tick0):(Fe.minor._dtickInit=Fe.minor.dtick,Fe.minor._tick0Init=Fe.minor.tick0);var xn=Jr?Fe:M.extendFlat({},Fe,Fe.minor);if(bn?Z.prepMinorTicks(xn,Fe,Rt):Z.prepTicks(xn,Rt),xn.tickmode==="array"){Jr?(Sr=[],lr=ze(Fe,!bn)):(Ar=[],Or=ze(Fe,!bn));continue}if(xn.tickmode==="sync"){Sr=[],lr=_e(Fe);continue}var or=Y(Kt),Lr=or[0],Br=or[1],_r=P(xn.dtick),Qr=Lt==="log"&&!(_r||xn.dtick.charAt(0)==="L"),un=Z.tickFirst(xn,Rt);if(Jr){if(Fe._tmin=un,un<Lr!==Dt)break;(Lt==="category"||Lt==="multicategory")&&(Br=Dt?Math.max(-.5,Br):Math.min(Fe._categories.length-.5,Br))}var ln=null,Mn=un,Dn;if(Jr){var Kn;_r?Kn=Fe.dtick:Lt==="date"?typeof Fe.dtick=="string"&&Fe.dtick.charAt(0)==="M"&&(Kn=m*Fe.dtick.substring(1)):Kn=Fe._roughDTick,Dn=Math.round((Fe.r2l(Mn)-Fe.r2l(Fe.tick0))/Kn)-1}var sa=xn.dtick;for(xn.rangebreaks&&xn._tick0Init!==xn.tick0&&(Mn=It(Mn,Fe),Dt||(Mn=Z.tickIncrement(Mn,sa,!Dt,Ut))),Jr&&rr&&(Mn=Z.tickIncrement(Mn,sa,!Dt,Ut),Dn--);Dt?Mn>=Br:Mn<=Br;Mn=Z.tickIncrement(Mn,sa,Dt,Ut)){if(Jr&&Dn++,xn.rangebreaks&&!Dt){if(Mn<Lr)continue;if(xn.maskBreaks(Mn)===k&&It(Mn,xn)>=fr)break}if(Sr.length>vr||Mn===ln)break;ln=Mn;var na={value:Mn};Jr?(Qr&&Mn!==(Mn|0)&&(na.simpleLabel=!0),Qt>1&&Dn%Qt&&(na.skipLabel=!0),Sr.push(na)):(na.minor=!0,Ar.push(na))}}if(sn){var Jn=Fe.minor.ticks==="inside"&&Fe.ticks==="outside"||Fe.minor.ticks==="outside"&&Fe.ticks==="inside";if(!Jn){for(var aa=Sr.map(function(an){return an.value}),pr=[],$r=0;$r<Ar.length;$r++){var Xr=Ar[$r],fn=Xr.value;if(aa.indexOf(fn)===-1){for(var zn=!1,pn=0;!zn&&pn<Sr.length;pn++)1e7+Sr[pn].value===1e7+fn&&(zn=!0);zn||pr.push(Xr)}}Ar=pr}}rr&&ye(Sr,Fe,Fe._definedDelta);var gn;if(Fe.rangebreaks){var In=Fe._id.charAt(0)==="y",Gn=1;Fe.tickmode==="auto"&&(Gn=Fe.tickfont?Fe.tickfont.size:12);var ua=NaN;for(gn=Sr.length-1;gn>-1;gn--){if(Sr[gn].drop){Sr.splice(gn,1);continue}Sr[gn].value=It(Sr[gn].value,Fe);var Ma=Fe.c2p(Sr[gn].value);(In?ua>Ma-Gn:ua<Ma+Gn)?Sr.splice(Dt?gn+1:gn,1):ua=Ma}}_t(Fe)&&Math.abs(Kt[1]-Kt[0])===360&&Sr.pop(),Fe._tmax=(Sr[Sr.length-1]||{}).value,Fe._prevDateHead="",Fe._inCalcTicks=!0;var xr,Rr=function(an){an.text="",Fe._prevDateHead=xr};Sr=Sr.concat(Ar);var yr,Dr;for(gn=0;gn<Sr.length;gn++){var vn=Sr[gn].minor,En=Sr[gn].value;vn?Or.push({x:En,minor:!0}):(xr=Fe._prevDateHead,yr=Z.tickText(Fe,En,!1,Sr[gn].simpleLabel),Dr=Sr[gn].periodX,Dr!==void 0&&(yr.periodX=Dr,(Dr>fr||Dr<sr)&&(Dr>fr&&(yr.periodX=fr),Dr<sr&&(yr.periodX=sr),Rr(yr))),Sr[gn].skipLabel&&Rr(yr),lr.push(yr))}return lr=lr.concat(Or),Fe._inCalcTicks=!1,rr&&lr.length&&(lr[0].noTick=!0),lr};function Se(Be,Fe){return Be.rangebreaks&&(Fe=Fe.filter(function(Rt){return Be.maskBreaks(Rt.x)!==k})),Fe}function _e(Be){var Fe=Be._mainAxis,Rt=[];if(Fe._vals){for(var Lt=0;Lt<Fe._vals.length;Lt++)if(!Fe._vals[Lt].noTick){var Ut=Fe.l2p(Fe._vals[Lt].x),Qt=Be.p2l(Ut),rr=Z.tickText(Be,Qt);Fe._vals[Lt].minor&&(rr.minor=!0,rr.text=""),Rt.push(rr)}}return Rt=Se(Be,Rt),Rt}function ze(Be,Fe){var Rt=M.simpleMap(Be.range,Be.r2l),Lt=Y(Rt),Ut=Math.min(Lt[0],Lt[1]),Qt=Math.max(Lt[0],Lt[1]),rr=Be.type==="category"?Be.d2l_noadd:Be.d2l;Be.type==="log"&&String(Be.dtick).charAt(0)!=="L"&&(Be.dtick="L"+Math.pow(10,Math.floor(Math.min(Be.range[0],Be.range[1]))-1));for(var Kt=[],Dt=0;Dt<=1;Dt++)if(!(Fe!==void 0&&(Fe&&Dt||Fe===!1&&!Dt))&&!(Dt&&!Be.minor)){var sr=Dt?Be.minor.tickvals:Be.tickvals,fr=Dt?[]:Be.ticktext;if(sr){M.isArrayOrTypedArray(fr)||(fr=[]);for(var vr=0;vr<sr.length;vr++){var lr=rr(sr[vr]);if(lr>Ut&&lr<Qt){var Or=Z.tickText(Be,lr,!1,String(fr[vr]));Dt&&(Or.minor=!0,Or.text=""),Kt.push(Or)}}}}return Kt=Se(Be,Kt),Kt}var Ie=[2,5,10],Ne=[1,2,3,6,12],et=[1,2,5,10,15,30],st=[1,2,3,7,14],Ze=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Ke=[-.301,0,.301,.699,1],nt=[15,30,45,90,180];function it(Be,Fe,Rt){return Fe*M.roundUp(Be/Fe,Rt)}Z.autoTicks=function(Be,Fe,Rt){var Lt;function Ut(vr){return Math.pow(vr,Math.floor(Math.log(Fe)/Math.LN10))}if(Be.type==="date"){Be.tick0=M.dateTick0(Be.calendar,0);var Qt=2*Fe;if(Qt>y)Fe/=y,Lt=Ut(10),Be.dtick="M"+12*it(Fe,Lt,Ie);else if(Qt>m)Fe/=m,Be.dtick="M"+it(Fe,1,Ne);else if(Qt>p){if(Be.dtick=it(Fe,p,Be._hasDayOfWeekBreaks?[1,2,7,14]:st),!Rt){var rr=Z.getTickFormat(Be),Kt=Be.ticklabelmode==="period";Kt&&(Be._rawTick0=Be.tick0),/%[uVW]/.test(rr)?Be.tick0=M.dateTick0(Be.calendar,2):Be.tick0=M.dateTick0(Be.calendar,1),Kt&&(Be._dowTick0=Be.tick0)}}else Qt>w?Be.dtick=it(Fe,w,Ne):Qt>i?Be.dtick=it(Fe,i,et):Qt>C?Be.dtick=it(Fe,C,et):(Lt=Ut(10),Be.dtick=it(Fe,Lt,Ie))}else if(Be.type==="log"){Be.tick0=0;var Dt=M.simpleMap(Be.range,Be.r2l);if(Be._isMinor&&(Fe*=1.5),Fe>.7)Be.dtick=Math.ceil(Fe);else if(Math.abs(Dt[1]-Dt[0])<1){var sr=1.5*Math.abs((Dt[1]-Dt[0])/Fe);Fe=Math.abs(Math.pow(10,Dt[1])-Math.pow(10,Dt[0]))/sr,Lt=Ut(10),Be.dtick="L"+it(Fe,Lt,Ie)}else Be.dtick=Fe>.3?"D2":"D1"}else Be.type==="category"||Be.type==="multicategory"?(Be.tick0=0,Be.dtick=Math.ceil(Math.max(Fe,1))):_t(Be)?(Be.tick0=0,Lt=1,Be.dtick=it(Fe,Lt,nt)):(Be.tick0=0,Lt=Ut(10),Be.dtick=it(Fe,Lt,Ie));if(Be.dtick===0&&(Be.dtick=1),!P(Be.dtick)&&typeof Be.dtick!="string"){var fr=Be.dtick;throw Be.dtick=1,"ax.dtick error: "+String(fr)}};function lt(Be){var Fe=Be.dtick;if(Be._tickexponent=0,!P(Fe)&&typeof Fe!="string"&&(Fe=1),(Be.type==="category"||Be.type==="multicategory")&&(Be._tickround=null),Be.type==="date"){var Rt=Be.r2l(Be.tick0),Lt=Be.l2r(Rt).replace(/(^-|i)/g,""),Ut=Lt.length;if(String(Fe).charAt(0)==="M")Ut>10||Lt.substr(5)!=="01-01"?Be._tickround="d":Be._tickround=+Fe.substr(1)%12===0?"y":"m";else if(Fe>=p&&Ut<=10||Fe>=p*15)Be._tickround="d";else if(Fe>=i&&Ut<=16||Fe>=w)Be._tickround="M";else if(Fe>=C&&Ut<=19||Fe>=i)Be._tickround="S";else{var Qt=Be.l2r(Rt+Fe).replace(/^-/,"").length;Be._tickround=Math.max(Ut,Qt)-20,Be._tickround<0&&(Be._tickround=4)}}else if(P(Fe)||Fe.charAt(0)==="L"){var rr=Be.range.map(Be.r2d||Number);P(Fe)||(Fe=Number(Fe.substr(1))),Be._tickround=2-Math.floor(Math.log(Fe)/Math.LN10+.01);var Kt=Math.max(Math.abs(rr[0]),Math.abs(rr[1])),Dt=Math.floor(Math.log(Kt)/Math.LN10+.01),sr=Be.minexponent===void 0?3:Be.minexponent;Math.abs(Dt)>sr&&(pe(Be.exponentformat)&&!Te(Dt)?Be._tickexponent=3*Math.round((Dt-1)/3):Be._tickexponent=Dt)}else Be._tickround=null}Z.tickIncrement=function(Be,Fe,Rt,Lt){var Ut=Rt?-1:1;if(P(Fe))return M.increment(Be,Ut*Fe);var Qt=Fe.charAt(0),rr=Ut*Number(Fe.substr(1));if(Qt==="M")return M.incrementMonth(Be,rr,Lt);if(Qt==="L")return Math.log(Math.pow(10,Be)+rr)/Math.LN10;if(Qt==="D"){var Kt=Fe==="D2"?Ke:Ze,Dt=Be+Ut*.01,sr=M.roundUp(M.mod(Dt,1),Kt,Rt);return Math.floor(Dt)+Math.log(A.round(Math.pow(10,sr),1))/Math.LN10}throw"unrecognized dtick "+String(Fe)},Z.tickFirst=function(Be,Fe){var Rt=Be.r2l||Number,Lt=M.simpleMap(Be.range,Rt,void 0,void 0,Fe),Ut=Lt[1]<Lt[0],Qt=Ut?Math.floor:Math.ceil,rr=Y(Lt)[0],Kt=Be.dtick,Dt=Rt(Be.tick0);if(P(Kt)){var sr=Qt((rr-Dt)/Kt)*Kt+Dt;return(Be.type==="category"||Be.type==="multicategory")&&(sr=M.constrain(sr,0,Be._categories.length-1)),sr}var fr=Kt.charAt(0),vr=Number(Kt.substr(1));if(fr==="M"){for(var lr=0,Or=Dt,Sr,Ar,sn;lr<10;){if(Sr=Z.tickIncrement(Or,Kt,Ut,Be.calendar),(Sr-rr)*(Or-rr)<=0)return Ut?Math.min(Or,Sr):Math.max(Or,Sr);Ar=(rr-(Or+Sr)/2)/(Sr-Or),sn=fr+(Math.abs(Math.round(Ar))||1)*vr,Or=Z.tickIncrement(Or,sn,Ar<0?!Ut:Ut,Be.calendar),lr++}return M.error("tickFirst did not converge",Be),Or}else{if(fr==="L")return Math.log(Qt((Math.pow(10,rr)-Dt)/vr)*vr+Dt)/Math.LN10;if(fr==="D"){var Jr=Kt==="D2"?Ke:Ze,bn=M.roundUp(M.mod(rr,1),Jr,Ut);return Math.floor(rr)+Math.log(A.round(Math.pow(10,bn),1))/Math.LN10}else throw"unrecognized dtick "+String(Kt)}},Z.tickText=function(Be,Fe,Rt,Lt){var Ut=vt(Be,Fe),Qt=Be.tickmode==="array",rr=Rt||Qt,Kt=Be.type,Dt=Kt==="category"?Be.d2l_noadd:Be.d2l,sr,fr=function(sn){var Jr=Be.l2p(sn);return Jr>=0&&Jr<=Be._length?sn:null};if(Qt&&M.isArrayOrTypedArray(Be.ticktext)){var vr=M.simpleMap(Be.range,Be.r2l),lr=(Math.abs(vr[1]-vr[0])-(Be._lBreaks||0))/1e4;for(sr=0;sr<Be.ticktext.length&&!(Math.abs(Fe-Dt(Be.tickvals[sr]))<lr);sr++);if(sr<Be.ticktext.length)return Ut.text=String(Be.ticktext[sr]),Ut.xbnd=[fr(Ut.x-.5),fr(Ut.x+Be.dtick-.5)],Ut}function Or(sn){if(sn===void 0)return!0;if(Rt)return sn==="none";var Jr={first:Be._tmin,last:Be._tmax}[sn];return sn!=="all"&&Fe!==Jr}var Sr=Rt?"never":Be.exponentformat!=="none"&&Or(Be.showexponent)?"hide":"";if(Kt==="date"?xt(Be,Ut,Rt,rr):Kt==="log"?Je(Be,Ut,Rt,rr,Sr):Kt==="category"?Pe(Be,Ut):Kt==="multicategory"?Ue(Be,Ut,Rt):_t(Be)?Oe(Be,Ut,Rt,rr,Sr):He(Be,Ut,Rt,rr,Sr),Lt||(Be.tickprefix&&!Or(Be.showtickprefix)&&(Ut.text=Be.tickprefix+Ut.text),Be.ticksuffix&&!Or(Be.showticksuffix)&&(Ut.text+=Be.ticksuffix)),Be.labelalias&&Be.labelalias.hasOwnProperty(Ut.text)){var Ar=Be.labelalias[Ut.text];typeof Ar=="string"&&(Ut.text=Ar)}return(Be.tickson==="boundaries"||Be.showdividers)&&(Ut.xbnd=[fr(Ut.x-.5),fr(Ut.x+Be.dtick-.5)]),Ut},Z.hoverLabelText=function(Be,Fe,Rt){Rt&&(Be=M.extendFlat({},Be,{hoverformat:Rt}));var Lt=M.isArrayOrTypedArray(Fe)?Fe[0]:Fe,Ut=M.isArrayOrTypedArray(Fe)?Fe[1]:void 0;if(Ut!==void 0&&Ut!==Lt)return Z.hoverLabelText(Be,Lt,Rt)+" - "+Z.hoverLabelText(Be,Ut,Rt);var Qt=Be.type==="log"&&Lt<=0,rr=Z.tickText(Be,Be.c2l(Qt?-Lt:Lt),"hover").text;return Qt?Lt===0?"0":x+rr:rr};function vt(Be,Fe,Rt){var Lt=Be.tickfont||{};return{x:Fe,dx:0,dy:0,text:Rt||"",fontSize:Lt.size,font:Lt.family,fontColor:Lt.color}}function xt(Be,Fe,Rt,Lt){var Ut=Be._tickround,Qt=Rt&&Be.hoverformat||Z.getTickFormat(Be);Lt=!Qt&&Lt,Lt&&(P(Ut)?Ut=4:Ut={y:"m",m:"d",d:"M",M:"S",S:4}[Ut]);var rr=M.formatDate(Fe.x,Qt,Ut,Be._dateFormat,Be.calendar,Be._extraFormat),Kt,Dt=rr.indexOf(`
`);if(Dt!==-1&&(Kt=rr.substr(Dt+1),rr=rr.substr(0,Dt)),Lt&&(Kt!==void 0&&(rr==="00:00:00"||rr==="00:00")?(rr=Kt,Kt=""):rr.length===8&&(rr=rr.replace(/:00$/,""))),Kt)if(Rt)Ut==="d"?rr+=", "+Kt:rr=Kt+(rr?", "+rr:"");else if(!Be._inCalcTicks||Be._prevDateHead!==Kt)Be._prevDateHead=Kt,rr+="<br>"+Kt;else{var sr=Gt(Be),fr=Be._trueSide||Be.side;(!sr&&fr==="top"||sr&&fr==="bottom")&&(rr+="<br> ")}Fe.text=rr}function Je(Be,Fe,Rt,Lt,Ut){var Qt=Be.dtick,rr=Fe.x,Kt=Be.tickformat,Dt=typeof Qt=="string"&&Qt.charAt(0);if(Ut==="never"&&(Ut=""),Lt&&Dt!=="L"&&(Qt="L3",Dt="L"),Kt||Dt==="L")Fe.text=be(Math.pow(10,rr),Be,Ut,Lt);else if(P(Qt)||Dt==="D"&&M.mod(rr+.01,1)<.1){var sr=Math.round(rr),fr=Math.abs(sr),vr=Be.exponentformat;vr==="power"||pe(vr)&&Te(sr)?(sr===0?Fe.text=1:sr===1?Fe.text="10":Fe.text="10<sup>"+(sr>1?"":x)+fr+"</sup>",Fe.fontSize*=1.25):(vr==="e"||vr==="E")&&fr>2?Fe.text="1"+vr+(sr>0?"+":x)+fr:(Fe.text=be(Math.pow(10,rr),Be,"","fakehover"),Qt==="D1"&&Be._id.charAt(0)==="y"&&(Fe.dy-=Fe.fontSize/6))}else if(Dt==="D")Fe.text=String(Math.round(Math.pow(10,M.mod(rr,1)))),Fe.fontSize*=.75;else throw"unrecognized dtick "+String(Qt);if(Be.dtick==="D1"){var lr=String(Fe.text).charAt(0);(lr==="0"||lr==="1")&&(Be._id.charAt(0)==="y"?Fe.dx-=Fe.fontSize/4:(Fe.dy+=Fe.fontSize/2,Fe.dx+=(Be.range[1]>Be.range[0]?1:-1)*Fe.fontSize*(rr<0?.5:.25)))}}function Pe(Be,Fe){var Rt=Be._categories[Math.round(Fe.x)];Rt===void 0&&(Rt=""),Fe.text=String(Rt)}function Ue(Be,Fe,Rt){var Lt=Math.round(Fe.x),Ut=Be._categories[Lt]||[],Qt=Ut[1]===void 0?"":String(Ut[1]),rr=Ut[0]===void 0?"":String(Ut[0]);Rt?Fe.text=rr+" - "+Qt:(Fe.text=Qt,Fe.text2=rr)}function He(Be,Fe,Rt,Lt,Ut){Ut==="never"?Ut="":Be.showexponent==="all"&&Math.abs(Fe.x/Be.dtick)<1e-6&&(Ut="hide"),Fe.text=be(Fe.x,Be,Ut,Lt)}function Oe(Be,Fe,Rt,Lt,Ut){if(Be.thetaunit==="radians"&&!Rt){var Qt=Fe.x/180;if(Qt===0)Fe.text="0";else{var rr=Ce(Qt);if(rr[1]>=100)Fe.text=be(M.deg2rad(Fe.x),Be,Ut,Lt);else{var Kt=Fe.x<0;rr[1]===1?rr[0]===1?Fe.text="π":Fe.text=rr[0]+"π":Fe.text=["<sup>",rr[0],"</sup>","","<sub>",rr[1],"</sub>","π"].join(""),Kt&&(Fe.text=x+Fe.text)}}}else Fe.text=be(Fe.x,Be,Ut,Lt)}function Ce(Be){function Fe(Kt,Dt){return Math.abs(Kt-Dt)<=1e-6}function Rt(Kt,Dt){return Fe(Dt,0)?Kt:Rt(Dt,Kt%Dt)}function Lt(Kt){for(var Dt=1;!Fe(Math.round(Kt*Dt)/Dt,Kt);)Dt*=10;return Dt}var Ut=Lt(Be),Qt=Be*Ut,rr=Math.abs(Rt(Qt,Ut));return[Math.round(Qt/rr),Math.round(Ut/rr)]}var ge=["f","p","n","μ","m","","k","M","G","T"];function pe(Be){return Be==="SI"||Be==="B"}function Te(Be){return Be>14||Be<-15}function be(Be,Fe,Rt,Lt){var Ut=Be<0,Qt=Fe._tickround,rr=Rt||Fe.exponentformat||"B",Kt=Fe._tickexponent,Dt=Z.getTickFormat(Fe),sr=Fe.separatethousands;if(Lt){var fr={exponentformat:rr,minexponent:Fe.minexponent,dtick:Fe.showexponent==="none"?Fe.dtick:P(Be)&&Math.abs(Be)||1,range:Fe.showexponent==="none"?Fe.range.map(Fe.r2d):[0,Be||1]};lt(fr),Qt=(Number(fr._tickround)||0)+4,Kt=fr._tickexponent,Fe.hoverformat&&(Dt=Fe.hoverformat)}if(Dt)return Fe._numFormat(Dt)(Be).replace(/-/g,x);var vr=Math.pow(10,-Qt)/2;if(rr==="none"&&(Kt=0),Be=Math.abs(Be),Be<vr)Be="0",Ut=!1;else{if(Be+=vr,Kt&&(Be*=Math.pow(10,-Kt),Qt+=Kt),Qt===0)Be=String(Math.floor(Be));else if(Qt<0){Be=String(Math.round(Be)),Be=Be.substr(0,Be.length+Qt);for(var lr=Qt;lr<0;lr++)Be+="0"}else{Be=String(Be);var Or=Be.indexOf(".")+1;Or&&(Be=Be.substr(0,Or+Qt).replace(/\.?0+$/,""))}Be=M.numSeparate(Be,Fe._separators,sr)}if(Kt&&rr!=="hide"){pe(rr)&&Te(Kt)&&(rr="power");var Sr;Kt<0?Sr=x+-Kt:rr!=="power"?Sr="+"+Kt:Sr=String(Kt),rr==="e"||rr==="E"?Be+=rr+Sr:rr==="power"?Be+="×10<sup>"+Sr+"</sup>":rr==="B"&&Kt===9?Be+="B":pe(rr)&&(Be+=ge[Kt/3+5])}return Ut?x+Be:Be}Z.getTickFormat=function(Be){var Fe;function Rt(Dt){return typeof Dt!="string"?Dt:Number(Dt.replace("M",""))*m}function Lt(Dt,sr){var fr=["L","D"];if(typeof Dt==typeof sr){if(typeof Dt=="number")return Dt-sr;var vr=fr.indexOf(Dt.charAt(0)),lr=fr.indexOf(sr.charAt(0));return vr===lr?Number(Dt.replace(/(L|D)/g,""))-Number(sr.replace(/(L|D)/g,"")):vr-lr}else return typeof Dt=="number"?1:-1}function Ut(Dt,sr,fr){var vr=fr,lr=sr[0],Or=sr[1];return(!lr&&typeof lr!="number"||vr(lr)<=vr(Dt))&&(!Or&&typeof Or!="number"||vr(Or)>=vr(Dt))}function Qt(Dt,sr){var fr=sr[0]===null,vr=sr[1]===null,lr=Lt(Dt,sr[0])>=0,Or=Lt(Dt,sr[1])<=0;return(fr||lr)&&(vr||Or)}var rr,Kt;if(Be.tickformatstops&&Be.tickformatstops.length>0)switch(Be.type){case"date":case"linear":{for(Fe=0;Fe<Be.tickformatstops.length;Fe++)if(Kt=Be.tickformatstops[Fe],Kt.enabled&&Ut(Be.dtick,Kt.dtickrange,Rt)){rr=Kt;break}break}case"log":{for(Fe=0;Fe<Be.tickformatstops.length;Fe++)if(Kt=Be.tickformatstops[Fe],Kt.enabled&&Qt(Be.dtick,Kt.dtickrange)){rr=Kt;break}break}}return rr?rr.value:Be.tickformat},Z.getSubplots=function(Be,Fe){var Rt=Be._fullLayout._subplots,Lt=Rt.cartesian.concat(Rt.gl2d||[]),Ut=Fe?Z.findSubplotsWithAxis(Lt,Fe):Lt;return Ut.sort(function(Qt,rr){var Kt=Qt.substr(1).split("y"),Dt=rr.substr(1).split("y");return Kt[0]===Dt[0]?+Kt[1]-+Dt[1]:+Kt[0]-+Dt[0]}),Ut},Z.findSubplotsWithAxis=function(Be,Fe){for(var Rt=new RegExp(Fe._id.charAt(0)==="x"?"^"+Fe._id+"y":Fe._id+"$"),Lt=[],Ut=0;Ut<Be.length;Ut++){var Qt=Be[Ut];Rt.test(Qt)&&Lt.push(Qt)}return Lt},Z.makeClipPaths=function(Be){var Fe=Be._fullLayout;if(!Fe._hasOnlyLargeSploms){var Rt={_offset:0,_length:Fe.width,_id:""},Lt={_offset:0,_length:Fe.height,_id:""},Ut=Z.list(Be,"x",!0),Qt=Z.list(Be,"y",!0),rr=[],Kt,Dt;for(Kt=0;Kt<Ut.length;Kt++)for(rr.push({x:Ut[Kt],y:Lt}),Dt=0;Dt<Qt.length;Dt++)Kt===0&&rr.push({x:Rt,y:Qt[Dt]}),rr.push({x:Ut[Kt],y:Qt[Dt]});var sr=Fe._clips.selectAll(".axesclip").data(rr,function(fr){return fr.x._id+fr.y._id});sr.enter().append("clipPath").classed("axesclip",!0).attr("id",function(fr){return"clip"+Fe._uid+fr.x._id+fr.y._id}).append("rect"),sr.exit().remove(),sr.each(function(fr){A.select(this).select("rect").attr({x:fr.x._offset||0,y:fr.y._offset||0,width:fr.x._length||1,height:fr.y._length||1})})}},Z.draw=function(Be,Fe,Rt){var Lt=Be._fullLayout;Fe==="redraw"&&Lt._paper.selectAll("g.subplot").each(function(Dt){var sr=Dt[0],fr=Lt._plots[sr];if(fr){var vr=fr.xaxis,lr=fr.yaxis;fr.xaxislayer.selectAll("."+vr._id+"tick").remove(),fr.yaxislayer.selectAll("."+lr._id+"tick").remove(),fr.xaxislayer.selectAll("."+vr._id+"tick2").remove(),fr.yaxislayer.selectAll("."+lr._id+"tick2").remove(),fr.xaxislayer.selectAll("."+vr._id+"divider").remove(),fr.yaxislayer.selectAll("."+lr._id+"divider").remove(),fr.minorGridlayer&&fr.minorGridlayer.selectAll("path").remove(),fr.gridlayer&&fr.gridlayer.selectAll("path").remove(),fr.zerolinelayer&&fr.zerolinelayer.selectAll("path").remove(),Lt._infolayer.select(".g-"+vr._id+"title").remove(),Lt._infolayer.select(".g-"+lr._id+"title").remove()}});var Ut=!Fe||Fe==="redraw"?Z.listIds(Be):Fe,Qt=Z.list(Be),rr=Qt.filter(function(Dt){return Dt.autoshift}).map(function(Dt){return Dt.overlaying});Ut.map(function(Dt){var sr=Z.getFromId(Be,Dt);if(sr.tickmode==="sync"&&sr.overlaying){var fr=Ut.findIndex(function(vr){return vr===sr.overlaying});fr>=0&&Ut.unshift(Ut.splice(fr,1).shift())}});var Kt={false:{left:0,right:0}};return M.syncOrAsync(Ut.map(function(Dt){return function(){if(Dt){var sr=Z.getFromId(Be,Dt);Rt||(Rt={}),Rt.axShifts=Kt,Rt.overlayingShiftedAx=rr;var fr=Z.drawOne(Be,sr,Rt);return sr._shiftPusher&&ar(sr,sr._fullDepth||0,Kt,!0),sr._r=sr.range.slice(),sr._rl=M.simpleMap(sr._r,sr.r2l),fr}}}))},Z.drawOne=function(Be,Fe,Rt){Rt=Rt||{};var Lt=Rt.axShifts||{},Ut=Rt.overlayingShiftedAx||[],Qt,rr,Kt;Fe.setScale();var Dt=Be._fullLayout,sr=Fe._id,fr=sr.charAt(0),vr=Z.counterLetter(sr),lr=Dt._plots[Fe._mainSubplot];if(!lr)return;if(Fe._shiftPusher=Fe.autoshift||Ut.indexOf(Fe._id)!==-1||Ut.indexOf(Fe.overlaying)!==-1,Fe._shiftPusher&Fe.anchor==="free"){var Or=Fe.linewidth/2||0;Fe.ticks==="inside"&&(Or+=Fe.ticklen),ar(Fe,Or,Lt,!0),ar(Fe,Fe.shift||0,Lt,!1)}(Rt.skipTitle!==!0||Fe._shift===void 0)&&(Fe._shift=ir(Fe,Lt));var Sr=lr[fr+"axislayer"],Ar=Fe._mainLinePosition,sn=Ar+=Fe._shift,Jr=Fe._mainMirrorPosition,bn=Fe._vals=Z.calcTicks(Fe),xn=[Fe.mirror,sn,Jr].join("_");for(Qt=0;Qt<bn.length;Qt++)bn[Qt].axInfo=xn;Fe._selections={},Fe._tickAngles&&(Fe._prevTickAngles=Fe._tickAngles),Fe._tickAngles={},Fe._depth=null;var or={};function Lr(zr){var Yr=sr+(zr||"tick");return or[Yr]||(or[Yr]=ut(Fe,Yr,sn)),or[Yr]}if(Fe.visible){var Br=Z.makeTransTickFn(Fe),_r=Z.makeTransTickLabelFn(Fe),Qr,un,ln=Fe.ticks==="inside",Mn=Fe.ticks==="outside";if(Fe.tickson==="boundaries"){var Dn=Ve(Fe,bn);un=Z.clipEnds(Fe,Dn),Qr=ln?un:Dn}else un=Z.clipEnds(Fe,bn),Qr=ln&&Fe.ticklabelmode!=="period"?un:bn;var Kn=Fe._gridVals=un,sa=at(Fe,bn);if(!Dt._hasOnlyLargeSploms){var na=Fe._subplotsWith,Jn={};for(Qt=0;Qt<na.length;Qt++){rr=na[Qt],Kt=Dt._plots[rr];var aa=Kt[vr+"axis"],pr=aa._mainAxis._id;if(!Jn[pr]){Jn[pr]=1;var $r=fr==="x"?"M0,"+aa._offset+"v"+aa._length:"M"+aa._offset+",0h"+aa._length;Z.drawGrid(Be,Fe,{vals:Kn,counterAxis:aa,layer:Kt.gridlayer.select("."+sr),minorLayer:Kt.minorGridlayer.select("."+sr),path:$r,transFn:Br}),Z.drawZeroLine(Be,Fe,{counterAxis:aa,layer:Kt.zerolinelayer,path:$r,transFn:Br})}}}var Xr,fn=Z.getTickSigns(Fe),zn=Z.getTickSigns(Fe,"minor");if(Fe.ticks||Fe.minor&&Fe.minor.ticks){var pn=Z.makeTickPath(Fe,sn,fn[2]),gn=Z.makeTickPath(Fe,sn,zn[2],{minor:!0}),In,Gn,ua,Ma;if(Fe._anchorAxis&&Fe.mirror&&Fe.mirror!==!0?(In=Z.makeTickPath(Fe,Jr,fn[3]),Gn=Z.makeTickPath(Fe,Jr,zn[3],{minor:!0}),ua=pn+In,Ma=gn+Gn):(In="",Gn="",ua=pn,Ma=gn),Fe.showdividers&&Mn&&Fe.tickson==="boundaries"){var xr={};for(Qt=0;Qt<sa.length;Qt++)xr[sa[Qt].x]=1;Xr=function(zr){return xr[zr.x]?In:ua}}else Xr=function(zr){return zr.minor?Ma:ua}}if(Z.drawTicks(Be,Fe,{vals:Qr,layer:Sr,path:Xr,transFn:Br}),Fe.mirror==="allticks"){var Rr=Object.keys(Fe._linepositions||{});for(Qt=0;Qt<Rr.length;Qt++){rr=Rr[Qt],Kt=Dt._plots[rr];var yr=Fe._linepositions[rr]||[],Dr=yr[0],vn=yr[1],En=yr[2],an=Z.makeTickPath(Fe,Dr,En?fn[0]:zn[0],{minor:En})+Z.makeTickPath(Fe,vn,En?fn[1]:zn[1],{minor:En});Z.drawTicks(Be,Fe,{vals:Qr,layer:Kt[fr+"axislayer"],path:an,transFn:Br})}}var en=[];if(en.push(function(){return Z.drawLabels(Be,Fe,{vals:bn,layer:Sr,plotinfo:Kt,transFn:_r,labelFns:Z.makeLabelFns(Fe,sn)})}),Fe.type==="multicategory"){var br={x:2,y:10}[fr];en.push(function(){var zr={x:"height",y:"width"}[fr],Yr=Lr()[zr]+br+(Fe._tickAngles[sr+"tick"]?Fe.tickfont.size*$:0);return Z.drawLabels(Be,Fe,{vals:je(Fe,bn),layer:Sr,cls:sr+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:Br,labelFns:Z.makeLabelFns(Fe,sn+Yr*fn[4])})}),en.push(function(){return Fe._depth=fn[4]*(Lr("tick2")[Fe.side]-sn),Ct(Be,Fe,{vals:sa,layer:Sr,path:Z.makeTickPath(Fe,sn,fn[4],{len:Fe._depth}),transFn:Br})})}else Fe.title.hasOwnProperty("standoff")&&en.push(function(){Fe._depth=fn[4]*(Lr()[Fe.side]-sn)});var Vr=L.getComponentMethod("rangeslider","isVisible")(Fe);return!Rt.skipTitle&&!(Vr&&Fe.side==="bottom")&&en.push(function(){return gr(Be,Fe)}),en.push(function(){var zr=Fe.side.charAt(0),Yr=q[Fe.side].charAt(0),dn=Z.getPxPosition(Be,Fe),wn=Mn?Fe.ticklen:0,Tn,kn,Pn,fa;(Fe.automargin||Vr||Fe._shiftPusher)&&(Fe.type==="multicategory"?Tn=Lr("tick2"):(Tn=Lr(),fr==="x"&&zr==="b"&&(Fe._depth=Math.max(Tn.width>0?Tn.bottom-dn:0,wn))));var $n=0,la=0;if(Fe._shiftPusher&&($n=Math.max(wn,Tn.height>0?zr==="l"?dn-Tn.left:Tn.right-dn:0),Fe.title.text!==Dt._dfltTitle[fr]&&(la=(Fe._titleStandoff||0)+(Fe._titleScoot||0),zr==="l"&&(la+=Yt(Fe))),Fe._fullDepth=Math.max($n,la)),Fe.automargin){kn={x:0,y:0,r:0,l:0,t:0,b:0};var ba=[0,1],ni=typeof Fe._shift=="number"?Fe._shift:0;if(fr==="x"){if(zr==="b"?kn[zr]=Fe._depth:(kn[zr]=Fe._depth=Math.max(Tn.width>0?dn-Tn.top:0,wn),ba.reverse()),Tn.width>0){var Xa=Tn.right-(Fe._offset+Fe._length);Xa>0&&(kn.xr=1,kn.r=Xa);var uo=Fe._offset-Tn.left;uo>0&&(kn.xl=0,kn.l=uo)}}else if(zr==="l"?(Fe._depth=Math.max(Tn.height>0?dn-Tn.left:0,wn),kn[zr]=Fe._depth-ni):(Fe._depth=Math.max(Tn.height>0?Tn.right-dn:0,wn),kn[zr]=Fe._depth+ni,ba.reverse()),Tn.height>0){var ao=Tn.bottom-(Fe._offset+Fe._length);ao>0&&(kn.yb=0,kn.b=ao);var Oi=Fe._offset-Tn.top;Oi>0&&(kn.yt=1,kn.t=Oi)}kn[vr]=Fe.anchor==="free"?Fe.position:Fe._anchorAxis.domain[ba[0]],Fe.title.text!==Dt._dfltTitle[fr]&&(kn[zr]+=Yt(Fe)+(Fe.title.standoff||0)),Fe.mirror&&Fe.anchor!=="free"&&(Pn={x:0,y:0,r:0,l:0,t:0,b:0},Pn[Yr]=Fe.linewidth,Fe.mirror&&Fe.mirror!==!0&&(Pn[Yr]+=wn),Fe.mirror===!0||Fe.mirror==="ticks"?Pn[vr]=Fe._anchorAxis.domain[ba[1]]:(Fe.mirror==="all"||Fe.mirror==="allticks")&&(Pn[vr]=[Fe._counterDomainMin,Fe._counterDomainMax][ba[1]]))}Vr&&(fa=L.getComponentMethod("rangeslider","autoMarginOpts")(Be,Fe)),typeof Fe.automargin=="string"&&(ke(kn,Fe.automargin),ke(Pn,Fe.automargin)),o.autoMargin(Be,er(Fe),kn),o.autoMargin(Be,ct(Fe),Pn),o.autoMargin(Be,qe(Fe),fa)}),M.syncOrAsync(en)}};function ke(Be,Fe){if(Be){var Rt=Object.keys(F).reduce(function(Lt,Ut){return Fe.indexOf(Ut)!==-1&&F[Ut].forEach(function(Qt){Lt[Qt]=1}),Lt},{});Object.keys(Be).forEach(function(Lt){Rt[Lt]||(Lt.length===1?Be[Lt]=0:delete Be[Lt])})}}function Ve(Be,Fe){var Rt=[],Lt,Ut=function(Qt,rr){var Kt=Qt.xbnd[rr];Kt!==null&&Rt.push(M.extendFlat({},Qt,{x:Kt}))};if(Fe.length){for(Lt=0;Lt<Fe.length;Lt++)Ut(Fe[Lt],0);Ut(Fe[Lt-1],1)}return Rt}function je(Be,Fe){for(var Rt=[],Lt={},Ut=0;Ut<Fe.length;Ut++){var Qt=Fe[Ut];Lt[Qt.text2]?Lt[Qt.text2].push(Qt.x):Lt[Qt.text2]=[Qt.x]}for(var rr in Lt)Rt.push(vt(Be,M.interp(Lt[rr],.5),rr));return Rt}function at(Be,Fe){var Rt=[],Lt,Ut,Qt=Fe.length&&Fe[Fe.length-1].x<Fe[0].x,rr=function(Dt,sr){var fr=Dt.xbnd[sr];fr!==null&&Rt.push(M.extendFlat({},Dt,{x:fr}))};if(Be.showdividers&&Fe.length){for(Lt=0;Lt<Fe.length;Lt++){var Kt=Fe[Lt];Kt.text2!==Ut&&rr(Kt,Qt?1:0),Ut=Kt.text2}rr(Fe[Lt-1],Qt?0:1)}return Rt}function ut(Be,Fe,Rt){var Lt,Ut,Qt,rr;if(Be._selections[Fe].size())Lt=1/0,Ut=-1/0,Qt=1/0,rr=-1/0,Be._selections[Fe].each(function(){var Dt=cr(this),sr=s.bBox(Dt.node().parentNode);Lt=Math.min(Lt,sr.top),Ut=Math.max(Ut,sr.bottom),Qt=Math.min(Qt,sr.left),rr=Math.max(rr,sr.right)});else{var Kt=Z.makeLabelFns(Be,Rt);Lt=Ut=Kt.yFn({dx:0,dy:0,fontSize:0}),Qt=rr=Kt.xFn({dx:0,dy:0,fontSize:0})}return{top:Lt,bottom:Ut,left:Qt,right:rr,height:Ut-Lt,width:rr-Qt}}Z.getTickSigns=function(Be,Fe){var Rt=Be._id.charAt(0),Lt={x:"top",y:"right"}[Rt],Ut=Be.side===Lt?1:-1,Qt=[-1,1,Ut,-Ut],rr=Fe?(Be.minor||{}).ticks:Be.ticks;return rr!=="inside"==(Rt==="x")&&(Qt=Qt.map(function(Kt){return-Kt})),Be.side&&Qt.push({l:-1,t:-1,r:1,b:1}[Be.side.charAt(0)]),Qt},Z.makeTransTickFn=function(Be){return Be._id.charAt(0)==="x"?function(Fe){return d(Be._offset+Be.l2p(Fe.x),0)}:function(Fe){return d(0,Be._offset+Be.l2p(Fe.x))}},Z.makeTransTickLabelFn=function(Be){var Fe=Vt(Be),Rt=Fe[0],Lt=Fe[1];return Be._id.charAt(0)==="x"?function(Ut){return d(Rt+Be._offset+Be.l2p(Nt(Ut)),Lt)}:function(Ut){return d(Lt,Rt+Be._offset+Be.l2p(Nt(Ut)))}};function Nt(Be){return Be.periodX!==void 0?Be.periodX:Be.x}function Vt(Be){var Fe=Be.ticklabelposition||"",Rt=function(Or){return Fe.indexOf(Or)!==-1},Lt=Rt("top"),Ut=Rt("left"),Qt=Rt("right"),rr=Rt("bottom"),Kt=Rt("inside"),Dt=rr||Ut||Lt||Qt;if(!Dt&&!Kt)return[0,0];var sr=Be.side,fr=Dt?(Be.tickwidth||0)/2:0,vr=oe,lr=Be.tickfont?Be.tickfont.size:12;return(rr||Lt)&&(fr+=lr*j,vr+=(Be.linewidth||0)/2),(Ut||Qt)&&(fr+=(Be.linewidth||0)/2,vr+=oe),Kt&&sr==="top"&&(vr-=lr*(1-j)),(Ut||Lt)&&(fr=-fr),(sr==="bottom"||sr==="right")&&(vr=-vr),[Dt?fr:0,Kt?vr:0]}Z.makeTickPath=function(Be,Fe,Rt,Lt){Lt||(Lt={});var Ut=Lt.minor;if(Ut&&!Be.minor)return"";var Qt=Lt.len!==void 0?Lt.len:Ut?Be.minor.ticklen:Be.ticklen,rr=Be._id.charAt(0),Kt=(Be.linewidth||1)/2;return rr==="x"?"M0,"+(Fe+Kt*Rt)+"v"+Qt*Rt:"M"+(Fe+Kt*Rt)+",0h"+Qt*Rt},Z.makeLabelFns=function(Be,Fe,Rt){var Lt=Be.ticklabelposition||"",Ut=function(Dn){return Lt.indexOf(Dn)!==-1},Qt=Ut("top"),rr=Ut("left"),Kt=Ut("right"),Dt=Ut("bottom"),sr=Dt||rr||Qt||Kt,fr=Ut("inside"),vr=Lt==="inside"&&Be.ticks==="inside"||!fr&&Be.ticks==="outside"&&Be.tickson!=="boundaries",lr=0,Or=0,Sr=vr?Be.ticklen:0;if(fr?Sr*=-1:sr&&(Sr=0),vr&&(lr+=Sr,Rt)){var Ar=M.deg2rad(Rt);lr=Sr*Math.cos(Ar)+1,Or=Sr*Math.sin(Ar)}Be.showticklabels&&(vr||Be.showline)&&(lr+=.2*Be.tickfont.size),lr+=(Be.linewidth||1)/2*(fr?-1:1);var sn={labelStandoff:lr,labelShift:Or},Jr,bn,xn,or,Lr=0,Br=Be.side,_r=Be._id.charAt(0),Qr=Be.tickangle,un;if(_r==="x")un=!fr&&Br==="bottom"||fr&&Br==="top",or=un?1:-1,fr&&(or*=-1),Jr=Or*or,bn=Fe+lr*or,xn=un?1:-.2,Math.abs(Qr)===90&&(fr?xn+=V:Qr===-90&&Br==="bottom"?xn=j:Qr===90&&Br==="top"?xn=V:xn=.5,Lr=V/2*(Qr/90)),sn.xFn=function(Dn){return Dn.dx+Jr+Lr*Dn.fontSize},sn.yFn=function(Dn){return Dn.dy+bn+Dn.fontSize*xn},sn.anchorFn=function(Dn,Kn){if(sr){if(rr)return"end";if(Kt)return"start"}return!P(Kn)||Kn===0||Kn===180?"middle":Kn*or<0!==fr?"end":"start"},sn.heightFn=function(Dn,Kn,sa){return Kn<-60||Kn>60?-.5*sa:Be.side==="top"!==fr?-sa:0};else if(_r==="y"){if(un=!fr&&Br==="left"||fr&&Br==="right",or=un?1:-1,fr&&(or*=-1),Jr=lr,bn=Or*or,xn=0,!fr&&Math.abs(Qr)===90&&(Qr===-90&&Br==="left"||Qr===90&&Br==="right"?xn=j:xn=.5),fr){var ln=P(Qr)?+Qr:0;if(ln!==0){var Mn=M.deg2rad(ln);Lr=Math.abs(Math.sin(Mn))*j*or,xn=0}}sn.xFn=function(Dn){return Dn.dx+Fe-(Jr+Dn.fontSize*xn)*or+Lr*Dn.fontSize},sn.yFn=function(Dn){return Dn.dy+bn+Dn.fontSize*V},sn.anchorFn=function(Dn,Kn){return P(Kn)&&Math.abs(Kn)===90?"middle":un?"end":"start"},sn.heightFn=function(Dn,Kn,sa){return Be.side==="right"&&(Kn*=-1),Kn<-30?-sa:Kn<30?-.5*sa:0}}return sn};function gt(Be){return[Be.text,Be.x,Be.axInfo,Be.font,Be.fontSize,Be.fontColor].join("_")}Z.drawTicks=function(Be,Fe,Rt){Rt=Rt||{};var Lt=Fe._id+"tick",Ut=[].concat(Fe.minor&&Fe.minor.ticks?Rt.vals.filter(function(rr){return rr.minor&&!rr.noTick}):[]).concat(Fe.ticks?Rt.vals.filter(function(rr){return!rr.minor&&!rr.noTick}):[]),Qt=Rt.layer.selectAll("path."+Lt).data(Ut,gt);Qt.exit().remove(),Qt.enter().append("path").classed(Lt,1).classed("ticks",1).classed("crisp",Rt.crisp!==!1).each(function(rr){return t.stroke(A.select(this),rr.minor?Fe.minor.tickcolor:Fe.tickcolor)}).style("stroke-width",function(rr){return s.crispRound(Be,rr.minor?Fe.minor.tickwidth:Fe.tickwidth,1)+"px"}).attr("d",Rt.path).style("display",null),nr(Fe,[z]),Qt.attr("transform",Rt.transFn)},Z.drawGrid=function(Be,Fe,Rt){if(Rt=Rt||{},Fe.tickmode!=="sync"){var Lt=Fe._id+"grid",Ut=Fe.minor&&Fe.minor.showgrid,Qt=Ut?Rt.vals.filter(function(Jr){return Jr.minor}):[],rr=Fe.showgrid?Rt.vals.filter(function(Jr){return!Jr.minor}):[],Kt=Rt.counterAxis;if(Kt&&Z.shouldShowZeroLine(Be,Fe,Kt))for(var Dt=Fe.tickmode==="array",sr=0;sr<rr.length;sr++){var fr=rr[sr].x;if(Dt?!fr:Math.abs(fr)<Fe.dtick/100)if(rr=rr.slice(0,sr).concat(rr.slice(sr+1)),Dt)sr--;else break}Fe._gw=s.crispRound(Be,Fe.gridwidth,1);for(var vr=Ut?s.crispRound(Be,Fe.minor.gridwidth,1):0,lr=Rt.layer,Or=Rt.minorLayer,Sr=1;Sr>=0;Sr--){var Ar=Sr?lr:Or;if(Ar){var sn=Ar.selectAll("path."+Lt).data(Sr?rr:Qt,gt);sn.exit().remove(),sn.enter().append("path").classed(Lt,1).classed("crisp",Rt.crisp!==!1),sn.attr("transform",Rt.transFn).attr("d",Rt.path).each(function(Jr){return t.stroke(A.select(this),Jr.minor?Fe.minor.gridcolor:Fe.gridcolor||"#ddd")}).style("stroke-dasharray",function(Jr){return s.dashStyle(Jr.minor?Fe.minor.griddash:Fe.griddash,Jr.minor?Fe.minor.gridwidth:Fe.gridwidth)}).style("stroke-width",function(Jr){return(Jr.minor?vr:Fe._gw)+"px"}).style("display",null),typeof Rt.path=="function"&&sn.attr("d",Rt.path)}}nr(Fe,[B,_])}},Z.drawZeroLine=function(Be,Fe,Rt){Rt=Rt||Rt;var Lt=Fe._id+"zl",Ut=Z.shouldShowZeroLine(Be,Fe,Rt.counterAxis),Qt=Rt.layer.selectAll("path."+Lt).data(Ut?[{x:0,id:Fe._id}]:[]);Qt.exit().remove(),Qt.enter().append("path").classed(Lt,1).classed("zl",1).classed("crisp",Rt.crisp!==!1).each(function(){Rt.layer.selectAll("path").sort(function(rr,Kt){return H(rr.id,Kt.id)})}),Qt.attr("transform",Rt.transFn).attr("d",Rt.path).call(t.stroke,Fe.zerolinecolor||t.defaultLine).style("stroke-width",s.crispRound(Be,Fe.zerolinewidth,Fe._gw||1)+"px").style("display",null),nr(Fe,[I])},Z.drawLabels=function(Be,Fe,Rt){Rt=Rt||{};var Lt=Be._fullLayout,Ut=Fe._id,Qt=Rt.cls||Ut+"tick",rr=Rt.vals.filter(function(pr){return pr.text}),Kt=Rt.labelFns,Dt=Rt.secondary?0:Fe.tickangle,sr=(Fe._prevTickAngles||{})[Qt],fr=Rt.layer.selectAll("g."+Qt).data(Fe.showticklabels?rr:[],gt),vr=[];fr.enter().append("g").classed(Qt,1).append("text").attr("text-anchor","middle").each(function(pr){var $r=A.select(this),Xr=Be._promises.length;$r.call(g.positionText,Kt.xFn(pr),Kt.yFn(pr)).call(s.font,pr.font,pr.fontSize,pr.fontColor).text(pr.text).call(g.convertToTspans,Be),Be._promises[Xr]?vr.push(Be._promises.pop().then(function(){lr($r,Dt)})):lr($r,Dt)}),nr(Fe,[O]),fr.exit().remove(),Rt.repositionOnUpdate&&fr.each(function(pr){A.select(this).select("text").call(g.positionText,Kt.xFn(pr),Kt.yFn(pr))});function lr(pr,$r){pr.each(function(Xr){var fn=A.select(this),zn=fn.select(".text-math-group"),pn=Kt.anchorFn(Xr,$r),gn=Rt.transFn.call(fn.node(),Xr)+(P($r)&&+$r!=0?" rotate("+$r+","+Kt.xFn(Xr)+","+(Kt.yFn(Xr)-Xr.fontSize/2)+")":""),In=g.lineCount(fn),Gn=$*Xr.fontSize,ua=Kt.heightFn(Xr,P($r)?+$r:0,(In-1)*Gn);if(ua&&(gn+=d(0,ua)),zn.empty()){var Ma=fn.select("text");Ma.attr({transform:gn,"text-anchor":pn}),Ma.style("opacity",1),Fe._adjustTickLabelsOverflow&&Fe._adjustTickLabelsOverflow()}else{var xr=s.bBox(zn.node()).width,Rr=xr*{end:-.5,start:.5}[pn];zn.attr("transform",gn+d(Rr,0))}})}Fe._adjustTickLabelsOverflow=function(){var pr=Fe.ticklabeloverflow;if(!(!pr||pr==="allow")){var $r=pr.indexOf("hide")!==-1,Xr=Fe._id.charAt(0)==="x",fn=0,zn=Xr?Be._fullLayout.width:Be._fullLayout.height;if(pr.indexOf("domain")!==-1){var pn=M.simpleMap(Fe.range,Fe.r2l);fn=Fe.l2p(pn[0])+Fe._offset,zn=Fe.l2p(pn[1])+Fe._offset}var gn=Math.min(fn,zn),In=Math.max(fn,zn),Gn=Fe.side,ua=1/0,Ma=-1/0;fr.each(function(Dr){var vn=A.select(this),En=vn.select(".text-math-group");if(En.empty()){var an=s.bBox(vn.node()),en=0;Xr?(an.right>In||an.left<gn)&&(en=1):(an.bottom>In||an.top+(Fe.tickangle?0:Dr.fontSize/4)<gn)&&(en=1);var br=vn.select("text");en?$r&&br.style("opacity",0):(br.style("opacity",1),Gn==="bottom"||Gn==="right"?ua=Math.min(ua,Xr?an.top:an.left):ua=-1/0,Gn==="top"||Gn==="left"?Ma=Math.max(Ma,Xr?an.bottom:an.right):Ma=1/0)}});for(var xr in Lt._plots){var Rr=Lt._plots[xr];if(!(Fe._id!==Rr.xaxis._id&&Fe._id!==Rr.yaxis._id)){var yr=Xr?Rr.yaxis:Rr.xaxis;yr&&(yr["_visibleLabelMin_"+Fe._id]=ua,yr["_visibleLabelMax_"+Fe._id]=Ma)}}}},Fe._hideCounterAxisInsideTickLabels=function(pr){var $r=Fe._id.charAt(0)==="x",Xr=[];for(var fn in Lt._plots){var zn=Lt._plots[fn];Fe._id!==zn.xaxis._id&&Fe._id!==zn.yaxis._id||Xr.push($r?zn.yaxis:zn.xaxis)}Xr.forEach(function(pn,gn){pn&&Gt(pn)&&(pr||[I,_,B,z,O]).forEach(function(In){var Gn=In.K==="tick"&&In.L==="text"&&Fe.ticklabelmode==="period",ua=Lt._plots[Fe._mainSubplot],Ma;In.K===I.K?Ma=ua.zerolinelayer.selectAll("."+Fe._id+"zl"):In.K===_.K?Ma=ua.minorGridlayer.selectAll("."+Fe._id):In.K===B.K?Ma=ua.gridlayer.selectAll("."+Fe._id):Ma=ua[Fe._id.charAt(0)+"axislayer"],Ma.each(function(){var xr=A.select(this);In.L&&(xr=xr.selectAll(In.L)),xr.each(function(Rr){var yr=Fe.l2p(Gn?Nt(Rr):Rr.x)+Fe._offset,Dr=A.select(this);yr<Fe["_visibleLabelMax_"+pn._id]&&yr>Fe["_visibleLabelMin_"+pn._id]?Dr.style("display","none"):In.K==="tick"&&!gn&&Dr.style("display",null)})})})})},lr(fr,sr+1?sr:Dt);function Or(){return vr.length&&Promise.all(vr)}var Sr=null;function Ar(){if(lr(fr,Dt),rr.length&&Fe.autotickangles&&(Fe.type!=="log"||String(Fe.dtick).charAt(0)!=="D")){Sr=Fe.autotickangles[0];var pr=0,$r=[],Xr,fn=1;if(fr.each(function(wn){pr=Math.max(pr,wn.fontSize);var Tn=Fe.l2p(wn.x),kn=cr(this),Pn=s.bBox(kn.node());fn=Math.max(fn,g.lineCount(kn)),$r.push({top:0,bottom:10,height:10,left:Tn-Pn.width/2,right:Tn+Pn.width/2+2,width:Pn.width+2})}),(Fe.tickson==="boundaries"||Fe.showdividers)&&!Rt.secondary){var zn=2;for(Fe.ticks&&(zn+=Fe.tickwidth/2),Xr=0;Xr<$r.length;Xr++){var pn=rr[Xr].xbnd,gn=$r[Xr];if(pn[0]!==null&&gn.left-Fe.l2p(pn[0])<zn||pn[1]!==null&&Fe.l2p(pn[1])-gn.right<zn){Sr=90;break}}}else{var In=rr.length,Gn=Math.abs((rr[In-1].x-rr[0].x)*Fe._m)/(In-1),ua=Fe.ticklabelposition||"",Ma=function(wn){return ua.indexOf(wn)!==-1},xr=Ma("top"),Rr=Ma("left"),yr=Ma("right"),Dr=Ma("bottom"),vn=Dr||Rr||xr||yr,En=vn?(Fe.tickwidth||0)+2*oe:0,an=Gn,en=pr*1.25*fn,br=Math.sqrt(Math.pow(an,2)+Math.pow(en,2)),Vr=an/br,zr=Fe.autotickangles.map(function(wn){return wn*Math.PI/180}),Yr=zr.find(function(wn){return Math.abs(Math.cos(wn))<=Vr});Yr===void 0&&(Yr=zr.reduce(function(wn,Tn){return Math.abs(Math.cos(wn))<Math.abs(Math.cos(Tn))?wn:Tn},zr[0]));var dn=Yr*(180/Math.PI);for(Xr=0;Xr<$r.length-1;Xr++)if(M.bBoxIntersect($r[Xr],$r[Xr+1],En)){Sr=dn;break}}Sr&&lr(fr,Sr)}}Fe._selections&&(Fe._selections[Qt]=fr);var sn=[Or];Fe.automargin&&Lt._redrawFromAutoMarginCount&&sr===90?(Sr=sr,sn.push(function(){lr(fr,sr)})):sn.push(Ar),Fe._tickAngles&&sn.push(function(){Fe._tickAngles[Qt]=Sr===null?P(Dt)?Dt:0:Sr});var Jr=function(){var pr=0,$r=0;return fr.each(function(Xr,fn){var zn=cr(this),pn=zn.select(".text-math-group");if(pn.empty()){var gn;Fe._vals[fn]&&(gn=Fe._vals[fn].bb||s.bBox(zn.node()),Fe._vals[fn].bb=gn),pr=Math.max(pr,gn.width),$r=Math.max($r,gn.height)}}),{labelsMaxW:pr,labelsMaxH:$r}},bn=Fe._anchorAxis;if(bn&&(bn.autorange||bn.insiderange)&&Gt(Fe)&&!J(Lt,Fe._id)&&(Lt._insideTickLabelsUpdaterange||(Lt._insideTickLabelsUpdaterange={}),bn.autorange&&(Lt._insideTickLabelsUpdaterange[bn._name+".autorange"]=bn.autorange,sn.push(Jr)),bn.insiderange)){var xn=Jr(),or=Fe._id.charAt(0)==="y"?xn.labelsMaxW:xn.labelsMaxH;or+=2*oe,Fe.ticklabelposition==="inside"&&(or+=Fe.ticklen||0);var Lr=Fe.side==="right"||Fe.side==="top"?1:-1,Br=Lr===1?1:0,_r=Lr===1?0:1,Qr=[];Qr[_r]=bn.range[_r];var un=bn.range,ln=bn.r2p(un[Br]),Mn=bn.r2p(un[_r]),Dn=Lt._insideTickLabelsUpdaterange[bn._name+".range"];if(Dn){var Kn=bn.r2p(Dn[Br]),sa=bn.r2p(Dn[_r]),na=Lr*(Fe._id.charAt(0)==="y"?1:-1);na*ln<na*Kn&&(ln=Kn,Qr[Br]=un[Br]=Dn[Br]),na*Mn>na*sa&&(Mn=sa,Qr[_r]=un[_r]=Dn[_r])}var Jn=Math.abs(Mn-ln);Jn-or>0?(Jn-=or,or*=1+or/Jn):or=0,Fe._id.charAt(0)!=="y"&&(or=-or),Qr[Br]=bn.p2r(bn.r2p(un[Br])+Lr*or),bn.autorange==="min"||bn.autorange==="max reversed"?(Qr[0]=null,bn._rangeInitial0=void 0,bn._rangeInitial1=void 0):(bn.autorange==="max"||bn.autorange==="min reversed")&&(Qr[1]=null,bn._rangeInitial0=void 0,bn._rangeInitial1=void 0),Lt._insideTickLabelsUpdaterange[bn._name+".range"]=Qr}var aa=M.syncOrAsync(sn);return aa&&aa.then&&Be._promises.push(aa),aa};function Ct(Be,Fe,Rt){var Lt=Fe._id+"divider",Ut=Rt.vals,Qt=Rt.layer.selectAll("path."+Lt).data(Ut,gt);Qt.exit().remove(),Qt.enter().insert("path",":first-child").classed(Lt,1).classed("crisp",1).call(t.stroke,Fe.dividercolor).style("stroke-width",s.crispRound(Be,Fe.dividerwidth,1)+"px"),Qt.attr("transform",Rt.transFn).attr("d",Rt.path)}Z.getPxPosition=function(Be,Fe){var Rt=Be._fullLayout._size,Lt=Fe._id.charAt(0),Ut=Fe.side,Qt;if(Fe.anchor!=="free"?Qt=Fe._anchorAxis:Lt==="x"?Qt={_offset:Rt.t+(1-(Fe.position||0))*Rt.h,_length:0}:Lt==="y"&&(Qt={_offset:Rt.l+(Fe.position||0)*Rt.w+Fe._shift,_length:0}),Ut==="top"||Ut==="left")return Qt._offset;if(Ut==="bottom"||Ut==="right")return Qt._offset+Qt._length};function Yt(Be){var Fe=Be.title.font.size,Rt=(Be.title.text.match(g.BR_TAG_ALL)||[]).length;return Be.title.hasOwnProperty("standoff")?Rt?Fe*(j+Rt*$):Fe*j:Rt?Fe*(Rt+1)*$:Fe}function gr(Be,Fe){var Rt=Be._fullLayout,Lt=Fe._id,Ut=Lt.charAt(0),Qt=Fe.title.font.size,rr;if(Fe.title.hasOwnProperty("standoff"))rr=Fe._depth+Fe.title.standoff+Yt(Fe);else{var Kt=Gt(Fe);if(Fe.type==="multicategory")rr=Fe._depth;else{var Dt=1.5*Qt;Kt&&(Dt=.5*Qt,Fe.ticks==="outside"&&(Dt+=Fe.ticklen)),rr=10+Dt+(Fe.linewidth?Fe.linewidth-1:0)}Kt||(Ut==="x"?rr+=Fe.side==="top"?Qt*(Fe.showticklabels?1:0):Qt*(Fe.showticklabels?1.5:.5):rr+=Fe.side==="right"?Qt*(Fe.showticklabels?1:.5):Qt*(Fe.showticklabels?.5:0))}var sr=Z.getPxPosition(Be,Fe),fr,vr,lr;Ut==="x"?(vr=Fe._offset+Fe._length/2,lr=Fe.side==="top"?sr-rr:sr+rr):(lr=Fe._offset+Fe._length/2,vr=Fe.side==="right"?sr+rr:sr-rr,fr={rotate:"-90",offset:0});var Or;if(Fe.type!=="multicategory"){var Sr=Fe._selections[Fe._id+"tick"];if(Or={selection:Sr,side:Fe.side},Sr&&Sr.node()&&Sr.node().parentNode){var Ar=s.getTranslate(Sr.node().parentNode);Or.offsetLeft=Ar.x,Or.offsetTop=Ar.y}Fe.title.hasOwnProperty("standoff")&&(Or.pad=0)}return Fe._titleStandoff=rr,r.draw(Be,Lt+"title",{propContainer:Fe,propName:Fe._name+".title.text",placeholder:Rt._dfltTitle[Ut],avoid:Or,transform:fr,attributes:{x:vr,y:lr,"text-anchor":"middle"}})}Z.shouldShowZeroLine=function(Be,Fe,Rt){var Lt=M.simpleMap(Fe.range,Fe.r2l);return Lt[0]*Lt[1]<=0&&Fe.zeroline&&(Fe.type==="linear"||Fe.type==="-")&&!(Fe.rangebreaks&&Fe.maskBreaks(0)===k)&&(ht(Fe,0)||!Ht(Be,Fe,Rt,Lt)||Wt(Be,Fe))},Z.clipEnds=function(Be,Fe){return Fe.filter(function(Rt){return ht(Be,Rt.x)})};function ht(Be,Fe){var Rt=Be.l2p(Fe);return Rt>1&&Rt<Be._length-1}function Ht(Be,Fe,Rt,Lt){var Ut=Rt._mainAxis;if(!Ut)return;var Qt=Be._fullLayout,rr=Fe._id.charAt(0),Kt=Z.counterLetter(Fe._id),Dt=Fe._offset+(Math.abs(Lt[0])<Math.abs(Lt[1])==(rr==="x")?0:Fe._length);function sr(Sr){if(!Sr.showline||!Sr.linewidth)return!1;var Ar=Math.max((Sr.linewidth+Fe.zerolinewidth)/2,1);function sn(xn){return typeof xn=="number"&&Math.abs(xn-Dt)<Ar}if(sn(Sr._mainLinePosition)||sn(Sr._mainMirrorPosition))return!0;var Jr=Sr._linepositions||{};for(var bn in Jr)if(sn(Jr[bn][0])||sn(Jr[bn][1]))return!0}var fr=Qt._plots[Rt._mainSubplot];if(!(fr.mainplotinfo||fr).overlays.length)return sr(Rt);for(var vr=Z.list(Be,Kt),lr=0;lr<vr.length;lr++){var Or=vr[lr];if(Or._mainAxis===Ut&&sr(Or))return!0}}function Wt(Be,Fe){for(var Rt=Be._fullData,Lt=Fe._mainSubplot,Ut=Fe._id.charAt(0),Qt=0;Qt<Rt.length;Qt++){var rr=Rt[Qt];if(rr.visible===!0&&rr.xaxis+rr.yaxis===Lt&&(L.traceIs(rr,"bar-like")&&rr.orientation==={x:"h",y:"v"}[Ut]||rr.fill&&rr.fill.charAt(rr.fill.length-1)===Ut))return!0}return!1}function cr(Be){var Fe=A.select(Be),Rt=Fe.select(".text-math-group");return Rt.empty()?Fe.select("text"):Rt}Z.allowAutoMargin=function(Be){for(var Fe=Z.list(Be,"",!0),Rt=0;Rt<Fe.length;Rt++){var Lt=Fe[Rt];Lt.automargin&&(o.allowAutoMargin(Be,er(Lt)),Lt.mirror&&o.allowAutoMargin(Be,ct(Lt))),L.getComponentMethod("rangeslider","isVisible")(Lt)&&o.allowAutoMargin(Be,qe(Lt))}};function er(Be){return Be._id+".automargin"}function ct(Be){return er(Be)+".mirror"}function qe(Be){return Be._id+".rangeslider"}Z.swap=function(Be,Fe){for(var Rt=dt(Be,Fe),Lt=0;Lt<Rt.length;Lt++)Et(Be,Rt[Lt].x,Rt[Lt].y)};function dt(Be,Fe){var Rt=[],Lt,Ut;for(Lt=0;Lt<Fe.length;Lt++){var Qt=[],rr=Be._fullData[Fe[Lt]].xaxis,Kt=Be._fullData[Fe[Lt]].yaxis;if(!(!rr||!Kt)){for(Ut=0;Ut<Rt.length;Ut++)(Rt[Ut].x.indexOf(rr)!==-1||Rt[Ut].y.indexOf(Kt)!==-1)&&Qt.push(Ut);if(!Qt.length){Rt.push({x:[rr],y:[Kt]});continue}var Dt=Rt[Qt[0]],sr;if(Qt.length>1)for(Ut=1;Ut<Qt.length;Ut++)sr=Rt[Qt[Ut]],bt(Dt.x,sr.x),bt(Dt.y,sr.y);bt(Dt.x,[rr]),bt(Dt.y,[Kt])}}return Rt}function bt(Be,Fe){for(var Rt=0;Rt<Fe.length;Rt++)Be.indexOf(Fe[Rt])===-1&&Be.push(Fe[Rt])}function Et(Be,Fe,Rt){var Lt=[],Ut=[],Qt=Be.layout,rr,Kt;for(rr=0;rr<Fe.length;rr++)Lt.push(Z.getFromId(Be,Fe[rr]));for(rr=0;rr<Rt.length;rr++)Ut.push(Z.getFromId(Be,Rt[rr]));var Dt=Object.keys(a),sr=["anchor","domain","overlaying","position","side","tickangle","editType"],fr=["linear","log"];for(rr=0;rr<Dt.length;rr++){var vr=Dt[rr],lr=Lt[0][vr],Or=Ut[0][vr],Sr=!0,Ar=!1,sn=!1;if(!(vr.charAt(0)==="_"||typeof lr=="function"||sr.indexOf(vr)!==-1)){for(Kt=1;Kt<Lt.length&&Sr;Kt++){var Jr=Lt[Kt][vr];vr==="type"&&fr.indexOf(lr)!==-1&&fr.indexOf(Jr)!==-1&&lr!==Jr?Ar=!0:Jr!==lr&&(Sr=!1)}for(Kt=1;Kt<Ut.length&&Sr;Kt++){var bn=Ut[Kt][vr];vr==="type"&&fr.indexOf(Or)!==-1&&fr.indexOf(bn)!==-1&&Or!==bn?sn=!0:Ut[Kt][vr]!==Or&&(Sr=!1)}Sr&&(Ar&&(Qt[Lt[0]._name].type="linear"),sn&&(Qt[Ut[0]._name].type="linear"),Mt(Qt,vr,Lt,Ut,Be._fullLayout._dfltTitle))}}for(rr=0;rr<Be._fullLayout.annotations.length;rr++){var xn=Be._fullLayout.annotations[rr];Fe.indexOf(xn.xref)!==-1&&Rt.indexOf(xn.yref)!==-1&&M.swapAttrs(Qt.annotations[rr],["?"])}}function Mt(Be,Fe,Rt,Lt,Ut){var Qt=M.nestedProperty,rr=Qt(Be[Rt[0]._name],Fe).get(),Kt=Qt(Be[Lt[0]._name],Fe).get(),Dt;for(Fe==="title"&&(rr&&rr.text===Ut.x&&(rr.text=Ut.y),Kt&&Kt.text===Ut.y&&(Kt.text=Ut.x)),Dt=0;Dt<Rt.length;Dt++)Qt(Be,Rt[Dt]._name+"."+Fe).set(Kt);for(Dt=0;Dt<Lt.length;Dt++)Qt(Be,Lt[Dt]._name+"."+Fe).set(rr)}function _t(Be){return Be._id==="angularaxis"}function It(Be,Fe){for(var Rt=Fe._rangebreaks.length,Lt=0;Lt<Rt;Lt++){var Ut=Fe._rangebreaks[Lt];if(Be>=Ut.min&&Be<Ut.max)return Ut.max}return Be}function Gt(Be){return(Be.ticklabelposition||"").indexOf("inside")!==-1}function nr(Be,Fe){Gt(Be._anchorAxis||{})&&Be._hideCounterAxisInsideTickLabels&&Be._hideCounterAxisInsideTickLabels(Fe)}function ar(Be,Fe,Rt,Lt){var Ut=Be.anchor!=="free"&&(Be.overlaying===void 0||Be.overlaying===!1)?Be._id:Be.overlaying,Qt;Lt?Qt=Be.side==="right"?Fe:-Fe:Qt=Fe,Ut in Rt||(Rt[Ut]={}),Be.side in Rt[Ut]||(Rt[Ut][Be.side]=0),Rt[Ut][Be.side]+=Qt}function ir(Be,Fe){return Be.autoshift?Fe[Be.overlaying][Be.side]:Be.shift||0}},52976:function(te,X,e){var A=e(38248),P=e(3400),o=e(39032).BADNUM,L=P.isArrayOrTypedArray,M=P.isDateTime,d=P.cleanNumber,g=Math.round;te.exports=function(y,h,T){var f=y,n=T.noMultiCategory;if(L(f)&&!f.length)return"-";if(!n&&u(f))return"multicategory";if(n&&Array.isArray(f[0])){for(var v=[],m=0;m<f.length;m++)if(L(f[m]))for(var b=0;b<f[m].length;b++)v.push(f[m][b]);f=v}if(s(f,h))return"date";var E=T.autotypenumbers!=="strict";return c(f,E)?"category":t(f,E)?"linear":"-"};function r(l,y){return y?A(l):typeof l=="number"}function t(l,y){for(var h=l.length,T=0;T<h;T++)if(r(l[T],y))return!0;return!1}function s(l,y){for(var h=l.length,T=a(h),f=0,n=0,v={},m=0;m<h;m+=T){var b=g(m),E=l[b],p=String(E);v[p]||(v[p]=1,M(E,y)&&f++,A(E)&&n++)}return f>n*2}function a(l){return Math.max(1,(l-1)/1e3)}function c(l,y){for(var h=l.length,T=a(h),f=0,n=0,v={},m=0;m<h;m+=T){var b=g(m),E=l[b],p=String(E);if(!v[p]){v[p]=1;var S=typeof E;S==="boolean"?n++:(y?d(E)!==o:S==="number")?f++:S==="string"&&n++}}return n>f*2}function u(l){return L(l[0])&&L(l[1])}},28336:function(te,X,e){var A=e(38248),P=e(24040),o=e(3400),L=e(31780),M=e(51272),d=e(94724),g=e(26332),r=e(25404),t=e(95936),s=e(42568),a=e(22416),c=e(42136),u=e(96312),l=e(78344),y=e(33816).WEEKDAY_PATTERN,h=e(33816).HOUR_PATTERN;te.exports=function(m,b,E,p,S){var w=p.letter,i=p.font||{},C=p.splomStash||{},x=E("visible",!p.visibleDflt),k=b._template||{},I=b.type||k.type||"-",B;if(I==="date"){var _=P.getComponentMethod("calendars","handleDefaults");_(m,b,"calendar",p.calendar),p.noTicklabelmode||(B=E("ticklabelmode"))}var z="";(!p.noTicklabelposition||I==="multicategory")&&(z=o.coerce(m,b,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:B==="period"?["outside","inside"]:w==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),p.noTicklabeloverflow||E("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":I==="category"||I==="multicategory"?"allow":"hide past div"),l(b,S),u(m,b,E,p),a(m,b,E,p),I!=="category"&&!p.noHover&&E("hoverformat");var O=E("color"),F=O!==d.color.dflt?O:i.color,N=C.label||S._dfltTitle[w];if(s(m,b,E,I,p),!x)return b;E("title.text",N),o.coerceFont(E,"title.font",{family:i.family,size:o.bigFont(i.size),color:F}),g(m,b,E,I);var V=p.hasMinor;if(V&&(L.newContainer(b,"minor"),g(m,b,E,I,{isMinor:!0})),t(m,b,E,I,p),r(m,b,E,p),V){var j=p.isMinor;p.isMinor=!0,r(m,b,E,p),p.isMinor=j}c(m,b,E,{dfltColor:O,bgColor:p.bgColor,showGrid:p.showGrid,hasMinor:V,attributes:d}),V&&!b.minor.ticks&&!b.minor.showgrid&&delete b.minor,(b.showline||b.ticks)&&E("mirror");var $=I==="multicategory";if(!p.noTickson&&(I==="category"||$)&&(b.ticks||b.showgrid)){var q;$&&(q="boundaries");var oe=E("tickson",q);oe==="boundaries"&&delete b.ticklabelposition}if($){var Z=E("showdividers");Z&&(E("dividercolor"),E("dividerwidth"))}if(I==="date")if(M(m,b,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!b.rangebreaks.length)delete b.rangebreaks;else{for(var G=0;G<b.rangebreaks.length;G++)if(b.rangebreaks[G].pattern===y){b._hasDayOfWeekBreaks=!0;break}if(l(b,S),S._has("scattergl")||S._has("splom"))for(var re=0;re<p.data.length;re++){var H=p.data[re];(H.type==="scattergl"||H.type==="splom")&&(H.visible=!1,o.warn(H.type+" traces do not work on axes with rangebreaks. Setting trace "+H.index+" to `visible: false`."))}}return b};function T(v,m,b){function E(B,_){return o.coerce(v,m,d.rangebreaks,B,_)}var p=E("enabled");if(p){var S=E("bounds");if(S&&S.length>=2){var w="",i,C;if(S.length===2){for(i=0;i<2;i++)if(C=n(S[i]),C){w=y;break}}var x=E("pattern",w);if(x===y)for(i=0;i<2;i++)C=n(S[i]),C&&(m.bounds[i]=S[i]=C-1);if(x)for(i=0;i<2;i++)switch(C=S[i],x){case y:if(!A(C)){m.enabled=!1;return}if(C=+C,C!==Math.floor(C)||C<0||C>=7){m.enabled=!1;return}m.bounds[i]=S[i]=C;break;case h:if(!A(C)){m.enabled=!1;return}if(C=+C,C<0||C>24){m.enabled=!1;return}m.bounds[i]=S[i]=C;break}if(b.autorange===!1){var k=b.range;if(k[0]<k[1]){if(S[0]<k[0]&&S[1]>k[1]){m.enabled=!1;return}}else if(S[0]>k[0]&&S[1]<k[1]){m.enabled=!1;return}}}else{var I=E("values");if(I&&I.length)E("dvalue");else{m.enabled=!1;return}}}}var f={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function n(v){if(typeof v=="string")return f[v.substr(0,3).toLowerCase()]}},29736:function(te,X,e){var A=e(26880),P=A.FORMAT_LINK,o=A.DATE_FORMAT_LINK;function L(g,r){return{valType:"string",dflt:"",editType:"none",description:(r?M:d)("hover text",g)+["By default the values are formatted using "+(r?"generic number format":"`"+g+"axis.hoverformat`")+"."].join(" ")}}function M(g,r){return["Sets the "+g+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+P+"."].join(" ")}function d(g,r){return M(g,r)+[" And for dates see: "+o+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}te.exports={axisHoverFormat:L,descriptionOnlyNumbers:M,descriptionWithDates:d}},79811:function(te,X,e){var A=e(24040),P=e(33816);X.id2name=function(M){if(!(typeof M!="string"||!M.match(P.AX_ID_PATTERN))){var d=M.split(" ")[0].substr(1);return d==="1"&&(d=""),M.charAt(0)+"axis"+d}},X.name2id=function(M){if(M.match(P.AX_NAME_PATTERN)){var d=M.substr(5);return d==="1"&&(d=""),M.charAt(0)+d}},X.cleanId=function(M,d,g){var r=/( domain)$/.test(M);if(!(typeof M!="string"||!M.match(P.AX_ID_PATTERN))&&!(d&&M.charAt(0)!==d)&&!(r&&!g)){var t=M.split(" ")[0].substr(1).replace(/^0+/,"");return t==="1"&&(t=""),M.charAt(0)+t+(r&&g?" domain":"")}},X.list=function(L,M,d){var g=L._fullLayout;if(!g)return[];var r=X.listIds(L,M),t=new Array(r.length),s;for(s=0;s<r.length;s++){var a=r[s];t[s]=g[a.charAt(0)+"axis"+a.substr(1)]}if(!d){var c=g._subplots.gl3d||[];for(s=0;s<c.length;s++){var u=g[c[s]];M?t.push(u[M+"axis"]):t.push(u.xaxis,u.yaxis,u.zaxis)}}return t},X.listIds=function(L,M){var d=L._fullLayout;if(!d)return[];var g=d._subplots;return M?g[M+"axis"]:g.xaxis.concat(g.yaxis)},X.getFromId=function(L,M,d){var g=L._fullLayout;return M=M===void 0||typeof M!="string"?M:M.replace(" domain",""),d==="x"?M=M.replace(/y[0-9]*/,""):d==="y"&&(M=M.replace(/x[0-9]*/,"")),g[X.id2name(M)]},X.getFromTrace=function(L,M,d){var g=L._fullLayout,r=null;if(A.traceIs(M,"gl3d")){var t=M.scene;t.substr(0,5)==="scene"&&(r=g[t][d+"axis"])}else r=X.getFromId(L,M[d+"axis"]||d);return r},X.idSort=function(L,M){var d=L.charAt(0),g=M.charAt(0);return d!==g?d>g?1:-1:+(L.substr(1)||1)-+(M.substr(1)||1)},X.ref2id=function(L){return/^[xyz]/.test(L)?L.split(" ")[0]:!1};function o(L,M){if(M&&M.length){for(var d=0;d<M.length;d++)if(M[d][L])return!0}return!1}X.isLinked=function(L,M){return o(M,L._axisMatchGroups)||o(M,L._axisConstraintGroups)}},22416:function(te,X,e){var A=e(38116).isTypedArraySpec;function P(o,L){var M=L.dataAttr||o._id.charAt(0),d={},g,r,t;if(L.axData)g=L.axData;else for(g=[],r=0;r<L.data.length;r++){var s=L.data[r];s[M+"axis"]===o._id&&g.push(s)}for(r=0;r<g.length;r++){var a=g[r][M];for(t=0;t<a.length;t++){var c=a[t];c!=null&&(d[c]=1)}}return Object.keys(d)}te.exports=function(L,M,d,g){if(M.type==="category"){var r=L.categoryarray,t=Array.isArray(r)&&r.length>0||A(r),s;t&&(s="array");var a=d("categoryorder",s),c;a==="array"&&(c=d("categoryarray")),!t&&a==="array"&&(a=M.categoryorder="trace"),a==="trace"?M._initialCategories=[]:a==="array"?M._initialCategories=c.slice():(c=P(M,g).sort(),a==="category ascending"?M._initialCategories=c:a==="category descending"&&(M._initialCategories=c.reverse()))}}},98728:function(te,X,e){var A=e(38248),P=e(3400),o=e(39032),L=o.ONEDAY,M=o.ONEWEEK;X.dtick=function(d,g){var r=g==="log",t=g==="date",s=g==="category",a=t?L:1;if(!d)return a;if(A(d))return d=Number(d),d<=0?a:s?Math.max(1,Math.round(d)):t?Math.max(.1,d):d;if(typeof d!="string"||!(t||r))return a;var c=d.charAt(0),u=d.substr(1);return u=A(u)?Number(u):0,u<=0||!(t&&c==="M"&&u===Math.round(u)||r&&c==="L"||r&&c==="D"&&(u===1||u===2))?a:d},X.tick0=function(d,g,r,t){if(g==="date")return P.cleanDate(d,P.dateTick0(r,t%M===0?1:0));if(!(t==="D1"||t==="D2"))return A(d)?Number(d):0}},33816:function(te,X,e){var A=e(53756).counter;te.exports={idRegex:{x:A("x","( domain)?"),y:A("y","( domain)?")},attrRegex:A("[xy]axis"),xAxisMatch:A("xaxis"),yAxisMatch:A("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,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"}}},71888:function(te,X,e){var A=e(3400),P=e(19280),o=e(79811).id2name,L=e(94724),M=e(21160),d=e(78344),g=e(39032).ALMOST_EQUAL,r=e(84284).FROM_BL;X.handleDefaults=function(h,T,f){var n=f.axIds,v=f.axHasImage,m=T._axisConstraintGroups=[],b=T._axisMatchGroups=[],E,p,S,w,i,C,x,k;for(E=0;E<n.length;E++)w=o(n[E]),i=h[w],C=T[w],t(i,C,{axIds:n,layoutOut:T,hasImage:v[w]});function I($,q){for(E=0;E<$.length;E++){p=$[E];for(S in p)T[o(S)][q]=p}}for(I(b,"_matchGroup"),E=0;E<m.length;E++){p=m[E];for(S in p)if(C=T[o(S)],C.fixedrange){for(var B in p){var _=o(B);(h[_]||{}).fixedrange===!1&&A.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),T[_].fixedrange=!0}break}}for(E=0;E<m.length;){p=m[E];for(S in p){C=T[o(S)],C._matchGroup&&Object.keys(C._matchGroup).length===Object.keys(p).length&&(m.splice(E,1),E--);break}E++}I(m,"_constraintGroup");var z=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],O=!1,F=!1;function N(){k=C[x],x==="rangebreaks"&&(F=C._hasDayOfWeekBreaks)}for(E=0;E<b.length;E++){p=b[E];for(var V=0;V<z.length;V++){x=z[V],k=null;var j;for(S in p)if(w=o(S),i=h[w],C=T[w],x in C){if(!C.matches&&(j=C,x in i)){N();break}k===null&&x in i&&N()}if(x==="range"&&k&&i.range&&i.range.length===2&&i.range[0]!==null&&i.range[1]!==null&&(O=!0),x==="autorange"&&k===null&&O&&(k=!1),k===null&&x in j&&(k=j[x]),k!==null)for(S in p)C=T[o(S)],C[x]=x==="range"?k.slice():k,x==="rangebreaks"&&(C._hasDayOfWeekBreaks=F,d(C,T))}}};function t(h,T,f){var n=f.axIds,v=f.layoutOut,m=f.hasImage,b=v._axisConstraintGroups,E=v._axisMatchGroups,p=T._id,S=p.charAt(0),w=((v._splomAxes||{})[S]||{})[p]||{},i=T._id,C=i.charAt(0)==="x";T._matchGroup=null,T._constraintGroup=null;function x(G,re){return A.coerce(h,T,L,G,re)}x("constrain",m?"domain":"range"),A.coerce(h,T,{constraintoward:{valType:"enumerated",values:C?["left","center","right"]:["bottom","middle","top"],dflt:C?"center":"middle"}},"constraintoward");var k=T.type,I,B,_=[];for(I=0;I<n.length;I++)if(B=n[I],B!==i){var z=v[o(B)];z.type===k&&_.push(B)}var O=a(b,i);if(O){var F=[];for(I=0;I<_.length;I++)B=_[I],O[B]||F.push(B);_=F}var N=_.length,V,j;N&&(h.matches||w.matches)&&(V=A.coerce(h,T,{matches:{valType:"enumerated",values:_,dflt:_.indexOf(w.matches)!==-1?w.matches:void 0}},"matches"));var $=m&&!C?T.anchor:void 0;if(N&&!V&&(h.scaleanchor||$)&&(j=A.coerce(h,T,{scaleanchor:{valType:"enumerated",values:_.concat([!1])}},"scaleanchor",$)),V){T._matchGroup=c(E,i,V,1);var q=v[o(V)],oe=s(v,T)/s(v,q);C!==(V.charAt(0)==="x")&&(oe=(C?"x":"y")+oe),c(b,i,V,oe)}else h.matches&&n.indexOf(h.matches)!==-1&&A.warn("ignored "+T._name+'.matches: "'+h.matches+'" to avoid an infinite loop');if(j){var Z=x("scaleratio");Z||(Z=T.scaleratio=1),c(b,i,j,Z)}else h.scaleanchor&&n.indexOf(h.scaleanchor)!==-1&&A.warn("ignored "+T._name+'.scaleanchor: "'+h.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function s(h,T){var f=T.domain;return f||(f=h[o(T.overlaying)].domain),f[1]-f[0]}function a(h,T){for(var f=0;f<h.length;f++)if(h[f][T])return h[f];return null}function c(h,T,f,n){var v,m,b,E,p,S=a(h,T);S===null?(S={},S[T]=1,p=h.length,h.push(S)):p=h.indexOf(S);var w=Object.keys(S);for(v=0;v<h.length;v++)if(b=h[v],v!==p&&b[f]){var i=b[f];for(m=0;m<w.length;m++)E=w[m],b[E]=u(i,u(n,S[E]));h.splice(p,1);return}if(n!==1)for(m=0;m<w.length;m++){var C=w[m];S[C]=u(n,S[C])}S[f]=1}function u(h,T){var f="",n="",v,m;typeof h=="string"&&(f=h.match(/^[xy]*/)[0],v=f.length,h=+h.substr(v)),typeof T=="string"&&(n=T.match(/^[xy]*/)[0],m=n.length,T=+T.substr(m));var b=h*T;return!v&&!m?b:!v||!m||f.charAt(0)===n.charAt(0)?f+n+h*T:v===m?b:(v>m?f.substr(m):n.substr(v))+b}function l(h,T){for(var f=T._size,n=f.h/f.w,v={},m=Object.keys(h),b=0;b<m.length;b++){var E=m[b],p=h[E];if(typeof p=="string"){var S=p.match(/^[xy]*/)[0],w=S.length;p=+p.substr(w);for(var i=S.charAt(0)==="y"?n:1/n,C=0;C<w;C++)p*=i}v[E]=p}return v}X.enforce=function(T){var f=T._fullLayout,n=f._axisConstraintGroups||[],v,m,b,E,p,S,w,i;for(v=0;v<n.length;v++){b=l(n[v],f);var C=Object.keys(b),x=1/0,k=0,I=1/0,B={},_={},z=!1;for(m=0;m<C.length;m++)E=C[m],_[E]=p=f[o(E)],p._inputDomain?p.domain=p._inputDomain.slice():p._inputDomain=p.domain.slice(),p._inputRange||(p._inputRange=p.range.slice()),p.setScale(),B[E]=S=Math.abs(p._m)/b[E],x=Math.min(x,S),(p.constrain==="domain"||!p._constraintShrinkable)&&(I=Math.min(I,S)),delete p._constraintShrinkable,k=Math.max(k,S),p.constrain==="domain"&&(z=!0);if(!(x>g*k&&!z)){for(m=0;m<C.length;m++)if(E=C[m],S=B[E],p=_[E],w=p.constrain,S!==I||w==="domain")if(i=S/I,w==="range")M(p,i);else{var O=p._inputDomain,F=(p.domain[1]-p.domain[0])/(O[1]-O[0]),N=(p.r2l(p.range[1])-p.r2l(p.range[0]))/(p.r2l(p._inputRange[1])-p.r2l(p._inputRange[0]));if(i/=F,i*N<1){p.domain=p._input.domain=O.slice(),M(p,i);continue}if(N<1&&(p.range=p._input.range=p._inputRange.slice(),i*=N),p.autorange){var V=p.r2l(p.range[0]),j=p.r2l(p.range[1]),$=(V+j)/2,q=$,oe=$,Z=Math.abs(j-$),G=$-Z*i*1.0001,re=$+Z*i*1.0001,H=P.makePadFn(f,p,0),J=P.makePadFn(f,p,1);y(p,i);var ae=Math.abs(p._m),K=P.concatExtremes(T,p),Y=K.min,ie=K.max,ne,le;for(le=0;le<Y.length;le++)ne=Y[le].val-H(Y[le])/ae,ne>G&&ne<q&&(q=ne);for(le=0;le<ie.length;le++)ne=ie[le].val+J(ie[le])/ae,ne<re&&ne>oe&&(oe=ne);var de=(oe-q)/(2*Z);i/=de,q=p.l2r(q),oe=p.l2r(oe),p.range=p._input.range=V<j?[q,oe]:[oe,q]}y(p,i)}}}},X.getAxisGroup=function(T,f){for(var n=T._axisMatchGroups,v=0;v<n.length;v++){var m=n[v];if(m[f])return"g"+v}return f},X.clean=function(T,f){if(f._inputDomain){for(var n=!1,v=f._id,m=T._fullLayout._axisConstraintGroups,b=0;b<m.length;b++)if(m[b][v]){n=!0;break}(!n||f.constrain!=="domain")&&(f._input.domain=f.domain=f._inputDomain,delete f._inputDomain)}};function y(h,T){var f=h._inputDomain,n=r[h.constraintoward],v=f[0]+(f[1]-f[0])*n;h.domain=h._input.domain=[v+(f[0]-v)/T,v+(f[1]-v)/T],h.setScale()}},51184:function(te,X,e){var A=e(33428),P=e(3400),o=P.numberFormat,L=e(49760),M=e(89184),d=e(24040),g=P.strTranslate,r=e(72736),t=e(76308),s=e(43616),a=e(93024),c=e(54460),u=e(93972),l=e(86476),y=e(72760),h=y.selectingOrDrawing,T=y.freeMode,f=e(84284).FROM_TL,n=e(73696),v=e(39172).redrawReglTraces,m=e(7316),b=e(79811).getFromId,E=e(22676).prepSelect,p=e(22676).clearOutline,S=e(22676).selectOnClick,w=e(21160),i=e(33816),C=i.MINDRAG,x=i.MINZOOM,k=!0;function I(ne,le,de,we,me,Le,ve,Ae){var ye=ne._fullLayout._zoomlayer,Se=ve+Ae==="nsew",_e=(ve+Ae).length===1,ze,Ie,Ne,et,st,Ze,Ke,nt,it,lt,vt,xt,Je,Pe,Ue,He,Oe,Ce,ge,pe,Te,be,ke;de+=le.yaxis._shift;function Ve(){if(ze=le.xaxis,Ie=le.yaxis,it=ze._length,lt=Ie._length,Ke=ze._offset,nt=Ie._offset,Ne={},Ne[ze._id]=ze,et={},et[Ie._id]=Ie,ve&&Ae)for(var Kt=le.overlays,Dt=0;Dt<Kt.length;Dt++){var sr=Kt[Dt].xaxis;Ne[sr._id]=sr;var fr=Kt[Dt].yaxis;et[fr._id]=fr}st=ie(Ne),Ze=ie(et),Je=z(st,Ae),Pe=z(Ze,ve),Ue=!Pe&&!Je,xt=K(ne,ne._fullLayout._axisMatchGroups,Ne,et),vt=K(ne,ne._fullLayout._axisConstraintGroups,Ne,et,xt);var vr=vt.isSubplotConstrained||xt.isSubplotConstrained;He=Ae||vr,Oe=ve||vr;var lr=ne._fullLayout;Ce=lr._has("scattergl"),ge=lr._has("splom"),pe=lr._has("svg")}Ve();var je=j(Pe+Je,ne._fullLayout.dragmode,Se),at=_(le,ve+Ae+"drag",je,de,we,me,Le);if(Ue&&!Se)return at.onmousedown=null,at.style.pointerEvents="none",at;var ut={element:at,gd:ne,plotinfo:le};ut.prepFn=function(Kt,Dt,sr){var fr=ut.dragmode,vr=ne._fullLayout.dragmode;vr!==fr&&(ut.dragmode=vr),Ve(),be=ne._fullLayout._invScaleX,ke=ne._fullLayout._invScaleY,Ue||(Se?Kt.shiftKey?vr==="pan"?vr="zoom":h(vr)||(vr="pan"):Kt.ctrlKey&&(vr="pan"):vr="pan"),T(vr)?ut.minDrag=1:ut.minDrag=void 0,h(vr)?(ut.xaxes=st,ut.yaxes=Ze,E(Kt,Dt,sr,ut,vr)):(ut.clickFn=Vt,h(fr)&&Nt(),Ue||(vr==="zoom"?(ut.moveFn=dt,ut.doneFn=Et,ut.minDrag=1,qe(Kt,Dt,sr)):vr==="pan"&&(ut.moveFn=ar,ut.doneFn=Rt))),ne._fullLayout._redrag=function(){var lr=ne._dragdata;if(lr&&lr.element===at){var Or=ne._fullLayout.dragmode;h(Or)||(Ve(),Lt([0,0,it,lt]),ut.moveFn(lr.dx,lr.dy))}}};function Nt(){ut.plotinfo.selection=!1,p(ne)}function Vt(Kt,Dt){var sr=ut.gd;if(sr._fullLayout._activeShapeIndex>=0){sr._fullLayout._deactivateShape(sr);return}var fr=sr._fullLayout.clickmode;if(G(sr),Kt===2&&!_e&&Fe(),Se)fr.indexOf("select")>-1&&S(Dt,sr,st,Ze,le.id,ut),fr.indexOf("event")>-1&&a.click(sr,Dt,le.id);else if(Kt===1&&_e){var vr=ve?Ie:ze,lr=ve==="s"||Ae==="w"?0:1,Or=vr._name+".range["+lr+"]",Sr=O(vr,lr),Ar="left",sn="middle";if(vr.fixedrange)return;ve?(sn=ve==="n"?"top":"bottom",vr.side==="right"&&(Ar="right")):Ae==="e"&&(Ar="right"),sr._context.showAxisRangeEntryBoxes&&A.select(at).call(r.makeEditable,{gd:sr,immediate:!0,background:sr._fullLayout.paper_bgcolor,text:String(Sr),fill:vr.tickfont?vr.tickfont.color:"#444",horizontalAlign:Ar,verticalAlign:sn}).on("edit",function(Jr){var bn=vr.d2r(Jr);bn!==void 0&&d.call("_guiRelayout",sr,Or,bn)})}}l.init(ut);var gt,Ct,Yt,gr,ht,Ht,Wt,cr,er,ct;function qe(Kt,Dt,sr){var fr=at.getBoundingClientRect();gt=Dt-fr.left,Ct=sr-fr.top,ne._fullLayout._calcInverseTransform(ne);var vr=P.apply3DTransform(ne._fullLayout._invTransform)(gt,Ct);gt=vr[0],Ct=vr[1],Yt={l:gt,r:gt,w:0,t:Ct,b:Ct,h:0},gr=ne._hmpixcount?ne._hmlumcount/ne._hmpixcount:L(ne._fullLayout.plot_bgcolor).getLuminance(),ht="M0,0H"+it+"V"+lt+"H0V0",Ht=!1,Wt="xy",ct=!1,cr=$(ye,gr,Ke,nt,ht),er=q(ye,Ke,nt)}function dt(Kt,Dt){if(ne._transitioningWithDuration)return!1;var sr=Math.max(0,Math.min(it,be*Kt+gt)),fr=Math.max(0,Math.min(lt,ke*Dt+Ct)),vr=Math.abs(sr-gt),lr=Math.abs(fr-Ct);Yt.l=Math.min(gt,sr),Yt.r=Math.max(gt,sr),Yt.t=Math.min(Ct,fr),Yt.b=Math.max(Ct,fr);function Or(){Wt="",Yt.r=Yt.l,Yt.t=Yt.b,er.attr("d","M0,0Z")}if(vt.isSubplotConstrained)vr>x||lr>x?(Wt="xy",vr/it>lr/lt?(lr=vr*lt/it,Ct>fr?Yt.t=Ct-lr:Yt.b=Ct+lr):(vr=lr*it/lt,gt>sr?Yt.l=gt-vr:Yt.r=gt+vr),er.attr("d",ae(Yt))):Or();else if(xt.isSubplotConstrained)if(vr>x||lr>x){Wt="xy";var Sr=Math.min(Yt.l/it,(lt-Yt.b)/lt),Ar=Math.max(Yt.r/it,(lt-Yt.t)/lt);Yt.l=Sr*it,Yt.r=Ar*it,Yt.b=(1-Sr)*lt,Yt.t=(1-Ar)*lt,er.attr("d",ae(Yt))}else Or();else!Pe||lr<Math.min(Math.max(vr*.6,C),x)?vr<C||!Je?Or():(Yt.t=0,Yt.b=lt,Wt="x",er.attr("d",H(Yt,Ct))):!Je||vr<Math.min(lr*.6,x)?(Yt.l=0,Yt.r=it,Wt="y",er.attr("d",J(Yt,gt))):(Wt="xy",er.attr("d",ae(Yt)));Yt.w=Yt.r-Yt.l,Yt.h=Yt.b-Yt.t,Wt&&(ct=!0),ne._dragged=ct,oe(cr,er,Yt,ht,Ht,gr),bt(),ne.emit("plotly_relayouting",Te),Ht=!0}function bt(){Te={},(Wt==="xy"||Wt==="x")&&(F(st,Yt.l/it,Yt.r/it,Te,vt.xaxes),ir("x",Te)),(Wt==="xy"||Wt==="y")&&(F(Ze,(lt-Yt.b)/lt,(lt-Yt.t)/lt,Te,vt.yaxes),ir("y",Te))}function Et(){bt(),G(ne),Rt(),re(ne)}var Mt=[0,0,it,lt],_t=null,It=i.REDRAWDELAY,Gt=le.mainplot?ne._fullLayout._plots[le.mainplot]:le;function nr(Kt){if(!ne._context._scrollZoom.cartesian&&!ne._fullLayout._enablescrollzoom)return;if(Nt(),ne._transitioningWithDuration){Kt.preventDefault(),Kt.stopPropagation();return}Ve(),clearTimeout(_t);var Dt=-Kt.deltaY;if(isFinite(Dt)||(Dt=Kt.wheelDelta/10),!isFinite(Dt)){P.log("Did not find wheel motion attributes: ",Kt);return}var sr=Math.exp(-Math.min(Math.max(Dt,-20),20)/200),fr=Gt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),vr=(Kt.clientX-fr.left)/fr.width,lr=(fr.bottom-Kt.clientY)/fr.height,Or;function Sr(Ar,sn,Jr){if(Ar.fixedrange)return;var bn=P.simpleMap(Ar.range,Ar.r2l),xn=bn[0]+(bn[1]-bn[0])*sn;function or(Lr){return Ar.l2r(xn+(Lr-xn)*Jr)}Ar.range=bn.map(or)}if(He){for(Ae||(vr=.5),Or=0;Or<st.length;Or++)Sr(st[Or],vr,sr);ir("x"),Mt[2]*=sr,Mt[0]+=Mt[2]*vr*(1/sr-1)}if(Oe){for(ve||(lr=.5),Or=0;Or<Ze.length;Or++)Sr(Ze[Or],lr,sr);ir("y"),Mt[3]*=sr,Mt[1]+=Mt[3]*(1-lr)*(1/sr-1)}Lt(Mt),Be(),ne.emit("plotly_relayouting",Te),_t=setTimeout(function(){ne._fullLayout&&(Mt=[0,0,it,lt],Rt())},It),Kt.preventDefault()}ve.length*Ae.length!==1&&Y(at,nr);function ar(Kt,Dt){if(Kt=Kt*be,Dt=Dt*ke,ne._transitioningWithDuration)return;if(ne._fullLayout._replotting=!0,Je==="ew"||Pe==="ns"){var sr=Je?-Kt:0,fr=Pe?-Dt:0;if(xt.isSubplotConstrained){if(Je&&Pe){var vr=(Kt/it-Dt/lt)/2;Kt=vr*it,Dt=-vr*lt,sr=-Kt,fr=-Dt}Pe?sr=-fr*it/lt:fr=-sr*lt/it}Je&&(N(st,Kt),ir("x")),Pe&&(N(Ze,Dt),ir("y")),Lt([sr,fr,it,lt]),Be(),ne.emit("plotly_relayouting",Te);return}function lr(or,Lr,Br){for(var _r=1-Lr,Qr,un,ln=0;ln<or.length;ln++){var Mn=or[ln];if(!Mn.fixedrange){Qr=Mn,un=Mn._rl[_r]+(Mn._rl[Lr]-Mn._rl[_r])/V(Br/Mn._length);var Dn=Mn.l2r(un);Dn!==!1&&Dn!==void 0&&(Mn.range[Lr]=Dn)}}return Qr._length*(Qr._rl[Lr]-un)/(Qr._rl[Lr]-Qr._rl[_r])}var Or=Je==="w"==(Pe==="n")?1:-1;if(Je&&Pe&&(vt.isSubplotConstrained||xt.isSubplotConstrained)){var Sr=(Kt/it+Or*Dt/lt)/2;Kt=Sr*it,Dt=Or*Sr*lt}var Ar,sn;if(Je==="w"?Kt=lr(st,0,Kt):Je==="e"?Kt=lr(st,1,-Kt):Je||(Kt=0),Pe==="n"?Dt=lr(Ze,1,Dt):Pe==="s"?Dt=lr(Ze,0,-Dt):Pe||(Dt=0),Ar=Je==="w"?Kt:0,sn=Pe==="n"?Dt:0,vt.isSubplotConstrained&&!xt.isSubplotConstrained||xt.isSubplotConstrained&&Je&&Pe&&Or>0){var Jr;if(xt.isSubplotConstrained||!Je&&Pe.length===1){for(Jr=0;Jr<st.length;Jr++)st[Jr].range=st[Jr]._r.slice(),w(st[Jr],1-Dt/lt);Kt=Dt*it/lt,Ar=Kt/2}if(xt.isSubplotConstrained||!Pe&&Je.length===1){for(Jr=0;Jr<Ze.length;Jr++)Ze[Jr].range=Ze[Jr]._r.slice(),w(Ze[Jr],1-Kt/it);Dt=Kt*lt/it,sn=Dt/2}}(!xt.isSubplotConstrained||!Pe)&&ir("x"),(!xt.isSubplotConstrained||!Je)&&ir("y");var bn=it-Kt,xn=lt-Dt;xt.isSubplotConstrained&&!(Je&&Pe)&&(Je?(sn=Ar?0:Kt*lt/it,xn=bn*lt/it):(Ar=sn?0:Dt*it/lt,bn=xn*it/lt)),Lt([Ar,sn,bn,xn]),Be(),ne.emit("plotly_relayouting",Te)}function ir(Kt,Dt){for(var sr=xt.isSubplotConstrained?{x:Ze,y:st}[Kt]:xt[Kt+"axes"],fr=xt.isSubplotConstrained?{x:st,y:Ze}[Kt]:[],vr=0;vr<sr.length;vr++){var lr=sr[vr],Or=lr._id,Sr=xt.xLinks[Or]||xt.yLinks[Or],Ar=fr[0]||Ne[Sr]||et[Sr];Ar&&(Dt?(Dt[lr._name+".range[0]"]=Dt[Ar._name+".range[0]"],Dt[lr._name+".range[1]"]=Dt[Ar._name+".range[1]"]):lr.range=Ar.range.slice())}}function Be(){var Kt=[],Dt;function sr(Or){for(Dt=0;Dt<Or.length;Dt++)Or[Dt].fixedrange||Kt.push(Or[Dt]._id)}function fr(Or,Sr){for(Dt=0;Dt<Or.length;Dt++){var Ar=Or[Dt],sn=Ar[Sr];!Ar.fixedrange&&sn.tickmode==="sync"&&Kt.push(sn._id)}}for(He&&(sr(st),sr(vt.xaxes),sr(xt.xaxes),fr(le.overlays,"xaxis")),Oe&&(sr(Ze),sr(vt.yaxes),sr(xt.yaxes),fr(le.overlays,"yaxis")),Te={},Dt=0;Dt<Kt.length;Dt++){var vr=Kt[Dt],lr=b(ne,vr);c.drawOne(ne,lr,{skipTitle:!0}),Te[lr._name+".range[0]"]=lr.range[0],Te[lr._name+".range[1]"]=lr.range[1]}c.redrawComponents(ne,Kt)}function Fe(){if(!ne._transitioningWithDuration){var Kt=ne._context.doubleClick,Dt=[];Je&&(Dt=Dt.concat(st)),Pe&&(Dt=Dt.concat(Ze)),xt.xaxes&&(Dt=Dt.concat(xt.xaxes)),xt.yaxes&&(Dt=Dt.concat(xt.yaxes));var sr={},fr,vr;if(Kt==="reset+autosize")for(Kt="autosize",vr=0;vr<Dt.length;vr++){fr=Dt[vr];var lr=fr._rangeInitial0,Or=fr._rangeInitial1,Sr=lr!==void 0||Or!==void 0;if(Sr&&(lr!==void 0&&lr!==fr.range[0]||Or!==void 0&&Or!==fr.range[1])||!Sr&&fr.autorange!==!0){Kt="reset";break}}if(Kt==="autosize")for(vr=0;vr<Dt.length;vr++)fr=Dt[vr],fr.fixedrange||(sr[fr._name+".autorange"]=!0);else if(Kt==="reset"){for((Je||vt.isSubplotConstrained)&&(Dt=Dt.concat(vt.xaxes)),Pe&&!vt.isSubplotConstrained&&(Dt=Dt.concat(vt.yaxes)),vt.isSubplotConstrained&&(Je?Pe||(Dt=Dt.concat(Ze)):Dt=Dt.concat(st)),vr=0;vr<Dt.length;vr++)if(fr=Dt[vr],!fr.fixedrange){var Ar=fr._name,sn=fr._autorangeInitial;fr._rangeInitial0===void 0&&fr._rangeInitial1===void 0?sr[Ar+".autorange"]=!0:fr._rangeInitial0===void 0?(sr[Ar+".autorange"]=sn,sr[Ar+".range"]=[null,fr._rangeInitial1]):fr._rangeInitial1===void 0?(sr[Ar+".range"]=[fr._rangeInitial0,null],sr[Ar+".autorange"]=sn):sr[Ar+".range"]=[fr._rangeInitial0,fr._rangeInitial1]}}ne.emit("plotly_doubleclick",null),d.call("_guiRelayout",ne,sr)}}function Rt(){Lt([0,0,it,lt]),P.syncOrAsync([m.previousPromises,function(){ne._fullLayout._replotting=!1,d.call("_guiRelayout",ne,Te)}],ne)}function Lt(Kt){var Dt=ne._fullLayout,sr=Dt._plots,fr=Dt._subplots.cartesian,vr,lr,Or,Sr;if(ge&&d.subplotsRegistry.splom.drag(ne),Ce){for(vr=0;vr<fr.length;vr++)if(lr=sr[fr[vr]],Or=lr.xaxis,Sr=lr.yaxis,lr._scene){var Ar=P.simpleMap(Or.range,Or.r2l),sn=P.simpleMap(Sr.range,Sr.r2l);Or.limitRange&&Or.limitRange(),Sr.limitRange&&Sr.limitRange(),Ar=Or.range,sn=Sr.range,lr._scene.update({range:[Ar[0],sn[0],Ar[1],sn[1]]})}}if((ge||Ce)&&(n(ne),v(ne)),pe){var Jr=Kt[2]/ze._length,bn=Kt[3]/Ie._length;for(vr=0;vr<fr.length;vr++){lr=sr[fr[vr]],Or=lr.xaxis,Sr=lr.yaxis;var xn=(He||xt.isSubplotConstrained)&&!Or.fixedrange&&Ne[Or._id],or=(Oe||xt.isSubplotConstrained)&&!Sr.fixedrange&&et[Sr._id],Lr,Br,_r,Qr;if(xn?(Lr=Jr,_r=Ae||xt.isSubplotConstrained?Kt[0]:rr(Or,Lr)):xt.xaHash[Or._id]?(Lr=Jr,_r=Kt[0]*Or._length/ze._length):xt.yaHash[Or._id]?(Lr=bn,_r=Pe==="ns"?-Kt[1]*Or._length/Ie._length:rr(Or,Lr,{n:"top",s:"bottom"}[Pe])):(Lr=Ut(Or,Jr,bn),_r=Qt(Or,Lr)),Lr>1&&(Or.maxallowed!==void 0&&He===(Or.range[0]<Or.range[1]?"e":"w")||Or.minallowed!==void 0&&He===(Or.range[0]<Or.range[1]?"w":"e"))&&(Lr=1,_r=0),or?(Br=bn,Qr=ve||xt.isSubplotConstrained?Kt[1]:rr(Sr,Br)):xt.yaHash[Sr._id]?(Br=bn,Qr=Kt[1]*Sr._length/Ie._length):xt.xaHash[Sr._id]?(Br=Jr,Qr=Je==="ew"?-Kt[0]*Sr._length/ze._length:rr(Sr,Br,{e:"right",w:"left"}[Je])):(Br=Ut(Sr,Jr,bn),Qr=Qt(Sr,Br)),Br>1&&(Sr.maxallowed!==void 0&&Oe===(Sr.range[0]<Sr.range[1]?"n":"s")||Sr.minallowed!==void 0&&Oe===(Sr.range[0]<Sr.range[1]?"s":"n"))&&(Br=1,Qr=0),!(!Lr&&!Br)){Lr||(Lr=1),Br||(Br=1);var un=Or._offset-_r/Lr,ln=Sr._offset-Qr/Br;lr.clipRect.call(s.setTranslate,_r,Qr).call(s.setScale,Lr,Br),lr.plot.call(s.setTranslate,un,ln).call(s.setScale,1/Lr,1/Br),(Lr!==lr.xScaleFactor||Br!==lr.yScaleFactor)&&(s.setPointGroupScale(lr.zoomScalePts,Lr,Br),s.setTextPointsScale(lr.zoomScaleTxt,Lr,Br)),s.hideOutsideRangePoints(lr.clipOnAxisFalseTraces,lr),lr.xScaleFactor=Lr,lr.yScaleFactor=Br}}}}function Ut(Kt,Dt,sr){return Kt.fixedrange?0:He&&vt.xaHash[Kt._id]?Dt:Oe&&(vt.isSubplotConstrained?vt.xaHash:vt.yaHash)[Kt._id]?sr:0}function Qt(Kt,Dt){return Dt?(Kt.range=Kt._r.slice(),w(Kt,Dt),rr(Kt,Dt)):0}function rr(Kt,Dt,sr){return Kt._length*(1-Dt)*f[sr||Kt.constraintoward||"middle"]}return at}function B(ne,le,de,we){var me=P.ensureSingle(ne.draglayer,le,de,function(Le){Le.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",ne.id)});return me.call(u,we),me.node()}function _(ne,le,de,we,me,Le,ve){var Ae=B(ne,"rect",le,de);return A.select(Ae).call(s.setRect,we,me,Le,ve),Ae}function z(ne,le){for(var de=0;de<ne.length;de++)if(!ne[de].fixedrange)return le;return""}function O(ne,le){var de=ne.range[le],we=Math.abs(de-ne.range[1-le]),me;return ne.type==="date"?de:ne.type==="log"?(me=Math.ceil(Math.max(0,-Math.log(we)/Math.LN10))+3,o("."+me+"g")(Math.pow(10,de))):(me=Math.floor(Math.log(Math.abs(de))/Math.LN10)-Math.floor(Math.log(we)/Math.LN10)+4,o("."+String(me)+"g")(de))}function F(ne,le,de,we,me){for(var Le=0;Le<ne.length;Le++){var ve=ne[Le];if(!ve.fixedrange)if(ve.rangebreaks){var Ae=ve._id.charAt(0)==="y",ye=Ae?1-le:le,Se=Ae?1-de:de;we[ve._name+".range[0]"]=ve.l2r(ve.p2l(ye*ve._length)),we[ve._name+".range[1]"]=ve.l2r(ve.p2l(Se*ve._length))}else{var _e=ve._rl[0],ze=ve._rl[1]-_e;we[ve._name+".range[0]"]=ve.l2r(_e+ze*le),we[ve._name+".range[1]"]=ve.l2r(_e+ze*de)}}if(me&&me.length){var Ie=(le+(1-de))/2;F(me,Ie,1-Ie,we,[])}}function N(ne,le){for(var de=0;de<ne.length;de++){var we=ne[de];if(!we.fixedrange){if(we.rangebreaks){var me=0,Le=we._length,ve=we.p2l(me+le)-we.p2l(me),Ae=we.p2l(Le+le)-we.p2l(Le),ye=(ve+Ae)/2;we.range=[we.l2r(we._rl[0]-ye),we.l2r(we._rl[1]-ye)]}else we.range=[we.l2r(we._rl[0]-le/we._m),we.l2r(we._rl[1]-le/we._m)];we.limitRange&&we.limitRange()}}}function V(ne){return 1-(ne>=0?Math.min(ne,.9):1/(1/Math.max(ne,-.3)+3.222))}function j(ne,le,de){return ne?ne==="nsew"?de?"":le==="pan"?"move":"crosshair":ne.toLowerCase()+"-resize":"pointer"}function $(ne,le,de,we,me){return ne.append("path").attr("class","zoombox").style({fill:le>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",g(de,we)).attr("d",me+"Z")}function q(ne,le,de){return ne.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1,opacity:0}).attr("transform",g(le,de)).attr("d","M0,0Z")}function oe(ne,le,de,we,me,Le){ne.attr("d",we+"M"+de.l+","+de.t+"v"+de.h+"h"+de.w+"v-"+de.h+"h-"+de.w+"Z"),Z(ne,le,me,Le)}function Z(ne,le,de,we){de||(ne.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),le.transition().style("opacity",1).duration(200))}function G(ne){A.select(ne).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function re(ne){k&&ne.data&&ne._context.showTips&&(P.notifier(P._(ne,"Double-click to zoom back out"),"long"),k=!1)}function H(ne,le){return"M"+(ne.l-.5)+","+(le-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ne.r+.5)+","+(le-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function J(ne,le){return"M"+(le-x-.5)+","+(ne.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(le-x-.5)+","+(ne.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function ae(ne){var le=Math.floor(Math.min(ne.b-ne.t,ne.r-ne.l,x)/2);return"M"+(ne.l-3.5)+","+(ne.t-.5+le)+"h3v"+-le+"h"+le+"v-3h-"+(le+3)+"ZM"+(ne.r+3.5)+","+(ne.t-.5+le)+"h-3v"+-le+"h"+-le+"v-3h"+(le+3)+"ZM"+(ne.r+3.5)+","+(ne.b+.5-le)+"h-3v"+le+"h"+-le+"v3h"+(le+3)+"ZM"+(ne.l-3.5)+","+(ne.b+.5-le)+"h3v"+le+"h"+le+"v3h-"+(le+3)+"Z"}function K(ne,le,de,we,me){for(var Le=!1,ve={},Ae={},ye,Se,_e,ze,Ie=(me||{}).xaHash,Ne=(me||{}).yaHash,et=0;et<le.length;et++){var st=le[et];for(ye in de)if(st[ye]){for(_e in st)!(me&&(Ie[_e]||Ne[_e]))&&!(_e.charAt(0)==="x"?de:we)[_e]&&(ve[_e]=ye);for(Se in we)!(me&&(Ie[Se]||Ne[Se]))&&st[Se]&&(Le=!0)}for(Se in we)if(st[Se])for(ze in st)!(me&&(Ie[ze]||Ne[ze]))&&!(ze.charAt(0)==="x"?de:we)[ze]&&(Ae[ze]=Se)}Le&&(P.extendFlat(ve,Ae),Ae={});var Ze={},Ke=[];for(_e in ve){var nt=b(ne,_e);Ke.push(nt),Ze[nt._id]=nt}var it={},lt=[];for(ze in Ae){var vt=b(ne,ze);lt.push(vt),it[vt._id]=vt}return{xaHash:Ze,yaHash:it,xaxes:Ke,yaxes:lt,xLinks:ve,yLinks:Ae,isSubplotConstrained:Le}}function Y(ne,le){if(!M)ne.onwheel!==void 0?ne.onwheel=le:ne.onmousewheel!==void 0?ne.onmousewheel=le:ne.isAddedWheelEvent||(ne.isAddedWheelEvent=!0,ne.addEventListener("wheel",le,{passive:!1}));else{var de=ne.onwheel!==void 0?"wheel":"mousewheel";ne._onwheel&&ne.removeEventListener(de,ne._onwheel),ne._onwheel=le,ne.addEventListener(de,le,{passive:!1})}}function ie(ne){var le=[];for(var de in ne)le.push(ne[de]);return le}te.exports={makeDragBox:I,makeDragger:B,makeRectDragger:_,makeZoombox:$,makeCorners:q,updateZoombox:oe,xyCorners:ae,transitionZoombox:Z,removeZoombox:G,showDoubleClickNotifier:re,attachWheelEventHandler:Y}},42464:function(te,X,e){var A=e(33428),P=e(93024),o=e(86476),L=e(93972),M=e(51184).makeDragBox,d=e(33816).DRAGGERSIZE;X.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){A.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var s=Object.keys(t._plots||{}).sort(function(c,u){if((t._plots[c].mainplot&&!0)===(t._plots[u].mainplot&&!0)){var l=c.split("y"),y=u.split("y");return l[0]===y[0]?Number(l[1]||1)-Number(y[1]||1):Number(l[0]||1)-Number(y[0]||1)}return t._plots[c].mainplot?1:-1});s.forEach(function(c){var u=t._plots[c],l=u.xaxis,y=u.yaxis;if(!u.mainplot){var h=M(r,u,l._offset,y._offset,l._length,y._length,"ns","ew");h.onmousemove=function(n){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===c&&r._fullLayout._plots[c]&&P.hover(r,n,c)},P.hover(r,n,c),r._fullLayout._lasthover=h,r._fullLayout._hoversubplot=c},h.onmouseout=function(n){r._dragging||(r._fullLayout._hoversubplot=null,o.unhover(r,n))},r._context.showAxisDragHandles&&(M(r,u,l._offset-d,y._offset-d,d,d,"n","w"),M(r,u,l._offset+l._length,y._offset-d,d,d,"n","e"),M(r,u,l._offset-d,y._offset+y._length,d,d,"s","w"),M(r,u,l._offset+l._length,y._offset+y._length,d,d,"s","e"))}if(r._context.showAxisDragHandles){if(c===l._mainSubplot){var T=l._mainLinePosition;l.side==="top"&&(T-=d),M(r,u,l._offset+l._length*.1,T,l._length*.8,d,"","ew"),M(r,u,l._offset,T,l._length*.1,d,"","w"),M(r,u,l._offset+l._length*.9,T,l._length*.1,d,"","e")}if(c===y._mainSubplot){var f=y._mainLinePosition;y.side!=="right"&&(f-=d),M(r,u,f,y._offset+y._length*.1,d,y._length*.8,"ns",""),M(r,u,f,y._offset+y._length*.9,d,y._length*.1,"s",""),M(r,u,f,y._offset,d,y._length*.1,"n","")}}});var a=t._hoverlayer.node();a.onmousemove=function(c){c.target=r._fullLayout._lasthover,P.hover(r,c,t._hoversubplot)},a.onclick=function(c){c.target=r._fullLayout._lasthover,P.click(r,c)},a.onmousedown=function(c){r._fullLayout._lasthover.onmousedown(c)},X.updateFx(r)}},X.updateFx=function(g){var r=g._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";L(r._draggers,t)}},36632:function(te,X,e){var A=e(24040),P=e(3400),o=e(79811);te.exports=function(M){return function(g,r){var t=g[M];if(Array.isArray(t))for(var s=A.subplotsRegistry.cartesian,a=s.idRegex,c=r._subplots,u=c.xaxis,l=c.yaxis,y=c.cartesian,h=r._has("cartesian")||r._has("gl2d"),T=0;T<t.length;T++){var f=t[T];if(P.isPlainObject(f)){var n=o.cleanId(f.xref,"x",!1),v=o.cleanId(f.yref,"y",!1),m=a.x.test(n),b=a.y.test(v);if(m||b){h||P.pushUnique(r._basePlotModules,s);var E=!1;m&&u.indexOf(n)===-1&&(u.push(n),E=!0),b&&l.indexOf(v)===-1&&(l.push(v),E=!0),E&&m&&b&&y.push(n+v)}}}}}},57952:function(te,X,e){var A=e(33428),P=e(24040),o=e(3400),L=e(7316),M=e(43616),d=e(84888)._M,g=e(79811),r=e(33816),t=e(9616),s=o.ensureSingle;function a(T,f,n){return o.ensureSingle(T,f,n,function(v){v.datum(n)})}X.name="cartesian",X.attr=["xaxis","yaxis"],X.idRoot=["x","y"],X.idRegex=r.idRegex,X.attrRegex=r.attrRegex,X.attributes=e(26720),X.layoutAttributes=e(94724),X.supplyLayoutDefaults=e(67352),X.transitionAxes=e(73736),X.finalizeSubplots=function(T,f){var n=f._subplots,v=n.xaxis,m=n.yaxis,b=n.cartesian,E=b.concat(n.gl2d||[]),p={},S={},w,i,C;for(w=0;w<E.length;w++){var x=E[w].split("y");p[x[0]]=1,S["y"+x[1]]=1}for(w=0;w<v.length;w++)i=v[w],p[i]||(C=(T[g.id2name(i)]||{}).anchor,r.idRegex.y.test(C)||(C="y"),b.push(i+C),E.push(i+C),S[C]||(S[C]=1,o.pushUnique(m,C)));for(w=0;w<m.length;w++)C=m[w],S[C]||(i=(T[g.id2name(C)]||{}).anchor,r.idRegex.x.test(i)||(i="x"),b.push(i+C),E.push(i+C),p[i]||(p[i]=1,o.pushUnique(v,i)));if(!E.length){i="",C="";for(var k in T)if(r.attrRegex.test(k)){var I=k.charAt(0);I==="x"?(!i||+k.substr(5)<+i.substr(5))&&(i=k):(!C||+k.substr(5)<+C.substr(5))&&(C=k)}i=i?g.name2id(i):"x",C=C?g.name2id(C):"y",v.push(i),m.push(C),b.push(i+C)}},X.plot=function(T,f,n,v){var m=T._fullLayout,b=m._subplots.cartesian,E=T.calcdata,p;if(!Array.isArray(f))for(f=[],p=0;p<E.length;p++)f.push(p);for(p=0;p<b.length;p++){for(var S=b[p],w=m._plots[S],i=[],C,x=0;x<E.length;x++){var k=E[x],I=k[0].trace;I.xaxis+I.yaxis===S&&((f.indexOf(I.index)!==-1||I.carpet)&&(C&&C[0].trace.xaxis+C[0].trace.yaxis===S&&["tonextx","tonexty","tonext"].indexOf(I.fill)!==-1&&i.indexOf(C)===-1&&i.push(C),i.push(k)),C=k)}c(T,w,i,n,v)}};function c(T,f,n,v,m){for(var b=r.traceLayerClasses,E=T._fullLayout,p=E._modules,S,w,i,C=[],x=[],k=0;k<p.length;k++){S=p[k];var I=S.name,B=P.modules[I].categories;if(B.svg){var _=S.layerName||I+"layer",z=S.plot;w=d(n,z),i=w[0],n=w[1],i.length&&C.push({i:b.indexOf(_),className:_,plotMethod:z,cdModule:i}),B.zoomScale&&x.push("."+_)}}C.sort(function(N,V){return N.i-V.i});var O=f.plot.selectAll("g.mlayer").data(C,function(N){return N.className});if(O.enter().append("g").attr("class",function(N){return N.className}).classed("mlayer",!0).classed("rangeplot",f.isRangePlot),O.exit().remove(),O.order(),O.each(function(N){var V=A.select(this),j=N.className;N.plotMethod(T,f,N.cdModule,V,v,m),r.clipOnAxisFalseQuery.indexOf("."+j)===-1&&M.setClipUrl(V,f.layerClipId,T)}),E._has("scattergl")&&(S=P.getModule("scattergl"),i=d(n,S)[0],S.plot(T,f,i)),!T._context.staticPlot&&(f._hasClipOnAxisFalse&&(f.clipOnAxisFalseTraces=f.plot.selectAll(r.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),x.length)){var F=f.plot.selectAll(x.join(",")).selectAll(".trace");f.zoomScalePts=F.selectAll("path.point"),f.zoomScaleTxt=F.selectAll(".textpoint")}}X.clean=function(T,f,n,v){var m=v._plots||{},b=f._plots||{},E=v._subplots||{},p,S,w;if(v._hasOnlyLargeSploms&&!f._hasOnlyLargeSploms)for(w in m)p=m[w],p.plotgroup&&p.plotgroup.remove();var i=v._has&&v._has("gl"),C=f._has&&f._has("gl");if(i&&!C)for(w in m)p=m[w],p._scene&&p._scene.destroy();if(E.xaxis&&E.yaxis){var x=g.listIds({_fullLayout:v});for(S=0;S<x.length;S++){var k=x[S];f[g.id2name(k)]||v._infolayer.selectAll(".g-"+k+"title").remove()}}var I=v._has&&v._has("cartesian"),B=f._has&&f._has("cartesian");if(I&&!B)y(v._cartesianlayer.selectAll(".subplot"),v),v._defs.selectAll(".axesclip").remove(),delete v._axisConstraintGroups,delete v._axisMatchGroups;else if(E.cartesian)for(S=0;S<E.cartesian.length;S++){var _=E.cartesian[S];if(!b[_]){var z="."+_+",."+_+"-x,."+_+"-y";v._cartesianlayer.selectAll(z).remove(),h(_,v)}}},X.drawFramework=function(T){var f=T._fullLayout,n=u(T),v=f._cartesianlayer.selectAll(".subplot").data(n,String);v.enter().append("g").attr("class",function(m){return"subplot "+m[0]}),v.order(),v.exit().call(y,f),v.each(function(m){var b=m[0],E=f._plots[b];E.plotgroup=A.select(this),l(T,E),E.draglayer=s(f._draggers,"g",b)})},X.rangePlot=function(T,f,n){l(T,f),c(T,f,n),L.style(T)};function u(T){var f=T._fullLayout,n=f._subplots.cartesian,v=n.length,m,b,E,p,S,w,i=[],C=[];for(m=0;m<v;m++){E=n[m],p=f._plots[E],S=p.xaxis,w=p.yaxis;var x=S._mainAxis,k=w._mainAxis,I=x._id+k._id,B=f._plots[I];p.overlays=[],I!==E&&B?(p.mainplot=I,p.mainplotinfo=B,C.push(E)):(p.mainplot=void 0,p.mainplotinfo=void 0,i.push(E))}for(m=0;m<C.length;m++)E=C[m],p=f._plots[E],p.mainplotinfo.overlays.push(p);var _=i.concat(C),z=new Array(v);for(m=0;m<v;m++){E=_[m],p=f._plots[E],S=p.xaxis,w=p.yaxis;var O=[E,S.layer,w.layer,S.overlaying||"",w.overlaying||""];for(b=0;b<p.overlays.length;b++)O.push(p.overlays[b].id);z[m]=O}return z}function l(T,f){var n=f.plotgroup,v=f.id,m=r.layerValue2layerClass[f.xaxis.layer],b=r.layerValue2layerClass[f.yaxis.layer],E=T._fullLayout._hasOnlyLargeSploms;if(f.mainplot){var S=f.mainplotinfo,w=S.plotgroup,i=v+"-x",C=v+"-y";f.minorGridlayer=S.minorGridlayer,f.gridlayer=S.gridlayer,f.zerolinelayer=S.zerolinelayer,s(S.overlinesBelow,"path",i),s(S.overlinesBelow,"path",C),s(S.overaxesBelow,"g",i),s(S.overaxesBelow,"g",C),f.plot=s(S.overplot,"g",v),s(S.overlinesAbove,"path",i),s(S.overlinesAbove,"path",C),s(S.overaxesAbove,"g",i),s(S.overaxesAbove,"g",C),f.xlines=w.select(".overlines-"+m).select("."+i),f.ylines=w.select(".overlines-"+b).select("."+C),f.xaxislayer=w.select(".overaxes-"+m).select("."+i),f.yaxislayer=w.select(".overaxes-"+b).select("."+C)}else if(E)f.xlines=s(n,"path","xlines-above"),f.ylines=s(n,"path","ylines-above"),f.xaxislayer=s(n,"g","xaxislayer-above"),f.yaxislayer=s(n,"g","yaxislayer-above");else{var p=s(n,"g","layer-subplot");f.shapelayer=s(p,"g","shapelayer"),f.imagelayer=s(p,"g","imagelayer"),f.minorGridlayer=s(n,"g","minor-gridlayer"),f.gridlayer=s(n,"g","gridlayer"),f.zerolinelayer=s(n,"g","zerolinelayer"),s(n,"path","xlines-below"),s(n,"path","ylines-below"),f.overlinesBelow=s(n,"g","overlines-below"),s(n,"g","xaxislayer-below"),s(n,"g","yaxislayer-below"),f.overaxesBelow=s(n,"g","overaxes-below"),f.plot=s(n,"g","plot"),f.overplot=s(n,"g","overplot"),f.xlines=s(n,"path","xlines-above"),f.ylines=s(n,"path","ylines-above"),f.overlinesAbove=s(n,"g","overlines-above"),s(n,"g","xaxislayer-above"),s(n,"g","yaxislayer-above"),f.overaxesAbove=s(n,"g","overaxes-above"),f.xlines=n.select(".xlines-"+m),f.ylines=n.select(".ylines-"+b),f.xaxislayer=n.select(".xaxislayer-"+m),f.yaxislayer=n.select(".yaxislayer-"+b)}E||(a(f.minorGridlayer,"g",f.xaxis._id),a(f.minorGridlayer,"g",f.yaxis._id),f.minorGridlayer.selectAll("g").map(function(x){return x[0]}).sort(g.idSort),a(f.gridlayer,"g",f.xaxis._id),a(f.gridlayer,"g",f.yaxis._id),f.gridlayer.selectAll("g").map(function(x){return x[0]}).sort(g.idSort)),f.xlines.style("fill","none").classed("crisp",!0),f.ylines.style("fill","none").classed("crisp",!0)}function y(T,f){if(T){var n={};T.each(function(S){var w=S[0],i=A.select(this);i.remove(),h(w,f),n[w]=!0});for(var v in f._plots)for(var m=f._plots[v],b=m.overlays||[],E=0;E<b.length;E++){var p=b[E];n[p.id]&&p.plot.selectAll(".trace").remove()}}}function h(T,f){f._draggers.selectAll("g."+T).remove(),f._defs.select("#clip"+f._uid+T+"plot").remove()}X.toSVG=function(T){var f=T._fullLayout._glimages,n=A.select(T).selectAll(".svg-container"),v=n.filter(function(b,E){return E===n.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function m(){var b=this,E=b.toDataURL("image/png"),p=f.append("svg:image");p.attr({xmlns:t.svg,"xlink:href":E,preserveAspectRatio:"none",x:0,y:0,width:b.style.width,height:b.style.height})}v.each(m)},X.updateFx=e(42464).updateFx},94724:function(te,X,e){var A=e(25376),P=e(22548),o=e(98192).u,L=e(92880).extendFlat,M=e(31780).templatedArray,d=e(29736).descriptionWithDates,g=e(39032).ONEDAY,r=e(33816),t=r.HOUR_PATTERN,s=r.WEEKDAY_PATTERN,a={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},c=L({},a,{values:a.values.slice().concat(["sync"])});function u(S){return{valType:"integer",min:0,dflt:S?5:0,editType:"ticks"}}var l={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},h={valType:"data_array",editType:"ticks"},T={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function f(S){var w={valType:"number",min:0,editType:"ticks"};return S||(w.dflt=5),w}function n(S){var w={valType:"number",min:0,editType:"ticks"};return S||(w.dflt=1),w}var v={valType:"color",dflt:P.defaultLine,editType:"ticks"},m={valType:"color",dflt:P.lightLine,editType:"ticks"};function b(S){var w={valType:"number",min:0,editType:"ticks"};return S||(w.dflt=1),w}var E=L({},o,{editType:"ticks"}),p={valType:"boolean",editType:"ticks"};te.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:P.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:A({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","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},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},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[r.idRegex.x.toString(),r.idRegex.y.toString(),!1],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:[r.idRegex.x.toString(),r.idRegex.y.toString()],editType:"calc"},rangebreaks:M("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:[s,t,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:g},editType:"calc"}),tickmode:c,nticks:u(),tick0:l,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:h,ticktext:{valType:"data_array",editType:"ticks"},ticks:T,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:f(),tickwidth:n(),tickcolor:v,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],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:L({},o,{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:A({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],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:d("tick label")},tickformatstops:M("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:d("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:P.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:p,gridcolor:m,gridwidth:b(),griddash:E,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:P.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:P.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",r.idRegex.x.toString(),r.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",r.idRegex.x.toString(),r.idRegex.y.toString()],editType:"plot"},minor:{tickmode:a,nticks:u("minor"),tick0:l,dtick:y,tickvals:h,ticks:T,ticklen:f("minor"),tickwidth:n("minor"),tickcolor:v,gridcolor:m,gridwidth:b("minor"),griddash:E,showgrid:p,editType:"ticks"},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"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",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:A({editType:"ticks"})}}},67352:function(te,X,e){var A=e(3400),P=e(76308),o=e(10624).isUnifiedHover,L=e(41008),M=e(31780),d=e(64859),g=e(94724),r=e(14944),t=e(28336),s=e(71888),a=e(37668),c=e(79811),u=c.id2name,l=c.name2id,y=e(33816).AX_ID_PATTERN,h=e(24040),T=h.traceIs,f=h.getComponentMethod;function n(v,m,b){Array.isArray(v[m])?v[m].push(b):v[m]=[b]}te.exports=function(m,b,E){var p=b.autotypenumbers,S={},w={},i={},C={},x={},k={},I={},B={},_={},z={},O,F;for(O=0;O<E.length;O++){var N=E[O];if(!(!T(N,"cartesian")&&!T(N,"gl2d"))){var V;if(N.xaxis)V=u(N.xaxis),n(S,V,N);else if(N.xaxes)for(F=0;F<N.xaxes.length;F++)n(S,u(N.xaxes[F]),N);var j;if(N.yaxis)j=u(N.yaxis),n(S,j,N);else if(N.yaxes)for(F=0;F<N.yaxes.length;F++)n(S,u(N.yaxes[F]),N);if(N.type==="funnel"?N.orientation==="h"?(V&&(w[V]=!0),j&&(I[j]=!0)):j&&(i[j]=!0):N.type==="image"?(j&&(B[j]=!0),V&&(B[V]=!0)):(j&&(x[j]=!0,k[j]=!0),(!T(N,"carpet")||N.type==="carpet"&&!N._cheater)&&V&&(C[V]=!0)),N.type==="carpet"&&N._cheater&&V&&(w[V]=!0),T(N,"2dMap")&&(_[V]=!0,_[j]=!0),T(N,"oriented")){var $=N.orientation==="h"?j:V;z[$]=!0}}}var q=b._subplots,oe=q.xaxis,Z=q.yaxis,G=A.simpleMap(oe,u),re=A.simpleMap(Z,u),H=G.concat(re),J=P.background;oe.length&&Z.length&&(J=A.coerce(m,b,d,"plot_bgcolor"));var ae=P.combine(J,b.paper_bgcolor),K,Y,ie,ne,le;function de(){var be=S[K]||[];le._traceIndices=be.map(function(ke){return ke._expandedIndex}),le._annIndices=[],le._shapeIndices=[],le._selectionIndices=[],le._imgIndices=[],le._subplotsWith=[],le._counterAxes=[],le._name=le._attr=K,le._id=Y}function we(be,ke){return A.coerce(ne,le,g,be,ke)}function me(be,ke){return A.coerce2(ne,le,g,be,ke)}function Le(be){return be==="x"?Z:oe}function ve(be,ke){for(var Ve=be==="x"?G:re,je=[],at=0;at<Ve.length;at++){var ut=Ve[at];ut!==ke&&!(m[ut]||{}).overlaying&&je.push(l(ut))}return je}var Ae={x:Le("x"),y:Le("y")},ye=Ae.x.concat(Ae.y),Se={},_e=[];function ze(){var be=ne.matches;y.test(be)&&ye.indexOf(be)===-1&&(Se[be]=ne.type,_e=Object.keys(Se))}var Ie=L(m,b),Ne=o(Ie);for(O=0;O<H.length;O++){K=H[O],Y=l(K),ie=K.charAt(0),A.isPlainObject(m[K])||(m[K]={}),ne=m[K],le=M.newContainer(b,K,ie+"axis"),de();var et=ie==="x"&&!C[K]&&w[K]||ie==="y"&&!x[K]&&i[K],st=ie==="y"&&(!k[K]&&I[K]||B[K]),Ze={hasMinor:!0,letter:ie,font:b.font,outerTicks:_[K],showGrid:!z[K],data:S[K]||[],bgColor:ae,calendar:b.calendar,automargin:!0,visibleDflt:et,reverseDflt:st,autotypenumbersDflt:p,splomStash:((b._splomAxes||{})[ie]||{})[Y],noAutotickangles:ie==="y"};we("uirevision",b.uirevision),r(ne,le,we,Ze),t(ne,le,we,Ze,b);var Ke=Ne&&ie===Ie.charAt(0),nt=me("spikecolor",Ne?le.color:void 0),it=me("spikethickness",Ne?1.5:void 0),lt=me("spikedash",Ne?"dot":void 0),vt=me("spikemode",Ne?"across":void 0),xt=me("spikesnap"),Je=we("showspikes",!!Ke||!!nt||!!it||!!lt||!!vt||!!xt);Je||(delete le.spikecolor,delete le.spikethickness,delete le.spikedash,delete le.spikemode,delete le.spikesnap);var Pe=u(ne.overlaying),Ue=[0,1];if(b[Pe]!==void 0){var He=u(b[Pe].anchor);b[He]!==void 0&&(Ue=b[He].domain)}a(ne,le,we,{letter:ie,counterAxes:Ae[ie],overlayableAxes:ve(ie,K),grid:b.grid,overlayingDomain:Ue}),we("title.standoff"),ze(),le._input=ne}for(O=0;O<_e.length;){Y=_e[O++],K=u(Y),ie=K.charAt(0),A.isPlainObject(m[K])||(m[K]={}),ne=m[K],le=M.newContainer(b,K,ie+"axis"),de();var Oe={letter:ie,font:b.font,outerTicks:_[K],showGrid:!z[K],data:[],bgColor:ae,calendar:b.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:p,splomStash:((b._splomAxes||{})[ie]||{})[Y]};we("uirevision",b.uirevision),le.type=Se[Y]||"linear",t(ne,le,we,Oe,b),a(ne,le,we,{letter:ie,counterAxes:Ae[ie],overlayableAxes:ve(ie,K),grid:b.grid}),we("fixedrange"),ze(),le._input=ne}var Ce=f("rangeslider","handleDefaults"),ge=f("rangeselector","handleDefaults");for(O=0;O<G.length;O++)K=G[O],ne=m[K],le=b[K],Ce(m,b,K),le.type==="date"&&ge(ne,le,b,re,le.calendar),we("fixedrange");for(O=0;O<re.length;O++){K=re[O],ne=m[K],le=b[K];var pe=b[u(le.anchor)],Te=f("rangeslider","isVisible")(pe);we("fixedrange",Te)}s.handleDefaults(m,b,{axIds:ye.concat(_e).sort(c.idSort),axHasImage:B})}},42136:function(te,X,e){var A=e(49760).mix,P=e(22548),o=e(3400);te.exports=function(M,d,g,r){r=r||{};var t=r.dfltColor;function s(i,C){return o.coerce2(M,d,r.attributes,i,C)}var a=s("linecolor",t),c=s("linewidth"),u=g("showline",r.showLine||!!a||!!c);u||(delete d.linecolor,delete d.linewidth);var l=A(t,r.bgColor,r.blend||P.lightFraction).toRgbString(),y=s("gridcolor",l),h=s("gridwidth"),T=s("griddash"),f=g("showgrid",r.showGrid||!!y||!!h||!!T);if(f||(delete d.gridcolor,delete d.gridwidth,delete d.griddash),r.hasMinor){var n=A(d.gridcolor,r.bgColor,67).toRgbString(),v=s("minor.gridcolor",n),m=s("minor.gridwidth",d.gridwidth||1),b=s("minor.griddash",d.griddash||"solid"),E=g("minor.showgrid",!!v||!!m||!!b);E||(delete d.minor.gridcolor,delete d.minor.gridwidth,delete d.minor.griddash)}if(!r.noZeroLine){var p=s("zerolinecolor",t),S=s("zerolinewidth"),w=g("zeroline",r.showGrid||!!p||!!S);w||(delete d.zerolinecolor,delete d.zerolinewidth)}}},37668:function(te,X,e){var A=e(38248),P=e(3400);te.exports=function(L,M,d,g){var r=g.counterAxes||[],t=g.overlayableAxes||[],s=g.letter,a=g.grid,c=g.overlayingDomain,u,l,y,h,T,f;a&&(l=a._domains[s][a._axisMap[M._id]],u=a._anchors[M._id],l&&(y=a[s+"side"].split(" ")[0],h=a.domain[s][y==="right"||y==="top"?1:0])),l=l||[0,1],u=u||(A(L.position)?"free":r[0]||"free"),y=y||(s==="x"?"bottom":"left"),h=h||0,T=0,f=!1;var n=P.coerce(L,M,{anchor:{valType:"enumerated",values:["free"].concat(r),dflt:u}},"anchor"),v=P.coerce(L,M,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:y}},"side");if(n==="free"){if(s==="y"){var m=d("autoshift");m&&(h=v==="left"?c[0]:c[1],f=M.automargin?M.automargin:!0,T=v==="left"?-3:3),d("shift",T)}d("position",h)}d("automargin",f);var b=!1;if(t.length&&(b=P.coerce(L,M,{overlaying:{valType:"enumerated",values:[!1].concat(t),dflt:!1}},"overlaying")),!b){var E=d("domain",l);E[0]>E[1]-.000244140625&&(M.domain=l),P.noneOrAll(L.domain,M.domain,l),M.tickmode==="sync"&&(M.tickmode="auto")}return d("layer"),M}},42568:function(te,X,e){var A=e(85024);te.exports=function(o,L,M,d,g){g||(g={});var r=g.tickSuffixDflt,t=A(o),s=M("tickprefix");s&&M("showtickprefix",t);var a=M("ticksuffix",r);a&&M("showticksuffix",t)}},96312:function(te,X,e){var A=e(76808);te.exports=function(o,L,M,d){var g=L._template||{},r=L.type||g.type||"-";M("minallowed"),M("maxallowed");var t=M("range");if(!t){var s;!d.noInsiderange&&r!=="log"&&(s=M("insiderange"),s&&(s[0]===null||s[1]===null)&&(L.insiderange=!1,s=void 0),s&&(t=M("range",s)))}var a=L.getAutorangeDflt(t,d),c=M("autorange",a),u;t&&(t[0]===null&&t[1]===null||(t[0]===null||t[1]===null)&&(c==="reversed"||c===!0)||t[0]!==null&&(c==="min"||c==="max reversed")||t[1]!==null&&(c==="max"||c==="min reversed"))&&(t=void 0,delete L.range,L.autorange=!0,u=!0),u||(a=L.getAutorangeDflt(t,d),c=M("autorange",a)),c&&(A(M,c,t),(r==="linear"||r==="-")&&M("rangemode")),L.cleanRange()}},21160:function(te,X,e){var A=e(84284).FROM_BL;te.exports=function(o,L,M){M===void 0&&(M=A[o.constraintoward||"center"]);var d=[o.r2l(o.range[0]),o.r2l(o.range[1])],g=d[0]+(d[1]-d[0])*M;o.range=o._input.range=[o.l2r(g+(d[0]-g)*L),o.l2r(g+(d[1]-g)*L)],o.setScale()}},78344:function(te,X,e){var A=e(33428),P=e(94336).E9,o=e(3400),L=o.numberFormat,M=e(38248),d=o.cleanNumber,g=o.ms2DateTime,r=o.dateTime2ms,t=o.ensureNumber,s=o.isArrayOrTypedArray,a=e(39032),c=a.FP_SAFE,u=a.BADNUM,l=a.LOG_CLIP,y=a.ONEWEEK,h=a.ONEDAY,T=a.ONEHOUR,f=a.ONEMIN,n=a.ONESEC,v=e(79811),m=e(33816),b=m.HOUR_PATTERN,E=m.WEEKDAY_PATTERN;function p(w){return Math.pow(10,w)}function S(w){return w!=null}te.exports=function(i,C){C=C||{};var x=i._id||"x",k=x.charAt(0);function I(H,J){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&J&&i.range&&i.range.length===2){var ae=i.range[0],K=i.range[1];return .5*(ae+K-2*l*Math.abs(ae-K))}else return u}function B(H,J,ae,K){if((K||{}).msUTC&&M(H))return+H;var Y=r(H,ae||i.calendar);if(Y===u)if(M(H)){H=+H;var ie=Math.floor(o.mod(H+.05,1)*10),ne=Math.round(H-ie/10);Y=r(new Date(ne))+ie/10}else return u;return Y}function _(H,J,ae){return g(H,J,ae||i.calendar)}function z(H){return i._categories[Math.round(H)]}function O(H){if(S(H)){if(i._categoriesMap===void 0&&(i._categoriesMap={}),i._categoriesMap[H]!==void 0)return i._categoriesMap[H];i._categories.push(typeof H=="number"?String(H):H);var J=i._categories.length-1;return i._categoriesMap[H]=J,J}return u}function F(H,J){for(var ae=new Array(J),K=0;K<J;K++){var Y=(H[0]||[])[K],ie=(H[1]||[])[K];ae[K]=N([Y,ie])}return ae}function N(H){if(i._categoriesMap)return i._categoriesMap[H]}function V(H){var J=N(H);if(J!==void 0)return J;if(M(H))return+H}function j(H){return M(H)?+H:N(H)}function $(H,J,ae){return A.round(ae+J*H,2)}function q(H,J,ae){return(H-ae)/J}var oe=function(J){return M(J)?$(J,i._m,i._b):u},Z=function(H){return q(H,i._m,i._b)};if(i.rangebreaks){var G=k==="y";oe=function(H){if(!M(H))return u;var J=i._rangebreaks.length;if(!J)return $(H,i._m,i._b);var ae=G;i.range[0]>i.range[1]&&(ae=!ae);for(var K=ae?-1:1,Y=K*H,ie=0,ne=0;ne<J;ne++){var le=K*i._rangebreaks[ne].min,de=K*i._rangebreaks[ne].max;if(Y<le)break;if(Y>de)ie=ne+1;else{ie=Y<(le+de)/2?ne:ne+1;break}}var we=i._B[ie]||0;return isFinite(we)?$(H,i._m2,we):0},Z=function(H){var J=i._rangebreaks.length;if(!J)return q(H,i._m,i._b);for(var ae=0,K=0;K<J&&!(H<i._rangebreaks[K].pmin);K++)H>i._rangebreaks[K].pmax&&(ae=K+1);return q(H,i._m2,i._B[ae])}}i.c2l=i.type==="log"?I:t,i.l2c=i.type==="log"?p:t,i.l2p=oe,i.p2l=Z,i.c2p=i.type==="log"?function(H,J){return oe(I(H,J))}:oe,i.p2c=i.type==="log"?function(H){return p(Z(H))}:Z,["linear","-"].indexOf(i.type)!==-1?(i.d2r=i.r2d=i.d2c=i.r2c=i.d2l=i.r2l=d,i.c2d=i.c2r=i.l2d=i.l2r=t,i.d2p=i.r2p=function(H){return i.l2p(d(H))},i.p2d=i.p2r=Z,i.cleanPos=t):i.type==="log"?(i.d2r=i.d2l=function(H,J){return I(d(H),J)},i.r2d=i.r2c=function(H){return p(d(H))},i.d2c=i.r2l=d,i.c2d=i.l2r=t,i.c2r=I,i.l2d=p,i.d2p=function(H,J){return i.l2p(i.d2r(H,J))},i.p2d=function(H){return p(Z(H))},i.r2p=function(H){return i.l2p(d(H))},i.p2r=Z,i.cleanPos=t):i.type==="date"?(i.d2r=i.r2d=o.identity,i.d2c=i.r2c=i.d2l=i.r2l=B,i.c2d=i.c2r=i.l2d=i.l2r=_,i.d2p=i.r2p=function(H,J,ae){return i.l2p(B(H,0,ae))},i.p2d=i.p2r=function(H,J,ae){return _(Z(H),J,ae)},i.cleanPos=function(H){return o.cleanDate(H,u,i.calendar)}):i.type==="category"?(i.d2c=i.d2l=O,i.r2d=i.c2d=i.l2d=z,i.d2r=i.d2l_noadd=V,i.r2c=function(H){var J=j(H);return J!==void 0?J:i.fraction2r(.5)},i.l2r=i.c2r=t,i.r2l=j,i.d2p=function(H){return i.l2p(i.r2c(H))},i.p2d=function(H){return z(Z(H))},i.r2p=i.d2p,i.p2r=Z,i.cleanPos=function(H){return typeof H=="string"&&H!==""?H:t(H)}):i.type==="multicategory"&&(i.r2d=i.c2d=i.l2d=z,i.d2r=i.d2l_noadd=V,i.r2c=function(H){var J=V(H);return J!==void 0?J:i.fraction2r(.5)},i.r2c_just_indices=N,i.l2r=i.c2r=t,i.r2l=V,i.d2p=function(H){return i.l2p(i.r2c(H))},i.p2d=function(H){return z(Z(H))},i.r2p=i.d2p,i.p2r=Z,i.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:t(H)},i.setupMultiCategory=function(H){var J=i._traceIndices,ae,K,Y=i._matchGroup;if(Y&&i._categories.length===0){for(var ie in Y)if(ie!==x){var ne=C[v.id2name(ie)];J=J.concat(ne._traceIndices)}}var le=[[0,{}],[0,{}]],de=[];for(ae=0;ae<J.length;ae++){var we=H[J[ae]];if(k in we){var me=we[k],Le=we._length||o.minRowLength(me);if(s(me[0])&&s(me[1]))for(K=0;K<Le;K++){var ve=me[0][K],Ae=me[1][K];S(ve)&&S(Ae)&&(de.push([ve,Ae]),ve in le[0][1]||(le[0][1][ve]=le[0][0]++),Ae in le[1][1]||(le[1][1][Ae]=le[1][0]++))}}}for(de.sort(function(ye,Se){var _e=le[0][1],ze=_e[ye[0]]-_e[Se[0]];if(ze)return ze;var Ie=le[1][1];return Ie[ye[1]]-Ie[Se[1]]}),ae=0;ae<de.length;ae++)O(de[ae])}),i.fraction2r=function(H){var J=i.r2l(i.range[0]),ae=i.r2l(i.range[1]);return i.l2r(J+H*(ae-J))},i.r2fraction=function(H){var J=i.r2l(i.range[0]),ae=i.r2l(i.range[1]);return(i.r2l(H)-J)/(ae-J)},i.limitRange=function(H){var J=i.minallowed,ae=i.maxallowed;if(!(J===void 0&&ae===void 0)){H||(H="range");var K=o.nestedProperty(i,H).get(),Y=o.simpleMap(K,i.r2l),ie=Y[1]<Y[0];ie&&Y.reverse();var ne=o.simpleMap([J,ae],i.r2l);if(J!==void 0&&Y[0]<ne[0]&&(K[ie?1:0]=J),ae!==void 0&&Y[1]>ne[1]&&(K[ie?0:1]=ae),K[0]===K[1]){var le=i.l2r(J),de=i.l2r(ae);if(J!==void 0){var we=le+1;ae!==void 0&&(we=Math.min(we,de)),K[ie?1:0]=we}if(ae!==void 0){var me=de+1;J!==void 0&&(me=Math.max(me,le)),K[ie?0:1]=me}}}},i.cleanRange=function(H,J){i._cleanRange(H,J),i.limitRange(H)},i._cleanRange=function(H,J){J||(J={}),H||(H="range");var ae=o.nestedProperty(i,H).get(),K,Y;if(i.type==="date"?Y=o.dfltRange(i.calendar):k==="y"?Y=m.DFLTRANGEY:i._name==="realaxis"?Y=[0,1]:Y=J.dfltRange||m.DFLTRANGEX,Y=Y.slice(),(i.rangemode==="tozero"||i.rangemode==="nonnegative")&&(Y[0]=0),!ae||ae.length!==2){o.nestedProperty(i,H).set(Y);return}var ie=ae[0]===null,ne=ae[1]===null;for(i.type==="date"&&!i.autorange&&(ae[0]=o.cleanDate(ae[0],u,i.calendar),ae[1]=o.cleanDate(ae[1],u,i.calendar)),K=0;K<2;K++)if(i.type==="date"){if(!o.isDateTime(ae[K],i.calendar)){i[H]=Y;break}if(i.r2l(ae[0])===i.r2l(ae[1])){var le=o.constrain(i.r2l(ae[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);ae[0]=i.l2r(le-1e3),ae[1]=i.l2r(le+1e3);break}}else{if(!M(ae[K]))if(!(ie||ne)&&M(ae[1-K]))ae[K]=ae[1-K]*(K?10:.1);else{i[H]=Y;break}if(ae[K]<-c?ae[K]=-c:ae[K]>c&&(ae[K]=c),ae[0]===ae[1]){var de=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=de,ae[1]+=de}}},i.setScale=function(H){var J=C._size;if(i.overlaying){var ae=v.getFromId({_fullLayout:C},i.overlaying);i.domain=ae.domain}var K=H&&i._r?"_r":"range",Y=i.calendar;i.cleanRange(K);var ie=i.r2l(i[K][0],Y),ne=i.r2l(i[K][1],Y),le=k==="y";if(le?(i._offset=J.t+(1-i.domain[1])*J.h,i._length=J.h*(i.domain[1]-i.domain[0]),i._m=i._length/(ie-ne),i._b=-i._m*ne):(i._offset=J.l+i.domain[0]*J.w,i._length=J.w*(i.domain[1]-i.domain[0]),i._m=i._length/(ne-ie),i._b=-i._m*ie),i._rangebreaks=[],i._lBreaks=0,i._m2=0,i._B=[],i.rangebreaks){var de,we;if(i._rangebreaks=i.locateBreaks(Math.min(ie,ne),Math.max(ie,ne)),i._rangebreaks.length){for(de=0;de<i._rangebreaks.length;de++)we=i._rangebreaks[de],i._lBreaks+=Math.abs(we.max-we.min);var me=le;ie>ne&&(me=!me),me&&i._rangebreaks.reverse();var Le=me?-1:1;for(i._m2=Le*i._length/(Math.abs(ne-ie)-i._lBreaks),i._B.push(-i._m2*(le?ne:ie)),de=0;de<i._rangebreaks.length;de++)we=i._rangebreaks[de],i._B.push(i._B[i._B.length-1]-Le*i._m2*(we.max-we.min));for(de=0;de<i._rangebreaks.length;de++)we=i._rangebreaks[de],we.pmin=oe(we.min),we.pmax=oe(we.max)}}if(!isFinite(i._m)||!isFinite(i._b)||i._length<0)throw C._replotting=!1,new Error("Something went wrong with axis scaling")},i.maskBreaks=function(H){var J=i.rangebreaks||[],ae,K,Y,ie,ne;J._cachedPatterns||(J._cachedPatterns=J.map(function(_e){return _e.enabled&&_e.bounds?o.simpleMap(_e.bounds,_e.pattern?d:i.d2c):null})),J._cachedValues||(J._cachedValues=J.map(function(_e){return _e.enabled&&_e.values?o.simpleMap(_e.values,i.d2c).sort(o.sorterAsc):null}));for(var le=0;le<J.length;le++){var de=J[le];if(de.enabled){if(de.bounds){var we=de.pattern;switch(ae=J._cachedPatterns[le],K=ae[0],Y=ae[1],we){case E:ne=new Date(H),ie=ne.getUTCDay(),K>Y&&(Y+=7,ie<K&&(ie+=7));break;case b:ne=new Date(H);var me=ne.getUTCHours(),Le=ne.getUTCMinutes(),ve=ne.getUTCSeconds(),Ae=ne.getUTCMilliseconds();ie=me+(Le/60+ve/3600+Ae/36e5),K>Y&&(Y+=24,ie<K&&(ie+=24));break;case"":ie=H;break}if(ie>=K&&ie<Y)return u}else for(var ye=J._cachedValues[le],Se=0;Se<ye.length;Se++)if(K=ye[Se],Y=K+de.dvalue,H>=K&&H<Y)return u}}return H},i.locateBreaks=function(H,J){var ae,K,Y,ie,ne=[];if(!i.rangebreaks)return ne;var le=i.rangebreaks.slice().sort(function(Ie,Ne){return Ie.pattern===E&&Ne.pattern===b?-1:Ne.pattern===E&&Ie.pattern===b?1:0}),de=function(Ie,Ne){if(Ie=o.constrain(Ie,H,J),Ne=o.constrain(Ne,H,J),Ie!==Ne){for(var et=!0,st=0;st<ne.length;st++){var Ze=ne[st];Ie<Ze.max&&Ne>=Ze.min&&(Ie<Ze.min&&(Ze.min=Ie),Ne>Ze.max&&(Ze.max=Ne),et=!1)}et&&ne.push({min:Ie,max:Ne})}};for(ae=0;ae<le.length;ae++){var we=le[ae];if(we.enabled)if(we.bounds){var me=H,Le=J;we.pattern&&(me=Math.floor(me)),K=o.simpleMap(we.bounds,we.pattern?d:i.r2l),Y=K[0],ie=K[1];var ve=new Date(me),Ae,ye;switch(we.pattern){case E:ye=y,Ae=((ie<Y?7:0)+(ie-Y))*h,me+=Y*h-(ve.getUTCDay()*h+ve.getUTCHours()*T+ve.getUTCMinutes()*f+ve.getUTCSeconds()*n+ve.getUTCMilliseconds());break;case b:ye=h,Ae=((ie<Y?24:0)+(ie-Y))*T,me+=Y*T-(ve.getUTCHours()*T+ve.getUTCMinutes()*f+ve.getUTCSeconds()*n+ve.getUTCMilliseconds());break;default:me=Math.min(K[0],K[1]),Le=Math.max(K[0],K[1]),ye=Le-me,Ae=ye}for(var Se=me;Se<Le;Se+=ye)de(Se,Se+Ae)}else for(var _e=o.simpleMap(we.values,i.d2c),ze=0;ze<_e.length;ze++)Y=_e[ze],ie=Y+we.dvalue,de(Y,ie)}return ne.sort(function(Ie,Ne){return Ie.min-Ne.min}),ne},i.makeCalcdata=function(H,J,ae){var K,Y,ie,ne,le=i.type,de=le==="date"&&H[J+"calendar"];if(J in H){if(K=H[J],ne=H._length||o.minRowLength(K),o.isTypedArray(K)&&(le==="linear"||le==="log")){if(ne===K.length)return K;if(K.subarray)return K.subarray(0,ne)}if(le==="multicategory")return F(K,ne);for(Y=new Array(ne),ie=0;ie<ne;ie++)Y[ie]=i.d2c(K[ie],0,de,ae)}else{var we=J+"0"in H?i.d2c(H[J+"0"],0,de):0,me=H["d"+J]?Number(H["d"+J]):1;for(K=H[{x:"y",y:"x"}[J]],ne=H._length||K.length,Y=new Array(ne),ie=0;ie<ne;ie++)Y[ie]=we+ie*me}if(i.rangebreaks)for(ie=0;ie<ne;ie++)Y[ie]=i.maskBreaks(Y[ie]);return Y},i.isValidRange=function(H,J){return Array.isArray(H)&&H.length===2&&(J&&H[0]===null||M(i.r2l(H[0])))&&(J&&H[1]===null||M(i.r2l(H[1])))},i.getAutorangeDflt=function(H,J){var ae=!i.isValidRange(H,"nullOk");return ae&&J&&J.reverseDflt?ae="reversed":H&&(H[0]===null&&H[1]===null?ae=!0:H[0]===null&&H[1]!==null?ae="min":H[0]!==null&&H[1]===null&&(ae="max")),ae},i.isReversed=function(){var H=i.autorange;return H==="reversed"||H==="min reversed"||H==="max reversed"},i.isPtWithinRange=function(H,J){var ae=i.c2l(H[k],null,J),K=i.r2l(i.range[0]),Y=i.r2l(i.range[1]);return K<Y?K<=ae&&ae<=Y:Y<=ae&&ae<=K},i._emptyCategories=function(){i._categories=[],i._categoriesMap={}},i.clearCalc=function(){var H=i._matchGroup;if(H){var J=null,ae=null;for(var K in H){var Y=C[v.id2name(K)];if(Y._categories){J=Y._categories,ae=Y._categoriesMap;break}}J&&ae?(i._categories=J,i._categoriesMap=ae):i._emptyCategories()}else i._emptyCategories();if(i._initialCategories)for(var ie=0;ie<i._initialCategories.length;ie++)O(i._initialCategories[ie])},i.sortByInitialCategories=function(){var H=[];if(i._emptyCategories(),i._initialCategories)for(var J=0;J<i._initialCategories.length;J++)O(i._initialCategories[J]);H=H.concat(i._traceIndices);var ae=i._matchGroup;for(var K in ae)if(x!==K){var Y=C[v.id2name(K)];Y._categories=i._categories,Y._categoriesMap=i._categoriesMap,H=H.concat(Y._traceIndices)}return H};var re=C._d3locale;i.type==="date"&&(i._dateFormat=re?re.timeFormat:P,i._extraFormat=C._extraFormat),i._separators=C.separators,i._numFormat=re?re.numberFormat:L,delete i._minDtick,delete i._forceTick0}},85024:function(te){te.exports=function(e){var A=["showexponent","showtickprefix","showticksuffix"],P=A.filter(function(L){return e[L]!==void 0}),o=function(L){return e[L]===e[P[0]]};if(P.every(o)||P.length===1)return e[P[0]]}},95936:function(te,X,e){var A=e(3400),P=e(76308).contrast,o=e(94724),L=e(85024),M=e(51272);te.exports=function(r,t,s,a,c){c||(c={});var u=s("labelalias");A.isPlainObject(u)||delete t.labelalias;var l=L(r),y=s("showticklabels");if(y){var h=c.font||{},T=t.color,f=t.ticklabelposition||"",n=f.indexOf("inside")!==-1?P(c.bgColor):T&&T!==o.color.dflt?T:h.color;if(A.coerceFont(s,"tickfont",{family:h.family,size:h.size,color:n}),!c.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&s("ticklabelstep"),!c.noAng){var v=s("tickangle");!c.noAutotickangles&&v==="auto"&&s("autotickangles")}if(a!=="category"){var m=s("tickformat");M(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:d}),t.tickformatstops.length||delete t.tickformatstops,!c.noExp&&!m&&a!=="date"&&(s("showexponent",l),s("exponentformat"),s("minexponent"),s("separatethousands"))}}};function d(g,r){function t(a,c){return A.coerce(g,r,o.tickformatstops,a,c)}var s=t("enabled");s&&(t("dtickrange"),t("value"))}},25404:function(te,X,e){var A=e(3400),P=e(94724);te.exports=function(L,M,d,g){var r=g.isMinor,t=r?L.minor||{}:L,s=r?M.minor:M,a=r?P.minor:P,c=r?"minor.":"",u=A.coerce2(t,s,a,"ticklen",r?(M.ticklen||5)*.6:void 0),l=A.coerce2(t,s,a,"tickwidth",r?M.tickwidth||1:void 0),y=A.coerce2(t,s,a,"tickcolor",(r?M.tickcolor:void 0)||s.color),h=d(c+"ticks",!r&&g.outerTicks||u||l||y?"outside":"");h||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}},26332:function(te,X,e){var A=e(98728),P=e(3400).isArrayOrTypedArray,o=e(38116).isTypedArraySpec,L=e(38116).decodeTypedArraySpec;te.exports=function(d,g,r,t,s){s||(s={});var a=s.isMinor,c=a?d.minor||{}:d,u=a?g.minor:g,l=a?"minor.":"";function y(E){var p=c[E];return o(p)&&(p=L(p)),p!==void 0?p:(u._template||{})[E]}var h=y("tick0"),T=y("dtick"),f=y("tickvals"),n=P(f)?"array":T?"linear":"auto",v=r(l+"tickmode",n);if(v==="auto"||v==="sync")r(l+"nticks");else if(v==="linear"){var m=u.dtick=A.dtick(T,t);u.tick0=A.tick0(h,t,g.calendar,m)}else if(t!=="multicategory"){var b=r(l+"tickvals");b===void 0?u.tickmode="auto":a||r("ticktext")}}},73736:function(te,X,e){var A=e(33428),P=e(24040),o=e(3400),L=e(43616),M=e(54460);te.exports=function(g,r,t,s){var a=g._fullLayout;if(r.length===0){M.redrawComponents(g);return}function c(b){var E=b.xaxis,p=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(L.setTranslate,0,0).call(L.setScale,1,1),b.plot.call(L.setTranslate,E._offset,p._offset).call(L.setScale,1,1);var S=b.plot.selectAll(".scatterlayer .trace");S.selectAll(".point").call(L.setPointGroupScale,1,1),S.selectAll(".textpoint").call(L.setTextPointsScale,1,1),S.call(L.hideOutsideRangePoints,b)}function u(b,E){var p=b.plotinfo,S=p.xaxis,w=p.yaxis,i=S._length,C=w._length,x=!!b.xr1,k=!!b.yr1,I=[];if(x){var B=o.simpleMap(b.xr0,S.r2l),_=o.simpleMap(b.xr1,S.r2l),z=B[1]-B[0],O=_[1]-_[0];I[0]=(B[0]*(1-E)+E*_[0]-B[0])/(B[1]-B[0])*i,I[2]=i*(1-E+E*O/z),S.range[0]=S.l2r(B[0]*(1-E)+E*_[0]),S.range[1]=S.l2r(B[1]*(1-E)+E*_[1])}else I[0]=0,I[2]=i;if(k){var F=o.simpleMap(b.yr0,w.r2l),N=o.simpleMap(b.yr1,w.r2l),V=F[1]-F[0],j=N[1]-N[0];I[1]=(F[1]*(1-E)+E*N[1]-F[1])/(F[0]-F[1])*C,I[3]=C*(1-E+E*j/V),w.range[0]=S.l2r(F[0]*(1-E)+E*N[0]),w.range[1]=w.l2r(F[1]*(1-E)+E*N[1])}else I[1]=0,I[3]=C;M.drawOne(g,S,{skipTitle:!0}),M.drawOne(g,w,{skipTitle:!0}),M.redrawComponents(g,[S._id,w._id]);var $=x?i/I[2]:1,q=k?C/I[3]:1,oe=x?I[0]:0,Z=k?I[1]:0,G=x?I[0]/I[2]*i:0,re=k?I[1]/I[3]*C:0,H=S._offset-G,J=w._offset-re;p.clipRect.call(L.setTranslate,oe,Z).call(L.setScale,1/$,1/q),p.plot.call(L.setTranslate,H,J).call(L.setScale,$,q),L.setPointGroupScale(p.zoomScalePts,1/$,1/q),L.setTextPointsScale(p.zoomScaleTxt,1/$,1/q)}var l;s&&(l=s());function y(){for(var b={},E=0;E<r.length;E++){var p=r[E],S=p.plotinfo.xaxis,w=p.plotinfo.yaxis;p.xr1&&(b[S._name+".range"]=p.xr1.slice()),p.yr1&&(b[w._name+".range"]=p.yr1.slice())}return l&&l(),P.call("relayout",g,b).then(function(){for(var i=0;i<r.length;i++)c(r[i].plotinfo)})}function h(){for(var b={},E=0;E<r.length;E++){var p=r[E],S=p.plotinfo.xaxis,w=p.plotinfo.yaxis;p.xr0&&(b[S._name+".range"]=p.xr0.slice()),p.yr0&&(b[w._name+".range"]=p.yr0.slice())}return P.call("relayout",g,b).then(function(){for(var i=0;i<r.length;i++)c(r[i].plotinfo)})}var T,f,n,v=A.ease(t.easing);g._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(n),n=null,h()});function m(){f=Date.now();for(var b=Math.min(1,(f-T)/t.duration),E=v(b),p=0;p<r.length;p++)u(r[p],E);f-T>t.duration?(y(),n=window.cancelAnimationFrame(m)):n=window.requestAnimationFrame(m)}return T=Date.now(),n=window.requestAnimationFrame(m),Promise.resolve()}},14944:function(te,X,e){var A=e(24040).traceIs,P=e(52976);te.exports=function(r,t,s,a){s("autotypenumbers",a.autotypenumbersDflt);var c=s("type",(a.splomStash||{}).type);c==="-"&&(o(t,a.data),t.type==="-"?t.type="linear":r.type=t.type)};function o(g,r){if(g.type==="-"){var t=g._id,s=t.charAt(0),a;t.indexOf("scene")!==-1&&(t=s);var c=L(r,t,s);if(c){if(c.type==="histogram"&&s==={v:"y",h:"x"}[c.orientation||"v"]){g.type="linear";return}var u=s+"calendar",l=c[u],y={noMultiCategory:!A(c,"cartesian")||A(c,"noMultiCategory")};if(c.type==="box"&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=g.autotypenumbers,d(c,s)){var h=M(c),T=[];for(a=0;a<r.length;a++){var f=r[a];!A(f,"box-violin")||(f[s+"axis"]||s)!==t||(f[h]!==void 0?T.push(f[h][0]):f.name!==void 0?T.push(f.name):T.push("text"),f[u]!==l&&(l=void 0))}g.type=P(T,l,y)}else if(c.type==="splom"){var n=c.dimensions,v=n[c._axesDim[t]];v.visible&&(g.type=P(v.values,l,y))}else g.type=P(c[s]||[c[s+"0"]],l,y)}}}function L(g,r,t){for(var s=0;s<g.length;s++){var a=g[s];if(a.type==="splom"&&a._length>0&&(a["_"+t+"axes"]||{})[r])return a;if((a[t+"axis"]||t)===r){if(d(a,t))return a;if((a[t]||[]).length||a[t+"0"])return a}}}function M(g){return{v:"x",h:"y"}[g.orientation||"v"]}function d(g,r){var t=M(g),s=A(g,"box-violin"),a=A(g._fullInput||{},"candlestick");return s&&!a&&r===t&&g[t]===void 0&&g[t+"0"]===void 0}},62460:function(te,X,e){var A=e(24040),P=e(3400);X.manageCommandObserver=function(r,t,s,a){var c={},u=!0;t&&t._commandObserver&&(c=t._commandObserver),c.cache||(c.cache={}),c.lookupTable={};var l=X.hasSimpleAPICommandBindings(r,s,c.lookupTable);if(t&&t._commandObserver){if(l)return c;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,c}if(l){o(r,l,c.cache),c.check=function(){if(u){var f=o(r,l,c.cache);return f.changed&&a&&c.lookupTable[f.value]!==void 0&&(c.disable(),Promise.resolve(a({value:f.value,type:l.type,prop:l.prop,traces:l.traces,index:c.lookupTable[f.value]})).then(c.enable,c.enable)),f.changed}};for(var y=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h<y.length;h++)r._internalOn(y[h],c.check);c.remove=function(){for(var T=0;T<y.length;T++)r._removeInternalListener(y[T],c.check)}}else P.log("Unable to automatically bind plot updates to API command"),c.lookupTable={},c.remove=function(){};return c.disable=function(){u=!1},c.enable=function(){u=!0},t&&(t._commandObserver=c),c},X.hasSimpleAPICommandBindings=function(r,t,s){var a,c=t.length,u;for(a=0;a<c;a++){var l,y=t[a],h=y.method,T=y.args;if(Array.isArray(T)||(T=[]),!h)return!1;var f=X.computeAPICommandBindings(r,h,T);if(f.length!==1)return!1;if(!u)u=f[0],Array.isArray(u.traces)&&u.traces.sort();else{if(l=f[0],l.type!==u.type||l.prop!==u.prop)return!1;if(Array.isArray(u.traces))if(Array.isArray(l.traces)){l.traces.sort();for(var n=0;n<u.traces.length;n++)if(u.traces[n]!==l.traces[n])return!1}else return!1;else if(l.prop!==u.prop)return!1}l=f[0];var v=l.value;if(Array.isArray(v))if(v.length===1)v=v[0];else return!1;s&&(s[v]=a)}return u};function o(r,t,s){var a,c,u,l=!1;if(t.type==="data")a=r._fullData[t.traces!==null?t.traces[0]:0];else if(t.type==="layout")a=r._fullLayout;else return!1;return c=P.nestedProperty(a,t.prop).get(),u=s[t.type]=s[t.type]||{},u.hasOwnProperty(t.prop)&&u[t.prop]!==c&&(l=!0),u[t.prop]=c,{changed:l,value:c}}X.executeAPICommand=function(r,t,s){if(t==="skip")return Promise.resolve();var a=A.apiMethodRegistry[t],c=[r];Array.isArray(s)||(s=[]);for(var u=0;u<s.length;u++)c.push(s[u]);return a.apply(null,c).catch(function(l){return P.warn("API call to Plotly."+t+" rejected.",l),Promise.reject(l)})},X.computeAPICommandBindings=function(r,t,s){var a;switch(Array.isArray(s)||(s=[]),t){case"restyle":a=d(r,s);break;case"relayout":a=M(r,s);break;case"update":a=d(r,[s[0],s[2]]).concat(M(r,[s[1]]));break;case"animate":a=L(r,s);break;default:a=[]}return a};function L(r,t){return Array.isArray(t[0])&&t[0].length===1&&["string","number"].indexOf(typeof t[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:t[0][0].toString()}]:[]}function M(r,t){var s=[],a=t[0],c={};if(typeof a=="string")c[a]=t[1];else if(P.isPlainObject(a))c=a;else return s;return g(c,function(u,l,y){s.push({type:"layout",prop:u,value:y})},"",0),s}function d(r,t){var s,a,c,u,l=[];if(a=t[0],c=t[1],s=t[2],u={},typeof a=="string")u[a]=c;else if(P.isPlainObject(a))u=a,s===void 0&&(s=c);else return l;return s===void 0&&(s=null),g(u,function(y,h,T){var f,n;if(Array.isArray(T)){n=T.slice();var v=Math.min(n.length,r.data.length);s&&(v=Math.min(v,s.length)),f=[];for(var m=0;m<v;m++)f[m]=s?s[m]:m}else n=T,f=s?s.slice():null;if(f===null)Array.isArray(n)&&(n=n[0]);else if(Array.isArray(f)){if(!Array.isArray(n)){var b=n;n=[];for(var E=0;E<f.length;E++)n[E]=b}n.length=Math.min(f.length,n.length)}l.push({type:"data",prop:y,traces:f,value:n})},"",0),l}function g(r,t,s,a){Object.keys(r).forEach(function(c){var u=r[c];if(c[0]!=="_"){var l=s+(a>0?".":"")+c;P.isPlainObject(u)?g(u,t,l,a+1):t(l,c,u)}})}},86968:function(te,X,e){var A=e(92880).extendFlat;X.u=function(P,o){P=P||{},o=o||{};var L={valType:"info_array",editType:P.editType,items:[{valType:"number",min:0,max:1,editType:P.editType},{valType:"number",min:0,max:1,editType:P.editType}],dflt:[0,1]};P.name&&P.name+"",P.trace,o.description&&""+o.description;var M={x:A({},L,{}),y:A({},L,{}),editType:P.editType};return P.noGridCell||(M.row={valType:"integer",min:0,dflt:0,editType:P.editType},M.column={valType:"integer",min:0,dflt:0,editType:P.editType}),M},X.Q=function(P,o,L,M){var d=M&&M.x||[0,1],g=M&&M.y||[0,1],r=o.grid;if(r){var t=L("domain.column");t!==void 0&&(t<r.columns?d=r._domains.x[t]:delete P.domain.column);var s=L("domain.row");s!==void 0&&(s<r.rows?g=r._domains.y[s]:delete P.domain.row)}var a=L("domain.x",d),c=L("domain.y",g);a[0]<a[1]||(P.domain.x=d.slice()),c[0]<c[1]||(P.domain.y=g.slice())}},25376:function(te){te.exports=function(X){var e=X.editType,A=X.colorEditType;A===void 0&&(A=e);var P={family:{valType:"string",noBlank:!0,strict:!0,editType:e},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:A},editType:e};return X.autoSize&&(P.size.dflt="auto"),X.autoColor&&(P.color.dflt="auto"),X.arrayOk&&(P.family.arrayOk=!0,P.size.arrayOk=!0,P.color.arrayOk=!0),P}},16672:function(te){te.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},79552:function(te,X){X.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","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},X.axesNames=["lonaxis","lataxis"],X.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},X.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},X.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]}},X.clipPad=.001,X.precision=.1,X.landColor="#F0DC82",X.waterColor="#3399FF",X.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},X.sphereSVG={type:"Sphere"},X.fillLayers={ocean:1,land:1,lakes:1},X.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},X.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],X.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],X.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},43520:function(te,X,e){var A=e(33428),P=e(83356),o=P.geoPath,L=P.geoDistance,M=e(87108),d=e(24040),g=e(3400),r=g.strTranslate,t=e(76308),s=e(43616),a=e(93024),c=e(7316),u=e(54460),l=e(19280).getAutoRange,y=e(86476),h=e(22676).prepSelect,T=e(22676).clearOutline,f=e(22676).selectOnClick,n=e(79248),v=e(79552),m=e(27144),b=e(59972),E=e(55712).NO;function p(x){this.id=x.id,this.graphDiv=x.graphDiv,this.container=x.container,this.topojsonURL=x.topojsonURL,this.isStatic=x.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 S=p.prototype;te.exports=function(k){return new p(k)},S.plot=function(x,k,I,B){var _=this;if(B)return _.update(x,k,!0);_._geoCalcData=x,_._fullLayout=k;var z=k[this.id],O=[],F=!1;for(var N in v.layerNameToAdjective)if(N!=="frame"&&z["show"+N]){F=!0;break}for(var V=!1,j=0;j<x.length;j++){var $=x[0][0].trace;$._geo=_,$.locationmode&&(F=!0);var q=$.marker;if(q){var oe=q.angle,Z=q.angleref;(oe||Z==="north"||Z==="previous")&&(V=!0)}}if(this._hasMarkerAngles=V,F){var G=b.getTopojsonName(z);(_.topojson===null||G!==_.topojsonName)&&(_.topojsonName=G,PlotlyGeoAssets.topojson[_.topojsonName]===void 0&&O.push(_.fetchTopojson()))}O=O.concat(m.fetchTraceGeoData(x)),I.push(new Promise(function(re,H){Promise.all(O).then(function(){_.topojson=PlotlyGeoAssets.topojson[_.topojsonName],_.update(x,k),re()}).catch(H)}))},S.fetchTopojson=function(){var x=this,k=b.getTopojsonPath(x.topojsonURL,x.topojsonName);return new Promise(function(I,B){A.json(k,function(_,z){if(_)return _.status===404?B(new Error(["plotly.js could not find topojson file at",k+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):B(new Error(["unexpected error while fetching topojson file at",k].join(" ")));PlotlyGeoAssets.topojson[x.topojsonName]=z,I()})})},S.update=function(x,k,I){var B=k[this.id];this.hasChoropleth=!1;for(var _=0;_<x.length;_++){var z=x[_],O=z[0].trace;O.type==="choropleth"&&(this.hasChoropleth=!0),O.visible===!0&&O._length>0&&O._module.calcGeoJSON(z,k)}if(!I){var F=this.updateProjection(x,k);if(F)return;(!this.viewInitial||this.scope!==B.scope)&&this.saveViewInitial(B)}this.scope=B.scope,this.updateBaseLayers(k,B),this.updateDims(k,B),this.updateFx(k,B),c.generalUpdatePerTraceModule(this.graphDiv,this,x,B);var N=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=N.selectAll(".point"),this.dataPoints.text=N.selectAll("text"),this.dataPaths.line=N.selectAll(".js-line");var V=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=V.selectAll("path"),this._render()},S.updateProjection=function(x,k){var I=this.graphDiv,B=k[this.id],_=k._size,z=B.domain,O=B.projection,F=B.lonaxis,N=B.lataxis,V=F._ax,j=N._ax,$=this.projection=w(B),q=[[_.l+_.w*z.x[0],_.t+_.h*(1-z.y[1])],[_.l+_.w*z.x[1],_.t+_.h*(1-z.y[0])]],oe=B.center||{},Z=O.rotation||{},G=F.range||[],re=N.range||[];if(B.fitbounds){V._length=q[1][0]-q[0][0],j._length=q[1][1]-q[0][1],V.range=l(I,V),j.range=l(I,j);var H=(V.range[0]+V.range[1])/2,J=(j.range[0]+j.range[1])/2;if(B._isScoped)oe={lon:H,lat:J};else if(B._isClipped){oe={lon:H,lat:J},Z={lon:H,lat:J,roll:Z.roll};var ae=O.type,K=v.lonaxisSpan[ae]/2||180,Y=v.lataxisSpan[ae]/2||90;G=[H-K,H+K],re=[J-Y,J+Y]}else oe={lon:H,lat:J},Z={lon:H,lat:Z.lat,roll:Z.roll}}$.center([oe.lon-Z.lon,oe.lat-Z.lat]).rotate([-Z.lon,-Z.lat,Z.roll]).parallels(O.parallels);var ie=C(G,re);$.fitExtent(q,ie);var ne=this.bounds=$.getBounds(ie),le=this.fitScale=$.scale(),de=$.translate();if(B.fitbounds){var we=$.getBounds(C(V.range,j.range)),me=Math.min((ne[1][0]-ne[0][0])/(we[1][0]-we[0][0]),(ne[1][1]-ne[0][1])/(we[1][1]-we[0][1]));isFinite(me)?$.scale(me*le):g.warn("Something went wrong during"+this.id+"fitbounds computations.")}else $.scale(O.scale*le);var Le=this.midPt=[(ne[0][0]+ne[1][0])/2,(ne[0][1]+ne[1][1])/2];if($.translate([de[0]+(Le[0]-de[0]),de[1]+(Le[1]-de[1])]).clipExtent(ne),B._isAlbersUsa){var ve=$([oe.lon,oe.lat]),Ae=$.translate();$.translate([Ae[0]-(ve[0]-Ae[0]),Ae[1]-(ve[1]-Ae[1])])}},S.updateBaseLayers=function(x,k){var I=this,B=I.topojson,_=I.layers,z=I.basePaths;function O(q){return q==="lonaxis"||q==="lataxis"}function F(q){return!!v.lineLayers[q]}function N(q){return!!v.fillLayers[q]}var V=this.hasChoropleth?v.layersForChoropleth:v.layers,j=V.filter(function(q){return F(q)||N(q)?k["show"+q]:O(q)?k[q].showgrid:!0}),$=I.framework.selectAll(".layer").data(j,String);$.exit().each(function(q){delete _[q],delete z[q],A.select(this).remove()}),$.enter().append("g").attr("class",function(q){return"layer "+q}).each(function(q){var oe=_[q]=A.select(this);q==="bg"?I.bgRect=oe.append("rect").style("pointer-events","all"):O(q)?z[q]=oe.append("path").style("fill","none"):q==="backplot"?oe.append("g").classed("choroplethlayer",!0):q==="frontplot"?oe.append("g").classed("scatterlayer",!0):F(q)?z[q]=oe.append("path").style("fill","none").style("stroke-miterlimit",2):N(q)&&(z[q]=oe.append("path").style("stroke","none"))}),$.order(),$.each(function(q){var oe=z[q],Z=v.layerNameToAdjective[q];q==="frame"?oe.datum(v.sphereSVG):F(q)||N(q)?oe.datum(E(B,B.objects[q])):O(q)&&oe.datum(i(q,k,x)).call(t.stroke,k[q].gridcolor).call(s.dashLine,k[q].griddash,k[q].gridwidth),F(q)?oe.call(t.stroke,k[Z+"color"]).call(s.dashLine,"",k[Z+"width"]):N(q)&&oe.call(t.fill,k[Z+"color"])})},S.updateDims=function(x,k){var I=this.bounds,B=(k.framewidth||0)/2,_=I[0][0]-B,z=I[0][1]-B,O=I[1][0]-_+B,F=I[1][1]-z+B;s.setRect(this.clipRect,_,z,O,F),this.bgRect.call(s.setRect,_,z,O,F).call(t.fill,k.bgcolor),this.xaxis._offset=_,this.xaxis._length=O,this.yaxis._offset=z,this.yaxis._length=F},S.updateFx=function(x,k){var I=this,B=I.graphDiv,_=I.bgRect,z=x.dragmode,O=x.clickmode;if(I.isStatic)return;function F(){var $=I.viewInitial,q={};for(var oe in $)q[I.id+"."+oe]=$[oe];d.call("_guiRelayout",B,q),B.emit("plotly_doubleclick",null)}function N($){return I.projection.invert([$[0]+I.xaxis._offset,$[1]+I.yaxis._offset])}var V=function($,q){if(q.isRect){var oe=$.range={};oe[I.id]=[N([q.xmin,q.ymin]),N([q.xmax,q.ymax])]}else{var Z=$.lassoPoints={};Z[I.id]=q.map(N)}},j={element:I.bgRect.node(),gd:B,plotinfo:{id:I.id,xaxis:I.xaxis,yaxis:I.yaxis,fillRangeItems:V},xaxes:[I.xaxis],yaxes:[I.yaxis],subplot:I.id,clickFn:function($){$===2&&T(B)}};z==="pan"?(_.node().onmousedown=null,_.call(n(I,k)),_.on("dblclick.zoom",F),B._context._scrollZoom.geo||_.on("wheel.zoom",null)):(z==="select"||z==="lasso")&&(_.on(".zoom",null),j.prepFn=function($,q,oe){h($,q,oe,j,z)},y.init(j)),_.on("mousemove",function(){var $=I.projection.invert(g.getPositionFromD3Event());if(!$)return y.unhover(B,A.event);I.xaxis.p2c=function(){return $[0]},I.yaxis.p2c=function(){return $[1]},a.hover(B,A.event,I.id)}),_.on("mouseout",function(){B._dragging||y.unhover(B,A.event)}),_.on("click",function(){z!=="select"&&z!=="lasso"&&(O.indexOf("select")>-1&&f(A.event,B,[I.xaxis],[I.yaxis],I.id,j),O.indexOf("event")>-1&&a.click(B,A.event))})},S.makeFramework=function(){var x=this,k=x.graphDiv,I=k._fullLayout,B="clip"+I._uid+x.id;x.clipDef=I._clips.append("clipPath").attr("id",B),x.clipRect=x.clipDef.append("rect"),x.framework=A.select(x.container).append("g").attr("class","geo "+x.id).call(s.setClipUrl,B,k),x.project=function(_){var z=x.projection(_);return z?[z[0]-x.xaxis._offset,z[1]-x.yaxis._offset]:[null,null]},x.xaxis={_id:"x",c2p:function(_){return x.project(_)[0]}},x.yaxis={_id:"y",c2p:function(_){return x.project(_)[1]}},x.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(x.mockAxis,I)},S.saveViewInitial=function(x){var k=x.center||{},I=x.projection,B=I.rotation||{};this.viewInitial={fitbounds:x.fitbounds,"projection.scale":I.scale};var _;x._isScoped?_={"center.lon":k.lon,"center.lat":k.lat}:x._isClipped?_={"projection.rotation.lon":B.lon,"projection.rotation.lat":B.lat}:_={"center.lon":k.lon,"center.lat":k.lat,"projection.rotation.lon":B.lon},g.extendFlat(this.viewInitial,_)},S.render=function(x){this._hasMarkerAngles&&x?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var x=this.projection,k=x.getPath(),I;function B(z){var O=x(z.lonlat);return O?r(O[0],O[1]):null}function _(z){return x.isLonLatOverEdges(z.lonlat)?"none":null}for(I in this.basePaths)this.basePaths[I].attr("d",k);for(I in this.dataPaths)this.dataPaths[I].attr("d",function(z){return k(z.geojson)});for(I in this.dataPoints)this.dataPoints[I].attr("display",_).attr("transform",B)};function w(x){var k=x.projection,I=k.type,B=v.projNames[I];B="geo"+g.titleCase(B);for(var _=P[B]||M[B],z=_(),O=x._isSatellite?Math.acos(1/k.distance)*180/Math.PI:x._isClipped?v.lonaxisSpan[I]/2:null,F=["center","rotate","parallels","clipExtent"],N=function($){return $?z:[]},V=0;V<F.length;V++){var j=F[V];typeof z[j]!="function"&&(z[j]=N)}return z.isLonLatOverEdges=function($){if(z($)===null)return!0;if(O){var q=z.rotate(),oe=L($,[-q[0],-q[1]]),Z=O*Math.PI/180;return oe>Z}else return!1},z.getPath=function(){return o().projection(z)},z.getBounds=function($){return z.getPath().bounds($)},z.precision(v.precision),x._isSatellite&&z.tilt(k.tilt).distance(k.distance),O&&z.clipAngle(O-v.clipPad),z}function i(x,k,I){var B=1e-6,_=2.5,z=k[x],O=v.scopeDefaults[k.scope],F,N,V;x==="lonaxis"?(F=O.lonaxisRange,N=O.lataxisRange,V=function(J,ae){return[J,ae]}):x==="lataxis"&&(F=O.lataxisRange,N=O.lonaxisRange,V=function(J,ae){return[ae,J]});var j={type:"linear",range:[F[0],F[1]-B],tick0:z.tick0,dtick:z.dtick};u.setConvert(j,I);var $=u.calcTicks(j);!k.isScoped&&x==="lonaxis"&&$.pop();for(var q=$.length,oe=new Array(q),Z=0;Z<q;Z++)for(var G=$[Z].x,re=oe[Z]=[],H=N[0];H<N[1]+_;H+=_)re.push(V(G,H));return{type:"MultiLineString",coordinates:oe}}function C(x,k){var I=v.clipPad,B=x[0]+I,_=x[1]-I,z=k[0]+I,O=k[1]-I;B>0&&_<0&&(_+=360);var F=(_-B)/4;return{type:"Polygon",coordinates:[[[B,z],[B,O],[B+F,O],[B+2*F,O],[B+3*F,O],[_,O],[_,z],[_-F,z],[_-2*F,z],[_-3*F,z],[B,z]]]}}},10816:function(te,X,e){var A=e(84888).KY,P=e(3400).counterRegex,o=e(43520),L="geo",M=P(L),d={};d[L]={valType:"subplotid",dflt:L,editType:"calc"};function g(s){for(var a=s._fullLayout,c=s.calcdata,u=a._subplots[L],l=0;l<u.length;l++){var y=u[l],h=A(c,L,y),T=a[y],f=T._subplot;f||(f=o({id:y,graphDiv:s,container:a._geolayer.node(),topojsonURL:s._context.topojsonURL,staticPlot:s._context.staticPlot}),a[y]._subplot=f),f.plot(h,a,s._promises)}}function r(s,a,c,u){for(var l=u._subplots[L]||[],y=0;y<l.length;y++){var h=l[y],T=u[h]._subplot;!a[h]&&T&&(T.framework.remove(),T.clipDef.remove())}}function t(s){for(var a=s._fullLayout,c=a._subplots[L],u=0;u<c.length;u++){var l=a[c[u]],y=l._subplot;y.updateFx(a,l)}}te.exports={attr:L,name:L,idRoot:L,idRegex:M,attrRegex:M,attributes:d,layoutAttributes:e(40384),supplyLayoutDefaults:e(86920),plot:g,updateFx:t,clean:r}},40384:function(te,X,e){var A=e(22548),P=e(86968).u,o=e(98192).u,L=e(79552),M=e(67824).overrideAll,d=e(95376),g={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:A.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:o},r=te.exports=M({domain:P({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:d(L.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:d(L.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:A.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:L.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:L.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:L.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:L.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:A.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:A.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:A.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:A.background},lonaxis:g,lataxis:g},"plot","from-root");r.uirevision={valType:"any",editType:"none"}},86920:function(te,X,e){var A=e(3400),P=e(168),o=e(84888).op,L=e(79552),M=e(40384),d=L.axesNames;te.exports=function(t,s,a){P(t,s,a,{type:"geo",attributes:M,handleDefaults:g,fullData:a,partition:"y"})};function g(r,t,s,a){var c=o(a.fullData,"geo",a.id),u=c.map(function(re){return re._expandedIndex}),l=s("resolution"),y=s("scope"),h=L.scopeDefaults[y],T=s("projection.type",h.projType),f=t._isAlbersUsa=T==="albers usa";f&&(y=t.scope="usa");var n=t._isScoped=y!=="world",v=t._isSatellite=T==="satellite",m=t._isConic=T.indexOf("conic")!==-1||T==="albers",b=t._isClipped=!!L.lonaxisSpan[T];if(r.visible===!1){var E=A.extendDeep({},t._template);E.showcoastlines=!1,E.showcountries=!1,E.showframe=!1,E.showlakes=!1,E.showland=!1,E.showocean=!1,E.showrivers=!1,E.showsubunits=!1,E.lonaxis&&(E.lonaxis.showgrid=!1),E.lataxis&&(E.lataxis.showgrid=!1),t._template=E}for(var p=s("visible"),S,w=0;w<d.length;w++){var i=d[w],C=[30,10][w],x;if(n)x=h[i+"Range"];else{var k=L[i+"Span"],I=(k[T]||k["*"])/2,B=s("projection.rotation."+i.substr(0,3),h.projRotate[w]);x=[B-I,B+I]}var _=s(i+".range",x);s(i+".tick0"),s(i+".dtick",C),S=s(i+".showgrid",p?void 0:!1),S&&(s(i+".gridcolor"),s(i+".gridwidth"),s(i+".griddash")),t[i]._ax={type:"linear",_id:i.slice(0,3),_traceIndices:u,setScale:A.identity,c2l:A.identity,r2l:A.identity,autorange:!0,range:_.slice(),_m:1,_input:{}}}var z=t.lonaxis.range,O=t.lataxis.range,F=z[0],N=z[1];F>0&&N<0&&(N+=360);var V=(F+N)/2,j;if(!f){var $=n?h.projRotate:[V,0,0];j=s("projection.rotation.lon",$[0]),s("projection.rotation.lat",$[1]),s("projection.rotation.roll",$[2]),S=s("showcoastlines",!n&&p),S&&(s("coastlinecolor"),s("coastlinewidth")),S=s("showocean",p?void 0:!1),S&&s("oceancolor")}var q,oe;if(f?(q=-96.6,oe=38.7):(q=n?V:j,oe=(O[0]+O[1])/2),s("center.lon",q),s("center.lat",oe),v&&(s("projection.tilt"),s("projection.distance")),m){var Z=h.projParallels||[0,60];s("projection.parallels",Z)}s("projection.scale"),S=s("showland",p?void 0:!1),S&&s("landcolor"),S=s("showlakes",p?void 0:!1),S&&s("lakecolor"),S=s("showrivers",p?void 0:!1),S&&(s("rivercolor"),s("riverwidth")),S=s("showcountries",n&&y!=="usa"&&p),S&&(s("countrycolor"),s("countrywidth")),(y==="usa"||y==="north america"&&l===50)&&(s("showsubunits",p),s("subunitcolor"),s("subunitwidth")),n||(S=s("showframe",p),S&&(s("framecolor"),s("framewidth"))),s("bgcolor");var G=s("fitbounds");G&&(delete t.projection.scale,n?(delete t.center.lon,delete t.center.lat):b?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}},79248:function(te,X,e){var A=e(33428),P=e(3400),o=e(24040),L=Math.PI/180,M=180/Math.PI,d={cursor:"pointer"},g={cursor:"auto"};function r(i,C){var x=i.projection,k;return C._isScoped?k=a:C._isClipped?k=u:k=c,k(i,x)}te.exports=r;function t(i,C){return A.behavior.zoom().translate(C.translate()).scale(C.scale())}function s(i,C,x){var k=i.id,I=i.graphDiv,B=I.layout,_=B[k],z=I._fullLayout,O=z[k],F={},N={};function V(j,$){F[k+"."+j]=P.nestedProperty(_,j).get(),o.call("_storeDirectGUIEdit",B,z._preGUI,F);var q=P.nestedProperty(O,j);q.get()!==$&&(q.set($),P.nestedProperty(_,j).set($),N[k+"."+j]=$)}x(V),V("projection.scale",C.scale()/i.fitScale),V("fitbounds",!1),I.emit("plotly_relayout",N)}function a(i,C){var x=t(i,C);function k(){A.select(this).style(d)}function I(){C.scale(A.event.scale).translate(A.event.translate),i.render(!0);var z=C.invert(i.midPt);i.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":C.scale()/i.fitScale,"geo.center.lon":z[0],"geo.center.lat":z[1]})}function B(z){var O=C.invert(i.midPt);z("center.lon",O[0]),z("center.lat",O[1])}function _(){A.select(this).style(g),s(i,C,B)}return x.on("zoomstart",k).on("zoom",I).on("zoomend",_),x}function c(i,C){var x=t(i,C),k=2,I,B,_,z,O,F,N,V,j;function $(H){return C.invert(H)}function q(H){var J=$(H);if(!J)return!0;var ae=C(J);return Math.abs(ae[0]-H[0])>k||Math.abs(ae[1]-H[1])>k}function oe(){A.select(this).style(d),I=A.mouse(this),B=C.rotate(),_=C.translate(),z=B,O=$(I)}function Z(){if(F=A.mouse(this),q(I)){x.scale(C.scale()),x.translate(C.translate());return}C.scale(A.event.scale),C.translate([_[0],A.event.translate[1]]),O?$(F)&&(V=$(F),N=[z[0]+(V[0]-O[0]),B[1],B[2]],C.rotate(N),z=N):(I=F,O=$(I)),j=!0,i.render(!0);var H=C.rotate(),J=C.invert(i.midPt);i.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":C.scale()/i.fitScale,"geo.center.lon":J[0],"geo.center.lat":J[1],"geo.projection.rotation.lon":-H[0]})}function G(){A.select(this).style(g),j&&s(i,C,re)}function re(H){var J=C.rotate(),ae=C.invert(i.midPt);H("projection.rotation.lon",-J[0]),H("center.lon",ae[0]),H("center.lat",ae[1])}return x.on("zoomstart",oe).on("zoom",Z).on("zoomend",G),x}function u(i,C){C.rotate(),C.scale();var x=t(i,C),k=w(x,"zoomstart","zoom","zoomend"),I=0,B=x.on,_;x.on("zoomstart",function(){A.select(this).style(d);var V=A.mouse(this),j=C.rotate(),$=j,q=C.translate(),oe=y(j);_=l(C,V),B.call(x,"zoom",function(){var Z=A.mouse(this);if(C.scale(A.event.scale),!_)V=Z,_=l(C,V);else if(l(C,Z)){C.rotate(j).translate(q);var G=l(C,Z),re=T(_,G),H=b(h(oe,re)),J=f(H,_,$);(!isFinite(J[0])||!isFinite(J[1])||!isFinite(J[2]))&&(J=$),C.rotate(J),$=J}O(k.of(this,arguments))}),z(k.of(this,arguments))}).on("zoomend",function(){A.select(this).style(g),B.call(x,"zoom",null),F(k.of(this,arguments)),s(i,C,N)}).on("zoom.redraw",function(){i.render(!0);var V=C.rotate();i.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":C.scale()/i.fitScale,"geo.projection.rotation.lon":-V[0],"geo.projection.rotation.lat":-V[1]})});function z(V){I++||V({type:"zoomstart"})}function O(V){V({type:"zoom"})}function F(V){--I||V({type:"zoomend"})}function N(V){var j=C.rotate();V("projection.rotation.lon",-j[0]),V("projection.rotation.lat",-j[1])}return A.rebind(x,k,"on")}function l(i,C){var x=i.invert(C);return x&&isFinite(x[0])&&isFinite(x[1])&&E(x)}function y(i){var C=.5*i[0]*L,x=.5*i[1]*L,k=.5*i[2]*L,I=Math.sin(C),B=Math.cos(C),_=Math.sin(x),z=Math.cos(x),O=Math.sin(k),F=Math.cos(k);return[B*z*F+I*_*O,I*z*F-B*_*O,B*_*F+I*z*O,B*z*O-I*_*F]}function h(i,C){var x=i[0],k=i[1],I=i[2],B=i[3],_=C[0],z=C[1],O=C[2],F=C[3];return[x*_-k*z-I*O-B*F,x*z+k*_+I*F-B*O,x*O-k*F+I*_+B*z,x*F+k*O-I*z+B*_]}function T(i,C){if(!(!i||!C)){var x=S(i,C),k=Math.sqrt(p(x,x)),I=.5*Math.acos(Math.max(-1,Math.min(1,p(i,C)))),B=Math.sin(I)/k;return k&&[Math.cos(I),x[2]*B,-x[1]*B,x[0]*B]}}function f(i,C,x){var k=m(C,2,i[0]);k=m(k,1,i[1]),k=m(k,0,i[2]-x[2]);var I=C[0],B=C[1],_=C[2],z=k[0],O=k[1],F=k[2],N=Math.atan2(B,I)*M,V=Math.sqrt(I*I+B*B),j,$;Math.abs(O)>V?($=(O>0?90:-90)-N,j=0):($=Math.asin(O/V)*M-N,j=Math.sqrt(V*V-O*O));var q=180-$-2*N,oe=(Math.atan2(F,z)-Math.atan2(_,j))*M,Z=(Math.atan2(F,z)-Math.atan2(_,-j))*M,G=n(x[0],x[1],$,oe),re=n(x[0],x[1],q,Z);return G<=re?[$,oe,x[2]]:[q,Z,x[2]]}function n(i,C,x,k){var I=v(x-i),B=v(k-C);return Math.sqrt(I*I+B*B)}function v(i){return(i%360+540)%360-180}function m(i,C,x){var k=x*L,I=i.slice(),B=C===0?1:0,_=C===2?1:2,z=Math.cos(k),O=Math.sin(k);return I[B]=i[B]*z-i[_]*O,I[_]=i[_]*z+i[B]*O,I}function b(i){return[Math.atan2(2*(i[0]*i[1]+i[2]*i[3]),1-2*(i[1]*i[1]+i[2]*i[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(i[0]*i[2]-i[3]*i[1]))))*M,Math.atan2(2*(i[0]*i[3]+i[1]*i[2]),1-2*(i[2]*i[2]+i[3]*i[3]))*M]}function E(i){var C=i[0]*L,x=i[1]*L,k=Math.cos(x);return[k*Math.cos(C),k*Math.sin(C),Math.sin(x)]}function p(i,C){for(var x=0,k=0,I=i.length;k<I;++k)x+=i[k]*C[k];return x}function S(i,C){return[i[1]*C[2]-i[2]*C[1],i[2]*C[0]-i[0]*C[2],i[0]*C[1]-i[1]*C[0]]}function w(i){for(var C=0,x=arguments.length,k=[];++C<x;)k.push(arguments[C]);var I=A.dispatch.apply(null,k);return I.of=function(B,_){return function(z){var O;try{O=z.sourceEvent=A.event,z.target=i,A.event=z,I[z.type].apply(B,_)}finally{A.event=O}}},I}},84888:function(te,X,e){var A=e(24040),P=e(33816).SUBPLOT_PATTERN;X.KY=function(o,L,M){var d=A.subplotsRegistry[L];if(!d)return[];for(var g=d.attr,r=[],t=0;t<o.length;t++){var s=o[t],a=s[0].trace;a[g]===M&&r.push(s)}return r},X._M=function(o,L){var M=[],d=[],g;if(typeof L=="string"?g=A.getModule(L).plot:typeof L=="function"?g=L:g=L.plot,!g)return[M,o];for(var r=0;r<o.length;r++){var t=o[r],s=t[0].trace;s.visible!==!0||s._length===0||(s._module&&s._module.plot===g?M.push(t):d.push(t))}return[M,d]},X.op=function(L,M,d){if(!A.subplotsRegistry[M])return[];var g=A.subplotsRegistry[M].attr,r=[],t,s,a;if(M==="gl2d"){var c=d.match(P);s="x"+c[1],a="y"+c[2]}for(var u=0;u<L.length;u++)t=L[u],M==="gl2d"&&A.traceIs(t,"gl2d")?t[g[0]]===s&&t[g[1]]===a&&r.push(t):t[g]===d&&r.push(t);return r}},2428:function(te,X,e){var A=e(62644),P=e(97264),o=e(29128),L=e(33816),M=e(89184);te.exports=g;function d(r,t){this.element=r,this.plot=t,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]}function g(r){var t=r.mouseContainer,s=r.glplot,a=new d(t,s);function c(){r.xaxis.autorange=!1,r.yaxis.autorange=!1}function u(){for(var y=r.graphDiv._fullLayout._axisConstraintGroups,h=r.xaxis._id,T=r.yaxis._id,f=0;f<y.length;f++)if(y[f][h]!==-1){if(y[f][T]!==-1)return!0;break}return!1}a.mouseListener=A(t,l),t.addEventListener("touchstart",function(y){var h=o(y.changedTouches[0],t);l(0,h[0],h[1]),l(1,h[0],h[1]),y.preventDefault()},M?{passive:!1}:!1),t.addEventListener("touchmove",function(y){y.preventDefault();var h=o(y.changedTouches[0],t);l(1,h[0],h[1]),y.preventDefault()},M?{passive:!1}:!1),t.addEventListener("touchend",function(y){l(0,a.lastPos[0],a.lastPos[1]),y.preventDefault()},M?{passive:!1}:!1);function l(y,h,T){var f=r.calcDataBox(),n=s.viewBox,v=a.lastPos[0],m=a.lastPos[1],b=L.MINDRAG*s.pixelRatio,E=L.MINZOOM*s.pixelRatio,p,S;h*=s.pixelRatio,T*=s.pixelRatio,T=n[3]-n[1]-T;function w(B,_,z){var O=Math.min(_,z),F=Math.max(_,z);O!==F?(f[B]=O,f[B+2]=F,a.dataBox=f,r.setRanges(f)):(r.selectBox.selectBox=[0,0,1,1],r.glplot.setDirty())}switch(r.fullLayout.dragmode){case"zoom":if(y){var i=h/(n[2]-n[0])*(f[2]-f[0])+f[0],C=T/(n[3]-n[1])*(f[3]-f[1])+f[1];a.boxInited||(a.boxStart[0]=i,a.boxStart[1]=C,a.dragStart[0]=h,a.dragStart[1]=T),a.boxEnd[0]=i,a.boxEnd[1]=C,a.boxInited=!0,!a.boxEnabled&&(a.boxStart[0]!==a.boxEnd[0]||a.boxStart[1]!==a.boxEnd[1])&&(a.boxEnabled=!0);var x=Math.abs(a.dragStart[0]-h)<E,k=Math.abs(a.dragStart[1]-T)<E;if(u()&&!(x&&k)){p=a.boxEnd[0]-a.boxStart[0],S=a.boxEnd[1]-a.boxStart[1];var I=(f[3]-f[1])/(f[2]-f[0]);Math.abs(p*I)>Math.abs(S)?(a.boxEnd[1]=a.boxStart[1]+Math.abs(p)*I*(S>=0?1:-1),a.boxEnd[1]<f[1]?(a.boxEnd[1]=f[1],a.boxEnd[0]=a.boxStart[0]+(f[1]-a.boxStart[1])/Math.abs(I)):a.boxEnd[1]>f[3]&&(a.boxEnd[1]=f[3],a.boxEnd[0]=a.boxStart[0]+(f[3]-a.boxStart[1])/Math.abs(I))):(a.boxEnd[0]=a.boxStart[0]+Math.abs(S)/I*(p>=0?1:-1),a.boxEnd[0]<f[0]?(a.boxEnd[0]=f[0],a.boxEnd[1]=a.boxStart[1]+(f[0]-a.boxStart[0])*Math.abs(I)):a.boxEnd[0]>f[2]&&(a.boxEnd[0]=f[2],a.boxEnd[1]=a.boxStart[1]+(f[2]-a.boxStart[0])*Math.abs(I)))}else x&&(a.boxEnd[0]=a.boxStart[0]),k&&(a.boxEnd[1]=a.boxStart[1])}else a.boxEnabled?(p=a.boxStart[0]!==a.boxEnd[0],S=a.boxStart[1]!==a.boxEnd[1],p||S?(p&&(w(0,a.boxStart[0],a.boxEnd[0]),r.xaxis.autorange=!1),S&&(w(1,a.boxStart[1],a.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),a.boxEnabled=!1,a.boxInited=!1):a.boxInited&&(a.boxInited=!1);break;case"pan":a.boxEnabled=!1,a.boxInited=!1,y?(a.panning||(a.dragStart[0]=h,a.dragStart[1]=T),Math.abs(a.dragStart[0]-h)<b&&(h=a.dragStart[0]),Math.abs(a.dragStart[1]-T)<b&&(T=a.dragStart[1]),p=(v-h)*(f[2]-f[0])/(s.viewBox[2]-s.viewBox[0]),S=(m-T)*(f[3]-f[1])/(s.viewBox[3]-s.viewBox[1]),f[0]+=p,f[2]+=p,f[1]+=S,f[3]+=S,r.setRanges(f),a.panning=!0,a.lastInputTime=Date.now(),c(),r.cameraChanged(),r.handleAnnotations()):a.panning&&(a.panning=!1,r.relayoutCallback());break}a.lastPos[0]=h,a.lastPos[1]=T}return a.wheelListener=P(t,function(y,h){if(!r.scrollZoom)return!1;var T=r.calcDataBox(),f=s.viewBox,n=a.lastPos[0],v=a.lastPos[1],m=Math.exp(5*h/(f[3]-f[1])),b=n/(f[2]-f[0])*(T[2]-T[0])+T[0],E=v/(f[3]-f[1])*(T[3]-T[1])+T[1];return T[0]=(T[0]-b)*m+b,T[2]=(T[2]-b)*m+b,T[1]=(T[1]-E)*m+E,T[3]=(T[3]-E)*m+E,r.setRanges(T),a.lastInputTime=Date.now(),c(),r.cameraChanged(),r.handleAnnotations(),r.relayoutCallback(),!0},!0),a}},92568:function(te,X,e){var A=e(54460),P=e(43080);function o(g){this.scene=g,this.gl=g.gl,this.pixelRatio=g.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!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 L=o.prototype,M=["xaxis","yaxis"];L.merge=function(g){this.titleEnable=!1,this.backgroundColor=P(g.plot_bgcolor);var r,t,s,a,c,u,l,y,h,T,f;for(T=0;T<2;++T){r=M[T];var n=r.charAt(0);for(t=g[this.scene[r]._name],s=t.title.text===this.scene.fullLayout._dfltTitle[n]?"":t.title.text,f=0;f<=2;f+=2)this.labelEnable[T+f]=!1,this.labels[T+f]=s,this.labelColor[T+f]=P(t.title.font.color),this.labelFont[T+f]=t.title.font.family,this.labelSize[T+f]=t.title.font.size,this.labelPad[T+f]=this.getLabelPad(r,t),this.tickEnable[T+f]=!1,this.tickColor[T+f]=P((t.tickfont||{}).color),this.tickAngle[T+f]=t.tickangle==="auto"?0:Math.PI*-t.tickangle/180,this.tickPad[T+f]=this.getTickPad(t),this.tickMarkLength[T+f]=0,this.tickMarkWidth[T+f]=t.tickwidth||0,this.tickMarkColor[T+f]=P(t.tickcolor),this.borderLineEnable[T+f]=!1,this.borderLineColor[T+f]=P(t.linecolor),this.borderLineWidth[T+f]=t.linewidth||0;l=this.hasSharedAxis(t),c=this.hasAxisInDfltPos(r,t)&&!l,u=this.hasAxisInAltrPos(r,t)&&!l,a=t.mirror||!1,y=l?String(a).indexOf("all")!==-1:!!a,h=l?a==="allticks":String(a).indexOf("ticks")!==-1,c?this.labelEnable[T]=!0:u&&(this.labelEnable[T+2]=!0),c?this.tickEnable[T]=t.showticklabels:u&&(this.tickEnable[T+2]=t.showticklabels),(c||y)&&(this.borderLineEnable[T]=t.showline),(u||y)&&(this.borderLineEnable[T+2]=t.showline),(c||h)&&(this.tickMarkLength[T]=this.getTickMarkLength(t)),(u||h)&&(this.tickMarkLength[T+2]=this.getTickMarkLength(t)),this.gridLineEnable[T]=t.showgrid,this.gridLineColor[T]=P(t.gridcolor),this.gridLineWidth[T]=t.gridwidth,this.zeroLineEnable[T]=t.zeroline,this.zeroLineColor[T]=P(t.zerolinecolor),this.zeroLineWidth[T]=t.zerolinewidth}},L.hasSharedAxis=function(g){var r=this.scene,t=r.fullLayout._subplots.gl2d,s=A.findSubplotsWithAxis(t,g);return s.indexOf(r.id)!==0},L.hasAxisInDfltPos=function(g,r){var t=r.side;if(g==="xaxis")return t==="bottom";if(g==="yaxis")return t==="left"},L.hasAxisInAltrPos=function(g,r){var t=r.side;if(g==="xaxis")return t==="top";if(g==="yaxis")return t==="right"},L.getLabelPad=function(g,r){var t=1.5,s=r.title.font.size,a=r.showticklabels;if(g==="xaxis")return r.side==="top"?-10+s*(t+(a?1:0)):-10+s*(t+(a?.5:0));if(g==="yaxis")return r.side==="right"?10+s*(t+(a?1:.5)):10+s*(t+(a?.5:0))},L.getTickPad=function(g){return g.ticks==="outside"?10+g.ticklen:15},L.getTickMarkLength=function(g){if(!g.ticks)return 0;var r=g.ticklen;return g.ticks==="inside"?-r:r};function d(g){return new o(g)}te.exports=d},39952:function(te,X,e){var A=e(67824).overrideAll,P=e(17188),o=e(64859),L=e(9616),M=e(33816),d=e(57952),g=e(65460),r=e(84888).op;X.name="gl2d",X.attr=["xaxis","yaxis"],X.idRoot=["x","y"],X.idRegex=M.idRegex,X.attrRegex=M.attrRegex,X.attributes=e(26720),X.supplyLayoutDefaults=function(t,s,a){s._has("cartesian")||d.supplyLayoutDefaults(t,s,a)},X.layoutAttrOverrides=A(d.layoutAttributes,"plot","from-root"),X.baseLayoutAttrOverrides=A({plot_bgcolor:o.plot_bgcolor,hoverlabel:g.hoverlabel},"plot","nested"),X.plot=function(s){for(var a=s._fullLayout,c=s._fullData,u=a._subplots.gl2d,l=0;l<u.length;l++){var y=u[l],h=a._plots[y],T=r(c,"gl2d",y),f=h._scene2d;f===void 0&&(f=new P({id:y,graphDiv:s,container:s.querySelector(".gl-container"),staticPlot:s._context.staticPlot,plotGlPixelRatio:s._context.plotGlPixelRatio},a),h._scene2d=f),f.plot(T,s.calcdata,a,s.layout)}},X.clean=function(t,s,a,c){for(var u=c._subplots.gl2d||[],l=0;l<u.length;l++){var y=u[l],h=c._plots[y];if(h._scene2d){var T=r(t,"gl2d",y);T.length===0&&(h._scene2d.destroy(),delete c._plots[y])}}d.clean.apply(this,arguments)},X.drawFramework=function(t){t._context.staticPlot||d.drawFramework(t)},X.toSVG=function(t){for(var s=t._fullLayout,a=s._subplots.gl2d,c=0;c<a.length;c++){var u=s._plots[a[c]],l=u._scene2d,y=l.toImage("png"),h=s._glimages.append("svg:image");h.attr({xmlns:L.svg,"xlink:href":y,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),l.destroy()}},X.updateFx=function(t){for(var s=t._fullLayout,a=s._subplots.gl2d,c=0;c<a.length;c++){var u=s._plots[a[c]]._scene2d;u.updateFx(s.dragmode)}}},17188:function(te,X,e){var A=e(24040),P=e(54460),o=e(93024),L=e(67792).gl_plot2d,M=e(67792).gl_spikes2d,d=e(67792).gl_select_box,g=e(5408),r=e(92568),t=e(2428),s=e(16576),a=e(71888),c=a.enforce,u=a.clean,l=e(19280).doAutoRange,y=e(72760),h=y.drawMode,T=y.selectMode,f=["xaxis","yaxis"],n,v,m=e(33816).SUBPLOT_PATTERN;function b(S,w){this.container=S.container,this.graphDiv=S.graphDiv,this.pixelRatio=S.plotGlPixelRatio||window.devicePixelRatio,this.id=S.id,this.staticPlot=!!S.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(w),this.makeFramework(),!this.stopped&&(this.glplotOptions=r(this),this.glplotOptions.merge(w),this.glplot=L(this.glplotOptions),this.camera=t(this),this.traces={},this.spikes=M(this.glplot),this.selectBox=d(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())}te.exports=b;var E=b.prototype;E.makeFramework=function(){if(this.staticPlot){if(!v&&(n=document.createElement("canvas"),v=g({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}),!v))throw new Error("Error creating static canvas/context for image server");this.canvas=n,this.gl=v}else{var S=this.container.querySelector(".gl-canvas-focus"),w=g({canvas:S,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!w){s(this),this.stopped=!0;return}this.canvas=S,this.gl=w}var i=this.canvas;i.style.width="100%",i.style.height="100%",i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style["pointer-events"]="none",this.updateSize(i);var C=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");C.style.position="absolute",C.style.top=C.style.left="0px",C.style.width=C.style.height="100%",C.style["z-index"]=20,C.style["pointer-events"]="none";var x=this.mouseContainer=document.createElement("div");x.style.position="absolute",x.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var k=this.container;k.appendChild(C),k.appendChild(x);var I=this;x.addEventListener("mouseout",function(){I.isMouseOver=!1,I.unhover()}),x.addEventListener("mouseover",function(){I.isMouseOver=!0})},E.toImage=function(S){S||(S="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var w=this.glplot.gl,i=w.drawingBufferWidth,C=w.drawingBufferHeight;w.clearColor(1,1,1,0),w.clear(w.COLOR_BUFFER_BIT|w.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),w.bindFramebuffer(w.FRAMEBUFFER,null);var x=new Uint8Array(i*C*4);w.readPixels(0,0,i,C,w.RGBA,w.UNSIGNED_BYTE,x);for(var k=0,I=C-1;k<I;++k,--I)for(var B=0;B<i;++B)for(var _=0;_<4;++_){var z=x[4*(i*k+B)+_];x[4*(i*k+B)+_]=x[4*(i*I+B)+_],x[4*(i*I+B)+_]=z}var O=document.createElement("canvas");O.width=i,O.height=C;var F=O.getContext("2d",{willReadFrequently:!0}),N=F.createImageData(i,C);N.data.set(x),F.putImageData(N,0,0);var V;switch(S){case"jpeg":V=O.toDataURL("image/jpeg");break;case"webp":V=O.toDataURL("image/webp");break;default:V=O.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(n),V},E.updateSize=function(S){S||(S=this.canvas);var w=this.pixelRatio,i=this.fullLayout,C=i.width,x=i.height,k=Math.ceil(w*C)|0,I=Math.ceil(w*x)|0;return(S.width!==k||S.height!==I)&&(S.width=k,S.height=I),S},E.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var S=[P.calcTicks(this.xaxis),P.calcTicks(this.yaxis)],w=0;w<2;++w)for(var i=0;i<S[w].length;++i)S[w][i].text=S[w][i].text+"";return S};function p(S,w){for(var i=0;i<2;++i){var C=S[i],x=w[i];if(C.length!==x.length)return!0;for(var k=0;k<C.length;++k)if(C[k].x!==x[k].x)return!0}return!1}E.updateRefs=function(S){this.fullLayout=S;var w=this.id.match(m),i="xaxis"+w[1],C="yaxis"+w[2];this.xaxis=this.fullLayout[i],this.yaxis=this.fullLayout[C]},E.relayoutCallback=function(){var S=this.graphDiv,w=this.xaxis,i=this.yaxis,C=S.layout,x={},k=x[w._name+".range"]=w.range.slice(),I=x[i._name+".range"]=i.range.slice();x[w._name+".autorange"]=w.autorange,x[i._name+".autorange"]=i.autorange,A.call("_storeDirectGUIEdit",S.layout,S._fullLayout._preGUI,x);var B=C[w._name];B.range=k,B.autorange=w.autorange;var _=C[i._name];_.range=I,_.autorange=i.autorange,x.lastInputTime=this.camera.lastInputTime,S.emit("plotly_relayout",x)},E.cameraChanged=function(){var S=this.camera;this.glplot.setDataBox(this.calcDataBox());var w=this.computeTickMarks(),i=this.glplotOptions.ticks;p(w,i)&&(this.glplotOptions.ticks=w,this.glplotOptions.dataBox=S.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},E.handleAnnotations=function(){for(var S=this.graphDiv,w=this.fullLayout.annotations,i=0;i<w.length;i++){var C=w[i];C.xref===this.xaxis._id&&C.yref===this.yaxis._id&&A.getComponentMethod("annotations","drawOne")(S,i)}},E.destroy=function(){if(this.glplot){var S=this.traces;S&&Object.keys(S).map(function(w){S[w].dispose(),delete S[w]}),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}},E.plot=function(S,w,i){var C=this.glplot;this.updateRefs(i),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(S,w),this.updateFx(i.dragmode);var x=i.width,k=i.height;this.updateSize(this.canvas);var I=this.glplotOptions;I.merge(i),I.screenBox=[0,0,x,k];var B={_fullLayout:{_axisConstraintGroups:i._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:i._size}};u(B,this.xaxis),u(B,this.yaxis);var _=i._size,z=this.xaxis.domain,O=this.yaxis.domain;I.viewBox=[_.l+z[0]*_.w,_.b+O[0]*_.h,x-_.r-(1-z[1])*_.w,k-_.t-(1-O[1])*_.h],this.mouseContainer.style.width=_.w*(z[1]-z[0])+"px",this.mouseContainer.style.height=_.h*(O[1]-O[0])+"px",this.mouseContainer.height=_.h*(O[1]-O[0]),this.mouseContainer.style.left=_.l+z[0]*_.w+"px",this.mouseContainer.style.top=_.t+(1-O[1])*_.h+"px";var F,N;for(N=0;N<2;++N)F=this[f[N]],F._length=I.viewBox[N+2]-I.viewBox[N],l(this.graphDiv,F),F.setScale();c(B),I.ticks=this.computeTickMarks(),I.dataBox=this.calcDataBox(),I.merge(i),C.update(I),this.glplot.draw()},E.calcDataBox=function(){var S=this.xaxis,w=this.yaxis,i=S.range,C=w.range,x=S.r2l,k=w.r2l;return[x(i[0]),k(C[0]),x(i[1]),k(C[1])]},E.setRanges=function(S){var w=this.xaxis,i=this.yaxis,C=w.l2r,x=i.l2r;w.range=[C(S[0]),C(S[2])],i.range=[x(S[1]),x(S[3])]},E.updateTraces=function(S,w){var i=Object.keys(this.traces),C,x,k;this.fullData=S;e:for(C=0;C<i.length;C++){var I=i[C],B=this.traces[I];for(x=0;x<S.length;x++)if(k=S[x],k.uid===I&&k.type===B.type)continue e;B.dispose(),delete this.traces[I]}for(C=0;C<S.length;C++){k=S[C];var _=w[C],z=this.traces[k.uid];z?z.update(k,_):(z=k._module.plot(this,k,_),this.traces[k.uid]=z)}this.glplot.objects.sort(function(O,F){return O._trace.index-F._trace.index})},E.updateFx=function(S){T(S)||h(S)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),S==="pan"?this.mouseContainer.style.cursor="move":S==="zoom"?this.mouseContainer.style.cursor="crosshair":this.mouseContainer.style.cursor=null},E.emitPointAction=function(S,w){for(var i=S.trace.uid,C=S.pointIndex,x,k=0;k<this.fullData.length;k++)this.fullData[k].uid===i&&(x=this.fullData[k]);var I={x:S.traceCoord[0],y:S.traceCoord[1],curveNumber:x.index,pointNumber:C,data:x._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};o.appendArrayPointValue(I,x,C),this.graphDiv.emit(w,{points:[I]})},E.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var S=this.glplot,w=this.camera,i=w.mouseListener,C=this.lastButtonState===1&&i.buttons===0,x=this.fullLayout;this.lastButtonState=i.buttons,this.cameraChanged();var k=i.x*S.pixelRatio,I=this.canvas.height-S.pixelRatio*i.y,B;if(w.boxEnabled&&x.dragmode==="zoom"){this.selectBox.enabled=!0;for(var _=this.selectBox.selectBox=[Math.min(w.boxStart[0],w.boxEnd[0]),Math.min(w.boxStart[1],w.boxEnd[1]),Math.max(w.boxStart[0],w.boxEnd[0]),Math.max(w.boxStart[1],w.boxEnd[1])],z=0;z<2;z++)w.boxStart[z]===w.boxEnd[z]&&(_[z]=S.dataBox[z],_[z+2]=S.dataBox[z+2]);S.setDirty()}else if(!w.panning&&this.isMouseOver){this.selectBox.enabled=!1;var O=x._size,F=this.xaxis.domain,N=this.yaxis.domain;B=S.pick(k/S.pixelRatio+O.l+F[0]*O.w,I/S.pixelRatio-(O.t+(1-N[1])*O.h));var V=B&&B.object._trace.handlePick(B);if(V&&C&&this.emitPointAction(V,"plotly_click"),B&&B.object._trace.hoverinfo!=="skip"&&x.hovermode&&V&&(!this.lastPickResult||this.lastPickResult.traceUid!==V.trace.uid||this.lastPickResult.dataCoord[0]!==V.dataCoord[0]||this.lastPickResult.dataCoord[1]!==V.dataCoord[1])){var j=V;this.lastPickResult={traceUid:V.trace?V.trace.uid:null,dataCoord:V.dataCoord.slice()},this.spikes.update({center:B.dataCoord}),j.screenCoord=[((S.viewBox[2]-S.viewBox[0])*(B.dataCoord[0]-S.dataBox[0])/(S.dataBox[2]-S.dataBox[0])+S.viewBox[0])/S.pixelRatio,(this.canvas.height-(S.viewBox[3]-S.viewBox[1])*(B.dataCoord[1]-S.dataBox[1])/(S.dataBox[3]-S.dataBox[1])-S.viewBox[1])/S.pixelRatio],this.emitPointAction(V,"plotly_hover");var $=this.fullData[j.trace.index]||{},q=j.pointIndex,oe=o.castHoverinfo($,x,q);if(oe&&oe!=="all"){var Z=oe.split("+");Z.indexOf("x")===-1&&(j.traceCoord[0]=void 0),Z.indexOf("y")===-1&&(j.traceCoord[1]=void 0),Z.indexOf("z")===-1&&(j.traceCoord[2]=void 0),Z.indexOf("text")===-1&&(j.textLabel=void 0),Z.indexOf("name")===-1&&(j.name=void 0)}o.loneHover({x:j.screenCoord[0],y:j.screenCoord[1],xLabel:this.hoverFormatter("xaxis",j.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",j.traceCoord[1]),zLabel:j.traceCoord[2],text:j.textLabel,name:j.name,color:o.castHoverOption($,q,"bgcolor")||j.color,borderColor:o.castHoverOption($,q,"bordercolor"),fontFamily:o.castHoverOption($,q,"font.family"),fontSize:o.castHoverOption($,q,"font.size"),fontColor:o.castHoverOption($,q,"font.color"),nameLength:o.castHoverOption($,q,"namelength"),textAlign:o.castHoverOption($,q,"align")},{container:this.svgContainer,gd:this.graphDiv})}}B||this.unhover(),S.draw()}},E.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),o.loneUnhover(this.svgContainer))},E.hoverFormatter=function(S,w){if(w!==void 0){var i=this[S];return P.tickText(i,i.c2l(w),"hover").text}}},12536:function(te,X,e){var A=e(67824).overrideAll,P=e(65460),o=e(98432),L=e(84888).op,M=e(3400),d=e(9616),g="gl3d",r="scene";X.name=g,X.attr=r,X.idRoot=r,X.idRegex=X.attrRegex=M.counterRegex("scene"),X.attributes=e(6636),X.layoutAttributes=e(346),X.baseLayoutAttrOverrides=A({hoverlabel:P.hoverlabel},"plot","nested"),X.supplyLayoutDefaults=e(5208),X.plot=function(s){for(var a=s._fullLayout,c=s._fullData,u=a._subplots[g],l=0;l<u.length;l++){var y=u[l],h=L(c,g,y),T=a[y],f=T.camera,n=T._scene;n||(n=new o({id:y,graphDiv:s,container:s.querySelector(".gl-container"),staticPlot:s._context.staticPlot,plotGlPixelRatio:s._context.plotGlPixelRatio,camera:f},a),T._scene=n),n.viewInitial||(n.viewInitial={up:{x:f.up.x,y:f.up.y,z:f.up.z},eye:{x:f.eye.x,y:f.eye.y,z:f.eye.z},center:{x:f.center.x,y:f.center.y,z:f.center.z}}),n.plot(h,a,s.layout)}},X.clean=function(t,s,a,c){for(var u=c._subplots[g]||[],l=0;l<u.length;l++){var y=u[l];!s[y]&&c[y]._scene&&(c[y]._scene.destroy(),c._infolayer&&c._infolayer.selectAll(".annotation-"+y).remove())}},X.toSVG=function(t){for(var s=t._fullLayout,a=s._subplots[g],c=s._size,u=0;u<a.length;u++){var l=s[a[u]],y=l.domain,h=l._scene,T=h.toImage("png"),f=s._glimages.append("svg:image");f.attr({xmlns:d.svg,"xlink:href":T,x:c.l+c.w*y.x[0],y:c.t+c.h*(1-y.y[1]),width:c.w*(y.x[1]-y.x[0]),height:c.h*(y.y[1]-y.y[0]),preserveAspectRatio:"none"}),h.destroy()}},X.cleanId=function(s){if(s.match(/^scene[0-9]*$/)){var a=s.substr(5);return a==="1"&&(a=""),r+a}},X.updateFx=function(t){for(var s=t._fullLayout,a=s._subplots[g],c=0;c<a.length;c++){var u=s[a[c]]._scene;u.updateFx(s.dragmode,s.hovermode)}}},6636:function(te){te.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},86140:function(te,X,e){var A=e(76308),P=e(94724),o=e(92880).extendFlat,L=e(67824).overrideAll;te.exports=L({visible:P.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:A.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:P.color,categoryorder:P.categoryorder,categoryarray:P.categoryarray,title:{text:P.title.text,font:P.title.font},type:o({},P.type,{values:["-","linear","log","date","category"]}),autotypenumbers:P.autotypenumbers,autorange:P.autorange,autorangeoptions:{minallowed:P.autorangeoptions.minallowed,maxallowed:P.autorangeoptions.maxallowed,clipmin:P.autorangeoptions.clipmin,clipmax:P.autorangeoptions.clipmax,include:P.autorangeoptions.include,editType:"plot"},rangemode:P.rangemode,minallowed:P.minallowed,maxallowed:P.maxallowed,range:o({},P.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:P.minor.tickmode,nticks:P.nticks,tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,mirror:P.mirror,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,showticklabels:P.showticklabels,labelalias:P.labelalias,tickfont:P.tickfont,tickangle:P.tickangle,tickprefix:P.tickprefix,showtickprefix:P.showtickprefix,ticksuffix:P.ticksuffix,showticksuffix:P.showticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickformat:P.tickformat,tickformatstops:P.tickformatstops,hoverformat:P.hoverformat,showline:P.showline,linecolor:P.linecolor,linewidth:P.linewidth,showgrid:P.showgrid,gridcolor:o({},P.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:P.gridwidth,zeroline:P.zeroline,zerolinecolor:P.zerolinecolor,zerolinewidth:P.zerolinewidth,_deprecated:{title:P._deprecated.title,titlefont:P._deprecated.titlefont}},"plot","from-root")},64380:function(te,X,e){var A=e(49760).mix,P=e(3400),o=e(31780),L=e(86140),M=e(14944),d=e(28336),g=["xaxis","yaxis","zaxis"],r=100*136/187;te.exports=function(s,a,c){var u,l;function y(f,n){return P.coerce(u,l,L,f,n)}for(var h=0;h<g.length;h++){var T=g[h];u=s[T]||{},l=o.newContainer(a,T),l._id=T[0]+c.scene,l._name=T,M(u,l,y,c),d(u,l,y,{font:c.font,letter:T[0],data:c.data,showGrid:!0,noAutotickangles:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,bgColor:c.bgColor,calendar:c.calendar},c.fullLayout),y("gridcolor",A(l.color,c.bgColor,r).toRgbString()),y("title.text",T[0]),l.setScale=P.noop,y("showspikes")&&(y("spikesides"),y("spikethickness"),y("spikecolor",l.color)),y("showaxeslabels"),y("showbackground")&&y("backgroundcolor")}}},44728:function(te,X,e){var A=e(43080),P=e(3400),o=["xaxis","yaxis","zaxis"];function L(){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.zeroLineWidth=[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()}var M=L.prototype;M.merge=function(g,r){for(var t=this,s=0;s<3;++s){var a=r[o[s]];if(!a.visible){t.tickEnable[s]=!1,t.labelEnable[s]=!1,t.lineEnable[s]=!1,t.lineTickEnable[s]=!1,t.gridEnable[s]=!1,t.zeroEnable[s]=!1,t.backgroundEnable[s]=!1;continue}t.labels[s]=g._meta?P.templateString(a.title.text,g._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(t.labelColor[s]=A(a.title.font.color)),a.title.font.family&&(t.labelFont[s]=a.title.font.family),a.title.font.size&&(t.labelSize[s]=a.title.font.size)),"showline"in a&&(t.lineEnable[s]=a.showline),"linecolor"in a&&(t.lineColor[s]=A(a.linecolor)),"linewidth"in a&&(t.lineWidth[s]=a.linewidth),"showgrid"in a&&(t.gridEnable[s]=a.showgrid),"gridcolor"in a&&(t.gridColor[s]=A(a.gridcolor)),"gridwidth"in a&&(t.gridWidth[s]=a.gridwidth),a.type==="log"?t.zeroEnable[s]=!1:"zeroline"in a&&(t.zeroEnable[s]=a.zeroline),"zerolinecolor"in a&&(t.zeroLineColor[s]=A(a.zerolinecolor)),"zerolinewidth"in a&&(t.zeroLineWidth[s]=a.zerolinewidth),"ticks"in a&&a.ticks?t.lineTickEnable[s]=!0:t.lineTickEnable[s]=!1,"ticklen"in a&&(t.lineTickLength[s]=t._defaultLineTickLength[s]=a.ticklen),"tickcolor"in a&&(t.lineTickColor[s]=A(a.tickcolor)),"tickwidth"in a&&(t.lineTickWidth[s]=a.tickwidth),"tickangle"in a&&(t.tickAngle[s]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(t.tickEnable[s]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(t.tickColor[s]=A(a.tickfont.color)),a.tickfont.family&&(t.tickFont[s]=a.tickfont.family),a.tickfont.size&&(t.tickSize[s]=a.tickfont.size)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(t.lineTickMirror[s]=!0,t.lineMirror[s]=!0):a.mirror===!0?(t.lineTickMirror[s]=!1,t.lineMirror[s]=!0):(t.lineTickMirror[s]=!1,t.lineMirror[s]=!1):t.lineMirror[s]=!1,"showbackground"in a&&a.showbackground!==!1?(t.backgroundEnable[s]=!0,t.backgroundColor[s]=A(a.backgroundcolor)):t.backgroundEnable[s]=!1}};function d(g,r){var t=new L;return t.merge(g,r),t}te.exports=d},5208:function(te,X,e){var A=e(3400),P=e(76308),o=e(24040),L=e(168),M=e(64380),d=e(346),g=e(84888).op,r="gl3d";te.exports=function(a,c,u){var l=c._basePlotModules.length>1;function y(h){if(!l){var T=A.validate(a[h],d[h]);if(T)return a[h]}}L(a,c,u,{type:r,attributes:d,handleDefaults:t,fullLayout:c,font:c.font,fullData:u,getDfltFromLayout:y,autotypenumbersDflt:c.autotypenumbers,paper_bgcolor:c.paper_bgcolor,calendar:c.calendar})};function t(s,a,c,u){for(var l=c("bgcolor"),y=P.combine(l,u.paper_bgcolor),h=["up","center","eye"],T=0;T<h.length;T++)c("camera."+h[T]+".x"),c("camera."+h[T]+".y"),c("camera."+h[T]+".z");c("camera.projection.type");var f=!!c("aspectratio.x")&&!!c("aspectratio.y")&&!!c("aspectratio.z"),n=f?"manual":"auto",v=c("aspectmode",n);f||(s.aspectratio=a.aspectratio={x:1,y:1,z:1},v==="manual"&&(a.aspectmode="auto"),s.aspectmode=a.aspectmode);var m=g(u.fullData,r,u.id);M(s,a,{font:u.font,scene:u.id,data:m,bgColor:y,calendar:u.calendar,autotypenumbersDflt:u.autotypenumbersDflt,fullLayout:u.fullLayout}),o.getComponentMethod("annotations3d","handleDefaults")(s,a,u);var b=u.getDfltFromLayout("dragmode");if(b!==!1&&!b)if(b="orbit",s.camera&&s.camera.up){var E=s.camera.up.x,p=s.camera.up.y,S=s.camera.up.z;S!==0&&(!E||!p||!S||S/Math.sqrt(E*E+p*p+S*S)>.999)&&(b="turntable")}else b="turntable";c("dragmode",b),c("hovermode",u.getDfltFromLayout("hovermode"))}},346:function(te,X,e){var A=e(86140),P=e(86968).u,o=e(92880).extendFlat,L=e(3400).counterRegex;function M(d,g,r){return{x:{valType:"number",dflt:d,editType:"camera"},y:{valType:"number",dflt:g,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}te.exports={_arrayAttrRegexps:[L("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(M(0,0,1),{}),center:o(M(0,0,0),{}),eye:o(M(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:P({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:A,yaxis:A,zaxis:A,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"}}}},9020:function(te,X,e){var A=e(43080),P=["xaxis","yaxis","zaxis"];function o(){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]}var L=o.prototype;L.merge=function(d){for(var g=0;g<3;++g){var r=d[P[g]];if(!r.visible){this.enabled[g]=!1,this.drawSides[g]=!1;continue}this.enabled[g]=r.showspikes,this.colors[g]=A(r.spikecolor),this.drawSides[g]=r.spikesides,this.lineWidth[g]=r.spikethickness}};function M(d){var g=new o;return g.merge(d),g}te.exports=M},87152:function(te,X,e){te.exports=M;var A=e(54460),P=e(3400),o=["xaxis","yaxis","zaxis"];function L(d){for(var g=new Array(3),r=0;r<3;++r){for(var t=d[r],s=new Array(t.length),a=0;a<t.length;++a)s[a]=t[a].x;g[r]=s}return g}function M(d){for(var g=d.axesOptions,r=d.glplot.axesPixels,t=d.fullSceneLayout,s=[[],[],[]],a=0;a<3;++a){var c=t[o[a]];if(c._length=(r[a].hi-r[a].lo)*r[a].pixelsPerDataUnit/d.dataScale[a],Math.abs(c._length)===1/0||isNaN(c._length))s[a]=[];else{c._input_range=c.range.slice(),c.range[0]=r[a].lo/d.dataScale[a],c.range[1]=r[a].hi/d.dataScale[a],c._m=1/(d.dataScale[a]*r[a].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var u=c.tickmode;if(c.tickmode==="auto"){c.tickmode="linear";var l=c.nticks||P.constrain(c._length/40,4,9);A.autoTicks(c,Math.abs(c.range[1]-c.range[0])/l)}for(var y=A.calcTicks(c,{msUTC:!0}),h=0;h<y.length;++h)y[h].x=y[h].x*d.dataScale[a],c.type==="date"&&(y[h].text=y[h].text.replace(/\<br\>/g," "));s[a]=y,c.tickmode=u}}g.ticks=s;for(var a=0;a<3;++a){.5*(d.glplot.bounds[0][a]+d.glplot.bounds[1][a]);for(var h=0;h<2;++h)g.bounds[h][a]=d.glplot.bounds[h][a]}d.contourLevels=L(s)}},94424:function(te){function X(A,P){var o=[0,0,0,0],L,M;for(L=0;L<4;++L)for(M=0;M<4;++M)o[M]+=A[4*L+M]*P[L];return o}function e(A,P){var o=X(A.projection,X(A.view,X(A.model,[P[0],P[1],P[2],1])));return o}te.exports=e},98432:function(te,X,e){var A=e(67792).gl_plot3d,P=A.createCamera,o=A.createScene,L=e(5408),M=e(89184),d=e(24040),g=e(3400),r=g.preserveDrawingBuffer(),t=e(54460),s=e(93024),a=e(43080),c=e(16576),u=e(94424),l=e(44728),y=e(9020),h=e(87152),T=e(19280).applyAutorangeOptions,f,n,v=!1;function m(I,B){var _=document.createElement("div"),z=I.container;this.graphDiv=I.graphDiv;var O=document.createElementNS("http://www.w3.org/2000/svg","svg");O.style.position="absolute",O.style.top=O.style.left="0px",O.style.width=O.style.height="100%",O.style["z-index"]=20,O.style["pointer-events"]="none",_.appendChild(O),this.svgContainer=O,_.id=I.id,_.style.position="absolute",_.style.top=_.style.left="0px",_.style.width=_.style.height="100%",z.appendChild(_),this.fullLayout=B,this.id=I.id||"scene",this.fullSceneLayout=B[this.id],this.plotArgs=[[],{},{}],this.axesOptions=l(B,B[this.id]),this.spikeOptions=y(B[this.id]),this.container=_,this.staticMode=!!I.staticPlot,this.pixelRatio=this.pixelRatio||I.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=d.getComponentMethod("annotations3d","convert"),this.drawAnnotations=d.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var b=m.prototype;b.prepareOptions=function(){var I=this,B={canvas:I.canvas,gl:I.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:I.container,axes:I.axesOptions,spikes:I.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:I.camera,pixelRatio:I.pixelRatio};if(I.staticMode){if(!n&&(f=document.createElement("canvas"),n=L({canvas:f,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!n))throw new Error("error creating static canvas/context for image server");B.gl=n,B.canvas=f}return B};var E=!0;b.tryCreatePlot=function(){var I=this,B=I.prepareOptions(),_=!0;try{I.glplot=o(B)}catch{if(I.staticMode||!E||r)_=!1;else{g.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{r=B.glOptions.preserveDrawingBuffer=!0,I.glplot=o(B)}catch{r=B.glOptions.preserveDrawingBuffer=!1,_=!1}}}return E=!1,_},b.initializeGLCamera=function(){var I=this,B=I.fullSceneLayout.camera,_=B.projection.type==="orthographic";I.camera=P(I.container,{center:[B.center.x,B.center.y,B.center.z],eye:[B.eye.x,B.eye.y,B.eye.z],up:[B.up.x,B.up.y,B.up.z],_ortho:_,zoomMin:.01,zoomMax:100,mode:"orbit"})},b.initializeGLPlot=function(){var I=this;I.initializeGLCamera();var B=I.tryCreatePlot();if(!B)return c(I);I.traces={},I.make4thDimension();var _=I.graphDiv,z=_.layout,O=function(){var N={};return I.isCameraChanged(z)&&(N[I.id+".camera"]=I.getCamera()),I.isAspectChanged(z)&&(N[I.id+".aspectratio"]=I.glplot.getAspectratio(),z[I.id].aspectmode!=="manual"&&(I.fullSceneLayout.aspectmode=z[I.id].aspectmode=N[I.id+".aspectmode"]="manual")),N},F=function(N){if(N.fullSceneLayout.dragmode!==!1){var V=O();N.saveLayout(z),N.graphDiv.emit("plotly_relayout",V)}};return I.glplot.canvas&&(I.glplot.canvas.addEventListener("mouseup",function(){F(I)}),I.glplot.canvas.addEventListener("touchstart",function(){v=!0}),I.glplot.canvas.addEventListener("wheel",function(N){if(_._context._scrollZoom.gl3d){if(I.camera._ortho){var V=N.deltaX>N.deltaY?1.1:.9090909090909091,j=I.glplot.getAspectratio();I.glplot.setAspectratio({x:V*j.x,y:V*j.y,z:V*j.z})}F(I)}},M?{passive:!1}:!1),I.glplot.canvas.addEventListener("mousemove",function(){if(I.fullSceneLayout.dragmode!==!1&&I.camera.mouseListener.buttons!==0){var N=O();I.graphDiv.emit("plotly_relayouting",N)}}),I.staticMode||I.glplot.canvas.addEventListener("webglcontextlost",function(N){_&&_.emit&&_.emit("plotly_webglcontextlost",{event:N,layer:I.id})},!1)),I.glplot.oncontextloss=function(){I.recoverContext()},I.glplot.onrender=function(){I.render()},!0},b.render=function(){var I=this,B=I.graphDiv,_,z=I.svgContainer,O=I.container.getBoundingClientRect();B._fullLayout._calcInverseTransform(B);var F=B._fullLayout._invScaleX,N=B._fullLayout._invScaleY,V=O.width*F,j=O.height*N;z.setAttributeNS(null,"viewBox","0 0 "+V+" "+j),z.setAttributeNS(null,"width",V),z.setAttributeNS(null,"height",j),h(I),I.glplot.axes.update(I.axesOptions);for(var $=Object.keys(I.traces),q=null,oe=I.glplot.selection,Z=0;Z<$.length;++Z)_=I.traces[$[Z]],_.data.hoverinfo!=="skip"&&_.handlePick(oe)&&(q=_),_.setContourLevels&&_.setContourLevels();function G(Le,ve,Ae){var ye=I.fullSceneLayout[Le+"axis"];return ye.type!=="log"&&(ve=ye.d2l(ve)),t.hoverLabelText(ye,ve,Ae)}if(q!==null){var re=u(I.glplot.cameraParams,oe.dataCoordinate);_=q.data;var H=B._fullData[_.index],J=oe.index,ae={xLabel:G("x",oe.traceCoordinate[0],_.xhoverformat),yLabel:G("y",oe.traceCoordinate[1],_.yhoverformat),zLabel:G("z",oe.traceCoordinate[2],_.zhoverformat)},K=s.castHoverinfo(H,I.fullLayout,J),Y=(K||"").split("+"),ie=K&&K==="all";!H.hovertemplate&&!ie&&(Y.indexOf("x")===-1&&(ae.xLabel=void 0),Y.indexOf("y")===-1&&(ae.yLabel=void 0),Y.indexOf("z")===-1&&(ae.zLabel=void 0),Y.indexOf("text")===-1&&(oe.textLabel=void 0),Y.indexOf("name")===-1&&(q.name=void 0));var ne,le=[];_.type==="cone"||_.type==="streamtube"?(ae.uLabel=G("x",oe.traceCoordinate[3],_.uhoverformat),(ie||Y.indexOf("u")!==-1)&&le.push("u: "+ae.uLabel),ae.vLabel=G("y",oe.traceCoordinate[4],_.vhoverformat),(ie||Y.indexOf("v")!==-1)&&le.push("v: "+ae.vLabel),ae.wLabel=G("z",oe.traceCoordinate[5],_.whoverformat),(ie||Y.indexOf("w")!==-1)&&le.push("w: "+ae.wLabel),ae.normLabel=oe.traceCoordinate[6].toPrecision(3),(ie||Y.indexOf("norm")!==-1)&&le.push("norm: "+ae.normLabel),_.type==="streamtube"&&(ae.divergenceLabel=oe.traceCoordinate[7].toPrecision(3),(ie||Y.indexOf("divergence")!==-1)&&le.push("divergence: "+ae.divergenceLabel)),oe.textLabel&&le.push(oe.textLabel),ne=le.join("<br>")):_.type==="isosurface"||_.type==="volume"?(ae.valueLabel=t.hoverLabelText(I._mockAxis,I._mockAxis.d2l(oe.traceCoordinate[3]),_.valuehoverformat),le.push("value: "+ae.valueLabel),oe.textLabel&&le.push(oe.textLabel),ne=le.join("<br>")):ne=oe.textLabel;var de={x:oe.traceCoordinate[0],y:oe.traceCoordinate[1],z:oe.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:J};s.appendArrayPointValue(de,H,J),_._module.eventData&&(de=H._module.eventData(de,oe,H,{},J));var we={points:[de]};if(I.fullSceneLayout.hovermode){var me=[];s.loneHover({trace:H,x:(.5+.5*re[0]/re[3])*V,y:(.5-.5*re[1]/re[3])*j,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:ne,name:q.name,color:s.castHoverOption(H,J,"bgcolor")||q.color,borderColor:s.castHoverOption(H,J,"bordercolor"),fontFamily:s.castHoverOption(H,J,"font.family"),fontSize:s.castHoverOption(H,J,"font.size"),fontColor:s.castHoverOption(H,J,"font.color"),nameLength:s.castHoverOption(H,J,"namelength"),textAlign:s.castHoverOption(H,J,"align"),hovertemplate:g.castOption(H,J,"hovertemplate"),hovertemplateLabels:g.extendFlat({},de,ae),eventData:[de]},{container:z,gd:B,inOut_bbox:me}),de.bbox=me[0]}oe.distance<5&&(oe.buttons||v)?B.emit("plotly_click",we):B.emit("plotly_hover",we),this.oldEventData=we}else s.loneUnhover(z),this.oldEventData&&B.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;I.drawAnnotations(I)},b.recoverContext=function(){var I=this;I.glplot.dispose();var B=function(){if(I.glplot.gl.isContextLost()){requestAnimationFrame(B);return}if(!I.initializeGLPlot()){g.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}I.plot.apply(I,I.plotArgs)};requestAnimationFrame(B)};var p=["xaxis","yaxis","zaxis"];function S(I,B,_){for(var z=I.fullSceneLayout,O=0;O<3;O++){var F=p[O],N=F.charAt(0),V=z[F],j=B[N],$=B[N+"calendar"],q=B["_"+N+"length"];if(!g.isArrayOrTypedArray(j))_[0][O]=Math.min(_[0][O],0),_[1][O]=Math.max(_[1][O],q-1);else for(var oe,Z=0;Z<(q||j.length);Z++)if(g.isArrayOrTypedArray(j[Z]))for(var G=0;G<j[Z].length;++G)oe=V.d2l(j[Z][G],0,$),!isNaN(oe)&&isFinite(oe)&&(_[0][O]=Math.min(_[0][O],oe),_[1][O]=Math.max(_[1][O],oe));else oe=V.d2l(j[Z],0,$),!isNaN(oe)&&isFinite(oe)&&(_[0][O]=Math.min(_[0][O],oe),_[1][O]=Math.max(_[1][O],oe))}}function w(I,B){for(var _=I.fullSceneLayout,z=_.annotations||[],O=0;O<3;O++)for(var F=p[O],N=F.charAt(0),V=_[F],j=0;j<z.length;j++){var $=z[j];if($.visible){var q=V.r2l($[N]);!isNaN(q)&&isFinite(q)&&(B[0][O]=Math.min(B[0][O],q),B[1][O]=Math.max(B[1][O],q))}}}b.plot=function(I,B,_){var z=this;if(z.plotArgs=[I,B,_],!z.glplot.contextLost){var O,F,N,V,j,$,q=B[z.id],oe=_[z.id];z.fullLayout=B,z.fullSceneLayout=q,z.axesOptions.merge(B,q),z.spikeOptions.merge(q),z.setViewport(q),z.updateFx(q.dragmode,q.hovermode),z.camera.enableWheel=z.graphDiv._context._scrollZoom.gl3d,z.glplot.setClearColor(a(q.bgcolor)),z.setConvert(j),I?Array.isArray(I)||(I=[I]):I=[];var Z=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(N=0;N<I.length;++N)O=I[N],!(O.visible!==!0||O._length===0)&&S(this,O,Z);w(this,Z);var G=[1,1,1];for(V=0;V<3;++V)Z[1][V]===Z[0][V]?G[V]=1:G[V]=1/(Z[1][V]-Z[0][V]);for(z.dataScale=G,z.convertAnnotations(this),N=0;N<I.length;++N)O=I[N],!(O.visible!==!0||O._length===0)&&(F=z.traces[O.uid],F?F.data.type===O.type?F.update(O):(F.dispose(),F=O._module.plot(this,O),z.traces[O.uid]=F):(F=O._module.plot(this,O),z.traces[O.uid]=F),F.name=O.name);var re=Object.keys(z.traces);e:for(N=0;N<re.length;++N){for(V=0;V<I.length;++V)if(I[V].uid===re[N]&&I[V].visible===!0&&I[V]._length!==0)continue e;F=z.traces[re[N]],F.dispose(),delete z.traces[re[N]]}z.glplot.objects.sort(function(st,Ze){return st._trace.data.index-Ze._trace.data.index});var H=[[0,0,0],[0,0,0]],J={};for(N=0;N<3;++N){j=q[p[N]],$=j.type,$ in J?(J[$].acc*=G[N],J[$].count+=1):J[$]={acc:G[N],count:1};var ae;if(j.autorange){H[0][N]=1/0,H[1][N]=-1/0;var K=z.glplot.objects,Y=z.fullSceneLayout.annotations||[],ie=j._name.charAt(0);for(V=0;V<K.length;V++){var ne=K[V],le=ne.bounds,de=ne._trace.data._pad||0;ne.constructor.name==="ErrorBars"&&j._lowerLogErrorBound?H[0][N]=Math.min(H[0][N],j._lowerLogErrorBound):H[0][N]=Math.min(H[0][N],le[0][N]/G[N]-de),H[1][N]=Math.max(H[1][N],le[1][N]/G[N]+de)}for(V=0;V<Y.length;V++){var we=Y[V];if(we.visible){var me=j.r2l(we[ie]);H[0][N]=Math.min(H[0][N],me),H[1][N]=Math.max(H[1][N],me)}}if("rangemode"in j&&j.rangemode==="tozero"&&(H[0][N]=Math.min(H[0][N],0),H[1][N]=Math.max(H[1][N],0)),H[0][N]>H[1][N])H[0][N]=-1,H[1][N]=1;else{var Le=H[1][N]-H[0][N];H[0][N]-=Le/32,H[1][N]+=Le/32}if(ae=[H[0][N],H[1][N]],ae=T(ae,j),H[0][N]=ae[0],H[1][N]=ae[1],j.isReversed()){var ve=H[0][N];H[0][N]=H[1][N],H[1][N]=ve}}else ae=j.range,H[0][N]=j.r2l(ae[0]),H[1][N]=j.r2l(ae[1]);H[0][N]===H[1][N]&&(H[0][N]-=1,H[1][N]+=1),j.range=[H[0][N],H[1][N]],j.limitRange(),z.glplot.setBounds(N,{min:j.range[0]*G[N],max:j.range[1]*G[N]})}var Ae,ye=q.aspectmode;if(ye==="cube")Ae=[1,1,1];else if(ye==="manual"){var Se=q.aspectratio;Ae=[Se.x,Se.y,Se.z]}else if(ye==="auto"||ye==="data"){var _e=[1,1,1];for(N=0;N<3;++N){j=q[p[N]],$=j.type;var ze=J[$];_e[N]=Math.pow(ze.acc,1/ze.count)/G[N]}ye==="data"||Math.max.apply(null,_e)/Math.min.apply(null,_e)<=4?Ae=_e:Ae=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");q.aspectratio.x=oe.aspectratio.x=Ae[0],q.aspectratio.y=oe.aspectratio.y=Ae[1],q.aspectratio.z=oe.aspectratio.z=Ae[2],z.glplot.setAspectratio(q.aspectratio),z.viewInitial.aspectratio||(z.viewInitial.aspectratio={x:q.aspectratio.x,y:q.aspectratio.y,z:q.aspectratio.z}),z.viewInitial.aspectmode||(z.viewInitial.aspectmode=q.aspectmode);var Ie=q.domain||null,Ne=B._size||null;if(Ie&&Ne){var et=z.container.style;et.position="absolute",et.left=Ne.l+Ie.x[0]*Ne.w+"px",et.top=Ne.t+(1-Ie.y[1])*Ne.h+"px",et.width=Ne.w*(Ie.x[1]-Ie.x[0])+"px",et.height=Ne.h*(Ie.y[1]-Ie.y[0])+"px"}z.glplot.redraw()}},b.destroy=function(){var I=this;I.glplot&&(I.camera.mouseListener.enabled=!1,I.container.removeEventListener("wheel",I.camera.wheelListener),I.camera=null,I.glplot.dispose(),I.container.parentNode.removeChild(I.container),I.glplot=null)};function i(I){return[[I.eye.x,I.eye.y,I.eye.z],[I.center.x,I.center.y,I.center.z],[I.up.x,I.up.y,I.up.z]]}function C(I){return{up:{x:I.up[0],y:I.up[1],z:I.up[2]},center:{x:I.center[0],y:I.center[1],z:I.center[2]},eye:{x:I.eye[0],y:I.eye[1],z:I.eye[2]},projection:{type:I._ortho===!0?"orthographic":"perspective"}}}b.getCamera=function(){var I=this;return I.camera.view.recalcMatrix(I.camera.view.lastT()),C(I.camera)},b.setViewport=function(I){var B=this,_=I.camera;B.camera.lookAt.apply(this,i(_)),B.glplot.setAspectratio(I.aspectratio);var z=_.projection.type==="orthographic",O=B.camera._ortho;z!==O&&(B.glplot.redraw(),B.glplot.clearRGBA(),B.glplot.dispose(),B.initializeGLPlot())},b.isCameraChanged=function(I){var B=this,_=B.getCamera(),z=g.nestedProperty(I,B.id+".camera"),O=z.get();function F($,q,oe,Z){var G=["up","center","eye"],re=["x","y","z"];return q[G[oe]]&&$[G[oe]][re[Z]]===q[G[oe]][re[Z]]}var N=!1;if(O===void 0)N=!0;else{for(var V=0;V<3;V++)for(var j=0;j<3;j++)if(!F(_,O,V,j)){N=!0;break}(!O.projection||_.projection&&_.projection.type!==O.projection.type)&&(N=!0)}return N},b.isAspectChanged=function(I){var B=this,_=B.glplot.getAspectratio(),z=g.nestedProperty(I,B.id+".aspectratio"),O=z.get();return O===void 0||O.x!==_.x||O.y!==_.y||O.z!==_.z},b.saveLayout=function(I){var B=this,_=B.fullLayout,z,O,F,N,V,j,$=B.isCameraChanged(I),q=B.isAspectChanged(I),oe=$||q;if(oe){var Z={};if($&&(z=B.getCamera(),O=g.nestedProperty(I,B.id+".camera"),F=O.get(),Z[B.id+".camera"]=F),q&&(N=B.glplot.getAspectratio(),V=g.nestedProperty(I,B.id+".aspectratio"),j=V.get(),Z[B.id+".aspectratio"]=j),d.call("_storeDirectGUIEdit",I,_._preGUI,Z),$){O.set(z);var G=g.nestedProperty(_,B.id+".camera");G.set(z)}if(q){V.set(N);var re=g.nestedProperty(_,B.id+".aspectratio");re.set(N),B.glplot.redraw()}}return oe},b.updateFx=function(I,B){var _=this,z=_.camera;if(z)if(I==="orbit")z.mode="orbit",z.keyBindingMode="rotate";else if(I==="turntable"){z.up=[0,0,1],z.mode="turntable",z.keyBindingMode="rotate";var O=_.graphDiv,F=O._fullLayout,N=_.fullSceneLayout.camera,V=N.up.x,j=N.up.y,$=N.up.z;if($/Math.sqrt(V*V+j*j+$*$)<.999){var q=_.id+".camera.up",oe={x:0,y:0,z:1},Z={};Z[q]=oe;var G=O.layout;d.call("_storeDirectGUIEdit",G,F._preGUI,Z),N.up=oe,g.nestedProperty(G,q).set(oe)}}else z.keyBindingMode=I;_.fullSceneLayout.hovermode=B};function x(I,B,_){for(var z=0,O=_-1;z<O;++z,--O)for(var F=0;F<B;++F)for(var N=0;N<4;++N){var V=4*(B*z+F)+N,j=4*(B*O+F)+N,$=I[V];I[V]=I[j],I[j]=$}}function k(I,B,_){for(var z=0;z<_;++z)for(var O=0;O<B;++O){var F=4*(B*z+O),N=I[F+3];if(N>0)for(var V=255/N,j=0;j<3;++j)I[F+j]=Math.min(V*I[F+j],255)}}b.toImage=function(I){var B=this;I||(I="png"),B.staticMode&&B.container.appendChild(f),B.glplot.redraw();var _=B.glplot.gl,z=_.drawingBufferWidth,O=_.drawingBufferHeight;_.bindFramebuffer(_.FRAMEBUFFER,null);var F=new Uint8Array(z*O*4);_.readPixels(0,0,z,O,_.RGBA,_.UNSIGNED_BYTE,F),x(F,z,O),k(F,z,O);var N=document.createElement("canvas");N.width=z,N.height=O;var V=N.getContext("2d",{willReadFrequently:!0}),j=V.createImageData(z,O);j.data.set(F),V.putImageData(j,0,0);var $;switch(I){case"jpeg":$=N.toDataURL("image/jpeg");break;case"webp":$=N.toDataURL("image/webp");break;default:$=N.toDataURL("image/png")}return B.staticMode&&B.container.removeChild(f),$},b.setConvert=function(){for(var I=this,B=0;B<3;B++){var _=I.fullSceneLayout[p[B]];t.setConvert(_,I.fullLayout),_.setScale=g.noop}},b.make4thDimension=function(){var I=this,B=I.graphDiv,_=B._fullLayout;I._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},t.setConvert(I._mockAxis,_)},te.exports=m},52094:function(te){te.exports=function(e,A,P,o){o=o||e.length;for(var L=new Array(o),M=0;M<o;M++)L[M]=[e[M],A[M],P[M]];return L}},64859:function(te,X,e){var A=e(25376),P=e(85656),o=e(22548),L=e(92872),M=e(34200),d=e(66741),g=e(92880).extendFlat,r=A({editType:"calc"});r.family.dflt='"Open Sans", verdana, arial, sans-serif',r.size.dflt=12,r.color.dflt=o.defaultLine,te.exports={font:r,title:{text:{valType:"string",editType:"layoutstyle"},font:A({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:g(d({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},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"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,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:o.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:o.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:o.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:L.newshape,activeshape:L.activeshape,newselection:M.newselection,activeselection:M.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:g({},P.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:A({editType:"layoutstyle"})}}},47552:function(te,X,e){var A=e(95376),P="1.13.4",o='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',L=['© <a target="_blank" href="https://carto.com/">Carto</a>',o].join(" "),M=['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(" "),d=['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(" "),g={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:o,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:L,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:L,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:M,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:M,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:d,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},r=A(g);te.exports={requiredVersion:P,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:g,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+P+"."].join(`
`),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(`
`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",r.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(`
`),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(`
`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},89032:function(te,X,e){var A=e(3400);te.exports=function(o,L){var M=o.split(" "),d=M[0],g=M[1],r=A.isArrayOrTypedArray(L)?A.mean(L):L,t=.5+r/100,s=1.5+r/100,a=["",""],c=[0,0];switch(d){case"top":a[0]="top",c[1]=-s;break;case"bottom":a[0]="bottom",c[1]=s;break}switch(g){case"left":a[1]="right",c[0]=-t;break;case"right":a[1]="left",c[0]=t;break}var u;return a[0]&&a[1]?u=a.join("-"):a[0]?u=a[0]:a[1]?u=a[1]:u="center",{anchor:u,offset:c}}},33688:function(te,X,e){var A=e(3480),P=e(3400),o=P.strTranslate,L=P.strScale,M=e(84888).KY,d=e(9616),g=e(33428),r=e(43616),t=e(72736),s=e(14440),a="mapbox",c=X.constants=e(47552);X.name=a,X.attr="subplot",X.idRoot=a,X.idRegex=X.attrRegex=P.counterRegex(a),X.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},X.layoutAttributes=e(5232),X.supplyLayoutDefaults=e(5976),X.plot=function(h){var T=h._fullLayout,f=h.calcdata,n=T._subplots[a];if(A.version!==c.requiredVersion)throw new Error(c.wrongVersionErrorMsg);var v=u(h,n);A.accessToken=v;for(var m=0;m<n.length;m++){var b=n[m],E=M(f,a,b),p=T[b],S=p._subplot;S||(S=new s(h,b),T[b]._subplot=S),S.viewInitial||(S.viewInitial={center:P.extendFlat({},p.center),zoom:p.zoom,bearing:p.bearing,pitch:p.pitch}),S.plot(E,T,h._promises)}},X.clean=function(y,h,T,f){for(var n=f._subplots[a]||[],v=0;v<n.length;v++){var m=n[v];!h[m]&&f[m]._subplot&&f[m]._subplot.destroy()}},X.toSVG=function(y){for(var h=y._fullLayout,T=h._subplots[a],f=h._size,n=0;n<T.length;n++){var v=h[T[n]],m=v.domain,b=v._subplot,E=b.toImage("png"),p=h._glimages.append("svg:image");p.attr({xmlns:d.svg,"xlink:href":E,x:f.l+f.w*m.x[0],y:f.t+f.h*(1-m.y[1]),width:f.w*(m.x[1]-m.x[0]),height:f.h*(m.y[1]-m.y[0]),preserveAspectRatio:"none"});var S=g.select(v._subplot.div),w=S.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!w){var i=h._glimages.append("g");i.attr("transform",o(f.l+f.w*m.x[0]+10,f.t+f.h*(1-m.y[0])-31)),i.append("path").attr("d",c.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),i.append("path").attr("d",c.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),i.append("path").attr("d",c.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),i.append("polygon").attr("points",c.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var C=S.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),x=h._glimages.append("g"),k=x.append("text");k.text(C).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":C});var I=r.bBox(k.node()),B=f.w*(m.x[1]-m.x[0]);if(I.width>B/2){var _=C.split("|").join("<br>");k.text(_).attr("data-unformatted",_).call(t.convertToTspans,y),I=r.bBox(k.node())}k.attr("transform",o(-3,-I.height+8)),x.insert("rect",".static-attribution").attr({x:-I.width-6,y:-I.height-3,width:I.width+6,height:I.height+3,fill:"rgba(255, 255, 255, 0.75)"});var z=1;I.width+6>B&&(z=B/(I.width+6));var O=[f.l+f.w*m.x[1],f.t+f.h*(1-m.y[0])];x.attr("transform",o(O[0],O[1])+L(z))}};function u(y,h){var T=y._fullLayout,f=y._context;if(f.mapboxAccessToken==="")return"";for(var n=[],v=[],m=!1,b=!1,E=0;E<h.length;E++){var p=T[h[E]],S=p.accesstoken;l(p.style)&&(S?P.pushUnique(n,S):(l(p._input.style)&&(P.error("Uses Mapbox map style, but did not set an access token."),m=!0),b=!0)),S&&P.pushUnique(v,S)}if(b){var w=m?c.noAccessTokenErrorMsg:c.missingStyleErrorMsg;throw P.error(w),new Error(w)}return n.length?(n.length>1&&P.warn(c.multipleTokensErrorMsg),n[0]):(v.length&&P.log(["Listed mapbox access token(s)",v.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function l(y){return typeof y=="string"&&(c.styleValuesMapbox.indexOf(y)!==-1||y.indexOf("mapbox://")===0||y.indexOf("stamen")===0)}X.updateFx=function(y){for(var h=y._fullLayout,T=h._subplots[a],f=0;f<T.length;f++){var n=h[T[f]]._subplot;n.updateFx(h)}}},22360:function(te,X,e){var A=e(3400),P=e(72736).sanitizeHTML,o=e(89032),L=e(47552);function M(s,a){this.subplot=s,this.uid=s.uid+"-"+a,this.index=a,this.idSource="source-"+this.uid,this.idLayer=L.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var d=M.prototype;d.update=function(a){this.visible?this.needsNewImage(a)?this.updateImage(a):this.needsNewSource(a)?(this.removeLayer(),this.updateSource(a),this.updateLayer(a)):this.needsNewLayer(a)?this.updateLayer(a):this.updateStyle(a):(this.updateSource(a),this.updateLayer(a)),this.visible=g(a)},d.needsNewImage=function(s){var a=this.subplot.map;return a.getSource(this.idSource)&&this.sourceType==="image"&&s.sourcetype==="image"&&(this.source!==s.source||JSON.stringify(this.coordinates)!==JSON.stringify(s.coordinates))},d.needsNewSource=function(s){return this.sourceType!==s.sourcetype||JSON.stringify(this.source)!==JSON.stringify(s.source)||this.layerType!==s.type},d.needsNewLayer=function(s){return this.layerType!==s.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},d.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},d.updateImage=function(s){var a=this.subplot.map;a.getSource(this.idSource).updateImage({url:s.source,coordinates:s.coordinates});var c=this.findFollowingMapboxLayerId(this.lookupBelow());c!==null&&this.subplot.map.moveLayer(this.idLayer,c)},d.updateSource=function(s){var a=this.subplot.map;if(a.getSource(this.idSource)&&a.removeSource(this.idSource),this.sourceType=s.sourcetype,this.source=s.source,!!g(s)){var c=t(s);a.addSource(this.idSource,c)}},d.findFollowingMapboxLayerId=function(s){if(s==="traces")for(var a=this.subplot.getMapLayers(),c=0;c<a.length;c++){var u=a[c].id;if(typeof u=="string"&&u.indexOf(L.traceLayerPrefix)===0){s=u;break}}return s},d.updateLayer=function(s){var a=this.subplot,c=r(s),u=this.lookupBelow(),l=this.findFollowingMapboxLayerId(u);this.removeLayer(),g(s)&&a.addLayer({id:this.idLayer,source:this.idSource,"source-layer":s.sourcelayer||"",type:s.type,minzoom:s.minzoom,maxzoom:s.maxzoom,layout:c.layout,paint:c.paint},l),this.layerType=s.type,this.below=u},d.updateStyle=function(s){if(g(s)){var a=r(s);this.subplot.setOptions(this.idLayer,"setLayoutProperty",a.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",a.paint)}},d.removeLayer=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer)},d.dispose=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer),s.getSource(this.idSource)&&s.removeSource(this.idSource)};function g(s){if(!s.visible)return!1;var a=s.source;if(Array.isArray(a)&&a.length>0){for(var c=0;c<a.length;c++)if(typeof a[c]!="string"||a[c].length===0)return!1;return!0}return A.isPlainObject(a)||typeof a=="string"&&a.length>0}function r(s){var a={},c={};switch(s.type){case"circle":A.extendFlat(c,{"circle-radius":s.circle.radius,"circle-color":s.color,"circle-opacity":s.opacity});break;case"line":A.extendFlat(c,{"line-width":s.line.width,"line-color":s.color,"line-opacity":s.opacity,"line-dasharray":s.line.dash});break;case"fill":A.extendFlat(c,{"fill-color":s.color,"fill-outline-color":s.fill.outlinecolor,"fill-opacity":s.opacity});break;case"symbol":var u=s.symbol,l=o(u.textposition,u.iconsize);A.extendFlat(a,{"icon-image":u.icon+"-15","icon-size":u.iconsize/10,"text-field":u.text,"text-size":u.textfont.size,"text-anchor":l.anchor,"text-offset":l.offset,"symbol-placement":u.placement}),A.extendFlat(c,{"icon-color":s.color,"text-color":u.textfont.color,"text-opacity":s.opacity});break;case"raster":A.extendFlat(c,{"raster-fade-duration":0,"raster-opacity":s.opacity});break}return{layout:a,paint:c}}function t(s){var a=s.sourcetype,c=s.source,u={type:a},l;return a==="geojson"?l="data":a==="vector"?l=typeof c=="string"?"url":"tiles":a==="raster"?(l="tiles",u.tileSize=256):a==="image"&&(l="url",u.coordinates=s.coordinates),u[l]=c,s.sourceattribution&&(u.attribution=P(s.sourceattribution)),u}te.exports=function(a,c,u){var l=new M(a,c);return l.update(u),l}},5232:function(te,X,e){var A=e(3400),P=e(76308).defaultLine,o=e(86968).u,L=e(25376),M=e(52904).textposition,d=e(67824).overrideAll,g=e(31780).templatedArray,r=e(47552),t=L({});t.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var s=te.exports=d({_arrayAttrRegexps:[A.counterRegex("mapbox",".layers",!0)],domain:o({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.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},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:g("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:P},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:P}},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:t,textposition:A.extendFlat({},M,{arrayOk:!1})}})},"plot","from-root");s.uirevision={valType:"any",editType:"none"}},5976:function(te,X,e){var A=e(3400),P=e(168),o=e(51272),L=e(5232);te.exports=function(r,t,s){P(r,t,s,{type:"mapbox",attributes:L,handleDefaults:M,partition:"y",accessToken:t._mapboxAccessToken})};function M(g,r,t,s){t("accesstoken",s.accessToken),t("style"),t("center.lon"),t("center.lat"),t("zoom"),t("bearing"),t("pitch");var a=t("bounds.west"),c=t("bounds.east"),u=t("bounds.south"),l=t("bounds.north");(a===void 0||c===void 0||u===void 0||l===void 0)&&delete r.bounds,o(g,r,{name:"layers",handleItemDefaults:d}),r._input=g}function d(g,r){function t(y,h){return A.coerce(g,r,L.layers,y,h)}var s=t("visible");if(s){var a=t("sourcetype"),c=a==="raster"||a==="image";t("source"),t("sourceattribution"),a==="vector"&&t("sourcelayer"),a==="image"&&t("coordinates");var u;c&&(u="raster");var l=t("type",u);c&&l!=="raster"&&(l=r.type="raster",A.log("Source types *raster* and *image* must drawn *raster* layer type.")),t("below"),t("color"),t("opacity"),t("minzoom"),t("maxzoom"),l==="circle"&&t("circle.radius"),l==="line"&&(t("line.width"),t("line.dash")),l==="fill"&&t("fill.outlinecolor"),l==="symbol"&&(t("symbol.icon"),t("symbol.iconsize"),t("symbol.text"),A.coerceFont(t,"symbol.textfont"),t("symbol.textposition"),t("symbol.placement"))}}},14440:function(te,X,e){var A=e(3480),P=e(3400),o=e(27144),L=e(24040),M=e(54460),d=e(86476),g=e(93024),r=e(72760),t=r.drawMode,s=r.selectMode,a=e(22676).prepSelect,c=e(22676).clearOutline,u=e(22676).clearSelectionsCache,l=e(22676).selectOnClick,y=e(47552),h=e(22360);function T(E,p){this.id=p,this.gd=E;var S=E._fullLayout,w=E._context;this.container=S._glcontainer.node(),this.isStatic=w.staticPlot,this.uid=S._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(S),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var f=T.prototype;f.plot=function(E,p,S){var w=this,i=p[w.id];w.map&&i.accesstoken!==w.accessToken&&(w.map.remove(),w.map=null,w.styleObj=null,w.traceHash={},w.layerList=[]);var C;w.map?C=new Promise(function(x,k){w.updateMap(E,p,x,k)}):C=new Promise(function(x,k){w.createMap(E,p,x,k)}),S.push(C)},f.createMap=function(E,p,S,w){var i=this,C=p[i.id],x=i.styleObj=v(C.style,p);i.accessToken=C.accesstoken;var k=C.bounds,I=k?[[k.west,k.south],[k.east,k.north]]:null,B=i.map=new A.Map({container:i.div,style:x.style,center:b(C.center),zoom:C.zoom,bearing:C.bearing,pitch:C.pitch,maxBounds:I,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new A.AttributionControl({compact:!0}));B._canvas.style.left="0px",B._canvas.style.top="0px",i.rejectOnError(w),i.isStatic||i.initFx(E,p);var _=[];_.push(new Promise(function(z){B.once("load",z)})),_=_.concat(o.fetchTraceGeoData(E)),Promise.all(_).then(function(){i.fillBelowLookup(E,p),i.updateData(E),i.updateLayout(p),i.resolveOnRender(S)}).catch(w)},f.updateMap=function(E,p,S,w){var i=this,C=i.map,x=p[this.id];i.rejectOnError(w);var k=[],I=v(x.style,p);JSON.stringify(i.styleObj)!==JSON.stringify(I)&&(i.styleObj=I,C.setStyle(I.style),i.traceHash={},k.push(new Promise(function(B){C.once("styledata",B)}))),k=k.concat(o.fetchTraceGeoData(E)),Promise.all(k).then(function(){i.fillBelowLookup(E,p),i.updateData(E),i.updateLayout(p),i.resolveOnRender(S)}).catch(w)},f.fillBelowLookup=function(E,p){var S=p[this.id],w=S.layers,i,C,x=this.belowLookup={},k=!1;for(i=0;i<E.length;i++){var I=E[i][0].trace,B=I._module;typeof I.below=="string"?C=I.below:B.getBelow&&(C=B.getBelow(I,this)),C===""&&(k=!0),x["trace-"+I.uid]=C||""}for(i=0;i<w.length;i++){var _=w[i];typeof _.below=="string"?C=_.below:k?C="traces":C="",x["layout-"+i]=C}var z={},O,F;for(O in x)C=x[O],z[C]?z[C].push(O):z[C]=[O];for(C in z){var N=z[C];if(N.length>1)for(i=0;i<N.length;i++)O=N[i],O.indexOf("trace-")===0?(F=O.split("trace-")[1],this.traceHash[F]&&(this.traceHash[F].below=null)):O.indexOf("layout-")===0&&(F=O.split("layout-")[1],this.layerList[F]&&(this.layerList[F].below=null))}};var n={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};f.updateData=function(E){var p=this.traceHash,S,w,i,C,x=E.slice().sort(function(z,O){return n[z[0].trace.type]-n[O[0].trace.type]});for(i=0;i<x.length;i++){var k=x[i];w=k[0].trace,S=p[w.uid];var I=!1;S&&(S.type===w.type?(S.update(k),I=!0):S.dispose()),!I&&w._module&&(p[w.uid]=w._module.plot(this,k))}var B=Object.keys(p);e:for(i=0;i<B.length;i++){var _=B[i];for(C=0;C<E.length;C++)if(w=E[C][0].trace,_===w.uid)continue e;S=p[_],S.dispose(),delete p[_]}},f.updateLayout=function(E){var p=this.map,S=E[this.id];!this.dragging&&!this.wheeling&&(p.setCenter(b(S.center)),p.setZoom(S.zoom),p.setBearing(S.bearing),p.setPitch(S.pitch)),this.updateLayers(E),this.updateFramework(E),this.updateFx(E),this.map.resize(),this.gd._context._scrollZoom.mapbox?p.scrollZoom.enable():p.scrollZoom.disable()},f.resolveOnRender=function(E){var p=this.map;p.on("render",function S(){p.loaded()&&(p.off("render",S),setTimeout(E,10))})},f.rejectOnError=function(E){var p=this.map;function S(){E(new Error(y.mapOnErrorMsg))}p.once("error",S),p.once("style.error",S),p.once("source.error",S),p.once("tile.error",S),p.once("layer.error",S)},f.createFramework=function(E){var p=this,S=p.div=document.createElement("div");S.id=p.uid,S.style.position="absolute",p.container.appendChild(S),p.xaxis={_id:"x",c2p:function(w){return p.project(w).x}},p.yaxis={_id:"y",c2p:function(w){return p.project(w).y}},p.updateFramework(E),p.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},M.setConvert(p.mockAxis,E)},f.initFx=function(E,p){var S=this,w=S.gd,i=S.map;i.on("moveend",function(k){if(S.map){var I=w._fullLayout;if(k.originalEvent||S.wheeling){var B=I[S.id];L.call("_storeDirectGUIEdit",w.layout,I._preGUI,S.getViewEdits(B));var _=S.getView();B._input.center=B.center=_.center,B._input.zoom=B.zoom=_.zoom,B._input.bearing=B.bearing=_.bearing,B._input.pitch=B.pitch=_.pitch,w.emit("plotly_relayout",S.getViewEditsWithDerived(_))}k.originalEvent&&k.originalEvent.type==="mouseup"?S.dragging=!1:S.wheeling&&(S.wheeling=!1),I._rehover&&I._rehover()}}),i.on("wheel",function(){S.wheeling=!0}),i.on("mousemove",function(k){var I=S.div.getBoundingClientRect(),B=[k.originalEvent.offsetX,k.originalEvent.offsetY];k.target.getBoundingClientRect=function(){return I},S.xaxis.p2c=function(){return i.unproject(B).lng},S.yaxis.p2c=function(){return i.unproject(B).lat},w._fullLayout._rehover=function(){w._fullLayout._hoversubplot===S.id&&w._fullLayout[S.id]&&g.hover(w,k,S.id)},g.hover(w,k,S.id),w._fullLayout._hoversubplot=S.id});function C(){g.loneUnhover(p._hoverlayer)}i.on("dragstart",function(){S.dragging=!0,C()}),i.on("zoomstart",C),i.on("mouseout",function(){w._fullLayout._hoversubplot=null});function x(){var k=S.getView();w.emit("plotly_relayouting",S.getViewEditsWithDerived(k))}i.on("drag",x),i.on("zoom",x),i.on("dblclick",function(){var k=w._fullLayout[S.id];L.call("_storeDirectGUIEdit",w.layout,w._fullLayout._preGUI,S.getViewEdits(k));var I=S.viewInitial;i.setCenter(b(I.center)),i.setZoom(I.zoom),i.setBearing(I.bearing),i.setPitch(I.pitch);var B=S.getView();k._input.center=k.center=B.center,k._input.zoom=k.zoom=B.zoom,k._input.bearing=k.bearing=B.bearing,k._input.pitch=k.pitch=B.pitch,w.emit("plotly_doubleclick",null),w.emit("plotly_relayout",S.getViewEditsWithDerived(B))}),S.clearOutline=function(){u(S.dragOptions),c(S.dragOptions.gd)},S.onClickInPanFn=function(k){return function(I){var B=w._fullLayout.clickmode;B.indexOf("select")>-1&&l(I.originalEvent,w,[S.xaxis],[S.yaxis],S.id,k),B.indexOf("event")>-1&&g.click(w,I.originalEvent)}}},f.updateFx=function(E){var p=this,S=p.map,w=p.gd;if(p.isStatic)return;function i(I){var B=p.map.unproject(I);return[B.lng,B.lat]}var C=E.dragmode,x;x=function(I,B){if(B.isRect){var _=I.range={};_[p.id]=[i([B.xmin,B.ymin]),i([B.xmax,B.ymax])]}else{var z=I.lassoPoints={};z[p.id]=B.map(i)}};var k=p.dragOptions;p.dragOptions=P.extendDeep(k||{},{dragmode:E.dragmode,element:p.div,gd:w,plotinfo:{id:p.id,domain:E[p.id].domain,xaxis:p.xaxis,yaxis:p.yaxis,fillRangeItems:x},xaxes:[p.xaxis],yaxes:[p.yaxis],subplot:p.id}),S.off("click",p.onClickInPanHandler),s(C)||t(C)?(S.dragPan.disable(),S.on("zoomstart",p.clearOutline),p.dragOptions.prepFn=function(I,B,_){a(I,B,_,p.dragOptions,C)},d.init(p.dragOptions)):(S.dragPan.enable(),S.off("zoomstart",p.clearOutline),p.div.onmousedown=null,p.div.ontouchstart=null,p.div.removeEventListener("touchstart",p.div._ontouchstart),p.onClickInPanHandler=p.onClickInPanFn(p.dragOptions),S.on("click",p.onClickInPanHandler))},f.updateFramework=function(E){var p=E[this.id].domain,S=E._size,w=this.div.style;w.width=S.w*(p.x[1]-p.x[0])+"px",w.height=S.h*(p.y[1]-p.y[0])+"px",w.left=S.l+p.x[0]*S.w+"px",w.top=S.t+(1-p.y[1])*S.h+"px",this.xaxis._offset=S.l+p.x[0]*S.w,this.xaxis._length=S.w*(p.x[1]-p.x[0]),this.yaxis._offset=S.t+(1-p.y[1])*S.h,this.yaxis._length=S.h*(p.y[1]-p.y[0])},f.updateLayers=function(E){var p=E[this.id],S=p.layers,w=this.layerList,i;if(S.length!==w.length){for(i=0;i<w.length;i++)w[i].dispose();for(w=this.layerList=[],i=0;i<S.length;i++)w.push(h(this,i,S[i]))}else for(i=0;i<S.length;i++)w[i].update(S[i])},f.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},f.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},f.setOptions=function(E,p,S){for(var w in S)this.map[p](E,w,S[w])},f.getMapLayers=function(){return this.map.getStyle().layers},f.addLayer=function(E,p){var S=this.map;if(typeof p=="string"){if(p===""){S.addLayer(E,p);return}for(var w=this.getMapLayers(),i=0;i<w.length;i++)if(p===w[i].id){S.addLayer(E,p);return}P.warn(["Trying to add layer with *below* value",p,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}S.addLayer(E)},f.project=function(E){return this.map.project(new A.LngLat(E[0],E[1]))},f.getView=function(){var E=this.map,p=E.getCenter(),S=p.lng,w=p.lat,i={lon:S,lat:w},C=E.getCanvas(),x=parseInt(C.style.width),k=parseInt(C.style.height);return{center:i,zoom:E.getZoom(),bearing:E.getBearing(),pitch:E.getPitch(),_derived:{coordinates:[E.unproject([0,0]).toArray(),E.unproject([x,0]).toArray(),E.unproject([x,k]).toArray(),E.unproject([0,k]).toArray()]}}},f.getViewEdits=function(E){for(var p=this.id,S=["center","zoom","bearing","pitch"],w={},i=0;i<S.length;i++){var C=S[i];w[p+"."+C]=E[C]}return w},f.getViewEditsWithDerived=function(E){var p=this.id,S=this.getViewEdits(E);return S[p+"._derived"]=E._derived,S};function v(E,p){var S={};if(P.isPlainObject(E))S.id=E.id,S.style=E;else if(typeof E=="string")if(S.id=E,y.styleValuesMapbox.indexOf(E)!==-1)S.style=m(E);else if(y.stylesNonMapbox[E]){S.style=y.stylesNonMapbox[E];var w=S.style.sources["plotly-"+E],i=w?w.tiles:void 0;i&&i[0]&&i[0].slice(-9)==="?api_key="&&(i[0]+=p._mapboxAccessToken)}else S.style=E;else S.id=y.styleValueDflt,S.style=m(y.styleValueDflt);return S.transition={duration:0,delay:0},S}function m(E){return y.styleUrlPrefix+E+"-"+y.styleUrlSuffix}function b(E){return[E.lon,E.lat]}te.exports=T},66741:function(te){te.exports=function(X){var e=X.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},7316:function(te,X,e){var A=e(33428),P=e(94336).m_,o=e(57624).SO,L=e(38248),M=e(83160),d=e(24040),g=e(73060),r=e(31780),t=e(3400),s=e(76308),a=e(39032).BADNUM,c=e(79811),u=e(1936).clearOutline,l=e(55308),y=e(85656),h=e(16672),T=e(84888)._M,f=t.relinkPrivateKeys,n=t._,v=te.exports={};t.extendFlat(v,d),v.attributes=e(45464),v.attributes.type.values=v.allTypes,v.fontAttrs=e(25376),v.layoutAttributes=e(64859),v.fontWeight="normal";var m=v.transformsRegistry,b=e(62460);v.executeAPICommand=b.executeAPICommand,v.computeAPICommandBindings=b.computeAPICommandBindings,v.manageCommandObserver=b.manageCommandObserver,v.hasSimpleAPICommandBindings=b.hasSimpleAPICommandBindings,v.redrawText=function(H){return H=t.getGraphDiv(H),new Promise(function(J){setTimeout(function(){H._fullLayout&&(d.getComponentMethod("annotations","draw")(H),d.getComponentMethod("legend","draw")(H),d.getComponentMethod("colorbar","draw")(H),J(v.previousPromises(H)))},300)})},v.resize=function(H){H=t.getGraphDiv(H);var J,ae=new Promise(function(K,Y){(!H||t.isHidden(H))&&Y(new Error("Resize must be passed a displayed plot div element.")),H._redrawTimer&&clearTimeout(H._redrawTimer),H._resolveResize&&(J=H._resolveResize),H._resolveResize=K,H._redrawTimer=setTimeout(function(){if(!H.layout||H.layout.width&&H.layout.height||t.isHidden(H)){K(H);return}delete H.layout.width,delete H.layout.height;var ie=H.changed;H.autoplay=!0,d.call("relayout",H,{autosize:!0}).then(function(){H.changed=ie,H._resolveResize===K&&(delete H._resolveResize,K(H))})},100)});return J&&J(ae),ae},v.previousPromises=function(H){if((H._promises||[]).length)return Promise.all(H._promises).then(function(){H._promises=[]})},v.addLinks=function(H){if(!(!H._context.showLink&&!H._context.showSources)){var J=H._fullLayout,ae=t.ensureSingle(J._paper,"text","js-plot-link-container",function(de){de.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:s.defaultLine,"pointer-events":"all"}).each(function(){var we=A.select(this);we.append("tspan").classed("js-link-to-tool",!0),we.append("tspan").classed("js-link-spacer",!0),we.append("tspan").classed("js-sourcelinks",!0)})}),K=ae.node(),Y={y:J._paper.attr("height")-9};document.body.contains(K)&&K.getComputedTextLength()>=J.width-20?(Y["text-anchor"]="start",Y.x=5):(Y["text-anchor"]="end",Y.x=J._paper.attr("width")-7),ae.attr(Y);var ie=ae.select(".js-link-to-tool"),ne=ae.select(".js-link-spacer"),le=ae.select(".js-sourcelinks");H._context.showSources&&H._context.showSources(H),H._context.showLink&&E(H,ie),ne.text(ie.text()&&le.text()?" - ":"")}};function E(H,J){J.text("");var ae=J.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(H._context.linkText+" »");if(H._context.sendData)ae.on("click",function(){v.sendDataToCloud(H)});else{var K=window.location.pathname.split("/"),Y=window.location.search;ae.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+K[2].split(".")[0]+"/"+K[1]+Y})}}v.sendDataToCloud=function(H){var J=(window.PLOTLYENV||{}).BASE_URL||H._context.plotlyServerURL;if(J){H.emit("plotly_beforeexport");var ae=A.select(H).append("div").attr("id","hiddenform").style("display","none"),K=ae.append("form").attr({action:J+"/external",method:"post",target:"_blank"}),Y=K.append("input").attr({type:"text",name:"data"});return Y.node().value=v.graphJson(H,!1,"keepdata"),K.node().submit(),ae.remove(),H.emit("plotly_afterexport"),!1}};var p=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],S=["year","month","dayMonth","dayMonthYear"];v.supplyDefaults=function(H,J){var ae=J&&J.skipUpdateCalc,K=H._fullLayout||{};if(K._skipDefaults){delete K._skipDefaults;return}var Y=H._fullLayout={},ie=H.layout||{},ne=H._fullData||[],le=H._fullData=[],de=H.data||[],we=H.calcdata||[],me=H._context||{},Le;H._transitionData||v.createTransitionData(H),Y._dfltTitle={plot:n(H,"Click to enter Plot title"),x:n(H,"Click to enter X axis title"),y:n(H,"Click to enter Y axis title"),colorbar:n(H,"Click to enter Colorscale title"),annotation:n(H,"new text")},Y._traceWord=n(H,"trace");var ve=C(H,p);if(Y._mapboxAccessToken=me.mapboxAccessToken,K._initialAutoSizeIsDone){var Ae=K.width,ye=K.height;v.supplyLayoutGlobalDefaults(ie,Y,ve),ie.width||(Y.width=Ae),ie.height||(Y.height=ye),v.sanitizeMargins(Y)}else{v.supplyLayoutGlobalDefaults(ie,Y,ve);var Se=!ie.width||!ie.height,_e=Y.autosize,ze=me.autosizable,Ie=Se&&(_e||ze);Ie?v.plotAutoSize(H,ie,Y):Se&&v.sanitizeMargins(Y),!_e&&Se&&(ie.width=Y.width,ie.height=Y.height)}Y._d3locale=x(ve,Y.separators),Y._extraFormat=C(H,S),Y._initialAutoSizeIsDone=!0,Y._dataLength=de.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var Ne=Y._subplots=i(),et=Y._splomAxes={x:{},y:{}},st=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=w(ne,de),Y._globalTransforms=(H._context||{}).globalTransforms,v.supplyDataDefaults(de,le,ie,Y);var Ze=Object.keys(et.x),Ke=Object.keys(et.y);if(Ze.length>1&&Ke.length>1){for(d.getComponentMethod("grid","sizeDefaults")(ie,Y),Le=0;Le<Ze.length;Le++)t.pushUnique(Ne.xaxis,Ze[Le]);for(Le=0;Le<Ke.length;Le++)t.pushUnique(Ne.yaxis,Ke[Le]);for(var nt in st)t.pushUnique(Ne.cartesian,nt)}if(Y._has=v._hasPlotType.bind(Y),ne.length===le.length)for(Le=0;Le<le.length;Le++)f(le[Le],ne[Le]);v.supplyLayoutModuleDefaults(ie,Y,le,H._transitionData);var it=Y._visibleModules,lt=[];for(Le=0;Le<it.length;Le++){var vt=it[Le].crossTraceDefaults;vt&&t.pushUnique(lt,vt)}for(Le=0;Le<lt.length;Le++)lt[Le](le,Y);Y._hasOnlyLargeSploms=Y._basePlotModules.length===1&&Y._basePlotModules[0].name==="splom"&&Ze.length>15&&Ke.length>15&&Y.shapes.length===0&&Y.images.length===0,v.linkSubplots(le,Y,ne,K),v.cleanPlot(le,Y,ne,K);var xt=!!(K._has&&K._has("gl2d")),Je=!!(Y._has&&Y._has("gl2d")),Pe=!!(K._has&&K._has("cartesian")),Ue=!!(Y._has&&Y._has("cartesian")),He=Pe||xt,Oe=Ue||Je;He&&!Oe?K._bgLayer.remove():Oe&&!He&&(Y._shouldCreateBgLayer=!0),K._zoomlayer&&!H._dragging&&u({_fullLayout:K}),k(le,Y),f(Y,K),d.getComponentMethod("colorscale","crossTraceDefaults")(le,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var Ce=Y._tracePreGUI,ge={},pe;for(pe in Ce)ge[pe]="old";for(Le=0;Le<le.length;Le++)pe=le[Le]._fullInput.uid,ge[pe]||(Ce[pe]={}),ge[pe]="new";for(pe in ge)ge[pe]==="old"&&delete Ce[pe];O(Y),d.getComponentMethod("rangeslider","makeData")(Y),!ae&&we.length===le.length&&v.supplyDefaultsUpdateCalc(we,le)},v.supplyDefaultsUpdateCalc=function(H,J){for(var ae=0;ae<J.length;ae++){var K=J[ae],Y=(H[ae]||[])[0];if(Y&&Y.trace){var ie=Y.trace;if(ie._hasCalcTransform){var ne=ie._arrayAttrs,le,de,we;for(le=0;le<ne.length;le++)de=ne[le],we=t.nestedProperty(ie,de).get().slice(),t.nestedProperty(K,de).set(we)}Y.trace=K}}};function w(H,J){var ae=J.length,K=[],Y,ie;for(Y=0;Y<H.length;Y++){var ne=H[Y]._fullInput;ne!==ie&&K.push(ne),ie=ne}var le=K.length,de=new Array(ae),we={};function me(Ae,ye){de[ye]=Ae,we[Ae]=1}function Le(Ae,ye){if(Ae&&typeof Ae=="string"&&!we[Ae])return me(Ae,ye),!0}for(Y=0;Y<ae;Y++){var ve=J[Y].uid;typeof ve=="number"&&(ve=String(ve)),!Le(ve,Y)&&(Y<le&&Le(K[Y].uid,Y)||me(t.randstr(we),Y))}return de}function i(){var H=d.collectableSubplotTypes,J={},ae,K;if(!H){H=[];var Y=d.subplotsRegistry;for(var ie in Y){var ne=Y[ie],le=ne.attr;if(le&&(H.push(ie),Array.isArray(le)))for(K=0;K<le.length;K++)t.pushUnique(H,le[K])}}for(ae=0;ae<H.length;ae++)J[H[ae]]=[];return J}function C(H,J){var ae=H._context.locale;ae||(ae="en-US");var K=!1,Y={};function ie(Le){for(var ve=!0,Ae=0;Ae<J.length;Ae++){var ye=J[Ae];Y[ye]||(Le[ye]?Y[ye]=Le[ye]:ve=!1)}ve&&(K=!0)}for(var ne=0;ne<2;ne++){for(var le=H._context.locales,de=0;de<2;de++){var we=(le[ae]||{}).format;if(we&&(ie(we),K))break;le=d.localeRegistry}var me=ae.split("-")[0];if(K||me===ae)break;ae=me}return K||ie(d.localeRegistry.en.format),Y}function x(H,J){return H.decimal=J.charAt(0),H.thousands=J.charAt(1),{numberFormat:function(ae){try{ae=o(H).format(t.adjustFormat(ae))}catch{return t.warnBadFormat(ae),t.noFormat}return ae},timeFormat:P(H).utcFormat}}function k(H,J){var ae,K=[];J.meta&&(ae=J._meta={meta:J.meta,layout:{meta:J.meta}});for(var Y=0;Y<H.length;Y++){var ie=H[Y];ie.meta?K[ie.index]=ie._meta={meta:ie.meta}:J.meta&&(ie._meta={meta:J.meta}),J.meta&&(ie._meta.layout={meta:J.meta})}K.length&&(ae||(ae=J._meta={}),ae.data=K)}v.createTransitionData=function(H){H._transitionData||(H._transitionData={}),H._transitionData._frames||(H._transitionData._frames=[]),H._transitionData._frameHash||(H._transitionData._frameHash={}),H._transitionData._counter||(H._transitionData._counter=0),H._transitionData._interruptCallbacks||(H._transitionData._interruptCallbacks=[])},v._hasPlotType=function(H){var J,ae=this._basePlotModules||[];for(J=0;J<ae.length;J++)if(ae[J].name===H)return!0;var K=this._modules||[];for(J=0;J<K.length;J++){var Y=K[J].name;if(Y===H)return!0;var ie=d.modules[Y];if(ie&&ie.categories[H])return!0}return!1},v.cleanPlot=function(H,J,ae,K){var Y,ie,ne=K._basePlotModules||[];for(Y=0;Y<ne.length;Y++){var le=ne[Y];le.clean&&le.clean(H,J,ae,K)}var de=K._has&&K._has("gl"),we=J._has&&J._has("gl");de&&!we&&K._glcontainer!==void 0&&(K._glcontainer.selectAll(".gl-canvas").remove(),K._glcontainer.selectAll(".no-webgl").remove(),K._glcanvas=null);var me=!!K._infolayer;e:for(Y=0;Y<ae.length;Y++){var Le=ae[Y],ve=Le.uid;for(ie=0;ie<H.length;ie++){var Ae=H[ie];if(ve===Ae.uid)continue e}me&&K._infolayer.select(".cb"+ve).remove()}},v.linkSubplots=function(H,J,ae,K){var Y,ie,ne=K._plots||{},le=J._plots={},de=J._subplots,we={_fullData:H,_fullLayout:J},me=de.cartesian.concat(de.gl2d||[]);for(Y=0;Y<me.length;Y++){var Le=me[Y],ve=ne[Le],Ae=c.getFromId(we,Le,"x"),ye=c.getFromId(we,Le,"y"),Se;for(ve?Se=le[Le]=ve:(Se=le[Le]={},Se.id=Le),Ae._counterAxes.push(ye._id),ye._counterAxes.push(Ae._id),Ae._subplotsWith.push(Le),ye._subplotsWith.push(Le),Se.xaxis=Ae,Se.yaxis=ye,Se._hasClipOnAxisFalse=!1,ie=0;ie<H.length;ie++){var _e=H[ie];if(_e.xaxis===Se.xaxis._id&&_e.yaxis===Se.yaxis._id&&_e.cliponaxis===!1){Se._hasClipOnAxisFalse=!0;break}}}var ze=c.list(we,null,!0),Ie;for(Y=0;Y<ze.length;Y++){Ie=ze[Y];var Ne=null;Ie.overlaying&&(Ne=c.getFromId(we,Ie.overlaying),Ne&&Ne.overlaying&&(Ie.overlaying=!1,Ne=null)),Ie._mainAxis=Ne||Ie,Ne&&(Ie.domain=Ne.domain.slice()),Ie._anchorAxis=Ie.anchor==="free"?null:c.getFromId(we,Ie.anchor)}for(Y=0;Y<ze.length;Y++)if(Ie=ze[Y],Ie._counterAxes.sort(c.idSort),Ie._subplotsWith.sort(t.subplotSort),Ie._mainSubplot=I(Ie,J),Ie._counterAxes.length&&(Ie.spikemode&&Ie.spikemode.indexOf("across")!==-1||Ie.automargin&&Ie.mirror&&Ie.anchor!=="free"||d.getComponentMethod("rangeslider","isVisible")(Ie))){var et=1,st=0;for(ie=0;ie<Ie._counterAxes.length;ie++){var Ze=c.getFromId(we,Ie._counterAxes[ie]);et=Math.min(et,Ze.domain[0]),st=Math.max(st,Ze.domain[1])}et<st&&(Ie._counterDomainMin=et,Ie._counterDomainMax=st)}};function I(H,J){var ae={_fullLayout:J},K=H._id.charAt(0)==="x",Y=H._mainAxis._anchorAxis,ie="",ne="",le="";if(Y&&(le=Y._mainAxis._id,ie=K?H._id+le:le+H._id),!ie||!J._plots[ie]){ie="";for(var de=H._counterAxes,we=0;we<de.length;we++){var me=de[we],Le=K?H._id+me:me+H._id;ne||(ne=Le);var ve=c.getFromId(ae,me);if(le&&ve.overlaying===le){ie=Le;break}}}return ie||ne}v.clearExpandedTraceDefaultColors=function(H){var J,ae,K;function Y(ne,le,de,we){ae[we]=le,ae.length=we+1,ne.valType==="color"&&ne.dflt===void 0&&J.push(ae.join("."))}for(ae=[],J=H._module._colorAttrs,J||(H._module._colorAttrs=J=[],g.crawl(H._module.attributes,Y)),K=0;K<J.length;K++){var ie=t.nestedProperty(H,"_input."+J[K]);ie.get()||t.nestedProperty(H,J[K]).set(null)}},v.supplyDataDefaults=function(H,J,ae,K){var Y=K._modules,ie=K._visibleModules,ne=K._basePlotModules,le=0,de=0,we,me,Le;K._transformModules=[];function ve(Ke){J.push(Ke);var nt=Ke._module;nt&&(t.pushUnique(Y,nt),Ke.visible===!0&&t.pushUnique(ie,nt),t.pushUnique(ne,Ke._module.basePlotModule),le++,Ke._input.visible!==!1&&de++)}var Ae={},ye=[],Se=(ae.template||{}).data||{},_e=r.traceTemplater(Se);for(we=0;we<H.length;we++){if(Le=H[we],me=_e.newTrace(Le),me.uid=K._traceUids[we],v.supplyTraceDefaults(Le,me,de,K,we),me.index=we,me._input=Le,me._expandedIndex=le,me.transforms&&me.transforms.length)for(var ze=Le.visible!==!1&&me.visible===!1,Ie=_(me,J,ae,K),Ne=0;Ne<Ie.length;Ne++){var et=Ie[Ne],st={_template:me._template,type:me.type,uid:me.uid+Ne};ze&&et.visible===!1&&delete et.visible,v.supplyTraceDefaults(et,st,le,K,we),f(st,et),st.index=we,st._input=Le,st._fullInput=me,st._expandedIndex=le,st._expandedInput=et,ve(st)}else me._fullInput=me,me._expandedInput=me,ve(me);d.traceIs(me,"carpetAxis")&&(Ae[me.carpet]=me),d.traceIs(me,"carpetDependent")&&ye.push(we)}for(we=0;we<ye.length;we++)if(me=J[ye[we]],!!me.visible){var Ze=Ae[me.carpet];if(me._carpet=Ze,!Ze||!Ze.visible){me.visible=!1;continue}me.xaxis=Ze.xaxis,me.yaxis=Ze.yaxis}},v.supplyAnimationDefaults=function(H){H=H||{};var J,ae={};function K(Y,ie){return t.coerce(H||{},ae,y,Y,ie)}if(K("mode"),K("direction"),K("fromcurrent"),Array.isArray(H.frame))for(ae.frame=[],J=0;J<H.frame.length;J++)ae.frame[J]=v.supplyAnimationFrameDefaults(H.frame[J]||{});else ae.frame=v.supplyAnimationFrameDefaults(H.frame||{});if(Array.isArray(H.transition))for(ae.transition=[],J=0;J<H.transition.length;J++)ae.transition[J]=v.supplyAnimationTransitionDefaults(H.transition[J]||{});else ae.transition=v.supplyAnimationTransitionDefaults(H.transition||{});return ae},v.supplyAnimationFrameDefaults=function(H){var J={};function ae(K,Y){return t.coerce(H||{},J,y.frame,K,Y)}return ae("duration"),ae("redraw"),J},v.supplyAnimationTransitionDefaults=function(H){var J={};function ae(K,Y){return t.coerce(H||{},J,y.transition,K,Y)}return ae("duration"),ae("easing"),J},v.supplyFrameDefaults=function(H){var J={};function ae(K,Y){return t.coerce(H,J,h,K,Y)}return ae("group"),ae("name"),ae("traces"),ae("baseframe"),ae("data"),ae("layout"),J},v.supplyTraceDefaults=function(H,J,ae,K,Y){var ie=K.colorway||s.defaults,ne=ie[ae%ie.length],le;function de(Ne,et){return t.coerce(H,J,v.attributes,Ne,et)}var we=de("visible");de("type"),de("name",K._traceWord+" "+Y),de("uirevision",K.uirevision);var me=v.getModule(J);if(J._module=me,me){var Le=me.basePlotModule,ve=Le.attr,Ae=Le.attributes;if(ve&&Ae){var ye=K._subplots,Se="";if(we||Le.name!=="gl2d"){if(Array.isArray(ve))for(le=0;le<ve.length;le++){var _e=ve[le],ze=t.coerce(H,J,Ae,_e);ye[_e]&&t.pushUnique(ye[_e],ze),Se+=ze}else Se=t.coerce(H,J,Ae,ve);ye[Le.name]&&t.pushUnique(ye[Le.name],Se)}}}if(we){if(de("customdata"),de("ids"),de("meta"),d.traceIs(J,"showLegend")?(t.coerce(H,J,me.attributes.showlegend?me.attributes:v.attributes,"showlegend"),de("legend"),de("legendwidth"),de("legendgroup"),de("legendgrouptitle.text"),de("legendrank"),J._dfltShowLegend=!0):J._dfltShowLegend=!1,me&&me.supplyDefaults(H,J,ne,K),d.traceIs(J,"noOpacity")||de("opacity"),d.traceIs(J,"notLegendIsolatable")&&(J.visible=!!J.visible),d.traceIs(J,"noHover")||(J.hovertemplate||t.coerceHoverinfo(H,J,K),J.type!=="parcats"&&d.getComponentMethod("fx","supplyDefaults")(H,J,ne,K)),me&&me.selectPoints){var Ie=de("selectedpoints");t.isTypedArray(Ie)&&(J.selectedpoints=Array.from(Ie))}v.supplyTransformDefaults(H,J,K)}return J};function B(H){var J=H.transforms;if(Array.isArray(J)&&J.length)for(var ae=0;ae<J.length;ae++){var K=J[ae],Y=K._module||m[K.type];if(Y&&Y.makesData)return!0}return!1}v.hasMakesDataTransform=B,v.supplyTransformDefaults=function(H,J,ae){if(J._length||B(H)){var K=ae._globalTransforms||[],Y=ae._transformModules||[];if(!(!Array.isArray(H.transforms)&&K.length===0))for(var ie=H.transforms||[],ne=K.concat(ie),le=J.transforms=[],de=0;de<ne.length;de++){var we=ne[de],me=we.type,Le=m[me],ve,Ae=!(we._module&&we._module===Le),ye=Le&&typeof Le.transform=="function";Le||t.warn("Unrecognized transform type "+me+"."),Le&&Le.supplyDefaults&&(Ae||ye)?(ve=Le.supplyDefaults(we,J,ae,H),ve.type=me,ve._module=Le,t.pushUnique(Y,Le)):ve=t.extendFlat({},we),le.push(ve)}}};function _(H,J,ae,K){for(var Y=H.transforms,ie=[H],ne=0;ne<Y.length;ne++){var le=Y[ne],de=m[le.type];de&&de.transform&&(ie=de.transform(ie,{transform:le,fullTrace:H,fullData:J,layout:ae,fullLayout:K,transformIndex:ne}))}return ie}v.supplyLayoutGlobalDefaults=function(H,J,ae){function K(Le,ve){return t.coerce(H,J,v.layoutAttributes,Le,ve)}var Y=H.template;t.isPlainObject(Y)&&(J.template=Y,J._template=Y.layout,J._dataTemplate=Y.data),K("autotypenumbers");var ie=t.coerceFont(K,"font"),ne=ie.size;t.coerceFont(K,"title.font",t.extendFlat({},ie,{size:Math.round(ne*1.4)})),K("title.text",J._dfltTitle.plot),K("title.xref");var le=K("title.yref");K("title.pad.t"),K("title.pad.r"),K("title.pad.b"),K("title.pad.l");var de=K("title.automargin");K("title.x"),K("title.xanchor"),K("title.y"),K("title.yanchor"),de&&(le==="paper"&&(J.title.y!==0&&(J.title.y=1),J.title.yanchor==="auto"&&(J.title.yanchor=J.title.y===0?"top":"bottom")),le==="container"&&(J.title.y==="auto"&&(J.title.y=1),J.title.yanchor==="auto"&&(J.title.yanchor=J.title.y<.5?"bottom":"top")));var we=K("uniformtext.mode");we&&K("uniformtext.minsize"),K("autosize",!(H.width&&H.height)),K("width"),K("height"),K("minreducedwidth"),K("minreducedheight"),K("margin.l"),K("margin.r"),K("margin.t"),K("margin.b"),K("margin.pad"),K("margin.autoexpand"),H.width&&H.height&&v.sanitizeMargins(J),d.getComponentMethod("grid","sizeDefaults")(H,J),K("paper_bgcolor"),K("separators",ae.decimal+ae.thousands),K("hidesources"),K("colorway"),K("datarevision");var me=K("uirevision");K("editrevision",me),K("selectionrevision",me),d.getComponentMethod("modebar","supplyLayoutDefaults")(H,J),d.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(H,J,K),d.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(H,J,K),K("meta"),t.isPlainObject(H.transition)&&(K("transition.duration"),K("transition.easing"),K("transition.ordering")),d.getComponentMethod("calendars","handleDefaults")(H,J,"calendar"),d.getComponentMethod("fx","supplyLayoutGlobalDefaults")(H,J,K),t.coerce(H,J,l,"scattermode")};function z(H){return typeof H=="string"&&H.substr(H.length-2)==="px"&&parseFloat(H)}v.plotAutoSize=function(J,ae,K){var Y=J._context||{},ie=Y.frameMargins,ne,le,de=t.isPlotDiv(J);if(de&&J.emit("plotly_autosize"),Y.fillFrame)ne=window.innerWidth,le=window.innerHeight,document.body.style.overflow="hidden";else{var we=de?window.getComputedStyle(J):{};if(ne=z(we.width)||z(we.maxWidth)||K.width,le=z(we.height)||z(we.maxHeight)||K.height,L(ie)&&ie>0){var me=1-2*ie;ne=Math.round(me*ne),le=Math.round(me*le)}}var Le=v.layoutAttributes.width.min,ve=v.layoutAttributes.height.min;ne<Le&&(ne=Le),le<ve&&(le=ve);var Ae=!ae.width&&Math.abs(K.width-ne)>1,ye=!ae.height&&Math.abs(K.height-le)>1;(ye||Ae)&&(Ae&&(K.width=ne),ye&&(K.height=le)),J._initialAutoSize||(J._initialAutoSize={width:ne,height:le}),v.sanitizeMargins(K)},v.supplyLayoutModuleDefaults=function(H,J,ae,K){var Y=d.componentsRegistry,ie=J._basePlotModules,ne,le,de,we=d.subplotsRegistry.cartesian;for(ne in Y)de=Y[ne],de.includeBasePlot&&de.includeBasePlot(H,J);ie.length||ie.push(we),J._has("cartesian")&&(d.getComponentMethod("grid","contentDefaults")(H,J),we.finalizeSubplots(H,J));for(var me in J._subplots)J._subplots[me].sort(t.subplotSort);for(le=0;le<ie.length;le++)de=ie[le],de.supplyLayoutDefaults&&de.supplyLayoutDefaults(H,J,ae);var Le=J._modules;for(le=0;le<Le.length;le++)de=Le[le],de.supplyLayoutDefaults&&de.supplyLayoutDefaults(H,J,ae);var ve=J._transformModules;for(le=0;le<ve.length;le++)de=ve[le],de.supplyLayoutDefaults&&de.supplyLayoutDefaults(H,J,ae,K);for(ne in Y)de=Y[ne],de.supplyLayoutDefaults&&de.supplyLayoutDefaults(H,J,ae)},v.purge=function(H){var J=H._fullLayout||{};J._glcontainer!==void 0&&(J._glcontainer.selectAll(".gl-canvas").remove(),J._glcontainer.remove(),J._glcanvas=null),J._modeBar&&J._modeBar.destroy(),H._transitionData&&(H._transitionData._interruptCallbacks&&(H._transitionData._interruptCallbacks.length=0),H._transitionData._animationRaf&&window.cancelAnimationFrame(H._transitionData._animationRaf)),t.clearThrottle(),t.clearResponsive(H),delete H.data,delete H.layout,delete H._fullData,delete H._fullLayout,delete H.calcdata,delete H.empty,delete H.fid,delete H.undoqueue,delete H.undonum,delete H.autoplay,delete H.changed,delete H._promises,delete H._redrawTimer,delete H._hmlumcount,delete H._hmpixcount,delete H._transitionData,delete H._transitioning,delete H._initialAutoSize,delete H._transitioningWithDuration,delete H._dragging,delete H._dragged,delete H._dragdata,delete H._hoverdata,delete H._snapshotInProgress,delete H._editing,delete H._mouseDownTime,delete H._legendMouseDownTime,H.removeAllListeners&&H.removeAllListeners()},v.style=function(H){var J=H._fullLayout._visibleModules,ae=[],K;for(K=0;K<J.length;K++){var Y=J[K];Y.style&&t.pushUnique(ae,Y.style)}for(K=0;K<ae.length;K++)ae[K](H)},v.sanitizeMargins=function(H){if(!(!H||!H.margin)){var J=H.width,ae=H.height,K=H.margin,Y=J-(K.l+K.r),ie=ae-(K.t+K.b),ne;Y<0&&(ne=(J-1)/(K.l+K.r),K.l=Math.floor(ne*K.l),K.r=Math.floor(ne*K.r)),ie<0&&(ne=(ae-1)/(K.t+K.b),K.t=Math.floor(ne*K.t),K.b=Math.floor(ne*K.b))}},v.clearAutoMarginIds=function(H){H._fullLayout._pushmarginIds={}},v.allowAutoMargin=function(H,J){H._fullLayout._pushmarginIds[J]=1};function O(H){var J=H.margin;if(!H._size){var ae=H._size={l:Math.round(J.l),r:Math.round(J.r),t:Math.round(J.t),b:Math.round(J.b),p:Math.round(J.pad)};ae.w=Math.round(H.width)-ae.l-ae.r,ae.h=Math.round(H.height)-ae.t-ae.b}H._pushmargin||(H._pushmargin={}),H._pushmarginIds||(H._pushmarginIds={}),H._reservedMargin||(H._reservedMargin={})}var F=2,N=2;v.autoMargin=function(H,J,ae){var K=H._fullLayout,Y=K.width,ie=K.height,ne=K.margin,le=K.minreducedwidth,de=K.minreducedheight,we=t.constrain(Y-ne.l-ne.r,F,le),me=t.constrain(ie-ne.t-ne.b,N,de),Le=Math.max(0,Y-we),ve=Math.max(0,ie-me),Ae=K._pushmargin,ye=K._pushmarginIds;if(ne.autoexpand!==!1){if(!ae)delete Ae[J],delete ye[J];else{var Se=ae.pad;if(Se===void 0&&(Se=Math.min(12,ne.l,ne.r,ne.t,ne.b)),Le){var _e=(ae.l+ae.r)/Le;_e>1&&(ae.l/=_e,ae.r/=_e)}if(ve){var ze=(ae.t+ae.b)/ve;ze>1&&(ae.t/=ze,ae.b/=ze)}var Ie=ae.xl!==void 0?ae.xl:ae.x,Ne=ae.xr!==void 0?ae.xr:ae.x,et=ae.yt!==void 0?ae.yt:ae.y,st=ae.yb!==void 0?ae.yb:ae.y;Ae[J]={l:{val:Ie,size:ae.l+Se},r:{val:Ne,size:ae.r+Se},b:{val:st,size:ae.b+Se},t:{val:et,size:ae.t+Se}},ye[J]=1}if(!K._replotting)return v.doAutoMargin(H)}};function V(H){if("_redrawFromAutoMarginCount"in H._fullLayout)return!1;var J=c.list(H,"",!0);for(var ae in J)if(J[ae].autoshift||J[ae].shift)return!0;return!1}v.doAutoMargin=function(H){var J=H._fullLayout,ae=J.width,K=J.height;J._size||(J._size={}),O(J);var Y=J._size,ie=J.margin,ne={t:0,b:0,l:0,r:0},le=t.extendFlat({},Y),de=ie.l,we=ie.r,me=ie.t,Le=ie.b,ve=J._pushmargin,Ae=J._pushmarginIds,ye=J.minreducedwidth,Se=J.minreducedheight;if(ie.autoexpand!==!1){for(var _e in ve)Ae[_e]||delete ve[_e];var ze=H._fullLayout._reservedMargin;for(var Ie in ze)for(var Ne in ze[Ie]){var et=ze[Ie][Ne];ne[Ne]=Math.max(ne[Ne],et)}ve.base={l:{val:0,size:de},r:{val:1,size:we},t:{val:1,size:me},b:{val:0,size:Le}};for(var st in ne){var Ze=0;for(var Ke in ve)Ke!=="base"&&L(ve[Ke][st].size)&&(Ze=ve[Ke][st].size>Ze?ve[Ke][st].size:Ze);var nt=Math.max(0,ie[st]-Ze);ne[st]=Math.max(0,ne[st]-nt)}for(var it in ve){var lt=ve[it].l||{},vt=ve[it].b||{},xt=lt.val,Je=lt.size,Pe=vt.val,Ue=vt.size,He=ae-ne.r-ne.l,Oe=K-ne.t-ne.b;for(var Ce in ve){if(L(Je)&&ve[Ce].r){var ge=ve[Ce].r.val,pe=ve[Ce].r.size;if(ge>xt){var Te=(Je*ge+(pe-He)*xt)/(ge-xt),be=(pe*(1-xt)+(Je-He)*(1-ge))/(ge-xt);Te+be>de+we&&(de=Te,we=be)}}if(L(Ue)&&ve[Ce].t){var ke=ve[Ce].t.val,Ve=ve[Ce].t.size;if(ke>Pe){var je=(Ue*ke+(Ve-Oe)*Pe)/(ke-Pe),at=(Ve*(1-Pe)+(Ue-Oe)*(1-ke))/(ke-Pe);je+at>Le+me&&(Le=je,me=at)}}}}}var ut=t.constrain(ae-ie.l-ie.r,F,ye),Nt=t.constrain(K-ie.t-ie.b,N,Se),Vt=Math.max(0,ae-ut),gt=Math.max(0,K-Nt);if(Vt){var Ct=(de+we)/Vt;Ct>1&&(de/=Ct,we/=Ct)}if(gt){var Yt=(Le+me)/gt;Yt>1&&(Le/=Yt,me/=Yt)}if(Y.l=Math.round(de)+ne.l,Y.r=Math.round(we)+ne.r,Y.t=Math.round(me)+ne.t,Y.b=Math.round(Le)+ne.b,Y.p=Math.round(ie.pad),Y.w=Math.round(ae)-Y.l-Y.r,Y.h=Math.round(K)-Y.t-Y.b,!J._replotting&&(v.didMarginChange(le,Y)||V(H))){"_redrawFromAutoMarginCount"in J?J._redrawFromAutoMarginCount++:J._redrawFromAutoMarginCount=1;var gr=3*(1+Object.keys(Ae).length);if(J._redrawFromAutoMarginCount<gr)return d.call("_doPlot",H);J._size=le,t.warn("Too many auto-margin redraws.")}j(H)};function j(H){var J=c.list(H,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(ae){for(var K=0;K<J.length;K++){var Y=J[K][ae];Y&&Y()}})}var $=["l","r","t","b","p","w","h"];v.didMarginChange=function(H,J){for(var ae=0;ae<$.length;ae++){var K=$[ae],Y=H[K],ie=J[K];if(!L(Y)||Math.abs(ie-Y)>1)return!0}return!1},v.graphJson=function(H,J,ae,K,Y,ie){(Y&&J&&!H._fullData||Y&&!J&&!H._fullLayout)&&v.supplyDefaults(H);var ne=Y?H._fullData:H.data,le=Y?H._fullLayout:H.layout,de=(H._transitionData||{})._frames;function we(ve,Ae){if(typeof ve=="function")return Ae?"_function_":null;if(t.isPlainObject(ve)){var ye={},Se;return Object.keys(ve).sort().forEach(function(Ne){if(["_","["].indexOf(Ne.charAt(0))===-1){if(typeof ve[Ne]=="function"){Ae&&(ye[Ne]="_function");return}if(ae==="keepdata"){if(Ne.substr(Ne.length-3)==="src")return}else if(ae==="keepstream"){if(Se=ve[Ne+"src"],typeof Se=="string"&&Se.indexOf(":")>0&&!t.isPlainObject(ve.stream))return}else if(ae!=="keepall"&&(Se=ve[Ne+"src"],typeof Se=="string"&&Se.indexOf(":")>0))return;ye[Ne]=we(ve[Ne],Ae)}}),ye}var _e=Array.isArray(ve),ze=t.isTypedArray(ve);if((_e||ze)&&ve.dtype&&ve.shape){var Ie=ve.bdata;return we({dtype:ve.dtype,shape:ve.shape,bdata:t.isArrayBuffer(Ie)?M.encode(Ie):Ie},Ae)}return _e?ve.map(function(Ne){return we(Ne,Ae)}):ze?t.simpleMap(ve,t.identity):t.isJSDate(ve)?t.ms2DateTimeLocal(+ve):ve}var me={data:(ne||[]).map(function(ve){var Ae=we(ve);return J&&delete Ae.fit,Ae})};if(!J&&(me.layout=we(le),Y)){var Le=le._size;me.layout.computed={margin:{b:Le.b,l:Le.l,r:Le.r,t:Le.t}}}return de&&(me.frames=we(de)),ie&&(me.config=we(H._context,!0)),K==="object"?me:JSON.stringify(me)},v.modifyFrames=function(H,J){var ae,K,Y,ie=H._transitionData._frames,ne=H._transitionData._frameHash;for(ae=0;ae<J.length;ae++)switch(K=J[ae],K.type){case"replace":Y=K.value;var le=(ie[K.index]||{}).name,de=Y.name;ie[K.index]=ne[de]=Y,de!==le&&(delete ne[le],ne[de]=Y);break;case"insert":Y=K.value,ne[Y.name]=Y,ie.splice(K.index,0,Y);break;case"delete":Y=ie[K.index],delete ne[Y.name],ie.splice(K.index,1);break}return Promise.resolve()},v.computeFrame=function(H,J){var ae=H._transitionData._frameHash,K,Y,ie,ne;if(!J)throw new Error("computeFrame must be given a string frame name");var le=ae[J.toString()];if(!le)return!1;for(var de=[le],we=[le.name];le.baseframe&&(le=ae[le.baseframe.toString()])&&we.indexOf(le.name)===-1;)de.push(le),we.push(le.name);for(var me={};le=de.pop();)if(le.layout&&(me.layout=v.extendLayout(me.layout,le.layout)),le.data){if(me.data||(me.data=[]),Y=le.traces,!Y)for(Y=[],K=0;K<le.data.length;K++)Y[K]=K;for(me.traces||(me.traces=[]),K=0;K<le.data.length;K++)ie=Y[K],ie!=null&&(ne=me.traces.indexOf(ie),ne===-1&&(ne=me.data.length,me.traces[ne]=ie),me.data[ne]=v.extendTrace(me.data[ne],le.data[K]))}return me},v.recomputeFrameHash=function(H){for(var J=H._transitionData._frameHash={},ae=H._transitionData._frames,K=0;K<ae.length;K++){var Y=ae[K];Y&&Y.name&&(J[Y.name]=Y)}},v.extendObjectWithContainers=function(H,J,ae){var K,Y,ie,ne,le,de,we,me,Le=t.extendDeepNoArrays({},J||{}),ve=t.expandObjectPaths(Le),Ae={};if(ae&&ae.length)for(ie=0;ie<ae.length;ie++)K=t.nestedProperty(ve,ae[ie]),Y=K.get(),Y===void 0?t.nestedProperty(Ae,ae[ie]).set(null):(K.set(null),t.nestedProperty(Ae,ae[ie]).set(Y));if(H=t.extendDeepNoArrays(H||{},ve),ae&&ae.length){for(ie=0;ie<ae.length;ie++)if(le=t.nestedProperty(Ae,ae[ie]),we=le.get(),!!we){for(de=t.nestedProperty(H,ae[ie]),me=de.get(),Array.isArray(me)||(me=[],de.set(me)),ne=0;ne<we.length;ne++){var ye=we[ne];ye===null?me[ne]=null:me[ne]=v.extendObjectWithContainers(me[ne],ye)}de.set(me)}}return H},v.dataArrayContainers=["transforms","dimensions"],v.layoutArrayContainers=d.layoutArrayContainers,v.extendTrace=function(H,J){return v.extendObjectWithContainers(H,J,v.dataArrayContainers)},v.extendLayout=function(H,J){return v.extendObjectWithContainers(H,J,v.layoutArrayContainers)},v.transition=function(H,J,ae,K,Y,ie){var ne={redraw:Y.redraw},le={},de=[];return ne.prepareFn=function(){for(var we=Array.isArray(J)?J.length:0,me=K.slice(0,we),Le=0;Le<me.length;Le++){var ve=me[Le],Ae=H._fullData[ve],ye=Ae._module;if(ye){if(ye.animatable){var Se=ye.basePlotModule.name;le[Se]||(le[Se]=[]),le[Se].push(ve)}H.data[me[Le]]=v.extendTrace(H.data[me[Le]],J[Le])}}var _e=t.expandObjectPaths(t.extendDeepNoArrays({},ae)),ze=/^[xy]axis[0-9]*$/;for(var Ie in _e)ze.test(Ie)&&delete _e[Ie].range;v.extendLayout(H.layout,_e),delete H.calcdata,v.supplyDefaults(H),v.doCalcdata(H);var Ne=t.expandObjectPaths(ae);if(Ne){var et=H._fullLayout._plots;for(var st in et){var Ze=et[st],Ke=Ze.xaxis,nt=Ze.yaxis,it=Ke.range.slice(),lt=nt.range.slice(),vt=null,xt=null,Je=null,Pe=null;Array.isArray(Ne[Ke._name+".range"])?vt=Ne[Ke._name+".range"].slice():Array.isArray((Ne[Ke._name]||{}).range)&&(vt=Ne[Ke._name].range.slice()),Array.isArray(Ne[nt._name+".range"])?xt=Ne[nt._name+".range"].slice():Array.isArray((Ne[nt._name]||{}).range)&&(xt=Ne[nt._name].range.slice()),it&&vt&&(Ke.r2l(it[0])!==Ke.r2l(vt[0])||Ke.r2l(it[1])!==Ke.r2l(vt[1]))&&(Je={xr0:it,xr1:vt}),lt&&xt&&(nt.r2l(lt[0])!==nt.r2l(xt[0])||nt.r2l(lt[1])!==nt.r2l(xt[1]))&&(Pe={yr0:lt,yr1:xt}),(Je||Pe)&&de.push(t.extendFlat({plotinfo:Ze},Je,Pe))}}return Promise.resolve()},ne.runFn=function(we){var me,Le=H._fullLayout._basePlotModules,ve=de.length,Ae;if(ae)for(Ae=0;Ae<Le.length;Ae++)Le[Ae].transitionAxes&&Le[Ae].transitionAxes(H,de,ie,we);ve?(me=t.extendFlat({},ie),me.duration=0,delete le.cartesian):me=ie;for(var ye in le){var Se=le[ye],_e=H._fullData[Se[0]]._module;_e.basePlotModule.plot(H,Se,me,we)}},q(H,ie,ne)},v.transitionFromReact=function(H,J,ae,K){var Y=H._fullLayout,ie=Y.transition,ne={},le=[];return ne.prepareFn=function(){var de=Y._plots;ne.redraw=!1,J.anim==="some"&&(ne.redraw=!0),ae.anim==="some"&&(ne.redraw=!0);for(var we in de){var me=de[we],Le=me.xaxis,ve=me.yaxis,Ae=K[Le._name].range.slice(),ye=K[ve._name].range.slice(),Se=Le.range.slice(),_e=ve.range.slice();Le.setScale(),ve.setScale();var ze=null,Ie=null;(Le.r2l(Ae[0])!==Le.r2l(Se[0])||Le.r2l(Ae[1])!==Le.r2l(Se[1]))&&(ze={xr0:Ae,xr1:Se}),(ve.r2l(ye[0])!==ve.r2l(_e[0])||ve.r2l(ye[1])!==ve.r2l(_e[1]))&&(Ie={yr0:ye,yr1:_e}),(ze||Ie)&&le.push(t.extendFlat({plotinfo:me},ze,Ie))}return Promise.resolve()},ne.runFn=function(de){for(var we=H._fullData,me=H._fullLayout,Le=me._basePlotModules,ve,Ae,ye,Se=[],_e=0;_e<we.length;_e++)Se.push(_e);function ze(){if(H._fullLayout)for(var Ne=0;Ne<Le.length;Ne++)Le[Ne].transitionAxes&&Le[Ne].transitionAxes(H,le,ve,de)}function Ie(){if(H._fullLayout)for(var Ne=0;Ne<Le.length;Ne++)Le[Ne].plot(H,ye,Ae,de)}le.length&&J.anim?ie.ordering==="traces first"?(ve=t.extendFlat({},ie,{duration:0}),ye=Se,Ae=ie,setTimeout(ze,ie.duration),Ie()):(ve=ie,ye=null,Ae=t.extendFlat({},ie,{duration:0}),setTimeout(Ie,ve.duration),ze()):le.length?(ve=ie,ze()):J.anim&&(ye=Se,Ae=ie,Ie())},q(H,ie,ne)};function q(H,J,ae){var K=!1;function Y(Le){var ve=Promise.resolve();if(!Le)return ve;for(;Le.length;)ve=ve.then(Le.shift());return ve}function ie(Le){if(Le)for(;Le.length;)Le.shift()}function ne(){return H.emit("plotly_transitioning",[]),new Promise(function(Le){H._transitioning=!0,J.duration>0&&(H._transitioningWithDuration=!0),H._transitionData._interruptCallbacks.push(function(){K=!0}),ae.redraw&&H._transitionData._interruptCallbacks.push(function(){return d.call("redraw",H)}),H._transitionData._interruptCallbacks.push(function(){H.emit("plotly_transitioninterrupted",[])});var ve=0,Ae=0;function ye(){return ve++,function(){Ae++,!K&&Ae===ve&&le(Le)}}ae.runFn(ye),setTimeout(ye())})}function le(Le){if(H._transitionData)return ie(H._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ae.redraw)return d.call("redraw",H)}).then(function(){H._transitioning=!1,H._transitioningWithDuration=!1,H.emit("plotly_transitioned",[])}).then(Le)}function de(){if(H._transitionData)return H._transitioning=!1,Y(H._transitionData._interruptCallbacks)}var we=[v.previousPromises,de,ae.prepareFn,v.rehover,v.reselect,ne],me=t.syncOrAsync(we,H);return(!me||!me.then)&&(me=Promise.resolve()),me.then(function(){return H})}v.doCalcdata=function(H,J){var ae=c.list(H),K=H._fullData,Y=H._fullLayout,ie,ne,le,de,we=new Array(K.length),me=(H.calcdata||[]).slice();for(H.calcdata=we,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},H._hmpixcount=0,H._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},le=0;le<K.length;le++)if(Array.isArray(J)&&J.indexOf(le)===-1){we[le]=me[le];continue}for(le=0;le<K.length;le++)ie=K[le],ie._arrayAttrs=g.findArrayAttributes(ie),ie._extremes={};var Le=Y._subplots.polar||[];for(le=0;le<Le.length;le++)ae.push(Y[Le[le]].radialaxis,Y[Le[le]].angularaxis);for(var ve in Y._colorAxes){var Ae=Y[ve];Ae.cauto!==!1&&(delete Ae.cmin,delete Ae.cmax)}var ye=!1;function Se(Ie){if(ie=K[Ie],ne=ie._module,ie.visible===!0&&ie.transforms){if(ne&&ne.calc){var Ne=ne.calc(H,ie);Ne[0]&&Ne[0].t&&Ne[0].t._scene&&delete Ne[0].t._scene.dirty}for(de=0;de<ie.transforms.length;de++){var et=ie.transforms[de];ne=m[et.type],ne&&ne.calcTransform&&(ie._hasCalcTransform=!0,ye=!0,ne.calcTransform(H,ie,et))}}}function _e(Ie,Ne){if(ie=K[Ie],ne=ie._module,!!ne.isContainer===Ne){var et=[];if(ie.visible===!0&&ie._length!==0){delete ie._indexToPoints;var st=ie.transforms||[];for(de=st.length-1;de>=0;de--)if(st[de].enabled){ie._indexToPoints=st[de]._indexToPoints;break}ne&&ne.calc&&(et=ne.calc(H,ie))}(!Array.isArray(et)||!et[0])&&(et=[{x:a,y:a}]),et[0].t||(et[0].t={}),et[0].trace=ie,we[Ie]=et}}for(G(ae,K,Y),le=0;le<K.length;le++)_e(le,!0);for(le=0;le<K.length;le++)Se(le);for(ye&&G(ae,K,Y),le=0;le<K.length;le++)_e(le,!0);for(le=0;le<K.length;le++)_e(le,!1);re(H);var ze=Z(ae,H);if(ze.length){for(Y._numBoxes=0,Y._numViolins=0,le=0;le<ze.length;le++)_e(ze[le],!0);for(le=0;le<ze.length;le++)_e(ze[le],!1);re(H)}d.getComponentMethod("fx","calc")(H),d.getComponentMethod("errorbars","calc")(H)};var oe=/(total|sum|min|max|mean|median) (ascending|descending)/;function Z(H,J){var ae=[],K,Y,ie,ne,le;function de(Ce,ge,pe){var Te=ge._id.charAt(0);if(Ce==="histogram2dcontour"){var be=ge._counterAxes[0],ke=c.getFromId(J,be),Ve=Te==="x"||be==="x"&&ke.type==="category",je=Te==="y"||be==="y"&&ke.type==="category";return function(at,ut){return at===0||ut===0||Ve&&at===pe[ut].length-1||je&&ut===pe.length-1?-1:(Te==="y"?ut:at)-1}}else return function(at,ut){return Te==="y"?ut:at}}var we={min:function(Ce){return t.aggNums(Math.min,null,Ce)},max:function(Ce){return t.aggNums(Math.max,null,Ce)},sum:function(Ce){return t.aggNums(function(ge,pe){return ge+pe},null,Ce)},total:function(Ce){return t.aggNums(function(ge,pe){return ge+pe},null,Ce)},mean:function(Ce){return t.mean(Ce)},median:function(Ce){return t.median(Ce)}};function me(Ce,ge){return Ce[1]-ge[1]}function Le(Ce,ge){return ge[1]-Ce[1]}for(K=0;K<H.length;K++){var ve=H[K];if(ve.type==="category"){var Ae=ve.categoryorder.match(oe);if(Ae){var ye=Ae[1],Se=Ae[2],_e=ve._id.charAt(0),ze=_e==="x",Ie=[];for(Y=0;Y<ve._categories.length;Y++)Ie.push([ve._categories[Y],[]]);for(Y=0;Y<ve._traceIndices.length;Y++){var Ne=ve._traceIndices[Y],et=J._fullData[Ne];if(et.visible===!0){var st=et.type;d.traceIs(et,"histogram")&&(delete et._xautoBinFinished,delete et._yautoBinFinished);var Ze=st==="splom",Ke=st==="scattergl",nt=J.calcdata[Ne];for(ie=0;ie<nt.length;ie++){var it=nt[ie],lt,vt;if(Ze){var xt=et._axesDim[ve._id];if(!ze){var Je=et._diag[xt][0];Je&&(ve=J._fullLayout[c.id2name(Je)])}var Pe=it.trace.dimensions[xt].values;for(ne=0;ne<Pe.length;ne++)for(lt=ve._categoriesMap[Pe[ne]],le=0;le<it.trace.dimensions.length;le++)if(le!==xt){var Ue=it.trace.dimensions[le];Ie[lt][1].push(Ue.values[ne])}}else if(Ke){for(ne=0;ne<it.t.x.length;ne++)ze?(lt=it.t.x[ne],vt=it.t.y[ne]):(lt=it.t.y[ne],vt=it.t.x[ne]),Ie[lt][1].push(vt);it.t&&it.t._scene&&delete it.t._scene.dirty}else if(it.hasOwnProperty("z")){vt=it.z;var He=de(et.type,ve,vt);for(ne=0;ne<vt.length;ne++)for(le=0;le<vt[ne].length;le++)lt=He(le,ne),lt+1&&Ie[lt][1].push(vt[ne][le])}else for(lt=it.p,lt===void 0&&(lt=it[_e]),vt=it.s,vt===void 0&&(vt=it.v),vt===void 0&&(vt=ze?it.y:it.x),Array.isArray(vt)||(vt===void 0?vt=[]:vt=[vt]),ne=0;ne<vt.length;ne++)Ie[lt][1].push(vt[ne])}}}ve._categoriesValue=Ie;var Oe=[];for(Y=0;Y<Ie.length;Y++)Oe.push([Ie[Y][0],we[ye](Ie[Y][1])]);Oe.sort(Se==="descending"?Le:me),ve._categoriesAggregatedValue=Oe,ve._initialCategories=Oe.map(function(Ce){return Ce[0]}),ae=ae.concat(ve.sortByInitialCategories())}}}return ae}function G(H,J,ae){var K={};function Y(de){de.clearCalc(),de.type==="multicategory"&&de.setupMultiCategory(J),K[de._id]=1}t.simpleMap(H,Y);for(var ie=ae._axisMatchGroups||[],ne=0;ne<ie.length;ne++)for(var le in ie[ne])K[le]||Y(ae[c.id2name(le)])}function re(H){var J=H._fullLayout,ae=J._visibleModules,K={},Y,ie,ne;for(ie=0;ie<ae.length;ie++){var le=ae[ie],de=le.crossTraceCalc;if(de){var we=le.basePlotModule.name;K[we]?t.pushUnique(K[we],de):K[we]=[de]}}for(ne in K){var me=K[ne],Le=J._subplots[ne];if(Array.isArray(Le))for(Y=0;Y<Le.length;Y++){var ve=Le[Y],Ae=ne==="cartesian"?J._plots[ve]:J[ve];for(ie=0;ie<me.length;ie++)me[ie](H,Ae,ve)}else for(ie=0;ie<me.length;ie++)me[ie](H)}}v.rehover=function(H){H._fullLayout._rehover&&H._fullLayout._rehover()},v.redrag=function(H){H._fullLayout._redrag&&H._fullLayout._redrag()},v.reselect=function(H){var J=H._fullLayout,ae=(H.layout||{}).selections,K=J._previousSelections;J._previousSelections=ae;var Y=J._reselect||JSON.stringify(ae)!==JSON.stringify(K);d.getComponentMethod("selections","reselect")(H,Y)},v.generalUpdatePerTraceModule=function(H,J,ae,K){var Y=J.traceHash,ie={},ne;for(ne=0;ne<ae.length;ne++){var le=ae[ne],de=le[0].trace;de.visible&&(ie[de.type]=ie[de.type]||[],ie[de.type].push(le))}for(var we in Y)if(!ie[we]){var me=Y[we][0],Le=me[0].trace;Le.visible=!1,ie[we]=[me]}for(var ve in ie){var Ae=ie[ve],ye=Ae[0][0].trace._module;ye.plot(H,J,t.filterVisible(Ae),K)}J.traceHash=ie},v.plotBasePlot=function(H,J,ae,K,Y){var ie=d.getModule(H),ne=T(J.calcdata,ie)[0];ie.plot(J,ne,K,Y)},v.cleanBasePlot=function(H,J,ae,K,Y){var ie=Y._has&&Y._has(H),ne=ae._has&&ae._has(H);ie&&!ne&&Y["_"+H+"layer"].selectAll("g.trace").remove()}},39360:function(te){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}},57384:function(te,X,e){var A=e(3400),P=e(92065).tester,o=A.findIndexOfMin,L=A.isAngleInsideSector,M=A.angleDelta,d=A.angleDist;function g(n,v,m,b,E){if(!L(v,b))return!1;var p,S;m[0]<m[1]?(p=m[0],S=m[1]):(p=m[1],S=m[0]);var w=P(c(p,b[0],b[1],E)),i=P(c(S,b[0],b[1],E)),C=[n*Math.cos(v),n*Math.sin(v)];return i.contains(C)&&!w.contains(C)}function r(n,v,m,b){var E,p,S=b[0],w=b[1],i=y(Math.sin(v)-Math.sin(n)),C=y(Math.cos(v)-Math.cos(n)),x=Math.tan(m),k=y(1/x),I=i/C,B=w-I*S;return k?i&&C?(E=B/(x-I),p=x*E):C?(E=w*k,p=w):(E=S,p=S*x):i&&C?(E=0,p=B):C?(E=0,p=w):E=p=NaN,[E,p]}function t(n,v,m,b){var E=-v*m,p=v*v+1,S=2*(v*E-m),w=E*E+m*m-n*n,i=Math.sqrt(S*S-4*p*w),C=(-S+i)/(2*p),x=(-S-i)/(2*p);return[[C,v*C+E+b],[x,v*x+E+b]]}function s(n,v){var m=v.length,b=new Array(m+1),E;for(E=0;E<m;E++){var p=v[E];b[E]=[n*Math.cos(p),n*Math.sin(p)]}return b[E]=b[0].slice(),b}function a(n,v,m,b){var E=b.length,p=[],S,w;function i(F){return[n*Math.cos(F),n*Math.sin(F)]}function C(F,N,V){return r(F,N,V,i(F))}function x(F){return A.mod(F,E)}function k(F){return L(F,[v,m])}var I=o(b,function(F){return k(F)?d(F,v):1/0}),B=C(b[I],b[x(I-1)],v);for(p.push(B),S=I,w=0;w<E;S++,w++){var _=b[x(S)];if(!k(_))break;p.push(i(_))}var z=o(b,function(F){return k(F)?d(F,m):1/0}),O=C(b[z],b[x(z+1)],m);return p.push(O),p.push([0,0]),p.push(p[0].slice()),p}function c(n,v,m,b){return A.isFullCircle([v,m])?s(n,b):a(n,v,m,b)}function u(n,v,m,b){for(var E=1/0,p=1/0,S=c(n,v,m,b),w=0;w<S.length;w++){var i=S[w];E=Math.min(E,i[0]),p=Math.min(p,-i[1])}return[E,p]}function l(n,v){var m=function(p){var S=M(p,n);return S>0?S:1/0},b=o(v,m),E=A.mod(b+1,v.length);return[v[b],v[E]]}function y(n){return Math.abs(n)>1e-10?n:0}function h(n,v,m){v=v||0,m=m||0;for(var b=n.length,E=new Array(b),p=0;p<b;p++){var S=n[p];E[p]=[v+S[0],m-S[1]]}return E}function T(n,v,m,b,E,p){var S=c(n,v,m,b);return"M"+h(S,E,p).join("L")}function f(n,v,m,b,E,p,S){var w,i;n<v?(w=n,i=v):(w=v,i=n);var C=h(c(w,m,b,E),p,S),x=h(c(i,m,b,E),p,S);return"M"+x.reverse().join("L")+"M"+C.join("L")}te.exports={isPtInsidePolygon:g,findPolygonOffset:u,findEnclosingVertexAngles:l,findIntersectionXY:r,findXYatLength:t,clampTiny:y,pathPolygon:T,pathPolygonAnnulus:f}},40872:function(te,X,e){var A=e(84888).KY,P=e(3400).counterRegex,o=e(62400),L=e(39360),M=L.attr,d=L.name,g=P(d),r={};r[M]={valType:"subplotid",dflt:d,editType:"calc"};function t(a){for(var c=a._fullLayout,u=a.calcdata,l=c._subplots[d],y=0;y<l.length;y++){var h=l[y],T=A(u,d,h),f=c[h]._subplot;f||(f=o(a,h),c[h]._subplot=f),f.plot(T,c,a._promises)}}function s(a,c,u,l){for(var y=l._subplots[d]||[],h=l._has&&l._has("gl"),T=c._has&&c._has("gl"),f=h&&!T,n=0;n<y.length;n++){var v=y[n],m=l[v]._subplot;if(!c[v]&&m){m.framework.remove(),m.layers["radial-axis-title"].remove();for(var b in m.clipPaths)m.clipPaths[b].remove()}f&&m._scene&&(m._scene.destroy(),m._scene=null)}}te.exports={attr:M,name:d,idRoot:d,idRegex:g,attrRegex:g,attributes:r,layoutAttributes:e(95300),supplyLayoutDefaults:e(84380),plot:t,clean:s,toSVG:e(57952).toSVG}},95300:function(te,X,e){var A=e(22548),P=e(94724),o=e(86968).u,L=e(3400).extendFlat,M=e(67824).overrideAll,d=M({color:P.color,showline:L({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:L({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash},"plot","from-root"),g=M({tickmode:P.minor.tickmode,nticks:P.nticks,tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,ticklabelstep:P.ticklabelstep,showticklabels:P.showticklabels,labelalias:P.labelalias,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickfont:P.tickfont,tickangle:P.tickangle,tickformat:P.tickformat,tickformatstops:P.tickformatstops,layer:P.layer},"plot","from-root"),r={visible:L({},P.visible,{dflt:!0}),type:L({},P.type,{values:["-","linear","log","date","category"]}),autotypenumbers:P.autotypenumbers,autorangeoptions:{minallowed:P.autorangeoptions.minallowed,maxallowed:P.autorangeoptions.maxallowed,clipmin:P.autorangeoptions.clipmin,clipmax:P.autorangeoptions.clipmax,include:P.autorangeoptions.include,editType:"plot"},autorange:L({},P.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:L({},P.minallowed,{editType:"plot"}),maxallowed:L({},P.maxallowed,{editType:"plot"}),range:L({},P.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:P.categoryorder,categoryarray:P.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:P.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:L({},P.title.text,{editType:"plot",dflt:""}),font:L({},P.title.font,{editType:"plot"}),editType:"plot"},hoverformat:P.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:P._deprecated.title,titlefont:P._deprecated.titlefont}};L(r,d,g);var t={visible:L({},P.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:P.autotypenumbers,categoryorder:P.categoryorder,categoryarray:P.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:P.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};L(t,d,g),te.exports={domain:o({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:A.background},radialaxis:r,angularaxis:t,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},84380:function(te,X,e){var A=e(3400),P=e(76308),o=e(31780),L=e(168),M=e(84888).op,d=e(26332),g=e(25404),r=e(95936),t=e(42568),s=e(22416),a=e(42136),c=e(76808),u=e(52976),l=e(95300),y=e(57696),h=e(39360),T=h.axisNames;function f(v,m,b,E){var p=b("bgcolor");E.bgColor=P.combine(p,E.paper_bgcolor);var S=b("sector");b("hole");var w=M(E.fullData,h.name,E.id),i=E.layoutOut,C;function x(J,ae){return b(C+"."+J,ae)}for(var k=0;k<T.length;k++){C=T[k],A.isPlainObject(v[C])||(v[C]={});var I=v[C],B=o.newContainer(m,C);B._id=B._name=C,B._attr=E.id+"."+C,B._traceIndices=w.map(function(J){return J._expandedIndex});var _=h.axisName2dataArray[C],z=n(I,B,x,w,_,E);s(I,B,x,{axData:w,dataAttr:_});var O=x("visible");switch(y(B,m,i),x("uirevision",m.uirevision),B._m=1,C){case"radialaxis":x("minallowed"),x("maxallowed");var F=x("range"),N=B.getAutorangeDflt(F),V=x("autorange",N),j;F&&(F[0]===null&&F[1]===null||(F[0]===null||F[1]===null)&&(V==="reversed"||V===!0)||F[0]!==null&&(V==="min"||V==="max reversed")||F[1]!==null&&(V==="max"||V==="min reversed"))&&(F=void 0,delete B.range,B.autorange=!0,j=!0),j||(N=B.getAutorangeDflt(F),V=x("autorange",N)),I.autorange=V,V&&(c(x,V,F),(z==="linear"||z==="-")&&x("rangemode"),B.isReversed()&&(B._m=-1)),B.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(z==="date"){A.log("Polar plots do not support date angular axes yet.");for(var $=0;$<w.length;$++)w[$].visible=!1;z=I.type=B.type="linear"}x(z==="linear"?"thetaunit":"period");var q=x("direction");x("rotation",{counterclockwise:0,clockwise:90}[q]);break}if(t(I,B,x,B.type,{tickSuffixDflt:B.thetaunit==="degrees"?"°":void 0}),O){var oe,Z,G,re,H=E.font||{};oe=x("color"),Z=oe===I.color?oe:H.color,G=H.size,re=H.family,d(I,B,x,B.type),r(I,B,x,B.type,{font:{color:Z,size:G,family:re},noAutotickangles:C==="angularaxis"}),g(I,B,x,{outerTicks:!0}),a(I,B,x,{dfltColor:oe,bgColor:E.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l[C]}),x("layer"),C==="radialaxis"&&(x("side"),x("angle",S[0]),x("title.text"),A.coerceFont(x,"title.font",{color:Z,size:A.bigFont(G),family:re}))}z!=="category"&&x("hoverformat"),B._input=I}m.angularaxis.type==="category"&&b("gridshape")}function n(v,m,b,E,p,S){var w=b("autotypenumbers",S.autotypenumbersDflt),i=b("type");if(i==="-"){for(var C,x=0;x<E.length;x++)if(E[x].visible){C=E[x];break}C&&C[p]&&(m.type=u(C[p],"gregorian",{noMultiCategory:!0,autotypenumbers:w})),m.type==="-"?m.type="linear":v.type=m.type}return m.type}te.exports=function(m,b,E){L(m,b,E,{type:h.name,attributes:l,handleDefaults:f,font:b.font,autotypenumbersDflt:b.autotypenumbers,paper_bgcolor:b.paper_bgcolor,fullData:E,layoutOut:b})}},62400:function(te,X,e){var A=e(33428),P=e(49760),o=e(24040),L=e(3400),M=L.strRotate,d=L.strTranslate,g=e(76308),r=e(43616),t=e(7316),s=e(54460),a=e(78344),c=e(57696),u=e(19280).doAutoRange,l=e(51184),y=e(86476),h=e(93024),T=e(81668),f=e(22676).prepSelect,n=e(22676).selectOnClick,v=e(22676).clearOutline,m=e(93972),b=e(73696),E=e(39172).redrawReglTraces,p=e(84284).MID_SHIFT,S=e(39360),w=e(57384),i=e(36416),C=i.smith,x=i.reactanceArc,k=i.resistanceArc,I=i.smithTransform,B=L._,_=L.mod,z=L.deg2rad,O=L.rad2deg;function F(oe,Z,G){this.isSmith=G||!1,this.id=Z,this.gd=oe,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var re=oe._fullLayout,H="clip"+re._uid+Z;this.clipIds.forTraces=H+"-for-traces",this.clipPaths.forTraces=re._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=re["_"+(G?"smith":"polar")+"layer"].append("g").attr("class",Z),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},G||(this.radialTickLayout=null,this.angularTickLayout=null)}var N=F.prototype;te.exports=function(Z,G,re){return new F(Z,G,re)},N.plot=function(oe,Z){for(var G=this,re=Z[G.id],H=!1,J=0;J<oe.length;J++){var ae=oe[J][0].trace;if(ae.cliponaxis===!1){H=!0;break}}G._hasClipOnAxisFalse=H,G.updateLayers(Z,re),G.updateLayout(Z,re),t.generalUpdatePerTraceModule(G.gd,G,oe,re),G.updateFx(Z,re),G.isSmith&&(delete re.realaxis.range,delete re.imaginaryaxis.range)},N.updateLayers=function(oe,Z){var G=this,re=G.isSmith,H=G.layers,J=G.getRadial(Z),ae=G.getAngular(Z),K=S.layerNames,Y=K.indexOf("frontplot"),ie=K.slice(0,Y),ne=ae.layer==="below traces",le=J.layer==="below traces";ne&&ie.push("angular-line"),le&&ie.push("radial-line"),ne&&ie.push("angular-axis"),le&&ie.push("radial-axis"),ie.push("frontplot"),ne||ie.push("angular-line"),le||ie.push("radial-line"),ne||ie.push("angular-axis"),le||ie.push("radial-axis");var de=(re?"smith":"polar")+"sublayer",we=G.framework.selectAll("."+de).data(ie,String);we.enter().append("g").attr("class",function(me){return de+" "+me}).each(function(me){var Le=H[me]=A.select(this);switch(me){case"frontplot":re||Le.append("g").classed("barlayer",!0),Le.append("g").classed("scatterlayer",!0);break;case"backplot":Le.append("g").classed("maplayer",!0);break;case"plotbg":H.bg=Le.append("path");break;case"radial-grid":Le.style("fill","none");break;case"angular-grid":Le.style("fill","none");break;case"radial-line":Le.append("line").style("fill","none");break;case"angular-line":Le.append("path").style("fill","none");break}}),we.order()},N.updateLayout=function(oe,Z){var G=this,re=G.layers,H=oe._size,J=G.getRadial(Z),ae=G.getAngular(Z),K=Z.domain.x,Y=Z.domain.y;G.xOffset=H.l+H.w*K[0],G.yOffset=H.t+H.h*(1-Y[1]);var ie=G.xLength=H.w*(K[1]-K[0]),ne=G.yLength=H.h*(Y[1]-Y[0]),le=G.getSector(Z);G.sectorInRad=le.map(z);var de=G.sectorBBox=j(le),we=de[2]-de[0],me=de[3]-de[1],Le=ne/ie,ve=Math.abs(me/we),Ae,ye,Se,_e,ze;Le>ve?(Ae=ie,ye=ie*ve,ze=(ne-ye)/H.h/2,Se=[K[0],K[1]],_e=[Y[0]+ze,Y[1]-ze]):(Ae=ne/ve,ye=ne,ze=(ie-Ae)/H.w/2,Se=[K[0]+ze,K[1]-ze],_e=[Y[0],Y[1]]),G.xLength2=Ae,G.yLength2=ye,G.xDomain2=Se,G.yDomain2=_e;var Ie=G.xOffset2=H.l+H.w*Se[0],Ne=G.yOffset2=H.t+H.h*(1-_e[1]),et=G.radius=Ae/we,st=G.innerRadius=G.getHole(Z)*et,Ze=G.cx=Ie-et*de[0],Ke=G.cy=Ne+et*de[3],nt=G.cxx=Ze-Ie,it=G.cyy=Ke-Ne,lt=J.side,vt;lt==="counterclockwise"?(vt=lt,lt="top"):lt==="clockwise"&&(vt=lt,lt="bottom"),G.radialAxis=G.mockAxis(oe,Z,J,{_id:"x",side:lt,_trueSide:vt,domain:[st/H.w,et/H.w]}),G.angularAxis=G.mockAxis(oe,Z,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(oe,Z),G.updateAngularAxis(oe,Z),G.updateRadialAxis(oe,Z),G.updateRadialAxisTitle(oe,Z),G.xaxis=G.mockCartesianAxis(oe,Z,{_id:"x",domain:Se}),G.yaxis=G.mockCartesianAxis(oe,Z,{_id:"y",domain:_e});var xt=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",xt).attr("transform",d(nt,it)),re.frontplot.attr("transform",d(Ie,Ne)).call(r.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),re.bg.attr("d",xt).attr("transform",d(Ze,Ke)).call(g.fill,Z.bgcolor)},N.mockAxis=function(oe,Z,G,re){var H=L.extendFlat({},G,re);return c(H,Z,oe),H},N.mockCartesianAxis=function(oe,Z,G){var re=this,H=re.isSmith,J=G._id,ae=L.extendFlat({type:"linear"},G);a(ae,oe);var K={x:[0,2],y:[1,3]};return ae.setRange=function(){var Y=re.sectorBBox,ie=K[J],ne=re.radialAxis._rl,le=(ne[1]-ne[0])/(1-re.getHole(Z));ae.range=[Y[ie[0]]*le,Y[ie[1]]*le]},ae.isPtWithinRange=J==="x"&&!H?function(Y){return re.isPtInside(Y)}:function(){return!0},ae.setRange(),ae.setScale(),ae},N.doAutoRange=function(oe,Z){var G=this,re=G.gd,H=G.radialAxis,J=G.getRadial(Z);u(re,H);var ae=H.range;if(J.range=ae.slice(),J._input.range=ae.slice(),H._rl=[H.r2l(ae[0],null,"gregorian"),H.r2l(ae[1],null,"gregorian")],H.minallowed!==void 0){var K=H.r2l(H.minallowed);H._rl[0]>H._rl[1]?H._rl[1]=Math.max(H._rl[1],K):H._rl[0]=Math.max(H._rl[0],K)}if(H.maxallowed!==void 0){var Y=H.r2l(H.maxallowed);H._rl[0]<H._rl[1]?H._rl[1]=Math.min(H._rl[1],Y):H._rl[0]=Math.min(H._rl[0],Y)}},N.updateRadialAxis=function(oe,Z){var G=this,re=G.gd,H=G.layers,J=G.radius,ae=G.innerRadius,K=G.cx,Y=G.cy,ie=G.getRadial(Z),ne=_(G.getSector(Z)[0],360),le=G.radialAxis,de=ae<J,we=G.isSmith;we||(G.fillViewInitialKey("radialaxis.angle",ie.angle),G.fillViewInitialKey("radialaxis.range",le.range.slice()),le.setGeometry()),le.tickangle==="auto"&&ne>90&&ne<=270&&(le.tickangle=180);var me=we?function(et){var st=I(G,C([et.x,0]));return d(st[0]-K,st[1]-Y)}:function(et){return d(le.l2p(et.x)+ae,0)},Le=we?function(et){return k(G,et.x,-1/0,1/0)}:function(et){return G.pathArc(le.r2p(et.x)+ae)},ve=V(ie);if(G.radialTickLayout!==ve&&(H["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=ve),de){le.setScale();var Ae=0,ye=we?(le.tickvals||[]).filter(function(et){return et>=0}).map(function(et){return s.tickText(le,et,!0,!1)}):s.calcTicks(le),Se=we?ye:s.clipEnds(le,ye),_e=s.getTickSigns(le)[2];we&&((le.ticks==="top"&&le.side==="bottom"||le.ticks==="bottom"&&le.side==="top")&&(_e=-_e),le.ticks==="top"&&le.side==="top"&&(Ae=-le.ticklen),le.ticks==="bottom"&&le.side==="bottom"&&(Ae=le.ticklen)),s.drawTicks(re,le,{vals:ye,layer:H["radial-axis"],path:s.makeTickPath(le,0,_e),transFn:me,crisp:!1}),s.drawGrid(re,le,{vals:Se,layer:H["radial-grid"],path:Le,transFn:L.noop,crisp:!1}),s.drawLabels(re,le,{vals:ye,layer:H["radial-axis"],transFn:me,labelFns:s.makeLabelFns(le,Ae)})}var ze=G.radialAxisAngle=G.vangles?O($(z(ie.angle),G.vangles)):ie.angle,Ie=d(K,Y),Ne=Ie+M(-ze);q(H["radial-axis"],de&&(ie.showticklabels||ie.ticks),{transform:Ne}),q(H["radial-grid"],de&&ie.showgrid,{transform:we?"":Ie}),q(H["radial-line"].select("line"),de&&ie.showline,{x1:we?-J:ae,y1:0,x2:J,y2:0,transform:Ne}).attr("stroke-width",ie.linewidth).call(g.stroke,ie.linecolor)},N.updateRadialAxisTitle=function(oe,Z,G){if(!this.isSmith){var re=this,H=re.gd,J=re.radius,ae=re.cx,K=re.cy,Y=re.getRadial(Z),ie=re.id+"title",ne=0;if(Y.title){var le=r.bBox(re.layers["radial-axis"].node()).height,de=Y.title.font.size,we=Y.side;ne=we==="top"?de:we==="counterclockwise"?-(le+de*.4):le+de*.8}var me=G!==void 0?G:re.radialAxisAngle,Le=z(me),ve=Math.cos(Le),Ae=Math.sin(Le),ye=ae+J/2*ve+ne*Ae,Se=K-J/2*Ae+ne*ve;re.layers["radial-axis-title"]=T.draw(H,ie,{propContainer:Y,propName:re.id+".radialaxis.title",placeholder:B(H,"Click to enter radial axis title"),attributes:{x:ye,y:Se,"text-anchor":"middle"},transform:{rotate:-me}})}},N.updateAngularAxis=function(oe,Z){var G=this,re=G.gd,H=G.layers,J=G.radius,ae=G.innerRadius,K=G.cx,Y=G.cy,ie=G.getAngular(Z),ne=G.angularAxis,le=G.isSmith;le||(G.fillViewInitialKey("angularaxis.rotation",ie.rotation),ne.setGeometry(),ne.setScale());var de=le?function(st){var Ze=I(G,C([0,st.x]));return Math.atan2(Ze[0]-K,Ze[1]-Y)-Math.PI/2}:function(st){return ne.t2g(st.x)};ne.type==="linear"&&ne.thetaunit==="radians"&&(ne.tick0=O(ne.tick0),ne.dtick=O(ne.dtick));var we=function(st){return d(K+J*Math.cos(st),Y-J*Math.sin(st))},me=le?function(st){var Ze=I(G,C([0,st.x]));return d(Ze[0],Ze[1])}:function(st){return we(de(st))},Le=le?function(st){var Ze=I(G,C([0,st.x])),Ke=Math.atan2(Ze[0]-K,Ze[1]-Y)-Math.PI/2;return d(Ze[0],Ze[1])+M(-O(Ke))}:function(st){var Ze=de(st);return we(Ze)+M(-O(Ze))},ve=le?function(st){return x(G,st.x,0,1/0)}:function(st){var Ze=de(st),Ke=Math.cos(Ze),nt=Math.sin(Ze);return"M"+[K+ae*Ke,Y-ae*nt]+"L"+[K+J*Ke,Y-J*nt]},Ae=s.makeLabelFns(ne,0),ye=Ae.labelStandoff,Se={};Se.xFn=function(st){var Ze=de(st);return Math.cos(Ze)*ye},Se.yFn=function(st){var Ze=de(st),Ke=Math.sin(Ze)>0?.2:1;return-Math.sin(Ze)*(ye+st.fontSize*Ke)+Math.abs(Math.cos(Ze))*(st.fontSize*p)},Se.anchorFn=function(st){var Ze=de(st),Ke=Math.cos(Ze);return Math.abs(Ke)<.1?"middle":Ke>0?"start":"end"},Se.heightFn=function(st,Ze,Ke){var nt=de(st);return-.5*(1+Math.sin(nt))*Ke};var _e=V(ie);G.angularTickLayout!==_e&&(H["angular-axis"].selectAll("."+ne._id+"tick").remove(),G.angularTickLayout=_e);var ze=le?[1/0].concat(ne.tickvals||[]).map(function(st){return s.tickText(ne,st,!0,!1)}):s.calcTicks(ne);le&&(ze[0].text="∞",ze[0].fontSize*=1.75);var Ie;if(Z.gridshape==="linear"?(Ie=ze.map(de),L.angleDelta(Ie[0],Ie[1])<0&&(Ie=Ie.slice().reverse())):Ie=null,G.vangles=Ie,ne.type==="category"&&(ze=ze.filter(function(st){return L.isAngleInsideSector(de(st),G.sectorInRad)})),ne.visible){var Ne=ne.ticks==="inside"?-1:1,et=(ne.linewidth||1)/2;s.drawTicks(re,ne,{vals:ze,layer:H["angular-axis"],path:"M"+Ne*et+",0h"+Ne*ne.ticklen,transFn:Le,crisp:!1}),s.drawGrid(re,ne,{vals:ze,layer:H["angular-grid"],path:ve,transFn:L.noop,crisp:!1}),s.drawLabels(re,ne,{vals:ze,layer:H["angular-axis"],repositionOnUpdate:!0,transFn:me,labelFns:Se})}q(H["angular-line"].select("path"),ie.showline,{d:G.pathSubplot(),transform:d(K,Y)}).attr("stroke-width",ie.linewidth).call(g.stroke,ie.linecolor)},N.updateFx=function(oe,Z){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(oe),this.updateRadialDrag(oe,Z,0),this.updateRadialDrag(oe,Z,1)),this.updateHoverAndMainDrag(oe)}},N.updateHoverAndMainDrag=function(oe){var Z=this,G=Z.isSmith,re=Z.gd,H=Z.layers,J=oe._zoomlayer,ae=S.MINZOOM,K=S.OFFEDGE,Y=Z.radius,ie=Z.innerRadius,ne=Z.cx,le=Z.cy,de=Z.cxx,we=Z.cyy,me=Z.sectorInRad,Le=Z.vangles,ve=Z.radialAxis,Ae=w.clampTiny,ye=w.findXYatLength,Se=w.findEnclosingVertexAngles,_e=S.cornerHalfWidth,ze=S.cornerLen/2,Ie,Ne,et=l.makeDragger(H,"path","maindrag",oe.dragmode===!1?"none":"crosshair");A.select(et).attr("d",Z.pathSubplot()).attr("transform",d(ne,le)),et.onmousemove=function(gt){h.hover(re,gt,Z.id),re._fullLayout._lasthover=et,re._fullLayout._hoversubplot=Z.id},et.onmouseout=function(gt){re._dragging||y.unhover(re,gt)};var st={element:et,gd:re,subplot:Z.id,plotinfo:{id:Z.id,xaxis:Z.xaxis,yaxis:Z.yaxis},xaxes:[Z.xaxis],yaxes:[Z.yaxis]},Ze,Ke,nt,it,lt,vt,xt,Je,Pe;function Ue(gt,Ct){return Math.sqrt(gt*gt+Ct*Ct)}function He(gt,Ct){return Ue(gt-de,Ct-we)}function Oe(gt,Ct){return Math.atan2(we-Ct,gt-de)}function Ce(gt,Ct){return[gt*Math.cos(Ct),gt*Math.sin(-Ct)]}function ge(gt,Ct){if(gt===0)return Z.pathSector(2*_e);var Yt=ze/gt,gr=Ct-Yt,ht=Ct+Yt,Ht=Math.max(0,Math.min(gt,Y)),Wt=Ht-_e,cr=Ht+_e;return"M"+Ce(Wt,gr)+"A"+[Wt,Wt]+" 0,0,0 "+Ce(Wt,ht)+"L"+Ce(cr,ht)+"A"+[cr,cr]+" 0,0,1 "+Ce(cr,gr)+"Z"}function pe(gt,Ct,Yt){if(gt===0)return Z.pathSector(2*_e);var gr=Ce(gt,Ct),ht=Ce(gt,Yt),Ht=Ae((gr[0]+ht[0])/2),Wt=Ae((gr[1]+ht[1])/2),cr,er;if(Ht&&Wt){var ct=Wt/Ht,qe=-1/ct,dt=ye(_e,ct,Ht,Wt);cr=ye(ze,qe,dt[0][0],dt[0][1]),er=ye(ze,qe,dt[1][0],dt[1][1])}else{var bt,Et;Wt?(bt=ze,Et=_e):(bt=_e,Et=ze),cr=[[Ht-bt,Wt-Et],[Ht+bt,Wt-Et]],er=[[Ht-bt,Wt+Et],[Ht+bt,Wt+Et]]}return"M"+cr.join("L")+"L"+er.reverse().join("L")+"Z"}function Te(){nt=null,it=null,lt=Z.pathSubplot(),vt=!1;var gt=re._fullLayout[Z.id];xt=P(gt.bgcolor).getLuminance(),Je=l.makeZoombox(J,xt,ne,le,lt),Je.attr("fill-rule","evenodd"),Pe=l.makeCorners(J,ne,le),v(re)}function be(gt,Ct){return Ct=Math.max(Math.min(Ct,Y),ie),gt<K?gt=0:Y-gt<K?gt=Y:Ct<K?Ct=0:Y-Ct<K&&(Ct=Y),Math.abs(Ct-gt)>ae?(gt<Ct?(nt=gt,it=Ct):(nt=Ct,it=gt),!0):(nt=null,it=null,!1)}function ke(gt,Ct){gt=gt||lt,Ct=Ct||"M0,0Z",Je.attr("d",gt),Pe.attr("d",Ct),l.transitionZoombox(Je,Pe,vt,xt),vt=!0;var Yt={};Nt(Yt),re.emit("plotly_relayouting",Yt)}function Ve(gt,Ct){gt=gt*Ie,Ct=Ct*Ne;var Yt=Ze+gt,gr=Ke+Ct,ht=He(Ze,Ke),Ht=Math.min(He(Yt,gr),Y),Wt=Oe(Ze,Ke),cr,er;be(ht,Ht)&&(cr=lt+Z.pathSector(it),nt&&(cr+=Z.pathSector(nt)),er=ge(nt,Wt)+ge(it,Wt)),ke(cr,er)}function je(gt,Ct,Yt,gr){var ht=w.findIntersectionXY(Yt,gr,Yt,[gt-de,we-Ct]);return Ue(ht[0],ht[1])}function at(gt,Ct){var Yt=Ze+gt,gr=Ke+Ct,ht=Oe(Ze,Ke),Ht=Oe(Yt,gr),Wt=Se(ht,Le),cr=Se(Ht,Le),er=je(Ze,Ke,Wt[0],Wt[1]),ct=Math.min(je(Yt,gr,cr[0],cr[1]),Y),qe,dt;be(er,ct)&&(qe=lt+Z.pathSector(it),nt&&(qe+=Z.pathSector(nt)),dt=[pe(nt,Wt[0],Wt[1]),pe(it,Wt[0],Wt[1])].join(" ")),ke(qe,dt)}function ut(){if(l.removeZoombox(re),!(nt===null||it===null)){var gt={};Nt(gt),l.showDoubleClickNotifier(re),o.call("_guiRelayout",re,gt)}}function Nt(gt){var Ct=ve._rl,Yt=(Ct[1]-Ct[0])/(1-ie/Y)/Y,gr=[Ct[0]+(nt-ie)*Yt,Ct[0]+(it-ie)*Yt];gt[Z.id+".radialaxis.range"]=gr}function Vt(gt,Ct){var Yt=re._fullLayout.clickmode;if(l.removeZoombox(re),gt===2){var gr={};for(var ht in Z.viewInitial)gr[Z.id+"."+ht]=Z.viewInitial[ht];re.emit("plotly_doubleclick",null),o.call("_guiRelayout",re,gr)}Yt.indexOf("select")>-1&&gt===1&&n(Ct,re,[Z.xaxis],[Z.yaxis],Z.id,st),Yt.indexOf("event")>-1&&h.click(re,Ct,Z.id)}st.prepFn=function(gt,Ct,Yt){var gr=re._fullLayout.dragmode,ht=et.getBoundingClientRect();re._fullLayout._calcInverseTransform(re);var Ht=re._fullLayout._invTransform;Ie=re._fullLayout._invScaleX,Ne=re._fullLayout._invScaleY;var Wt=L.apply3DTransform(Ht)(Ct-ht.left,Yt-ht.top);if(Ze=Wt[0],Ke=Wt[1],Le){var cr=w.findPolygonOffset(Y,me[0],me[1],Le);Ze+=de+cr[0],Ke+=we+cr[1]}switch(gr){case"zoom":st.clickFn=Vt,G||(Le?st.moveFn=at:st.moveFn=Ve,st.doneFn=ut,Te());break;case"select":case"lasso":f(gt,Ct,Yt,st,gr);break}},y.init(st)},N.updateRadialDrag=function(oe,Z,G){var re=this,H=re.gd,J=re.layers,ae=re.radius,K=re.innerRadius,Y=re.cx,ie=re.cy,ne=re.radialAxis,le=S.radialDragBoxSize,de=le/2;if(!ne.visible)return;var we=z(re.radialAxisAngle),me=ne._rl,Le=me[0],ve=me[1],Ae=me[G],ye=.75*(me[1]-me[0])/(1-re.getHole(Z))/ae,Se,_e,ze;G?(Se=Y+(ae+de)*Math.cos(we),_e=ie-(ae+de)*Math.sin(we),ze="radialdrag"):(Se=Y+(K-de)*Math.cos(we),_e=ie-(K-de)*Math.sin(we),ze="radialdrag-inner");var Ie=l.makeRectDragger(J,ze,"crosshair",-de,-de,le,le),Ne={element:Ie,gd:H};oe.dragmode===!1&&(Ne.dragmode=!1),q(A.select(Ie),ne.visible&&K<ae,{transform:d(Se,_e)});var et,st,Ze;function Ke(xt,Je){if(et)et(xt,Je);else{var Pe=[xt,-Je],Ue=[Math.cos(we),Math.sin(we)],He=Math.abs(L.dot(Pe,Ue)/Math.sqrt(L.dot(Pe,Pe)));isNaN(He)||(et=He<.5?lt:vt)}var Oe={};nt(Oe),H.emit("plotly_relayouting",Oe)}function nt(xt){st!==null?xt[re.id+".radialaxis.angle"]=st:Ze!==null&&(xt[re.id+".radialaxis.range["+G+"]"]=Ze)}function it(){st!==null?o.call("_guiRelayout",H,re.id+".radialaxis.angle",st):Ze!==null&&o.call("_guiRelayout",H,re.id+".radialaxis.range["+G+"]",Ze)}function lt(xt,Je){if(G!==0){var Pe=Se+xt,Ue=_e+Je;st=Math.atan2(ie-Ue,Pe-Y),re.vangles&&(st=$(st,re.vangles)),st=O(st);var He=d(Y,ie)+M(-st);J["radial-axis"].attr("transform",He),J["radial-line"].select("line").attr("transform",He);var Oe=re.gd._fullLayout,Ce=Oe[re.id];re.updateRadialAxisTitle(Oe,Ce,st)}}function vt(xt,Je){var Pe=L.dot([xt,-Je],[Math.cos(we),Math.sin(we)]);if(Ze=Ae-ye*Pe,ye>0!=(G?Ze>Le:Ze<ve)){Ze=null;return}var Ue=H._fullLayout,He=Ue[re.id];ne.range[G]=Ze,ne._rl[G]=Ze,re.updateRadialAxis(Ue,He),re.xaxis.setRange(),re.xaxis.setScale(),re.yaxis.setRange(),re.yaxis.setScale();var Oe=!1;for(var Ce in re.traceHash){var ge=re.traceHash[Ce],pe=L.filterVisible(ge),Te=ge[0][0].trace._module;Te.plot(H,re,pe,He),o.traceIs(Ce,"gl")&&pe.length&&(Oe=!0)}Oe&&(b(H),E(H))}Ne.prepFn=function(){et=null,st=null,Ze=null,Ne.moveFn=Ke,Ne.doneFn=it,v(H)},Ne.clampFn=function(xt,Je){return Math.sqrt(xt*xt+Je*Je)<S.MINDRAG&&(xt=0,Je=0),[xt,Je]},y.init(Ne)},N.updateAngularDrag=function(oe){var Z=this,G=Z.gd,re=Z.layers,H=Z.radius,J=Z.angularAxis,ae=Z.cx,K=Z.cy,Y=Z.cxx,ie=Z.cyy,ne=S.angularDragBoxSize,le=l.makeDragger(re,"path","angulardrag",oe.dragmode===!1?"none":"move"),de={element:le,gd:G};oe.dragmode===!1?de.dragmode=!1:A.select(le).attr("d",Z.pathAnnulus(H,H+ne)).attr("transform",d(ae,K)).call(m,"move");function we(Ze,Ke){return Math.atan2(ie+ne-Ke,Ze-Y-ne)}var me=re.frontplot.select(".scatterlayer").selectAll(".trace"),Le=me.selectAll(".point"),ve=me.selectAll(".textpoint"),Ae,ye,Se,_e,ze,Ie;function Ne(Ze,Ke){var nt=Z.gd._fullLayout,it=nt[Z.id],lt=Ae+Ze*oe._invScaleX,vt=ye+Ke*oe._invScaleY,xt=we(lt,vt),Je=O(xt-Ie);if(_e=Se+Je,re.frontplot.attr("transform",d(Z.xOffset2,Z.yOffset2)+M([-Je,Y,ie])),Z.vangles){ze=Z.radialAxisAngle+Je;var Pe=d(ae,K)+M(-Je),Ue=d(ae,K)+M(-ze);re.bg.attr("transform",Pe),re["radial-grid"].attr("transform",Pe),re["radial-axis"].attr("transform",Ue),re["radial-line"].select("line").attr("transform",Ue),Z.updateRadialAxisTitle(nt,it,ze)}else Z.clipPaths.forTraces.select("path").attr("transform",d(Y,ie)+M(Je));Le.each(function(){var be=A.select(this),ke=r.getTranslate(be);be.attr("transform",d(ke.x,ke.y)+M([Je]))}),ve.each(function(){var be=A.select(this),ke=be.select("text"),Ve=r.getTranslate(be);be.attr("transform",M([Je,ke.attr("x"),ke.attr("y")])+d(Ve.x,Ve.y))}),J.rotation=L.modHalf(_e,360),Z.updateAngularAxis(nt,it),Z._hasClipOnAxisFalse&&!L.isFullCircle(Z.sectorInRad)&&me.call(r.hideOutsideRangePoints,Z);var He=!1;for(var Oe in Z.traceHash)if(o.traceIs(Oe,"gl")){var Ce=Z.traceHash[Oe],ge=L.filterVisible(Ce),pe=Ce[0][0].trace._module;pe.plot(G,Z,ge,it),ge.length&&(He=!0)}He&&(b(G),E(G));var Te={};et(Te),G.emit("plotly_relayouting",Te)}function et(Ze){Ze[Z.id+".angularaxis.rotation"]=_e,Z.vangles&&(Ze[Z.id+".radialaxis.angle"]=ze)}function st(){ve.select("text").attr("transform",null);var Ze={};et(Ze),o.call("_guiRelayout",G,Ze)}de.prepFn=function(Ze,Ke,nt){var it=oe[Z.id];Se=it.angularaxis.rotation;var lt=le.getBoundingClientRect();Ae=Ke-lt.left,ye=nt-lt.top,G._fullLayout._calcInverseTransform(G);var vt=L.apply3DTransform(oe._invTransform)(Ae,ye);Ae=vt[0],ye=vt[1],Ie=we(Ae,ye),de.moveFn=Ne,de.doneFn=st,v(G)},Z.vangles&&!L.isFullCircle(Z.sectorInRad)&&(de.prepFn=L.noop,m(A.select(le),null)),y.init(de)},N.isPtInside=function(oe){if(this.isSmith)return!0;var Z=this.sectorInRad,G=this.vangles,re=this.angularAxis.c2g(oe.theta),H=this.radialAxis,J=H.c2l(oe.r),ae=H._rl,K=G?w.isPtInsidePolygon:L.isPtInsideSector;return K(J,re,ae,Z,G)},N.pathArc=function(oe){var Z=this.sectorInRad,G=this.vangles,re=G?w.pathPolygon:L.pathArc;return re(oe,Z[0],Z[1],G)},N.pathSector=function(oe){var Z=this.sectorInRad,G=this.vangles,re=G?w.pathPolygon:L.pathSector;return re(oe,Z[0],Z[1],G)},N.pathAnnulus=function(oe,Z){var G=this.sectorInRad,re=this.vangles,H=re?w.pathPolygonAnnulus:L.pathAnnulus;return H(oe,Z,G[0],G[1],re)},N.pathSubplot=function(){var oe=this.innerRadius,Z=this.radius;return oe?this.pathAnnulus(oe,Z):this.pathSector(Z)},N.fillViewInitialKey=function(oe,Z){oe in this.viewInitial||(this.viewInitial[oe]=Z)};function V(oe){var Z=oe.ticks+String(oe.ticklen)+String(oe.showticklabels);return"side"in oe&&(Z+=oe.side),Z}function j(oe){var Z=oe[0],G=oe[1],re=G-Z,H=_(Z,360),J=H+re,ae=Math.cos(z(H)),K=Math.sin(z(H)),Y=Math.cos(z(J)),ie=Math.sin(z(J)),ne,le,de,we;return H<=90&&J>=90||H>90&&J>=450?we=1:K<=0&&ie<=0?we=0:we=Math.max(K,ie),H<=180&&J>=180||H>180&&J>=540?ne=-1:ae>=0&&Y>=0?ne=0:ne=Math.min(ae,Y),H<=270&&J>=270||H>270&&J>=630?le=-1:K>=0&&ie>=0?le=0:le=Math.min(K,ie),J>=360?de=1:ae<=0&&Y<=0?de=0:de=Math.max(ae,Y),[ne,le,de,we]}function $(oe,Z){var G=function(H){return L.angleDist(oe,H)},re=L.findIndexOfMin(Z,G);return Z[re]}function q(oe,Z,G){return Z?(oe.attr("display",null),oe.attr(G)):oe&&oe.attr("display","none"),oe}},57696:function(te,X,e){var A=e(3400),P=e(78344),o=A.deg2rad,L=A.rad2deg;te.exports=function(s,a,c){switch(P(s,c),s._id){case"x":case"radialaxis":M(s,a);break;case"angularaxis":r(s,a);break}};function M(t,s){var a=s._subplot;t.setGeometry=function(){var c=t._rl[0],u=t._rl[1],l=a.innerRadius,y=(a.radius-l)/(u-c),h=l/y,T=c>u?function(f){return f<=0}:function(f){return f>=0};t.c2g=function(f){var n=t.c2l(f)-c;return(T(n)?n:0)+h},t.g2c=function(f){return t.l2c(f+c-h)},t.g2p=function(f){return f*y},t.c2p=function(f){return t.g2p(t.c2g(f))}}}function d(t,s){return s==="degrees"?o(t):t}function g(t,s){return s==="degrees"?L(t):t}function r(t,s){var a=t.type;if(a==="linear"){var c=t.d2c,u=t.c2d;t.d2c=function(l,y){return d(c(l),y)},t.c2d=function(l,y){return u(g(l,y))}}t.makeCalcdata=function(l,y){var h=l[y],T=l._length,f,n,v=function(S){return t.d2c(S,l.thetaunit)};if(h)for(f=new Array(T),n=0;n<T;n++)f[n]=v(h[n]);else{var m=y+"0",b="d"+y,E=m in l?v(l[m]):0,p=l[b]?v(l[b]):(t.period||2*Math.PI)/T;for(f=new Array(T),n=0;n<T;n++)f[n]=E+n*p}return f},t.setGeometry=function(){var l=s.sector,y=l.map(o),h={clockwise:-1,counterclockwise:1}[t.direction],T=o(t.rotation),f=function(w){return h*w+T},n=function(w){return(w-T)/h},v,m,b,E;switch(a){case"linear":m=v=A.identity,E=o,b=L,t.range=A.isFullCircle(y)?[l[0],l[0]+360]:y.map(n).map(L);break;case"category":var p=t._categories.length,S=t.period?Math.max(t.period,p):p;S===0&&(S=1),m=E=function(w){return w*2*Math.PI/S},v=b=function(w){return w*S/Math.PI/2},t.range=[0,S];break}t.c2g=function(w){return f(m(w))},t.g2c=function(w){return v(n(w))},t.t2g=function(w){return f(E(w))},t.g2t=function(w){return b(n(w))}}}},55012:function(te){te.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},36416:function(te){function X(M){return M<0?-1:M>0?1:0}function e(M){var d=M[0],g=M[1];if(!isFinite(d)||!isFinite(g))return[1,0];var r=(d+1)*(d+1)+g*g;return[(d*d+g*g-1)/r,2*g/r]}function A(M,d){var g=d[0],r=d[1];return[g*M.radius+M.cx,-r*M.radius+M.cy]}function P(M,d){return d*M.radius}function o(M,d,g,r){var t=A(M,e([g,d])),s=t[0],a=t[1],c=A(M,e([r,d])),u=c[0],l=c[1];if(d===0)return["M"+s+","+a,"L"+u+","+l].join(" ");var y=P(M,1/Math.abs(d));return["M"+s+","+a,"A"+y+","+y+" 0 0,"+(d<0?1:0)+" "+u+","+l].join(" ")}function L(M,d,g,r){var t=P(M,1/(d+1)),s=A(M,e([d,g])),a=s[0],c=s[1],u=A(M,e([d,r])),l=u[0],y=u[1];if(X(g)!==X(r)){var h=A(M,e([d,0])),T=h[0],f=h[1];return["M"+a+","+c,"A"+t+","+t+" 0 0,"+(0<g?0:1)+" "+T+","+f,"A"+t+","+t+" 0 0,"+(r<0?0:1)+l+","+y].join(" ")}return["M"+a+","+c,"A"+t+","+t+" 0 0,"+(r<g?0:1)+" "+l+","+y].join(" ")}te.exports={smith:e,reactanceArc:o,resistanceArc:L,smithTransform:A}},47788:function(te,X,e){var A=e(84888).KY,P=e(3400).counterRegex,o=e(62400),L=e(55012),M=L.attr,d=L.name,g=P(d),r={};r[M]={valType:"subplotid",dflt:d,editType:"calc"};function t(a){for(var c=a._fullLayout,u=a.calcdata,l=c._subplots[d],y=0;y<l.length;y++){var h=l[y],T=A(u,d,h),f=c[h]._subplot;f||(f=o(a,h,!0),c[h]._subplot=f),f.plot(T,c,a._promises)}}function s(a,c,u,l){for(var y=l._subplots[d]||[],h=0;h<y.length;h++){var T=y[h],f=l[T]._subplot;if(!c[T]&&f){f.framework.remove();for(var n in f.clipPaths)f.clipPaths[n].remove()}}}te.exports={attr:M,name:d,idRoot:d,idRegex:g,attrRegex:g,attributes:r,layoutAttributes:e(6183),supplyLayoutDefaults:e(22836),plot:t,clean:s,toSVG:e(57952).toSVG}},6183:function(te,X,e){var A=e(22548),P=e(94724),o=e(86968).u,L=e(3400).extendFlat,M=e(67824).overrideAll,d=M({color:P.color,showline:L({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:L({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash},"plot","from-root"),g=M({ticklen:P.ticklen,tickwidth:L({},P.tickwidth,{dflt:2}),tickcolor:P.tickcolor,showticklabels:P.showticklabels,labelalias:P.labelalias,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,tickfont:P.tickfont,tickformat:P.tickformat,hoverformat:P.hoverformat,layer:P.layer},"plot","from-root"),r=L({visible:L({},P.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:L({},P.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},d,g),t=L({visible:L({},P.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:P.ticks,editType:"calc"},d,g);te.exports={domain:o({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:A.background},realaxis:r,imaginaryaxis:t,editType:"calc"}},22836:function(te,X,e){var A=e(3400),P=e(76308),o=e(31780),L=e(168),M=e(84888).op,d=e(42568),g=e(95936),r=e(42136),t=e(78344),s=e(6183),a=e(55012),c=a.axisNames,u=y(function(h){return A.isTypedArray(h)&&(h=Array.from(h)),h.slice().reverse().map(function(T){return-T}).concat([0]).concat(h)},String);function l(h,T,f,n){var v=f("bgcolor");n.bgColor=P.combine(v,n.paper_bgcolor);var m=M(n.fullData,a.name,n.id),b=n.layoutOut,E;function p(N,V){return f(E+"."+N,V)}for(var S=0;S<c.length;S++){E=c[S],A.isPlainObject(h[E])||(h[E]={});var w=h[E],i=o.newContainer(T,E);i._id=i._name=E,i._attr=n.id+"."+E,i._traceIndices=m.map(function(N){return N._expandedIndex});var C=p("visible");if(i.type="linear",t(i,b),d(w,i,p,i.type),C){var x=E==="realaxis";if(x&&p("side"),x)p("tickvals");else{var k=u(T.realaxis.tickvals||s.realaxis.tickvals.dflt);p("tickvals",k)}A.isTypedArray(i.tickvals)&&(i.tickvals=Array.from(i.tickvals));var I,B,_,z,O=n.font||{};C&&(I=p("color"),B=I===w.color?I:O.color,_=O.size,z=O.family),g(w,i,p,i.type,{noAutotickangles:!0,noTicklabelstep:!0,noAng:!x,noExp:!0,font:{color:B,size:_,family:z}}),A.coerce2(h,T,s,E+".ticklen"),A.coerce2(h,T,s,E+".tickwidth"),A.coerce2(h,T,s,E+".tickcolor",T.color);var F=p("ticks");F||(delete T[E].ticklen,delete T[E].tickwidth,delete T[E].tickcolor),r(w,i,p,{dfltColor:I,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:s[E]}),p("layer")}p("hoverformat"),delete i.type,i._input=w}}te.exports=function(T,f,n){L(T,f,n,{noUirevision:!0,type:a.name,attributes:s,handleDefaults:l,font:f.font,paper_bgcolor:f.paper_bgcolor,fullData:n,layoutOut:f})};function y(h,T){var f={};return function(n){var v=T?T(n):n;if(v in f)return f[v];var m=h(n);return f[v]=m,m}}},168:function(te,X,e){var A=e(3400),P=e(31780),o=e(86968).Q;te.exports=function(M,d,g,r){var t=r.type,s=r.attributes,a=r.handleDefaults,c=r.partition||"x",u=d._subplots[t],l=u.length,y=l&&u[0].replace(/\d+$/,""),h,T;function f(b,E){return A.coerce(h,T,s,b,E)}for(var n=0;n<l;n++){var v=u[n];M[v]?h=M[v]:h=M[v]={},T=P.newContainer(d,v,y),r.noUirevision||f("uirevision",d.uirevision);var m={};m[c]=[n/l,(n+1)/l],o(T,d,f,m),r.id=v,a(h,T,f,r)}}},21776:function(te,X,e){var A=e(26880);A.FORMAT_LINK,A.DATE_FORMAT_LINK;function P(o){var L=o.description?" "+o.description:"",M=o.keys||[];if(M.length>0){for(var d=[],g=0;g<M.length;g++)d[g]="`"+M[g]+"`";L=L+"Finally, the template string has access to ",M.length===1?L=L+"variable "+d[0]:L=L+"variables "+d.slice(0,-1).join(", ")+" and "+d.slice(-1)+"."}return L}X.Ks=function(o,L){o=o||{},L=L||{},P(L);var M={valType:"string",dflt:"",editType:o.editType||"none"};return o.arrayOk!==!1&&(M.arrayOk=!0),M},X.Gw=function(o,L){o=o||{},L=L||{},P(L);var M={valType:"string",dflt:"",editType:o.editType||"calc"};return o.arrayOk!==!1&&(M.arrayOk=!0),M},X.ye=function(o,L){o=o||{},L=L||{},o.newshape,P(L);var M={valType:"string",dflt:"",editType:o.editType||"arraydraw"};return M}},19352:function(te,X,e){var A=e(24696),P=e(84888).KY,o=e(3400).counterRegex,L="ternary";X.name=L;var M=X.attr="subplot";X.idRoot=L,X.idRegex=X.attrRegex=o(L);var d=X.attributes={};d[M]={valType:"subplotid",dflt:"ternary",editType:"calc"},X.layoutAttributes=e(86379),X.supplyLayoutDefaults=e(38536),X.plot=function(r){for(var t=r._fullLayout,s=r.calcdata,a=t._subplots[L],c=0;c<a.length;c++){var u=a[c],l=P(s,L,u),y=t[u]._subplot;y||(y=new A({id:u,graphDiv:r,container:t._ternarylayer.node()},t),t[u]._subplot=y),y.plot(l,t,r._promises)}},X.clean=function(g,r,t,s){for(var a=s._subplots[L]||[],c=0;c<a.length;c++){var u=a[c],l=s[u]._subplot;!r[u]&&l&&(l.plotContainer.remove(),l.clipDef.remove(),l.clipDefRelative.remove(),l.layers["a-title"].remove(),l.layers["b-title"].remove(),l.layers["c-title"].remove())}}},86379:function(te,X,e){var A=e(22548),P=e(86968).u,o=e(94724),L=e(67824).overrideAll,M=e(92880).extendFlat,d={title:{text:o.title.text,font:o.title.font},color:o.color,tickmode:o.minor.tickmode,nticks:M({},o.nticks,{dflt:6,min:1}),tick0:o.tick0,dtick:o.dtick,tickvals:o.tickvals,ticktext:o.ticktext,ticks:o.ticks,ticklen:o.ticklen,tickwidth:o.tickwidth,tickcolor:o.tickcolor,ticklabelstep:o.ticklabelstep,showticklabels:o.showticklabels,labelalias:o.labelalias,showtickprefix:o.showtickprefix,tickprefix:o.tickprefix,showticksuffix:o.showticksuffix,ticksuffix:o.ticksuffix,showexponent:o.showexponent,exponentformat:o.exponentformat,minexponent:o.minexponent,separatethousands:o.separatethousands,tickfont:o.tickfont,tickangle:o.tickangle,tickformat:o.tickformat,tickformatstops:o.tickformatstops,hoverformat:o.hoverformat,showline:M({},o.showline,{dflt:!0}),linecolor:o.linecolor,linewidth:o.linewidth,showgrid:M({},o.showgrid,{dflt:!0}),gridcolor:o.gridcolor,gridwidth:o.gridwidth,griddash:o.griddash,layer:o.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:o._deprecated.title,titlefont:o._deprecated.titlefont}},g=te.exports=L({domain:P({name:"ternary"}),bgcolor:{valType:"color",dflt:A.background},sum:{valType:"number",dflt:1,min:0},aaxis:d,baxis:d,caxis:d},"plot","from-root");g.uirevision={valType:"any",editType:"none"},g.aaxis.uirevision=g.baxis.uirevision=g.caxis.uirevision={valType:"any",editType:"none"}},38536:function(te,X,e){var A=e(76308),P=e(31780),o=e(3400),L=e(168),M=e(95936),d=e(42568),g=e(25404),r=e(26332),t=e(42136),s=e(86379),a=["aaxis","baxis","caxis"];te.exports=function(y,h,T){L(y,h,T,{type:"ternary",attributes:s,handleDefaults:c,font:h.font,paper_bgcolor:h.paper_bgcolor})};function c(l,y,h,T){var f=h("bgcolor"),n=h("sum");T.bgColor=A.combine(f,T.paper_bgcolor);for(var v,m,b,E=0;E<a.length;E++)v=a[E],m=l[v]||{},b=P.newContainer(y,v),b._name=v,u(m,b,T,y);var p=y.aaxis,S=y.baxis,w=y.caxis;p.min+S.min+w.min>=n&&(p.min=0,S.min=0,w.min=0,l.aaxis&&delete l.aaxis.min,l.baxis&&delete l.baxis.min,l.caxis&&delete l.caxis.min)}function u(l,y,h,T){var f=s[y._name];function n(i,C){return o.coerce(l,y,f,i,C)}n("uirevision",T.uirevision),y.type="linear";var v=n("color"),m=v!==f.color.dflt?v:h.font.color,b=y._name,E=b.charAt(0).toUpperCase(),p="Component "+E,S=n("title.text",p);y._hovertitle=S===p?S:E,o.coerceFont(n,"title.font",{family:h.font.family,size:o.bigFont(h.font.size),color:m}),n("min"),r(l,y,n,"linear"),d(l,y,n,"linear"),M(l,y,n,"linear",{noAutotickangles:!0}),g(l,y,n,{outerTicks:!0});var w=n("showticklabels");w&&(o.coerceFont(n,"tickfont",{family:h.font.family,size:h.font.size,color:m}),n("tickangle"),n("tickformat")),t(l,y,n,{dfltColor:v,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:f}),n("hoverformat"),n("layer")}},24696:function(te,X,e){var A=e(33428),P=e(49760),o=e(24040),L=e(3400),M=L.strTranslate,d=L._,g=e(76308),r=e(43616),t=e(78344),s=e(92880).extendFlat,a=e(7316),c=e(54460),u=e(86476),l=e(93024),y=e(72760),h=y.freeMode,T=y.rectMode,f=e(81668),n=e(22676).prepSelect,v=e(22676).selectOnClick,m=e(22676).clearOutline,b=e(22676).clearSelectionsCache,E=e(33816);function p(O,F){this.id=O.id,this.graphDiv=O.graphDiv,this.init(F),this.makeFramework(F),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}te.exports=p;var S=p.prototype;S.init=function(O){this.container=O._ternarylayer,this.defs=O._defs,this.layoutId=O._uid,this.traceHash={},this.layers={}},S.plot=function(O,F){var N=this,V=F[N.id],j=F._size;N._hasClipOnAxisFalse=!1;for(var $=0;$<O.length;$++){var q=O[$][0].trace;if(q.cliponaxis===!1){N._hasClipOnAxisFalse=!0;break}}N.updateLayers(V),N.adjustLayout(V,j),a.generalUpdatePerTraceModule(N.graphDiv,N,O,V),N.layers.plotbg.select("path").call(g.fill,V.bgcolor)},S.makeFramework=function(O){var F=this,N=F.graphDiv,V=O[F.id],j=F.clipId="clip"+F.layoutId+F.id,$=F.clipIdRelative="clip-relative"+F.layoutId+F.id;F.clipDef=L.ensureSingleById(O._clips,"clipPath",j,function(q){q.append("path").attr("d","M0,0Z")}),F.clipDefRelative=L.ensureSingleById(O._clips,"clipPath",$,function(q){q.append("path").attr("d","M0,0Z")}),F.plotContainer=L.ensureSingle(F.container,"g",F.id),F.updateLayers(V),r.setClipUrl(F.layers.backplot,j,N),r.setClipUrl(F.layers.grids,j,N)},S.updateLayers=function(O){var F=this,N=F.layers,V=["draglayer","plotbg","backplot","grids"];O.aaxis.layer==="below traces"&&V.push("aaxis","aline"),O.baxis.layer==="below traces"&&V.push("baxis","bline"),O.caxis.layer==="below traces"&&V.push("caxis","cline"),V.push("frontplot"),O.aaxis.layer==="above traces"&&V.push("aaxis","aline"),O.baxis.layer==="above traces"&&V.push("baxis","bline"),O.caxis.layer==="above traces"&&V.push("caxis","cline");var j=F.plotContainer.selectAll("g.toplevel").data(V,String),$=["agrid","bgrid","cgrid"];j.enter().append("g").attr("class",function(q){return"toplevel "+q}).each(function(q){var oe=A.select(this);N[q]=oe,q==="frontplot"?oe.append("g").classed("scatterlayer",!0):q==="backplot"?oe.append("g").classed("maplayer",!0):q==="plotbg"?oe.append("path").attr("d","M0,0Z"):q==="aline"||q==="bline"||q==="cline"?oe.append("path"):q==="grids"&&$.forEach(function(Z){N[Z]=oe.append("g").classed("grid "+Z,!0)})}),j.order()};var w=Math.sqrt(4/3);S.adjustLayout=function(O,F){var N=this,V=O.domain,j=(V.x[0]+V.x[1])/2,$=(V.y[0]+V.y[1])/2,q=V.x[1]-V.x[0],oe=V.y[1]-V.y[0],Z=q*F.w,G=oe*F.h,re=O.sum,H=O.aaxis.min,J=O.baxis.min,ae=O.caxis.min,K,Y,ie,ne,le,de;Z>w*G?(ne=G,ie=ne*w):(ie=Z,ne=ie/w),le=q*ie/Z,de=oe*ne/G,K=F.l+F.w*j-ie/2,Y=F.t+F.h*(1-$)-ne/2,N.x0=K,N.y0=Y,N.w=ie,N.h=ne,N.sum=re,N.xaxis={type:"linear",range:[H+2*ae-re,re-H-2*J],domain:[j-le/2,j+le/2],_id:"x"},t(N.xaxis,N.graphDiv._fullLayout),N.xaxis.setScale(),N.xaxis.isPtWithinRange=function(Ne){return Ne.a>=N.aaxis.range[0]&&Ne.a<=N.aaxis.range[1]&&Ne.b>=N.baxis.range[1]&&Ne.b<=N.baxis.range[0]&&Ne.c>=N.caxis.range[1]&&Ne.c<=N.caxis.range[0]},N.yaxis={type:"linear",range:[H,re-J-ae],domain:[$-de/2,$+de/2],_id:"y"},t(N.yaxis,N.graphDiv._fullLayout),N.yaxis.setScale(),N.yaxis.isPtWithinRange=function(){return!0};var we=N.yaxis.domain[0],me=N.aaxis=s({},O.aaxis,{range:[H,re-J-ae],side:"left",tickangle:(+O.aaxis.tickangle||0)-30,domain:[we,we+de*w],anchor:"free",position:0,_id:"y",_length:ie});t(me,N.graphDiv._fullLayout),me.setScale();var Le=N.baxis=s({},O.baxis,{range:[re-H-ae,J],side:"bottom",domain:N.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ie});t(Le,N.graphDiv._fullLayout),Le.setScale();var ve=N.caxis=s({},O.caxis,{range:[re-H-J,ae],side:"right",tickangle:(+O.caxis.tickangle||0)+30,domain:[we,we+de*w],anchor:"free",position:0,_id:"y",_length:ie});t(ve,N.graphDiv._fullLayout),ve.setScale();var Ae="M"+K+","+(Y+ne)+"h"+ie+"l-"+ie/2+",-"+ne+"Z";N.clipDef.select("path").attr("d",Ae),N.layers.plotbg.select("path").attr("d",Ae);var ye="M0,"+ne+"h"+ie+"l-"+ie/2+",-"+ne+"Z";N.clipDefRelative.select("path").attr("d",ye);var Se=M(K,Y);N.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Se),N.clipDefRelative.select("path").attr("transform",null);var _e=M(K-Le._offset,Y+ne);N.layers.baxis.attr("transform",_e),N.layers.bgrid.attr("transform",_e);var ze=M(K+ie/2,Y)+"rotate(30)"+M(0,-me._offset);N.layers.aaxis.attr("transform",ze),N.layers.agrid.attr("transform",ze);var Ie=M(K+ie/2,Y)+"rotate(-30)"+M(0,-ve._offset);N.layers.caxis.attr("transform",Ie),N.layers.cgrid.attr("transform",Ie),N.drawAxes(!0),N.layers.aline.select("path").attr("d",me.showline?"M"+K+","+(Y+ne)+"l"+ie/2+",-"+ne:"M0,0").call(g.stroke,me.linecolor||"#000").style("stroke-width",(me.linewidth||0)+"px"),N.layers.bline.select("path").attr("d",Le.showline?"M"+K+","+(Y+ne)+"h"+ie:"M0,0").call(g.stroke,Le.linecolor||"#000").style("stroke-width",(Le.linewidth||0)+"px"),N.layers.cline.select("path").attr("d",ve.showline?"M"+(K+ie/2)+","+Y+"l"+ie/2+","+ne:"M0,0").call(g.stroke,ve.linecolor||"#000").style("stroke-width",(ve.linewidth||0)+"px"),N.graphDiv._context.staticPlot||N.initInteractions(),r.setClipUrl(N.layers.frontplot,N._hasClipOnAxisFalse?null:N.clipId,N.graphDiv)},S.drawAxes=function(O){var F=this,N=F.graphDiv,V=F.id.substr(7)+"title",j=F.layers,$=F.aaxis,q=F.baxis,oe=F.caxis;if(F.drawAx($),F.drawAx(q),F.drawAx(oe),O){var Z=Math.max($.showticklabels?$.tickfont.size/2:0,(oe.showticklabels?oe.tickfont.size*.75:0)+(oe.ticks==="outside"?oe.ticklen*.87:0)),G=(q.showticklabels?q.tickfont.size:0)+(q.ticks==="outside"?q.ticklen:0)+3;j["a-title"]=f.draw(N,"a"+V,{propContainer:$,propName:F.id+".aaxis.title",placeholder:d(N,"Click to enter Component A title"),attributes:{x:F.x0+F.w/2,y:F.y0-$.title.font.size/3-Z,"text-anchor":"middle"}}),j["b-title"]=f.draw(N,"b"+V,{propContainer:q,propName:F.id+".baxis.title",placeholder:d(N,"Click to enter Component B title"),attributes:{x:F.x0-G,y:F.y0+F.h+q.title.font.size*.83+G,"text-anchor":"middle"}}),j["c-title"]=f.draw(N,"c"+V,{propContainer:oe,propName:F.id+".caxis.title",placeholder:d(N,"Click to enter Component C title"),attributes:{x:F.x0+F.w+G,y:F.y0+F.h+oe.title.font.size*.83+G,"text-anchor":"middle"}})}},S.drawAx=function(O){var F=this,N=F.graphDiv,V=O._name,j=V.charAt(0),$=O._id,q=F.layers[V],oe=30,Z=j+"tickLayout",G=i(O);F[Z]!==G&&(q.selectAll("."+$+"tick").remove(),F[Z]=G),O.setScale();var re=c.calcTicks(O),H=c.clipEnds(O,re),J=c.makeTransTickFn(O),ae=c.getTickSigns(O)[2],K=L.deg2rad(oe),Y=ae*(O.linewidth||1)/2,ie=ae*O.ticklen,ne=F.w,le=F.h,de=j==="b"?"M0,"+Y+"l"+Math.sin(K)*ie+","+Math.cos(K)*ie:"M"+Y+",0l"+Math.cos(K)*ie+","+-Math.sin(K)*ie,we={a:"M0,0l"+le+",-"+ne/2,b:"M0,0l-"+ne/2+",-"+le,c:"M0,0l-"+le+","+ne/2}[j];c.drawTicks(N,O,{vals:O.ticks==="inside"?H:re,layer:q,path:de,transFn:J,crisp:!1}),c.drawGrid(N,O,{vals:H,layer:F.layers[j+"grid"],path:we,transFn:J,crisp:!1}),c.drawLabels(N,O,{vals:re,layer:q,transFn:J,labelFns:c.makeLabelFns(O,0,oe)})};function i(O){return O.ticks+String(O.ticklen)+String(O.showticklabels)}var C=E.MINZOOM/2+.87,x="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(C*.87+4.5)+"l2.6,1.5l-"+C/2+","+C*.87+"Z",k="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(C*.87+4.5)+"l-2.6,1.5l"+C/2+","+C*.87+"Z",I="m0,1l"+C/2+","+C*.87+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(C*.87+4.5)+"l-"+(C/2+2.6)+","+(C*.87+4.5)+"l2.6,1.5l"+C/2+",-"+C*.87+"Z",B="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",_=!0;S.clearOutline=function(){b(this.dragOptions),m(this.dragOptions.gd)},S.initInteractions=function(){var O=this,F=O.layers.plotbg.select("path").node(),N=O.graphDiv,V=N._fullLayout._zoomlayer,j,$;this.dragOptions={element:F,gd:N,plotinfo:{id:O.id,domain:N._fullLayout[O.id].domain,xaxis:O.xaxis,yaxis:O.yaxis},subplot:O.id,prepFn:function(_e,ze,Ie){O.dragOptions.xaxes=[O.xaxis],O.dragOptions.yaxes=[O.yaxis],j=N._fullLayout._invScaleX,$=N._fullLayout._invScaleY;var Ne=O.dragOptions.dragmode=N._fullLayout.dragmode;h(Ne)?O.dragOptions.minDrag=1:O.dragOptions.minDrag=void 0,Ne==="zoom"?(O.dragOptions.moveFn=Le,O.dragOptions.clickFn=ne,O.dragOptions.doneFn=ve,le(_e,ze,Ie)):Ne==="pan"?(O.dragOptions.moveFn=ye,O.dragOptions.clickFn=ne,O.dragOptions.doneFn=Se,Ae(),O.clearOutline(N)):(T(Ne)||h(Ne))&&n(_e,ze,Ie,O.dragOptions,Ne)}};var q,oe,Z,G,re,H,J,ae,K,Y;function ie(_e){var ze={};return ze[O.id+".aaxis.min"]=_e.a,ze[O.id+".baxis.min"]=_e.b,ze[O.id+".caxis.min"]=_e.c,ze}function ne(_e,ze){var Ie=N._fullLayout.clickmode;z(N),_e===2&&(N.emit("plotly_doubleclick",null),o.call("_guiRelayout",N,ie({a:0,b:0,c:0}))),Ie.indexOf("select")>-1&&_e===1&&v(ze,N,[O.xaxis],[O.yaxis],O.id,O.dragOptions),Ie.indexOf("event")>-1&&l.click(N,ze,O.id)}function le(_e,ze,Ie){var Ne=F.getBoundingClientRect();q=ze-Ne.left,oe=Ie-Ne.top,N._fullLayout._calcInverseTransform(N);var et=N._fullLayout._invTransform,st=L.apply3DTransform(et)(q,oe);q=st[0],oe=st[1],Z={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},re=Z,G=O.aaxis.range[1]-Z.a,H=P(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(),J="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",ae=!1,K=V.append("path").attr("class","zoombox").attr("transform",M(O.x0,O.y0)).style({fill:H>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",J),Y=V.append("path").attr("class","zoombox-corners").attr("transform",M(O.x0,O.y0)).style({fill:g.background,stroke:g.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),O.clearOutline(N)}function de(_e,ze){return 1-ze/O.h}function we(_e,ze){return 1-(_e+(O.h-ze)/Math.sqrt(3))/O.w}function me(_e,ze){return(_e-(O.h-ze)/Math.sqrt(3))/O.w}function Le(_e,ze){var Ie=q+_e*j,Ne=oe+ze*$,et=Math.max(0,Math.min(1,de(q,oe),de(Ie,Ne))),st=Math.max(0,Math.min(1,we(q,oe),we(Ie,Ne))),Ze=Math.max(0,Math.min(1,me(q,oe),me(Ie,Ne))),Ke=(et/2+Ze)*O.w,nt=(1-et/2-st)*O.w,it=(Ke+nt)/2,lt=nt-Ke,vt=(1-et)*O.h,xt=vt-lt/w;lt<E.MINZOOM?(re=Z,K.attr("d",J),Y.attr("d","M0,0Z")):(re={a:Z.a+et*G,b:Z.b+st*G,c:Z.c+Ze*G},K.attr("d",J+"M"+Ke+","+vt+"H"+nt+"L"+it+","+xt+"L"+Ke+","+vt+"Z"),Y.attr("d","M"+q+","+oe+B+"M"+Ke+","+vt+x+"M"+nt+","+vt+k+"M"+it+","+xt+I)),ae||(K.transition().style("fill",H>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Y.transition().style("opacity",1).duration(200),ae=!0),N.emit("plotly_relayouting",ie(re))}function ve(){z(N),re!==Z&&(o.call("_guiRelayout",N,ie(re)),_&&N.data&&N._context.showTips&&(L.notifier(d(N,"Double-click to zoom back out"),"long"),_=!1))}function Ae(){Z={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},re=Z}function ye(_e,ze){var Ie=_e/O.xaxis._m,Ne=ze/O.yaxis._m;re={a:Z.a-Ne,b:Z.b+(Ie+Ne)/2,c:Z.c-(Ie-Ne)/2};var et=[re.a,re.b,re.c].sort(L.sorterAsc),st={a:et.indexOf(re.a),b:et.indexOf(re.b),c:et.indexOf(re.c)};et[0]<0&&(et[1]+et[0]/2<0?(et[2]+=et[0]+et[1],et[0]=et[1]=0):(et[2]+=et[0]/2,et[1]+=et[0]/2,et[0]=0),re={a:et[st.a],b:et[st.b],c:et[st.c]},ze=(Z.a-re.a)*O.yaxis._m,_e=(Z.c-re.c-Z.b+re.b)*O.xaxis._m);var Ze=M(O.x0+_e,O.y0+ze);O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ze);var Ke=M(-_e,-ze);O.clipDefRelative.select("path").attr("transform",Ke),O.aaxis.range=[re.a,O.sum-re.b-re.c],O.baxis.range=[O.sum-re.a-re.c,re.b],O.caxis.range=[O.sum-re.a-re.b,re.c],O.drawAxes(!1),O._hasClipOnAxisFalse&&O.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,O),N.emit("plotly_relayouting",ie(re))}function Se(){o.call("_guiRelayout",N,ie(re))}F.onmousemove=function(_e){l.hover(N,_e,O.id),N._fullLayout._lasthover=F,N._fullLayout._hoversubplot=O.id},F.onmouseout=function(_e){N._dragging||u.unhover(N,_e)},u.init(this.dragOptions)};function z(O){A.select(O).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},24040:function(te,X,e){var A=e(24248),P=e(16628),o=e(52416),L=e(63620),M=e(52200).addStyleRule,d=e(92880),g=e(45464),r=e(64859),t=d.extendFlat,s=d.extendDeepAll;X.modules={},X.allCategories={},X.allTypes=[],X.subplotsRegistry={},X.transformsRegistry={},X.componentsRegistry={},X.layoutArrayContainers=[],X.layoutArrayRegexes=[],X.traceLayoutAttributes={},X.localeRegistry={},X.apiMethodRegistry={},X.collectableSubplotTypes=null,X.register=function(b){if(X.collectableSubplotTypes=null,b)b&&!Array.isArray(b)&&(b=[b]);else throw new Error("No argument passed to Plotly.register.");for(var E=0;E<b.length;E++){var p=b[E];if(!p)throw new Error("Invalid module was attempted to be registered!");switch(p.moduleType){case"trace":a(p);break;case"transform":l(p);break;case"component":u(p);break;case"locale":y(p);break;case"apiMethod":var S=p.name;X.apiMethodRegistry[S]=p.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},X.getModule=function(m){var b=X.modules[v(m)];return b?b._module:!1},X.traceIs=function(m,b){if(m=v(m),m==="various")return!1;var E=X.modules[m];return E||(m&&A.log("Unrecognized trace type "+m+"."),E=X.modules[g.type.dflt]),!!E.categories[b]},X.getTransformIndices=function(m,b){for(var E=[],p=m.transforms||[],S=0;S<p.length;S++)p[S].type===b&&E.push(S);return E},X.hasTransform=function(m,b){for(var E=m.transforms||[],p=0;p<E.length;p++)if(E[p].type===b)return!0;return!1},X.getComponentMethod=function(m,b){var E=X.componentsRegistry[m];return E&&E[b]||P},X.call=function(){var m=arguments[0],b=[].slice.call(arguments,1);return X.apiMethodRegistry[m].apply(null,b)};function a(m){var b=m.name,E=m.categories,p=m.meta;if(X.modules[b]){A.log("Type "+b+" already registered");return}X.subplotsRegistry[m.basePlotModule.name]||c(m.basePlotModule);for(var S={},w=0;w<E.length;w++)S[E[w]]=!0,X.allCategories[E[w]]=!0;X.modules[b]={_module:m,categories:S},p&&Object.keys(p).length&&(X.modules[b].meta=p),X.allTypes.push(b);for(var i in X.componentsRegistry)T(i,b);m.layoutAttributes&&t(X.traceLayoutAttributes,m.layoutAttributes);var C=m.basePlotModule,x=C.name;if(x==="mapbox"){var k=C.constants.styleRules;for(var I in k)M(".js-plotly-plot .plotly .mapboxgl-"+I,k[I])}(x==="geo"||x==="mapbox")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function c(m){var b=m.name;if(X.subplotsRegistry[b]){A.log("Plot type "+b+" already registered.");return}h(m),X.subplotsRegistry[b]=m;for(var E in X.componentsRegistry)n(E,m.name)}function u(m){if(typeof m.name!="string")throw new Error("Component module *name* must be a string.");var b=m.name;X.componentsRegistry[b]=m,m.layoutAttributes&&(m.layoutAttributes._isLinkedToArray&&o(X.layoutArrayContainers,b),h(m));for(var E in X.modules)T(b,E);for(var p in X.subplotsRegistry)n(b,p);for(var S in X.transformsRegistry)f(b,S);m.schema&&m.schema.layout&&s(r,m.schema.layout)}function l(m){if(typeof m.name!="string")throw new Error("Transform module *name* must be a string.");var b="Transform module "+m.name,E=typeof m.transform=="function",p=typeof m.calcTransform=="function";if(!E&&!p)throw new Error(b+" is missing a *transform* or *calcTransform* method.");E&&p&&A.log([b+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),L(m.attributes)||A.log(b+" registered without an *attributes* object."),typeof m.supplyDefaults!="function"&&A.log(b+" registered without a *supplyDefaults* method."),X.transformsRegistry[m.name]=m;for(var S in X.componentsRegistry)f(S,m.name)}function y(m){var b=m.name,E=b.split("-")[0],p=m.dictionary,S=m.format,w=p&&Object.keys(p).length,i=S&&Object.keys(S).length,C=X.localeRegistry,x=C[b];if(x||(C[b]=x={}),E!==b){var k=C[E];k||(C[E]=k={}),w&&k.dictionary===x.dictionary&&(k.dictionary=p),i&&k.format===x.format&&(k.format=S)}w&&(x.dictionary=p),i&&(x.format=S)}function h(m){if(m.layoutAttributes){var b=m.layoutAttributes._arrayAttrRegexps;if(b)for(var E=0;E<b.length;E++)o(X.layoutArrayRegexes,b[E])}}function T(m,b){var E=X.componentsRegistry[m].schema;if(!(!E||!E.traces)){var p=E.traces[b];p&&s(X.modules[b]._module.attributes,p)}}function f(m,b){var E=X.componentsRegistry[m].schema;if(!(!E||!E.transforms)){var p=E.transforms[b];p&&s(X.transformsRegistry[b].attributes,p)}}function n(m,b){var E=X.componentsRegistry[m].schema;if(!(!E||!E.subplots)){var p=X.subplotsRegistry[b],S=p.layoutAttributes,w=p.attr==="subplot"?p.name:p.attr;Array.isArray(w)&&(w=w[0]);var i=E.subplots[w];S&&i&&s(S,i)}}function v(m){return typeof m=="object"&&(m=m.type),m}},91536:function(te,X,e){var A=e(24040),P=e(3400),o=P.extendFlat,L=P.extendDeep;function M(g){var r;switch(g){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function d(g){var r=["xaxis","yaxis","zaxis"];return r.indexOf(g.slice(0,5))>-1}te.exports=function(r,t){var s,a=r.data,c=r.layout,u=L([],a),l=L({},c,M(t.tileClass)),y=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var h=Object.keys(l);for(s=0;s<h.length;s++)d(h[s])&&(l[h[s]].title={text:""});for(s=0;s<u.length;s++){var T=u[s];T.showscale=!1,T.marker&&(T.marker.showscale=!1),A.traceIs(T,"pie-like")&&(T.textposition="none")}}if(Array.isArray(t.annotations))for(s=0;s<t.annotations.length;s++)l.annotations.push(t.annotations[s]);var f=Object.keys(l).filter(function(E){return E.match(/^scene\d*$/)});if(f.length){var n={};for(t.tileClass==="thumbnail"&&(n={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),s=0;s<f.length;s++){var v=l[f[s]];v.xaxis||(v.xaxis={}),v.yaxis||(v.yaxis={}),v.zaxis||(v.zaxis={}),o(v.xaxis,n),o(v.yaxis,n),o(v.zaxis,n),v._scene=null}}var m=document.createElement("div");t.tileClass&&(m.className=t.tileClass);var b={gd:m,td:m,layout:l,data:u,config:{staticPlot:t.staticPlot===void 0?!0:t.staticPlot,plotGlPixelRatio:t.plotGlPixelRatio===void 0?2:t.plotGlPixelRatio,displaylogo:t.displaylogo||!1,showLink:t.showLink||!1,showTips:t.showTips||!1,mapboxAccessToken:y.mapboxAccessToken}};return t.setBackground!=="transparent"&&(b.config.setBackground=t.setBackground||"opaque"),b.gd.defaultLayout=M(t.tileClass),b}},39792:function(te,X,e){var A=e(3400),P=e(67024),o=e(48616),L=e(81792);function M(d,g){var r;return A.isPlainObject(d)||(r=A.getGraphDiv(d)),g=g||{},g.format=g.format||"png",g.width=g.width||null,g.height=g.height||null,g.imageDataOnly=!0,new Promise(function(t,s){r&&r._snapshotInProgress&&s(new Error("Snapshotting already in progress.")),A.isIE()&&g.format!=="svg"&&s(new Error(L.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var a=P(d,g),c=g.filename||d.fn||"newplot";c+="."+g.format.replace("-","."),a.then(function(u){return r&&(r._snapshotInProgress=!1),o(u,c,g.format)}).then(function(u){t(u)}).catch(function(u){r&&(r._snapshotInProgress=!1),s(u)})})}te.exports=M},48616:function(te,X,e){var A=e(3400),P=e(81792);function o(L,M,d){var g=document.createElement("a"),r="download"in g,t=new Promise(function(s,a){var c,u;if(A.isIE())return c=P.createBlob(L,"svg"),window.navigator.msSaveBlob(c,M),c=null,s(M);if(r)return c=P.createBlob(L,d),u=P.createObjectURL(c),g.href=u,g.download=M,document.body.appendChild(g),g.click(),document.body.removeChild(g),P.revokeObjectURL(u),c=null,s(M);if(A.isSafari()){var l=d==="svg"?",":";base64,";return P.octetStream(l+encodeURIComponent(L)),s(M)}a(new Error("download error"))});return t}te.exports=o},81792:function(te,X,e){var A=e(24040);X.getDelay=function(L){return L._has&&(L._has("gl3d")||L._has("gl2d")||L._has("mapbox"))?500:0},X.getRedrawFunc=function(L){return function(){A.getComponentMethod("colorbar","draw")(L)}},X.encodeSVG=function(L){return"data:image/svg+xml,"+encodeURIComponent(L)},X.encodeJSON=function(L){return"data:application/json,"+encodeURIComponent(L)};var P=window.URL||window.webkitURL;X.createObjectURL=function(L){return P.createObjectURL(L)},X.revokeObjectURL=function(L){return P.revokeObjectURL(L)},X.createBlob=function(L,M){if(M==="svg")return new window.Blob([L],{type:"image/svg+xml;charset=utf-8"});if(M==="full-json")return new window.Blob([L],{type:"application/json;charset=utf-8"});var d=o(window.atob(L));return new window.Blob([d],{type:"image/"+M})},X.octetStream=function(L){document.location.href="data:application/octet-stream"+L};function o(L){for(var M=L.length,d=new ArrayBuffer(M),g=new Uint8Array(d),r=0;r<M;r++)g[r]=L.charCodeAt(r);return d}X.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,X.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},78904:function(te,X,e){var A=e(81792),P={getDelay:A.getDelay,getRedrawFunc:A.getRedrawFunc,clone:e(91536),toSVG:e(37164),svgToImg:e(63268),toImage:e(61808),downloadImage:e(39792)};te.exports=P},63268:function(te,X,e){var A=e(3400),P=e(61252).EventEmitter,o=e(81792);function L(M){var d=M.emitter||new P,g=new Promise(function(r,t){var s=window.Image,a=M.svg,c=M.format||"png";if(A.isIE()&&c!=="svg"){var u=new Error(o.MSG_IE_BAD_FORMAT);return t(u),M.promise?g:d.emit("error",u)}var l=M.canvas,y=M.scale||1,h=M.width||300,T=M.height||150,f=y*h,n=y*T,v=l.getContext("2d",{willReadFrequently:!0}),m=new s,b,E;c==="svg"||A.isSafari()?E=o.encodeSVG(a):(b=o.createBlob(a,"svg"),E=o.createObjectURL(b)),l.width=f,l.height=n,m.onload=function(){var p;switch(b=null,o.revokeObjectURL(E),c!=="svg"&&v.drawImage(m,0,0,f,n),c){case"jpeg":p=l.toDataURL("image/jpeg");break;case"png":p=l.toDataURL("image/png");break;case"webp":p=l.toDataURL("image/webp");break;case"svg":p=E;break;default:var S="Image format is not jpeg, png, svg or webp.";if(t(new Error(S)),!M.promise)return d.emit("error",S)}r(p),M.promise||d.emit("success",p)},m.onerror=function(p){if(b=null,o.revokeObjectURL(E),t(p),!M.promise)return d.emit("error",p)},m.src=E});return M.promise?g:d}te.exports=L},61808:function(te,X,e){var A=e(61252).EventEmitter,P=e(24040),o=e(3400),L=e(81792),M=e(91536),d=e(37164),g=e(63268);function r(t,s){var a=new A,c=M(t,{format:"png"}),u=c.gd;u.style.position="absolute",u.style.left="-5000px",document.body.appendChild(u);function l(){var h=L.getDelay(u._fullLayout);setTimeout(function(){var T=d(u),f=document.createElement("canvas");f.id=o.randstr(),a=g({format:s.format,width:u._fullLayout.width,height:u._fullLayout.height,canvas:f,emitter:a,svg:T}),a.clean=function(){u&&document.body.removeChild(u)}},h)}var y=L.getRedrawFunc(u);return P.call("_doPlot",u,c.data,c.layout,c.config).then(y).then(l).catch(function(h){a.emit("error",h)}),a}te.exports=r},37164:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(76308),M=e(9616),d=/"/g,g="TOBESTRIPPED",r=new RegExp('("'+g+")|("+g+'")',"g");function t(a){var c=A.select("body").append("div").style({display:"none"}).html(""),u=a.replace(/(&[^;]*;)/gi,function(l){return l==="&lt;"?"&#60;":l==="&rt;"?"&#62;":l.indexOf("<")!==-1||l.indexOf(">")!==-1?"":c.html(l).text()});return c.remove(),u}function s(a){return a.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}te.exports=function(c,u,l){var y=c._fullLayout,h=y._paper,T=y._toppaper,f=y.width,n=y.height,v;h.insert("rect",":first-child").call(o.setRect,0,0,f,n).call(L.fill,y.paper_bgcolor);var m=y._basePlotModules||[];for(v=0;v<m.length;v++){var b=m[v];b.toSVG&&b.toSVG(c)}if(T){var E=T.node().childNodes,p=Array.prototype.slice.call(E);for(v=0;v<p.length;v++){var S=p[v];S.childNodes.length&&h.node().appendChild(S)}}y._draggers&&y._draggers.remove(),h.node().style.background="",h.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var i=A.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){i.remove();return}else i.style({visibility:null,display:null});var C=this.style.fontFamily;C&&C.indexOf('"')!==-1&&i.style("font-family",C.replace(d,g))}),h.selectAll(".gradient_filled,.pattern_filled").each(function(){var i=A.select(this),C=this.style.fill;C&&C.indexOf("url(")!==-1&&i.style("fill",C.replace(d,g));var x=this.style.stroke;x&&x.indexOf("url(")!==-1&&i.style("stroke",x.replace(d,g))}),(u==="pdf"||u==="eps")&&h.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),h.node().setAttributeNS(M.xmlns,"xmlns",M.svg),h.node().setAttributeNS(M.xmlns,"xmlns:xlink",M.xlink),u==="svg"&&l&&(h.attr("width",l*f),h.attr("height",l*n),h.attr("viewBox","0 0 "+f+" "+n));var w=new window.XMLSerializer().serializeToString(h.node());return w=t(w),w=s(w),w=w.replace(r,"'"),P.isIE()&&(w=w.replace(/"/gi,"'"),w=w.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),w=w.replace(/(\\')/gi,'"')),w}},84664:function(te,X,e){var A=e(3400);te.exports=function(o,L){for(var M=0;M<o.length;M++)o[M].i=M;A.mergeArray(L.text,o,"tx"),A.mergeArray(L.hovertext,o,"htx");var d=L.marker;if(d){A.mergeArray(d.opacity,o,"mo",!0),A.mergeArray(d.color,o,"mc");var g=d.line;g&&(A.mergeArray(g.color,o,"mlc"),A.mergeArrayCastPositive(g.width,o,"mlw"))}}},20832:function(te,X,e){var A=e(52904),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(21776).Gw,M=e(49084),d=e(25376),g=e(78048),r=e(98192).c,t=e(92880).extendFlat,s=d({editType:"calc",arrayOk:!0,colorEditType:"style"}),a=A.marker,c=a.line,u=t({},c.width,{dflt:0}),l=t({width:u,editType:"calc"},M("marker.line")),y=t({line:l,editType:"calc"},M("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:r,cornerradius:{valType:"any",editType:"calc"}});te.exports={x:A.x,x0:A.x0,dx:A.dx,y:A.y,y0:A.y0,dy:A.dy,xperiod:A.xperiod,yperiod:A.yperiod,xperiod0:A.xperiod0,yperiod0:A.yperiod0,xperiodalignment:A.xperiodalignment,yperiodalignment:A.yperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),text:A.text,texttemplate:L({editType:"plot"},{keys:g.eventDataKeys}),hovertext:A.hovertext,hovertemplate:o({},{keys:g.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:t({},s,{}),insidetextfont:t({},s,{}),outsidetextfont:t({},s,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:t({},A.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:y,offsetgroup:A.offsetgroup,alignmentgroup:A.alignmentgroup,selected:{marker:{opacity:A.selected.marker.opacity,color:A.selected.marker.color,editType:"style"},textfont:A.selected.textfont,editType:"style"},unselected:{marker:{opacity:A.unselected.marker.opacity,color:A.unselected.marker.color,editType:"style"},textfont:A.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},71820:function(te,X,e){var A=e(54460),P=e(1220),o=e(94288).hasColorscale,L=e(47128),M=e(84664),d=e(4500);te.exports=function(r,t){var s=A.getFromId(r,t.xaxis||"x"),a=A.getFromId(r,t.yaxis||"y"),c,u,l,y,h,T,f={msUTC:!!(t.base||t.base===0)};t.orientation==="h"?(c=s.makeCalcdata(t,"x",f),l=a.makeCalcdata(t,"y"),y=P(t,a,"y",l),h=!!t.yperiodalignment,T="y"):(c=a.makeCalcdata(t,"y",f),l=s.makeCalcdata(t,"x"),y=P(t,s,"x",l),h=!!t.xperiodalignment,T="x"),u=y.vals;for(var n=Math.min(u.length,c.length),v=new Array(n),m=0;m<n;m++)v[m]={p:u[m],s:c[m]},h&&(v[m].orig_p=l[m],v[m][T+"End"]=y.ends[m],v[m][T+"Start"]=y.starts[m]),t.ids&&(v[m].id=String(t.ids[m]));return o(t,"marker")&&L(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&L(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),M(v,t),d(v,t),v}},78048:function(te){te.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},96376:function(te,X,e){var A=e(38248),P=e(3400).isArrayOrTypedArray,o=e(39032).BADNUM,L=e(24040),M=e(54460),d=e(71888).getAxisGroup,g=e(72592);function r(x,k){for(var I=k.xaxis,B=k.yaxis,_=x._fullLayout,z=x._fullData,O=x.calcdata,F=[],N=[],V=0;V<z.length;V++){var j=z[V];if(j.visible===!0&&L.traceIs(j,"bar")&&j.xaxis===I._id&&j.yaxis===B._id&&(j.orientation==="h"?F.push(O[V]):N.push(O[V]),j._computePh))for(var $=x.calcdata[V],q=0;q<$.length;q++)typeof $[q].ph0=="function"&&($[q].ph0=$[q].ph0()),typeof $[q].ph1=="function"&&($[q].ph1=$[q].ph1())}var oe={xCat:I.type==="category"||I.type==="multicategory",yCat:B.type==="category"||B.type==="multicategory",mode:_.barmode,norm:_.barnorm,gap:_.bargap,groupgap:_.bargroupgap};t(x,I,B,N,oe),t(x,B,I,F,oe)}function t(x,k,I,B,_){if(B.length){var z,O,F,N,V;switch(c(I,B),_.mode){case"overlay":u(k,I,B,_);break;case"group":for(z=[],O=[],F=0;F<B.length;F++)N=B[F],V=N[0].trace,V.offset===void 0?O.push(N):z.push(N);O.length&&l(x,k,I,O,_),z.length&&u(k,I,z,_);break;case"stack":case"relative":for(z=[],O=[],F=0;F<B.length;F++)N=B[F],V=N[0].trace,V.base===void 0?O.push(N):z.push(N);a(O),O.length&&y(x,k,I,O,_),z.length&&u(k,I,z,_);break}s(B),i(B,k)}}function s(x){var k,I,B,_,z,O,F;for(k=0;k<x.length;k++)I=x[k],B=I[0].trace,_=I[0].t,_.cornerradiusvalue===void 0&&(z=B.marker?B.marker.cornerradius:void 0,z!==void 0&&(O=A(z)?+z:+z.slice(0,-1),F=A(z)?"px":"%",_.cornerradiusvalue=O,_.cornerradiusform=F))}function a(x){if(!(x.length<2)){var k,I,B,_,z,O,F;for(k=0;k<x.length&&(I=x[k],B=I[0].trace,z=B.marker?B.marker.cornerradius:void 0,z===void 0);k++);if(z!==void 0)for(O=A(z)?+z:+z.slice(0,-1),F=A(z)?"px":"%",k=0;k<x.length;k++)I=x[k],_=I[0].t,_.cornerradiusvalue=O,_.cornerradiusform=F}}function c(x,k){var I,B;for(I=0;I<k.length;I++){var _=k[I],z=_[0].trace,O=z.type==="funnel"?z._base:z.base,F,N=z.orientation==="h"?z.xcalendar:z.ycalendar,V=x.type==="category"||x.type==="multicategory"?function(){return null}:x.d2c;if(P(O)){for(B=0;B<Math.min(O.length,_.length);B++)F=V(O[B],0,N),A(F)?(_[B].b=+F,_[B].hasB=1):_[B].b=0;for(;B<_.length;B++)_[B].b=0}else{F=V(O,0,N);var j=A(F);for(F=j?F:0,B=0;B<_.length;B++)_[B].b=F,j&&(_[B].hasB=1)}}}function u(x,k,I,B){for(var _=0;_<I.length;_++){var z=I[_],O=new g([z],{posAxis:x,sepNegVal:!1,overlapNoMerge:!B.norm});h(x,O,B),B.norm?(E(O),S(k,O,B)):m(k,O)}}function l(x,k,I,B,_){var z=new g(B,{posAxis:k,sepNegVal:!1,overlapNoMerge:!_.norm});T(x,k,z,_),p(z,k),_.norm?(E(z),S(I,z,_)):m(I,z)}function y(x,k,I,B,_){var z=new g(B,{posAxis:k,sepNegVal:_.mode==="relative",overlapNoMerge:!(_.norm||_.mode==="stack"||_.mode==="relative")});h(k,z,_),b(I,z,_);for(var O=0;O<B.length;O++)for(var F=B[O],N=0;N<F.length;N++){var V=F[N];if(V.s!==o){var j=V.b+V.s===z.get(V.p,V.s);j&&(V._outmost=!0)}}_.norm&&S(I,z,_)}function h(x,k,I){for(var B=k.minDiff,_=k.traces,z=B*(1-I.gap),O=z,F=O*(1-(I.groupgap||0)),N=-F/2,V=0;V<_.length;V++){var j=_[V],$=j[0].t;$.barwidth=F,$.poffset=N,$.bargroupwidth=z,$.bardelta=B}k.binWidth=_[0][0].t.barwidth/100,f(k),n(x,k),v(x,k)}function T(x,k,I,B){for(var _=x._fullLayout,z=I.positions,O=I.distinctPositions,F=I.minDiff,N=I.traces,V=N.length,j=z.length!==O.length,$=F*(1-B.gap),q=d(_,k._id)+N[0][0].trace.orientation,oe=_._alignmentOpts[q]||{},Z=0;Z<V;Z++){var G=N[Z],re=G[0].trace,H=oe[re.alignmentgroup]||{},J=Object.keys(H.offsetGroups||{}).length,ae;J?ae=$/J:ae=j?$/V:$;var K=ae*(1-(B.groupgap||0)),Y;J?Y=((2*re._offsetIndex+1-J)*ae-K)/2:Y=j?((2*Z+1-V)*ae-K)/2:-K/2;var ie=G[0].t;ie.barwidth=K,ie.poffset=Y,ie.bargroupwidth=$,ie.bardelta=F}I.binWidth=N[0][0].t.barwidth/100,f(I),n(k,I),v(k,I,j)}function f(x){var k=x.traces,I,B;for(I=0;I<k.length;I++){var _=k[I],z=_[0],O=z.trace,F=z.t,N=O._offset||O.offset,V=F.poffset,j;if(P(N)){for(j=Array.prototype.slice.call(N,0,_.length),B=0;B<j.length;B++)A(j[B])||(j[B]=V);for(B=j.length;B<_.length;B++)j.push(V);F.poffset=j}else N!==void 0&&(F.poffset=N);var $=O._width||O.width,q=F.barwidth;if(P($)){var oe=Array.prototype.slice.call($,0,_.length);for(B=0;B<oe.length;B++)A(oe[B])||(oe[B]=q);for(B=oe.length;B<_.length;B++)oe.push(q);if(F.barwidth=oe,N===void 0){for(j=[],B=0;B<_.length;B++)j.push(V+(q-oe[B])/2);F.poffset=j}}else $!==void 0&&(F.barwidth=$,N===void 0&&(F.poffset=V+(q-$)/2))}}function n(x,k){for(var I=k.traces,B=C(x),_=0;_<I.length;_++)for(var z=I[_],O=z[0].t,F=O.poffset,N=P(F),V=O.barwidth,j=P(V),$=0;$<z.length;$++){var q=z[$],oe=q.w=j?V[$]:V;q.p===void 0&&(q.p=q[B],q["orig_"+B]=q[B]);var Z=(N?F[$]:F)+oe/2;q[B]=q.p+Z}}function v(x,k,I){var B=k.traces,_=k.minDiff,z=_/2;M.minDtick(x,k.minDiff,k.distinctPositions[0],I);for(var O=0;O<B.length;O++){var F=B[O],N=F[0],V=N.trace,j=[],$,q,oe,Z;for(Z=0;Z<F.length;Z++)$=F[Z],q=$.p-z,oe=$.p+z,j.push(q,oe);if(V.width||V.offset){var G=N.t,re=G.poffset,H=G.barwidth,J=P(re),ae=P(H);for(Z=0;Z<F.length;Z++){$=F[Z];var K=J?re[Z]:re,Y=ae?H[Z]:H;q=$.p+K,oe=q+Y,j.push(q,oe)}}V._extremes[x._id]=M.findExtremes(x,j,{padded:!1})}}function m(x,k){for(var I=k.traces,B=C(x),_=0;_<I.length;_++){for(var z=I[_],O=z[0].trace,F=O.type==="scatter",N=O.orientation==="v",V=[],j=!1,$=0;$<z.length;$++){var q=z[$],oe=F?0:q.b,Z=F?N?q.y:q.x:oe+q.s;q[B]=Z,V.push(Z),q.hasB&&V.push(oe),(!q.hasB||!q.b)&&(j=!0)}O._extremes[x._id]=M.findExtremes(x,V,{tozero:j,padded:!0})}}function b(x,k,I){var B=C(x),_=k.traces,z,O,F,N,V,j;for(N=0;N<_.length;N++)if(z=_[N],O=z[0].trace,O.type==="funnel")for(V=0;V<z.length;V++)j=z[V],j.s!==o&&k.put(j.p,-.5*j.s);for(N=0;N<_.length;N++){z=_[N],O=z[0].trace,F=O.type==="funnel";var $=[];for(V=0;V<z.length;V++)if(j=z[V],j.s!==o){var q;F?q=j.s:q=j.s+j.b;var oe=k.put(j.p,q),Z=oe+q;j.b=oe,j[B]=Z,I.norm||($.push(Z),j.hasB&&$.push(oe))}I.norm||(O._extremes[x._id]=M.findExtremes(x,$,{tozero:!0,padded:!0}))}}function E(x){for(var k=x.traces,I=0;I<k.length;I++)for(var B=k[I],_=0;_<B.length;_++){var z=B[_];z.s!==o&&x.put(z.p,z.b+z.s)}}function p(x,k){for(var I=x.traces,B=0;B<I.length;B++){var _=I[B],z=_[0].trace;if(z.base===void 0)for(var O=new g([_],{posAxis:k,sepNegVal:!0,overlapNoMerge:!0}),F=0;F<_.length;F++){var N=_[F];if(N.p!==o){var V=O.put(N.p,N.b+N.s);V&&(N.b=V)}}}}function S(x,k,I){var B=k.traces,_=C(x),z=I.norm==="fraction"?1:100,O=z/1e9,F=x.l2c(x.c2l(0)),N=I.mode==="stack"?z:F;function V(Y){return A(x.c2l(Y))&&(Y<F-O||Y>N+O||!A(F))}for(var j=0;j<B.length;j++){for(var $=B[j],q=$[0].trace,oe=[],Z=!1,G=!1,re=0;re<$.length;re++){var H=$[re];if(H.s!==o){var J=Math.abs(z/k.get(H.p,H.s));H.b*=J,H.s*=J;var ae=H.b,K=ae+H.s;H[_]=K,oe.push(K),G=G||V(K),H.hasB&&(oe.push(ae),G=G||V(ae)),(!H.hasB||!H.b)&&(Z=!0)}}q._extremes[x._id]=M.findExtremes(x,oe,{tozero:Z,padded:G})}}function w(x,k,I,B){for(var _=C(B),z=0;z<x.length;z++)for(var O=x[z],F=0;F<O.length;F++){var N=O[F],V=N[_];N._sMin=k[V],N._sMax=I[V]}}function i(x,k){var I=C(k),B={},_,z,O,F=1/0,N=-1/0;for(_=0;_<x.length;_++)for(O=x[_],z=0;z<O.length;z++){var V=O[z].p;A(V)&&(F=Math.min(F,V),N=Math.max(N,V))}var j=1e4/(N-F),$=B.round=function(le){return String(Math.round(j*(le-F)))},q={},oe={},Z=x.some(function(le){var de=le[0].trace;return"marker"in de&&de.marker.cornerradius});for(_=0;_<x.length;_++){O=x[_],O[0].t.extents=B;var G=O[0].t.poffset,re=P(G);for(z=0;z<O.length;z++){var H=O[z],J=H[I]-H.w/2;if(A(J)){var ae=H[I]+H.w/2,K=$(H.p);B[K]?B[K]=[Math.min(J,B[K][0]),Math.max(ae,B[K][1])]:B[K]=[J,ae]}if(H.p0=H.p+(re?G[z]:G),H.p1=H.p0+H.w,H.s0=H.b,H.s1=H.s0+H.s,Z){var Y=Math.min(H.s0,H.s1)||0,ie=Math.max(H.s0,H.s1)||0,ne=H[I];q[ne]=ne in q?Math.min(q[ne],Y):Y,oe[ne]=ne in oe?Math.max(oe[ne],ie):ie}}}Z&&w(x,q,oe,k)}function C(x){return x._id.charAt(0)}te.exports={crossTraceCalc:r,setGroupPositions:t}},31508:function(te,X,e){var A=e(38248),P=e(3400),o=e(76308),L=e(24040),M=e(43980),d=e(31147),g=e(55592),r=e(20011),t=e(20832),s=P.coerceFont;function a(y,h,T,f){function n(p,S){return P.coerce(y,h,t,p,S)}var v=M(y,h,f,n);if(!v){h.visible=!1;return}d(y,h,f,n),n("xhoverformat"),n("yhoverformat"),n("orientation",h.x&&!h.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var m=n("textposition");l(y,h,f,n,m,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),g(y,h,n,T,f);var b=(h.marker.line||{}).color,E=L.getComponentMethod("errorbars","supplyDefaults");E(y,h,b||o.defaultLine,{axis:"y"}),E(y,h,b||o.defaultLine,{axis:"x",inherit:"y"}),P.coerceSelectionMarkerOpacity(h,n)}function c(y,h){var T,f;function n(b,E){return P.coerce(f._input,f,t,b,E)}for(var v=0;v<y.length;v++)if(f=y[v],f.type==="bar"){T=f._input;var m=n("marker.cornerradius",h.barcornerradius);f.marker&&(f.marker.cornerradius=u(m)),h.barmode==="group"&&r(T,f,h,n)}}function u(y){if(A(y)){if(y=+y,y>=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&A(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function l(y,h,T,f,n,v){v=v||{};var m=v.moduleHasSelected!==!1,b=v.moduleHasUnselected!==!1,E=v.moduleHasConstrain!==!1,p=v.moduleHasCliponaxis!==!1,S=v.moduleHasTextangle!==!1,w=v.moduleHasInsideanchor!==!1,i=!!v.hasPathbar,C=Array.isArray(n)||n==="auto",x=C||n==="inside",k=C||n==="outside";if(x||k){var I=s(f,"textfont",T.font),B=P.extendFlat({},I),_=y.textfont&&y.textfont.color,z=!_;if(z&&delete B.color,s(f,"insidetextfont",B),i){var O=P.extendFlat({},I);z&&delete O.color,s(f,"pathbar.textfont",O)}k&&s(f,"outsidetextfont",I),m&&f("selected.textfont.color"),b&&f("unselected.textfont.color"),E&&f("constraintext"),p&&f("cliponaxis"),S&&f("textangle"),f("texttemplate")}x&&w&&f("insidetextanchor")}te.exports={supplyDefaults:a,crossTraceDefaults:c,handleText:l,validateCornerradius:u}},52160:function(te){te.exports=function(e,A,P){return e.x="xVal"in A?A.xVal:A.x,e.y="yVal"in A?A.yVal:A.y,A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),P.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},60444:function(te,X,e){var A=e(38248),P=e(49760),o=e(3400).isArrayOrTypedArray;X.coerceString=function(L,M,d){if(typeof M=="string"){if(M||!L.noBlank)return M}else if((typeof M=="number"||M===!0)&&!L.strict)return String(M);return d!==void 0?d:L.dflt},X.coerceNumber=function(L,M,d){if(A(M)){M=+M;var g=L.min,r=L.max,t=g!==void 0&&M<g||r!==void 0&&M>r;if(!t)return M}return d!==void 0?d:L.dflt},X.coerceColor=function(L,M,d){return P(M).isValid()?M:d!==void 0?d:L.dflt},X.coerceEnumerated=function(L,M,d){return L.coerceNumber&&(M=+M),L.values.indexOf(M)!==-1?M:d!==void 0?d:L.dflt},X.getValue=function(L,M){var d;return o(L)?M<L.length&&(d=L[M]):d=L,d},X.getLineWidth=function(L,M){var d=0<M.mlw?M.mlw:o(L.marker.line.width)?0:L.marker.line.width;return d}},63400:function(te,X,e){var A=e(93024),P=e(24040),o=e(76308),L=e(3400).fillText,M=e(60444).getLineWidth,d=e(54460).hoverLabelText,g=e(39032).BADNUM;function r(a,c,u,l,y){var h=t(a,c,u,l,y);if(h){var T=h.cd,f=T[0].trace,n=T[h.index];return h.color=s(f,n),P.getComponentMethod("errorbars","hoverInfo")(n,f,h),[h]}}function t(a,c,u,l,y){var h=a.cd,T=h[0].trace,f=h[0].t,n=l==="closest",v=T.type==="waterfall",m=a.maxHoverDistance,b=a.maxSpikeDistance,E,p,S,w,i,C,x;T.orientation==="h"?(E=u,p=c,S="y",w="x",i=oe,C=j):(E=c,p=u,S="x",w="y",C=oe,i=j);var k=T[S+"period"],I=n||k;function B(le){return z(le,-1)}function _(le){return z(le,1)}function z(le,de){var we=le.w;return le[S]+de*we/2}function O(le){return le[S+"End"]-le[S+"Start"]}var F=n?B:k?function(le){return le.p-O(le)/2}:function(le){return Math.min(B(le),le.p-f.bardelta/2)},N=n?_:k?function(le){return le.p+O(le)/2}:function(le){return Math.max(_(le),le.p+f.bardelta/2)};function V(le,de,we){return y.finiteRange&&(we=0),A.inbox(le-E,de-E,we+Math.min(1,Math.abs(de-le)/x)-1)}function j(le){return V(F(le),N(le),m)}function $(le){return V(B(le),_(le),b)}function q(le){var de=le[w];if(v){var we=Math.abs(le.rawS)||0;p>0?de+=we:p<0&&(de-=we)}return de}function oe(le){var de=p,we=le.b,me=q(le);return A.inbox(we-de,me-de,m+(me-de)/(me-we)-1)}function Z(le){var de=p,we=le.b,me=q(le);return A.inbox(we-de,me-de,b+(me-de)/(me-we)-1)}var G=a[S+"a"],re=a[w+"a"];x=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function H(le){return(i(le)+C(le))/2}var J=A.getDistanceFunction(l,i,C,H);if(A.getClosest(h,J,a),a.index!==!1&&h[a.index].p!==g){I||(F=function(le){return Math.min(B(le),le.p-f.bargroupwidth/2)},N=function(le){return Math.max(_(le),le.p+f.bargroupwidth/2)});var ae=a.index,K=h[ae],Y=T.base?K.b+K.s:K.s;a[w+"0"]=a[w+"1"]=re.c2p(K[w],!0),a[w+"LabelVal"]=Y;var ie=f.extents[f.extents.round(K.p)];a[S+"0"]=G.c2p(n?F(K):ie[0],!0),a[S+"1"]=G.c2p(n?N(K):ie[1],!0);var ne=K.orig_p!==void 0;return a[S+"LabelVal"]=ne?K.orig_p:K.p,a.labelLabel=d(G,a[S+"LabelVal"],T[S+"hoverformat"]),a.valueLabel=d(re,a[w+"LabelVal"],T[w+"hoverformat"]),a.baseLabel=d(re,K.b,T[w+"hoverformat"]),a.spikeDistance=(Z(K)+$(K))/2,a[S+"Spike"]=G.c2p(K.p,!0),L(K,T,a),a.hovertemplate=T.hovertemplate,a}}function s(a,c){var u=c.mcc||a.marker.color,l=c.mlcc||a.marker.line.color,y=M(a,c);if(o.opacity(u))return u;if(o.opacity(l)&&y)return l}te.exports={hoverPoints:r,hoverOnBars:t,getTraceColor:s}},51132:function(te,X,e){te.exports={attributes:e(20832),layoutAttributes:e(39324),supplyDefaults:e(31508).supplyDefaults,crossTraceDefaults:e(31508).crossTraceDefaults,supplyLayoutDefaults:e(37156),calc:e(71820),crossTraceCalc:e(96376).crossTraceCalc,colorbar:e(5528),arraysToCalcdata:e(84664),plot:e(98184).plot,style:e(60100).style,styleOnSelect:e(60100).styleOnSelect,hoverPoints:e(63400).hoverPoints,eventData:e(52160),selectPoints:e(45784),moduleType:"trace",name:"bar",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(te){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"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(te,X,e){var A=e(24040),P=e(54460),o=e(3400),L=e(39324),M=e(31508).validateCornerradius;te.exports=function(d,g,r){function t(v,m){return o.coerce(d,g,L,v,m)}for(var s=!1,a=!1,c=!1,u={},l=t("barmode"),y=0;y<r.length;y++){var h=r[y];if(A.traceIs(h,"bar")&&h.visible)s=!0;else continue;if(l==="group"){var T=h.xaxis+h.yaxis;u[T]&&(c=!0),u[T]=!0}if(h.visible&&h.type==="histogram"){var f=P.getFromId({_fullLayout:g},h[h.orientation==="v"?"xaxis":"yaxis"]);f.type!=="category"&&(a=!0)}}if(!s){delete g.barmode;return}l!=="overlay"&&t("barnorm"),t("bargap",a&&!c?0:.2),t("bargroupgap");var n=t("barcornerradius");g.barcornerradius=M(n)}},98184:function(te,X,e){var A=e(33428),P=e(38248),o=e(3400),L=e(72736),M=e(76308),d=e(43616),g=e(24040),r=e(54460).tickText,t=e(82744),s=t.recordMinTextSize,a=t.clearMinTextSize,c=e(60100),u=e(60444),l=e(78048),y=e(20832),h=y.text,T=y.textposition,f=e(10624).appendArrayPointValue,n=l.TEXTPAD;function v(j){return j.id}function m(j){if(j.ids)return v}function b(j){return(j>0)-(j<0)}function E(j,$){return j<$?1:-1}function p(j,$,q,oe){var Z=[],G=[],re=oe?$:q,H=oe?q:$;return Z[0]=re.c2p(j.s0,!0),G[0]=H.c2p(j.p0,!0),Z[1]=re.c2p(j.s1,!0),G[1]=H.c2p(j.p1,!0),oe?[Z,G]:[G,Z]}function S(j,$,q,oe){if(!$.uniformtext.mode&&w(q)){var Z;return oe&&(Z=oe()),j.transition().duration(q.duration).ease(q.easing).each("end",function(){Z&&Z()}).each("interrupt",function(){Z&&Z()})}else return j}function w(j){return j&&j.duration>0}function i(j,$,q,oe,Z,G){var re=$.xaxis,H=$.yaxis,J=j._fullLayout,ae=j._context.staticPlot;Z||(Z={mode:J.barmode,norm:J.barmode,gap:J.bargap,groupgap:J.bargroupgap},a("bar",J));var K=o.makeTraceGroups(oe,q,"trace bars").each(function(Y){var ie=A.select(this),ne=Y[0].trace,le=Y[0].t,de=ne.type==="waterfall",we=ne.type==="funnel",me=ne.type==="histogram",Le=ne.type==="bar",ve=Le||we,Ae=0;de&&ne.connector.visible&&ne.connector.mode==="between"&&(Ae=ne.connector.line.width/2);var ye=ne.orientation==="h",Se=w(Z),_e=o.ensureSingle(ie,"g","points"),ze=m(ne),Ie=_e.selectAll("g.point").data(o.identity,ze);Ie.enter().append("g").classed("point",!0),Ie.exit().remove(),Ie.each(function(et,st){var Ze=A.select(this),Ke=p(et,re,H,ye),nt=Ke[0][0],it=Ke[0][1],lt=Ke[1][0],vt=Ke[1][1],xt=(ye?it-nt:vt-lt)===0;xt&&ve&&u.getLineWidth(ne,et)&&(xt=!1),xt||(xt=!P(nt)||!P(it)||!P(lt)||!P(vt)),et.isBlank=xt,xt&&(ye?it=nt:vt=lt),Ae&&!xt&&(ye?(nt-=E(nt,it)*Ae,it+=E(nt,it)*Ae):(lt-=E(lt,vt)*Ae,vt+=E(lt,vt)*Ae));var Je,Pe;if(ne.type==="waterfall"){if(!xt){var Ue=ne[et.dir].marker;Je=Ue.line.width,Pe=Ue.color}}else Je=u.getLineWidth(ne,et),Pe=et.mc||ne.marker.color;function He(qe){var dt=A.round(Je/2%1,2);return Z.gap===0&&Z.groupgap===0?A.round(Math.round(qe)-dt,2):qe}function Oe(qe,dt,bt){return bt&&qe===dt?qe:Math.abs(qe-dt)>=2?He(qe):qe>dt?Math.ceil(qe):Math.floor(qe)}var Ce=M.opacity(Pe),ge=Ce<1||Je>.01?He:Oe;j._context.staticPlot||(nt=ge(nt,it,ye),it=ge(it,nt,ye),lt=ge(lt,vt,!ye),vt=ge(vt,lt,!ye));var pe=ye?re.c2p:H.c2p,Te;et.s0>0?Te=et._sMax:et.s0<0?Te=et._sMin:Te=et.s1>0?et._sMax:et._sMin;function be(qe,dt){if(!qe)return 0;var bt=Math.abs(ye?vt-lt:it-nt),Et=Math.abs(ye?it-nt:vt-lt),Mt=ge(Math.abs(pe(Te,!0)-pe(0,!0))),_t=et.hasB?Math.min(bt/2,Et/2):Math.min(bt/2,Mt),It;if(dt==="%"){var Gt=Math.min(50,qe);It=bt*(Gt/100)}else It=qe;return ge(Math.max(Math.min(It,_t),0))}var ke=Le||me?be(le.cornerradiusvalue,le.cornerradiusform):0,Ve,je,at="M"+nt+","+lt+"V"+vt+"H"+it+"V"+lt+"Z",ut=0;if(ke&&et.s){var Nt=b(et.s0)===0||b(et.s)===b(et.s0)?et.s1:et.s0;if(ut=ge(et.hasB?0:Math.abs(pe(Te,!0)-pe(Nt,!0))),ut<ke){var Vt=E(nt,it),gt=E(lt,vt),Ct=Vt===-gt?1:0;if(ye)if(et.hasB)Ve="M"+(nt+ke*Vt)+","+lt+"A "+ke+","+ke+" 0 0 "+Ct+" "+nt+","+(lt+ke*gt)+"V"+(vt-ke*gt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(nt+ke*Vt)+","+vt+"H"+(it-ke*Vt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+it+","+(vt-ke*gt)+"V"+(lt+ke*gt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(it-ke*Vt)+","+lt+"Z";else{je=Math.abs(it-nt)+ut;var Yt=je<ke?ke-Math.sqrt(je*(2*ke-je)):0,gr=ut>0?Math.sqrt(ut*(2*ke-ut)):0,ht=Vt>0?Math.max:Math.min;Ve="M"+nt+","+lt+"V"+(vt-Yt*gt)+"H"+ht(it-(ke-ut)*Vt,nt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+it+","+(vt-ke*gt-gr)+"V"+(lt+ke*gt+gr)+"A "+ke+","+ke+" 0 0 "+Ct+" "+ht(it-(ke-ut)*Vt,nt)+","+(lt+Yt*gt)+"Z"}else if(et.hasB)Ve="M"+(nt+ke*Vt)+","+lt+"A "+ke+","+ke+" 0 0 "+Ct+" "+nt+","+(lt+ke*gt)+"V"+(vt-ke*gt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(nt+ke*Vt)+","+vt+"H"+(it-ke*Vt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+it+","+(vt-ke*gt)+"V"+(lt+ke*gt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(it-ke*Vt)+","+lt+"Z";else{je=Math.abs(vt-lt)+ut;var Ht=je<ke?ke-Math.sqrt(je*(2*ke-je)):0,Wt=ut>0?Math.sqrt(ut*(2*ke-ut)):0,cr=gt>0?Math.max:Math.min;Ve="M"+(nt+Ht*Vt)+","+lt+"V"+cr(vt-(ke-ut)*gt,lt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(nt+ke*Vt-Wt)+","+vt+"H"+(it-ke*Vt+Wt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(it-Ht*Vt)+","+cr(vt-(ke-ut)*gt,lt)+"V"+lt+"Z"}}else Ve=at}else Ve=at;var er=S(o.ensureSingle(Ze,"path"),J,Z,G);if(er.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((it-nt)*(vt-lt))||xt&&j._context.staticPlot?"M0,0Z":Ve).call(d.setClipUrl,$.layerClipId,j),!J.uniformtext.mode&&Se){var ct=d.makePointStyleFns(ne);d.singlePointStyle(et,er,ne,ct,j)}C(j,$,Ze,Y,st,nt,it,lt,vt,ke,ut,Z,G),$.layerClipId&&d.hideOutsideRangePoint(et,Ze.select("text"),re,H,ne.xcalendar,ne.ycalendar)});var Ne=ne.cliponaxis===!1;d.setClipUrl(ie,Ne?null:$.layerClipId,j)});g.getComponentMethod("errorbars","plot")(j,K,$,Z)}function C(j,$,q,oe,Z,G,re,H,J,ae,K,Y,ie){var ne=$.xaxis,le=$.yaxis,de=j._fullLayout,we;function me(je,at,ut){var Nt=o.ensureSingle(je,"text").text(at).attr({class:"bartext bartext-"+we,"text-anchor":"middle","data-notex":1}).call(d.font,ut).call(L.convertToTspans,j);return Nt}var Le=oe[0].trace,ve=Le.orientation==="h",Ae=O(de,oe,Z,ne,le);we=F(Le,Z);var ye=Y.mode==="stack"||Y.mode==="relative",Se=oe[Z],_e=!ye||Se._outmost,ze=Se.hasB,Ie=ae&&ae-K>n;if(!Ae||we==="none"||(Se.isBlank||G===re||H===J)&&(we==="auto"||we==="inside")){q.select("text").remove();return}var Ne=de.font,et=c.getBarColor(oe[Z],Le),st=c.getInsideTextFont(Le,Z,Ne,et),Ze=c.getOutsideTextFont(Le,Z,Ne),Ke=Le.insidetextanchor||"end",nt=q.datum();ve?ne.type==="log"&&nt.s0<=0&&(ne.range[0]<ne.range[1]?G=0:G=ne._length):le.type==="log"&&nt.s0<=0&&(le.range[0]<le.range[1]?H=le._length:H=0);var it=Math.abs(re-G),lt=Math.abs(J-H),vt=it-2*n,xt=lt-2*n,Je,Pe,Ue,He,Oe;if(we==="outside"&&!_e&&!Se.hasB&&(we="inside"),we==="auto")if(_e){we="inside",Oe=o.ensureUniformFontSize(j,st),Je=me(q,Ae,Oe),Pe=d.bBox(Je.node()),Ue=Pe.width,He=Pe.height;var Ce=Ue>0&&He>0,ge;Ie?ze?ge=x(vt-2*ae,xt,Ue,He,ve)||x(vt,xt-2*ae,Ue,He,ve):ve?ge=x(vt-(ae-K),xt,Ue,He,ve)||x(vt,xt-2*(ae-K),Ue,He,ve):ge=x(vt,xt-(ae-K),Ue,He,ve)||x(vt-2*(ae-K),xt,Ue,He,ve):ge=x(vt,xt,Ue,He,ve),Ce&&ge?we="inside":(we="outside",Je.remove(),Je=null)}else we="inside";if(!Je){Oe=o.ensureUniformFontSize(j,we==="outside"?Ze:st),Je=me(q,Ae,Oe);var pe=Je.attr("transform");if(Je.attr("transform",""),Pe=d.bBox(Je.node()),Ue=Pe.width,He=Pe.height,Je.attr("transform",pe),Ue<=0||He<=0){Je.remove();return}}var Te=Le.textangle,be,ke;we==="outside"?(ke=Le.constraintext==="both"||Le.constraintext==="outside",be=z(G,re,H,J,Pe,{isHorizontal:ve,constrained:ke,angle:Te})):(ke=Le.constraintext==="both"||Le.constraintext==="inside",be=B(G,re,H,J,Pe,{isHorizontal:ve,constrained:ke,angle:Te,anchor:Ke,hasB:ze,r:ae,overhead:K})),be.fontSize=Oe.size,s(Le.type==="histogram"?"bar":Le.type,be,de),Se.transform=be;var Ve=S(Je,de,Y,ie);o.setTransormAndDisplay(Ve,be)}function x(j,$,q,oe,Z){if(j<0||$<0)return!1;var G=q<=j&&oe<=$,re=q<=$&&oe<=j,H=Z?j>=q*($/oe):$>=oe*(j/q);return G||re||H}function k(j){return j==="auto"?0:j}function I(j,$){var q=Math.PI/180*$,oe=Math.abs(Math.sin(q)),Z=Math.abs(Math.cos(q));return{x:j.width*Z+j.height*oe,y:j.width*oe+j.height*Z}}function B(j,$,q,oe,Z,G){var re=!!G.isHorizontal,H=!!G.constrained,J=G.angle||0,ae=G.anchor,K=ae==="end",Y=ae==="start",ie=G.leftToRight||0,ne=(ie+1)/2,le=1-ne,de=G.hasB,we=G.r,me=G.overhead,Le=Z.width,ve=Z.height,Ae=Math.abs($-j),ye=Math.abs(oe-q),Se=Ae>2*n&&ye>2*n?n:0;Ae-=2*Se,ye-=2*Se;var _e=k(J);J==="auto"&&!(Le<=Ae&&ve<=ye)&&(Le>Ae||ve>ye)&&(!(Le>ye||ve>Ae)||Le<ve!=Ae<ye)&&(_e+=90);var ze=I(Z,_e),Ie,Ne;if(we&&we-me>n){var et=_(j,$,q,oe,ze,we,me,re,de);Ie=et.scale,Ne=et.pad}else Ie=1,H&&(Ie=Math.min(1,Ae/ze.x,ye/ze.y)),Ne=0;var st=Z.left*le+Z.right*ne,Ze=(Z.top+Z.bottom)/2,Ke=(j+n)*le+($-n)*ne,nt=(q+oe)/2,it=0,lt=0;if(Y||K){var vt=(re?ze.x:ze.y)/2;we&&(K||de)&&(Se+=Ne);var xt=re?E(j,$):E(q,oe);re?Y?(Ke=j+xt*Se,it=-xt*vt):(Ke=$-xt*Se,it=xt*vt):Y?(nt=q+xt*Se,lt=-xt*vt):(nt=oe-xt*Se,lt=xt*vt)}return{textX:st,textY:Ze,targetX:Ke,targetY:nt,anchorX:it,anchorY:lt,scale:Ie,rotate:_e}}function _(j,$,q,oe,Z,G,re,H,J){var ae=Math.max(0,Math.abs($-j)-2*n),K=Math.max(0,Math.abs(oe-q)-2*n),Y=G-n,ie=re?Y-Math.sqrt(Y*Y-(Y-re)*(Y-re)):Y,ne=J?Y*2:H?Y-re:2*ie,le=J?Y*2:H?2*ie:Y-re,de,we,me,Le,ve;return Z.y/Z.x>=K/(ae-ne)?Le=K/Z.y:Z.y/Z.x<=(K-le)/ae?Le=ae/Z.x:!J&&H?(de=Z.x*Z.x+Z.y*Z.y/4,we=-2*Z.x*(ae-Y)-Z.y*(K/2-Y),me=(ae-Y)*(ae-Y)+(K/2-Y)*(K/2-Y)-Y*Y,Le=(-we+Math.sqrt(we*we-4*de*me))/(2*de)):J?(de=(Z.x*Z.x+Z.y*Z.y)/4,we=-Z.x*(ae/2-Y)-Z.y*(K/2-Y),me=(ae/2-Y)*(ae/2-Y)+(K/2-Y)*(K/2-Y)-Y*Y,Le=(-we+Math.sqrt(we*we-4*de*me))/(2*de)):(de=Z.x*Z.x/4+Z.y*Z.y,we=-Z.x*(ae/2-Y)-2*Z.y*(K-Y),me=(ae/2-Y)*(ae/2-Y)+(K-Y)*(K-Y)-Y*Y,Le=(-we+Math.sqrt(we*we-4*de*me))/(2*de)),Le=Math.min(1,Le),H?ve=Math.max(0,Y-Math.sqrt(Math.max(0,Y*Y-(Y-(K-Z.y*Le)/2)*(Y-(K-Z.y*Le)/2)))-re):ve=Math.max(0,Y-Math.sqrt(Math.max(0,Y*Y-(Y-(ae-Z.x*Le)/2)*(Y-(ae-Z.x*Le)/2)))-re),{scale:Le,pad:ve}}function z(j,$,q,oe,Z,G){var re=!!G.isHorizontal,H=!!G.constrained,J=G.angle||0,ae=Z.width,K=Z.height,Y=Math.abs($-j),ie=Math.abs(oe-q),ne;re?ne=ie>2*n?n:0:ne=Y>2*n?n:0;var le=1;H&&(le=re?Math.min(1,ie/K):Math.min(1,Y/ae));var de=k(J),we=I(Z,de),me=(re?we.x:we.y)/2,Le=(Z.left+Z.right)/2,ve=(Z.top+Z.bottom)/2,Ae=(j+$)/2,ye=(q+oe)/2,Se=0,_e=0,ze=re?E($,j):E(q,oe);return re?(Ae=$-ze*ne,Se=ze*me):(ye=oe+ze*ne,_e=-ze*me),{textX:Le,textY:ve,targetX:Ae,targetY:ye,anchorX:Se,anchorY:_e,scale:le,rotate:de}}function O(j,$,q,oe,Z){var G=$[0].trace,re=G.texttemplate,H;return re?H=N(j,$,q,oe,Z):G.textinfo?H=V($,q,oe,Z):H=u.getValue(G.text,q),u.coerceString(h,H)}function F(j,$){var q=u.getValue(j.textposition,$);return u.coerceEnumerated(T,q)}function N(j,$,q,oe,Z){var G=$[0].trace,re=o.castOption(G,q,"texttemplate");if(!re)return"";var H=G.type==="histogram",J=G.type==="waterfall",ae=G.type==="funnel",K=G.orientation==="h",Y,ie,ne,le;K?(Y="y",ie=Z,ne="x",le=oe):(Y="x",ie=oe,ne="y",le=Z);function de(Se){return r(ie,ie.c2l(Se),!0).text}function we(Se){return r(le,le.c2l(Se),!0).text}var me=$[q],Le={};Le.label=me.p,Le.labelLabel=Le[Y+"Label"]=de(me.p);var ve=o.castOption(G,me.i,"text");(ve===0||ve)&&(Le.text=ve),Le.value=me.s,Le.valueLabel=Le[ne+"Label"]=we(me.s);var Ae={};f(Ae,G,me.i),(H||Ae.x===void 0)&&(Ae.x=K?Le.value:Le.label),(H||Ae.y===void 0)&&(Ae.y=K?Le.label:Le.value),(H||Ae.xLabel===void 0)&&(Ae.xLabel=K?Le.valueLabel:Le.labelLabel),(H||Ae.yLabel===void 0)&&(Ae.yLabel=K?Le.labelLabel:Le.valueLabel),J&&(Le.delta=+me.rawS||me.s,Le.deltaLabel=we(Le.delta),Le.final=me.v,Le.finalLabel=we(Le.final),Le.initial=Le.final-Le.delta,Le.initialLabel=we(Le.initial)),ae&&(Le.value=me.s,Le.valueLabel=we(Le.value),Le.percentInitial=me.begR,Le.percentInitialLabel=o.formatPercent(me.begR),Le.percentPrevious=me.difR,Le.percentPreviousLabel=o.formatPercent(me.difR),Le.percentTotal=me.sumR,Le.percenTotalLabel=o.formatPercent(me.sumR));var ye=o.castOption(G,me.i,"customdata");return ye&&(Le.customdata=ye),o.texttemplateString(re,Le,j._d3locale,Ae,Le,G._meta||{})}function V(j,$,q,oe){var Z=j[0].trace,G=Z.orientation==="h",re=Z.type==="waterfall",H=Z.type==="funnel";function J(ye){var Se=G?oe:q;return r(Se,ye,!0).text}function ae(ye){var Se=G?q:oe;return r(Se,+ye,!0).text}var K=Z.textinfo,Y=j[$],ie=K.split("+"),ne=[],le,de=function(ye){return ie.indexOf(ye)!==-1};if(de("label")&&ne.push(J(j[$].p)),de("text")&&(le=o.castOption(Z,Y.i,"text"),(le===0||le)&&ne.push(le)),re){var we=+Y.rawS||Y.s,me=Y.v,Le=me-we;de("initial")&&ne.push(ae(Le)),de("delta")&&ne.push(ae(we)),de("final")&&ne.push(ae(me))}if(H){de("value")&&ne.push(ae(Y.s));var ve=0;de("percent initial")&&ve++,de("percent previous")&&ve++,de("percent total")&&ve++;var Ae=ve>1;de("percent initial")&&(le=o.formatPercent(Y.begR),Ae&&(le+=" of initial"),ne.push(le)),de("percent previous")&&(le=o.formatPercent(Y.difR),Ae&&(le+=" of previous"),ne.push(le)),de("percent total")&&(le=o.formatPercent(Y.sumR),Ae&&(le+=" of total"),ne.push(le))}return ne.join("<br>")}te.exports={plot:i,toMoveInsideBar:B}},45784:function(te){te.exports=function(A,P){var o=A.cd,L=A.xaxis,M=A.yaxis,d=o[0].trace,g=d.type==="funnel",r=d.orientation==="h",t=[],s;if(P===!1)for(s=0;s<o.length;s++)o[s].selected=0;else for(s=0;s<o.length;s++){var a=o[s],c="ct"in a?a.ct:X(a,L,M,r,g);P.contains(c,!1,s,A)?(t.push({pointNumber:s,x:L.c2d(a.x),y:M.c2d(a.y)}),a.selected=1):a.selected=0}return t};function X(e,A,P,o,L){var M=A.c2p(o?e.s0:e.p0,!0),d=A.c2p(o?e.s1:e.p1,!0),g=P.c2p(o?e.p0:e.s0,!0),r=P.c2p(o?e.p1:e.s1,!0);return L?[(M+d)/2,(g+r)/2]:o?[d,(g+r)/2]:[(M+d)/2,r]}},72592:function(te,X,e){te.exports=P;var A=e(3400).distinctVals;function P(o,L){this.traces=o,this.sepNegVal=L.sepNegVal,this.overlapNoMerge=L.overlapNoMerge;for(var M=1/0,d=L.posAxis._id.charAt(0),g=[],r=0;r<o.length;r++){for(var t=o[r],s=0;s<t.length;s++){var a=t[s],c=a.p;c===void 0&&(c=a[d]),c!==void 0&&g.push(c)}t[0]&&t[0].width1&&(M=Math.min(t[0].width1,M))}this.positions=g;var u=A(g);this.distinctPositions=u.vals,u.vals.length===1&&M!==1/0?this.minDiff=M:this.minDiff=Math.min(u.minDiff,M);var l=(L.posAxis||{}).type;(l==="category"||l==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}P.prototype.put=function(L,M){var d=this.getLabel(L,M),g=this.bins[d]||0;return this.bins[d]=g+M,g},P.prototype.get=function(L,M){var d=this.getLabel(L,M);return this.bins[d]||0},P.prototype.getLabel=function(L,M){var d=M<0&&this.sepNegVal?"v":"^",g=this.overlapNoMerge?L:Math.round(L/this.binWidth);return d+g}},60100:function(te,X,e){var A=e(33428),P=e(76308),o=e(43616),L=e(3400),M=e(24040),d=e(82744).resizeText,g=e(20832),r=g.textfont,t=g.insidetextfont,s=g.outsidetextfont,a=e(60444);function c(p){var S=A.select(p).selectAll("g.barlayer").selectAll("g.trace");d(p,S,"bar");var w=S.size(),i=p._fullLayout;S.style("opacity",function(C){return C[0].trace.opacity}).each(function(C){(i.barmode==="stack"&&w>1||i.bargap===0&&i.bargroupgap===0&&!C[0].trace.marker.line.width)&&A.select(this).attr("shape-rendering","crispEdges")}),S.selectAll("g.points").each(function(C){var x=A.select(this),k=C[0].trace;u(x,k,p)}),M.getComponentMethod("errorbars","style")(S)}function u(p,S,w){o.pointStyle(p.selectAll("path"),S,w),l(p,S,w)}function l(p,S,w){p.selectAll("text").each(function(i){var C=A.select(this),x=L.ensureUniformFontSize(w,f(C,i,S,w));o.font(C,x)})}function y(p,S,w){var i=S[0].trace;i.selectedpoints?h(w,i,p):(u(w,i,p),M.getComponentMethod("errorbars","style")(w))}function h(p,S,w){o.selectedPointStyle(p.selectAll("path"),S),T(p.selectAll("text"),S,w)}function T(p,S,w){p.each(function(i){var C=A.select(this),x;if(i.selected){x=L.ensureUniformFontSize(w,f(C,i,S,w));var k=S.selected.textfont&&S.selected.textfont.color;k&&(x.color=k),o.font(C,x)}else o.selectedTextStyle(C,S)})}function f(p,S,w,i){var C=i._fullLayout.font,x=w.textfont;if(p.classed("bartext-inside")){var k=E(S,w);x=v(w,S.i,C,k)}else p.classed("bartext-outside")&&(x=m(w,S.i,C));return x}function n(p,S,w){return b(r,p.textfont,S,w)}function v(p,S,w,i){var C=n(p,S,w),x=p._input.textfont===void 0||p._input.textfont.color===void 0||Array.isArray(p.textfont.color)&&p.textfont.color[S]===void 0;return x&&(C={color:P.contrast(i),family:C.family,size:C.size}),b(t,p.insidetextfont,S,C)}function m(p,S,w){var i=n(p,S,w);return b(s,p.outsidetextfont,S,i)}function b(p,S,w,i){S=S||{};var C=a.getValue(S.family,w),x=a.getValue(S.size,w),k=a.getValue(S.color,w);return{family:a.coerceString(p.family,C,i.family),size:a.coerceNumber(p.size,x,i.size),color:a.coerceColor(p.color,k,i.color)}}function E(p,S){return S.type==="waterfall"?S[p.dir].marker.color:p.mcc||p.mc||S.marker.color}te.exports={style:c,styleTextPoints:l,styleOnSelect:y,getInsideTextFont:v,getOutsideTextFont:m,getBarColor:E,resizeText:d}},55592:function(te,X,e){var A=e(76308),P=e(94288).hasColorscale,o=e(27260),L=e(3400).coercePattern;te.exports=function(d,g,r,t,s){var a=r("marker.color",t),c=P(d,"marker");c&&o(d,g,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",A.defaultLine),P(d,"marker.line")&&o(d,g,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),L(r,"marker.pattern",a,c),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(te,X,e){var A=e(33428),P=e(3400);function o(g,r,t){var s=g._fullLayout,a=s["_"+t+"Text_minsize"];if(a){var c=s.uniformtext.mode==="hide",u;switch(t){case"funnelarea":case"pie":case"sunburst":u="g.slice";break;case"treemap":case"icicle":u="g.slice, g.pathbar";break;default:u="g.points > g.point"}r.selectAll(u).each(function(l){var y=l.transform;if(y){y.scale=c&&y.hide?0:a/y.fontSize;var h=A.select(this).select("text");P.setTransormAndDisplay(h,y)}})}}function L(g,r,t){if(t.uniformtext.mode){var s=d(g),a=t.uniformtext.minsize,c=r.scale*r.fontSize;r.hide=c<a,t[s]=t[s]||1/0,r.hide||(t[s]=Math.min(t[s],Math.max(c,a)))}}function M(g,r){var t=d(g);r[t]=void 0}function d(g){return"_"+g+"Text_minsize"}te.exports={recordMinTextSize:L,clearMinTextSize:M,resizeText:o}},78100:function(te,X,e){var A=e(21776).Ks,P=e(92880).extendFlat,o=e(8319),L=e(20832);te.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:P({},L.base,{}),offset:P({},L.offset,{}),width:P({},L.width,{}),text:P({},L.text,{}),hovertext:P({},L.hovertext,{}),marker:M(),hoverinfo:o.hoverinfo,hovertemplate:A(),selected:L.selected,unselected:L.unselected};function M(){var d=P({},L.marker);return delete d.cornerradius,d}},47056:function(te,X,e){var A=e(94288).hasColorscale,P=e(47128),o=e(3400).isArrayOrTypedArray,L=e(84664),M=e(96376).setGroupPositions,d=e(4500),g=e(24040).traceIs,r=e(3400).extendFlat;function t(a,c){for(var u=a._fullLayout,l=c.subplot,y=u[l].radialaxis,h=u[l].angularaxis,T=y.makeCalcdata(c,"r"),f=h.makeCalcdata(c,"theta"),n=c._length,v=new Array(n),m=T,b=f,E=0;E<n;E++)v[E]={p:b[E],s:m[E]};function p(S){var w=c[S];w!==void 0&&(c["_"+S]=o(w)?h.makeCalcdata(c,S):h.d2c(w,c.thetaunit))}return h.type==="linear"&&(p("width"),p("offset")),A(c,"marker")&&P(a,c,{vals:c.marker.color,containerStr:"marker",cLetter:"c"}),A(c,"marker.line")&&P(a,c,{vals:c.marker.line.color,containerStr:"marker.line",cLetter:"c"}),L(v,c),d(v,c),v}function s(a,c,u){for(var l=a.calcdata,y=[],h=0;h<l.length;h++){var T=l[h],f=T[0].trace;f.visible===!0&&g(f,"bar")&&f.subplot===u&&y.push(T)}var n=r({},c.radialaxis,{_id:"x"}),v=c.angularaxis;M(a,v,n,y,{mode:c.barmode,norm:c.barnorm,gap:c.bargap,groupgap:c.bargroupgap})}te.exports={calc:t,crossTraceCalc:s}},70384:function(te,X,e){var A=e(3400),P=e(85968).handleRThetaDefaults,o=e(55592),L=e(78100);te.exports=function(d,g,r,t){function s(c,u){return A.coerce(d,g,L,c,u)}var a=P(d,g,t,s);if(!a){g.visible=!1;return}s("thetaunit"),s("base"),s("offset"),s("width"),s("text"),s("hovertext"),s("hovertemplate"),o(d,g,s,r,t),A.coerceSelectionMarkerOpacity(g,s)}},68896:function(te,X,e){var A=e(93024),P=e(3400),o=e(63400).getTraceColor,L=P.fillText,M=e(8504).makeHoverPointText,d=e(57384).isPtInsidePolygon;te.exports=function(r,t,s){var a=r.cd,c=a[0].trace,u=r.subplot,l=u.radialAxis,y=u.angularAxis,h=u.vangles,T=h?d:P.isPtInsideSector,f=r.maxHoverDistance,n=y._period||2*Math.PI,v=Math.abs(l.g2p(Math.sqrt(t*t+s*s))),m=Math.atan2(s,t);l.range[0]>l.range[1]&&(m+=Math.PI);var b=function(w){return T(v,m,[w.rp0,w.rp1],[w.thetag0,w.thetag1],h)?f+Math.min(1,Math.abs(w.thetag1-w.thetag0)/n)-1+(w.rp1-v)/(w.rp1-w.rp0)-1:1/0};if(A.getClosest(a,b,r),r.index!==!1){var E=r.index,p=a[E];r.x0=r.x1=p.ct[0],r.y0=r.y1=p.ct[1];var S=P.extendFlat({},p,{r:p.s,theta:p.p});return L(p,c,r),M(S,c,u,r),r.hovertemplate=c.hovertemplate,r.color=o(c,p),r.xLabelVal=r.yLabelVal=void 0,p.s<0&&(r.idealAlign="left"),[r]}}},94456:function(te,X,e){te.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(40872),categories:["polar","bar","showLegend"],attributes:e(78100),layoutAttributes:e(9320),supplyDefaults:e(70384),supplyLayoutDefaults:e(89580),calc:e(47056).calc,crossTraceCalc:e(47056).crossTraceCalc,plot:e(42040),colorbar:e(5528),formatLabels:e(22852),style:e(60100).style,styleOnSelect:e(60100).styleOnSelect,hoverPoints:e(68896),selectPoints:e(45784),meta:{}}},9320:function(te){te.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(te,X,e){var A=e(3400),P=e(9320);te.exports=function(o,L,M){var d={},g;function r(a,c){return A.coerce(o[g]||{},L[g],P,a,c)}for(var t=0;t<M.length;t++){var s=M[t];s.type==="barpolar"&&s.visible===!0&&(g=s.subplot,d[g]||(r("barmode"),r("bargap"),d[g]=1))}}},42040:function(te,X,e){var A=e(33428),P=e(38248),o=e(3400),L=e(43616),M=e(57384);te.exports=function(r,t,s){var a=r._context.staticPlot,c=t.xaxis,u=t.yaxis,l=t.radialAxis,y=t.angularAxis,h=d(t),T=t.layers.frontplot.select("g.barlayer");o.makeTraceGroups(T,s,"trace bars").each(function(){var f=A.select(this),n=o.ensureSingle(f,"g","points"),v=n.selectAll("g.point").data(o.identity);v.enter().append("g").style("vector-effect",a?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),v.exit().remove(),v.each(function(m){var b=A.select(this),E=m.rp0=l.c2p(m.s0),p=m.rp1=l.c2p(m.s1),S=m.thetag0=y.c2g(m.p0),w=m.thetag1=y.c2g(m.p1),i;if(!P(E)||!P(p)||!P(S)||!P(w)||E===p||S===w)i="M0,0Z";else{var C=l.c2g(m.s1),x=(S+w)/2;m.ct=[c.c2p(C*Math.cos(x)),u.c2p(C*Math.sin(x))],i=h(E,p,S,w)}o.ensureSingle(b,"path").attr("d",i)}),L.setClipUrl(f,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,r)})};function d(g){var r=g.cxx,t=g.cyy;return g.vangles?function(s,a,c,u){var l,y;o.angleDelta(c,u)>0?(l=c,y=u):(l=u,y=c);var h=M.findEnclosingVertexAngles(l,g.vangles)[0],T=M.findEnclosingVertexAngles(y,g.vangles)[1],f=[h,(l+y)/2,T];return M.pathPolygonAnnulus(s,a,l,y,f,r,t)}:function(s,a,c,u){return o.pathAnnulus(s,a,c,u,r,t)}}},63188:function(te,X,e){var A=e(98304),P=e(52904),o=e(20832),L=e(22548),M=e(29736).axisHoverFormat,d=e(21776).Ks,g=e(92880).extendFlat,r=P.marker,t=r.line;te.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:P.xperiod,yperiod:P.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:P.xperiodalignment,yperiodalignment:P.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("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"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},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:g({},r.symbol,{arrayOk:!1,editType:"plot"}),opacity:g({},r.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:g({},r.angle,{arrayOk:!1,editType:"calc"}),size:g({},r.size,{arrayOk:!1,editType:"calc"}),color:g({},r.color,{arrayOk:!1,editType:"style"}),line:{color:g({},t.color,{arrayOk:!1,dflt:L.defaultLine,editType:"style"}),width:g({},t.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:A(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:o.offsetgroup,alignmentgroup:o.alignmentgroup,selected:{marker:P.selected.marker,editType:"style"},unselected:{marker:P.unselected.marker,editType:"style"},text:g({},P.text,{}),hovertext:g({},P.hovertext,{}),hovertemplate:d({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},62555:function(te,X,e){var A=e(38248),P=e(54460),o=e(1220),L=e(3400),M=e(39032).BADNUM,d=L._;te.exports=function(m,b){var E=m._fullLayout,p=P.getFromId(m,b.xaxis||"x"),S=P.getFromId(m,b.yaxis||"y"),w=[],i=b.type==="violin"?"_numViolins":"_numBoxes",C,x,k,I,B,_,z;b.orientation==="h"?(k=p,I="x",B=S,_="y",z=!!b.yperiodalignment):(k=S,I="y",B=p,_="x",z=!!b.xperiodalignment);var O=g(b,_,B,E[i]),F=O[0],N=O[1],V=L.distinctVals(F,B),j=V.vals,$=V.minDiff/2,q,oe,Z,G,re,H,J=(b.boxpoints||b.points)==="all"?L.identity:function(xt){return xt.v<q.lf||xt.v>q.uf};if(b._hasPreCompStats){var ae=b[I],K=function(xt){return k.d2c((b[xt]||[])[C])},Y=1/0,ie=-1/0;for(C=0;C<b._length;C++){var ne=F[C];if(A(ne)){if(q={},q.pos=q[_]=ne,z&&N&&(q.orig_p=N[C]),q.q1=K("q1"),q.med=K("median"),q.q3=K("q3"),oe=[],ae&&L.isArrayOrTypedArray(ae[C]))for(x=0;x<ae[C].length;x++)H=k.d2c(ae[C][x]),H!==M&&(re={v:H,i:[C,x]},a(re,b,[C,x]),oe.push(re));if(q.pts=oe.sort(u),Z=q[I]=oe.map(l),G=Z.length,q.med!==M&&q.q1!==M&&q.q3!==M&&q.med>=q.q1&&q.q3>=q.med){var le=K("lowerfence");q.lf=le!==M&&le<=q.q1?le:y(q,Z,G);var de=K("upperfence");q.uf=de!==M&&de>=q.q3?de:h(q,Z,G);var we=K("mean");q.mean=we!==M?we:G?L.mean(Z,G):(q.q1+q.q3)/2;var me=K("sd");q.sd=we!==M&&me>=0?me:G?L.stdev(Z,G,q.mean):q.q3-q.q1,q.lo=T(q),q.uo=f(q);var Le=K("notchspan");Le=Le!==M&&Le>0?Le:n(q,G),q.ln=q.med-Le,q.un=q.med+Le;var ve=q.lf,Ae=q.uf;b.boxpoints&&Z.length&&(ve=Math.min(ve,Z[0]),Ae=Math.max(Ae,Z[G-1])),b.notched&&(ve=Math.min(ve,q.ln),Ae=Math.max(Ae,q.un)),q.min=ve,q.max=Ae}else{L.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+q.q1,"median = "+q.med,"q3 = "+q.q3].join(`
`));var ye;q.med!==M?ye=q.med:q.q1!==M?q.q3!==M?ye=(q.q1+q.q3)/2:ye=q.q1:q.q3!==M?ye=q.q3:ye=0,q.med=ye,q.q1=q.q3=ye,q.lf=q.uf=ye,q.mean=q.sd=ye,q.ln=q.un=ye,q.min=q.max=ye}Y=Math.min(Y,q.min),ie=Math.max(ie,q.max),q.pts2=oe.filter(J),w.push(q)}}b._extremes[k._id]=P.findExtremes(k,[Y,ie],{padded:!0})}else{var Se=k.makeCalcdata(b,I),_e=r(j,$),ze=j.length,Ie=t(ze);for(C=0;C<b._length;C++)if(H=Se[C],!!A(H)){var Ne=L.findBin(F[C],_e);Ne>=0&&Ne<ze&&(re={v:H,i:C},a(re,b,C),Ie[Ne].push(re))}var et=1/0,st=-1/0,Ze=b.quartilemethod,Ke=Ze==="exclusive",nt=Ze==="inclusive";for(C=0;C<ze;C++)if(Ie[C].length>0){if(q={},q.pos=q[_]=j[C],oe=q.pts=Ie[C].sort(u),Z=q[I]=oe.map(l),G=Z.length,q.min=Z[0],q.max=Z[G-1],q.mean=L.mean(Z,G),q.sd=L.stdev(Z,G,q.mean)*b.sdmultiple,q.med=L.interp(Z,.5),G%2&&(Ke||nt)){var it,lt;Ke?(it=Z.slice(0,G/2),lt=Z.slice(G/2+1)):nt&&(it=Z.slice(0,G/2+1),lt=Z.slice(G/2)),q.q1=L.interp(it,.5),q.q3=L.interp(lt,.5)}else q.q1=L.interp(Z,.25),q.q3=L.interp(Z,.75);q.lf=y(q,Z,G),q.uf=h(q,Z,G),q.lo=T(q),q.uo=f(q);var vt=n(q,G);q.ln=q.med-vt,q.un=q.med+vt,et=Math.min(et,q.ln),st=Math.max(st,q.un),q.pts2=oe.filter(J),w.push(q)}b.notched&&L.isTypedArray(Se)&&(Se=Array.from(Se)),b._extremes[k._id]=P.findExtremes(k,b.notched?Se.concat([et,st]):Se,{padded:!0})}return c(w,b),w.length>0?(w[0].t={num:E[i],dPos:$,posLetter:_,valLetter:I,labels:{med:d(m,"median:"),min:d(m,"min:"),q1:d(m,"q1:"),q3:d(m,"q3:"),max:d(m,"max:"),mean:b.boxmean==="sd"||b.sizemode==="sd"?d(m,"mean ± σ:").replace("σ",b.sdmultiple===1?"σ":b.sdmultiple+"σ"):d(m,"mean:"),lf:d(m,"lower fence:"),uf:d(m,"upper fence:")}},E[i]++,w):[{t:{empty:!0}}]};function g(v,m,b,E){var p=m in v,S=m+"0"in v,w="d"+m in v;if(p||S&&w){var i=b.makeCalcdata(v,m),C=o(v,b,m,i).vals;return[C,i]}var x;S?x=v[m+"0"]:"name"in v&&(b.type==="category"||A(v.name)&&["linear","log"].indexOf(b.type)!==-1||L.isDateTime(v.name)&&b.type==="date")?x=v.name:x=E;for(var k=b.type==="multicategory"?b.r2c_just_indices(x):b.d2c(x,0,v[m+"calendar"]),I=v._length,B=new Array(I),_=0;_<I;_++)B[_]=k;return[B]}function r(v,m){for(var b=v.length,E=new Array(b+1),p=0;p<b;p++)E[p]=v[p]-m;return E[b]=v[b-1]+m,E}function t(v){for(var m=new Array(v),b=0;b<v;b++)m[b]=[];return m}var s={text:"tx",hovertext:"htx"};function a(v,m,b){for(var E in s)L.isArrayOrTypedArray(m[E])&&(Array.isArray(b)?L.isArrayOrTypedArray(m[E][b[0]])&&(v[s[E]]=m[E][b[0]][b[1]]):v[s[E]]=m[E][b])}function c(v,m){if(L.isArrayOrTypedArray(m.selectedpoints))for(var b=0;b<v.length;b++){for(var E=v[b].pts||[],p={},S=0;S<E.length;S++)p[E[S].i]=S;L.tagSelected(E,m,p)}}function u(v,m){return v.v-m.v}function l(v){return v.v}function y(v,m,b){return b===0?v.q1:Math.min(v.q1,m[Math.min(L.findBin(2.5*v.q1-1.5*v.q3,m,!0)+1,b-1)])}function h(v,m,b){return b===0?v.q3:Math.max(v.q3,m[Math.max(L.findBin(2.5*v.q3-1.5*v.q1,m),0)])}function T(v){return 4*v.q1-3*v.q3}function f(v){return 4*v.q3-3*v.q1}function n(v,m){return m===0?0:1.57*(v.q3-v.q1)/Math.sqrt(m)}},96404:function(te,X,e){var A=e(54460),P=e(3400),o=e(71888).getAxisGroup,L=["v","h"];function M(g,r){for(var t=g.calcdata,s=r.xaxis,a=r.yaxis,c=0;c<L.length;c++){for(var u=L[c],l=u==="h"?a:s,y=[],h=0;h<t.length;h++){var T=t[h],f=T[0].t,n=T[0].trace;n.visible===!0&&(n.type==="box"||n.type==="candlestick")&&!f.empty&&(n.orientation||"v")===u&&n.xaxis===s._id&&n.yaxis===a._id&&y.push(h)}d("box",g,y,l)}}function d(g,r,t,s){var a=r.calcdata,c=r._fullLayout,u=s._id,l=u.charAt(0),y,h,T,f=[],n=0;for(y=0;y<t.length;y++)for(T=a[t[y]],h=0;h<T.length;h++)f.push(s.c2l(T[h].pos,!0)),n+=(T[h].pts2||[]).length;if(f.length){var v=P.distinctVals(f);(s.type==="category"||s.type==="multicategory")&&(v.minDiff=1);var m=v.minDiff/2;A.minDtick(s,v.minDiff,v.vals[0],!0);var b=g==="violin"?"_numViolins":"_numBoxes",E=c[b],p=c[g+"mode"]==="group"&&E>1,S=1-c[g+"gap"],w=1-c[g+"groupgap"];for(y=0;y<t.length;y++){T=a[t[y]];var i=T[0].trace,C=T[0].t,x=i.width,k=i.side,I,B,_,z;if(x)I=B=z=x/2,_=0;else if(I=m,p){var O=o(c,s._id)+i.orientation,F=c._alignmentOpts[O]||{},N=F[i.alignmentgroup]||{},V=Object.keys(N.offsetGroups||{}).length,j=V||E,$=V?i._offsetIndex:C.num;B=I*S*w/j,_=2*I*(-.5+($+.5)/j)*S,z=I*S/j}else B=I*S*w,_=0,z=I;C.dPos=I,C.bPos=_,C.bdPos=B,C.wHover=z;var q,oe,Z=_+B,G,re,H,J,ae,K,Y=!!x,ie=(i.boxpoints||i.points)&&n>0;if(k==="positive"?(q=I*(x?1:.5),G=Z,oe=G=_):k==="negative"?(q=G=_,oe=I*(x?1:.5),re=Z):(q=oe=I,G=re=Z),ie){var ne=i.pointpos,le=i.jitter,de=i.marker.size/2,we=0;ne+le>=0&&(we=Z*(ne+le),we>q?(Y=!0,ae=de,H=we):we>G&&(ae=de,H=q)),we<=q&&(H=q);var me=0;ne-le<=0&&(me=-Z*(ne-le),me>oe?(Y=!0,K=de,J=me):me>re&&(K=de,J=oe)),me<=oe&&(J=oe)}else H=q,J=oe;var Le=new Array(T.length);for(h=0;h<T.length;h++)Le[h]=T[h].pos;i._extremes[u]=A.findExtremes(s,Le,{padded:Y,vpadminus:J,vpadplus:H,vpadLinearized:!0,ppadminus:{x:K,y:ae}[l],ppadplus:{x:ae,y:K}[l]})}}}te.exports={crossTraceCalc:M,setPositionOffset:d}},90624:function(te,X,e){var A=e(3400),P=e(24040),o=e(76308),L=e(31147),M=e(20011),d=e(52976),g=e(63188);function r(c,u,l,y){function h(w,i){return A.coerce(c,u,g,w,i)}if(t(c,u,h,y),u.visible!==!1){L(c,u,y,h),h("xhoverformat"),h("yhoverformat");var T=u._hasPreCompStats;T&&(h("lowerfence"),h("upperfence")),h("line.color",(c.marker||{}).color||l),h("line.width"),h("fillcolor",o.addOpacity(u.line.color,.5));var f=!1;if(T){var n=h("mean"),v=h("sd");n&&n.length&&(f=!0,v&&v.length&&(f="sd"))}h("whiskerwidth");var m=h("sizemode"),b;m==="quartiles"&&(b=h("boxmean",f)),h("showwhiskers",m==="quartiles"),(m==="sd"||b==="sd")&&h("sdmultiple"),h("width"),h("quartilemethod");var E=!1;if(T){var p=h("notchspan");p&&p.length&&(E=!0)}else A.validate(c.notchwidth,g.notchwidth)&&(E=!0);var S=h("notched",E);S&&h("notchwidth"),s(c,u,h,{prefix:"box"})}}function t(c,u,l,y){function h(V){var j=0;return V&&V.length&&(j+=1,A.isArrayOrTypedArray(V[0])&&V[0].length&&(j+=1)),j}function T(V){return A.validate(c[V],g[V])}var f=l("y"),n=l("x"),v;if(u.type==="box"){var m=l("q1"),b=l("median"),E=l("q3");u._hasPreCompStats=m&&m.length&&b&&b.length&&E&&E.length,v=Math.min(A.minRowLength(m),A.minRowLength(b),A.minRowLength(E))}var p=h(f),S=h(n),w=p&&A.minRowLength(f),i=S&&A.minRowLength(n),C=y.calendar,x={autotypenumbers:y.autotypenumbers},k,I;if(u._hasPreCompStats)switch(String(S)+String(p)){case"00":var B=T("x0")||T("dx"),_=T("y0")||T("dy");_&&!B?k="h":k="v",I=v;break;case"10":k="v",I=Math.min(v,i);break;case"20":k="h",I=Math.min(v,n.length);break;case"01":k="h",I=Math.min(v,w);break;case"02":k="v",I=Math.min(v,f.length);break;case"12":k="v",I=Math.min(v,i,f.length);break;case"21":k="h",I=Math.min(v,n.length,w);break;case"11":I=0;break;case"22":var z=!1,O;for(O=0;O<n.length;O++)if(d(n[O],C,x)==="category"){z=!0;break}if(z)k="v",I=Math.min(v,i,f.length);else{for(O=0;O<f.length;O++)if(d(f[O],C,x)==="category"){z=!0;break}z?(k="h",I=Math.min(v,n.length,w)):(k="v",I=Math.min(v,i,f.length))}break}else p>0?(k="v",S>0?I=Math.min(i,w):I=Math.min(w)):S>0?(k="h",I=Math.min(i)):I=0;if(!I){u.visible=!1;return}u._length=I;var F=l("orientation",k);u._hasPreCompStats?F==="v"&&S===0?(l("x0",0),l("dx",1)):F==="h"&&p===0&&(l("y0",0),l("dy",1)):F==="v"&&S===0?l("x0"):F==="h"&&p===0&&l("y0");var N=P.getComponentMethod("calendars","handleTraceDefaults");N(c,u,["x","y"],y)}function s(c,u,l,y){var h=y.prefix,T=A.coerce2(c,u,g,"marker.outliercolor"),f=l("marker.line.outliercolor"),n="outliers";u._hasPreCompStats?n="all":(T||f)&&(n="suspectedoutliers");var v=l(h+"points",n);v?(l("jitter",v==="all"?.3:0),l("pointpos",v==="all"?-1.5:0),l("marker.symbol"),l("marker.opacity"),l("marker.size"),l("marker.angle"),l("marker.color",u.line.color),l("marker.line.color"),l("marker.line.width"),v==="suspectedoutliers"&&(l("marker.line.outliercolor",u.marker.color),l("marker.line.outlierwidth")),l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size"),l("text"),l("hovertext")):delete u.marker;var m=l("hoveron");(m==="all"||m.indexOf("points")!==-1)&&l("hovertemplate"),A.coerceSelectionMarkerOpacity(u,l)}function a(c,u){var l,y;function h(n){return A.coerce(y._input,y,g,n)}for(var T=0;T<c.length;T++){y=c[T];var f=y.type;(f==="box"||f==="violin")&&(l=y._input,u[f+"mode"]==="group"&&M(l,y,u,h))}}te.exports={supplyDefaults:r,crossTraceDefaults:a,handleSampleDefaults:t,handlePointsDefaults:s}},10392:function(te){te.exports=function(e,A){return A.hoverOnBox&&(e.hoverOnBox=A.hoverOnBox),"xVal"in A&&(e.x=A.xVal),"yVal"in A&&(e.y=A.yVal),A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),e}},27576:function(te,X,e){var A=e(54460),P=e(3400),o=e(93024),L=e(76308),M=P.fillText;function d(t,s,a,c){var u=t.cd,l=u[0].trace,y=l.hoveron,h=[],T;return y.indexOf("boxes")!==-1&&(h=h.concat(g(t,s,a,c))),y.indexOf("points")!==-1&&(T=r(t,s,a)),c==="closest"?T?[T]:h:(T&&h.push(T),h)}function g(t,s,a,c){var u=t.cd,l=t.xa,y=t.ya,h=u[0].trace,T=u[0].t,f=h.type==="violin",n,v,m,b,E,p,S,w,i,C,x,k=T.bdPos,I,B,_=T.wHover,z=function(me){return m.c2l(me.pos)+T.bPos-m.c2l(p)};f&&h.side!=="both"?(h.side==="positive"&&(i=function(me){var Le=z(me);return o.inbox(Le,Le+_,C)},I=k,B=0),h.side==="negative"&&(i=function(me){var Le=z(me);return o.inbox(Le-_,Le,C)},I=0,B=k)):(i=function(me){var Le=z(me);return o.inbox(Le-_,Le+_,C)},I=B=k);var O;f?O=function(me){return o.inbox(me.span[0]-E,me.span[1]-E,C)}:O=function(me){return o.inbox(me.min-E,me.max-E,C)},h.orientation==="h"?(E=s,p=a,S=O,w=i,n="y",m=y,v="x",b=l):(E=a,p=s,S=i,w=O,n="x",m=l,v="y",b=y);var F=Math.min(1,k/Math.abs(m.r2c(m.range[1])-m.r2c(m.range[0])));C=t.maxHoverDistance-F,x=t.maxSpikeDistance-F;function N(me){return(S(me)+w(me))/2}var V=o.getDistanceFunction(c,S,w,N);if(o.getClosest(u,V,t),t.index===!1)return[];var j=u[t.index],$=h.line.color,q=(h.marker||{}).color;L.opacity($)&&h.line.width?t.color=$:L.opacity(q)&&h.boxpoints?t.color=q:t.color=h.fillcolor,t[n+"0"]=m.c2p(j.pos+T.bPos-B,!0),t[n+"1"]=m.c2p(j.pos+T.bPos+I,!0),t[n+"LabelVal"]=j.orig_p!==void 0?j.orig_p:j.pos;var oe=n+"Spike";t.spikeDistance=N(j)*x/C,t[oe]=m.c2p(j.pos,!0);var Z=h.boxmean||h.sizemode==="sd"||(h.meanline||{}).visible,G=h.boxpoints||h.points,re=G&&Z?["max","uf","q3","med","mean","q1","lf","min"]:G&&!Z?["max","uf","q3","med","q1","lf","min"]:!G&&Z?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=b.range[1]<b.range[0];h.orientation===(H?"v":"h")&&re.reverse();for(var J=t.spikeDistance,ae=t[oe],K=[],Y=0;Y<re.length;Y++){var ie=re[Y];if(ie in j){var ne=j[ie],le=b.c2p(ne,!0),de=P.extendFlat({},t);de.attr=ie,de[v+"0"]=de[v+"1"]=le,de[v+"LabelVal"]=ne,de[v+"Label"]=(T.labels?T.labels[ie]+" ":"")+A.hoverLabelText(b,ne,h[v+"hoverformat"]),de.hoverOnBox=!0,ie==="mean"&&"sd"in j&&(h.boxmean==="sd"||h.sizemode==="sd")&&(de[v+"err"]=j.sd),de.hovertemplate=!1,K.push(de)}}t.name="",t.spikeDistance=void 0,t[oe]=void 0;for(var we=0;we<K.length;we++)K[we].attr!=="med"?(K[we].name="",K[we].spikeDistance=void 0,K[we][oe]=void 0):(K[we].spikeDistance=J,K[we][oe]=ae);return K}function r(t,s,a){for(var c=t.cd,u=t.xa,l=t.ya,y=c[0].trace,h=u.c2p(s),T=l.c2p(a),f,n=function(O){var F=Math.max(3,O.mrc||0);return Math.max(Math.abs(u.c2p(O.x)-h)-F,1-3/F)},v=function(O){var F=Math.max(3,O.mrc||0);return Math.max(Math.abs(l.c2p(O.y)-T)-F,1-3/F)},m=o.quadrature(n,v),b=!1,E,p,S=0;S<c.length;S++){E=c[S];for(var w=0;w<(E.pts||[]).length;w++){p=E.pts[w];var i=m(p);i<=t.distance&&(t.distance=i,b=[S,w])}}if(!b)return!1;E=c[b[0]],p=E.pts[b[1]];var C=u.c2p(p.x,!0),x=l.c2p(p.y,!0),k=p.mrc||1;f=P.extendFlat({},t,{index:p.i,color:(y.marker||{}).color,name:y.name,x0:C-k,x1:C+k,y0:x-k,y1:x+k,spikeDistance:t.distance,hovertemplate:y.hovertemplate});var I=E.orig_p,B=I!==void 0?I:E.pos,_;y.orientation==="h"?(_=l,f.xLabelVal=p.x,f.yLabelVal=B):(_=u,f.xLabelVal=B,f.yLabelVal=p.y);var z=_._id.charAt(0);return f[z+"Spike"]=_.c2p(E.pos,!0),M(p,y,f),f}te.exports={hoverPoints:d,hoverOnBoxes:g,hoverOnPoints:r}},67244:function(te,X,e){te.exports={attributes:e(63188),layoutAttributes:e(16560),supplyDefaults:e(90624).supplyDefaults,crossTraceDefaults:e(90624).crossTraceDefaults,supplyLayoutDefaults:e(68832).supplyLayoutDefaults,calc:e(62555),crossTraceCalc:e(96404).crossTraceCalc,plot:e(18728).plot,style:e(25776).style,styleOnSelect:e(25776).styleOnSelect,hoverPoints:e(27576).hoverPoints,eventData:e(10392),selectPoints:e(8264),moduleType:"trace",name:"box",basePlotModule:e(57952),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},16560:function(te){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"}}},68832:function(te,X,e){var A=e(24040),P=e(3400),o=e(16560);function L(d,g,r,t,s){for(var a=s+"Layout",c=!1,u=0;u<r.length;u++){var l=r[u];if(A.traceIs(l,a)){c=!0;break}}c&&(t(s+"mode"),t(s+"gap"),t(s+"groupgap"))}function M(d,g,r){function t(s,a){return P.coerce(d,g,o,s,a)}L(d,g,r,t,"box")}te.exports={supplyLayoutDefaults:M,_supply:L}},18728:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=5,M=.01;function d(s,a,c,u){var l=s._context.staticPlot,y=a.xaxis,h=a.yaxis;P.makeTraceGroups(u,c,"trace boxes").each(function(T){var f=A.select(this),n=T[0],v=n.t,m=n.trace;if(v.wdPos=v.bdPos*m.whiskerwidth,m.visible!==!0||v.empty){f.remove();return}var b,E;m.orientation==="h"?(b=h,E=y):(b=y,E=h),g(f,{pos:b,val:E},m,v,l),r(f,{x:y,y:h},m,v),t(f,{pos:b,val:E},m,v)})}function g(s,a,c,u,l){var y=c.orientation==="h",h=a.val,T=a.pos,f=!!T.rangebreaks,n=u.bPos,v=u.wdPos||0,m=u.bPosPxOffset||0,b=c.whiskerwidth||0,E=c.showwhiskers!==!1,p=c.notched||!1,S=p?1-2*c.notchwidth:1,w,i;Array.isArray(u.bdPos)?(w=u.bdPos[0],i=u.bdPos[1]):(w=u.bdPos,i=u.bdPos);var C=s.selectAll("path.box").data(c.type!=="violin"||c.box.visible?P.identity:[]);C.enter().append("path").style("vector-effect",l?"none":"non-scaling-stroke").attr("class","box"),C.exit().remove(),C.each(function(x){if(x.empty)return A.select(this).attr("d","M0,0Z");var k=T.c2l(x.pos+n,!0),I=T.l2p(k-w)+m,B=T.l2p(k+i)+m,_=f?(I+B)/2:T.l2p(k)+m,z=c.whiskerwidth,O=f?I*z+(1-z)*_:T.l2p(k-v)+m,F=f?B*z+(1-z)*_:T.l2p(k+v)+m,N=T.l2p(k-w*S)+m,V=T.l2p(k+i*S)+m,j=c.sizemode==="sd",$=h.c2p(j?x.mean-x.sd:x.q1,!0),q=j?h.c2p(x.mean+x.sd,!0):h.c2p(x.q3,!0),oe=P.constrain(j?h.c2p(x.mean,!0):h.c2p(x.med,!0),Math.min($,q)+1,Math.max($,q)-1),Z=x.lf===void 0||c.boxpoints===!1||j,G=h.c2p(Z?x.min:x.lf,!0),re=h.c2p(Z?x.max:x.uf,!0),H=h.c2p(x.ln,!0),J=h.c2p(x.un,!0);y?A.select(this).attr("d","M"+oe+","+N+"V"+V+"M"+$+","+I+"V"+B+(p?"H"+H+"L"+oe+","+V+"L"+J+","+B:"")+"H"+q+"V"+I+(p?"H"+J+"L"+oe+","+N+"L"+H+","+I:"")+"Z"+(E?"M"+$+","+_+"H"+G+"M"+q+","+_+"H"+re+(b===0?"":"M"+G+","+O+"V"+F+"M"+re+","+O+"V"+F):"")):A.select(this).attr("d","M"+N+","+oe+"H"+V+"M"+I+","+$+"H"+B+(p?"V"+H+"L"+V+","+oe+"L"+B+","+J:"")+"V"+q+"H"+I+(p?"V"+J+"L"+N+","+oe+"L"+I+","+H:"")+"Z"+(E?"M"+_+","+$+"V"+G+"M"+_+","+q+"V"+re+(b===0?"":"M"+O+","+G+"H"+F+"M"+O+","+re+"H"+F):""))})}function r(s,a,c,u){var l=a.x,y=a.y,h=u.bdPos,T=u.bPos,f=c.boxpoints||c.points;P.seedPseudoRandom();var n=function(b){return b.forEach(function(E){E.t=u,E.trace=c}),b},v=s.selectAll("g.points").data(f?n:[]);v.enter().append("g").attr("class","points"),v.exit().remove();var m=v.selectAll("path").data(function(b){var E,p=b.pts2,S=Math.max((b.max-b.min)/10,b.q3-b.q1),w=S*1e-9,i=S*M,C=[],x=0,k;if(c.jitter){if(S===0)for(x=1,C=new Array(p.length),E=0;E<p.length;E++)C[E]=1;else for(E=0;E<p.length;E++){var I=Math.max(0,E-L),B=p[I].v,_=Math.min(p.length-1,E+L),z=p[_].v;f!=="all"&&(p[E].v<b.lf?z=Math.min(z,b.lf):B=Math.max(B,b.uf));var O=Math.sqrt(i*(_-I)/(z-B+w))||0;O=P.constrain(Math.abs(O),0,1),C.push(O),x=Math.max(O,x)}k=c.jitter*2/(x||1)}for(E=0;E<p.length;E++){var F=p[E],N=F.v,V=c.jitter?k*C[E]*(P.pseudoRandom()-.5):0,j=b.pos+T+h*(c.pointpos+V);c.orientation==="h"?(F.y=j,F.x=N):(F.x=j,F.y=N),f==="suspectedoutliers"&&N<b.uo&&N>b.lo&&(F.so=!0)}return p});m.enter().append("path").classed("point",!0),m.exit().remove(),m.call(o.translatePoints,l,y)}function t(s,a,c,u){var l=a.val,y=a.pos,h=!!y.rangebreaks,T=u.bPos,f=u.bPosPxOffset||0,n=c.boxmean||(c.meanline||{}).visible,v,m;Array.isArray(u.bdPos)?(v=u.bdPos[0],m=u.bdPos[1]):(v=u.bdPos,m=u.bdPos);var b=s.selectAll("path.mean").data(c.type==="box"&&c.boxmean||c.type==="violin"&&c.box.visible&&c.meanline.visible?P.identity:[]);b.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),b.exit().remove(),b.each(function(E){var p=y.c2l(E.pos+T,!0),S=y.l2p(p-v)+f,w=y.l2p(p+m)+f,i=h?(S+w)/2:y.l2p(p)+f,C=l.c2p(E.mean,!0),x=l.c2p(E.mean-E.sd,!0),k=l.c2p(E.mean+E.sd,!0);c.orientation==="h"?A.select(this).attr("d","M"+C+","+S+"V"+w+(n==="sd"?"m0,0L"+x+","+i+"L"+C+","+S+"L"+k+","+i+"Z":"")):A.select(this).attr("d","M"+S+","+C+"H"+w+(n==="sd"?"m0,0L"+i+","+x+"L"+S+","+C+"L"+i+","+k+"Z":""))})}te.exports={plot:d,plotBoxAndWhiskers:g,plotPoints:r,plotBoxMean:t}},8264:function(te){te.exports=function(e,A){var P=e.cd,o=e.xaxis,L=e.yaxis,M=[],d,g;if(A===!1)for(d=0;d<P.length;d++)for(g=0;g<(P[d].pts||[]).length;g++)P[d].pts[g].selected=0;else for(d=0;d<P.length;d++)for(g=0;g<(P[d].pts||[]).length;g++){var r=P[d].pts[g],t=o.c2p(r.x),s=L.c2p(r.y);A.contains([t,s],null,r.i,e)?(M.push({pointNumber:r.i,x:o.c2d(r.x),y:L.c2d(r.y)}),r.selected=1):r.selected=0}return M}},25776:function(te,X,e){var A=e(33428),P=e(76308),o=e(43616);function L(d,g,r){var t=r||A.select(d).selectAll("g.trace.boxes");t.style("opacity",function(s){return s[0].trace.opacity}),t.each(function(s){var a=A.select(this),c=s[0].trace,u=c.line.width;function l(T,f,n,v){T.style("stroke-width",f+"px").call(P.stroke,n).call(P.fill,v)}var y=a.selectAll("path.box");if(c.type==="candlestick")y.each(function(T){if(!T.empty){var f=A.select(this),n=c[T.dir];l(f,n.line.width,n.line.color,n.fillcolor),f.style("opacity",c.selectedpoints&&!T.selected?.3:1)}});else{l(y,u,c.line.color,c.fillcolor),a.selectAll("path.mean").style({"stroke-width":u,"stroke-dasharray":2*u+"px,"+u+"px"}).call(P.stroke,c.line.color);var h=a.selectAll("path.point");o.pointStyle(h,c,d)}})}function M(d,g,r){var t=g[0].trace,s=r.selectAll("path.point");t.selectedpoints?o.selectedPointStyle(s,t):o.pointStyle(s,t,d)}te.exports={style:L,styleOnSelect:M}},64216:function(te,X,e){var A=e(3400).extendFlat,P=e(29736).axisHoverFormat,o=e(20279),L=e(63188);function M(d){return{line:{color:A({},L.line.color,{dflt:d}),width:L.line.width,editType:"style"},fillcolor:L.fillcolor,editType:"style"}}te.exports={xperiod:o.xperiod,xperiod0:o.xperiod0,xperiodalignment:o.xperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),x:o.x,open:o.open,high:o.high,low:o.low,close:o.close,line:{width:A({},L.line.width,{}),editType:"style"},increasing:M(o.increasing.line.color.dflt),decreasing:M(o.decreasing.line.color.dflt),text:o.text,hovertext:o.hovertext,whiskerwidth:A({},L.whiskerwidth,{dflt:0}),hoverlabel:o.hoverlabel}},46283:function(te,X,e){var A=e(3400),P=e(54460),o=e(1220),L=e(42812).calcCommon;te.exports=function(d,g){var r=d._fullLayout,t=P.getFromId(d,g.xaxis),s=P.getFromId(d,g.yaxis),a=t.makeCalcdata(g,"x"),c=o(g,t,"x",a).vals,u=L(d,g,a,c,s,M);return u.length?(A.extendFlat(u[0].t,{num:r._numBoxes,dPos:A.distinctVals(c).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,u):[{t:{empty:!0}}]};function M(d,g,r,t){return{min:r,q1:Math.min(d,t),med:t,q3:Math.max(d,t),max:g}}},64588:function(te,X,e){var A=e(3400),P=e(76308),o=e(52744),L=e(31147),M=e(64216);te.exports=function(r,t,s,a){function c(l,y){return A.coerce(r,t,M,l,y)}var u=o(r,t,c,a);if(!u){t.visible=!1;return}L(r,t,a,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),d(r,t,c,"increasing"),d(r,t,c,"decreasing"),c("text"),c("hovertext"),c("whiskerwidth"),a._requestRangeslider[t.xaxis]=!0};function d(g,r,t,s){var a=t(s+".line.color");t(s+".line.width",r.line.width),t(s+".fillcolor",P.addOpacity(a,.5))}},61712:function(te,X,e){te.exports={moduleType:"trace",name:"candlestick",basePlotModule:e(57952),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:e(64216),layoutAttributes:e(16560),supplyLayoutDefaults:e(68832).supplyLayoutDefaults,crossTraceCalc:e(96404).crossTraceCalc,supplyDefaults:e(64588),calc:e(46283),plot:e(18728).plot,layerName:"boxlayer",style:e(25776).style,hoverPoints:e(18720).hoverPoints,selectPoints:e(97384)}},93504:function(te,X,e){var A=e(63856),P=e(31780);te.exports=function(M,d,g,r,t){var s=r("a");s||(r("da"),r("a0"));var a=r("b");a||(r("db"),r("b0")),o(M,d,g,t)};function o(L,M,d,g){var r=["aaxis","baxis"];r.forEach(function(t){var s=t.charAt(0),a=L[t]||{},c=P.newContainer(M,t),u={noAutotickangles:!0,noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:M.font,name:t,data:L[s],calendar:M.calendar,dfltColor:g,bgColor:d.paper_bgcolor,autotypenumbersDflt:d.autotypenumbers,fullLayout:d};A(a,c,u),c._categories=c._categories||[],!L[t]&&a.type!=="-"&&(L[t]={type:a.type})})}},51676:function(te,X,e){var A=e(3400).isArrayOrTypedArray;te.exports=function(o){return P(o,0)};function P(o,L){if(!A(o)||L>=10)return null;for(var M=1/0,d=-1/0,g=o.length,r=0;r<g;r++){var t=o[r];if(A(t)){var s=P(t,L+1);s&&(M=Math.min(s[0],M),d=Math.max(s[1],d))}else M=Math.min(t,M),d=Math.max(t,d)}return[M,d]}},85720:function(te,X,e){var A=e(25376),P=e(98692),o=e(22548),L=A({editType:"calc"});L.family.dflt='"Open Sans", verdana, arial, sans-serif',L.size.dflt=12,L.color.dflt=o.defaultLine,te.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:P,baxis:P,font:L,color:{valType:"color",dflt:o.defaultLine,editType:"plot"},transforms:void 0}},77712:function(te,X,e){var A=e(3400).isArrayOrTypedArray;te.exports=function(P,o,L,M){var d,g,r,t,s,a,c,u,l,y,h,T,f,n=A(L)?"a":"b",v=n==="a"?P.aaxis:P.baxis,m=v.smoothing,b=n==="a"?P.a2i:P.b2j,E=n==="a"?L:M,p=n==="a"?M:L,S=n==="a"?o.a.length:o.b.length,w=n==="a"?o.b.length:o.a.length,i=Math.floor(n==="a"?P.b2j(p):P.a2i(p)),C=n==="a"?function($){return P.evalxy([],$,i)}:function($){return P.evalxy([],i,$)};m&&(r=Math.max(0,Math.min(w-2,i)),t=i-r,g=n==="a"?function($,q){return P.dxydi([],$,r,q,t)}:function($,q){return P.dxydj([],r,$,t,q)});var x=b(E[0]),k=b(E[1]),I=x<k?1:-1,B=(k-x)*1e-8,_=I>0?Math.floor:Math.ceil,z=I>0?Math.ceil:Math.floor,O=I>0?Math.min:Math.max,F=I>0?Math.max:Math.min,N=_(x+B),V=z(k-B);c=C(x);var j=[[c]];for(d=N;d*I<V*I;d+=I)s=[],h=F(x,d),T=O(k,d+I),f=T-h,a=Math.max(0,Math.min(S-2,Math.floor(.5*(h+T)))),u=C(T),m&&(l=g(a,h-a),y=g(a,T-a),s.push([c[0]+l[0]/3*f,c[1]+l[1]/3*f]),s.push([u[0]-y[0]/3*f,u[1]-y[1]/3*f])),s.push(u),j.push(s),c=u;return j}},98692:function(te,X,e){var A=e(25376),P=e(22548),o=e(94724),L=e(29736).descriptionWithDates,M=e(67824).overrideAll,d=e(98192).u,g=e(92880).extendFlat;te.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:A({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:o.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"},labelalias:g({},o.labelalias,{editType:"calc"}),tickfont:A({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:L("tick label")},tickformatstops:M(o.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","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:P.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"},griddash:g({},d,{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"},minorgriddash:g({},d,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:P.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:A({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},63856:function(te,X,e){var A=e(85720),P=e(76308).addOpacity,o=e(24040),L=e(3400),M=e(26332),d=e(95936),g=e(42568),r=e(22416),t=e(78344),s=e(52976);te.exports=function(u,l,y){var h=y.letter,T=y.font||{},f=A[h+"axis"];function n(N,V){return L.coerce(u,l,f,N,V)}function v(N,V){return L.coerce2(u,l,f,N,V)}y.name&&(l._name=y.name,l._id=y.name),n("autotypenumbers",y.autotypenumbersDflt);var m=n("type");if(m==="-"&&(y.data&&a(l,y.data),l.type==="-"?l.type="linear":m=u.type=l.type),n("smoothing"),n("cheatertype"),n("showticklabels"),n("labelprefix",h+" = "),n("labelsuffix"),n("showtickprefix"),n("showticksuffix"),n("separatethousands"),n("tickformat"),n("exponentformat"),n("minexponent"),n("showexponent"),n("categoryorder"),n("tickmode"),n("tickvals"),n("ticktext"),n("tick0"),n("dtick"),l.tickmode==="array"&&(n("arraytick0"),n("arraydtick")),n("labelpadding"),l._hovertitle=h,m==="date"){var b=o.getComponentMethod("calendars","handleDefaults");b(u,l,"calendar",y.calendar)}t(l,y.fullLayout),l.c2p=L.identity;var E=n("color",y.dfltColor),p=E===u.color?E:T.color,S=n("title.text");S&&(L.coerceFont(n,"title.font",{family:T.family,size:L.bigFont(T.size),color:p}),n("title.offset")),n("tickangle");var w=n("autorange",!l.isValidRange(u.range));w&&n("rangemode"),n("range"),l.cleanRange(),n("fixedrange"),M(u,l,n,m),g(u,l,n,m,y),d(u,l,n,m,y),r(u,l,n,{data:y.data,dataAttr:h});var i=v("gridcolor",P(E,.3)),C=v("gridwidth"),x=v("griddash"),k=n("showgrid");k||(delete l.gridcolor,delete l.gridwidth,delete l.griddash);var I=v("startlinecolor",E),B=v("startlinewidth",C),_=n("startline",l.showgrid||!!I||!!B);_||(delete l.startlinecolor,delete l.startlinewidth);var z=v("endlinecolor",E),O=v("endlinewidth",C),F=n("endline",l.showgrid||!!z||!!O);return F||(delete l.endlinecolor,delete l.endlinewidth),k?(n("minorgridcount"),n("minorgridwidth",C),n("minorgriddash",x),n("minorgridcolor",P(i,.06)),l.minorgridcount||(delete l.minorgridwidth,delete l.minorgriddash,delete l.minorgridcolor)):(delete l.gridcolor,delete l.gridwidth,delete l.griddash),l.showticklabels==="none"&&(delete l.tickfont,delete l.tickangle,delete l.showexponent,delete l.exponentformat,delete l.minexponent,delete l.tickformat,delete l.showticksuffix,delete l.showtickprefix),l.showticksuffix||delete l.ticksuffix,l.showtickprefix||delete l.tickprefix,n("tickmode"),l};function a(c,u){if(c.type==="-"){var l=c._id,y=l.charAt(0),h=y+"calendar",T=c[h];c.type=s(u,T,{autotypenumbers:c.autotypenumbers})}}},58744:function(te,X,e){var A=e(54460),P=e(3400).isArray1D,o=e(60776),L=e(51676),M=e(19216),d=e(14724),g=e(24944),r=e(26136),t=e(51512),s=e(2872),a=e(81e3);te.exports=function(u,l){var y=A.getFromId(u,l.xaxis),h=A.getFromId(u,l.yaxis),T=l.aaxis,f=l.baxis,n=l.x,v=l.y,m=[];n&&P(n)&&m.push("x"),v&&P(v)&&m.push("y"),m.length&&s(l,T,f,"a","b",m);var b=l._a=l._a||l.a,E=l._b=l._b||l.b;n=l._x||l.x,v=l._y||l.y;var p={};if(l._cheater){var S=T.cheatertype==="index"?b.length:b,w=f.cheatertype==="index"?E.length:E;n=o(S,w,l.cheaterslope)}l._x=n=r(n),l._y=v=r(v),t(n,b,E),t(v,b,E),a(l),l.setScale();var i=L(n),C=L(v),x=.5*(i[1]-i[0]),k=.5*(i[1]+i[0]),I=.5*(C[1]-C[0]),B=.5*(C[1]+C[0]),_=1.3;return i=[k-x*_,k+x*_],C=[B-I*_,B+I*_],l._extremes[y._id]=A.findExtremes(y,i,{padded:!0}),l._extremes[h._id]=A.findExtremes(h,C,{padded:!0}),M(l,"a","b"),M(l,"b","a"),d(l,T),d(l,f),p.clipsegments=g(l._xctrl,l._yctrl,T,f),p.x=n,p.y=v,p.a=b,p.b=E,[p]}},24944:function(te){te.exports=function(e,A,P,o){var L,M,d,g=[],r=!!P.smoothing,t=!!o.smoothing,s=e[0].length-1,a=e.length-1;for(L=0,M=[],d=[];L<=s;L++)M[L]=e[0][L],d[L]=A[0][L];for(g.push({x:M,y:d,bicubic:r}),L=0,M=[],d=[];L<=a;L++)M[L]=e[L][s],d[L]=A[L][s];for(g.push({x:M,y:d,bicubic:t}),L=s,M=[],d=[];L>=0;L--)M[s-L]=e[a][L],d[s-L]=A[a][L];for(g.push({x:M,y:d,bicubic:r}),L=a,M=[],d=[];L>=0;L--)M[a-L]=e[L][0],d[a-L]=A[L][0];return g.push({x:M,y:d,bicubic:t}),g}},19216:function(te,X,e){var A=e(54460),P=e(92880).extendFlat;te.exports=function(L,M,d){var g,r,t,s,a,c,u,l,y,h,T,f,n,v,m=L["_"+M],b=L[M+"axis"],E=b._gridlines=[],p=b._minorgridlines=[],S=b._boundarylines=[],w=L["_"+d],i=L[d+"axis"];b.tickmode==="array"&&(b.tickvals=m.slice());var C=L._xctrl,x=L._yctrl,k=C[0].length,I=C.length,B=L._a.length,_=L._b.length;A.prepTicks(b),b.tickmode==="array"&&delete b.tickvals;var z=b.smoothing?3:1;function O(N){var V,j,$,q,oe,Z,G,re,H,J,ae,K,Y=[],ie=[],ne={};if(M==="b")for(j=L.b2j(N),$=Math.floor(Math.max(0,Math.min(_-2,j))),q=j-$,ne.length=_,ne.crossLength=B,ne.xy=function(le){return L.evalxy([],le,j)},ne.dxy=function(le,de){return L.dxydi([],le,$,de,q)},V=0;V<B;V++)Z=Math.min(B-2,V),G=V-Z,re=L.evalxy([],V,j),i.smoothing&&V>0&&(H=L.dxydi([],V-1,$,0,q),Y.push(oe[0]+H[0]/3),ie.push(oe[1]+H[1]/3),J=L.dxydi([],V-1,$,1,q),Y.push(re[0]-J[0]/3),ie.push(re[1]-J[1]/3)),Y.push(re[0]),ie.push(re[1]),oe=re;else for(V=L.a2i(N),Z=Math.floor(Math.max(0,Math.min(B-2,V))),G=V-Z,ne.length=B,ne.crossLength=_,ne.xy=function(le){return L.evalxy([],V,le)},ne.dxy=function(le,de){return L.dxydj([],Z,le,G,de)},j=0;j<_;j++)$=Math.min(_-2,j),q=j-$,re=L.evalxy([],V,j),i.smoothing&&j>0&&(ae=L.dxydj([],Z,j-1,G,0),Y.push(oe[0]+ae[0]/3),ie.push(oe[1]+ae[1]/3),K=L.dxydj([],Z,j-1,G,1),Y.push(re[0]-K[0]/3),ie.push(re[1]-K[1]/3)),Y.push(re[0]),ie.push(re[1]),oe=re;return ne.axisLetter=M,ne.axis=b,ne.crossAxis=i,ne.value=N,ne.constvar=d,ne.index=l,ne.x=Y,ne.y=ie,ne.smoothing=i.smoothing,ne}function F(N){var V,j,$,q,oe,Z=[],G=[],re={};if(re.length=m.length,re.crossLength=w.length,M==="b")for($=Math.max(0,Math.min(_-2,N)),oe=Math.min(1,Math.max(0,N-$)),re.xy=function(H){return L.evalxy([],H,N)},re.dxy=function(H,J){return L.dxydi([],H,$,J,oe)},V=0;V<k;V++)Z[V]=C[N*z][V],G[V]=x[N*z][V];else for(j=Math.max(0,Math.min(B-2,N)),q=Math.min(1,Math.max(0,N-j)),re.xy=function(H){return L.evalxy([],N,H)},re.dxy=function(H,J){return L.dxydj([],j,H,q,J)},V=0;V<I;V++)Z[V]=C[V][N*z],G[V]=x[V][N*z];return re.axisLetter=M,re.axis=b,re.crossAxis=i,re.value=m[N],re.constvar=d,re.index=N,re.x=Z,re.y=G,re.smoothing=i.smoothing,re}if(b.tickmode==="array"){for(s=5e-15,a=[Math.floor((m.length-1-b.arraytick0)/b.arraydtick*(1+s)),Math.ceil(-b.arraytick0/b.arraydtick/(1+s))].sort(function(N,V){return N-V}),c=a[0]-1,u=a[1]+1,l=c;l<u;l++)r=b.arraytick0+b.arraydtick*l,!(r<0||r>m.length-1)&&E.push(P(F(r),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(l=c;l<u;l++)if(t=b.arraytick0+b.arraydtick*l,T=Math.min(t+b.arraydtick,m.length-1),!(t<0||t>m.length-1)&&!(T<0||T>m.length-1))for(f=m[t],n=m[T],g=0;g<b.minorgridcount;g++)v=T-t,!(v<=0)&&(h=f+(n-f)*(g+1)/(b.minorgridcount+1)*(b.arraydtick/v),!(h<m[0]||h>m[m.length-1])&&p.push(P(O(h),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&S.push(P(F(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&S.push(P(F(m.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(s=5e-15,a=[Math.floor((m[m.length-1]-b.tick0)/b.dtick*(1+s)),Math.ceil((m[0]-b.tick0)/b.dtick/(1+s))].sort(function(N,V){return N-V}),c=a[0],u=a[1],l=c;l<=u;l++)y=b.tick0+b.dtick*l,E.push(P(O(y),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(l=c-1;l<u+1;l++)for(y=b.tick0+b.dtick*l,g=0;g<b.minorgridcount;g++)h=y+b.dtick*(g+1)/(b.minorgridcount+1),!(h<m[0]||h>m[m.length-1])&&p.push(P(O(h),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&S.push(P(O(m[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&S.push(P(O(m[m.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},14724:function(te,X,e){var A=e(54460),P=e(92880).extendFlat;te.exports=function(L,M){var d,g,r,t,s,a=M._labels=[],c=M._gridlines;for(d=0;d<c.length;d++)s=c[d],["start","both"].indexOf(M.showticklabels)!==-1&&(g=A.tickText(M,s.value),P(g,{prefix:r,suffix:t,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:d===0,isLast:d===c.length-1}),a.push(g)),["end","both"].indexOf(M.showticklabels)!==-1&&(g=A.tickText(M,s.value),P(g,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:d===0,isLast:d===c.length-1}),a.push(g))}},62284:function(te){var X=.5;te.exports=function(A,P,o,L){var M=A[0]-P[0],d=A[1]-P[1],g=o[0]-P[0],r=o[1]-P[1],t=Math.pow(M*M+d*d,X/2),s=Math.pow(g*g+r*r,X/2),a=(s*s*M-t*t*g)*L,c=(s*s*d-t*t*r)*L,u=s*(t+s)*3,l=t*(t+s)*3;return[[P[0]+(u&&a/u),P[1]+(u&&c/u)],[P[0]-(l&&a/l),P[1]-(l&&c/l)]]}},60776:function(te,X,e){var A=e(3400).isArrayOrTypedArray;te.exports=function(P,o,L){var M,d,g,r,t,s,a=[],c=A(P)?P.length:P,u=A(o)?o.length:o,l=A(P)?P:null,y=A(o)?o:null;l&&(g=(l.length-1)/(l[l.length-1]-l[0])/(c-1)),y&&(r=(y.length-1)/(y[y.length-1]-y[0])/(u-1));var h,T=1/0,f=-1/0;for(d=0;d<u;d++)for(a[d]=[],s=y?(y[d]-y[0])*r:d/(u-1),M=0;M<c;M++)t=l?(l[M]-l[0])*g:M/(c-1),h=t-s*L,T=Math.min(h,T),f=Math.max(h,f),a[d][M]=h;var n=1/(f-T),v=-T*n;for(d=0;d<u;d++)for(M=0;M<c;M++)a[d][M]=n*a[d][M]+v;return a}},30180:function(te,X,e){var A=e(62284),P=e(3400).ensureArray;function o(L,M,d){var g=-.5*d[0]+1.5*M[0],r=-.5*d[1]+1.5*M[1];return[(2*g+L[0])/3,(2*r+L[1])/3]}te.exports=function(M,d,g,r,t,s){var a,c,u,l,y,h,T,f,n,v,m=g[0].length,b=g.length,E=t?3*m-2:m,p=s?3*b-2:b;for(M=P(M,p),d=P(d,p),u=0;u<p;u++)M[u]=P(M[u],E),d[u]=P(d[u],E);for(c=0,l=0;c<b;c++,l+=s?3:1)for(y=M[l],h=d[l],T=g[c],f=r[c],a=0,u=0;a<m;a++,u+=t?3:1)y[u]=T[a],h[u]=f[a];if(t)for(c=0,l=0;c<b;c++,l+=s?3:1){for(a=1,u=3;a<m-1;a++,u+=3)n=A([g[c][a-1],r[c][a-1]],[g[c][a],r[c][a]],[g[c][a+1],r[c][a+1]],t),M[l][u-1]=n[0][0],d[l][u-1]=n[0][1],M[l][u+1]=n[1][0],d[l][u+1]=n[1][1];v=o([M[l][0],d[l][0]],[M[l][2],d[l][2]],[M[l][3],d[l][3]]),M[l][1]=v[0],d[l][1]=v[1],v=o([M[l][E-1],d[l][E-1]],[M[l][E-3],d[l][E-3]],[M[l][E-4],d[l][E-4]]),M[l][E-2]=v[0],d[l][E-2]=v[1]}if(s)for(u=0;u<E;u++){for(l=3;l<p-3;l+=3)n=A([M[l-3][u],d[l-3][u]],[M[l][u],d[l][u]],[M[l+3][u],d[l+3][u]],s),M[l-1][u]=n[0][0],d[l-1][u]=n[0][1],M[l+1][u]=n[1][0],d[l+1][u]=n[1][1];v=o([M[0][u],d[0][u]],[M[2][u],d[2][u]],[M[3][u],d[3][u]]),M[1][u]=v[0],d[1][u]=v[1],v=o([M[p-1][u],d[p-1][u]],[M[p-3][u],d[p-3][u]],[M[p-4][u],d[p-4][u]]),M[p-2][u]=v[0],d[p-2][u]=v[1]}if(t&&s)for(l=1;l<p;l+=(l+1)%3===0?2:1){for(u=3;u<E-3;u+=3)n=A([M[l][u-3],d[l][u-3]],[M[l][u],d[l][u]],[M[l][u+3],d[l][u+3]],t),M[l][u-1]=.5*(M[l][u-1]+n[0][0]),d[l][u-1]=.5*(d[l][u-1]+n[0][1]),M[l][u+1]=.5*(M[l][u+1]+n[1][0]),d[l][u+1]=.5*(d[l][u+1]+n[1][1]);v=o([M[l][0],d[l][0]],[M[l][2],d[l][2]],[M[l][3],d[l][3]]),M[l][1]=.5*(M[l][1]+v[0]),d[l][1]=.5*(d[l][1]+v[1]),v=o([M[l][E-1],d[l][E-1]],[M[l][E-3],d[l][E-3]],[M[l][E-4],d[l][E-4]]),M[l][E-2]=.5*(M[l][E-2]+v[0]),d[l][E-2]=.5*(d[l][E-2]+v[1])}return[M,d]}},24588:function(te){te.exports={RELATIVE_CULL_TOLERANCE:1e-6}},26435:function(te){te.exports=function(X,e,A){return e&&A?function(P,o,L,M,d){P||(P=[]);var g,r,t,s,a,c;o*=3,L*=3;var u=M*M,l=1-M,y=l*l,h=l*M*2,T=-3*y,f=3*(y-h),n=3*(h-u),v=3*u,m=d*d,b=m*d,E=1-d,p=E*E,S=p*E;for(c=0;c<X.length;c++)a=X[c],g=T*a[L][o]+f*a[L][o+1]+n*a[L][o+2]+v*a[L][o+3],r=T*a[L+1][o]+f*a[L+1][o+1]+n*a[L+1][o+2]+v*a[L+1][o+3],t=T*a[L+2][o]+f*a[L+2][o+1]+n*a[L+2][o+2]+v*a[L+2][o+3],s=T*a[L+3][o]+f*a[L+3][o+1]+n*a[L+3][o+2]+v*a[L+3][o+3],P[c]=S*g+3*(p*d*r+E*m*t)+b*s;return P}:e?function(P,o,L,M,d){P||(P=[]);var g,r,t,s;o*=3;var a=M*M,c=1-M,u=c*c,l=c*M*2,y=-3*u,h=3*(u-l),T=3*(l-a),f=3*a,n=1-d;for(t=0;t<X.length;t++)s=X[t],g=y*s[L][o]+h*s[L][o+1]+T*s[L][o+2]+f*s[L][o+3],r=y*s[L+1][o]+h*s[L+1][o+1]+T*s[L+1][o+2]+f*s[L+1][o+3],P[t]=n*g+d*r;return P}:A?function(P,o,L,M,d){P||(P=[]);var g,r,t,s,a,c;L*=3;var u=d*d,l=u*d,y=1-d,h=y*y,T=h*y;for(a=0;a<X.length;a++)c=X[a],g=c[L][o+1]-c[L][o],r=c[L+1][o+1]-c[L+1][o],t=c[L+2][o+1]-c[L+2][o],s=c[L+3][o+1]-c[L+3][o],P[a]=T*g+3*(h*d*r+y*u*t)+l*s;return P}:function(P,o,L,M,d){P||(P=[]);var g,r,t,s,a=1-d;for(t=0;t<X.length;t++)s=X[t],g=s[L][o+1]-s[L][o],r=s[L+1][o+1]-s[L+1][o],P[t]=a*g+d*r;return P}}},24464:function(te){te.exports=function(X,e,A){return e&&A?function(P,o,L,M,d){P||(P=[]);var g,r,t,s,a,c;o*=3,L*=3;var u=M*M,l=u*M,y=1-M,h=y*y,T=h*y,f=d*d,n=1-d,v=n*n,m=n*d*2,b=-3*v,E=3*(v-m),p=3*(m-f),S=3*f;for(c=0;c<X.length;c++)a=X[c],g=b*a[L][o]+E*a[L+1][o]+p*a[L+2][o]+S*a[L+3][o],r=b*a[L][o+1]+E*a[L+1][o+1]+p*a[L+2][o+1]+S*a[L+3][o+1],t=b*a[L][o+2]+E*a[L+1][o+2]+p*a[L+2][o+2]+S*a[L+3][o+2],s=b*a[L][o+3]+E*a[L+1][o+3]+p*a[L+2][o+3]+S*a[L+3][o+3],P[c]=T*g+3*(h*M*r+y*u*t)+l*s;return P}:e?function(P,o,L,M,d){P||(P=[]);var g,r,t,s,a,c;o*=3;var u=d*d,l=u*d,y=1-d,h=y*y,T=h*y;for(a=0;a<X.length;a++)c=X[a],g=c[L+1][o]-c[L][o],r=c[L+1][o+1]-c[L][o+1],t=c[L+1][o+2]-c[L][o+2],s=c[L+1][o+3]-c[L][o+3],P[a]=T*g+3*(h*d*r+y*u*t)+l*s;return P}:A?function(P,o,L,M,d){P||(P=[]);var g,r,t,s;L*=3;var a=1-M,c=d*d,u=1-d,l=u*u,y=u*d*2,h=-3*l,T=3*(l-y),f=3*(y-c),n=3*c;for(t=0;t<X.length;t++)s=X[t],g=h*s[L][o]+T*s[L+1][o]+f*s[L+2][o]+n*s[L+3][o],r=h*s[L][o+1]+T*s[L+1][o+1]+f*s[L+2][o+1]+n*s[L+3][o+1],P[t]=a*g+M*r;return P}:function(P,o,L,M,d){P||(P=[]);var g,r,t,s,a=1-M;for(t=0;t<X.length;t++)s=X[t],g=s[L+1][o]-s[L][o],r=s[L+1][o+1]-s[L][o+1],P[t]=a*g+M*r;return P}}},29056:function(te){te.exports=function(X,e,A,P,o){var L=e-2,M=A-2;return P&&o?function(d,g,r){d||(d=[]);var t,s,a,c,u,l,y=Math.max(0,Math.min(Math.floor(g),L)),h=Math.max(0,Math.min(Math.floor(r),M)),T=Math.max(0,Math.min(1,g-y)),f=Math.max(0,Math.min(1,r-h));y*=3,h*=3;var n=T*T,v=n*T,m=1-T,b=m*m,E=b*m,p=f*f,S=p*f,w=1-f,i=w*w,C=i*w;for(l=0;l<X.length;l++)u=X[l],t=E*u[h][y]+3*(b*T*u[h][y+1]+m*n*u[h][y+2])+v*u[h][y+3],s=E*u[h+1][y]+3*(b*T*u[h+1][y+1]+m*n*u[h+1][y+2])+v*u[h+1][y+3],a=E*u[h+2][y]+3*(b*T*u[h+2][y+1]+m*n*u[h+2][y+2])+v*u[h+2][y+3],c=E*u[h+3][y]+3*(b*T*u[h+3][y+1]+m*n*u[h+3][y+2])+v*u[h+3][y+3],d[l]=C*t+3*(i*f*s+w*p*a)+S*c;return d}:P?function(d,g,r){d||(d=[]);var t=Math.max(0,Math.min(Math.floor(g),L)),s=Math.max(0,Math.min(Math.floor(r),M)),a=Math.max(0,Math.min(1,g-t)),c=Math.max(0,Math.min(1,r-s)),u,l,y,h,T,f;t*=3;var n=a*a,v=n*a,m=1-a,b=m*m,E=b*m,p=1-c;for(T=0;T<X.length;T++)f=X[T],u=p*f[s][t]+c*f[s+1][t],l=p*f[s][t+1]+c*f[s+1][t+1],y=p*f[s][t+2]+c*f[s+1][t+1],h=p*f[s][t+3]+c*f[s+1][t+1],d[T]=E*u+3*(b*a*l+m*n*y)+v*h;return d}:o?function(d,g,r){d||(d=[]);var t=Math.max(0,Math.min(Math.floor(g),L)),s=Math.max(0,Math.min(Math.floor(r),M)),a=Math.max(0,Math.min(1,g-t)),c=Math.max(0,Math.min(1,r-s)),u,l,y,h,T,f;s*=3;var n=c*c,v=n*c,m=1-c,b=m*m,E=b*m,p=1-a;for(T=0;T<X.length;T++)f=X[T],u=p*f[s][t]+a*f[s][t+1],l=p*f[s+1][t]+a*f[s+1][t+1],y=p*f[s+2][t]+a*f[s+2][t+1],h=p*f[s+3][t]+a*f[s+3][t+1],d[T]=E*u+3*(b*c*l+m*n*y)+v*h;return d}:function(d,g,r){d||(d=[]);var t=Math.max(0,Math.min(Math.floor(g),L)),s=Math.max(0,Math.min(Math.floor(r),M)),a=Math.max(0,Math.min(1,g-t)),c=Math.max(0,Math.min(1,r-s)),u,l,y,h,T=1-c,f=1-a;for(y=0;y<X.length;y++)h=X[y],u=f*h[s][t]+a*h[s][t+1],l=f*h[s+1][t]+a*h[s+1][t+1],d[y]=T*u+c*l;return d}}},38356:function(te,X,e){var A=e(3400),P=e(86411),o=e(93504),L=e(85720),M=e(22548);te.exports=function(g,r,t,s){function a(l,y){return A.coerce(g,r,L,l,y)}r._clipPathId="clip"+r.uid+"carpet";var c=a("color",M.defaultLine);if(A.coerceFont(a,"font"),a("carpet"),o(g,r,s,a,c),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var u=P(g,r,a);u||(r.visible=!1),r._cheater&&a("cheaterslope")}},95856:function(te,X,e){te.exports={attributes:e(85720),supplyDefaults:e(38356),plot:e(164),calc:e(58744),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:e(57952),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},50948:function(te){te.exports=function(X,e){for(var A=X._fullData.length,P,o=0;o<A;o++){var L=X._fullData[o];if(L.index!==e.index&&L.type==="carpet"&&(P||(P=L),L.carpet===e.carpet))return L}return P}},53416:function(te){te.exports=function(e,A,P){if(e.length===0)return"";var o,L=[],M=P?3:1;for(o=0;o<e.length;o+=M)L.push(e[o]+","+A[o]),P&&o<e.length-M&&(L.push("C"),L.push([e[o+1]+","+A[o+1],e[o+2]+","+A[o+2]+" "].join(" ")));return L.join(P?"":"L")}},87072:function(te,X,e){var A=e(3400).isArrayOrTypedArray;te.exports=function(o,L,M){var d;for(A(o)?o.length>L.length&&(o=o.slice(0,L.length)):o=[],d=0;d<L.length;d++)o[d]=M(L[d]);return o}},15584:function(te){te.exports=function(e,A,P,o,L,M){var d=L[0]*e.dpdx(A),g=L[1]*e.dpdy(P),r=1,t=1;if(M){var s=Math.sqrt(L[0]*L[0]+L[1]*L[1]),a=Math.sqrt(M[0]*M[0]+M[1]*M[1]),c=(L[0]*M[0]+L[1]*M[1])/s/a;t=Math.max(0,c)}var u=Math.atan2(g,d)*180/Math.PI;return u<-90?(u+=180,r=-r):u>90&&(u-=180,r=-r),{angle:u,flip:r,p:e.c2p(o,A,P),offsetMultplier:t}}},164:function(te,X,e){var A=e(33428),P=e(43616),o=e(87072),L=e(53416),M=e(15584),d=e(72736),g=e(3400),r=g.strRotate,t=g.strTranslate,s=e(84284);te.exports=function(n,v,m,b){var E=n._context.staticPlot,p=v.xaxis,S=v.yaxis,w=n._fullLayout,i=w._clips;g.makeTraceGroups(b,m,"trace").each(function(C){var x=A.select(this),k=C[0],I=k.trace,B=I.aaxis,_=I.baxis,z=g.ensureSingle(x,"g","minorlayer"),O=g.ensureSingle(x,"g","majorlayer"),F=g.ensureSingle(x,"g","boundarylayer"),N=g.ensureSingle(x,"g","labellayer");x.style("opacity",I.opacity),c(p,S,O,B,"a",B._gridlines,!0),c(p,S,O,_,"b",_._gridlines,!0),c(p,S,z,B,"a",B._minorgridlines,!0),c(p,S,z,_,"b",_._minorgridlines,!0),c(p,S,F,B,"a-boundary",B._boundarylines,E),c(p,S,F,_,"b-boundary",_._boundarylines,E);var V=u(n,p,S,I,k,N,B._labels,"a-label"),j=u(n,p,S,I,k,N,_._labels,"b-label");l(n,N,I,k,p,S,V,j),a(I,k,i,p,S)})};function a(f,n,v,m,b){var E,p,S,w,i=v.select("#"+f._clipPathId);i.size()||(i=v.append("clipPath").classed("carpetclip",!0));var C=g.ensureSingle(i,"path","carpetboundary"),x=n.clipsegments,k=[];for(w=0;w<x.length;w++)E=x[w],p=o([],E.x,m.c2p),S=o([],E.y,b.c2p),k.push(L(p,S,E.bicubic));var I="M"+k.join("L")+"Z";i.attr("id",f._clipPathId),C.attr("d",I)}function c(f,n,v,m,b,E,p){var S="const-"+b+"-lines",w=v.selectAll("."+S).data(E);w.enter().append("path").classed(S,!0).style("vector-effect",p?"none":"non-scaling-stroke"),w.each(function(i){var C=i,x=C.x,k=C.y,I=o([],x,f.c2p),B=o([],k,n.c2p),_="M"+L(I,B,C.smoothing),z=A.select(this);z.attr("d",_).style("stroke-width",C.width).style("stroke",C.color).style("stroke-dasharray",P.dashStyle(C.dash,C.width)).style("fill","none")}),w.exit().remove()}function u(f,n,v,m,b,E,p,S){var w=E.selectAll("text."+S).data(p);w.enter().append("text").classed(S,!0);var i=0,C={};return w.each(function(x,k){var I;if(x.axis.tickangle==="auto")I=M(m,n,v,x.xy,x.dxy);else{var B=(x.axis.tickangle+180)*Math.PI/180;I=M(m,n,v,x.xy,[Math.cos(B),Math.sin(B)])}k||(C={angle:I.angle,flip:I.flip});var _=(x.endAnchor?-1:1)*I.flip,z=A.select(this).attr({"text-anchor":_>0?"start":"end","data-notex":1}).call(P.font,x.font).text(x.text).call(d.convertToTspans,f),O=P.bBox(this);z.attr("transform",t(I.p[0],I.p[1])+r(I.angle)+t(x.axis.labelpadding*_,O.height*.3)),i=Math.max(i,O.width+x.axis.labelpadding)}),w.exit().remove(),C.maxExtent=i,C}function l(f,n,v,m,b,E,p,S){var w,i,C,x,k=g.aggNums(Math.min,null,v.a),I=g.aggNums(Math.max,null,v.a),B=g.aggNums(Math.min,null,v.b),_=g.aggNums(Math.max,null,v.b);w=.5*(k+I),i=B,C=v.ab2xy(w,i,!0),x=v.dxyda_rough(w,i),p.angle===void 0&&g.extendFlat(p,M(v,b,E,C,v.dxydb_rough(w,i))),T(f,n,v,m,C,x,v.aaxis,b,E,p,"a-title"),w=k,i=.5*(B+_),C=v.ab2xy(w,i,!0),x=v.dxydb_rough(w,i),S.angle===void 0&&g.extendFlat(S,M(v,b,E,C,v.dxyda_rough(w,i))),T(f,n,v,m,C,x,v.baxis,b,E,S,"b-title")}var y=s.LINE_SPACING,h=(1-s.MID_SHIFT)/y+1;function T(f,n,v,m,b,E,p,S,w,i,C){var x=[];p.title.text&&x.push(p.title.text);var k=n.selectAll("text."+C).data(x),I=i.maxExtent;k.enter().append("text").classed(C,!0),k.each(function(){var B=M(v,S,w,b,E);["start","both"].indexOf(p.showticklabels)===-1&&(I=0);var _=p.title.font.size;I+=_+p.title.offset;var z=i.angle+(i.flip<0?180:0),O=(z-B.angle+450)%360,F=O>90&&O<270,N=A.select(this);N.text(p.title.text).call(d.convertToTspans,f),F&&(I=(-d.lineCount(N)+h)*y*_-I),N.attr("transform",t(B.p[0],B.p[1])+r(B.angle)+t(0,I)).attr("text-anchor","middle").call(P.font,p.title.font)}),k.exit().remove()}},81e3:function(te,X,e){var A=e(24588),P=e(14952).findBin,o=e(30180),L=e(29056),M=e(26435),d=e(24464);te.exports=function(r){var t=r._a,s=r._b,a=t.length,c=s.length,u=r.aaxis,l=r.baxis,y=t[0],h=t[a-1],T=s[0],f=s[c-1],n=t[t.length-1]-t[0],v=s[s.length-1]-s[0],m=n*A.RELATIVE_CULL_TOLERANCE,b=v*A.RELATIVE_CULL_TOLERANCE;y-=m,h+=m,T-=b,f+=b,r.isVisible=function(E,p){return E>y&&E<h&&p>T&&p<f},r.isOccluded=function(E,p){return E<y||E>h||p<T||p>f},r.setScale=function(){var E=r._x,p=r._y,S=o(r._xctrl,r._yctrl,E,p,u.smoothing,l.smoothing);r._xctrl=S[0],r._yctrl=S[1],r.evalxy=L([r._xctrl,r._yctrl],a,c,u.smoothing,l.smoothing),r.dxydi=M([r._xctrl,r._yctrl],u.smoothing,l.smoothing),r.dxydj=d([r._xctrl,r._yctrl],u.smoothing,l.smoothing)},r.i2a=function(E){var p=Math.max(0,Math.floor(E[0]),a-2),S=E[0]-p;return(1-S)*t[p]+S*t[p+1]},r.j2b=function(E){var p=Math.max(0,Math.floor(E[1]),a-2),S=E[1]-p;return(1-S)*s[p]+S*s[p+1]},r.ij2ab=function(E){return[r.i2a(E[0]),r.j2b(E[1])]},r.a2i=function(E){var p=Math.max(0,Math.min(P(E,t),a-2)),S=t[p],w=t[p+1];return Math.max(0,Math.min(a-1,p+(E-S)/(w-S)))},r.b2j=function(E){var p=Math.max(0,Math.min(P(E,s),c-2)),S=s[p],w=s[p+1];return Math.max(0,Math.min(c-1,p+(E-S)/(w-S)))},r.ab2ij=function(E){return[r.a2i(E[0]),r.b2j(E[1])]},r.i2c=function(E,p){return r.evalxy([],E,p)},r.ab2xy=function(E,p,S){if(!S&&(E<t[0]||E>t[a-1]|p<s[0]||p>s[c-1]))return[!1,!1];var w=r.a2i(E),i=r.b2j(p),C=r.evalxy([],w,i);if(S){var x=0,k=0,I=[],B,_,z,O;E<t[0]?(B=0,_=0,x=(E-t[0])/(t[1]-t[0])):E>t[a-1]?(B=a-2,_=1,x=(E-t[a-1])/(t[a-1]-t[a-2])):(B=Math.max(0,Math.min(a-2,Math.floor(w))),_=w-B),p<s[0]?(z=0,O=0,k=(p-s[0])/(s[1]-s[0])):p>s[c-1]?(z=c-2,O=1,k=(p-s[c-1])/(s[c-1]-s[c-2])):(z=Math.max(0,Math.min(c-2,Math.floor(i))),O=i-z),x&&(r.dxydi(I,B,z,_,O),C[0]+=I[0]*x,C[1]+=I[1]*x),k&&(r.dxydj(I,B,z,_,O),C[0]+=I[0]*k,C[1]+=I[1]*k)}return C},r.c2p=function(E,p,S){return[p.c2p(E[0]),S.c2p(E[1])]},r.p2x=function(E,p,S){return[p.p2c(E[0]),S.p2c(E[1])]},r.dadi=function(E){var p=Math.max(0,Math.min(t.length-2,E));return t[p+1]-t[p]},r.dbdj=function(E){var p=Math.max(0,Math.min(s.length-2,E));return s[p+1]-s[p]},r.dxyda=function(E,p,S,w){var i=r.dxydi(null,E,p,S,w),C=r.dadi(E,S);return[i[0]/C,i[1]/C]},r.dxydb=function(E,p,S,w){var i=r.dxydj(null,E,p,S,w),C=r.dbdj(p,w);return[i[0]/C,i[1]/C]},r.dxyda_rough=function(E,p,S){var w=n*(S||.1),i=r.ab2xy(E+w,p,!0),C=r.ab2xy(E-w,p,!0);return[(i[0]-C[0])*.5/w,(i[1]-C[1])*.5/w]},r.dxydb_rough=function(E,p,S){var w=v*(S||.1),i=r.ab2xy(E,p+w,!0),C=r.ab2xy(E,p-w,!0);return[(i[0]-C[0])*.5/w,(i[1]-C[1])*.5/w]},r.dpdx=function(E){return E._m},r.dpdy=function(E){return E._m}}},51512:function(te,X,e){var A=e(3400);te.exports=function(o,L,M){var d,g,r,t=[],s=[],a=o[0].length,c=o.length;function u(j,$){var q=0,oe,Z=0;return j>0&&(oe=o[$][j-1])!==void 0&&(Z++,q+=oe),j<a-1&&(oe=o[$][j+1])!==void 0&&(Z++,q+=oe),$>0&&(oe=o[$-1][j])!==void 0&&(Z++,q+=oe),$<c-1&&(oe=o[$+1][j])!==void 0&&(Z++,q+=oe),q/Math.max(1,Z)}var l=0;for(d=0;d<a;d++)for(g=0;g<c;g++)o[g][d]===void 0&&(t.push(d),s.push(g),o[g][d]=u(d,g)),l=Math.max(l,Math.abs(o[g][d]));if(!t.length)return o;var y,h,T,f,n,v,m,b,E,p,S,w=1e-5,i=0,C=100,x=0,k=t.length;do{for(i=0,r=0;r<k;r++){d=t[r],g=s[r];var I=0,B=0,_,z,O,F,N,V;d===0?(N=Math.min(a-1,2),O=L[N],F=L[1],_=o[g][N],z=o[g][1],B+=z+(z-_)*(L[0]-F)/(F-O),I++):d===a-1&&(N=Math.max(0,a-3),O=L[N],F=L[a-2],_=o[g][N],z=o[g][a-2],B+=z+(z-_)*(L[a-1]-F)/(F-O),I++),(d===0||d===a-1)&&g>0&&g<c-1&&(y=M[g+1]-M[g],h=M[g]-M[g-1],B+=(h*o[g+1][d]+y*o[g-1][d])/(h+y),I++),g===0?(V=Math.min(c-1,2),O=M[V],F=M[1],_=o[V][d],z=o[1][d],B+=z+(z-_)*(M[0]-F)/(F-O),I++):g===c-1&&(V=Math.max(0,c-3),O=M[V],F=M[c-2],_=o[V][d],z=o[c-2][d],B+=z+(z-_)*(M[c-1]-F)/(F-O),I++),(g===0||g===c-1)&&d>0&&d<a-1&&(y=L[d+1]-L[d],h=L[d]-L[d-1],B+=(h*o[g][d+1]+y*o[g][d-1])/(h+y),I++),I?B/=I:(T=L[d+1]-L[d],f=L[d]-L[d-1],n=M[g+1]-M[g],v=M[g]-M[g-1],m=T*f*(T+f),b=n*v*(n+v),B=(m*(v*o[g+1][d]+n*o[g-1][d])+b*(f*o[g][d+1]+T*o[g][d-1]))/(b*(f+T)+m*(v+n))),E=B-o[g][d],p=E/l,i+=p*p,S=I?0:.85,o[g][d]+=E*(1+S)}i=Math.sqrt(i)}while(x++<C&&i>w);return A.log("Smoother converged to",i,"after",x,"iterations"),o}},86411:function(te,X,e){var A=e(3400).isArray1D;te.exports=function(o,L,M){var d=M("x"),g=d&&d.length,r=M("y"),t=r&&r.length;if(!g&&!t)return!1;if(L._cheater=!d,(!g||A(d))&&(!t||A(r))){var s=g?d.length:1/0;t&&(s=Math.min(s,r.length)),L.a&&L.a.length&&(s=Math.min(s,L.a.length)),L.b&&L.b.length&&(s=Math.min(s,L.b.length)),L._length=s}else L._length=null;return!0}},83372:function(te,X,e){var A=e(21776).Ks,P=e(6096),o=e(49084),L=e(45464),M=e(22548).defaultLine,d=e(92880).extendFlat,g=P.marker.line;te.exports=d({locations:{valType:"data_array",editType:"calc"},locationmode:P.locationmode,z:{valType:"data_array",editType:"calc"},geojson:d({},P.geojson,{}),featureidkey:P.featureidkey,text:d({},P.text,{}),hovertext:d({},P.hovertext,{}),marker:{line:{color:d({},g.color,{dflt:M}),width:d({},g.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:P.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:P.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:d({},L.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:A(),showlegend:d({},L.showlegend,{dflt:!1})},o("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(te,X,e){var A=e(38248),P=e(39032).BADNUM,o=e(47128),L=e(20148),M=e(4500);function d(g){return g&&typeof g=="string"}te.exports=function(r,t){var s=t._length,a=new Array(s),c;t.geojson?c=function(T){return d(T)||A(T)}:c=d;for(var u=0;u<s;u++){var l=a[u]={},y=t.locations[u],h=t.z[u];c(y)&&A(h)?(l.loc=y,l.z=h):(l.loc=null,l.z=P),l.index=u}return L(a,t),o(r,t,{vals:t.z,containerStr:"",cLetter:"z"}),M(a,t),a}},30972:function(te,X,e){var A=e(3400),P=e(27260),o=e(83372);te.exports=function(M,d,g,r){function t(h,T){return A.coerce(M,d,o,h,T)}var s=t("locations"),a=t("z");if(!(s&&s.length&&A.isArrayOrTypedArray(a)&&a.length)){d.visible=!1;return}d._length=Math.min(s.length,a.length);var c=t("geojson"),u;(typeof c=="string"&&c!==""||A.isPlainObject(c))&&(u="geojson-id");var l=t("locationmode",u);l==="geojson-id"&&t("featureidkey"),t("text"),t("hovertext"),t("hovertemplate");var y=t("marker.line.width");y&&t("marker.line.color"),t("marker.opacity"),P(M,d,r,t,{prefix:"",cLetter:"z"}),A.coerceSelectionMarkerOpacity(d,t)}},52428:function(te){te.exports=function(e,A,P,o,L){e.location=A.location,e.z=A.z;var M=o[L];return M.fIn&&M.fIn.properties&&(e.properties=M.fIn.properties),e.ct=M.ct,e}},69224:function(te,X,e){var A=e(54460),P=e(83372),o=e(3400).fillText;te.exports=function(d,g,r){var t=d.cd,s=t[0].trace,a=d.subplot,c,u,l,y,h=[g,r],T=[g+360,r];for(u=0;u<t.length;u++)if(c=t[u],y=!1,c._polygons){for(l=0;l<c._polygons.length;l++)c._polygons[l].contains(h)&&(y=!y),c._polygons[l].contains(T)&&(y=!y);if(y)break}if(!(!y||!c))return d.x0=d.x1=d.xa.c2p(c.ct),d.y0=d.y1=d.ya.c2p(c.ct),d.index=c.index,d.location=c.loc,d.z=c.z,d.zLabel=A.tickText(a.mockAxis,a.mockAxis.c2l(c.z),"hover").text,d.hovertemplate=c.hovertemplate,L(d,s,c),[d]};function L(M,d,g){if(!d.hovertemplate){var r=g.hi||d.hoverinfo,t=String(g.loc),s=r==="all"?P.hoverinfo.flags:r.split("+"),a=s.indexOf("name")!==-1,c=s.indexOf("location")!==-1,u=s.indexOf("z")!==-1,l=s.indexOf("text")!==-1,y=!a&&c,h=[];y?M.nameOverride=t:(a&&(M.nameOverride=d.name),c&&h.push(t)),u&&h.push(M.zLabel),l&&o(g,d,h),M.extraText=h.join("<br>")}}},54272:function(te,X,e){te.exports={attributes:e(83372),supplyDefaults:e(30972),colorbar:e(96288),calc:e(7924),calcGeoJSON:e(88364).calcGeoJSON,plot:e(88364).plot,style:e(7947).style,styleOnSelect:e(7947).styleOnSelect,hoverPoints:e(69224),eventData:e(52428),selectPoints:e(17328),moduleType:"trace",name:"choropleth",basePlotModule:e(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(te,X,e){var A=e(33428),P=e(3400),o=e(27144),L=e(59972).getTopojsonFeatures,M=e(19280).findExtremes,d=e(7947).style;function g(t,s,a){var c=s.layers.backplot.select(".choroplethlayer");P.makeTraceGroups(c,a,"trace choropleth").each(function(u){var l=A.select(this),y=l.selectAll("path.choroplethlocation").data(P.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),d(t,u)})}function r(t,s){for(var a=t[0].trace,c=s[a.geo],u=c._subplot,l=a.locationmode,y=a._length,h=l==="geojson-id"?o.extractTraceFeature(t):L(a,u.topojson),T=[],f=[],n=0;n<y;n++){var v=t[n],m=l==="geojson-id"?v.fOut:o.locationToFeature(l,v.loc,h);if(m){v.geojson=m,v.ct=m.properties.ct,v._polygons=o.feature2polygons(m);var b=o.computeBbox(m);T.push(b[0],b[2]),f.push(b[1],b[3])}else v.geojson=null}if(c.fitbounds==="geojson"&&l==="geojson-id"){var E=o.computeBbox(o.getTraceGeojson(a));T=[E[0],E[2]],f=[E[1],E[3]]}var p={padded:!0};a._extremes.lon=M(c.lonaxis._ax,T,p),a._extremes.lat=M(c.lataxis._ax,f,p)}te.exports={calcGeoJSON:r,plot:g}},17328:function(te){te.exports=function(e,A){var P=e.cd,o=e.xaxis,L=e.yaxis,M=[],d,g,r,t,s;if(A===!1)for(d=0;d<P.length;d++)P[d].selected=0;else for(d=0;d<P.length;d++)g=P[d],r=g.ct,r&&(t=o.c2p(r),s=L.c2p(r),A.contains([t,s],null,d,e)?(M.push({pointNumber:d,lon:r[0],lat:r[1]}),g.selected=1):g.selected=0);return M}},7947:function(te,X,e){var A=e(33428),P=e(76308),o=e(43616),L=e(8932);function M(r,t){t&&d(r,t)}function d(r,t){var s=t[0].trace,a=t[0].node3,c=a.selectAll(".choroplethlocation"),u=s.marker||{},l=u.line||{},y=L.makeColorScaleFuncFromTrace(s);c.each(function(h){A.select(this).attr("fill",y(h.z)).call(P.stroke,h.mlc||l.color).call(o.dashLine,"",h.mlw||l.width||0).style("opacity",u.opacity)}),o.selectedPointStyle(c,s)}function g(r,t){var s=t[0].node3,a=t[0].trace;a.selectedpoints?o.selectedPointStyle(s.selectAll(".choroplethlocation"),a):d(r,t)}te.exports={style:M,styleOnSelect:g}},45608:function(te,X,e){var A=e(83372),P=e(49084),o=e(21776).Ks,L=e(45464),M=e(92880).extendFlat;te.exports=M({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:M({},A.featureidkey,{}),below:{valType:"string",editType:"plot"},text:A.text,hovertext:A.hovertext,marker:{line:{color:M({},A.marker.line.color,{editType:"plot"}),width:M({},A.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:M({},A.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:M({},A.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:M({},A.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:A.hoverinfo,hovertemplate:o({},{keys:["properties"]}),showlegend:M({},L.showlegend,{dflt:!1})},P("",{cLetter:"z",editTypeOverride:"calc"}))},13504:function(te,X,e){var A=e(38248),P=e(3400),o=e(8932),L=e(43616),M=e(44808).makeBlank,d=e(27144);function g(t){var s=t[0].trace,a=s.visible===!0&&s._length!==0,c={layout:{visibility:"none"},paint:{}},u={layout:{visibility:"none"},paint:{}},l=s._opts={fill:c,line:u,geojson:M()};if(!a)return l;var y=d.extractTraceFeature(t);if(!y)return l;var h=o.makeColorScaleFuncFromTrace(s),T=s.marker,f=T.line||{},n;P.isArrayOrTypedArray(T.opacity)&&(n=function(i){var C=i.mo;return A(C)?+P.constrain(C,0,1):0});var v;P.isArrayOrTypedArray(f.color)&&(v=function(i){return i.mlc});var m;P.isArrayOrTypedArray(f.width)&&(m=function(i){return i.mlw});for(var b=0;b<t.length;b++){var E=t[b],p=E.fOut;if(p){var S=p.properties;S.fc=h(E.z),n&&(S.mo=n(E)),v&&(S.mlc=v(E)),m&&(S.mlw=m(E)),E.ct=S.ct,E._polygons=d.feature2polygons(p)}}var w=n?{type:"identity",property:"mo"}:T.opacity;return P.extendFlat(c.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":w}),P.extendFlat(u.paint,{"line-color":v?{type:"identity",property:"mlc"}:f.color,"line-width":m?{type:"identity",property:"mlw"}:f.width,"line-opacity":w}),c.layout.visibility="visible",u.layout.visibility="visible",l.geojson={type:"FeatureCollection",features:y},r(t),l}function r(t){var s=t[0].trace,a=s._opts,c;if(s.selectedpoints){for(var u=L.makeSelectedPointStyleFns(s),l=0;l<t.length;l++){var y=t[l];y.fOut&&(y.fOut.properties.mo2=u.selectedOpacityFn(y))}c={type:"identity",property:"mo2"}}else c=P.isArrayOrTypedArray(s.marker.opacity)?{type:"identity",property:"mo"}:s.marker.opacity;return P.extendFlat(a.fill.paint,{"fill-opacity":c}),P.extendFlat(a.line.paint,{"line-opacity":c}),a}te.exports={convert:g,convertOnSelect:r}},9352:function(te,X,e){var A=e(3400),P=e(27260),o=e(45608);te.exports=function(M,d,g,r){function t(l,y){return A.coerce(M,d,o,l,y)}var s=t("locations"),a=t("z"),c=t("geojson");if(!A.isArrayOrTypedArray(s)||!s.length||!A.isArrayOrTypedArray(a)||!a.length||!(typeof c=="string"&&c!==""||A.isPlainObject(c))){d.visible=!1;return}t("featureidkey"),d._length=Math.min(s.length,a.length),t("below"),t("text"),t("hovertext"),t("hovertemplate");var u=t("marker.line.width");u&&t("marker.line.color"),t("marker.opacity"),P(M,d,r,t,{prefix:"",cLetter:"z"}),A.coerceSelectionMarkerOpacity(d,t)}},85404:function(te,X,e){te.exports={attributes:e(45608),supplyDefaults:e(9352),colorbar:e(96288),calc:e(7924),plot:e(61288),hoverPoints:e(69224),eventData:e(52428),selectPoints:e(17328),styleOnSelect:function(A,P){if(P){var o=P[0].trace;o._glTrace.updateOnSelect(P)}},getBelow:function(A,P){for(var o=P.getMapLayers(),L=o.length-2;L>=0;L--){var M=o[L].id;if(typeof M=="string"&&M.indexOf("water")===0){for(var d=L+1;d<o.length;d++)if(M=o[d].id,typeof M=="string"&&M.indexOf("plotly-")===-1)return M}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:e(33688),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}},61288:function(te,X,e){var A=e(13504).convert,P=e(13504).convertOnSelect,o=e(47552).traceLayerPrefix;function L(d,g){this.type="choroplethmapbox",this.subplot=d,this.uid=g,this.sourceId="source-"+g,this.layerList=[["fill",o+g+"-fill"],["line",o+g+"-line"]],this.below=null}var M=L.prototype;M.update=function(d){this._update(A(d)),d[0].trace._glTrace=this},M.updateOnSelect=function(d){this._update(P(d))},M._update=function(d){var g=this.subplot,r=this.layerList,t=g.belowLookup["trace-"+this.uid];g.map.getSource(this.sourceId).setData(d.geojson),t!==this.below&&(this._removeLayers(),this._addLayers(d,t),this.below=t);for(var s=0;s<r.length;s++){var a=r[s],c=a[0],u=a[1],l=d[c];g.setOptions(u,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&g.setOptions(u,"setPaintProperty",l.paint)}},M._addLayers=function(d,g){for(var r=this.subplot,t=this.layerList,s=this.sourceId,a=0;a<t.length;a++){var c=t[a],u=c[0],l=d[u];r.addLayer({type:u,id:c[1],source:s,layout:l.layout,paint:l.paint},g)}},M._removeLayers=function(){for(var d=this.subplot.map,g=this.layerList,r=g.length-1;r>=0;r--)d.removeLayer(g[r][1])},M.dispose=function(){var d=this.subplot.map;this._removeLayers(),d.removeSource(this.sourceId)},te.exports=function(g,r){var t=r[0].trace,s=new L(g,t.uid),a=s.sourceId,c=A(r),u=s.below=g.belowLookup["trace-"+t.uid];return g.map.addSource(a,{type:"geojson",data:c.geojson}),s._addLayers(c,u),r[0].trace._glTrace=s,s}},86040:function(te,X,e){var A=e(49084),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(52948),M=e(45464),d=e(92880).extendFlat,g={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:o({editType:"calc"},{keys:["norm"]}),uhoverformat:P("u",1),vhoverformat:P("v",1),whoverformat:P("w",1),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),showlegend:d({},M.showlegend,{dflt:!1})};d(g,A("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(t){g[t]=L[t]}),g.hoverinfo=d({},M.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),g.transforms=void 0,te.exports=g},83344:function(te,X,e){var A=e(47128);te.exports=function(o,L){for(var M=L.u,d=L.v,g=L.w,r=Math.min(L.x.length,L.y.length,L.z.length,M.length,d.length,g.length),t=-1/0,s=1/0,a=0;a<r;a++){var c=M[a],u=d[a],l=g[a],y=Math.sqrt(c*c+u*u+l*l);t=Math.max(t,y),s=Math.min(s,y)}L._len=r,L._normMax=t,A(o,L,{vals:[s,t],containerStr:"",cLetter:"c"})}},6648:function(te,X,e){var A=e(67792).gl_cone3d,P=e(67792).gl_cone3d.createConeMesh,o=e(3400).simpleMap,L=e(33040).parseColorScale,M=e(8932).extractOpts,d=e(3400).isArrayOrTypedArray,g=e(52094);function r(y,h){this.scene=y,this.uid=h,this.mesh=null,this.data=null}var t=r.prototype;t.handlePick=function(y){if(y.object===this.mesh){var h=y.index=y.data.index,T=this.data.x[h],f=this.data.y[h],n=this.data.z[h],v=this.data.u[h],m=this.data.v[h],b=this.data.w[h];y.traceCoordinate=[T,f,n,v,m,b,Math.sqrt(v*v+m*m+b*b)];var E=this.data.hovertext||this.data.text;return d(E)&&E[h]!==void 0?y.textLabel=E[h]:E&&(y.textLabel=E),!0}};var s={xaxis:0,yaxis:1,zaxis:2},a={tip:1,tail:0,cm:.25,center:.5},c={tip:1,tail:1,cm:.75,center:.5};function u(y,h){var T=y.fullSceneLayout,f=y.dataScale,n={};function v(p,S){var w=T[S],i=f[s[S]];return o(p,function(C){return w.d2l(C)*i})}n.vectors=g(v(h.u,"xaxis"),v(h.v,"yaxis"),v(h.w,"zaxis"),h._len),n.positions=g(v(h.x,"xaxis"),v(h.y,"yaxis"),v(h.z,"zaxis"),h._len);var m=M(h);n.colormap=L(h),n.vertexIntensityBounds=[m.min/h._normMax,m.max/h._normMax],n.coneOffset=a[h.anchor],h.sizemode==="scaled"?n.coneSize=h.sizeref||.5:n.coneSize=h.sizeref&&h._normMax?h.sizeref/h._normMax:.5;var b=A(n),E=h.lightposition;return b.lightPosition=[E.x,E.y,E.z],b.ambient=h.lighting.ambient,b.diffuse=h.lighting.diffuse,b.specular=h.lighting.specular,b.roughness=h.lighting.roughness,b.fresnel=h.lighting.fresnel,b.opacity=h.opacity,h._pad=c[h.anchor]*b.vectorScale*b.coneScale*h._normMax,b}t.update=function(y){this.data=y;var h=u(this.scene,y);this.mesh.update(h)},t.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function l(y,h){var T=y.glplot.gl,f=u(y,h),n=P(T,f),v=new r(y,h.uid);return v.mesh=n,v.data=h,n._trace=v,y.glplot.add(n),v}te.exports=l},86096:function(te,X,e){var A=e(3400),P=e(27260),o=e(86040);te.exports=function(M,d,g,r){function t(h,T){return A.coerce(M,d,o,h,T)}var s=t("u"),a=t("v"),c=t("w"),u=t("x"),l=t("y"),y=t("z");if(!s||!s.length||!a||!a.length||!c||!c.length||!u||!u.length||!l||!l.length||!y||!y.length){d.visible=!1;return}t("sizeref"),t("sizemode"),t("anchor"),t("lighting.ambient"),t("lighting.diffuse"),t("lighting.specular"),t("lighting.roughness"),t("lighting.fresnel"),t("lightposition.x"),t("lightposition.y"),t("lightposition.z"),P(M,d,r,t,{prefix:"",cLetter:"c"}),t("text"),t("hovertext"),t("hovertemplate"),t("uhoverformat"),t("vhoverformat"),t("whoverformat"),t("xhoverformat"),t("yhoverformat"),t("zhoverformat"),d._length=null}},26048:function(te,X,e){te.exports={moduleType:"trace",name:"cone",basePlotModule:e(12536),categories:["gl3d","showLegend"],attributes:e(86040),supplyDefaults:e(86096),colorbar:{min:"cmin",max:"cmax"},calc:e(83344),plot:e(6648),eventData:function(A,P){return A.norm=P.traceCoordinate[6],A},meta:{}}},67104:function(te,X,e){var A=e(83328),P=e(52904),o=e(29736),L=o.axisHoverFormat,M=o.descriptionOnlyNumbers,d=e(49084),g=e(98192).u,r=e(25376),t=e(92880).extendFlat,s=e(69104),a=s.COMPARISON_OPS2,c=s.INTERVAL_OPS,u=P.line;te.exports=t({z:A.z,x:A.x,x0:A.x0,dx:A.dx,y:A.y,y0:A.y0,dy:A.dy,xperiod:A.xperiod,yperiod:A.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:A.xperiodalignment,yperiodalignment:A.yperiodalignment,text:A.text,hovertext:A.hovertext,transpose:A.transpose,xtype:A.xtype,ytype:A.ytype,xhoverformat:L("x"),yhoverformat:L("y"),zhoverformat:L("z",1),hovertemplate:A.hovertemplate,texttemplate:t({},A.texttemplate,{}),textfont:t({},A.textfont,{}),hoverongaps:A.hoverongaps,connectgaps:t({},A.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:r({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:M("contour label")},operation:{valType:"enumerated",values:[].concat(a).concat(c),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:t({},u.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:g,smoothing:t({},u.smoothing,{}),editType:"plot"}},d("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},20688:function(te,X,e){var A=e(8932),P=e(19512),o=e(54444),L=e(46960);te.exports=function(d,g){var r=P(d,g),t=r[0].z;o(g,t);var s=g.contours,a=A.extractOpts(g),c;if(s.coloring==="heatmap"&&a.auto&&g.autocontour===!1){var u=s.start,l=L(s),y=s.size||1,h=Math.floor((l-u)/y)+1;isFinite(y)||(y=1,h=1);var T=u-y/2,f=T+h*y;c=[T,f]}else c=t;return A.calc(d,g,{vals:c,cLetter:"z"}),r}},56008:function(te){te.exports=function(X,e){var A=X[0],P=A.z,o;switch(e.type){case"levels":var L=Math.min(P[0][0],P[0][1]);for(o=0;o<X.length;o++){var M=X[o];M.prefixBoundary=!M.edgepaths.length&&(L>M.level||M.starts.length&&L===M.level)}break;case"constraint":if(A.prefixBoundary=!1,A.edgepaths.length)return;var d=A.x.length,g=A.y.length,r=-1/0,t=1/0;for(o=0;o<g;o++)t=Math.min(t,P[o][0]),t=Math.min(t,P[o][d-1]),r=Math.max(r,P[o][0]),r=Math.max(r,P[o][d-1]);for(o=1;o<d-1;o++)t=Math.min(t,P[0][o]),t=Math.min(t,P[g-1][o]),r=Math.max(r,P[0][o]),r=Math.max(r,P[g-1][o]);var s=e.value,a,c;switch(e._operation){case">":s>r&&(A.prefixBoundary=!0);break;case"<":(s<t||A.starts.length&&s===t)&&(A.prefixBoundary=!0);break;case"[]":a=Math.min(s[0],s[1]),c=Math.max(s[0],s[1]),(c<t||a>r||A.starts.length&&c===t)&&(A.prefixBoundary=!0);break;case"][":a=Math.min(s[0],s[1]),c=Math.max(s[0],s[1]),a<t&&c>r&&(A.prefixBoundary=!0);break}break}}},55296:function(te,X,e){var A=e(8932),P=e(41076),o=e(46960);function L(M,d,g){var r=d.contours,t=d.line,s=r.size||1,a=r.coloring,c=P(d,{isColorbar:!0});if(a==="heatmap"){var u=A.extractOpts(d);g._fillgradient=u.reversescale?A.flipScale(u.colorscale):u.colorscale,g._zrange=[u.min,u.max]}else a==="fill"&&(g._fillcolor=c);g._line={color:a==="lines"?c:t.color,width:r.showlines!==!1?t.width:0,dash:t.dash},g._levels={start:r.start,end:o(r),size:s}}te.exports={min:"zmin",max:"zmax",calc:L}},93252:function(te){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}}},95536:function(te,X,e){var A=e(38248),P=e(17428),o=e(76308),L=o.addOpacity,M=o.opacity,d=e(69104),g=e(3400).isArrayOrTypedArray,r=d.CONSTRAINT_REDUCTION,t=d.COMPARISON_OPS2;te.exports=function(c,u,l,y,h,T){var f=u.contours,n,v,m,b=l("contours.operation");if(f._operation=r[b],s(l,f),b==="="?n=f.showlines=!0:(n=l("contours.showlines"),m=l("fillcolor",L((c.line||{}).color||h,.5))),n){var E=m&&M(m)?L(u.fillcolor,1):h;v=l("line.color",E),l("line.width",2),l("line.dash")}l("line.smoothing"),P(l,y,v,T)};function s(a,c){var u;t.indexOf(c.operation)===-1?(a("contours.value",[0,1]),g(c.value)?c.value.length>2?c.value=c.value.slice(2):c.length===0?c.value=[0,1]:c.length<2?(u=parseFloat(c.value[0]),c.value=[u,u+1]):c.value=[parseFloat(c.value[0]),parseFloat(c.value[1])]:A(c.value)&&(u=parseFloat(c.value),c.value=[u,u+1])):(a("contours.value",0),A(c.value)||(g(c.value)?c.value=parseFloat(c.value[0]):c.value=0))}},3212:function(te,X,e){var A=e(69104),P=e(38248);te.exports={"[]":L("[]"),"][":L("]["),">":M(">"),"<":M("<"),"=":M("=")};function o(d,g){var r=Array.isArray(g),t;function s(a){return P(a)?+a:null}return A.COMPARISON_OPS2.indexOf(d)!==-1?t=s(r?g[0]:g):A.INTERVAL_OPS.indexOf(d)!==-1?t=r?[s(g[0]),s(g[1])]:[s(g),s(g)]:A.SET_OPS.indexOf(d)!==-1&&(t=r?g.map(s):[s(g)]),t}function L(d){return function(g){g=o(d,g);var r=Math.min(g[0],g[1]),t=Math.max(g[0],g[1]);return{start:r,end:t,size:t-r}}}function M(d){return function(g){return g=o(d,g),{start:g,end:1/0,size:1/0}}}},84952:function(te){te.exports=function(e,A,P,o){var L=o("contours.start"),M=o("contours.end"),d=L===!1||M===!1,g=P("contours.size"),r;d?r=A.autocontour=!0:r=P("autocontour",!1),(r||!g)&&P("ncontours")}},82172:function(te,X,e){var A=e(3400);te.exports=function(o,L){var M,d,g,r=function(a){return a.reverse()},t=function(a){return a};switch(L){case"=":case"<":return o;case">":for(o.length!==1&&A.warn("Contour data invalid for the specified inequality operation."),d=o[0],M=0;M<d.edgepaths.length;M++)d.edgepaths[M]=r(d.edgepaths[M]);for(M=0;M<d.paths.length;M++)d.paths[M]=r(d.paths[M]);for(M=0;M<d.starts.length;M++)d.starts[M]=r(d.starts[M]);return o;case"][":var s=r;r=t,t=s;case"[]":for(o.length!==2&&A.warn("Contour data invalid for the specified inequality range operation."),d=P(o[0]),g=P(o[1]),M=0;M<d.edgepaths.length;M++)d.edgepaths[M]=r(d.edgepaths[M]);for(M=0;M<d.paths.length;M++)d.paths[M]=r(d.paths[M]);for(M=0;M<d.starts.length;M++)d.starts[M]=r(d.starts[M]);for(;g.edgepaths.length;)d.edgepaths.push(t(g.edgepaths.shift()));for(;g.paths.length;)d.paths.push(t(g.paths.shift()));for(;g.starts.length;)d.starts.push(t(g.starts.shift()));return[d]}};function P(o){return A.extendFlat({},o,{edgepaths:A.extendDeep([],o.edgepaths),paths:A.extendDeep([],o.paths),starts:A.extendDeep([],o.starts)})}},57004:function(te,X,e){var A=e(3400),P=e(51264),o=e(31147),L=e(95536),M=e(84952),d=e(97680),g=e(39096),r=e(67104);te.exports=function(s,a,c,u){function l(f,n){return A.coerce(s,a,r,f,n)}function y(f){return A.coerce2(s,a,r,f)}var h=P(s,a,l,u);if(!h){a.visible=!1;return}o(s,a,u,l),l("xhoverformat"),l("yhoverformat"),l("text"),l("hovertext"),l("hoverongaps"),l("hovertemplate");var T=l("contours.type")==="constraint";l("connectgaps",A.isArray1D(a.z)),T?L(s,a,l,u,c):(M(s,a,l,y),d(s,a,l,u)),a.contours&&a.contours.coloring==="heatmap"&&g(l,u)}},61512:function(te,X,e){var A=e(3400),P=e(3212),o=e(46960);te.exports=function(M,d,g){for(var r=M.type==="constraint"?P[M._operation](M.value):M,t=r.size,s=[],a=o(r),c=g.trace._carpetTrace,u=c?{xaxis:c.aaxis,yaxis:c.baxis,x:g.a,y:g.b}:{xaxis:d.xaxis,yaxis:d.yaxis,x:g.x,y:g.y},l=r.start;l<a;l+=t)if(s.push(A.extendFlat({level:l,crossings:{},starts:[],edgepaths:[],paths:[],z:g.z,smoothing:g.trace.line.smoothing},u)),s.length>1e3){A.warn("Too many contours, clipping at 1000",M);break}return s}},46960:function(te){te.exports=function(e){return e.end+e.size/1e6}},88748:function(te,X,e){var A=e(3400),P=e(93252);te.exports=function(t,s,a){var c,u,l,y,h;for(s=s||.01,a=a||.01,l=0;l<t.length;l++){for(y=t[l],h=0;h<y.starts.length;h++)u=y.starts[h],M(y,u,"edge",s,a);for(c=0;Object.keys(y.crossings).length&&c<1e4;)c++,u=Object.keys(y.crossings)[0].split(",").map(Number),M(y,u,void 0,s,a);c===1e4&&A.log("Infinite loop in contour?")}};function o(r,t,s,a){return Math.abs(r[0]-t[0])<s&&Math.abs(r[1]-t[1])<a}function L(r,t){var s=r[2]-t[2],a=r[3]-t[3];return Math.sqrt(s*s+a*a)}function M(r,t,s,a,c){var u=t.join(","),l=r.crossings[u],y=d(l,s,t),h=[g(r,t,[-y[0],-y[1]])],T=r.z.length,f=r.z[0].length,n=t.slice(),v=y.slice(),m;for(m=0;m<1e4;m++){if(l>20?(l=P.CHOOSESADDLE[l][(y[0]||y[1])<0?0:1],r.crossings[u]=P.SADDLEREMAINDER[l]):delete r.crossings[u],y=P.NEWDELTA[l],!y){A.log("Found bad marching index:",l,t,r.level);break}h.push(g(r,t,y)),t[0]+=y[0],t[1]+=y[1],u=t.join(","),o(h[h.length-1],h[h.length-2],a,c)&&h.pop();var b=y[0]&&(t[0]<0||t[0]>f-2)||y[1]&&(t[1]<0||t[1]>T-2),E=t[0]===n[0]&&t[1]===n[1]&&y[0]===v[0]&&y[1]===v[1];if(E||s&&b)break;l=r.crossings[u]}m===1e4&&A.log("Infinite loop in contour?");var p=o(h[0],h[h.length-1],a,c),S=0,w=.2*r.smoothing,i=[],C=0,x,k,I,B,_,z,O,F,N,V,j;for(m=1;m<h.length;m++)O=L(h[m],h[m-1]),S+=O,i.push(O);var $=S/i.length*w;function q(G){return h[G%h.length]}for(m=h.length-2;m>=C;m--)if(x=i[m],x<$){for(I=0,k=m-1;k>=C&&x+i[k]<$;k--)x+=i[k];if(p&&m===h.length-2)for(I=0;I<k&&x+i[I]<$;I++)x+=i[I];_=m-k+I+1,z=Math.floor((m+k+I+2)/2),!p&&m===h.length-2?B=h[h.length-1]:!p&&k===-1?B=h[0]:_%2?B=q(z):B=[(q(z)[0]+q(z+1)[0])/2,(q(z)[1]+q(z+1)[1])/2],h.splice(k+1,m-k+1,B),m=k+1,I&&(C=I),p&&(m===h.length-2?h[I]=h[h.length-1]:m===0&&(h[h.length-1]=h[0]))}for(h.splice(0,C),m=0;m<h.length;m++)h[m].length=2;if(!(h.length<2))if(p)h.pop(),r.paths.push(h);else{s||A.log("Unclosed interior contour?",r.level,n.join(","),h.join("L"));var oe=!1;for(F=0;F<r.edgepaths.length;F++)if(V=r.edgepaths[F],!oe&&o(V[0],h[h.length-1],a,c)){h.pop(),oe=!0;var Z=!1;for(N=0;N<r.edgepaths.length;N++)if(j=r.edgepaths[N],o(j[j.length-1],h[0],a,c)){Z=!0,h.shift(),r.edgepaths.splice(F,1),N===F?r.paths.push(h.concat(j)):(N>F&&N--,r.edgepaths[N]=j.concat(h,V));break}Z||(r.edgepaths[F]=h.concat(V))}for(F=0;F<r.edgepaths.length&&!oe;F++)V=r.edgepaths[F],o(V[V.length-1],h[0],a,c)&&(h.shift(),r.edgepaths[F]=V.concat(h),oe=!0);oe||r.edgepaths.push(h)}}function d(r,t,s){var a=0,c=0;return r>20&&t?r===208||r===1114?a=s[0]===0?1:-1:c=s[1]===0?1:-1:P.BOTTOMSTART.indexOf(r)!==-1?c=1:P.LEFTSTART.indexOf(r)!==-1?a=1:P.TOPSTART.indexOf(r)!==-1?c=-1:a=-1,[a,c]}function g(r,t,s){var a=t[0]+Math.max(s[0],0),c=t[1]+Math.max(s[1],0),u=r.z[c][a],l=r.xaxis,y=r.yaxis;if(s[1]){var h=(r.level-u)/(r.z[c][a+1]-u),T=(h!==1?(1-h)*l.c2l(r.x[a]):0)+(h!==0?h*l.c2l(r.x[a+1]):0);return[l.c2p(l.l2c(T),!0),y.c2p(r.y[c],!0),a+h,c]}else{var f=(r.level-u)/(r.z[c+1][a]-u),n=(f!==1?(1-f)*y.c2l(r.y[c]):0)+(f!==0?f*y.c2l(r.y[c+1]):0);return[l.c2p(r.x[a],!0),y.c2p(y.l2c(n),!0),a,c+f]}}},38200:function(te,X,e){var A=e(76308),P=e(55512);te.exports=function(L,M,d,g,r){r||(r={}),r.isContour=!0;var t=P(L,M,d,g,r);return t&&t.forEach(function(s){var a=s.trace;a.contours.type==="constraint"&&(a.fillcolor&&A.opacity(a.fillcolor)?s.color=A.addOpacity(a.fillcolor,1):a.contours.showlines&&A.opacity(a.line.color)&&(s.color=A.addOpacity(a.line.color,1)))}),t}},66240:function(te,X,e){te.exports={attributes:e(67104),supplyDefaults:e(57004),calc:e(20688),plot:e(23676).plot,style:e(52440),colorbar:e(55296),hoverPoints:e(38200),moduleType:"trace",name:"contour",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},17428:function(te,X,e){var A=e(3400);te.exports=function(o,L,M,d){d||(d={});var g=o("contours.showlabels");if(g){var r=L.font;A.coerceFont(o,"contours.labelfont",{family:r.family,size:r.size,color:M}),o("contours.labelformat")}d.hasHover!==!1&&o("zhoverformat")}},41076:function(te,X,e){var A=e(33428),P=e(8932),o=e(46960);te.exports=function(M){var d=M.contours,g=d.start,r=o(d),t=d.size||1,s=Math.floor((r-g)/t)+1,a=d.coloring==="lines"?0:1,c=P.extractOpts(M);isFinite(t)||(t=1,s=1);var u=c.reversescale?P.flipScale(c.colorscale):c.colorscale,l=u.length,y=new Array(l),h=new Array(l),T,f,n=c.min,v=c.max;if(d.coloring==="heatmap"){for(f=0;f<l;f++)T=u[f],y[f]=T[0]*(v-n)+n,h[f]=T[1];var m=A.extent([n,v,d.start,d.start+t*(s-1)]),b=m[n<v?0:1],E=m[n<v?1:0];b!==n&&(y.splice(0,0,b),h.splice(0,0,h[0])),E!==v&&(y.push(E),h.push(h[h.length-1]))}else{var p=M._input&&typeof M._input.zmin=="number"&&typeof M._input.zmax=="number";for(p&&(g<=n||r>=v)&&(g<=n&&(g=n),r>=v&&(r=v),s=Math.floor((r-g)/t)+1,a=0),f=0;f<l;f++)T=u[f],y[f]=(T[0]*(s+a-1)-a/2)*t+g,h[f]=T[1];(p||M.autocontour)&&(y[0]>n&&(y.unshift(n),h.unshift(h[0])),y[y.length-1]<v&&(y.push(v),h.push(h[h.length-1])))}return P.makeColorScaleFunc({domain:y,range:h},{noNumericCheck:!0})}},72424:function(te,X,e){var A=e(93252);te.exports=function(L){var M=L[0].z,d=M.length,g=M[0].length,r=d===2||g===2,t,s,a,c,u,l,y,h,T;for(s=0;s<d-1;s++)for(c=[],s===0&&(c=c.concat(A.BOTTOMSTART)),s===d-2&&(c=c.concat(A.TOPSTART)),t=0;t<g-1;t++)for(a=c.slice(),t===0&&(a=a.concat(A.LEFTSTART)),t===g-2&&(a=a.concat(A.RIGHTSTART)),u=t+","+s,l=[[M[s][t],M[s][t+1]],[M[s+1][t],M[s+1][t+1]]],T=0;T<L.length;T++)h=L[T],y=P(h.level,l),y&&(h.crossings[u]=y,a.indexOf(y)!==-1&&(h.starts.push([t,s]),r&&a.indexOf(y,a.indexOf(y)+1)!==-1&&h.starts.push([t,s])))};function P(o,L){var M=(L[0][0]>o?0:1)+(L[0][1]>o?0:2)+(L[1][1]>o?0:4)+(L[1][0]>o?0:8);if(M===5||M===10){var d=(L[0][0]+L[0][1]+L[1][0]+L[1][1])/4;return o>d?M===5?713:1114:M===5?104:208}return M===15?0:M}},23676:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(8932),M=e(72736),d=e(54460),g=e(78344),r=e(41420),t=e(72424),s=e(88748),a=e(61512),c=e(82172),u=e(56008),l=e(93252),y=l.LABELOPTIMIZER;X.plot=function(p,S,w,i){var C=S.xaxis,x=S.yaxis;P.makeTraceGroups(i,w,"contour").each(function(k){var I=A.select(this),B=k[0],_=B.trace,z=B.x,O=B.y,F=_.contours,N=a(F,S,B),V=P.ensureSingle(I,"g","heatmapcoloring"),j=[];F.coloring==="heatmap"&&(j=[k]),r(p,S,j,V),t(N),s(N);var $=C.c2p(z[0],!0),q=C.c2p(z[z.length-1],!0),oe=x.c2p(O[0],!0),Z=x.c2p(O[O.length-1],!0),G=[[$,Z],[q,Z],[q,oe],[$,oe]],re=N;F.type==="constraint"&&(re=c(N,F._operation)),h(I,G,F),T(I,re,G,F),n(I,N,p,B,F),m(I,S,p,B,G)})};function h(E,p,S){var w=P.ensureSingle(E,"g","contourbg"),i=w.selectAll("path").data(S.coloring==="fill"?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+p.join("L")+"Z").style("stroke","none")}function T(E,p,S,w){var i=w.coloring==="fill"||w.type==="constraint"&&w._operation!=="=",C="M"+S.join("L")+"Z";i&&u(p,w);var x=P.ensureSingle(E,"g","contourfill"),k=x.selectAll("path").data(i?p:[]);k.enter().append("path"),k.exit().remove(),k.each(function(I){var B=(I.prefixBoundary?C:"")+f(I,S);B?A.select(this).attr("d",B).style("stroke","none"):A.select(this).remove()})}function f(E,p){var S="",w=0,i=E.edgepaths.map(function($,q){return q}),C=!0,x,k,I,B,_,z;function O($){return Math.abs($[1]-p[0][1])<.01}function F($){return Math.abs($[1]-p[2][1])<.01}function N($){return Math.abs($[0]-p[0][0])<.01}function V($){return Math.abs($[0]-p[2][0])<.01}for(;i.length;){for(z=o.smoothopen(E.edgepaths[w],E.smoothing),S+=C?z:z.replace(/^M/,"L"),i.splice(i.indexOf(w),1),x=E.edgepaths[w][E.edgepaths[w].length-1],B=-1,I=0;I<4;I++){if(!x){P.log("Missing end?",w,E);break}for(O(x)&&!V(x)?k=p[1]:N(x)?k=p[0]:F(x)?k=p[3]:V(x)&&(k=p[2]),_=0;_<E.edgepaths.length;_++){var j=E.edgepaths[_][0];Math.abs(x[0]-k[0])<.01?Math.abs(x[0]-j[0])<.01&&(j[1]-x[1])*(k[1]-j[1])>=0&&(k=j,B=_):Math.abs(x[1]-k[1])<.01?Math.abs(x[1]-j[1])<.01&&(j[0]-x[0])*(k[0]-j[0])>=0&&(k=j,B=_):P.log("endpt to newendpt is not vert. or horz.",x,k,j)}if(x=k,B>=0)break;S+="L"+k}if(B===E.edgepaths.length){P.log("unclosed perimeter path");break}w=B,C=i.indexOf(w)===-1,C&&(w=i[0],S+="Z")}for(w=0;w<E.paths.length;w++)S+=o.smoothclosed(E.paths[w],E.smoothing);return S}function n(E,p,S,w,i){var C=S._context.staticPlot,x=P.ensureSingle(E,"g","contourlines"),k=i.showlines!==!1,I=i.showlabels,B=k&&I,_=X.createLines(x,k||I,p,C),z=X.createLineClip(x,B,S,w.trace.uid),O=E.selectAll("g.contourlabels").data(I?[0]:[]);if(O.exit().remove(),O.enter().append("g").classed("contourlabels",!0),I){var F=[],N=[];P.clearLocationCache();var V=X.labelFormatter(S,w),j=o.tester.append("text").attr("data-notex",1).call(o.font,i.labelfont),$=p[0].xaxis,q=p[0].yaxis,oe=$._length,Z=q._length,G=$.range,re=q.range,H=P.aggNums(Math.min,null,w.x),J=P.aggNums(Math.max,null,w.x),ae=P.aggNums(Math.min,null,w.y),K=P.aggNums(Math.max,null,w.y),Y=Math.max($.c2p(H,!0),0),ie=Math.min($.c2p(J,!0),oe),ne=Math.max(q.c2p(K,!0),0),le=Math.min(q.c2p(ae,!0),Z),de={};G[0]<G[1]?(de.left=Y,de.right=ie):(de.left=ie,de.right=Y),re[0]<re[1]?(de.top=ne,de.bottom=le):(de.top=le,de.bottom=ne),de.middle=(de.top+de.bottom)/2,de.center=(de.left+de.right)/2,F.push([[de.left,de.top],[de.right,de.top],[de.right,de.bottom],[de.left,de.bottom]]);var we=Math.sqrt(oe*oe+Z*Z),me=l.LABELDISTANCE*we/Math.max(1,p.length/l.LABELINCREASE);_.each(function(Le){var ve=X.calcTextOpts(Le.level,V,j,S);A.select(this).selectAll("path").each(function(){var Ae=this,ye=P.getVisibleSegment(Ae,de,ve.height/2);if(ye&&!(ye.len<(ve.width+ve.height)*l.LABELMIN))for(var Se=Math.min(Math.ceil(ye.len/me),l.LABELMAX),_e=0;_e<Se;_e++){var ze=X.findBestTextLocation(Ae,ye,ve,N,de);if(!ze)break;X.addLabelData(ze,ve,N,F)}})}),j.remove(),X.drawLabels(O,N,S,z,B?F:null)}I&&!k&&_.remove()}X.createLines=function(E,p,S,w){var i=S[0].smoothing,C=E.selectAll("g.contourlevel").data(p?S:[]);if(C.exit().remove(),C.enter().append("g").classed("contourlevel",!0),p){var x=C.selectAll("path.openline").data(function(I){return I.pedgepaths||I.edgepaths});x.exit().remove(),x.enter().append("path").classed("openline",!0),x.attr("d",function(I){return o.smoothopen(I,i)}).style("stroke-miterlimit",1).style("vector-effect",w?"none":"non-scaling-stroke");var k=C.selectAll("path.closedline").data(function(I){return I.ppaths||I.paths});k.exit().remove(),k.enter().append("path").classed("closedline",!0),k.attr("d",function(I){return o.smoothclosed(I,i)}).style("stroke-miterlimit",1).style("vector-effect",w?"none":"non-scaling-stroke")}return C},X.createLineClip=function(E,p,S,w){var i=S._fullLayout._clips,C=p?"clipline"+w:null,x=i.selectAll("#"+C).data(p?[0]:[]);return x.exit().remove(),x.enter().append("clipPath").classed("contourlineclip",!0).attr("id",C),o.setClipUrl(E,C,S),x},X.labelFormatter=function(E,p){var S=E._fullLayout,w=p.trace,i=w.contours,C={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(i.labelformat)C.tickformat=i.labelformat,g(C,S);else{var x=L.extractOpts(w);if(x&&x.colorbar&&x.colorbar._axis)C=x.colorbar._axis;else{if(i.type==="constraint"){var k=i.value;P.isArrayOrTypedArray(k)?C.range=[k[0],k[k.length-1]]:C.range=[k,k]}else C.range=[i.start,i.end],C.nticks=(i.end-i.start)/i.size;C.range[0]===C.range[1]&&(C.range[1]+=C.range[0]||1),C.nticks||(C.nticks=1e3),g(C,S),d.prepTicks(C),C._tmin=null,C._tmax=null}}return function(I){return d.tickText(C,I).text}},X.calcTextOpts=function(E,p,S,w){var i=p(E);S.text(i).call(M.convertToTspans,w);var C=S.node(),x=o.bBox(C,!0);return{text:i,width:x.width,height:x.height,fontSize:+C.style["font-size"].replace("px",""),level:E,dy:(x.top+x.bottom)/2}},X.findBestTextLocation=function(E,p,S,w,i){var C=S.width,x,k,I,B,_;p.isClosed?(k=p.len/y.INITIALSEARCHPOINTS,x=p.min+k/2,I=p.max):(k=(p.len-C)/(y.INITIALSEARCHPOINTS+1),x=p.min+k+C/2,I=p.max-(k+C)/2);for(var z=1/0,O=0;O<y.ITERATIONS;O++){for(var F=x;F<I;F+=k){var N=P.getTextLocation(E,p.total,F,C),V=v(N,S,w,i);V<z&&(z=V,_=N,B=F)}if(z>y.MAXCOST*2)break;O&&(k/=2),x=B-k/2,I=x+k*1.5}if(z<=y.MAXCOST)return _};function v(E,p,S,w){var i=p.width/2,C=p.height/2,x=E.x,k=E.y,I=E.theta,B=Math.cos(I)*i,_=Math.sin(I)*i,z=(x>w.center?w.right-x:x-w.left)/(B+Math.abs(Math.sin(I)*C)),O=(k>w.middle?w.bottom-k:k-w.top)/(Math.abs(_)+Math.cos(I)*C);if(z<1||O<1)return 1/0;var F=y.EDGECOST*(1/(z-1)+1/(O-1));F+=y.ANGLECOST*I*I;for(var N=x-B,V=k-_,j=x+B,$=k+_,q=0;q<S.length;q++){var oe=S[q],Z=Math.cos(oe.theta)*oe.width/2,G=Math.sin(oe.theta)*oe.width/2,re=P.segmentDistance(N,V,j,$,oe.x-Z,oe.y-G,oe.x+Z,oe.y+G)*2/(p.height+oe.height),H=oe.level===p.level,J=H?y.SAMELEVELDISTANCE:1;if(re<=J)return 1/0;var ae=y.NEIGHBORCOST*(H?y.SAMELEVELFACTOR:1);F+=ae/(re-J)}return F}X.addLabelData=function(E,p,S,w){var i=p.fontSize,C=p.width+i/3,x=Math.max(0,p.height-i/3),k=E.x,I=E.y,B=E.theta,_=Math.sin(B),z=Math.cos(B),O=function(N,V){return[k+N*z-V*_,I+N*_+V*z]},F=[O(-C/2,-x/2),O(-C/2,x/2),O(C/2,x/2),O(C/2,-x/2)];S.push({text:p.text,x:k,y:I,dy:p.dy,theta:B,level:p.level,width:C,height:x}),w.push(F)},X.drawLabels=function(E,p,S,w,i){var C=E.selectAll("text").data(p,function(B){return B.text+","+B.x+","+B.y+","+B.theta});if(C.exit().remove(),C.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(B){var _=B.x+Math.sin(B.theta)*B.dy,z=B.y-Math.cos(B.theta)*B.dy;A.select(this).text(B.text).attr({x:_,y:z,transform:"rotate("+180*B.theta/Math.PI+" "+_+" "+z+")"}).call(M.convertToTspans,S)}),i){for(var x="",k=0;k<i.length;k++)x+="M"+i[k].join("L")+"Z";var I=P.ensureSingle(w,"path","");I.attr("d",x)}};function m(E,p,S,w,i){var C=w.trace,x=S._fullLayout._clips,k="clip"+C.uid,I=x.selectAll("#"+k).data(C.connectgaps?[]:[0]);if(I.enter().append("clipPath").classed("contourclip",!0).attr("id",k),I.exit().remove(),C.connectgaps===!1){var B={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:p.xaxis,yaxis:p.yaxis,x:w.x,y:w.y,z:b(w),smoothing:0};t([B]),s([B]),u([B],{type:"levels"});var _=P.ensureSingle(I,"path","");_.attr("d",(B.prefixBoundary?"M"+i.join("L")+"Z":"")+f(B,i))}else k=null;o.setClipUrl(E,k,S)}function b(E){var p=E.trace._emptypoints,S=[],w=E.z.length,i=E.z[0].length,C,x=[],k;for(C=0;C<i;C++)x.push(1);for(C=0;C<w;C++)S.push(x.slice());for(C=0;C<p.length;C++)k=p[C],S[k[0]][k[1]]=0;return E.zmask=S,S}},54444:function(te,X,e){var A=e(54460),P=e(3400);te.exports=function(M,d){var g=M.contours;if(M.autocontour){var r=M.zmin,t=M.zmax;(M.zauto||r===void 0)&&(r=P.aggNums(Math.min,null,d)),(M.zauto||t===void 0)&&(t=P.aggNums(Math.max,null,d));var s=o(r,t,M.ncontours);g.size=s.dtick,g.start=A.tickFirst(s),s.range.reverse(),g.end=A.tickFirst(s),g.start===r&&(g.start+=g.size),g.end===t&&(g.end-=g.size),g.start>g.end&&(g.start=g.end=(g.start+g.end)/2),M._input.contours||(M._input.contours={}),P.extendFlat(M._input.contours,{start:g.start,end:g.end,size:g.size}),M._input.autocontour=!0}else if(g.type!=="constraint"){var a=g.start,c=g.end,u=M._input.contours;if(a>c&&(g.start=u.start=c,c=g.end=u.end=a,a=g.start),!(g.size>0)){var l;a===c?l=1:l=o(a,c,M.ncontours).dtick,u.size=g.size=l}}};function o(L,M,d){var g={type:"linear",range:[L,M]};return A.autoTicks(g,(M-L)/(d||15)),g}},52440:function(te,X,e){var A=e(33428),P=e(43616),o=e(41648),L=e(41076);te.exports=function(d){var g=A.select(d).selectAll("g.contour");g.style("opacity",function(r){return r[0].trace.opacity}),g.each(function(r){var t=A.select(this),s=r[0].trace,a=s.contours,c=s.line,u=a.size||1,l=a.start,y=a.type==="constraint",h=!y&&a.coloring==="lines",T=!y&&a.coloring==="fill",f=h||T?L(s):null;t.selectAll("g.contourlevel").each(function(m){A.select(this).selectAll("path").call(P.lineGroupStyle,c.width,h?f(m.level):c.color,c.dash)});var n=a.labelfont;if(t.selectAll("g.contourlabels text").each(function(m){P.font(A.select(this),{family:n.family,size:n.size,color:n.color||(h?f(m.level):c.color)})}),y)t.selectAll("g.contourfill path").style("fill",s.fillcolor);else if(T){var v;t.selectAll("g.contourfill path").style("fill",function(m){return v===void 0&&(v=m.level),f(m.level+.5*u)}),v===void 0&&(v=l),t.selectAll("g.contourbg path").style("fill",f(v-.5*u))}}),o(d)}},97680:function(te,X,e){var A=e(27260),P=e(17428);te.exports=function(L,M,d,g,r){var t=d("contours.coloring"),s,a="";t==="fill"&&(s=d("contours.showlines")),s!==!1&&(t!=="lines"&&(a=d("line.color","#000")),d("line.width",.5),d("line.dash")),t!=="none"&&(L.showlegend!==!0&&(M.showlegend=!1),M._dfltShowLegend=!1,A(L,M,g,d,{prefix:"",cLetter:"z"})),d("line.smoothing"),P(d,g,a,r)}},37960:function(te,X,e){var A=e(83328),P=e(67104),o=e(49084),L=e(92880).extendFlat,M=P.contours;te.exports=L({carpet:{valType:"string",editType:"calc"},z:A.z,a:A.x,a0:A.x0,da:A.dx,b:A.y,b0:A.y0,db:A.dy,text:A.text,hovertext:A.hovertext,transpose:A.transpose,atype:A.xtype,btype:A.ytype,fillcolor:P.fillcolor,autocontour:P.autocontour,ncontours:P.ncontours,contours:{type:M.type,start:M.start,end:M.end,size:M.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:M.showlines,showlabels:M.showlabels,labelfont:M.labelfont,labelformat:M.labelformat,operation:M.operation,value:M.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:P.line.color,width:P.line.width,dash:P.line.dash,smoothing:P.line.smoothing,editType:"plot"},transforms:void 0},o("",{cLetter:"z",autoColorDflt:!1}))},30572:function(te,X,e){var A=e(47128),P=e(3400),o=e(2872),L=e(26136),M=e(70448),d=e(11240),g=e(35744),r=e(3252),t=e(50948),s=e(54444);te.exports=function(u,l){var y=l._carpetTrace=t(u,l);if(!(!y||!y.visible||y.visible==="legendonly")){if(!l.a||!l.b){var h=u.data[y.index],T=u.data[l.index];T.a||(T.a=h.a),T.b||(T.b=h.b),r(T,l,l._defaultColor,u._fullLayout)}var f=a(u,l);return s(l,l._z),f}};function a(c,u){var l=u._carpetTrace,y=l.aaxis,h=l.baxis,T,f,n,v,m,b,E;y._minDtick=0,h._minDtick=0,P.isArray1D(u.z)&&o(u,y,h,"a","b",["z"]),T=u._a=u._a||u.a,v=u._b=u._b||u.b,T=T?y.makeCalcdata(u,"_a"):[],v=v?h.makeCalcdata(u,"_b"):[],f=u.a0||0,n=u.da||1,m=u.b0||0,b=u.db||1,E=u._z=L(u._z||u.z,u.transpose),u._emptypoints=d(E),M(E,u._emptypoints);var p=P.maxRowLength(E),S=u.xtype==="scaled"?"":T,w=g(u,S,f,n,p,y),i=u.ytype==="scaled"?"":v,C=g(u,i,m,b,E.length,h),x={a:w,b:C,z:E};return u.contours.type==="levels"&&u.contours.coloring!=="none"&&A(c,u,{vals:E,containerStr:"",cLetter:"z"}),[x]}},3252:function(te,X,e){var A=e(3400),P=e(51264),o=e(37960),L=e(95536),M=e(84952),d=e(97680);te.exports=function(r,t,s,a){function c(h,T){return A.coerce(r,t,o,h,T)}function u(h){return A.coerce2(r,t,o,h)}if(c("carpet"),r.a&&r.b){var l=P(r,t,c,a,"a","b");if(!l){t.visible=!1;return}c("text");var y=c("contours.type")==="constraint";y?L(r,t,c,a,s,{hasHover:!1}):(M(r,t,c,u),d(r,t,c,a,{hasHover:!1}))}else t._defaultColor=s,t._length=null}},40448:function(te,X,e){te.exports={attributes:e(37960),supplyDefaults:e(3252),colorbar:e(55296),calc:e(30572),plot:e(94440),style:e(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:e(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(te,X,e){var A=e(33428),P=e(87072),o=e(53416),L=e(43616),M=e(3400),d=e(72424),g=e(88748),r=e(23676),t=e(93252),s=e(82172),a=e(61512),c=e(56008),u=e(50948),l=e(77712);te.exports=function(S,w,i,C){var x=w.xaxis,k=w.yaxis;M.makeTraceGroups(C,i,"contour").each(function(I){var B=A.select(this),_=I[0],z=_.trace,O=z._carpetTrace=u(S,z),F=S.calcdata[O.index][0];if(!O.visible||O.visible==="legendonly")return;var N=_.a,V=_.b,j=z.contours,$=a(j,w,_),q=j.type==="constraint",oe=j._operation,Z=q?oe==="="?"lines":"fill":j.coloring;function G(we){var me=O.ab2xy(we[0],we[1],!0);return[x.c2p(me[0]),k.c2p(me[1])]}var re=[[N[0],V[V.length-1]],[N[N.length-1],V[V.length-1]],[N[N.length-1],V[0]],[N[0],V[0]]];d($);var H=(N[N.length-1]-N[0])*1e-8,J=(V[V.length-1]-V[0])*1e-8;g($,H,J);var ae=$;j.type==="constraint"&&(ae=s($,oe)),y($,G);var K,Y,ie,ne,le=[];for(ne=F.clipsegments.length-1;ne>=0;ne--)K=F.clipsegments[ne],Y=P([],K.x,x.c2p),ie=P([],K.y,k.c2p),Y.reverse(),ie.reverse(),le.push(o(Y,ie,K.bicubic));var de="M"+le.join("L")+"Z";m(B,F.clipsegments,x,k,q,Z),b(z,B,x,k,ae,re,G,O,F,Z,de),h(B,$,S,_,j,w,O),L.setClipUrl(B,O._clipPathId,S)})};function y(p,S){var w,i,C,x,k,I,B,_,z;for(w=0;w<p.length;w++){for(x=p[w],k=x.pedgepaths=[],I=x.ppaths=[],i=0;i<x.edgepaths.length;i++){for(z=x.edgepaths[i],B=[],C=0;C<z.length;C++)B[C]=S(z[C]);k.push(B)}for(i=0;i<x.paths.length;i++){for(z=x.paths[i],_=[],C=0;C<z.length;C++)_[C]=S(z[C]);I.push(_)}}}function h(p,S,w,i,C,x,k){var I=w._context.staticPlot,B=M.ensureSingle(p,"g","contourlines"),_=C.showlines!==!1,z=C.showlabels,O=_&&z,F=r.createLines(B,_||z,S,I),N=r.createLineClip(B,O,w,i.trace.uid),V=p.selectAll("g.contourlabels").data(z?[0]:[]);if(V.exit().remove(),V.enter().append("g").classed("contourlabels",!0),z){var j=x.xaxis,$=x.yaxis,q=j._length,oe=$._length,Z=[[[0,0],[q,0],[q,oe],[0,oe]]],G=[];M.clearLocationCache();var re=r.labelFormatter(w,i),H=L.tester.append("text").attr("data-notex",1).call(L.font,C.labelfont),J={left:0,right:q,center:q/2,top:0,bottom:oe,middle:oe/2},ae=Math.sqrt(q*q+oe*oe),K=t.LABELDISTANCE*ae/Math.max(1,S.length/t.LABELINCREASE);F.each(function(Y){var ie=r.calcTextOpts(Y.level,re,H,w);A.select(this).selectAll("path").each(function(ne){var le=this,de=M.getVisibleSegment(le,J,ie.height/2);if(de&&(T(le,ne,Y,de,k,ie.height),!(de.len<(ie.width+ie.height)*t.LABELMIN)))for(var we=Math.min(Math.ceil(de.len/K),t.LABELMAX),me=0;me<we;me++){var Le=r.findBestTextLocation(le,de,ie,G,J);if(!Le)break;r.addLabelData(Le,ie,G,Z)}})}),H.remove(),r.drawLabels(V,G,w,N,O?Z:null)}z&&!_&&F.remove()}function T(p,S,w,i,C,x){for(var k,I=0;I<w.pedgepaths.length;I++)S===w.pedgepaths[I]&&(k=w.edgepaths[I]);if(!k)return;var B=C.a[0],_=C.a[C.a.length-1],z=C.b[0],O=C.b[C.b.length-1];function F(q,oe){var Z=0,G,re=.1;return(Math.abs(q[0]-B)<re||Math.abs(q[0]-_)<re)&&(G=n(C.dxydb_rough(q[0],q[1],re)),Z=Math.max(Z,x*v(oe,G)/2)),(Math.abs(q[1]-z)<re||Math.abs(q[1]-O)<re)&&(G=n(C.dxyda_rough(q[0],q[1],re)),Z=Math.max(Z,x*v(oe,G)/2)),Z}var N=f(p,0,1),V=f(p,i.total,i.total-1),j=F(k[0],N),$=i.total-F(k[k.length-1],V);i.min<j&&(i.min=j),i.max>$&&(i.max=$),i.len=i.max-i.min}function f(p,S,w){var i=p.getPointAtLength(S),C=p.getPointAtLength(w),x=C.x-i.x,k=C.y-i.y,I=Math.sqrt(x*x+k*k);return[x/I,k/I]}function n(p){var S=Math.sqrt(p[0]*p[0]+p[1]*p[1]);return[p[0]/S,p[1]/S]}function v(p,S){var w=Math.abs(p[0]*S[0]+p[1]*S[1]),i=Math.sqrt(1-w*w);return i/w}function m(p,S,w,i,C,x){var k,I,B,_,z=M.ensureSingle(p,"g","contourbg"),O=z.selectAll("path").data(x==="fill"&&!C?[0]:[]);O.enter().append("path"),O.exit().remove();var F=[];for(_=0;_<S.length;_++)k=S[_],I=P([],k.x,w.c2p),B=P([],k.y,i.c2p),F.push(o(I,B,k.bicubic));O.attr("d","M"+F.join("L")+"Z").style("stroke","none")}function b(p,S,w,i,C,x,k,I,B,_,z){var O=_==="fill";O&&c(C,p.contours);var F=M.ensureSingle(S,"g","contourfill"),N=F.selectAll("path").data(O?C:[]);N.enter().append("path"),N.exit().remove(),N.each(function(V){var j=(V.prefixBoundary?z:"")+E(p,V,x,k,I,B,w,i);j?A.select(this).attr("d",j).style("stroke","none"):A.select(this).remove()})}function E(p,S,w,i,C,x,k,I){var B,_="",z=S.edgepaths.map(function(ie,ne){return ne}),O=!0,F,N,V,j,$,q,oe=Math.abs(w[0][0]-w[2][0])*1e-4,Z=Math.abs(w[0][1]-w[2][1])*1e-4;function G(ie){return Math.abs(ie[1]-w[0][1])<Z}function re(ie){return Math.abs(ie[1]-w[2][1])<Z}function H(ie){return Math.abs(ie[0]-w[0][0])<oe}function J(ie){return Math.abs(ie[0]-w[2][0])<oe}function ae(ie,ne){var le,de,we,me,Le="";for(G(ie)&&!J(ie)||re(ie)&&!H(ie)?(me=C.aaxis,we=l(C,x,[ie[0],ne[0]],.5*(ie[1]+ne[1]))):(me=C.baxis,we=l(C,x,.5*(ie[0]+ne[0]),[ie[1],ne[1]])),le=1;le<we.length;le++)for(Le+=me.smoothing?"C":"L",de=0;de<we[le].length;de++){var ve=we[le][de];Le+=[k.c2p(ve[0]),I.c2p(ve[1])]+" "}return Le}for(B=0,F=null;z.length;){var K=S.edgepaths[B][0];for(F&&(_+=ae(F,K)),q=L.smoothopen(S.edgepaths[B].map(i),S.smoothing),_+=O?q:q.replace(/^M/,"L"),z.splice(z.indexOf(B),1),F=S.edgepaths[B][S.edgepaths[B].length-1],j=-1,V=0;V<4;V++){if(!F){M.log("Missing end?",B,S);break}for(G(F)&&!J(F)?N=w[1]:H(F)?N=w[0]:re(F)?N=w[3]:J(F)&&(N=w[2]),$=0;$<S.edgepaths.length;$++){var Y=S.edgepaths[$][0];Math.abs(F[0]-N[0])<oe?Math.abs(F[0]-Y[0])<oe&&(Y[1]-F[1])*(N[1]-Y[1])>=0&&(N=Y,j=$):Math.abs(F[1]-N[1])<Z?Math.abs(F[1]-Y[1])<Z&&(Y[0]-F[0])*(N[0]-Y[0])>=0&&(N=Y,j=$):M.log("endpt to newendpt is not vert. or horz.",F,N,Y)}if(j>=0)break;_+=ae(F,N),F=N}if(j===S.edgepaths.length){M.log("unclosed perimeter path");break}B=j,O=z.indexOf(B)===-1,O&&(B=z[0],_+=ae(F,N)+"Z",F=null)}for(B=0;B<S.paths.length;B++)_+=L.smoothclosed(S.paths[B].map(i),S.smoothing);return _}},33928:function(te,X,e){var A=e(49084),P=e(21776).Ks,o=e(45464),L=e(31512),M=e(92880).extendFlat;te.exports=M({lon:L.lon,lat:L.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:L.text,hovertext:L.hovertext,hoverinfo:M({},o.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:P(),showlegend:M({},o.showlegend,{dflt:!1})},A("",{cLetter:"z",editTypeOverride:"calc"}))},90876:function(te,X,e){var A=e(38248),P=e(3400).isArrayOrTypedArray,o=e(39032).BADNUM,L=e(47128),M=e(3400)._;te.exports=function(g,r){for(var t=r._length,s=new Array(t),a=r.z,c=P(a)&&a.length,u=0;u<t;u++){var l=s[u]={},y=r.lon[u],h=r.lat[u];if(l.lonlat=A(y)&&A(h)?[+y,+h]:[o,o],c){var T=a[u];l.z=A(T)?T:o}}return L(g,r,{vals:c?a:[0,1],containerStr:"",cLetter:"z"}),t&&(s[0].t={labels:{lat:M(g,"lat:")+" ",lon:M(g,"lon:")+" "}}),s}},4629:function(te,X,e){var A=e(38248),P=e(3400),o=e(76308),L=e(8932),M=e(39032).BADNUM,d=e(44808).makeBlank;te.exports=function(r){var t=r[0].trace,s=t.visible===!0&&t._length!==0,a={layout:{visibility:"none"},paint:{}},c=t._opts={heatmap:a,geojson:d()};if(!s)return c;var u=[],l,y=t.z,h=t.radius,T=P.isArrayOrTypedArray(y)&&y.length,f=P.isArrayOrTypedArray(h);for(l=0;l<r.length;l++){var n=r[l],v=n.lonlat;if(v[0]!==M){var m={};if(T){var b=n.z;m.z=b!==M?b:0}f&&(m.r=A(h[l])&&h[l]>0?+h[l]:0),u.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:m})}}var E=L.extractOpts(t),p=E.reversescale?L.flipScale(E.colorscale):E.colorscale,S=p[0][1],w=o.opacity(S)<1?S:o.addOpacity(S,0),i=["interpolate",["linear"],["heatmap-density"],0,w];for(l=1;l<p.length;l++)i.push(p[l][0],p[l][1]);var C=["interpolate",["linear"],["get","z"],E.min,0,E.max,1];return P.extendFlat(c.heatmap.paint,{"heatmap-weight":T?C:1/(E.max-E.min),"heatmap-color":i,"heatmap-radius":f?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:u},c.heatmap.layout.visibility="visible",c}},97664:function(te,X,e){var A=e(3400),P=e(27260),o=e(33928);te.exports=function(M,d,g,r){function t(u,l){return A.coerce(M,d,o,u,l)}var s=t("lon")||[],a=t("lat")||[],c=Math.min(s.length,a.length);if(!c){d.visible=!1;return}d._length=c,t("z"),t("radius"),t("below"),t("text"),t("hovertext"),t("hovertemplate"),P(M,d,r,t,{prefix:"",cLetter:"z"})}},96176:function(te){te.exports=function(e,A){return e.lon=A.lon,e.lat=A.lat,e.z=A.z,e}},25336:function(te,X,e){var A=e(54460),P=e(63312).hoverPoints,o=e(63312).getExtraText;te.exports=function(M,d,g){var r=P(M,d,g);if(r){var t=r[0],s=t.cd,a=s[0].trace,c=s[t.index];if(delete t.color,"z"in c){var u=t.subplot.mockAxis;t.z=c.z,t.zLabel=A.tickText(u,u.c2l(c.z),"hover").text}return t.extraText=o(a,c,s[0].t.labels),[t]}}},15088:function(te,X,e){te.exports={attributes:e(33928),supplyDefaults:e(97664),colorbar:e(96288),formatLabels:e(11960),calc:e(90876),plot:e(35256),hoverPoints:e(25336),eventData:e(96176),getBelow:function(A,P){for(var o=P.getMapLayers(),L=0;L<o.length;L++){var M=o[L],d=M.id;if(M.type==="symbol"&&typeof d=="string"&&d.indexOf("plotly-")===-1)return d}},moduleType:"trace",name:"densitymapbox",basePlotModule:e(33688),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},35256:function(te,X,e){var A=e(4629),P=e(47552).traceLayerPrefix;function o(M,d){this.type="densitymapbox",this.subplot=M,this.uid=d,this.sourceId="source-"+d,this.layerList=[["heatmap",P+d+"-heatmap"]],this.below=null}var L=o.prototype;L.update=function(M){var d=this.subplot,g=this.layerList,r=A(M),t=d.belowLookup["trace-"+this.uid];d.map.getSource(this.sourceId).setData(r.geojson),t!==this.below&&(this._removeLayers(),this._addLayers(r,t),this.below=t);for(var s=0;s<g.length;s++){var a=g[s],c=a[0],u=a[1],l=r[c];d.setOptions(u,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&d.setOptions(u,"setPaintProperty",l.paint)}},L._addLayers=function(M,d){for(var g=this.subplot,r=this.layerList,t=this.sourceId,s=0;s<r.length;s++){var a=r[s],c=a[0],u=M[c];g.addLayer({type:c,id:a[1],source:t,layout:u.layout,paint:u.paint},d)}},L._removeLayers=function(){for(var M=this.subplot.map,d=this.layerList,g=d.length-1;g>=0;g--)M.removeLayer(d[g][1])},L.dispose=function(){var M=this.subplot.map;this._removeLayers(),M.removeSource(this.sourceId)},te.exports=function(d,g){var r=g[0].trace,t=new o(d,r.uid),s=t.sourceId,a=A(g),c=t.below=d.belowLookup["trace-"+r.uid];return d.map.addSource(s,{type:"geojson",data:a.geojson}),t._addLayers(a,c),t}},74248:function(te,X,e){var A=e(3400);te.exports=function(o,L){for(var M=0;M<o.length;M++)o[M].i=M;A.mergeArray(L.text,o,"tx"),A.mergeArray(L.hovertext,o,"htx");var d=L.marker;if(d){A.mergeArray(d.opacity,o,"mo"),A.mergeArray(d.color,o,"mc");var g=d.line;g&&(A.mergeArray(g.color,o,"mlc"),A.mergeArrayCastPositive(g.width,o,"mlw"))}}},20088:function(te,X,e){var A=e(20832),P=e(52904).line,o=e(45464),L=e(29736).axisHoverFormat,M=e(21776).Ks,d=e(21776).Gw,g=e(74732),r=e(92880).extendFlat,t=e(76308);te.exports={x:A.x,x0:A.x0,dx:A.dx,y:A.y,y0:A.y0,dy:A.dy,xperiod:A.xperiod,yperiod:A.yperiod,xperiod0:A.xperiod0,yperiod0:A.yperiod0,xperiodalignment:A.xperiodalignment,yperiodalignment:A.yperiodalignment,xhoverformat:L("x"),yhoverformat:L("y"),hovertext:A.hovertext,hovertemplate:M({},{keys:g.eventDataKeys}),hoverinfo:r({},o.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:d({editType:"plot"},{keys:g.eventDataKeys.concat(["label","value"])}),text:A.text,textposition:A.textposition,insidetextanchor:r({},A.insidetextanchor,{dflt:"middle"}),textangle:r({},A.textangle,{dflt:0}),textfont:A.textfont,insidetextfont:A.insidetextfont,outsidetextfont:A.outsidetextfont,constraintext:A.constraintext,cliponaxis:A.cliponaxis,orientation:r({},A.orientation,{}),offset:r({},A.offset,{arrayOk:!1}),width:r({},A.width,{arrayOk:!1}),marker:s(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:r({},P.color,{dflt:t.defaultLine}),width:r({},P.width,{dflt:0,editType:"plot"}),dash:P.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:A.offsetgroup,alignmentgroup:A.alignmentgroup};function s(){var a=r({},A.marker);return delete a.pattern,delete a.cornerradius,a}},23096:function(te,X,e){var A=e(54460),P=e(1220),o=e(74248),L=e(4500),M=e(39032).BADNUM;te.exports=function(r,t){var s=A.getFromId(r,t.xaxis||"x"),a=A.getFromId(r,t.yaxis||"y"),c,u,l,y,h,T,f,n;t.orientation==="h"?(c=s.makeCalcdata(t,"x"),l=a.makeCalcdata(t,"y"),y=P(t,a,"y",l),h=!!t.yperiodalignment,T="y"):(c=a.makeCalcdata(t,"y"),l=s.makeCalcdata(t,"x"),y=P(t,s,"x",l),h=!!t.xperiodalignment,T="x"),u=y.vals;var v=Math.min(u.length,c.length),m=new Array(v);for(t._base=[],f=0;f<v;f++){c[f]<0&&(c[f]=M);var b=!1;c[f]!==M&&f+1<v&&c[f+1]!==M&&(b=!0),n=m[f]={p:u[f],s:c[f],cNext:b},t._base[f]=-.5*n.s,h&&(m[f].orig_p=l[f],m[f][T+"End"]=y.ends[f],m[f][T+"Start"]=y.starts[f]),t.ids&&(n.id=String(t.ids[f])),f===0&&(m[0].vTotal=0),m[0].vTotal+=d(n.s),n.begR=d(n.s)/d(m[0].s)}var E;for(f=0;f<v;f++)n=m[f],n.s!==M&&(n.sumR=n.s/m[0].vTotal,n.difR=E!==void 0?n.s/E:1,E=n.s);return o(m,t),L(m,t),m};function d(g){return g===M?0:g}},74732:function(te){te.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},4804:function(te,X,e){var A=e(96376).setGroupPositions;te.exports=function(o,L){var M=o._fullLayout,d=o._fullData,g=o.calcdata,r=L.xaxis,t=L.yaxis,s=[],a=[],c=[],u,l;for(l=0;l<d.length;l++){var y=d[l],h=y.orientation==="h";y.visible===!0&&y.xaxis===r._id&&y.yaxis===t._id&&y.type==="funnel"&&(u=g[l],h?c.push(u):a.push(u),s.push(u))}var T={mode:M.funnelmode,norm:M.funnelnorm,gap:M.funnelgap,groupgap:M.funnelgroupgap};for(A(o,r,t,a,T),A(o,t,r,c,T),l=0;l<s.length;l++){u=s[l];for(var f=0;f<u.length;f++)f+1<u.length&&(u[f].nextP0=u[f+1].p0,u[f].nextS0=u[f+1].s0,u[f].nextP1=u[f+1].p1,u[f].nextS1=u[f+1].s1)}}},45432:function(te,X,e){var A=e(3400),P=e(20011),o=e(31508).handleText,L=e(43980),M=e(31147),d=e(20088),g=e(76308);function r(a,c,u,l){function y(b,E){return A.coerce(a,c,d,b,E)}var h=L(a,c,l,y);if(!h){c.visible=!1;return}M(a,c,l,y),y("xhoverformat"),y("yhoverformat"),y("orientation",c.y&&!c.x?"v":"h"),y("offset"),y("width");var T=y("text");y("hovertext"),y("hovertemplate");var f=y("textposition");o(a,c,l,y,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c.textposition!=="none"&&!c.texttemplate&&y("textinfo",A.isArrayOrTypedArray(T)?"text+value":"value");var n=y("marker.color",u);y("marker.line.color",g.defaultLine),y("marker.line.width");var v=y("connector.visible");if(v){y("connector.fillcolor",t(n));var m=y("connector.line.width");m&&(y("connector.line.color"),y("connector.line.dash"))}}function t(a){var c=A.isArrayOrTypedArray(a)?"#000":a;return g.addOpacity(c,.5*g.opacity(c))}function s(a,c){var u,l;function y(T){return A.coerce(l._input,l,d,T)}if(c.funnelmode==="group")for(var h=0;h<a.length;h++)l=a[h],u=l._input,P(u,l,c,y)}te.exports={supplyDefaults:r,crossTraceDefaults:s}},34580:function(te){te.exports=function(e,A){return e.x="xVal"in A?A.xVal:A.x,e.y="yVal"in A?A.yVal:A.y,"percentInitial"in A&&(e.percentInitial=A.percentInitial),"percentPrevious"in A&&(e.percentPrevious=A.percentPrevious),"percentTotal"in A&&(e.percentTotal=A.percentTotal),A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),e}},31488:function(te,X,e){var A=e(76308).opacity,P=e(63400).hoverOnBars,o=e(3400).formatPercent;te.exports=function(d,g,r,t,s){var a=P(d,g,r,t,s);if(a){var c=a.cd,u=c[0].trace,l=u.orientation==="h",y=a.index,h=c[y],T=l?"x":"y";a[T+"LabelVal"]=h.s,a.percentInitial=h.begR,a.percentInitialLabel=o(h.begR,1),a.percentPrevious=h.difR,a.percentPreviousLabel=o(h.difR,1),a.percentTotal=h.sumR,a.percentTotalLabel=o(h.sumR,1);var f=h.hi||u.hoverinfo,n=[];if(f&&f!=="none"&&f!=="skip"){var v=f==="all",m=f.split("+"),b=function(E){return v||m.indexOf(E)!==-1};b("percent initial")&&n.push(a.percentInitialLabel+" of initial"),b("percent previous")&&n.push(a.percentPreviousLabel+" of previous"),b("percent total")&&n.push(a.percentTotalLabel+" of total")}return a.extraText=n.join("<br>"),a.color=L(u,h),[a]}};function L(M,d){var g=M.marker,r=d.mc||g.color,t=d.mlc||g.line.color,s=d.mlw||g.line.width;if(A(r))return r;if(A(t)&&s)return t}},94704:function(te,X,e){te.exports={attributes:e(20088),layoutAttributes:e(7076),supplyDefaults:e(45432).supplyDefaults,crossTraceDefaults:e(45432).crossTraceDefaults,supplyLayoutDefaults:e(11631),calc:e(23096),crossTraceCalc:e(4804),plot:e(42200),style:e(44544).style,hoverPoints:e(31488),eventData:e(34580),selectPoints:e(45784),moduleType:"trace",name:"funnel",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(te){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"}}},11631:function(te,X,e){var A=e(3400),P=e(7076);te.exports=function(o,L,M){var d=!1;function g(s,a){return A.coerce(o,L,P,s,a)}for(var r=0;r<M.length;r++){var t=M[r];if(t.visible&&t.type==="funnel"){d=!0;break}}d&&(g("funnelmode"),g("funnelgap",.2),g("funnelgroupgap"))}},42200:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(39032).BADNUM,M=e(98184),d=e(82744).clearMinTextSize;te.exports=function(a,c,u,l){var y=a._fullLayout;d("funnel",y),g(a,c,u,l),r(a,c,u,l),M.plot(a,c,u,l,{mode:y.funnelmode,norm:y.funnelmode,gap:y.funnelgap,groupgap:y.funnelgroupgap})};function g(s,a,c,u){var l=a.xaxis,y=a.yaxis;P.makeTraceGroups(u,c,"trace bars").each(function(h){var T=A.select(this),f=h[0].trace,n=P.ensureSingle(T,"g","regions");if(!f.connector||!f.connector.visible){n.remove();return}var v=f.orientation==="h",m=n.selectAll("g.region").data(P.identity);m.enter().append("g").classed("region",!0),m.exit().remove();var b=m.size();m.each(function(E,p){if(!(p!==b-1&&!E.cNext)){var S=t(E,l,y,v),w=S[0],i=S[1],C="";w[0]!==L&&i[0]!==L&&w[1]!==L&&i[1]!==L&&w[2]!==L&&i[2]!==L&&w[3]!==L&&i[3]!==L&&(v?C+="M"+w[0]+","+i[1]+"L"+w[2]+","+i[2]+"H"+w[3]+"L"+w[1]+","+i[1]+"Z":C+="M"+w[1]+","+i[1]+"L"+w[2]+","+i[3]+"V"+i[2]+"L"+w[1]+","+i[0]+"Z"),C===""&&(C="M0,0Z"),P.ensureSingle(A.select(this),"path").attr("d",C).call(o.setClipUrl,a.layerClipId,s)}})})}function r(s,a,c,u){var l=a.xaxis,y=a.yaxis;P.makeTraceGroups(u,c,"trace bars").each(function(h){var T=A.select(this),f=h[0].trace,n=P.ensureSingle(T,"g","lines");if(!f.connector||!f.connector.visible||!f.connector.line.width){n.remove();return}var v=f.orientation==="h",m=n.selectAll("g.line").data(P.identity);m.enter().append("g").classed("line",!0),m.exit().remove();var b=m.size();m.each(function(E,p){if(!(p!==b-1&&!E.cNext)){var S=t(E,l,y,v),w=S[0],i=S[1],C="";w[3]!==void 0&&i[3]!==void 0&&(v?(C+="M"+w[0]+","+i[1]+"L"+w[2]+","+i[2],C+="M"+w[1]+","+i[1]+"L"+w[3]+","+i[2]):(C+="M"+w[1]+","+i[1]+"L"+w[2]+","+i[3],C+="M"+w[1]+","+i[0]+"L"+w[2]+","+i[2])),C===""&&(C="M0,0Z"),P.ensureSingle(A.select(this),"path").attr("d",C).call(o.setClipUrl,a.layerClipId,s)}})})}function t(s,a,c,u){var l=[],y=[],h=u?a:c,T=u?c:a;return l[0]=h.c2p(s.s0,!0),y[0]=T.c2p(s.p0,!0),l[1]=h.c2p(s.s1,!0),y[1]=T.c2p(s.p1,!0),l[2]=h.c2p(s.nextS0,!0),y[2]=T.c2p(s.nextP0,!0),l[3]=h.c2p(s.nextS1,!0),y[3]=T.c2p(s.nextP1,!0),u?[l,y]:[y,l]}},44544:function(te,X,e){var A=e(33428),P=e(43616),o=e(76308),L=e(13448).DESELECTDIM,M=e(60100),d=e(82744).resizeText,g=M.styleTextPoints;function r(t,s,a){var c=a||A.select(t).selectAll("g.funnellayer").selectAll("g.trace");d(t,c,"funnel"),c.style("opacity",function(u){return u[0].trace.opacity}),c.each(function(u){var l=A.select(this),y=u[0].trace;l.selectAll(".point > path").each(function(h){if(!h.isBlank){var T=y.marker;A.select(this).call(o.fill,h.mc||T.color).call(o.stroke,h.mlc||T.line.color).call(P.dashLine,T.line.dash,h.mlw||T.line.width).style("opacity",y.selectedpoints&&!h.selected?L:1)}}),g(l,y,t),l.selectAll(".regions").each(function(){A.select(this).selectAll("path").style("stroke-width",0).call(o.fill,y.connector.fillcolor)}),l.selectAll(".lines").each(function(){var h=y.connector.line;P.lineGroupStyle(A.select(this).selectAll("path"),h.width,h.color,h.dash)})})}te.exports={style:r}},22332:function(te,X,e){var A=e(74996),P=e(45464),o=e(86968).u,L=e(21776).Ks,M=e(21776).Gw,d=e(92880).extendFlat;te.exports={labels:A.labels,label0:A.label0,dlabel:A.dlabel,values:A.values,marker:{colors:A.marker.colors,line:{color:d({},A.marker.line.color,{dflt:null}),width:d({},A.marker.line.width,{dflt:1}),editType:"calc"},pattern:A.marker.pattern,editType:"calc"},text:A.text,hovertext:A.hovertext,scalegroup:d({},A.scalegroup,{}),textinfo:d({},A.textinfo,{flags:["label","text","value","percent"]}),texttemplate:M({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:d({},P.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:L({},{keys:["label","color","value","text","percent"]}),textposition:d({},A.textposition,{values:["inside","none"],dflt:"inside"}),textfont:A.textfont,insidetextfont:A.insidetextfont,title:{text:A.title.text,font:A.title.font,position:d({},A.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:o({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"}}},91248:function(te,X,e){var A=e(7316);X.name="funnelarea",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},54e3:function(te,X,e){var A=e(45768);function P(L,M){return A.calc(L,M)}function o(L){A.crossTraceCalc(L,{type:"funnelarea"})}te.exports={calc:P,crossTraceCalc:o}},92688:function(te,X,e){var A=e(3400),P=e(22332),o=e(86968).Q,L=e(31508).handleText,M=e(74174).handleLabelsAndValues,d=e(74174).handleMarkerDefaults;te.exports=function(r,t,s,a){function c(b,E){return A.coerce(r,t,P,b,E)}var u=c("labels"),l=c("values"),y=M(u,l),h=y.len;if(t._hasLabels=y.hasLabels,t._hasValues=y.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),!h){t.visible=!1;return}t._length=h,d(r,t,a,c),c("scalegroup");var T=c("text"),f=c("texttemplate"),n;if(f||(n=c("textinfo",Array.isArray(T)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),f||n&&n!=="none"){var v=c("textposition");L(r,t,a,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else n==="none"&&c("textposition","none");o(t,a,c);var m=c("title.text");m&&(c("title.position"),A.coerceFont(c,"title.font",a.font)),c("aspectratio"),c("baseratio")}},62396:function(te,X,e){te.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(91248),categories:["pie-like","funnelarea","showLegend"],attributes:e(22332),layoutAttributes:e(61280),supplyDefaults:e(92688),supplyLayoutDefaults:e(35384),calc:e(54e3).calc,crossTraceCalc:e(54e3).crossTraceCalc,plot:e(39472),style:e(62096),styleOne:e(10528),meta:{}}},61280:function(te,X,e){var A=e(85204).hiddenlabels;te.exports={hiddenlabels:A,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(te,X,e){var A=e(3400),P=e(61280);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("hiddenlabels"),d("funnelareacolorway",M.colorway),d("extendfunnelareacolors")}},39472:function(te,X,e){var A=e(33428),P=e(43616),o=e(3400),L=o.strScale,M=o.strTranslate,d=e(72736),g=e(98184),r=g.toMoveInsideBar,t=e(82744),s=t.recordMinTextSize,a=t.clearMinTextSize,c=e(69656),u=e(37820),l=u.attachFxHandlers,y=u.determineInsideTextFont,h=u.layoutAreas,T=u.prerenderTitles,f=u.positionTitleOutside,n=u.formatSliceLabel;te.exports=function(p,S){var w=p._context.staticPlot,i=p._fullLayout;a("funnelarea",i),T(S,p),h(S,i._size),o.makeTraceGroups(i._funnelarealayer,S,"trace").each(function(C){var x=A.select(this),k=C[0],I=k.trace;b(C),x.each(function(){var B=A.select(this).selectAll("g.slice").data(C);B.enter().append("g").classed("slice",!0),B.exit().remove(),B.each(function(z,O){if(z.hidden){A.select(this).selectAll("path,g").remove();return}z.pointNumber=z.i,z.curveNumber=I.index;var F=k.cx,N=k.cy,V=A.select(this),j=V.selectAll("path.surface").data([z]);j.enter().append("path").classed("surface",!0).style({"pointer-events":w?"none":"all"}),V.call(l,p,C);var $="M"+(F+z.TR[0])+","+(N+z.TR[1])+v(z.TR,z.BR)+v(z.BR,z.BL)+v(z.BL,z.TL)+"Z";j.attr("d",$),n(p,z,k);var q=c.castOption(I.textposition,z.pts),oe=V.selectAll("g.slicetext").data(z.text&&q!=="none"?[0]:[]);oe.enter().append("g").classed("slicetext",!0),oe.exit().remove(),oe.each(function(){var Z=o.ensureSingle(A.select(this),"text","",function(ie){ie.attr("data-notex",1)}),G=o.ensureUniformFontSize(p,y(I,z,i.font));Z.text(z.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(P.font,G).call(d.convertToTspans,p);var re=P.bBox(Z.node()),H,J,ae,K=Math.min(z.BL[1],z.BR[1])+N,Y=Math.max(z.TL[1],z.TR[1])+N;J=Math.max(z.TL[0],z.BL[0])+F,ae=Math.min(z.TR[0],z.BR[0])+F,H=r(J,ae,K,Y,re,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=G.size,s(I.type,H,i),C[O].transform=H,o.setTransormAndDisplay(Z,H)})});var _=A.select(this).selectAll("g.titletext").data(I.title.text?[0]:[]);_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each(function(){var z=o.ensureSingle(A.select(this),"text","",function(N){N.attr("data-notex",1)}),O=I.title.text;I._meta&&(O=o.templateString(O,I._meta)),z.text(O).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(P.font,I.title.font).call(d.convertToTspans,p);var F=f(k,i._size);z.attr("transform",M(F.x,F.y)+L(Math.min(1,F.scale))+M(F.tx,F.ty))})})})};function v(E,p){var S=p[0]-E[0],w=p[1]-E[1];return"l"+S+","+w}function m(E,p){return[.5*(E[0]+p[0]),.5*(E[1]+p[1])]}function b(E){if(!E.length)return;var p=E[0],S=p.trace,w=S.aspectratio,i=S.baseratio;i>.999&&(i=.999);var C=Math.pow(i,2),x=p.vTotal,k=x*C/(1-C),I=x,B=k/x;function _(){var ne=Math.sqrt(B);return{x:ne,y:-ne}}function z(){var ne=_();return[ne.x,ne.y]}var O,F=[];F.push(z());var N,V;for(N=E.length-1;N>-1;N--)if(V=E[N],!V.hidden){var j=V.v/I;B+=j,F.push(z())}var $=1/0,q=-1/0;for(N=0;N<F.length;N++)O=F[N],$=Math.min($,O[1]),q=Math.max(q,O[1]);for(N=0;N<F.length;N++)F[N][1]-=(q+$)/2;var oe=F[F.length-1][0],Z=p.r,G=(q-$)/2,re=Z/oe,H=Z/G*w;for(p.r=H*G,N=0;N<F.length;N++)F[N][0]*=re,F[N][1]*=H;O=F[0];var J=[-O[0],O[1]],ae=[O[0],O[1]],K=0;for(N=E.length-1;N>-1;N--)if(V=E[N],!V.hidden){K+=1;var Y=F[K][0],ie=F[K][1];V.TL=[-Y,ie],V.TR=[Y,ie],V.BL=J,V.BR=ae,V.pxmid=m(V.TR,V.BR),J=V.TL,ae=V.TR}}},62096:function(te,X,e){var A=e(33428),P=e(10528),o=e(82744).resizeText;te.exports=function(M){var d=M._fullLayout._funnelarealayer.selectAll(".trace");o(M,d,"funnelarea"),d.each(function(g){var r=g[0],t=r.trace,s=A.select(this);s.style({opacity:t.opacity}),s.selectAll("path.surface").each(function(a){A.select(this).call(P,a,t,M)})})}},83328:function(te,X,e){var A=e(52904),P=e(45464),o=e(25376),L=e(29736).axisHoverFormat,M=e(21776).Ks,d=e(21776).Gw,g=e(49084),r=e(92880).extendFlat;te.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},A.x,{impliedEdits:{xtype:"array"}}),x0:r({},A.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},A.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},A.y,{impliedEdits:{ytype:"array"}}),y0:r({},A.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},A.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},A.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},A.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},A.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},A.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},A.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},A.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:L("x"),yhoverformat:L("y"),zhoverformat:L("z",1),hovertemplate:M(),texttemplate:d({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:o({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},P.showlegend,{dflt:!1})},{transforms:void 0},g("",{cLetter:"z",autoColorDflt:!1}))},19512:function(te,X,e){var A=e(24040),P=e(3400),o=e(54460),L=e(1220),M=e(55480),d=e(47128),g=e(2872),r=e(26136),t=e(70448),s=e(11240),a=e(35744),c=e(39032).BADNUM;te.exports=function(h,T){var f=o.getFromId(h,T.xaxis||"x"),n=o.getFromId(h,T.yaxis||"y"),v=A.traceIs(T,"contour"),m=A.traceIs(T,"histogram"),b=A.traceIs(T,"gl2d"),E=v?"best":T.zsmooth,p,S,w,i,C,x,k,I,B,_,z;if(f._minDtick=0,n._minDtick=0,m)z=M(h,T),i=z.orig_x,p=z.x,S=z.x0,w=z.dx,I=z.orig_y,C=z.y,x=z.y0,k=z.dy,B=z.z;else{var O=T.z;P.isArray1D(O)?(g(T,f,n,"x","y",["z"]),p=T._x,C=T._y,O=T._z):(i=T.x?f.makeCalcdata(T,"x"):[],I=T.y?n.makeCalcdata(T,"y"):[],p=L(T,f,"x",i).vals,C=L(T,n,"y",I).vals,T._x=p,T._y=C),S=T.x0,w=T.dx,x=T.y0,k=T.dy,B=r(O,T,f,n)}(f.rangebreaks||n.rangebreaks)&&(B=l(p,C,B),m||(p=u(p),C=u(C),T._x=p,T._y=C)),!m&&(v||T.connectgaps)&&(T._emptypoints=s(B),t(B,T._emptypoints));function F(re){E=T._input.zsmooth=T.zsmooth=!1,P.warn('cannot use zsmooth: "fast": '+re)}function N(re){if(re.length>1){var H=(re[re.length-1]-re[0])/(re.length-1),J=Math.abs(H/100);for(_=0;_<re.length-1;_++)if(Math.abs(re[_+1]-re[_]-H)>J)return!1}return!0}T._islinear=!1,f.type==="log"||n.type==="log"?E==="fast"&&F("log axis found"):N(p)?N(C)?T._islinear=!0:E==="fast"&&F("y scale is not linear"):E==="fast"&&F("x scale is not linear");var V=P.maxRowLength(B),j=T.xtype==="scaled"?"":p,$=a(T,j,S,w,V,f),q=T.ytype==="scaled"?"":C,oe=a(T,q,x,k,B.length,n);b||(T._extremes[f._id]=o.findExtremes(f,$),T._extremes[n._id]=o.findExtremes(n,oe));var Z={x:$,y:oe,z:B,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&i&&(Z.orig_x=i),T.yperiodalignment&&I&&(Z.orig_y=I),j&&j.length===$.length-1&&(Z.xCenter=j),q&&q.length===oe.length-1&&(Z.yCenter=q),m&&(Z.xRanges=z.xRanges,Z.yRanges=z.yRanges,Z.pts=z.pts),v||d(h,T,{vals:B,cLetter:"z"}),v&&T.contours&&T.contours.coloring==="heatmap"){var G={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};Z.xfill=a(G,j,S,w,V,f),Z.yfill=a(G,q,x,k,B.length,n)}return[Z]};function u(y){for(var h=[],T=y.length,f=0;f<T;f++){var n=y[f];n!==c&&h.push(n)}return h}function l(y,h,T){for(var f=[],n=-1,v=0;v<T.length;v++)if(h[v]!==c){n++,f[n]=[];for(var m=0;m<T[v].length;m++)y[m]!==c&&f[n].push(T[v][m])}return f}},26136:function(te,X,e){var A=e(38248),P=e(3400),o=e(39032).BADNUM;te.exports=function(M,d,g,r){var t,s,a,c,u,l;function y(m){if(A(m))return+m}if(d&&d.transpose){for(t=0,u=0;u<M.length;u++)t=Math.max(t,M[u].length);if(t===0)return!1;a=function(m){return m.length},c=function(m,b,E){return(m[E]||[])[b]}}else t=M.length,a=function(m,b){return m[b].length},c=function(m,b,E){return(m[b]||[])[E]};var h=function(m,b,E){return b===o||E===o?o:c(m,b,E)};function T(m){if(d&&d.type!=="carpet"&&d.type!=="contourcarpet"&&m&&m.type==="category"&&d["_"+m._id.charAt(0)].length){var b=m._id.charAt(0),E={},p=d["_"+b+"CategoryMap"]||d[b];for(u=0;u<p.length;u++)E[p[u]]=u;return function(S){var w=E[m._categories[S]];return w+1?w:o}}else return P.identity}var f=T(g),n=T(r);r&&r.type==="category"&&(t=r._categories.length);var v=new Array(t);for(u=0;u<t;u++)for(g&&g.type==="category"?s=g._categories.length:s=a(M,u),v[u]=new Array(s),l=0;l<s;l++)v[u][l]=y(h(M,n(u),f(l)));return v}},96288:function(te){te.exports={min:"zmin",max:"zmax"}},2872:function(te,X,e){var A=e(3400),P=e(39032).BADNUM,o=e(1220);te.exports=function(M,d,g,r,t,s){var a=M._length,c=d.makeCalcdata(M,r),u=g.makeCalcdata(M,t);c=o(M,d,r,c).vals,u=o(M,g,t,u).vals;var l=M.text,y=l!==void 0&&A.isArray1D(l),h=M.hovertext,T=h!==void 0&&A.isArray1D(h),f,n,v=A.distinctVals(c),m=v.vals,b=A.distinctVals(u),E=b.vals,p=[],S,w,i=E.length,C=m.length;for(f=0;f<s.length;f++)p[f]=A.init2dArray(i,C);y&&(S=A.init2dArray(i,C)),T&&(w=A.init2dArray(i,C));var x=A.init2dArray(i,C);for(f=0;f<a;f++)if(c[f]!==P&&u[f]!==P){var k=A.findBin(c[f]+v.minDiff/2,m),I=A.findBin(u[f]+b.minDiff/2,E);for(n=0;n<s.length;n++){var B=s[n],_=M[B],z=p[n];z[I][k]=_[f],x[I][k]=f}y&&(S[I][k]=l[f]),T&&(w[I][k]=h[f])}for(M["_"+r]=m,M["_"+t]=E,n=0;n<s.length;n++)M["_"+s[n]]=p[n];y&&(M._text=S),T&&(M._hovertext=w),d&&d.type==="category"&&(M["_"+r+"CategoryMap"]=m.map(function(O){return d._categories[O]})),g&&g.type==="category"&&(M["_"+t+"CategoryMap"]=E.map(function(O){return g._categories[O]})),M._after2before=x}},24480:function(te,X,e){var A=e(3400),P=e(51264),o=e(39096),L=e(31147),M=e(82748),d=e(27260),g=e(83328);te.exports=function(t,s,a,c){function u(y,h){return A.coerce(t,s,g,y,h)}var l=P(t,s,u,c);if(!l){s.visible=!1;return}L(t,s,c,u),u("xhoverformat"),u("yhoverformat"),u("text"),u("hovertext"),u("hovertemplate"),o(u,c),M(t,s,u,c),u("hoverongaps"),u("connectgaps",A.isArray1D(s.z)&&s.zsmooth!==!1),d(t,s,c,u,{prefix:"",cLetter:"z"})}},11240:function(te,X,e){var A=e(3400).maxRowLength;te.exports=function(o){var L=[],M={},d=[],g=o[0],r=[],t=[0,0,0],s=A(o),a,c,u,l,y,h,T,f;for(c=0;c<o.length;c++)for(a=r,r=g,g=o[c+1]||[],u=0;u<s;u++)r[u]===void 0&&(h=(r[u-1]!==void 0?1:0)+(r[u+1]!==void 0?1:0)+(a[u]!==void 0?1:0)+(g[u]!==void 0?1:0),h?(c===0&&h++,u===0&&h++,c===o.length-1&&h++,u===r.length-1&&h++,h<4&&(M[[c,u]]=[c,u,h]),L.push([c,u,h])):d.push([c,u]));for(;d.length;){for(T={},f=!1,y=d.length-1;y>=0;y--)l=d[y],c=l[0],u=l[1],h=((M[[c-1,u]]||t)[2]+(M[[c+1,u]]||t)[2]+(M[[c,u-1]]||t)[2]+(M[[c,u+1]]||t)[2])/20,h&&(T[l]=[c,u,h],d.splice(y,1),f=!0);if(!f)throw"findEmpties iterated with no new neighbors";for(l in T)M[l]=T[l],L.push(T[l])}return L.sort(function(n,v){return v[2]-n[2]})}},55512:function(te,X,e){var A=e(93024),P=e(3400),o=P.isArrayOrTypedArray,L=e(54460),M=e(8932).extractOpts;te.exports=function(g,r,t,s,a){a||(a={});var c=a.isContour,u=g.cd[0],l=u.trace,y=g.xa,h=g.ya,T=u.x,f=u.y,n=u.z,v=u.xCenter,m=u.yCenter,b=u.zmask,E=l.zhoverformat,p=T,S=f,w,i,C,x;if(g.index!==!1){try{C=Math.round(g.index[1]),x=Math.round(g.index[0])}catch{P.error("Error hovering on heatmap, pointNumber must be [row,col], found:",g.index);return}if(C<0||C>=n[0].length||x<0||x>n.length)return}else{if(A.inbox(r-T[0],r-T[T.length-1],0)>0||A.inbox(t-f[0],t-f[f.length-1],0)>0)return;if(c){var k;for(p=[2*T[0]-T[1]],k=1;k<T.length;k++)p.push((T[k]+T[k-1])/2);for(p.push([2*T[T.length-1]-T[T.length-2]]),S=[2*f[0]-f[1]],k=1;k<f.length;k++)S.push((f[k]+f[k-1])/2);S.push([2*f[f.length-1]-f[f.length-2]])}C=Math.max(0,Math.min(p.length-2,P.findBin(r,p))),x=Math.max(0,Math.min(S.length-2,P.findBin(t,S)))}var I=y.c2p(T[C]),B=y.c2p(T[C+1]),_=h.c2p(f[x]),z=h.c2p(f[x+1]),O,F;c?(O=u.orig_x||T,F=u.orig_y||f,B=I,w=O[C],z=_,i=F[x]):(O=u.orig_x||v||T,F=u.orig_y||m||f,w=v?O[C]:(O[C]+O[C+1])/2,i=m?F[x]:(F[x]+F[x+1])/2,y&&y.type==="category"&&(w=T[C]),h&&h.type==="category"&&(i=f[x]),l.zsmooth&&(I=B=y.c2p(w),_=z=h.c2p(i)));var N=n[x][C];if(b&&!b[x][C]&&(N=void 0),!(N===void 0&&!l.hoverongaps)){var V;o(u.hovertext)&&o(u.hovertext[x])?V=u.hovertext[x][C]:o(u.text)&&o(u.text[x])&&(V=u.text[x][C]);var j=M(l),$={type:"linear",range:[j.min,j.max],hoverformat:E,_separators:y._separators,_numFormat:y._numFormat},q=L.tickText($,N,"hover").text;return[P.extendFlat(g,{index:l._after2before?l._after2before[x][C]:[x,C],distance:g.maxHoverDistance,spikeDistance:g.maxSpikeDistance,x0:I,x1:B,y0:_,y1:z,xLabelVal:w,yLabelVal:i,zLabelVal:N,zLabel:q,text:V})]}}},81932:function(te,X,e){te.exports={attributes:e(83328),supplyDefaults:e(24480),calc:e(19512),plot:e(41420),colorbar:e(96288),style:e(41648),hoverPoints:e(55512),moduleType:"trace",name:"heatmap",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}},70448:function(te,X,e){var A=e(3400),P=.01,o=[[-1,0],[1,0],[0,-1],[0,1]];function L(d){return .5-.25*Math.min(1,d*.5)}te.exports=function(g,r){var t=1,s;for(M(g,r),s=0;s<r.length&&!(r[s][2]<4);s++);for(r=r.slice(s),s=0;s<100&&t>P;s++)t=M(g,r,L(t));return t>P&&A.log("interp2d didn't converge quickly",t),g};function M(d,g,r){var t=0,s,a,c,u,l,y,h,T,f,n,v,m,b;for(u=0;u<g.length;u++){for(s=g[u],a=s[0],c=s[1],v=d[a][c],n=0,f=0,l=0;l<4;l++)y=o[l],h=d[a+y[0]],h&&(T=h[c+y[1]],T!==void 0&&(n===0?m=b=T:(m=Math.min(m,T),b=Math.max(b,T)),f++,n+=T));if(f===0)throw"iterateInterp2d order is wrong: no defined neighbors";d[a][c]=n/f,v===void 0?f<4&&(t=1):(d[a][c]=(1+r)*d[a][c]-r*v,b>m&&(t=Math.max(t,Math.abs(d[a][c]-v)/(b-m))))}return t}},39096:function(te,X,e){var A=e(3400);te.exports=function(o,L){o("texttemplate");var M=A.extendFlat({},L.font,{color:"auto",size:"auto"});A.coerceFont(o,"textfont",M)}},35744:function(te,X,e){var A=e(24040),P=e(3400).isArrayOrTypedArray;te.exports=function(L,M,d,g,r,t){var s=[],a=A.traceIs(L,"contour"),c=A.traceIs(L,"histogram"),u=A.traceIs(L,"gl2d"),l,y,h,T=P(M)&&M.length>1;if(T&&!c&&t.type!=="category"){var f=M.length;if(f<=r){if(a||u)s=Array.from(M).slice(0,r);else if(r===1)t.type==="log"?s=[.5*M[0],2*M[0]]:s=[M[0]-.5,M[0]+.5];else if(t.type==="log"){for(s=[Math.pow(M[0],1.5)/Math.pow(M[1],.5)],h=1;h<f;h++)s.push(Math.sqrt(M[h-1]*M[h]));s.push(Math.pow(M[f-1],1.5)/Math.pow(M[f-2],.5))}else{for(s=[1.5*M[0]-.5*M[1]],h=1;h<f;h++)s.push((M[h-1]+M[h])*.5);s.push(1.5*M[f-1]-.5*M[f-2])}if(f<r){var n=s[s.length-1],v;if(t.type==="log")for(v=n/s[s.length-2],h=f;h<r;h++)n*=v,s.push(n);else for(v=n-s[s.length-2],h=f;h<r;h++)n+=v,s.push(n)}}else return a?M.slice(0,r):M.slice(0,r+1)}else{var m=L[t._id.charAt(0)+"calendar"];if(c)l=t.r2c(d,0,m);else if(P(M)&&M.length===1)l=M[0];else if(d===void 0)l=0;else{var b=t.type==="log"?t.d2c:t.r2c;l=b(d,0,m)}for(y=g||1,h=a||u?0:-.5;h<r;h++)s.push(l+y*h)}return s}},41420:function(te,X,e){var A=e(33428),P=e(49760),o=e(24040),L=e(43616),M=e(54460),d=e(3400),g=e(72736),r=e(76688),t=e(76308),s=e(8932).extractOpts,a=e(8932).makeColorScaleFuncFromTrace,c=e(9616),u=e(84284),l=u.LINE_SPACING,y=e(9188),h=e(2264).STYLE,T="heatmap-label";function f(E){return E.selectAll("g."+T)}function n(E){f(E).remove()}te.exports=function(E,p,S,w){var i=p.xaxis,C=p.yaxis;d.makeTraceGroups(w,S,"hm").each(function(x){var k=A.select(this),I=x[0],B=I.trace,_=B.xgap||0,z=B.ygap||0,O=I.z,F=I.x,N=I.y,V=I.xCenter,j=I.yCenter,$=o.traceIs(B,"contour"),q=$?"best":B.zsmooth,oe=O.length,Z=d.maxRowLength(O),G=!1,re=!1,H,J,ae,K,Y,ie,ne,le;for(ie=0;H===void 0&&ie<F.length-1;)H=i.c2p(F[ie]),ie++;for(ie=F.length-1;J===void 0&&ie>0;)J=i.c2p(F[ie]),ie--;for(J<H&&(ae=J,J=H,H=ae,G=!0),ie=0;K===void 0&&ie<N.length-1;)K=C.c2p(N[ie]),ie++;for(ie=N.length-1;Y===void 0&&ie>0;)Y=C.c2p(N[ie]),ie--;Y<K&&(ae=K,K=Y,Y=ae,re=!0),$&&(V=F,j=N,F=I.xfill,N=I.yfill);var de="default";if(q?de=q==="best"?"smooth":"fast":B._islinear&&_===0&&z===0&&y()&&(de="fast"),de!=="fast"){var we=q==="best"?0:.5;H=Math.max(-we*i._length,H),J=Math.min((1+we)*i._length,J),K=Math.max(-we*C._length,K),Y=Math.min((1+we)*C._length,Y)}var me=Math.round(J-H),Le=Math.round(Y-K),ve=H>=i._length||J<=0||K>=C._length||Y<=0;if(ve){var Ae=k.selectAll("image").data([]);Ae.exit().remove(),n(k);return}var ye,Se;de==="fast"?(ye=Z,Se=oe):(ye=me,Se=Le);var _e=document.createElement("canvas");_e.width=ye,_e.height=Se;var ze=_e.getContext("2d",{willReadFrequently:!0}),Ie=a(B,{noNumericCheck:!0,returnArray:!0}),Ne,et;de==="fast"?(Ne=G?function(Qr){return Z-1-Qr}:d.identity,et=re?function(Qr){return oe-1-Qr}:d.identity):(Ne=function(Qr){return d.constrain(Math.round(i.c2p(F[Qr])-H),0,me)},et=function(Qr){return d.constrain(Math.round(C.c2p(N[Qr])-K),0,Le)});var st=et(0),Ze=[st,st],Ke=G?0:1,nt=re?0:1,it=0,lt=0,vt=0,xt=0,Je,Pe,Ue,He,Oe;function Ce(Qr,un){if(Qr!==void 0){var ln=Ie(Qr);return ln[0]=Math.round(ln[0]),ln[1]=Math.round(ln[1]),ln[2]=Math.round(ln[2]),it+=un,lt+=ln[0]*un,vt+=ln[1]*un,xt+=ln[2]*un,ln}return[0,0,0,0]}function ge(Qr,un,ln,Mn){var Dn=Qr[ln.bin0];if(Dn===void 0)return Ce(void 0,1);var Kn=Qr[ln.bin1],sa=un[ln.bin0],na=un[ln.bin1],Jn=Kn-Dn||0,aa=sa-Dn||0,pr;return Kn===void 0?na===void 0?pr=0:sa===void 0?pr=2*(na-Dn):pr=(2*na-sa-Dn)*2/3:na===void 0?sa===void 0?pr=0:pr=(2*Dn-Kn-sa)*2/3:sa===void 0?pr=(2*na-Kn-Dn)*2/3:pr=na+Dn-Kn-sa,Ce(Dn+ln.frac*Jn+Mn.frac*(aa+ln.frac*pr))}if(de!=="default"){var pe=0,Te;try{Te=new Uint8Array(ye*Se*4)}catch{Te=new Array(ye*Se*4)}if(de==="smooth"){var be=V||F,ke=j||N,Ve=new Array(be.length),je=new Array(ke.length),at=new Array(me),ut=V?m:v,Nt=j?m:v,Vt,gt,Ct;for(ie=0;ie<be.length;ie++)Ve[ie]=Math.round(i.c2p(be[ie])-H);for(ie=0;ie<ke.length;ie++)je[ie]=Math.round(C.c2p(ke[ie])-K);for(ie=0;ie<me;ie++)at[ie]=ut(ie,Ve);for(ne=0;ne<Le;ne++)for(Vt=Nt(ne,je),gt=O[Vt.bin0],Ct=O[Vt.bin1],ie=0;ie<me;ie++,pe+=4)Oe=ge(gt,Ct,at[ie],Vt),b(Te,pe,Oe)}else for(ne=0;ne<oe;ne++)for(He=O[ne],Ze=et(ne),ie=0;ie<Z;ie++)Oe=Ce(He[ie],1),pe=(Ze*Z+Ne(ie))*4,b(Te,pe,Oe);var Yt=ze.createImageData(ye,Se);try{Yt.data.set(Te)}catch{var gr=Yt.data,ht=gr.length;for(ne=0;ne<ht;ne++)gr[ne]=Te[ne]}ze.putImageData(Yt,0,0)}else{var Ht=Math.floor(_/2),Wt=Math.floor(z/2);for(ne=0;ne<oe;ne++)if(He=O[ne],Ze.reverse(),Ze[nt]=et(ne+1),!(Ze[0]===Ze[1]||Ze[0]===void 0||Ze[1]===void 0))for(Pe=Ne(0),Je=[Pe,Pe],ie=0;ie<Z;ie++)Je.reverse(),Je[Ke]=Ne(ie+1),!(Je[0]===Je[1]||Je[0]===void 0||Je[1]===void 0)&&(Ue=He[ie],Oe=Ce(Ue,(Je[1]-Je[0])*(Ze[1]-Ze[0])),ze.fillStyle="rgba("+Oe.join(",")+")",ze.fillRect(Je[0]+Ht,Ze[0]+Wt,Je[1]-Je[0]-_,Ze[1]-Ze[0]-z))}lt=Math.round(lt/it),vt=Math.round(vt/it),xt=Math.round(xt/it);var cr=P("rgb("+lt+","+vt+","+xt+")");E._hmpixcount=(E._hmpixcount||0)+it,E._hmlumcount=(E._hmlumcount||0)+it*cr.getLuminance();var er=k.selectAll("image").data(x);er.enter().append("svg:image").attr({xmlns:c.svg,preserveAspectRatio:"none"}),er.attr({height:Le,width:me,x:H,y:K,"xlink:href":_e.toDataURL("image/png")}),de==="fast"&&!q&&er.attr("style",h),n(k);var ct=B.texttemplate;if(ct){var qe=s(B),dt={type:"linear",range:[qe.min,qe.max],_separators:i._separators,_numFormat:i._numFormat},bt=B.type==="histogram2dcontour",Et=B.type==="contour",Mt=Et?1:0,_t=Et?oe-1:oe,It=Et?1:0,Gt=Et?Z-1:Z,nr=[];for(ie=Mt;ie<_t;ie++){var ar;if(Et)ar=I.y[ie];else if(bt){if(ie===0||ie===oe-1)continue;ar=I.y[ie]}else if(I.yCenter)ar=I.yCenter[ie];else{if(ie+1===oe&&I.y[ie+1]===void 0)continue;ar=(I.y[ie]+I.y[ie+1])/2}var ir=Math.round(C.c2p(ar));if(!(0>ir||ir>C._length))for(ne=It;ne<Gt;ne++){var Be;if(Et)Be=I.x[ne];else if(bt){if(ne===0||ne===Z-1)continue;Be=I.x[ne]}else if(I.xCenter)Be=I.xCenter[ne];else{if(ne+1===Z&&I.x[ne+1]===void 0)continue;Be=(I.x[ne]+I.x[ne+1])/2}var Fe=Math.round(i.c2p(Be));if(!(0>Fe||Fe>i._length)){var Rt=r({x:Be,y:ar},B,E._fullLayout);Rt.x=Be,Rt.y=ar;var Lt=I.z[ie][ne];Lt===void 0?(Rt.z="",Rt.zLabel=""):(Rt.z=Lt,Rt.zLabel=M.tickText(dt,Lt,"hover").text);var Ut=I.text&&I.text[ie]&&I.text[ie][ne];(Ut===void 0||Ut===!1)&&(Ut=""),Rt.text=Ut;var Qt=d.texttemplateString(ct,Rt,E._fullLayout._d3locale,Rt,B._meta||{});if(Qt){var rr=Qt.split("<br>"),Kt=rr.length,Dt=0;for(le=0;le<Kt;le++)Dt=Math.max(Dt,rr[le].length);nr.push({l:Kt,c:Dt,t:Qt,x:Fe,y:ir,z:Lt})}}}}var sr=B.textfont,fr=sr.family,vr=sr.size,lr=E._fullLayout.font.size;if(!vr||vr==="auto"){var Or=1/0,Sr=1/0,Ar=0,sn=0;for(le=0;le<nr.length;le++){var Jr=nr[le];if(Ar=Math.max(Ar,Jr.l),sn=Math.max(sn,Jr.c),le<nr.length-1){var bn=nr[le+1],xn=Math.abs(bn.x-Jr.x),or=Math.abs(bn.y-Jr.y);xn&&(Or=Math.min(Or,xn)),or&&(Sr=Math.min(Sr,or))}}!isFinite(Or)||!isFinite(Sr)?vr=lr:(Or-=_,Sr-=z,Or/=sn,Sr/=Ar,Or/=l/2,Sr/=l,vr=Math.min(Math.floor(Or),Math.floor(Sr),lr))}if(vr<=0||!isFinite(vr))return;var Lr=function(Qr){return Qr.x},Br=function(Qr){return Qr.y-vr*(Qr.l*l/2-1)},_r=f(k).data(nr);_r.enter().append("g").classed(T,1).append("text").attr("text-anchor","middle").each(function(Qr){var un=A.select(this),ln=sr.color;(!ln||ln==="auto")&&(ln=t.contrast(Qr.z===void 0?E._fullLayout.plot_bgcolor:"rgba("+Ie(Qr.z).join()+")")),un.attr("data-notex",1).call(g.positionText,Lr(Qr),Br(Qr)).call(L.font,fr,vr,ln).text(Qr.t).call(g.convertToTspans,E)})}})};function v(E,p){var S=p.length-2,w=d.constrain(d.findBin(E,p),0,S),i=p[w],C=p[w+1],x=d.constrain(w+(E-i)/(C-i)-.5,0,S),k=Math.round(x),I=Math.abs(x-k);return!x||x===S||!I?{bin0:k,bin1:k,frac:0}:{bin0:k,frac:I,bin1:Math.round(k+I/(x-k))}}function m(E,p){var S=p.length-1,w=d.constrain(d.findBin(E,p),0,S),i=p[w],C=p[w+1],x=(E-i)/(C-i)||0;return x<=0?{bin0:w,bin1:w,frac:0}:x<.5?{bin0:w,bin1:w+1,frac:x}:{bin0:w+1,bin1:w,frac:1-x}}function b(E,p,S){E[p]=S[0],E[p+1]=S[1],E[p+2]=S[2],E[p+3]=Math.round(S[3]*255)}},41648:function(te,X,e){var A=e(33428);te.exports=function(o){A.select(o).selectAll(".hm image").style("opacity",function(L){return L.trace.opacity})}},82748:function(te){te.exports=function(e,A,P){var o=P("zsmooth");o===!1&&(P("xgap"),P("ygap")),P("zhoverformat")}},51264:function(te,X,e){var A=e(38248),P=e(3400),o=e(24040);te.exports=function(g,r,t,s,a,c){var u=t("z");a=a||"x",c=c||"y";var l,y;if(u===void 0||!u.length)return 0;if(P.isArray1D(u)){l=t(a),y=t(c);var h=P.minRowLength(l),T=P.minRowLength(y);if(h===0||T===0)return 0;r._length=Math.min(h,T,u.length)}else{if(l=L(a,t),y=L(c,t),!M(u))return 0;t("transpose"),r._length=null}if(g.type==="heatmapgl")return!0;var f=o.getComponentMethod("calendars","handleTraceDefaults");return f(g,r,[a,c],s),!0};function L(d,g){var r=g(d),t=r?g(d+"type","array"):"scaled";return t==="scaled"&&(g(d+"0"),g("d"+d)),r}function M(d){for(var g=!0,r=!1,t=!1,s,a=0;a<d.length;a++){if(s=d[a],!P.isArrayOrTypedArray(s)){g=!1;break}s.length>0&&(r=!0);for(var c=0;c<s.length;c++)if(A(s[c])){t=!0;break}}return g&&r&&t}},74512:function(te,X,e){for(var A=e(83328),P=e(49084),o=e(92880).extendFlat,L=e(67824).overrideAll,M=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],d={},g=0;g<M.length;g++){var r=M[g];d[r]=A[r]}d.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},o(d,P("",{cLetter:"z",autoColorDflt:!1})),te.exports=L(d,"calc","nested")},84656:function(te,X,e){var A=e(67792).gl_heatmap2d,P=e(54460),o=e(43080);function L(r,t){this.scene=r,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=A(r.glplot,this.options),this.heatmap._trace=this}var M=L.prototype;M.handlePick=function(r){var t=this.options,s=t.shape,a=r.pointId,c=a%s[0],u=Math.floor(a/s[0]),l=a;return{trace:this,dataCoord:r.dataCoord,traceCoord:[t.x[c],t.y[u],t.z[l]],textLabel:this.textLabels[a],name:this.name,pointIndex:[u,c],hoverinfo:this.hoverinfo}},M.update=function(r,t){var s=t[0];this.index=r.index,this.name=r.name,this.hoverinfo=r.hoverinfo;var a=s.z;this.options.z=[].concat.apply([],a);var c=a[0].length,u=a.length;this.options.shape=[c,u],this.options.x=s.x,this.options.y=s.y,this.options.zsmooth=r.zsmooth;var l=d(r);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],r.text),this.heatmap.update(this.options);var y=this.scene.xaxis,h=this.scene.yaxis,T,f;r.zsmooth===!1&&(T={ppad:s.x[1]-s.x[0]},f={ppad:s.y[1]-s.y[0]}),r._extremes[y._id]=P.findExtremes(y,s.x,T),r._extremes[h._id]=P.findExtremes(h,s.y,f)},M.dispose=function(){this.heatmap.dispose()};function d(r){for(var t=r.colorscale,s=r.zmin,a=r.zmax,c=t.length,u=new Array(c),l=new Array(4*c),y=0;y<c;y++){var h=t[y],T=o(h[1]);u[y]=s+h[0]*(a-s);for(var f=0;f<4;f++)l[4*y+f]=T[f]}return{colorLevels:u,colorValues:l}}function g(r,t,s){var a=new L(r,t.uid);return a.update(t,s),a}te.exports=g},86464:function(te,X,e){var A=e(3400),P=e(51264),o=e(27260),L=e(74512);te.exports=function(d,g,r,t){function s(c,u){return A.coerce(d,g,L,c,u)}var a=P(d,g,s,t);if(!a){g.visible=!1;return}s("text"),s("zsmooth"),o(d,g,t,s,{prefix:"",cLetter:"z"})}},45536:function(te,X,e){te.exports={attributes:e(74512),supplyDefaults:e(86464),colorbar:e(96288),calc:e(19512),plot:e(84656),moduleType:"trace",name:"heatmapgl",basePlotModule:e(39952),categories:["gl","gl2d","2dMap"],meta:{}}},40196:function(te,X,e){var A=e(20832),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(21776).Gw,M=e(25376),d=e(11120),g=e(73316),r=e(92880).extendFlat;te.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:P("x"),yhoverformat:P("y"),text:r({},A.text,{}),hovertext:r({},A.hovertext,{}),orientation:A.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:d("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:d("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:o({},{keys:g.eventDataKeys}),texttemplate:L({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:r({},A.textposition,{arrayOk:!1}),textfont:M({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:M({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:M({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:A.insidetextanchor,textangle:A.textangle,cliponaxis:A.cliponaxis,constraintext:A.constraintext,marker:A.marker,offsetgroup:A.offsetgroup,alignmentgroup:A.alignmentgroup,selected:A.selected,unselected:A.unselected,_deprecated:{bardir:A._deprecated.bardir}}},2e3:function(te){te.exports=function(e,A){for(var P=e.length,o=0,L=0;L<P;L++)A[L]?(e[L]/=A[L],o+=e[L]):e[L]=null;return o}},11120:function(te){te.exports=function(e,A){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},16964:function(te,X,e){var A=e(38248);te.exports={count:function(P,o,L){return L[P]++,1},sum:function(P,o,L,M){var d=M[o];return A(d)?(d=Number(d),L[P]+=d,d):0},avg:function(P,o,L,M,d){var g=M[o];return A(g)&&(g=Number(g),L[P]+=g,d[P]++),0},min:function(P,o,L,M){var d=M[o];if(A(d))if(d=Number(d),A(L[P])){if(L[P]>d){var g=d-L[P];return L[P]=d,g}}else return L[P]=d,d;return 0},max:function(P,o,L,M){var d=M[o];if(A(d))if(d=Number(d),A(L[P])){if(L[P]<d){var g=d-L[P];return L[P]=d,g}}else return L[P]=d,d;return 0}}},67712:function(te,X,e){var A=e(39032),P=A.ONEAVGYEAR,o=A.ONEAVGMONTH,L=A.ONEDAY,M=A.ONEHOUR,d=A.ONEMIN,g=A.ONESEC,r=e(54460).tickIncrement;te.exports=function(l,y,h,T,f){var n=-1.1*y,v=-.1*y,m=l-v,b=h[0],E=h[1],p=Math.min(t(b+v,b+m,T,f),t(E+v,E+m,T,f)),S=Math.min(t(b+n,b+v,T,f),t(E+n,E+v,T,f)),w,i;if(p>S&&S<Math.abs(E-b)/4e3?(w=p,i=!1):(w=Math.min(p,S),i=!0),T.type==="date"&&w>L){var C=w===P?1:6,x=w===P?"M12":"M1";return function(k,I){var B=T.c2d(k,P,f),_=B.indexOf("-",C);_>0&&(B=B.substr(0,_));var z=T.d2c(B,0,f);if(z<k){var O=r(z,x,!1,f);(z+O)/2<k+l&&(z=O)}return I&&i?r(z,x,!0,f):z}}return function(k,I){var B=w*Math.round(k/w);return B+w/10<k&&B+w*.9<k+l&&(B+=w),I&&i&&(B-=w),B}};function t(u,l,y,h){if(u*l<=0)return 1/0;for(var T=Math.abs(l-u),f=y.type==="date",n=s(T,f),v=0;v<10;v++){var m=s(n*80,f);if(n===m)break;if(a(m,u,l,f,y,h))n=m;else break}return n}function s(u,l){return l&&u>g?u>L?u>P*1.1?P:u>o*1.1?o:L:u>M?M:u>d?d:g:Math.pow(10,Math.floor(Math.log(u)/Math.LN10))}function a(u,l,y,h,T,f){if(h&&u>L){var n=c(l,T,f),v=c(y,T,f),m=u===P?0:1;return n[m]!==v[m]}return Math.floor(y/u)-Math.floor(l/u)>.1}function c(u,l,y){var h=l.c2d(u,P,y).split("-");return h[0]===""&&(h.unshift(),h[0]="-"+h[0]),h}},35852:function(te,X,e){var A=e(38248),P=e(3400),o=e(24040),L=e(54460),M=e(84664),d=e(16964),g=e(10648),r=e(2e3),t=e(67712);function s(y,h){var T=[],f=[],n=h.orientation==="h",v=L.getFromId(y,n?h.yaxis:h.xaxis),m=n?"y":"x",b={x:"y",y:"x"}[m],E=h[m+"calendar"],p=h.cumulative,S,w=a(y,h,v,m),i=w[0],C=w[1],x=typeof i.size=="string",k=[],I=x?k:i,B=[],_=[],z=[],O=0,F=h.histnorm,N=h.histfunc,V=F.indexOf("density")!==-1,j,$,q;p.enabled&&V&&(F=F.replace(/ ?density$/,""),V=!1);var oe=N==="max"||N==="min",Z=oe?null:0,G=d.count,re=g[F],H=!1,J=function(ze){return v.r2c(ze,0,E)},ae;for(P.isArrayOrTypedArray(h[b])&&N!=="count"&&(ae=h[b],H=N==="avg",G=d[N]),S=J(i.start),$=J(i.end)+(S-L.tickIncrement(S,i.size,!1,E))/1e6;S<$&&T.length<1e6&&(j=L.tickIncrement(S,i.size,!1,E),T.push((S+j)/2),f.push(Z),z.push([]),k.push(S),V&&B.push(1/(j-S)),H&&_.push(0),!(j<=S));)S=j;k.push(S),!x&&v.type==="date"&&(I={start:J(I.start),end:J(I.end),size:I.size}),y._fullLayout._roundFnOpts||(y._fullLayout._roundFnOpts={});var K=h["_"+m+"bingroup"],Y={leftGap:1/0,rightGap:1/0};K&&(y._fullLayout._roundFnOpts[K]||(y._fullLayout._roundFnOpts[K]=Y),Y=y._fullLayout._roundFnOpts[K]);var ie=f.length,ne=!0,le=Y.leftGap,de=Y.rightGap,we={};for(S=0;S<C.length;S++){var me=C[S];q=P.findBin(me,I),q>=0&&q<ie&&(O+=G(q,S,f,ae,_),ne&&z[q].length&&me!==C[z[q][0]]&&(ne=!1),z[q].push(S),we[S]=q,le=Math.min(le,me-k[q]),de=Math.min(de,k[q+1]-me))}Y.leftGap=le,Y.rightGap=de;var Le;ne||(Le=function(ze,Ie){return function(){var Ne=y._fullLayout._roundFnOpts[K];return t(Ne.leftGap,Ne.rightGap,k,v,E)(ze,Ie)}}),H&&(O=r(f,_)),re&&re(f,O,B),p.enabled&&l(f,p.direction,p.currentbin);var ve=Math.min(T.length,f.length),Ae=[],ye=0,Se=ve-1;for(S=0;S<ve;S++)if(f[S]){ye=S;break}for(S=ve-1;S>=ye;S--)if(f[S]){Se=S;break}for(S=ye;S<=Se;S++)if(A(T[S])&&A(f[S])){var _e={p:T[S],s:f[S],b:0};p.enabled||(_e.pts=z[S],ne?_e.ph0=_e.ph1=z[S].length?C[z[S][0]]:T[S]:(h._computePh=!0,_e.ph0=Le(k[S]),_e.ph1=Le(k[S+1],!0))),Ae.push(_e)}return Ae.length===1&&(Ae[0].width1=L.tickIncrement(Ae[0].p,i.size,!1,E)-Ae[0].p),M(Ae,h),P.isArrayOrTypedArray(h.selectedpoints)&&P.tagSelected(Ae,h,we),Ae}function a(y,h,T,f,n){var v=f+"bins",m=y._fullLayout,b=h["_"+f+"bingroup"],E=m._histogramBinOpts[b],p=m.barmode==="overlay",S,w,i,C,x,k,I,B=function(me){return T.r2c(me,0,C)},_=function(me){return T.c2r(me,0,C)},z=T.type==="date"?function(me){return me||me===0?P.cleanDate(me,null,C):null}:function(me){return A(me)?Number(me):null};function O(me,Le,ve){Le[me+"Found"]?(Le[me]=z(Le[me]),Le[me]===null&&(Le[me]=ve[me])):(k[me]=Le[me]=ve[me],P.nestedProperty(w[0],v+"."+me).set(ve[me]))}if(h["_"+f+"autoBinFinished"])delete h["_"+f+"autoBinFinished"];else{w=E.traces;var F=[],N=!0,V=!1,j=!1;for(S=0;S<w.length;S++)if(i=w[S],i.visible){var $=E.dirs[S];x=i["_"+$+"pos0"]=T.makeCalcdata(i,$),F=P.concat(F,x),delete i["_"+f+"autoBinFinished"],h.visible===!0&&(N?N=!1:(delete i._autoBin,i["_"+f+"autoBinFinished"]=1),o.traceIs(i,"2dMap")&&(V=!0),i.type==="histogram2dcontour"&&(j=!0))}C=w[0][f+"calendar"];var q=L.autoBin(F,T,E.nbins,V,C,E.sizeFound&&E.size),oe=w[0]._autoBin={};if(k=oe[E.dirs[0]]={},j&&(E.size||(q.start=_(L.tickIncrement(B(q.start),q.size,!0,C))),E.end===void 0&&(q.end=_(L.tickIncrement(B(q.end),q.size,!1,C)))),p&&!o.traceIs(h,"2dMap")&&q._dataSpan===0&&T.type!=="category"&&T.type!=="multicategory"&&h.bingroup===""&&typeof h.xbins>"u"){if(n)return[q,x,!0];q=c(y,h,T,f,v)}I=i.cumulative||{},I.enabled&&I.currentbin!=="include"&&(I.direction==="decreasing"?q.start=_(L.tickIncrement(B(q.start),q.size,!0,C)):q.end=_(L.tickIncrement(B(q.end),q.size,!1,C))),E.size=q.size,E.sizeFound||(k.size=q.size,P.nestedProperty(w[0],v+".size").set(q.size)),O("start",E,q),O("end",E,q)}x=h["_"+f+"pos0"],delete h["_"+f+"pos0"];var Z=h._input[v]||{},G=P.extendFlat({},E),re=E.start,H=T.r2l(Z.start),J=H!==void 0;if((E.startFound||J)&&H!==T.r2l(re)){var ae=J?H:P.aggNums(Math.min,null,x),K={type:T.type==="category"||T.type==="multicategory"?"linear":T.type,r2l:T.r2l,dtick:E.size,tick0:re,calendar:C,range:[ae,L.tickIncrement(ae,E.size,!1,C)].map(T.l2r)},Y=L.tickFirst(K);Y>T.r2l(ae)&&(Y=L.tickIncrement(Y,E.size,!0,C)),G.start=T.l2r(Y),J||P.nestedProperty(h,v+".start").set(G.start)}var ie=E.end,ne=T.r2l(Z.end),le=ne!==void 0;if((E.endFound||le)&&ne!==T.r2l(ie)){var de=le?ne:P.aggNums(Math.max,null,x);G.end=T.l2r(de),le||P.nestedProperty(h,v+".start").set(G.end)}var we="autobin"+f;return h._input[we]===!1&&(h._input[v]=P.extendFlat({},h[v]||{}),delete h._input[we],delete h[we]),[G,x]}function c(y,h,T,f,n){var v=y._fullLayout,m=u(y,h),b=!1,E=1/0,p=[h],S,w,i;for(S=0;S<m.length;S++)if(w=m[S],w===h)b=!0;else if(!b)i=v._histogramBinOpts[w["_"+f+"bingroup"]],E=Math.min(E,i.size||w[n].size);else{var C=a(y,w,T,f,!0),x=C[0],k=C[2];w["_"+f+"autoBinFinished"]=1,w["_"+f+"pos0"]=C[1],k?p.push(w):E=Math.min(E,x.size)}var I=new Array(p.length);for(S=0;S<p.length;S++)for(var B=p[S]["_"+f+"pos0"],_=0;_<B.length;_++)if(B[_]!==void 0){I[S]=B[_];break}for(isFinite(E)||(E=P.distinctVals(I).minDiff),S=0;S<p.length;S++){w=p[S];var z=w[f+"calendar"],O={start:T.c2r(I[S]-E/2,0,z),end:T.c2r(I[S]+E/2,0,z),size:E};w._input[n]=w[n]=O,i=v._histogramBinOpts[w["_"+f+"bingroup"]],i&&P.extendFlat(i,O)}return h[n]}function u(y,h){for(var T=h.xaxis,f=h.yaxis,n=h.orientation,v=[],m=y._fullData,b=0;b<m.length;b++){var E=m[b];E.type==="histogram"&&E.visible===!0&&E.orientation===n&&E.xaxis===T&&E.yaxis===f&&v.push(E)}return v}function l(y,h,T){var f,n,v;function m(E){v=y[E],y[E]/=2}function b(E){n=y[E],y[E]=v+n/2,v+=n}if(T==="half")if(h==="increasing")for(m(0),f=1;f<y.length;f++)b(f);else for(m(y.length-1),f=y.length-2;f>=0;f--)b(f);else if(h==="increasing"){for(f=1;f<y.length;f++)y[f]+=y[f-1];T==="exclude"&&(y.unshift(0),y.pop())}else{for(f=y.length-2;f>=0;f--)y[f]+=y[f+1];T==="exclude"&&(y.push(0),y.shift())}}te.exports={calc:s,calcAllAutoBins:a}},73316:function(te){te.exports={eventDataKeys:["binNumber"]}},80536:function(te,X,e){var A=e(3400),P=e(79811),o=e(24040).traceIs,L=e(20011),M=e(31508).validateCornerradius,d=A.nestedProperty,g=e(71888).getAxisGroup,r=[{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"}],t=["x","y"];te.exports=function(a,c){var u=c._histogramBinOpts={},l=[],y={},h=[],T,f,n,v,m,b,E;function p(q,oe){return A.coerce(T._input,T,T._module.attributes,q,oe)}function S(q){return q.orientation==="v"?"x":"y"}function w(q,oe){var Z=P.getFromTrace({_fullLayout:c},q,oe);return Z.type}function i(q,oe,Z){var G=q.uid+"__"+Z;oe||(oe=G);var re=w(q,Z),H=q[Z+"calendar"]||"",J=u[oe],ae=!0;J&&(re===J.axType&&H===J.calendar?(ae=!1,J.traces.push(q),J.dirs.push(Z)):(oe=G,re!==J.axType&&A.warn(["Attempted to group the bins of trace",q.index,"set on a","type:"+re,"axis","with bins on","type:"+J.axType,"axis."].join(" ")),H!==J.calendar&&A.warn(["Attempted to group the bins of trace",q.index,"set with a",H,"calendar","with bins",J.calendar?"on a "+J.calendar+" calendar":"w/o a set calendar"].join(" ")))),ae&&(u[oe]={traces:[q],dirs:[Z],axType:re,calendar:q[Z+"calendar"]||""}),q["_"+Z+"bingroup"]=oe}for(m=0;m<a.length;m++)if(T=a[m],o(T,"histogram")){if(l.push(T),delete T._xautoBinFinished,delete T._yautoBinFinished,T.type==="histogram"){var C=p("marker.cornerradius",c.barcornerradius);T.marker&&(T.marker.cornerradius=M(C))}o(T,"2dMap")||L(T._input,T,c,p)}var x=c._alignmentOpts||{};for(m=0;m<l.length;m++){if(T=l[m],n="",!o(T,"2dMap")){if(v=S(T),c.barmode==="group"&&T.alignmentgroup){var k=T[v+"axis"],I=g(c,k)+T.orientation;(x[I]||{})[T.alignmentgroup]&&(n=I)}!n&&c.barmode!=="overlay"&&(n=g(c,T.xaxis)+g(c,T.yaxis)+S(T))}n?(y[n]||(y[n]=[]),y[n].push(T)):h.push(T)}for(n in y){if(f=y[n],f.length===1){h.push(f[0]);continue}var B=!1;for(f.length&&(T=f[0],B=p("bingroup")),n=B||n,m=0;m<f.length;m++){T=f[m];var _=T._input.bingroup;_&&_!==n&&A.warn(["Trace",T.index,"must match","within bingroup",n+".","Ignoring its bingroup:",_,"setting."].join(" ")),T.bingroup=n,i(T,n,S(T))}}for(m=0;m<h.length;m++){T=h[m];var z=p("bingroup");if(o(T,"2dMap"))for(E=0;E<2;E++){v=t[E];var O=p(v+"bingroup",z?z+"__"+v:null);i(T,O,v)}else i(T,z,S(T))}for(n in u){var F=u[n];for(f=F.traces,b=0;b<r.length;b++){var N=r[b],V=N.name,j,$;if(!(V==="nbins"&&F.sizeFound)){for(m=0;m<f.length;m++){if(T=f[m],v=F.dirs[m],j=N.aStr[v],d(T._input,j).get()!==void 0){F[V]=p(j),F[V+"Found"]=!0;break}$=(T._autoBin||{})[v]||{},$[V]&&d(T,j).set($[V])}if(V==="start"||V==="end")for(;m<f.length;m++)T=f[m],T["_"+v+"bingroup"]&&($=(T._autoBin||{})[v]||{},p(j,$[V]));V==="nbins"&&!F.sizeFound&&!F.nbinsFound&&(T=f[0],F[V]=p(j))}}}}},6616:function(te,X,e){var A=e(24040),P=e(3400),o=e(76308),L=e(31508).handleText,M=e(55592),d=e(40196);te.exports=function(r,t,s,a){function c(S,w){return P.coerce(r,t,d,S,w)}var u=c("x"),l=c("y"),y=c("cumulative.enabled");y&&(c("cumulative.direction"),c("cumulative.currentbin")),c("text");var h=c("textposition");L(r,t,a,c,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c("hovertext"),c("hovertemplate"),c("xhoverformat"),c("yhoverformat");var T=c("orientation",l&&!u?"h":"v"),f=T==="v"?"x":"y",n=T==="v"?"y":"x",v=u&&l?Math.min(P.minRowLength(u)&&P.minRowLength(l)):P.minRowLength(t[f]||[]);if(!v){t.visible=!1;return}t._length=v;var m=A.getComponentMethod("calendars","handleTraceDefaults");m(r,t,["x","y"],a);var b=t[n];b&&c("histfunc"),c("histnorm"),c("autobin"+f),M(r,t,c,s,a),P.coerceSelectionMarkerOpacity(t,c);var E=(t.marker.line||{}).color,p=A.getComponentMethod("errorbars","supplyDefaults");p(r,t,E||o.defaultLine,{axis:"y"}),p(r,t,E||o.defaultLine,{axis:"x",inherit:"y"})}},84980:function(te){te.exports=function(e,A,P,o,L){if(e.x="xVal"in A?A.xVal:A.x,e.y="yVal"in A?A.yVal:A.y,"zLabelVal"in A&&(e.z=A.zLabelVal),A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),!(P.cumulative||{}).enabled){var M=Array.isArray(L)?o[0].pts[L[0]][L[1]]:o[L].pts;e.pointNumbers=M,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var d;if(P._indexToPoints){d=[];for(var g=0;g<M.length;g++)d=d.concat(P._indexToPoints[M[g]])}else d=M;e.pointIndices=d}return e}},43339:function(te,X,e){var A=e(63400).hoverPoints,P=e(54460).hoverLabelText;te.exports=function(L,M,d,g,r){var t=A(L,M,d,g,r);if(t){L=t[0];var s=L.cd[L.index],a=L.cd[0].trace;if(!a.cumulative.enabled){var c=a.orientation==="h"?"y":"x";L[c+"Label"]=P(L[c+"a"],[s.ph0,s.ph1],a[c+"hoverformat"])}return t}}},42600:function(te,X,e){te.exports={attributes:e(40196),layoutAttributes:e(39324),supplyDefaults:e(6616),crossTraceDefaults:e(80536),supplyLayoutDefaults:e(37156),calc:e(35852).calc,crossTraceCalc:e(96376).crossTraceCalc,plot:e(98184).plot,layerName:"barlayer",style:e(60100).style,styleOnSelect:e(60100).styleOnSelect,colorbar:e(5528),hoverPoints:e(43339),selectPoints:e(45784),eventData:e(84980),moduleType:"trace",name:"histogram",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},10648:function(te){te.exports={percent:function(X,e){for(var A=X.length,P=100/e,o=0;o<A;o++)X[o]*=P},probability:function(X,e){for(var A=X.length,P=0;P<A;P++)X[P]/=e},density:function(X,e,A,P){var o=X.length;P=P||1;for(var L=0;L<o;L++)X[L]*=A[L]*P},"probability density":function(X,e,A,P){var o=X.length;P&&(e/=P);for(var L=0;L<o;L++)X[L]*=A[L]/e}}},37008:function(te,X,e){var A=e(40196),P=e(11120),o=e(83328),L=e(45464),M=e(29736).axisHoverFormat,d=e(21776).Ks,g=e(21776).Gw,r=e(49084),t=e(92880).extendFlat;te.exports=t({x:A.x,y:A.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:A.histnorm,histfunc:A.histfunc,nbinsx:A.nbinsx,xbins:P("x"),nbinsy:A.nbinsy,ybins:P("y"),autobinx:A.autobinx,autobiny:A.autobiny,bingroup:t({},A.bingroup,{}),xbingroup:t({},A.bingroup,{}),ybingroup:t({},A.bingroup,{}),xgap:o.xgap,ygap:o.ygap,zsmooth:o.zsmooth,xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:d({},{keys:"z"}),texttemplate:g({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:o.textfont,showlegend:t({},L.showlegend,{dflt:!1})},r("",{cLetter:"z",autoColorDflt:!1}))},55480:function(te,X,e){var A=e(3400),P=e(54460),o=e(16964),L=e(10648),M=e(2e3),d=e(67712),g=e(35852).calcAllAutoBins;te.exports=function(c,u){var l=P.getFromId(c,u.xaxis),y=P.getFromId(c,u.yaxis),h=u.xcalendar,T=u.ycalendar,f=function(Oe){return l.r2c(Oe,0,h)},n=function(Oe){return y.r2c(Oe,0,T)},v=function(Oe){return l.c2r(Oe,0,h)},m=function(Oe){return y.c2r(Oe,0,T)},b,E,p,S,w=g(c,u,l,"x"),i=w[0],C=w[1],x=g(c,u,y,"y"),k=x[0],I=x[1],B=u._length;C.length>B&&C.splice(B,C.length-B),I.length>B&&I.splice(B,I.length-B);var _=[],z=[],O=[],F=typeof i.size=="string",N=typeof k.size=="string",V=[],j=[],$=F?V:i,q=N?j:k,oe=0,Z=[],G=[],re=u.histnorm,H=u.histfunc,J=re.indexOf("density")!==-1,ae=H==="max"||H==="min",K=ae?null:0,Y=o.count,ie=L[re],ne=!1,le=[],de=[],we="z"in u?u.z:"marker"in u&&Array.isArray(u.marker.color)?u.marker.color:"";we&&H!=="count"&&(ne=H==="avg",Y=o[H]);var me=i.size,Le=f(i.start),ve=f(i.end)+(Le-P.tickIncrement(Le,me,!1,h))/1e6;for(b=Le;b<ve;b=P.tickIncrement(b,me,!1,h))z.push(K),V.push(b),ne&&O.push(0);V.push(b);var Ae=z.length,ye=(b-Le)/Ae,Se=v(Le+ye/2),_e=k.size,ze=n(k.start),Ie=n(k.end)+(ze-P.tickIncrement(ze,_e,!1,T))/1e6;for(b=ze;b<Ie;b=P.tickIncrement(b,_e,!1,T)){_.push(z.slice()),j.push(b);var Ne=new Array(Ae);for(E=0;E<Ae;E++)Ne[E]=[];G.push(Ne),ne&&Z.push(O.slice())}j.push(b);var et=_.length,st=(b-ze)/et,Ze=m(ze+st/2);J&&(le=r(z.length,$,ye,F),de=r(_.length,q,st,N)),!F&&l.type==="date"&&($=t(f,$)),!N&&y.type==="date"&&(q=t(n,q));var Ke=!0,nt=!0,it=new Array(Ae),lt=new Array(et),vt=1/0,xt=1/0,Je=1/0,Pe=1/0;for(b=0;b<B;b++){var Ue=C[b],He=I[b];p=A.findBin(Ue,$),S=A.findBin(He,q),p>=0&&p<Ae&&S>=0&&S<et&&(oe+=Y(p,b,_[S],we,Z[S]),G[S][p].push(b),Ke&&(it[p]===void 0?it[p]=Ue:it[p]!==Ue&&(Ke=!1)),nt&&(lt[S]===void 0?lt[S]=He:lt[S]!==He&&(nt=!1)),vt=Math.min(vt,Ue-V[p]),xt=Math.min(xt,V[p+1]-Ue),Je=Math.min(Je,He-j[S]),Pe=Math.min(Pe,j[S+1]-He))}if(ne)for(S=0;S<et;S++)oe+=M(_[S],Z[S]);if(ie)for(S=0;S<et;S++)ie(_[S],oe,le,de[S]);return{x:C,xRanges:s(V,Ke&&it,vt,xt,l,h),x0:Se,dx:ye,y:I,yRanges:s(j,nt&&lt,Je,Pe,y,T),y0:Ze,dy:st,z:_,pts:G}};function r(a,c,u,l){var y=new Array(a),h;if(l)for(h=0;h<a;h++)y[h]=1/(c[h+1]-c[h]);else{var T=1/u;for(h=0;h<a;h++)y[h]=T}return y}function t(a,c){return{start:a(c.start),end:a(c.end),size:c.size}}function s(a,c,u,l,y,h){var T,f=a.length-1,n=new Array(f),v=d(u,l,a,y,h);for(T=0;T<f;T++){var m=(c||[])[T];n[T]=m===void 0?[v(a[T]),v(a[T+1],!0)]:[m,m]}return n}},99784:function(te,X,e){var A=e(3400),P=e(56408),o=e(82748),L=e(27260),M=e(39096),d=e(37008);te.exports=function(r,t,s,a){function c(u,l){return A.coerce(r,t,d,u,l)}P(r,t,c,a),t.visible!==!1&&(o(r,t,c,a),L(r,t,a,c,{prefix:"",cLetter:"z"}),c("hovertemplate"),M(c,a),c("xhoverformat"),c("yhoverformat"))}},59576:function(te,X,e){var A=e(55512),P=e(54460).hoverLabelText;te.exports=function(L,M,d,g,r){var t=A(L,M,d,g,r);if(t){L=t[0];var s=L.index,a=s[0],c=s[1],u=L.cd[0],l=u.trace,y=u.xRanges[c],h=u.yRanges[a];return L.xLabel=P(L.xa,[y[0],y[1]],l.xhoverformat),L.yLabel=P(L.ya,[h[0],h[1]],l.yhoverformat),t}}},21536:function(te,X,e){te.exports={attributes:e(37008),supplyDefaults:e(99784),crossTraceDefaults:e(80536),calc:e(19512),plot:e(41420),layerName:"heatmaplayer",colorbar:e(96288),style:e(41648),hoverPoints:e(59576),eventData:e(84980),moduleType:"trace",name:"histogram2d",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}},56408:function(te,X,e){var A=e(24040),P=e(3400);te.exports=function(L,M,d,g){var r=d("x"),t=d("y"),s=P.minRowLength(r),a=P.minRowLength(t);if(!s||!a){M.visible=!1;return}M._length=Math.min(s,a);var c=A.getComponentMethod("calendars","handleTraceDefaults");c(L,M,["x","y"],g);var u=d("z")||d("marker.color");u&&d("histfunc"),d("histnorm"),d("autobinx"),d("autobiny")}},81220:function(te,X,e){var A=e(37008),P=e(67104),o=e(49084),L=e(29736).axisHoverFormat,M=e(92880).extendFlat;te.exports=M({x:A.x,y:A.y,z:A.z,marker:A.marker,histnorm:A.histnorm,histfunc:A.histfunc,nbinsx:A.nbinsx,xbins:A.xbins,nbinsy:A.nbinsy,ybins:A.ybins,autobinx:A.autobinx,autobiny:A.autobiny,bingroup:A.bingroup,xbingroup:A.xbingroup,ybingroup:A.ybingroup,autocontour:P.autocontour,ncontours:P.ncontours,contours:P.contours,line:{color:P.line.color,width:M({},P.line.width,{dflt:.5}),dash:P.line.dash,smoothing:P.line.smoothing,editType:"plot"},xhoverformat:L("x"),yhoverformat:L("y"),zhoverformat:L("z",1),hovertemplate:A.hovertemplate,texttemplate:P.texttemplate,textfont:P.textfont},o("",{cLetter:"z",editTypeOverride:"calc"}))},3704:function(te,X,e){var A=e(3400),P=e(56408),o=e(84952),L=e(97680),M=e(39096),d=e(81220);te.exports=function(r,t,s,a){function c(l,y){return A.coerce(r,t,d,l,y)}function u(l){return A.coerce2(r,t,d,l)}P(r,t,c,a),t.visible!==!1&&(o(r,t,c,u),L(r,t,c,a),c("xhoverformat"),c("yhoverformat"),c("hovertemplate"),t.contours&&t.contours.coloring==="heatmap"&&M(c,a))}},65664:function(te,X,e){te.exports={attributes:e(81220),supplyDefaults:e(3704),crossTraceDefaults:e(80536),calc:e(20688),plot:e(23676).plot,layerName:"contourlayer",style:e(52440),colorbar:e(55296),hoverPoints:e(38200),moduleType:"trace",name:"histogram2dcontour",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},97376:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(49084),L=e(86968).u,M=e(74996),d=e(424),g=e(40516),r=e(32984),t=e(92880).extendFlat,s=e(98192).c;te.exports={labels:d.labels,parents:d.parents,values:d.values,branchvalues:d.branchvalues,count:d.count,level:d.level,maxdepth:d.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:g.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:t({colors:d.marker.colors,line:d.marker.line,pattern:s,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:d.leaf,pathbar:g.pathbar,text:M.text,textinfo:d.textinfo,texttemplate:P({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),hovertext:M.hovertext,hoverinfo:d.hoverinfo,hovertemplate:A({},{keys:r.eventDataKeys}),textfont:M.textfont,insidetextfont:M.insidetextfont,outsidetextfont:g.outsidetextfont,textposition:g.textposition,sort:M.sort,root:d.root,domain:L({name:"icicle",trace:!0,editType:"calc"})}},59564:function(te,X,e){var A=e(7316);X.name="icicle",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},73876:function(te,X,e){var A=e(3776);X.r=function(P,o){return A.calc(P,o)},X.q=function(P){return A._runCrossTraceCalc("icicle",P)}},7045:function(te,X,e){var A=e(3400),P=e(97376),o=e(76308),L=e(86968).Q,M=e(31508).handleText,d=e(78048).TEXTPAD,g=e(74174).handleMarkerDefaults,r=e(8932),t=r.hasColorscale,s=r.handleDefaults;te.exports=function(c,u,l,y){function h(p,S){return A.coerce(c,u,P,p,S)}var T=h("labels"),f=h("parents");if(!T||!T.length||!f||!f.length){u.visible=!1;return}var n=h("values");n&&n.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),h("tiling.orientation"),h("tiling.flip"),h("tiling.pad");var v=h("text");h("texttemplate"),u.texttemplate||h("textinfo",A.isArrayOrTypedArray(v)?"text+label":"label"),h("hovertext"),h("hovertemplate");var m=h("pathbar.visible"),b="auto";M(c,u,y,h,b,{hasPathbar:m,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition"),g(c,u,y,h);var E=u._hasColorscale=t(c,"marker","colors")||(c.marker||{}).coloraxis;E&&s(c,u,y,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",E?1:.7),u._hovered={marker:{line:{width:2,color:o.contrast(y.paper_bgcolor)}}},m&&(h("pathbar.thickness",u.pathbar.textfont.size+2*d),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),L(u,y,h),u._length=null}},67880:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(72736),M=e(25132),d=e(47192).styleOne,g=e(32984),r=e(78176),t=e(45716),s=e(96488).formatSliceLabel,a=!1;te.exports=function(u,l,y,h,T){var f=T.width,n=T.height,v=T.viewX,m=T.viewY,b=T.pathSlice,E=T.toMoveInsideSlice,p=T.strTransform,S=T.hasTransition,w=T.handleSlicesExit,i=T.makeUpdateSliceInterpolator,C=T.makeUpdateTextInterpolator,x=T.prevEntry,k={},I=u._context.staticPlot,B=u._fullLayout,_=l[0],z=_.trace,O=z.textposition.indexOf("left")!==-1,F=z.textposition.indexOf("right")!==-1,N=z.textposition.indexOf("bottom")!==-1,V=M(y,[f,n],{flipX:z.tiling.flip.indexOf("x")>-1,flipY:z.tiling.flip.indexOf("y")>-1,orientation:z.tiling.orientation,pad:{inner:z.tiling.pad},maxDepth:z._maxDepth}),j=V.descendants(),$=1/0,q=-1/0;j.forEach(function(H){var J=H.depth;J>=z._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):($=Math.min($,J),q=Math.max(q,J))}),h=h.data(j,r.getPtId),z._maxVisibleLayers=isFinite(q)?q-$+1:0,h.enter().append("g").classed("slice",!0),w(h,a,k,[f,n],b),h.order();var oe=null;if(S&&x){var Z=r.getPtId(x);h.each(function(H){oe===null&&r.getPtId(H)===Z&&(oe={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var G=function(){return oe||{x0:0,x1:f,y0:0,y1:n}},re=h;return S&&(re=re.transition().each("end",function(){var H=A.select(this);r.setSliceCursor(H,u,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),re.each(function(H){H._x0=v(H.x0),H._x1=v(H.x1),H._y0=m(H.y0),H._y1=m(H.y1),H._hoverX=v(H.x1-z.tiling.pad),H._hoverY=m(N?H.y1-z.tiling.pad/2:H.y0+z.tiling.pad/2);var J=A.select(this),ae=P.ensureSingle(J,"path","surface",function(ne){ne.style("pointer-events",I?"none":"all")});S?ae.transition().attrTween("d",function(ne){var le=i(ne,a,G(),[f,n],{orientation:z.tiling.orientation,flipX:z.tiling.flip.indexOf("x")>-1,flipY:z.tiling.flip.indexOf("y")>-1});return function(de){return b(le(de))}}):ae.attr("d",b),J.call(t,y,u,l,{styleOne:d,eventDataKeys:g.eventDataKeys,transitionTime:g.CLICK_TRANSITION_TIME,transitionEasing:g.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,u,{isTransitioning:u._transitioning}),ae.call(d,H,z,u,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=s(H,y,z,l,B)||"";var K=P.ensureSingle(J,"g","slicetext"),Y=P.ensureSingle(K,"text","",function(ne){ne.attr("data-notex",1)}),ie=P.ensureUniformFontSize(u,r.determineTextFont(z,H,B.font));Y.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",F?"end":O?"start":"middle").call(o.font,ie).call(L.convertToTspans,u),H.textBB=o.bBox(Y.node()),H.transform=E(H,{fontSize:ie.size}),H.transform.fontSize=ie.size,S?Y.transition().attrTween("transform",function(ne){var le=C(ne,a,G(),[f,n]);return function(de){return p(le(de))}}):Y.attr("transform",p(H))}),oe}},29044:function(te,X,e){te.exports={moduleType:"trace",name:"icicle",basePlotModule:e(59564),categories:[],animatable:!0,attributes:e(97376),layoutAttributes:e(90676),supplyDefaults:e(7045),supplyLayoutDefaults:e(4304),calc:e(73876).r,crossTraceCalc:e(73876).q,plot:e(38364),style:e(47192).style,colorbar:e(5528),meta:{}}},90676:function(te){te.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(te,X,e){var A=e(3400),P=e(90676);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("iciclecolorway",M.colorway),d("extendiciclecolors")}},25132:function(te,X,e){var A=e(74148),P=e(83024);te.exports=function(L,M,d){var g=d.flipX,r=d.flipY,t=d.orientation==="h",s=d.maxDepth,a=M[0],c=M[1];s&&(a=(L.height+1)*M[0]/Math.min(L.height+1,s),c=(L.height+1)*M[1]/Math.min(L.height+1,s));var u=A.partition().padding(d.pad.inner).size(t?[M[1],a]:[M[0],c])(L);return(t||g||r)&&P(u,M,{swapXY:t,flipX:g,flipY:r}),u}},38364:function(te,X,e){var A=e(95808),P=e(67880);te.exports=function(L,M,d,g){return A(L,M,d,g,{type:"icicle",drawDescendants:P})}},47192:function(te,X,e){var A=e(33428),P=e(76308),o=e(3400),L=e(82744).resizeText,M=e(60404);function d(r){var t=r._fullLayout._iciclelayer.selectAll(".trace");L(r,t,"icicle"),t.each(function(s){var a=A.select(this),c=s[0],u=c.trace;a.style("opacity",u.opacity),a.selectAll("path.surface").each(function(l){A.select(this).call(g,l,u,r)})})}function g(r,t,s,a){var c=t.data.data,u=!t.children,l=c.i,y=o.castOption(s,l,"marker.line.color")||P.defaultLine,h=o.castOption(s,l,"marker.line.width")||0;r.call(M,t,s,a).style("stroke-width",h).call(P.stroke,y).style("opacity",u?s.leaf.opacity:null)}te.exports={style:d,styleOne:g}},95188:function(te,X,e){for(var A=e(45464),P=e(21776).Ks,o=e(92880).extendFlat,L=e(47797).colormodel,M=["rgb","rgba","rgba256","hsl","hsla"],d=[],g=[],r=0;r<M.length;r++){var t=L[M[r]];d.push("For the `"+M[r]+"` colormodel, it is ["+(t.zminDflt||t.min).join(", ")+"]."),g.push("For the `"+M[r]+"` colormodel, it is ["+(t.zmaxDflt||t.max).join(", ")+"].")}te.exports=o({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:M,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:o({},A.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:P({},{keys:["z","color","colormodel"]}),transforms:void 0})},93336:function(te,X,e){var A=e(3400),P=e(47797),o=e(38248),L=e(54460),M=e(3400).maxRowLength,d=e(18712).i;te.exports=function(a,c){var u,l;if(c._hasZ)u=c.z.length,l=M(c.z);else if(c._hasSource){var y=d(c.source);u=y.height,l=y.width}var h=L.getFromId(a,c.xaxis||"x"),T=L.getFromId(a,c.yaxis||"y"),f=h.d2c(c.x0)-c.dx/2,n=T.d2c(c.y0)-c.dy/2,v,m=[f,f+l*c.dx],b=[n,n+u*c.dy];if(h&&h.type==="log")for(v=0;v<l;v++)m.push(f+v*c.dx);if(T&&T.type==="log")for(v=0;v<u;v++)b.push(n+v*c.dy);c._extremes[h._id]=L.findExtremes(h,m),c._extremes[T._id]=L.findExtremes(T,b),c._scaler=t(c);var E={x0:f,y0:n,z:c.z,w:l,h:u};return[E]};function g(s,a,c,u){return function(l){return A.constrain((l-s)*a,c,u)}}function r(s,a){return function(c){return A.constrain(c,s,a)}}function t(s){var a=P.colormodel[s.colormodel],c=a.colormodel||s.colormodel,u=c.length;s._sArray=[];for(var l=0;l<u;l++)a.min[l]!==s.zmin[l]||a.max[l]!==s.zmax[l]?s._sArray.push(g(s.zmin[l],(a.max[l]-a.min[l])/(s.zmax[l]-s.zmin[l]),a.min[l],a.max[l])):s._sArray.push(r(a.min[l],a.max[l]));return function(y){for(var h=y.slice(0,u),T=0;T<u;T++){var f=h[T];if(!o(f))return!1;h[T]=s._sArray[T](f)}return h}}},47797:function(te){te.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(X){return X.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(X){return X.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(X){return X.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(X){var e=X.slice(0,3);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(X){var e=X.slice(0,4);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["°","%","%",""]}}}},13188:function(te,X,e){var A=e(3400),P=e(95188),o=e(47797),L=e(81792).IMAGE_URL_PREFIX;te.exports=function(d,g){function r(a,c){return A.coerce(d,g,P,a,c)}r("source"),g.source&&!g.source.match(L)&&delete g.source,g._hasSource=!!g.source;var t=r("z");if(g._hasZ=!(t===void 0||!t.length||!t[0]||!t[0].length),!g._hasZ&&!g._hasSource){g.visible=!1;return}r("x0"),r("y0"),r("dx"),r("dy");var s;g._hasZ?(r("colormodel","rgb"),s=o.colormodel[g.colormodel],r("zmin",s.zminDflt||s.min),r("zmax",s.zmaxDflt||s.max)):g._hasSource&&(g.colormodel="rgba256",s=o.colormodel[g.colormodel],g.zmin=s.zminDflt,g.zmax=s.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),g._length=null}},79972:function(te){te.exports=function(e,A){return"xVal"in A&&(e.x=A.xVal),"yVal"in A&&(e.y=A.yVal),A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),e.color=A.color,e.colormodel=A.trace.colormodel,e.z||(e.z=A.color),e}},18712:function(te,X,e){var A=e(19480),P=e(81792).IMAGE_URL_PREFIX,o=e(33576).Buffer;X.i=function(L){var M=L.replace(P,""),d=new o(M,"base64");return A(d)}},24892:function(te,X,e){var A=e(93024),P=e(3400),o=P.isArrayOrTypedArray,L=e(47797);te.exports=function(d,g,r){var t=d.cd[0],s=t.trace,a=d.xa,c=d.ya;if(!(A.inbox(g-t.x0,g-(t.x0+t.w*s.dx),0)>0||A.inbox(r-t.y0,r-(t.y0+t.h*s.dy),0)>0)){var u=Math.floor((g-t.x0)/s.dx),l=Math.floor(Math.abs(r-t.y0)/s.dy),y;if(s._hasZ?y=t.z[l][u]:s._hasSource&&(y=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(u,l,1,1).data),!!y){var h=t.hi||s.hoverinfo,T;if(h){var f=h.split("+");f.indexOf("all")!==-1&&(f=["color"]),f.indexOf("color")!==-1&&(T=!0)}var n=L.colormodel[s.colormodel],v=n.colormodel||s.colormodel,m=v.length,b=s._scaler(y),E=n.suffix,p=[];(s.hovertemplate||T)&&(p.push("["+[b[0]+E[0],b[1]+E[1],b[2]+E[2]].join(", ")),m===4&&p.push(", "+b[3]+E[3]),p.push("]"),p=p.join(""),d.extraText=v.toUpperCase()+": "+p);var S;o(s.hovertext)&&o(s.hovertext[l])?S=s.hovertext[l][u]:o(s.text)&&o(s.text[l])&&(S=s.text[l][u]);var w=c.c2p(t.y0+(l+.5)*s.dy),i=t.x0+(u+.5)*s.dx,C=t.y0+(l+.5)*s.dy,x="["+y.slice(0,s.colormodel.length).join(", ")+"]";return[P.extendFlat(d,{index:[l,u],x0:a.c2p(t.x0+u*s.dx),x1:a.c2p(t.x0+(u+1)*s.dx),y0:w,y1:w,color:b,xVal:i,xLabelVal:i,yVal:C,yLabelVal:C,zLabelVal:x,text:S,hovertemplateLabels:{zLabel:x,colorLabel:p,"color[0]Label":b[0]+E[0],"color[1]Label":b[1]+E[1],"color[2]Label":b[2]+E[2],"color[3]Label":b[3]+E[3]}})]}}}},48928:function(te,X,e){te.exports={attributes:e(95188),supplyDefaults:e(13188),calc:e(93336),plot:e(63715),style:e(28576),hoverPoints:e(24892),eventData:e(79972),moduleType:"trace",name:"image",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(te,X,e){var A=e(33428),P=e(3400),o=P.strTranslate,L=e(9616),M=e(47797),d=e(9188),g=e(2264).STYLE;te.exports=function(t,s,a,c){var u=s.xaxis,l=s.yaxis,y=!t._context._exportedPlot&&d();P.makeTraceGroups(c,a,"im").each(function(h){var T=A.select(this),f=h[0],n=f.trace,v=(n.zsmooth==="fast"||n.zsmooth===!1&&y)&&!n._hasZ&&n._hasSource&&u.type==="linear"&&l.type==="linear";n._realImage=v;var m=f.z,b=f.x0,E=f.y0,p=f.w,S=f.h,w=n.dx,i=n.dy,C,x,k,I,B,_;for(_=0;C===void 0&&_<p;)C=u.c2p(b+_*w),_++;for(_=p;x===void 0&&_>0;)x=u.c2p(b+_*w),_--;for(_=0;I===void 0&&_<S;)I=l.c2p(E+_*i),_++;for(_=S;B===void 0&&_>0;)B=l.c2p(E+_*i),_--;if(x<C&&(k=x,x=C,C=k),B<I&&(k=I,I=B,B=k),!v){var z=.5;C=Math.max(-z*u._length,C),x=Math.min((1+z)*u._length,x),I=Math.max(-z*l._length,I),B=Math.min((1+z)*l._length,B)}var O=Math.round(x-C),F=Math.round(B-I),N=O<=0||F<=0;if(N){var V=T.selectAll("image").data([]);V.exit().remove();return}function j(K){var Y=document.createElement("canvas");Y.width=O,Y.height=F;var ie=Y.getContext("2d",{willReadFrequently:!0}),ne=function(ze){return P.constrain(Math.round(u.c2p(b+ze*w)-C),0,O)},le=function(ze){return P.constrain(Math.round(l.c2p(E+ze*i)-I),0,F)},de=M.colormodel[n.colormodel],we=de.colormodel||n.colormodel,me=de.fmt,Le;for(_=0;_<f.w;_++){var ve=ne(_),Ae=ne(_+1);if(!(Ae===ve||isNaN(Ae)||isNaN(ve)))for(var ye=0;ye<f.h;ye++){var Se=le(ye),_e=le(ye+1);_e===Se||isNaN(_e)||isNaN(Se)||!K(_,ye)||(Le=n._scaler(K(_,ye)),Le?ie.fillStyle=we+"("+me(Le).join(",")+")":ie.fillStyle="rgba(0,0,0,0)",ie.fillRect(ve,Se,Ae-ve,_e-Se))}}return Y}var $=T.selectAll("image").data([h]);$.enter().append("svg:image").attr({xmlns:L.svg,preserveAspectRatio:"none"}),$.exit().remove();var q=n.zsmooth===!1?g:"";if(v){var oe=P.simpleMap(u.range,u.r2l),Z=P.simpleMap(l.range,l.r2l),G=oe[1]<oe[0],re=Z[1]>Z[0];if(G||re){var H=C+O/2,J=I+F/2;q+="transform:"+o(H+"px",J+"px")+"scale("+(G?-1:1)+","+(re?-1:1)+")"+o(-H+"px",-J+"px")+";"}}$.attr("style",q);var ae=new Promise(function(K){if(n._hasZ)K();else if(n._hasSource)if(n._canvas&&n._canvas.el.width===p&&n._canvas.el.height===S&&n._canvas.source===n.source)K();else{var Y=document.createElement("canvas");Y.width=p,Y.height=S;var ie=Y.getContext("2d",{willReadFrequently:!0});n._image=n._image||new Image;var ne=n._image;ne.onload=function(){ie.drawImage(ne,0,0),n._canvas={el:Y,source:n.source},K()},ne.setAttribute("src",n.source)}}).then(function(){var K,Y;if(n._hasZ)Y=j(function(le,de){var we=m[de][le];return P.isTypedArray(we)&&(we=Array.from(we)),we}),K=Y.toDataURL("image/png");else if(n._hasSource)if(v)K=n.source;else{var ie=n._canvas.el.getContext("2d",{willReadFrequently:!0}),ne=ie.getImageData(0,0,p,S).data;Y=j(function(le,de){var we=4*(de*p+le);return[ne[we],ne[we+1],ne[we+2],ne[we+3]]}),K=Y.toDataURL("image/png")}$.attr({"xlink:href":K,height:F,width:O,x:C,y:I})});t._promises.push(ae)})}},28576:function(te,X,e){var A=e(33428);te.exports=function(o){A.select(o).selectAll(".im image").style("opacity",function(L){return L[0].trace.opacity})}},89864:function(te,X,e){var A=e(92880).extendFlat,P=e(92880).extendDeep,o=e(67824).overrideAll,L=e(25376),M=e(22548),d=e(86968).u,g=e(94724),r=e(31780).templatedArray,t=e(48164),s=e(29736).descriptionOnlyNumbers,a=L({editType:"plot",colorEditType:"plot"}),c={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:M.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"},l=r("step",P({},c,{range:u}));te.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:d({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:A({},a,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:s("value")},font:A({},a,{}),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:s("value")},increasing:{symbol:{valType:"string",dflt:t.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:t.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:t.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:t.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:A({},a,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:P({},c,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:M.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:o({range:u,visible:A({},g.visible,{dflt:!0}),tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:A({},g.ticks,{dflt:"outside"}),ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:L({}),tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,separatethousands:g.separatethousands,exponentformat:g.exponentformat,minexponent:g.minexponent,showexponent:g.showexponent,editType:"plot"},"plot"),steps:l,threshold:{line:{color:A({},c.line.color,{}),width:A({},c.line.width,{dflt:1}),editType:"plot"},thickness:A({},c.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},92728:function(te,X,e){var A=e(7316);X.name="indicator",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},79136:function(te){function X(e,A){var P=[],o=A.value;typeof A._lastValue!="number"&&(A._lastValue=A.value);var L=A._lastValue,M=L;return A._hasDelta&&typeof A.delta.reference=="number"&&(M=A.delta.reference),P[0]={y:o,lastY:L,delta:o-M,relativeDelta:(o-M)/M},P}te.exports={calc:X}},12096:function(te){te.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},20424:function(te,X,e){var A=e(3400),P=e(89864),o=e(86968).Q,L=e(31780),M=e(51272),d=e(12096),g=e(26332),r=e(25404),t=e(95936),s=e(42568);function a(u,l,y,h){function T(B,_){return A.coerce(u,l,P,B,_)}o(l,h,T),T("mode"),l._hasNumber=l.mode.indexOf("number")!==-1,l._hasDelta=l.mode.indexOf("delta")!==-1,l._hasGauge=l.mode.indexOf("gauge")!==-1;var f=T("value");l._range=[0,typeof f=="number"?1.5*f:1];var n=new Array(2),v;l._hasNumber&&(T("number.valueformat"),T("number.font.color",h.font.color),T("number.font.family",h.font.family),T("number.font.size"),l.number.font.size===void 0&&(l.number.font.size=d.defaultNumberFontSize,n[0]=!0),T("number.prefix"),T("number.suffix"),v=l.number.font.size);var m;l._hasDelta&&(T("delta.font.color",h.font.color),T("delta.font.family",h.font.family),T("delta.font.size"),l.delta.font.size===void 0&&(l.delta.font.size=(l._hasNumber?.5:1)*(v||d.defaultNumberFontSize),n[1]=!0),T("delta.reference",l.value),T("delta.relative"),T("delta.valueformat",l.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),m=l.delta.font.size),l._scaleNumbers=(!l._hasNumber||n[0])&&(!l._hasDelta||n[1])||!1,T("title.font.color",h.font.color),T("title.font.family",h.font.family),T("title.font.size",.25*(v||m||d.defaultNumberFontSize)),T("title.text");var b,E,p,S;function w(B,_){return A.coerce(b,E,P.gauge,B,_)}function i(B,_){return A.coerce(p,S,P.gauge.axis,B,_)}if(l._hasGauge){b=u.gauge,b||(b={}),E=L.newContainer(l,"gauge"),w("shape");var C=l._isBullet=l.gauge.shape==="bullet";C||T("title.align","center");var x=l._isAngular=l.gauge.shape==="angular";x||T("align","center"),w("bgcolor",h.paper_bgcolor),w("borderwidth"),w("bordercolor"),w("bar.color"),w("bar.line.color"),w("bar.line.width");var k=d.valueThickness*(l.gauge.shape==="bullet"?.5:1);w("bar.thickness",k),M(b,E,{name:"steps",handleItemDefaults:c}),w("threshold.value"),w("threshold.thickness"),w("threshold.line.width"),w("threshold.line.color"),p={},b&&(p=b.axis||{}),S=L.newContainer(E,"axis"),i("visible"),l._range=i("range",l._range);var I={noAutotickangles:!0,outerTicks:!0};g(p,S,i,"linear"),s(p,S,i,"linear",I),t(p,S,i,"linear",I),r(p,S,i,I)}else T("title.align","center"),T("align","center"),l._isAngular=l._isBullet=!1;l._length=null}function c(u,l){function y(h,T){return A.coerce(u,l,P.gauge.steps,h,T)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}te.exports={supplyDefaults:a}},43480:function(te,X,e){te.exports={moduleType:"trace",name:"indicator",basePlotModule:e(92728),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e(89864),supplyDefaults:e(20424).supplyDefaults,calc:e(79136).calc,plot:e(97864),meta:{}}},97864:function(te,X,e){var A=e(33428),P=e(67756).qy,o=e(67756).Gz,L=e(3400),M=L.strScale,d=L.strTranslate,g=L.rad2deg,r=e(84284).MID_SHIFT,t=e(43616),s=e(12096),a=e(72736),c=e(54460),u=e(28336),l=e(37668),y=e(94724),h=e(76308),T={left:"start",center:"middle",right:"end"},f={left:0,center:.5,right:1},n=/[yzafpnµmkMGTPEZY]/;function v(I){return I&&I.duration>0}te.exports=function(B,_,z,O){var F=B._fullLayout,N;v(z)&&O&&(N=O()),L.makeTraceGroups(F._indicatorlayer,_,"trace").each(function(V){var j=V[0],$=j.trace,q=A.select(this),oe=$._hasGauge,Z=$._isAngular,G=$._isBullet,re=$.domain,H={w:F._size.w*(re.x[1]-re.x[0]),h:F._size.h*(re.y[1]-re.y[0]),l:F._size.l+F._size.w*re.x[0],r:F._size.r+F._size.w*(1-re.x[1]),t:F._size.t+F._size.h*(1-re.y[1]),b:F._size.b+F._size.h*re.y[0]},J=H.l+H.w/2,ae=H.t+H.h/2,K=Math.min(H.w/2,H.h),Y=s.innerRadius*K,ie,ne,le,de=$.align||"center";if(ne=ae,!oe)ie=H.l+f[de]*H.w,le=function(Ie){return i(Ie,H.w,H.h)};else if(Z&&(ie=J,ne=ae+K/2,le=function(Ie){return C(Ie,.9*Y)}),G){var we=s.bulletPadding,me=1-s.bulletNumberDomainSize+we;ie=H.l+(me+(1-me)*f[de])*H.w,le=function(Ie){return i(Ie,(s.bulletNumberDomainSize-we)*H.w,H.h)}}E(B,q,V,{numbersX:ie,numbersY:ne,numbersScaler:le,transitionOpts:z,onComplete:N});var Le,ve;oe&&(Le={range:$.gauge.axis.range,color:$.gauge.bgcolor,line:{color:$.gauge.bordercolor,width:0},thickness:1},ve={range:$.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:$.gauge.bordercolor,width:$.gauge.borderwidth},thickness:1});var Ae=q.selectAll("g.angular").data(Z?V:[]);Ae.exit().remove();var ye=q.selectAll("g.angularaxis").data(Z?V:[]);ye.exit().remove(),Z&&b(B,q,V,{radius:K,innerRadius:Y,gauge:Ae,layer:ye,size:H,gaugeBg:Le,gaugeOutline:ve,transitionOpts:z,onComplete:N});var Se=q.selectAll("g.bullet").data(G?V:[]);Se.exit().remove();var _e=q.selectAll("g.bulletaxis").data(G?V:[]);_e.exit().remove(),G&&m(B,q,V,{gauge:Se,layer:_e,size:H,gaugeBg:Le,gaugeOutline:ve,transitionOpts:z,onComplete:N});var ze=q.selectAll("text.title").data(V);ze.exit().remove(),ze.enter().append("text").classed("title",!0),ze.attr("text-anchor",function(){return G?T.right:T[$.title.align]}).text($.title.text).call(t.font,$.title.font).call(a.convertToTspans,B),ze.attr("transform",function(){var Ie=H.l+H.w*f[$.title.align],Ne,et=s.titlePadding,st=t.bBox(ze.node());if(oe){if(Z)if($.gauge.axis.visible){var Ze=t.bBox(ye.node());Ne=Ze.top-et-st.bottom}else Ne=H.t+H.h/2-K/2-st.bottom-et;G&&(Ne=ne-(st.top+st.bottom)/2,Ie=H.l-s.bulletPadding*H.w)}else Ne=$._numbersTop-et-st.bottom;return d(Ie,Ne)})})};function m(I,B,_,z){var O=_[0].trace,F=z.gauge,N=z.layer,V=z.gaugeBg,j=z.gaugeOutline,$=z.size,q=O.domain,oe=z.transitionOpts,Z=z.onComplete,G,re,H,J,ae;F.enter().append("g").classed("bullet",!0),F.attr("transform",d($.l,$.t)),N.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),N.selectAll("g.xbulletaxistick,path,text").remove();var K=$.h,Y=O.gauge.bar.thickness*K,ie=q.x[0],ne=q.x[0]+(q.x[1]-q.x[0])*(O._hasNumber||O._hasDelta?1-s.bulletNumberDomainSize:1);G=w(I,O.gauge.axis),G._id="xbulletaxis",G.domain=[ie,ne],G.setScale(),re=c.calcTicks(G),H=c.makeTransTickFn(G),J=c.getTickSigns(G)[2],ae=$.t+$.h,G.visible&&(c.drawTicks(I,G,{vals:G.ticks==="inside"?c.clipEnds(G,re):re,layer:N,path:c.makeTickPath(G,ae,J),transFn:H}),c.drawLabels(I,G,{vals:re,layer:N,transFn:H,labelFns:c.makeLabelFns(G,ae)}));function le(ye){ye.attr("width",function(Se){return Math.max(0,G.c2p(Se.range[1])-G.c2p(Se.range[0]))}).attr("x",function(Se){return G.c2p(Se.range[0])}).attr("y",function(Se){return .5*(1-Se.thickness)*K}).attr("height",function(Se){return Se.thickness*K})}var de=[V].concat(O.gauge.steps),we=F.selectAll("g.bg-bullet").data(de);we.enter().append("g").classed("bg-bullet",!0).append("rect"),we.select("rect").call(le).call(p),we.exit().remove();var me=F.selectAll("g.value-bullet").data([O.gauge.bar]);me.enter().append("g").classed("value-bullet",!0).append("rect"),me.select("rect").attr("height",Y).attr("y",(K-Y)/2).call(p),v(oe)?me.select("rect").transition().duration(oe.duration).ease(oe.easing).each("end",function(){Z&&Z()}).each("interrupt",function(){Z&&Z()}).attr("width",Math.max(0,G.c2p(Math.min(O.gauge.axis.range[1],_[0].y)))):me.select("rect").attr("width",typeof _[0].y=="number"?Math.max(0,G.c2p(Math.min(O.gauge.axis.range[1],_[0].y))):0),me.exit().remove();var Le=_.filter(function(){return O.gauge.threshold.value||O.gauge.threshold.value===0}),ve=F.selectAll("g.threshold-bullet").data(Le);ve.enter().append("g").classed("threshold-bullet",!0).append("line"),ve.select("line").attr("x1",G.c2p(O.gauge.threshold.value)).attr("x2",G.c2p(O.gauge.threshold.value)).attr("y1",(1-O.gauge.threshold.thickness)/2*K).attr("y2",(1-(1-O.gauge.threshold.thickness)/2)*K).call(h.stroke,O.gauge.threshold.line.color).style("stroke-width",O.gauge.threshold.line.width),ve.exit().remove();var Ae=F.selectAll("g.gauge-outline").data([j]);Ae.enter().append("g").classed("gauge-outline",!0).append("rect"),Ae.select("rect").call(le).call(p),Ae.exit().remove()}function b(I,B,_,z){var O=_[0].trace,F=z.size,N=z.radius,V=z.innerRadius,j=z.gaugeBg,$=z.gaugeOutline,q=[F.l+F.w/2,F.t+F.h/2+N/2],oe=z.gauge,Z=z.layer,G=z.transitionOpts,re=z.onComplete,H=Math.PI/2;function J(Ke){var nt=O.gauge.axis.range[0],it=O.gauge.axis.range[1],lt=(Ke-nt)/(it-nt)*Math.PI-H;return lt<-H?-H:lt>H?H:lt}function ae(Ke){return A.svg.arc().innerRadius((V+N)/2-Ke/2*(N-V)).outerRadius((V+N)/2+Ke/2*(N-V)).startAngle(-H)}function K(Ke){Ke.attr("d",function(nt){return ae(nt.thickness).startAngle(J(nt.range[0])).endAngle(J(nt.range[1]))()})}var Y,ie,ne,le;oe.enter().append("g").classed("angular",!0),oe.attr("transform",d(q[0],q[1])),Z.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),Z.selectAll("g.xangularaxistick,path,text").remove(),Y=w(I,O.gauge.axis),Y.type="linear",Y.range=O.gauge.axis.range,Y._id="xangularaxis",Y.ticklabeloverflow="allow",Y.setScale();var de=function(Ke){return(Y.range[0]-Ke.x)/(Y.range[1]-Y.range[0])*Math.PI+Math.PI},we={},me=c.makeLabelFns(Y,0),Le=me.labelStandoff;we.xFn=function(Ke){var nt=de(Ke);return Math.cos(nt)*Le},we.yFn=function(Ke){var nt=de(Ke),it=Math.sin(nt)>0?.2:1;return-Math.sin(nt)*(Le+Ke.fontSize*it)+Math.abs(Math.cos(nt))*(Ke.fontSize*r)},we.anchorFn=function(Ke){var nt=de(Ke),it=Math.cos(nt);return Math.abs(it)<.1?"middle":it>0?"start":"end"},we.heightFn=function(Ke,nt,it){var lt=de(Ke);return-.5*(1+Math.sin(lt))*it};var ve=function(Ke){return d(q[0]+N*Math.cos(Ke),q[1]-N*Math.sin(Ke))};ne=function(Ke){return ve(de(Ke))};var Ae=function(Ke){var nt=de(Ke);return ve(nt)+"rotate("+-g(nt)+")"};if(ie=c.calcTicks(Y),le=c.getTickSigns(Y)[2],Y.visible){le=Y.ticks==="inside"?-1:1;var ye=(Y.linewidth||1)/2;c.drawTicks(I,Y,{vals:ie,layer:Z,path:"M"+le*ye+",0h"+le*Y.ticklen,transFn:Ae}),c.drawLabels(I,Y,{vals:ie,layer:Z,transFn:ne,labelFns:we})}var Se=[j].concat(O.gauge.steps),_e=oe.selectAll("g.bg-arc").data(Se);_e.enter().append("g").classed("bg-arc",!0).append("path"),_e.select("path").call(K).call(p),_e.exit().remove();var ze=ae(O.gauge.bar.thickness),Ie=oe.selectAll("g.value-arc").data([O.gauge.bar]);Ie.enter().append("g").classed("value-arc",!0).append("path");var Ne=Ie.select("path");v(G)?(Ne.transition().duration(G.duration).ease(G.easing).each("end",function(){re&&re()}).each("interrupt",function(){re&&re()}).attrTween("d",S(ze,J(_[0].lastY),J(_[0].y))),O._lastValue=_[0].y):Ne.attr("d",typeof _[0].y=="number"?ze.endAngle(J(_[0].y)):"M0,0Z"),Ne.call(p),Ie.exit().remove(),Se=[];var et=O.gauge.threshold.value;(et||et===0)&&Se.push({range:[et,et],color:O.gauge.threshold.color,line:{color:O.gauge.threshold.line.color,width:O.gauge.threshold.line.width},thickness:O.gauge.threshold.thickness});var st=oe.selectAll("g.threshold-arc").data(Se);st.enter().append("g").classed("threshold-arc",!0).append("path"),st.select("path").call(K).call(p),st.exit().remove();var Ze=oe.selectAll("g.gauge-outline").data([$]);Ze.enter().append("g").classed("gauge-outline",!0).append("path"),Ze.select("path").call(K).call(p),Ze.exit().remove()}function E(I,B,_,z){var O=_[0].trace,F=z.numbersX,N=z.numbersY,V=O.align||"center",j=T[V],$=z.transitionOpts,q=z.onComplete,oe=L.ensureSingle(B,"g","numbers"),Z,G,re,H=[];O._hasNumber&&H.push("number"),O._hasDelta&&(H.push("delta"),O.delta.position==="left"&&H.reverse());var J=oe.selectAll("text").data(H);J.enter().append("text"),J.attr("text-anchor",function(){return j}).attr("class",function(ve){return ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),J.exit().remove();function ae(ve,Ae,ye,Se){if(ve.match("s")&&ye>=0!=Se>=0&&!Ae(ye).slice(-1).match(n)&&!Ae(Se).slice(-1).match(n)){var _e=ve.slice().replace("s","f").replace(/\d+/,function(Ie){return parseInt(Ie)-1}),ze=w(I,{tickformat:_e});return function(Ie){return Math.abs(Ie)<1?c.tickText(ze,Ie).text:Ae(Ie)}}else return Ae}function K(){var ve=w(I,{tickformat:O.number.valueformat},O._range);ve.setScale(),c.prepTicks(ve);var Ae=function(Ie){return c.tickText(ve,Ie).text},ye=O.number.suffix,Se=O.number.prefix,_e=oe.select("text.number");function ze(){var Ie=typeof _[0].y=="number"?Se+Ae(_[0].y)+ye:"-";_e.text(Ie).call(t.font,O.number.font).call(a.convertToTspans,I)}return v($)?_e.transition().duration($.duration).ease($.easing).each("end",function(){ze(),q&&q()}).each("interrupt",function(){ze(),q&&q()}).attrTween("text",function(){var Ie=A.select(this),Ne=o(_[0].lastY,_[0].y);O._lastValue=_[0].y;var et=ae(O.number.valueformat,Ae,_[0].lastY,_[0].y);return function(st){Ie.text(Se+et(Ne(st))+ye)}}):ze(),Z=x(Se+Ae(_[0].y)+ye,O.number.font,j,I),_e}function Y(){var ve=w(I,{tickformat:O.delta.valueformat},O._range);ve.setScale(),c.prepTicks(ve);var Ae=function(st){return c.tickText(ve,st).text},ye=O.delta.suffix,Se=O.delta.prefix,_e=function(st){var Ze=O.delta.relative?st.relativeDelta:st.delta;return Ze},ze=function(st,Ze){return st===0||typeof st!="number"||isNaN(st)?"-":(st>0?O.delta.increasing.symbol:O.delta.decreasing.symbol)+Se+Ze(st)+ye},Ie=function(st){return st.delta>=0?O.delta.increasing.color:O.delta.decreasing.color};O._deltaLastValue===void 0&&(O._deltaLastValue=_e(_[0]));var Ne=oe.select("text.delta");Ne.call(t.font,O.delta.font).call(h.fill,Ie({delta:O._deltaLastValue}));function et(){Ne.text(ze(_e(_[0]),Ae)).call(h.fill,Ie(_[0])).call(a.convertToTspans,I)}return v($)?Ne.transition().duration($.duration).ease($.easing).tween("text",function(){var st=A.select(this),Ze=_e(_[0]),Ke=O._deltaLastValue,nt=ae(O.delta.valueformat,Ae,Ke,Ze),it=o(Ke,Ze);return O._deltaLastValue=Ze,function(lt){st.text(ze(it(lt),nt)),st.call(h.fill,Ie({delta:it(lt)}))}}).each("end",function(){et(),q&&q()}).each("interrupt",function(){et(),q&&q()}):et(),G=x(ze(_e(_[0]),Ae),O.delta.font,j,I),Ne}var ie=O.mode+O.align,ne;if(O._hasDelta&&(ne=Y(),ie+=O.delta.position+O.delta.font.size+O.delta.font.family+O.delta.valueformat,ie+=O.delta.increasing.symbol+O.delta.decreasing.symbol,re=G),O._hasNumber&&(K(),ie+=O.number.font.size+O.number.font.family+O.number.valueformat+O.number.suffix+O.number.prefix,re=Z),O._hasDelta&&O._hasNumber){var le=[(Z.left+Z.right)/2,(Z.top+Z.bottom)/2],de=[(G.left+G.right)/2,(G.top+G.bottom)/2],we,me,Le=.75*O.delta.font.size;O.delta.position==="left"&&(we=k(O,"deltaPos",0,-1*(Z.width*f[O.align]+G.width*(1-f[O.align])+Le),ie,Math.min),me=le[1]-de[1],re={width:Z.width+G.width+Le,height:Math.max(Z.height,G.height),left:G.left+we,right:Z.right,top:Math.min(Z.top,G.top+me),bottom:Math.max(Z.bottom,G.bottom+me)}),O.delta.position==="right"&&(we=k(O,"deltaPos",0,Z.width*(1-f[O.align])+G.width*f[O.align]+Le,ie,Math.max),me=le[1]-de[1],re={width:Z.width+G.width+Le,height:Math.max(Z.height,G.height),left:Z.left,right:G.right+we,top:Math.min(Z.top,G.top+me),bottom:Math.max(Z.bottom,G.bottom+me)}),O.delta.position==="bottom"&&(we=null,me=G.height,re={width:Math.max(Z.width,G.width),height:Z.height+G.height,left:Math.min(Z.left,G.left),right:Math.max(Z.right,G.right),top:Z.bottom-Z.height,bottom:Z.bottom+G.height}),O.delta.position==="top"&&(we=null,me=Z.top,re={width:Math.max(Z.width,G.width),height:Z.height+G.height,left:Math.min(Z.left,G.left),right:Math.max(Z.right,G.right),top:Z.bottom-Z.height-G.height,bottom:Z.bottom}),ne.attr({dx:we,dy:me})}(O._hasNumber||O._hasDelta)&&oe.attr("transform",function(){var ve=z.numbersScaler(re);ie+=ve[2];var Ae=k(O,"numbersScale",1,ve[0],ie,Math.min),ye;O._scaleNumbers||(Ae=1),O._isAngular?ye=N-Ae*re.bottom:ye=N-Ae*(re.top+re.bottom)/2,O._numbersTop=Ae*re.top+ye;var Se=re[V];V==="center"&&(Se=(re.left+re.right)/2);var _e=F-Ae*Se;return _e=k(O,"numbersTranslate",0,_e,ie,Math.max),d(_e,ye)+M(Ae)})}function p(I){I.each(function(B){h.stroke(A.select(this),B.line.color)}).each(function(B){h.fill(A.select(this),B.color)}).style("stroke-width",function(B){return B.line.width})}function S(I,B,_){return function(){var z=P(B,_);return function(O){return I.endAngle(z(O))()}}}function w(I,B,_){var z=I._fullLayout,O=L.extendFlat({type:"linear",ticks:"outside",range:_,showline:!0},B),F={type:"linear",_id:"x"+B._id},N={letter:"x",font:z.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function V(j,$){return L.coerce(O,F,y,j,$)}return u(O,F,V,N,z),l(O,F,V,N),F}function i(I,B,_){var z=Math.min(B/I.width,_/I.height);return[z,I,B+"x"+_]}function C(I,B){var _=Math.sqrt(I.width/2*(I.width/2)+I.height*I.height),z=B/_;return[z,I,B]}function x(I,B,_,z){var O=document.createElementNS("http://www.w3.org/2000/svg","text"),F=A.select(O);return F.text(I).attr("x",0).attr("y",0).attr("text-anchor",_).attr("data-unformatted",I).call(a.convertToTspans,z).call(t.font,B),t.bBox(F.node())}function k(I,B,_,z,O,F){var N="_cache"+B;I[N]&&I[N].key===O||(I[N]={key:O,value:_});var V=L.aggNums(F,null,[I[N].value,z],2);return I[N].value=V,V}},50048:function(te,X,e){var A=e(49084),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(52948),M=e(45464),d=e(92880).extendFlat,g=e(67824).overrideAll;function r(a){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function t(a){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var s=te.exports=g(d({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:r(),y:r(),z:r()},caps:{x:t(),y:t(),z:t()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:o(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),valuehoverformat:P("value",1),showlegend:d({},M.showlegend,{dflt:!1})},A("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:L.opacity,lightposition:L.lightposition,lighting:L.lighting,flatshading:L.flatshading,contour:L.contour,hoverinfo:d({},M.hoverinfo)}),"calc","nested");s.flatshading.dflt=!0,s.lighting.facenormalsepsilon.dflt=0,s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes",s.transforms=void 0},62624:function(te,X,e){var A=e(47128),P=e(3832).processGrid,o=e(3832).filter;te.exports=function(M,d){d._len=Math.min(d.x.length,d.y.length,d.z.length,d.value.length),d._x=o(d.x,d._len),d._y=o(d.y,d._len),d._z=o(d.z,d._len),d._value=o(d.value,d._len);var g=P(d);d._gridFill=g.fill,d._Xs=g.Xs,d._Ys=g.Ys,d._Zs=g.Zs,d._len=g.len;for(var r=1/0,t=-1/0,s=0;s<d._len;s++){var a=d._value[s];r=Math.min(r,a),t=Math.max(t,a)}d._minValues=r,d._maxValues=t,d._vMin=d.isomin===void 0||d.isomin===null?r:d.isomin,d._vMax=d.isomax===void 0||d.isomin===null?t:d.isomax,A(M,d,{vals:[d._vMin,d._vMax],containerStr:"",cLetter:"c"})}},31460:function(te,X,e){var A=e(67792).gl_mesh3d,P=e(33040).parseColorScale,o=e(3400).isArrayOrTypedArray,L=e(43080),M=e(8932).extractOpts,d=e(52094),g=function(u,l){for(var y=l.length-1;y>0;y--){var h=Math.min(l[y],l[y-1]),T=Math.max(l[y],l[y-1]);if(T>h&&h<u&&u<=T)return{id:y,distRatio:(T-u)/(T-h)}}return{id:0,distRatio:0}};function r(u,l,y){this.scene=u,this.uid=y,this.mesh=l,this.name="",this.data=null,this.showContour=!1}var t=r.prototype;t.handlePick=function(u){if(u.object===this.mesh){var l=u.data.index,y=this.data._meshX[l],h=this.data._meshY[l],T=this.data._meshZ[l],f=this.data._Ys.length,n=this.data._Zs.length,v=g(y,this.data._Xs).id,m=g(h,this.data._Ys).id,b=g(T,this.data._Zs).id,E=u.index=b+n*m+n*f*v;u.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var p=this.data.hovertext||this.data.text;return o(p)&&p[E]!==void 0?u.textLabel=p[E]:p&&(u.textLabel=p),!0}},t.update=function(u){var l=this.scene,y=l.fullSceneLayout;this.data=a(u);function h(m,b,E,p){return b.map(function(S){return m.d2l(S,0,p)*E})}var T=d(h(y.xaxis,u._meshX,l.dataScale[0],u.xcalendar),h(y.yaxis,u._meshY,l.dataScale[1],u.ycalendar),h(y.zaxis,u._meshZ,l.dataScale[2],u.zcalendar)),f=d(u._meshI,u._meshJ,u._meshK),n={positions:T,cells:f,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:L(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading},v=M(u);n.vertexIntensity=u._meshIntensity,n.vertexIntensityBounds=[v.min,v.max],n.colormap=P(u),this.mesh.update(n)},t.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var s=["xyz","xzy","yxz","yzx","zxy","zyx"];function a(u){u._meshI=[],u._meshJ=[],u._meshK=[];var l=u.surface.show,y=u.spaceframe.show,h=u.surface.fill,T=u.spaceframe.fill,f=!1,n=!1,v=0,m,b,E=u._Xs,p=u._Ys,S=u._Zs,w=E.length,i=p.length,C=S.length,x=s.indexOf(u._gridFill.replace(/-/g,"").replace(/\+/g,"")),k=function(He,Oe,Ce){switch(x){case 5:return Ce+C*Oe+C*i*He;case 4:return Ce+C*He+C*w*Oe;case 3:return Oe+i*Ce+i*C*He;case 2:return Oe+i*He+i*w*Ce;case 1:return He+w*Ce+w*C*Oe;default:return He+w*Oe+w*i*Ce}},I=u._minValues,B=u._maxValues,_=u._vMin,z=u._vMax,O,F,N,V;function j(He,Oe,Ce){for(var ge=V.length,pe=b;pe<ge;pe++)if(He===O[pe]&&Oe===F[pe]&&Ce===N[pe])return pe;return-1}function $(){b=m}function q(){O=[],F=[],N=[],V=[],m=0,$()}function oe(He,Oe,Ce,ge){return O.push(He),F.push(Oe),N.push(Ce),V.push(ge),m++,m-1}function Z(He,Oe,Ce){return u._meshI.push(He),u._meshJ.push(Oe),u._meshK.push(Ce),v++,v-1}function G(He,Oe,Ce){for(var ge=[],pe=0;pe<He.length;pe++)ge[pe]=(He[pe]+Oe[pe]+Ce[pe])/3;return ge}function re(He,Oe,Ce){for(var ge=[],pe=0;pe<He.length;pe++)ge[pe]=He[pe]*(1-Ce)+Ce*Oe[pe];return ge}var H;function J(He){H=He}function ae(He,Oe){var Ce=He[0],ge=He[1],pe=He[2],Te=G(Ce,ge,pe),be=Math.sqrt(1-H),ke=re(Te,Ce,be),Ve=re(Te,ge,be),je=re(Te,pe,be),at=Oe[0],ut=Oe[1],Nt=Oe[2];return{xyzv:[[Ce,ge,Ve],[Ve,ke,Ce],[ge,pe,je],[je,Ve,ge],[pe,Ce,ke],[ke,je,pe]],abc:[[at,ut,-1],[-1,-1,at],[ut,Nt,-1],[-1,-1,ut],[Nt,at,-1],[-1,-1,Nt]]}}function K(He,Oe){return He==="all"||He===null?!0:He.indexOf(Oe)>-1}function Y(He,Oe){return He===null?Oe:He}function ie(He,Oe,Ce){$();var ge=[Oe],pe=[Ce];if(H>=1)ge=[Oe],pe=[Ce];else if(H>0){var Te=ae(Oe,Ce);ge=Te.xyzv,pe=Te.abc}for(var be=0;be<ge.length;be++){Oe=ge[be],Ce=pe[be];for(var ke=[],Ve=0;Ve<3;Ve++){var je=Oe[Ve][0],at=Oe[Ve][1],ut=Oe[Ve][2],Nt=Oe[Ve][3],Vt=Ce[Ve]>-1?Ce[Ve]:j(je,at,ut);Vt>-1?ke[Ve]=Vt:ke[Ve]=oe(je,at,ut,Y(He,Nt))}Z(ke[0],ke[1],ke[2])}}function ne(He,Oe,Ce){var ge=function(pe,Te,be){ie(He,[Oe[pe],Oe[Te],Oe[be]],[Ce[pe],Ce[Te],Ce[be]])};ge(0,1,2),ge(2,3,0)}function le(He,Oe,Ce){var ge=function(pe,Te,be){ie(He,[Oe[pe],Oe[Te],Oe[be]],[Ce[pe],Ce[Te],Ce[be]])};ge(0,1,2),ge(3,0,1),ge(2,3,0),ge(1,2,3)}function de(He,Oe,Ce,ge){var pe=He[3];pe<Ce&&(pe=Ce),pe>ge&&(pe=ge);for(var Te=(He[3]-pe)/(He[3]-Oe[3]+1e-9),be=[],ke=0;ke<4;ke++)be[ke]=(1-Te)*He[ke]+Te*Oe[ke];return be}function we(He,Oe,Ce){return He>=Oe&&He<=Ce}function me(He){var Oe=.001*(z-_);return He>=_-Oe&&He<=z+Oe}function Le(He){for(var Oe=[],Ce=0;Ce<4;Ce++){var ge=He[Ce];Oe.push([u._x[ge],u._y[ge],u._z[ge],u._value[ge]])}return Oe}var ve=3;function Ae(He,Oe,Ce,ge,pe,Te){Te||(Te=1),Ce=[-1,-1,-1];var be=!1,ke=[we(Oe[0][3],ge,pe),we(Oe[1][3],ge,pe),we(Oe[2][3],ge,pe)];if(!ke[0]&&!ke[1]&&!ke[2])return!1;var Ve=function(at,ut,Nt){return me(ut[0][3])&&me(ut[1][3])&&me(ut[2][3])?(ie(at,ut,Nt),!0):Te<ve?Ae(at,ut,Nt,_,z,++Te):!1};if(ke[0]&&ke[1]&&ke[2])return Ve(He,Oe,Ce)||be;var je=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(at){if(ke[at[0]]&&ke[at[1]]&&!ke[at[2]]){var ut=Oe[at[0]],Nt=Oe[at[1]],Vt=Oe[at[2]],gt=de(Vt,ut,ge,pe),Ct=de(Vt,Nt,ge,pe);be=Ve(He,[Ct,gt,ut],[-1,-1,Ce[at[0]]])||be,be=Ve(He,[ut,Nt,Ct],[Ce[at[0]],Ce[at[1]],-1])||be,je=!0}}),je||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(at){if(ke[at[0]]&&!ke[at[1]]&&!ke[at[2]]){var ut=Oe[at[0]],Nt=Oe[at[1]],Vt=Oe[at[2]],gt=de(Nt,ut,ge,pe),Ct=de(Vt,ut,ge,pe);be=Ve(He,[Ct,gt,ut],[-1,-1,Ce[at[0]]])||be,je=!0}}),be}function ye(He,Oe,Ce,ge){var pe=!1,Te=Le(Oe),be=[we(Te[0][3],Ce,ge),we(Te[1][3],Ce,ge),we(Te[2][3],Ce,ge),we(Te[3][3],Ce,ge)];if(!be[0]&&!be[1]&&!be[2]&&!be[3])return pe;if(be[0]&&be[1]&&be[2]&&be[3])return n&&(pe=le(He,Te,Oe)||pe),pe;var ke=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Ve){if(be[Ve[0]]&&be[Ve[1]]&&be[Ve[2]]&&!be[Ve[3]]){var je=Te[Ve[0]],at=Te[Ve[1]],ut=Te[Ve[2]],Nt=Te[Ve[3]];if(n)pe=ie(He,[je,at,ut],[Oe[Ve[0]],Oe[Ve[1]],Oe[Ve[2]]])||pe;else{var Vt=de(Nt,je,Ce,ge),gt=de(Nt,at,Ce,ge),Ct=de(Nt,ut,Ce,ge);pe=ie(null,[Vt,gt,Ct],[-1,-1,-1])||pe}ke=!0}}),ke||([[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(Ve){if(be[Ve[0]]&&be[Ve[1]]&&!be[Ve[2]]&&!be[Ve[3]]){var je=Te[Ve[0]],at=Te[Ve[1]],ut=Te[Ve[2]],Nt=Te[Ve[3]],Vt=de(ut,je,Ce,ge),gt=de(ut,at,Ce,ge),Ct=de(Nt,at,Ce,ge),Yt=de(Nt,je,Ce,ge);n?(pe=ie(He,[je,Yt,Vt],[Oe[Ve[0]],-1,-1])||pe,pe=ie(He,[at,gt,Ct],[Oe[Ve[1]],-1,-1])||pe):pe=ne(null,[Vt,gt,Ct,Yt],[-1,-1,-1,-1])||pe,ke=!0}}),ke)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Ve){if(be[Ve[0]]&&!be[Ve[1]]&&!be[Ve[2]]&&!be[Ve[3]]){var je=Te[Ve[0]],at=Te[Ve[1]],ut=Te[Ve[2]],Nt=Te[Ve[3]],Vt=de(at,je,Ce,ge),gt=de(ut,je,Ce,ge),Ct=de(Nt,je,Ce,ge);n?(pe=ie(He,[je,Vt,gt],[Oe[Ve[0]],-1,-1])||pe,pe=ie(He,[je,gt,Ct],[Oe[Ve[0]],-1,-1])||pe,pe=ie(He,[je,Ct,Vt],[Oe[Ve[0]],-1,-1])||pe):pe=ie(null,[Vt,gt,Ct],[-1,-1,-1])||pe,ke=!0}}),pe}function Se(He,Oe,Ce,ge,pe,Te,be,ke,Ve,je,at){var ut=!1;return f&&(K(He,"A")&&(ut=ye(null,[Oe,Ce,ge,Te],je,at)||ut),K(He,"B")&&(ut=ye(null,[Ce,ge,pe,Ve],je,at)||ut),K(He,"C")&&(ut=ye(null,[Ce,Te,be,Ve],je,at)||ut),K(He,"D")&&(ut=ye(null,[ge,Te,ke,Ve],je,at)||ut),K(He,"E")&&(ut=ye(null,[Ce,ge,Te,Ve],je,at)||ut)),n&&(ut=ye(He,[Ce,ge,Te,Ve],je,at)||ut),ut}function _e(He,Oe,Ce,ge,pe,Te,be,ke){return[ke[0]===!0?!0:Ae(He,Le([Oe,Ce,ge]),[Oe,Ce,ge],Te,be),ke[1]===!0?!0:Ae(He,Le([ge,pe,Oe]),[ge,pe,Oe],Te,be)]}function ze(He,Oe,Ce,ge,pe,Te,be,ke,Ve){return ke?_e(He,Oe,Ce,pe,ge,Te,be,Ve):_e(He,Ce,pe,ge,Oe,Te,be,Ve)}function Ie(He,Oe,Ce,ge,pe,Te,be){var ke=!1,Ve,je,at,ut,Nt=function(){ke=Ae(He,[Ve,je,at],[-1,-1,-1],pe,Te)||ke,ke=Ae(He,[at,ut,Ve],[-1,-1,-1],pe,Te)||ke},Vt=be[0],gt=be[1],Ct=be[2];return Vt&&(Ve=re(Le([k(Oe,Ce-0,ge-0)])[0],Le([k(Oe-1,Ce-0,ge-0)])[0],Vt),je=re(Le([k(Oe,Ce-0,ge-1)])[0],Le([k(Oe-1,Ce-0,ge-1)])[0],Vt),at=re(Le([k(Oe,Ce-1,ge-1)])[0],Le([k(Oe-1,Ce-1,ge-1)])[0],Vt),ut=re(Le([k(Oe,Ce-1,ge-0)])[0],Le([k(Oe-1,Ce-1,ge-0)])[0],Vt),Nt()),gt&&(Ve=re(Le([k(Oe-0,Ce,ge-0)])[0],Le([k(Oe-0,Ce-1,ge-0)])[0],gt),je=re(Le([k(Oe-0,Ce,ge-1)])[0],Le([k(Oe-0,Ce-1,ge-1)])[0],gt),at=re(Le([k(Oe-1,Ce,ge-1)])[0],Le([k(Oe-1,Ce-1,ge-1)])[0],gt),ut=re(Le([k(Oe-1,Ce,ge-0)])[0],Le([k(Oe-1,Ce-1,ge-0)])[0],gt),Nt()),Ct&&(Ve=re(Le([k(Oe-0,Ce-0,ge)])[0],Le([k(Oe-0,Ce-0,ge-1)])[0],Ct),je=re(Le([k(Oe-0,Ce-1,ge)])[0],Le([k(Oe-0,Ce-1,ge-1)])[0],Ct),at=re(Le([k(Oe-1,Ce-1,ge)])[0],Le([k(Oe-1,Ce-1,ge-1)])[0],Ct),ut=re(Le([k(Oe-1,Ce-0,ge)])[0],Le([k(Oe-1,Ce-0,ge-1)])[0],Ct),Nt()),ke}function Ne(He,Oe,Ce,ge,pe,Te,be,ke,Ve,je,at,ut){var Nt=He;return ut?(f&&He==="even"&&(Nt=null),Se(Nt,Oe,Ce,ge,pe,Te,be,ke,Ve,je,at)):(f&&He==="odd"&&(Nt=null),Se(Nt,Ve,ke,be,Te,pe,ge,Ce,Oe,je,at))}function et(He,Oe,Ce,ge,pe){for(var Te=[],be=0,ke=0;ke<Oe.length;ke++)for(var Ve=Oe[ke],je=1;je<C;je++)for(var at=1;at<i;at++)Te.push(ze(He,k(Ve,at-1,je-1),k(Ve,at-1,je),k(Ve,at,je-1),k(Ve,at,je),Ce,ge,(Ve+at+je)%2,pe&&pe[be]?pe[be]:[])),be++;return Te}function st(He,Oe,Ce,ge,pe){for(var Te=[],be=0,ke=0;ke<Oe.length;ke++)for(var Ve=Oe[ke],je=1;je<w;je++)for(var at=1;at<C;at++)Te.push(ze(He,k(je-1,Ve,at-1),k(je,Ve,at-1),k(je-1,Ve,at),k(je,Ve,at),Ce,ge,(je+Ve+at)%2,pe&&pe[be]?pe[be]:[])),be++;return Te}function Ze(He,Oe,Ce,ge,pe){for(var Te=[],be=0,ke=0;ke<Oe.length;ke++)for(var Ve=Oe[ke],je=1;je<i;je++)for(var at=1;at<w;at++)Te.push(ze(He,k(at-1,je-1,Ve),k(at-1,je,Ve),k(at,je-1,Ve),k(at,je,Ve),Ce,ge,(at+je+Ve)%2,pe&&pe[be]?pe[be]:[])),be++;return Te}function Ke(He,Oe,Ce){for(var ge=1;ge<C;ge++)for(var pe=1;pe<i;pe++)for(var Te=1;Te<w;Te++)Ne(He,k(Te-1,pe-1,ge-1),k(Te-1,pe-1,ge),k(Te-1,pe,ge-1),k(Te-1,pe,ge),k(Te,pe-1,ge-1),k(Te,pe-1,ge),k(Te,pe,ge-1),k(Te,pe,ge),Oe,Ce,(Te+pe+ge)%2)}function nt(He,Oe,Ce){n=!0,Ke(He,Oe,Ce),n=!1}function it(He,Oe,Ce){f=!0,Ke(He,Oe,Ce),f=!1}function lt(He,Oe,Ce,ge,pe,Te){for(var be=[],ke=0,Ve=0;Ve<Oe.length;Ve++)for(var je=Oe[Ve],at=1;at<C;at++)for(var ut=1;ut<i;ut++)be.push(Ie(He,je,ut,at,Ce,ge,pe[Ve],Te&&Te[ke]?Te[ke]:[])),ke++;return be}function vt(He,Oe,Ce,ge,pe,Te){for(var be=[],ke=0,Ve=0;Ve<Oe.length;Ve++)for(var je=Oe[Ve],at=1;at<w;at++)for(var ut=1;ut<C;ut++)be.push(Ie(He,at,je,ut,Ce,ge,pe[Ve],Te&&Te[ke]?Te[ke]:[])),ke++;return be}function xt(He,Oe,Ce,ge,pe,Te){for(var be=[],ke=0,Ve=0;Ve<Oe.length;Ve++)for(var je=Oe[Ve],at=1;at<i;at++)for(var ut=1;ut<w;ut++)be.push(Ie(He,ut,at,je,Ce,ge,pe[Ve],Te&&Te[ke]?Te[ke]:[])),ke++;return be}function Je(He,Oe){for(var Ce=[],ge=He;ge<Oe;ge++)Ce.push(ge);return Ce}function Pe(){for(var He=0;He<w;He++)for(var Oe=0;Oe<i;Oe++)for(var Ce=0;Ce<C;Ce++){var ge=k(He,Oe,Ce);oe(u._x[ge],u._y[ge],u._z[ge],u._value[ge])}}function Ue(){q(),Pe();var He=null;if(y&&T&&(J(T),nt(He,_,z)),l&&h){J(h);for(var Oe=u.surface.pattern,Ce=u.surface.count,ge=0;ge<Ce;ge++){var pe=Ce===1?.5:ge/(Ce-1),Te=(1-pe)*_+pe*z,be=Math.abs(Te-I),ke=Math.abs(Te-B),Ve=be>ke?[I,Te]:[Te,B];it(Oe,Ve[0],Ve[1])}}var je=[[Math.min(_,B),Math.max(_,B)],[Math.min(I,z),Math.max(I,z)]];["x","y","z"].forEach(function(at){for(var ut=[],Nt=0;Nt<je.length;Nt++){var Vt=0,gt=je[Nt][0],Ct=je[Nt][1],Yt=u.slices[at];if(Yt.show&&Yt.fill){J(Yt.fill);var gr=[],ht=[],Ht=[];if(Yt.locations.length)for(var Wt=0;Wt<Yt.locations.length;Wt++){var cr=g(Yt.locations[Wt],at==="x"?E:at==="y"?p:S);cr.distRatio===0?gr.push(cr.id):cr.id>0&&(ht.push(cr.id),at==="x"?Ht.push([cr.distRatio,0,0]):at==="y"?Ht.push([0,cr.distRatio,0]):Ht.push([0,0,cr.distRatio]))}else at==="x"?gr=Je(1,w-1):at==="y"?gr=Je(1,i-1):gr=Je(1,C-1);ht.length>0&&(at==="x"?ut[Vt]=lt(He,ht,gt,Ct,Ht,ut[Vt]):at==="y"?ut[Vt]=vt(He,ht,gt,Ct,Ht,ut[Vt]):ut[Vt]=xt(He,ht,gt,Ct,Ht,ut[Vt]),Vt++),gr.length>0&&(at==="x"?ut[Vt]=et(He,gr,gt,Ct,ut[Vt]):at==="y"?ut[Vt]=st(He,gr,gt,Ct,ut[Vt]):ut[Vt]=Ze(He,gr,gt,Ct,ut[Vt]),Vt++)}var er=u.caps[at];er.show&&er.fill&&(J(er.fill),at==="x"?ut[Vt]=et(He,[0,w-1],gt,Ct,ut[Vt]):at==="y"?ut[Vt]=st(He,[0,i-1],gt,Ct,ut[Vt]):ut[Vt]=Ze(He,[0,C-1],gt,Ct,ut[Vt]),Vt++)}}),v===0&&q(),u._meshX=O,u._meshY=F,u._meshZ=N,u._meshIntensity=V,u._Xs=E,u._Ys=p,u._Zs=S}return Ue(),u}function c(u,l){var y=u.glplot.gl,h=A({gl:y}),T=new r(u,h,l.uid);return h._trace=T,T.update(l),u.glplot.add(h),T}te.exports={findNearestOnAxis:g,generateIsoMeshes:a,createIsosurfaceTrace:c}},70548:function(te,X,e){var A=e(3400),P=e(24040),o=e(50048),L=e(27260);function M(g,r,t,s){function a(c,u){return A.coerce(g,r,o,c,u)}d(g,r,t,s,a)}function d(g,r,t,s,a){var c=a("isomin"),u=a("isomax");u!=null&&c!==void 0&&c!==null&&c>u&&(r.isomin=null,r.isomax=null);var l=a("x"),y=a("y"),h=a("z"),T=a("value");if(!l||!l.length||!y||!y.length||!h||!h.length||!T||!T.length){r.visible=!1;return}var f=P.getComponentMethod("calendars","handleTraceDefaults");f(g,r,["x","y","z"],s),a("valuehoverformat"),["x","y","z"].forEach(function(b){a(b+"hoverformat");var E="caps."+b,p=a(E+".show");p&&a(E+".fill");var S="slices."+b,w=a(S+".show");w&&(a(S+".fill"),a(S+".locations"))});var n=a("spaceframe.show");n&&a("spaceframe.fill");var v=a("surface.show");v&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var m=a("contour.show");m&&(a("contour.color"),a("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(b){a(b)}),L(g,r,s,a,{prefix:"",cLetter:"c"}),r._length=null}te.exports={supplyDefaults:M,supplyIsoDefaults:d}},6296:function(te,X,e){te.exports={attributes:e(50048),supplyDefaults:e(70548).supplyDefaults,calc:e(62624),colorbar:{min:"cmin",max:"cmax"},plot:e(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(te,X,e){var A=e(49084),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(16716),M=e(45464),d=e(92880).extendFlat;te.exports=d({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:o({editType:"calc"}),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("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},A("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:L.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:d({},L.contours.x.show,{}),color:L.contours.x.color,width:L.contours.x.width,editType:"calc"},lightposition:{x:d({},L.lightposition.x,{dflt:1e5}),y:d({},L.lightposition.y,{dflt:1e5}),z:d({},L.lightposition.z,{dflt:0}),editType:"calc"},lighting:d({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"},L.lighting),hoverinfo:d({},M.hoverinfo,{editType:"calc"}),showlegend:d({},M.showlegend,{dflt:!1})})},1876:function(te,X,e){var A=e(47128);te.exports=function(o,L){L.intensity&&A(o,L,{vals:L.intensity,containerStr:"",cLetter:"c"})}},576:function(te,X,e){var A=e(67792).gl_mesh3d,P=e(67792).delaunay_triangulate,o=e(67792).alpha_shape,L=e(67792).convex_hull,M=e(33040).parseColorScale,d=e(3400).isArrayOrTypedArray,g=e(43080),r=e(8932).extractOpts,t=e(52094);function s(f,n,v){this.scene=f,this.uid=v,this.mesh=n,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var a=s.prototype;a.handlePick=function(f){if(f.object===this.mesh){var n=f.index=f.data.index;f.data._cellCenter?f.traceCoordinate=f.data.dataCoordinate:f.traceCoordinate=[this.data.x[n],this.data.y[n],this.data.z[n]];var v=this.data.hovertext||this.data.text;return d(v)&&v[n]!==void 0?f.textLabel=v[n]:v&&(f.textLabel=v),!0}};function c(f){for(var n=[],v=f.length,m=0;m<v;m++)n[m]=g(f[m]);return n}function u(f,n,v,m){for(var b=[],E=n.length,p=0;p<E;p++)b[p]=f.d2l(n[p],0,m)*v;return b}function l(f){for(var n=[],v=f.length,m=0;m<v;m++)n[m]=Math.round(f[m]);return n}function y(f,n){for(var v=["x","y","z"].indexOf(f),m=[],b=n.length,E=0;E<b;E++)m[E]=[n[E][(v+1)%3],n[E][(v+2)%3]];return P(m)}function h(f,n){for(var v=f.length,m=0;m<v;m++)if(f[m]<=-.5||f[m]>=n-.5)return!1;return!0}a.update=function(f){var n=this.scene,v=n.fullSceneLayout;this.data=f;var m=f.x.length,b=t(u(v.xaxis,f.x,n.dataScale[0],f.xcalendar),u(v.yaxis,f.y,n.dataScale[1],f.ycalendar),u(v.zaxis,f.z,n.dataScale[2],f.zcalendar)),E;if(f.i&&f.j&&f.k){if(f.i.length!==f.j.length||f.j.length!==f.k.length||!h(f.i,m)||!h(f.j,m)||!h(f.k,m))return;E=t(l(f.i),l(f.j),l(f.k))}else f.alphahull===0?E=L(b):f.alphahull>0?E=o(f.alphahull,b):E=y(f.delaunayaxis,b);var p={positions:b,cells:E,lightPosition:[f.lightposition.x,f.lightposition.y,f.lightposition.z],ambient:f.lighting.ambient,diffuse:f.lighting.diffuse,specular:f.lighting.specular,roughness:f.lighting.roughness,fresnel:f.lighting.fresnel,vertexNormalsEpsilon:f.lighting.vertexnormalsepsilon,faceNormalsEpsilon:f.lighting.facenormalsepsilon,opacity:f.opacity,contourEnable:f.contour.show,contourColor:g(f.contour.color).slice(0,3),contourWidth:f.contour.width,useFacetNormals:f.flatshading};if(f.intensity){var S=r(f);this.color="#fff";var w=f.intensitymode;p[w+"Intensity"]=f.intensity,p[w+"IntensityBounds"]=[S.min,S.max],p.colormap=M(f)}else f.vertexcolor?(this.color=f.vertexcolor[0],p.vertexColors=c(f.vertexcolor)):f.facecolor?(this.color=f.facecolor[0],p.cellColors=c(f.facecolor)):(this.color=f.color,p.meshColor=g(f.color));this.mesh.update(p)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(f,n){var v=f.glplot.gl,m=A({gl:v}),b=new s(f,m,n.uid);return m._trace=b,b.update(n),f.glplot.add(m),b}te.exports=T},74212:function(te,X,e){var A=e(24040),P=e(3400),o=e(27260),L=e(52948);te.exports=function(d,g,r,t){function s(y,h){return P.coerce(d,g,L,y,h)}function a(y){var h=y.map(function(T){var f=s(T);return f&&P.isArrayOrTypedArray(f)?f:null});return h.every(function(T){return T&&T.length===h[0].length})&&h}var c=a(["x","y","z"]);if(!c){g.visible=!1;return}if(a(["i","j","k"]),g.i&&(!g.j||!g.k)||g.j&&(!g.k||!g.i)||g.k&&(!g.i||!g.j)){g.visible=!1;return}var u=A.getComponentMethod("calendars","handleTraceDefaults");u(d,g,["x","y","z"],t),["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(y){s(y)});var l=s("contour.show");l&&(s("contour.color"),s("contour.width")),"intensity"in d?(s("intensity"),s("intensitymode"),o(d,g,t,s,{prefix:"",cLetter:"c"})):(g.showscale=!1,"facecolor"in d?s("facecolor"):"vertexcolor"in d?s("vertexcolor"):s("color",r)),s("text"),s("hovertext"),s("hovertemplate"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),g._length=null}},7404:function(te,X,e){te.exports={attributes:e(52948),supplyDefaults:e(74212),calc:e(1876),colorbar:{min:"cmin",max:"cmax"},plot:e(576),moduleType:"trace",name:"mesh3d",basePlotModule:e(12536),categories:["gl3d","showLegend"],meta:{}}},20279:function(te,X,e){var A=e(3400).extendFlat,P=e(52904),o=e(29736).axisHoverFormat,L=e(98192).u,M=e(55756),d=e(48164),g=d.INCREASING.COLOR,r=d.DECREASING.COLOR,t=P.line;function s(a){return{line:{color:A({},t.color,{dflt:a}),width:t.width,dash:L,editType:"style"},editType:"style"}}te.exports={xperiod:P.xperiod,xperiod0:P.xperiod0,xperiodalignment:P.xperiodalignment,xhoverformat:o("x"),yhoverformat:o("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:A({},t.width,{}),dash:A({},L,{}),editType:"style"},increasing:s(g),decreasing:s(r),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:A({},M.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},42812:function(te,X,e){var A=e(3400),P=A._,o=e(54460),L=e(1220),M=e(39032).BADNUM;function d(s,a){var c=o.getFromId(s,a.xaxis),u=o.getFromId(s,a.yaxis),l=t(s,c,a),y=a._minDiff;a._minDiff=null;var h=a._origX;a._origX=null;var T=a._xcalc;a._xcalc=null;var f=r(s,a,h,T,u,g);return a._extremes[c._id]=o.findExtremes(c,T,{vpad:y/2}),f.length?(A.extendFlat(f[0].t,{wHover:y/2,tickLen:l}),f):[{t:{empty:!0}}]}function g(s,a,c,u){return{o:s,h:a,l:c,c:u}}function r(s,a,c,u,l,y){for(var h=l.makeCalcdata(a,"open"),T=l.makeCalcdata(a,"high"),f=l.makeCalcdata(a,"low"),n=l.makeCalcdata(a,"close"),v=A.isArrayOrTypedArray(a.text),m=A.isArrayOrTypedArray(a.hovertext),b=!0,E=null,p=!!a.xperiodalignment,S=[],w=0;w<u.length;w++){var i=u[w],C=h[w],x=T[w],k=f[w],I=n[w];if(i!==M&&C!==M&&x!==M&&k!==M&&I!==M){I===C?E!==null&&I!==E&&(b=I>E):b=I>C,E=I;var B=y(C,x,k,I);B.pos=i,B.yc=(C+I)/2,B.i=w,B.dir=b?"increasing":"decreasing",B.x=B.pos,B.y=[k,x],p&&(B.orig_p=c[w]),v&&(B.tx=a.text[w]),m&&(B.htx=a.hovertext[w]),S.push(B)}else S.push({pos:i,empty:!0})}return a._extremes[l._id]=o.findExtremes(l,A.concat(f,T),{padded:!0}),S.length&&(S[0].t={labels:{open:P(s,"open:")+" ",high:P(s,"high:")+" ",low:P(s,"low:")+" ",close:P(s,"close:")+" "}}),S}function t(s,a,c){var u=c._minDiff;if(!u){var l=s._fullData,y=[];u=1/0;var h;for(h=0;h<l.length;h++){var T=l[h];if(T.type==="ohlc"&&T.visible===!0&&T.xaxis===a._id){y.push(T);var f=a.makeCalcdata(T,"x");T._origX=f;var n=L(c,a,"x",f).vals;T._xcalc=n;var v=A.distinctVals(n).minDiff;v&&isFinite(v)&&(u=Math.min(u,v))}}for(u===1/0&&(u=1),h=0;h<y.length;h++)y[h]._minDiff=u}return u*c.tickwidth}te.exports={calc:d,calcCommon:r}},23860:function(te,X,e){var A=e(3400),P=e(52744),o=e(31147),L=e(20279);te.exports=function(g,r,t,s){function a(u,l){return A.coerce(g,r,L,u,l)}var c=P(g,r,a,s);if(!c){r.visible=!1;return}o(g,r,s,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),M(g,r,a,"increasing"),M(g,r,a,"decreasing"),a("text"),a("hovertext"),a("tickwidth"),s._requestRangeslider[r.xaxis]=!0};function M(d,g,r,t){r(t+".line.color"),r(t+".line.width",g.line.width),r(t+".line.dash",g.line.dash)}},18720:function(te,X,e){var A=e(54460),P=e(3400),o=e(93024),L=e(76308),M=e(3400).fillText,d=e(48164),g={increasing:d.INCREASING.SYMBOL,decreasing:d.DECREASING.SYMBOL};function r(c,u,l,y){var h=c.cd,T=h[0].trace;return T.hoverlabel.split?s(c,u,l,y):a(c,u,l,y)}function t(c,u,l,y){var h=c.cd,T=c.xa,f=h[0].trace,n=h[0].t,v=f.type,m=v==="ohlc"?"l":"min",b=v==="ohlc"?"h":"max",E,p,S=n.bPos||0,w=function(V){return V.pos+S-u},i=n.bdPos||n.tickLen,C=n.wHover,x=Math.min(1,i/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));E=c.maxHoverDistance-x,p=c.maxSpikeDistance-x;function k(V){var j=w(V);return o.inbox(j-C,j+C,E)}function I(V){var j=V[m],$=V[b];return j===$||o.inbox(j-l,$-l,E)}function B(V){return(k(V)+I(V))/2}var _=o.getDistanceFunction(y,k,I,B);if(o.getClosest(h,_,c),c.index===!1)return null;var z=h[c.index];if(z.empty)return null;var O=z.dir,F=f[O],N=F.line.color;return L.opacity(N)&&F.line.width?c.color=N:c.color=F.fillcolor,c.x0=T.c2p(z.pos+S-i,!0),c.x1=T.c2p(z.pos+S+i,!0),c.xLabelVal=z.orig_p!==void 0?z.orig_p:z.pos,c.spikeDistance=B(z)*p/E,c.xSpike=T.c2p(z.pos,!0),c}function s(c,u,l,y){var h=c.cd,T=c.ya,f=h[0].trace,n=h[0].t,v=[],m=t(c,u,l,y);if(!m)return[];var b=m.index,E=h[b],p=E.hi||f.hoverinfo,S=p.split("+"),w=p==="all",i=w||S.indexOf("y")!==-1;if(!i)return[];for(var C=["high","open","close","low"],x={},k=0;k<C.length;k++){var I=C[k],B=f[I][m.index],_=T.c2p(B,!0),z;B in x?(z=x[B],z.yLabel+="<br>"+n.labels[I]+A.hoverLabelText(T,B,f.yhoverformat)):(z=P.extendFlat({},m),z.y0=z.y1=_,z.yLabelVal=B,z.yLabel=n.labels[I]+A.hoverLabelText(T,B,f.yhoverformat),z.name="",v.push(z),x[B]=z)}return v}function a(c,u,l,y){var h=c.cd,T=c.ya,f=h[0].trace,n=h[0].t,v=t(c,u,l,y);if(!v)return[];var m=v.index,b=h[m],E=v.index=b.i,p=b.dir;function S(B){return n.labels[B]+A.hoverLabelText(T,f[B][E],f.yhoverformat)}var w=b.hi||f.hoverinfo,i=w.split("+"),C=w==="all",x=C||i.indexOf("y")!==-1,k=C||i.indexOf("text")!==-1,I=x?[S("open"),S("high"),S("low"),S("close")+" "+g[p]]:[];return k&&M(b,f,I),v.extraText=I.join("<br>"),v.y0=v.y1=T.c2p(b.yc,!0),[v]}te.exports={hoverPoints:r,hoverSplit:s,hoverOnPoints:a}},65456:function(te,X,e){te.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(20279),supplyDefaults:e(23860),calc:e(42812).calc,plot:e(36664),style:e(14008),hoverPoints:e(18720).hoverPoints,selectPoints:e(97384)}},52744:function(te,X,e){var A=e(24040),P=e(3400);te.exports=function(L,M,d,g){var r=d("x"),t=d("open"),s=d("high"),a=d("low"),c=d("close");d("hoverlabel.split");var u=A.getComponentMethod("calendars","handleTraceDefaults");if(u(L,M,["x"],g),!!(t&&s&&a&&c)){var l=Math.min(t.length,s.length,a.length,c.length);return r&&(l=Math.min(l,P.minRowLength(r))),M._length=l,l}}},36664:function(te,X,e){var A=e(33428),P=e(3400);te.exports=function(L,M,d,g){var r=M.yaxis,t=M.xaxis,s=!!t.rangebreaks;P.makeTraceGroups(g,d,"trace ohlc").each(function(a){var c=A.select(this),u=a[0],l=u.t,y=u.trace;if(y.visible!==!0||l.empty){c.remove();return}var h=l.tickLen,T=c.selectAll("path").data(P.identity);T.enter().append("path"),T.exit().remove(),T.attr("d",function(f){if(f.empty)return"M0,0Z";var n=t.c2p(f.pos-h,!0),v=t.c2p(f.pos+h,!0),m=s?(n+v)/2:t.c2p(f.pos,!0),b=r.c2p(f.o,!0),E=r.c2p(f.h,!0),p=r.c2p(f.l,!0),S=r.c2p(f.c,!0);return"M"+n+","+b+"H"+m+"M"+m+","+E+"V"+p+"M"+v+","+S+"H"+m})})}},97384:function(te){te.exports=function(e,A){var P=e.cd,o=e.xaxis,L=e.yaxis,M=[],d,g=P[0].t.bPos||0;if(A===!1)for(d=0;d<P.length;d++)P[d].selected=0;else for(d=0;d<P.length;d++){var r=P[d];A.contains([o.c2p(r.pos+g),L.c2p(r.yc)],null,r.i,e)?(M.push({pointNumber:r.i,x:o.c2d(r.pos),y:L.c2d(r.yc)}),r.selected=1):r.selected=0}return M}},14008:function(te,X,e){var A=e(33428),P=e(43616),o=e(76308);te.exports=function(M,d,g){var r=g||A.select(M).selectAll("g.ohlclayer").selectAll("g.trace");r.style("opacity",function(t){return t[0].trace.opacity}),r.each(function(t){var s=t[0].trace;A.select(this).selectAll("path").each(function(a){if(!a.empty){var c=s[a.dir].line;A.select(this).style("fill","none").call(o.stroke,c.color).call(P.dashLine,c.dash,c.width).style("opacity",s.selectedpoints&&!a.selected?.3:1)}})})}},72140:function(te,X,e){var A=e(92880).extendFlat,P=e(45464),o=e(25376),L=e(49084),M=e(21776).Ks,d=e(86968).u,g=A({editType:"calc"},L("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:M({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});te.exports={domain:d({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:A({},P.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:M({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:o({editType:"calc"}),tickfont:o({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:g,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},91800:function(te,X,e){var A=e(84888)._M,P=e(60268),o="parcats";X.name=o,X.plot=function(L,M,d,g){var r=A(L.calcdata,o);if(r.length){var t=r[0];P(L,t,d,g)}},X.clean=function(L,M,d,g){var r=g._has&&g._has("parcats"),t=M._has&&M._has("parcats");r&&!t&&g._paperdiv.selectAll(".parcats").remove()}},69136:function(te,X,e){var A=e(71688).wrap,P=e(94288).hasColorscale,o=e(47128),L=e(68944),M=e(43616),d=e(3400),g=e(38248);te.exports=function(n,v){var m=d.filterVisible(v.dimensions);if(m.length===0)return[];var b=m.map(function(Z){var G;if(Z.categoryorder==="trace")G=null;else if(Z.categoryorder==="array")G=Z.categoryarray;else{G=L(Z.values);for(var re=!0,H=0;H<G.length;H++)if(!g(G[H])){re=!1;break}G.sort(re?d.sorterAsc:void 0),Z.categoryorder==="category descending"&&(G=G.reverse())}return l(Z.values,G)}),E,p,S;d.isArrayOrTypedArray(v.counts)?E=v.counts:E=[v.counts],y(m),m.forEach(function(Z,G){h(Z,b[G])});var w=v.line,i;w?(P(v,"line")&&o(n,v,{vals:v.line.color,containerStr:"line",cLetter:"c"}),i=M.tryColorscale(w)):i=d.identity;function C(Z){var G,re;return d.isArrayOrTypedArray(w.color)?(G=w.color[Z%w.color.length],re=G):G=w.color,{color:i(G),rawColor:re}}var x=m[0].values.length,k={},I=b.map(function(Z){return Z.inds});S=0;var B,_;for(B=0;B<x;B++){var z=[];for(_=0;_<I.length;_++)z.push(I[_][B]);p=E[B%E.length],S+=p;var O=C(B),F=z+"-"+O.rawColor;k[F]===void 0&&(k[F]=c(z,O.color,O.rawColor)),u(k[F],B,p)}var N=m.map(function(Z,G){return t(G,Z._index,Z._displayindex,Z.label,S)});for(B=0;B<x;B++)for(p=E[B%E.length],_=0;_<N.length;_++){var V=N[_].containerInd,j=b[_].inds[B],$=N[_].categories;if($[j]===void 0){var q=v.dimensions[V]._categoryarray[j],oe=v.dimensions[V]._ticktext[j];$[j]=s(_,j,q,oe)}a($[j],B,p)}return A(r(N,k,S))};function r(f,n,v){var m=f.map(function(b){return b.categories.length}).reduce(function(b,E){return Math.max(b,E)});return{dimensions:f,paths:n,trace:void 0,maxCats:m,count:v}}function t(f,n,v,m,b){return{dimensionInd:f,containerInd:n,displayInd:v,dimensionLabel:m,count:b,categories:[],dragX:null}}function s(f,n,v,m){return{dimensionInd:f,categoryInd:n,categoryValue:v,displayInd:n,categoryLabel:m,valueInds:[],count:0,dragY:null}}function a(f,n,v){f.valueInds.push(n),f.count+=v}function c(f,n,v){return{categoryInds:f,color:n,rawColor:v,valueInds:[],count:0}}function u(f,n,v){f.valueInds.push(n),f.count+=v}function l(f,n){n==null?n=[]:n=n.map(function(i){return i});var v={},m={},b=[];n.forEach(function(i,C){v[i]=0,m[i]=C});for(var E=0;E<f.length;E++){var p=f[E],S;v[p]===void 0?(v[p]=1,S=n.push(p)-1,m[p]=S):(v[p]++,S=m[p]),b.push(S)}var w=n.map(function(i){return v[i]});return{uniqueValues:n,uniqueCounts:w,inds:b}}function y(f){var n=f.map(function(m){return m.displayindex}),v;if(T(n))for(v=0;v<f.length;v++)f[v]._displayindex=f[v].displayindex;else for(v=0;v<f.length;v++)f[v]._displayindex=v}function h(f,n){f._categoryarray=n.uniqueValues,f.ticktext===null||f.ticktext===void 0?f._ticktext=[]:f._ticktext=f.ticktext.slice();for(var v=f._ticktext.length;v<n.uniqueValues.length;v++)f._ticktext.push(n.uniqueValues[v])}function T(f){for(var n=new Array(f.length),v=0;v<f.length;v++){if(f[v]<0||f[v]>=f.length||n[f[v]]!==void 0)return!1;n[f[v]]=!0}return!0}},76671:function(te,X,e){var A=e(3400),P=e(94288).hasColorscale,o=e(27260),L=e(86968).Q,M=e(51272),d=e(72140),g=e(26284),r=e(38116).isTypedArraySpec;function t(a,c,u,l,y){y("line.shape"),y("line.hovertemplate");var h=y("line.color",l.colorway[0]);if(P(a,"line")&&A.isArrayOrTypedArray(h)){if(h.length)return y("line.colorscale"),o(a,c,l,y,{prefix:"line.",cLetter:"c"}),h.length;c.line.color=u}return 1/0}function s(a,c){function u(v,m){return A.coerce(a,c,d.dimensions,v,m)}var l=u("values"),y=u("visible");if(l&&l.length||(y=c.visible=!1),y){u("label"),u("displayindex",c._index);var h=a.categoryarray,T=A.isArrayOrTypedArray(h)&&h.length>0||r(h),f;T&&(f="array");var n=u("categoryorder",f);n==="array"?(u("categoryarray"),u("ticktext")):(delete a.categoryarray,delete a.ticktext),!T&&n==="array"&&(c.categoryorder="trace")}}te.exports=function(c,u,l,y){function h(m,b){return A.coerce(c,u,d,m,b)}var T=M(c,u,{name:"dimensions",handleItemDefaults:s}),f=t(c,u,l,y,h);L(u,y,h),(!Array.isArray(T)||!T.length)&&(u.visible=!1),g(u,T,"values",f),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var n={family:y.font.family,size:Math.round(y.font.size),color:y.font.color};A.coerceFont(h,"labelfont",n);var v={family:y.font.family,size:Math.round(y.font.size/1.2),color:y.font.color};A.coerceFont(h,"tickfont",v)}},22020:function(te,X,e){te.exports={attributes:e(72140),supplyDefaults:e(76671),calc:e(69136),plot:e(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(91800),categories:["noOpacity"],meta:{}}},51036:function(te,X,e){var A=e(33428),P=e(67756).Gz,o=e(36424),L=e(93024),M=e(3400),d=M.strTranslate,g=e(43616),r=e(49760),t=e(72736);function s(H,J,ae,K){var Y=J._context.staticPlot,ie=H.map(q.bind(0,J,ae)),ne=K.selectAll("g.parcatslayer").data([null]);ne.enter().append("g").attr("class","parcatslayer").style("pointer-events",Y?"none":"all");var le=ne.selectAll("g.trace.parcats").data(ie,a),de=le.enter().append("g").attr("class","trace parcats");le.attr("transform",function(Ne){return d(Ne.x,Ne.y)}),de.append("g").attr("class","paths");var we=le.select("g.paths"),me=we.selectAll("path.path").data(function(Ne){return Ne.paths},a);me.attr("fill",function(Ne){return Ne.model.color});var Le=me.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ne){return Ne.model.color}).attr("fill-opacity",0);n(Le),me.attr("d",function(Ne){return Ne.svgD}),Le.empty()||me.sort(u),me.exit().remove(),me.on("mouseover",l).on("mouseout",y).on("click",f),de.append("g").attr("class","dimensions");var ve=le.select("g.dimensions"),Ae=ve.selectAll("g.dimension").data(function(Ne){return Ne.dimensions},a);Ae.enter().append("g").attr("class","dimension"),Ae.attr("transform",function(Ne){return d(Ne.x,0)}),Ae.exit().remove();var ye=Ae.selectAll("g.category").data(function(Ne){return Ne.categories},a),Se=ye.enter().append("g").attr("class","category");ye.attr("transform",function(Ne){return d(0,Ne.y)}),Se.append("rect").attr("class","catrect").attr("pointer-events","none"),ye.select("rect.catrect").attr("fill","none").attr("width",function(Ne){return Ne.width}).attr("height",function(Ne){return Ne.height}),b(Se);var _e=ye.selectAll("rect.bandrect").data(function(Ne){return Ne.bands},a);_e.each(function(){M.raiseToTop(this)}),_e.attr("fill",function(Ne){return Ne.color});var ze=_e.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ne){return Ne.color}).attr("fill-opacity",0);_e.attr("fill",function(Ne){return Ne.color}).attr("width",function(Ne){return Ne.width}).attr("height",function(Ne){return Ne.height}).attr("y",function(Ne){return Ne.y}).attr("cursor",function(Ne){return Ne.parcatsViewModel.arrangement==="fixed"?"default":Ne.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),p(ze),_e.exit().remove(),Se.append("text").attr("class","catlabel").attr("pointer-events","none");var Ie=J._fullLayout.paper_bgcolor;ye.select("text.catlabel").attr("text-anchor",function(Ne){return c(Ne)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",t.makeTextShadow(Ie)).style("fill","rgb(0, 0, 0)").attr("x",function(Ne){return c(Ne)?Ne.width+5:-5}).attr("y",function(Ne){return Ne.height/2}).text(function(Ne){return Ne.model.categoryLabel}).each(function(Ne){g.font(A.select(this),Ne.parcatsViewModel.categorylabelfont),t.convertToTspans(A.select(this),J)}),Se.append("text").attr("class","dimlabel"),ye.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ne){return Ne.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ne){return Ne.width/2}).attr("y",-5).text(function(Ne,et){return et===0?Ne.parcatsViewModel.model.dimensions[Ne.model.dimensionInd].dimensionLabel:null}).each(function(Ne){g.font(A.select(this),Ne.parcatsViewModel.labelfont)}),ye.selectAll("rect.bandrect").on("mouseover",_).on("mouseout",z),ye.exit().remove(),Ae.call(A.behavior.drag().origin(function(Ne){return{x:Ne.x,y:0}}).on("dragstart",O).on("drag",F).on("dragend",N)),le.each(function(Ne){Ne.traceSelection=A.select(this),Ne.pathSelection=A.select(this).selectAll("g.paths").selectAll("path.path"),Ne.dimensionSelection=A.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),le.exit().remove()}te.exports=function(H,J,ae,K){s(ae,H,K,J)};function a(H){return H.key}function c(H){var J=H.parcatsViewModel.dimensions.length,ae=H.parcatsViewModel.dimensions[J-1].model.dimensionInd;return H.model.dimensionInd===ae}function u(H,J){return H.model.rawColor>J.model.rawColor?1:H.model.rawColor<J.model.rawColor?-1:0}function l(H){if(!H.parcatsViewModel.dragDimension&&H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){M.raiseToTop(this),v(A.select(this));var J=h(H),ae=T(H);if(H.parcatsViewModel.graphDiv.emit("plotly_hover",{points:J,event:A.event,constraints:ae}),H.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var K=A.mouse(this)[0],Y=H.parcatsViewModel.graphDiv,ie=H.parcatsViewModel.trace,ne=Y._fullLayout,le=ne._paperdiv.node().getBoundingClientRect(),de=H.parcatsViewModel.graphDiv.getBoundingClientRect(),we,me,Le;for(Le=0;Le<H.leftXs.length-1;Le++)if(H.leftXs[Le]+H.dimWidths[Le]-2<=K&&K<=H.leftXs[Le+1]+2){var ve=H.parcatsViewModel.dimensions[Le],Ae=H.parcatsViewModel.dimensions[Le+1];we=(ve.x+ve.width+Ae.x)/2,me=(H.topYs[Le]+H.topYs[Le+1]+H.height)/2;break}var ye=H.parcatsViewModel.x+we,Se=H.parcatsViewModel.y+me,_e=r.mostReadable(H.model.color,["black","white"]),ze=H.model.count,Ie=ze/H.parcatsViewModel.model.count,Ne={countLabel:ze,probabilityLabel:Ie.toFixed(3)},et=[];H.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&et.push(["Count:",Ne.countLabel].join(" ")),H.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&et.push(["P:",Ne.probabilityLabel].join(" "));var st=et.join("<br>"),Ze=A.mouse(Y)[0];L.loneHover({trace:ie,x:ye-le.left+de.left,y:Se-le.top+de.top,text:st,color:H.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:_e,idealAlign:Ze<ye?"right":"left",hovertemplate:(ie.line||{}).hovertemplate,hovertemplateLabels:Ne,eventData:[{data:ie._input,fullData:ie,count:ze,probability:Ie}]},{container:ne._hoverlayer.node(),outerContainer:ne._paper.node(),gd:Y})}}}function y(H){if(!H.parcatsViewModel.dragDimension&&(n(A.select(this)),L.loneUnhover(H.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),H.parcatsViewModel.pathSelection.sort(u),H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var J=h(H),ae=T(H);H.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:J,event:A.event,constraints:ae})}}function h(H){for(var J=[],ae=V(H.parcatsViewModel),K=0;K<H.model.valueInds.length;K++){var Y=H.model.valueInds[K];J.push({curveNumber:ae,pointNumber:Y})}return J}function T(H){for(var J={},ae=H.parcatsViewModel.model.dimensions,K=0;K<ae.length;K++){var Y=ae[K],ie=Y.categories[H.model.categoryInds[K]];J[Y.containerInd]=ie.categoryValue}return H.model.rawColor!==void 0&&(J.color=H.model.rawColor),J}function f(H){if(H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var J=h(H),ae=T(H);H.parcatsViewModel.graphDiv.emit("plotly_click",{points:J,event:A.event,constraints:ae})}}function n(H){H.attr("fill",function(J){return J.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function v(H){H.attr("fill-opacity",.8).attr("stroke",function(J){return r.mostReadable(J.model.color,["black","white"])}).attr("stroke-width",.3)}function m(H){H.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function b(H){H.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function E(H){H.attr("stroke","black").attr("stroke-width",1.5)}function p(H){H.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function S(H){var J=H.parcatsViewModel.pathSelection,ae=H.categoryViewModel.model.dimensionInd,K=H.categoryViewModel.model.categoryInd;return J.filter(function(Y){return Y.model.categoryInds[ae]===K&&Y.model.color===H.color})}function w(H){var J=A.select(H.parentNode).selectAll("rect.bandrect");J.each(function(ae){var K=S(ae);v(K),K.each(function(){M.raiseToTop(this)})}),m(A.select(H.parentNode))}function i(H){var J=A.select(H).datum(),ae=S(J);v(ae),ae.each(function(){M.raiseToTop(this)}),A.select(H.parentNode).selectAll("rect.bandrect").filter(function(K){return K.color===J.color}).each(function(){M.raiseToTop(this),E(A.select(this))})}function C(H,J,ae){var K=A.select(H).datum(),Y=K.categoryViewModel.model,ie=K.parcatsViewModel.graphDiv,ne=A.select(H.parentNode).selectAll("rect.bandrect"),le=[];ne.each(function(we){var me=S(we);me.each(function(Le){Array.prototype.push.apply(le,h(Le))})});var de={};de[Y.dimensionInd]=Y.categoryValue,ie.emit(J,{points:le,event:ae,constraints:de})}function x(H,J,ae){var K=A.select(H).datum(),Y=K.categoryViewModel.model,ie=K.parcatsViewModel.graphDiv,ne=S(K),le=[];ne.each(function(we){Array.prototype.push.apply(le,h(we))});var de={};de[Y.dimensionInd]=Y.categoryValue,K.rawColor!==void 0&&(de.color=K.rawColor),ie.emit(J,{points:le,event:ae,constraints:de})}function k(H,J,ae){H._fullLayout._calcInverseTransform(H);var K=H._fullLayout._invScaleX,Y=H._fullLayout._invScaleY,ie=A.select(ae.parentNode).select("rect.catrect"),ne=ie.node().getBoundingClientRect(),le=ie.datum(),de=le.parcatsViewModel,we=de.model.dimensions[le.model.dimensionInd],me=de.trace,Le=ne.top+ne.height/2,ve,Ae;de.dimensions.length>1&&we.displayInd===de.dimensions.length-1?(ve=ne.left,Ae="left"):(ve=ne.left+ne.width,Ae="right");var ye=le.model.count,Se=le.model.categoryLabel,_e=ye/le.parcatsViewModel.model.count,ze={countLabel:ye,categoryLabel:Se,probabilityLabel:_e.toFixed(3)},Ie=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ie.push(["Count:",ze.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ie.push(["P("+ze.categoryLabel+"):",ze.probabilityLabel].join(" "));var Ne=Ie.join("<br>");return{trace:me,x:K*(ve-J.left),y:Y*(Le-J.top),text:Ne,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Ae,hovertemplate:me.hovertemplate,hovertemplateLabels:ze,eventData:[{data:me._input,fullData:me,count:ye,category:Se,probability:_e}]}}function I(H,J,ae){var K=[];return A.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Y=this;K.push(k(H,J,Y))}),K}function B(H,J,ae){H._fullLayout._calcInverseTransform(H);var K=H._fullLayout._invScaleX,Y=H._fullLayout._invScaleY,ie=ae.getBoundingClientRect(),ne=A.select(ae).datum(),le=ne.categoryViewModel,de=le.parcatsViewModel,we=de.model.dimensions[le.model.dimensionInd],me=de.trace,Le=ie.y+ie.height/2,ve,Ae;de.dimensions.length>1&&we.displayInd===de.dimensions.length-1?(ve=ie.left,Ae="left"):(ve=ie.left+ie.width,Ae="right");var ye=le.model.categoryLabel,Se=ne.parcatsViewModel.model.count,_e=0;ne.categoryViewModel.bands.forEach(function(lt){lt.color===ne.color&&(_e+=lt.count)});var ze=le.model.count,Ie=0;de.pathSelection.each(function(lt){lt.model.color===ne.color&&(Ie+=lt.model.count)});var Ne=_e/Se,et=_e/Ie,st=_e/ze,Ze={countLabel:Se,categoryLabel:ye,probabilityLabel:Ne.toFixed(3)},Ke=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ke.push(["Count:",Ze.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ke.push("P(color ∩ "+ye+"): "+Ze.probabilityLabel),Ke.push("P("+ye+" | color): "+et.toFixed(3)),Ke.push("P(color | "+ye+"): "+st.toFixed(3)));var nt=Ke.join("<br>"),it=r.mostReadable(ne.color,["black","white"]);return{trace:me,x:K*(ve-J.left),y:Y*(Le-J.top),text:nt,color:ne.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:it,fontSize:10,idealAlign:Ae,hovertemplate:me.hovertemplate,hovertemplateLabels:Ze,eventData:[{data:me._input,fullData:me,category:ye,count:Se,probability:Ne,categorycount:ze,colorcount:Ie,bandcolorcount:_e}]}}function _(H){if(!H.parcatsViewModel.dragDimension&&H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var J=A.mouse(this)[1];if(J<-1)return;var ae=H.parcatsViewModel.graphDiv,K=ae._fullLayout,Y=K._paperdiv.node().getBoundingClientRect(),ie=H.parcatsViewModel.hoveron,ne=this;if(ie==="color"?(i(ne),x(ne,"plotly_hover",A.event)):(w(ne),C(ne,"plotly_hover",A.event)),H.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var le;ie==="category"?le=k(ae,Y,ne):ie==="color"?le=B(ae,Y,ne):ie==="dimension"&&(le=I(ae,Y,ne)),le&&L.loneHover(le,{container:K._hoverlayer.node(),outerContainer:K._paper.node(),gd:ae})}}}function z(H){var J=H.parcatsViewModel;if(!J.dragDimension&&(n(J.pathSelection),b(J.dimensionSelection.selectAll("g.category")),p(J.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),L.loneUnhover(J.graphDiv._fullLayout._hoverlayer.node()),J.pathSelection.sort(u),J.hoverinfoItems.indexOf("skip")===-1)){var ae=H.parcatsViewModel.hoveron,K=this;ae==="color"?x(K,"plotly_unhover",A.event):C(K,"plotly_unhover",A.event)}}function O(H){H.parcatsViewModel.arrangement!=="fixed"&&(H.dragDimensionDisplayInd=H.model.displayInd,H.initialDragDimensionDisplayInds=H.parcatsViewModel.model.dimensions.map(function(J){return J.displayInd}),H.dragHasMoved=!1,H.dragCategoryDisplayInd=null,A.select(this).selectAll("g.category").select("rect.catrect").each(function(J){var ae=A.mouse(this)[0],K=A.mouse(this)[1];-2<=ae&&ae<=J.width+2&&-2<=K&&K<=J.height+2&&(H.dragCategoryDisplayInd=J.model.displayInd,H.initialDragCategoryDisplayInds=H.model.categories.map(function(Y){return Y.displayInd}),J.model.dragY=J.y,M.raiseToTop(this.parentNode),A.select(this.parentNode).selectAll("rect.bandrect").each(function(Y){Y.y<K&&K<=Y.y+Y.height&&(H.potentialClickBand=this)}))}),H.parcatsViewModel.dragDimension=H,L.loneUnhover(H.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function F(H){if(H.parcatsViewModel.arrangement!=="fixed"&&(H.dragHasMoved=!0,H.dragDimensionDisplayInd!==null)){var J=H.dragDimensionDisplayInd,ae=J-1,K=J+1,Y=H.parcatsViewModel.dimensions[J];if(H.dragCategoryDisplayInd!==null){var ie=Y.categories[H.dragCategoryDisplayInd];ie.model.dragY+=A.event.dy;var ne=ie.model.dragY,le=ie.model.displayInd,de=Y.categories,we=de[le-1],me=de[le+1];we!==void 0&&ne<we.y+we.height/2&&(ie.model.displayInd=we.model.displayInd,we.model.displayInd=le),me!==void 0&&ne+ie.height>me.y+me.height/2&&(ie.model.displayInd=me.model.displayInd,me.model.displayInd=le),H.dragCategoryDisplayInd=ie.model.displayInd}if(H.dragCategoryDisplayInd===null||H.parcatsViewModel.arrangement==="freeform"){Y.model.dragX=A.event.x;var Le=H.parcatsViewModel.dimensions[ae],ve=H.parcatsViewModel.dimensions[K];Le!==void 0&&Y.model.dragX<Le.x+Le.width&&(Y.model.displayInd=Le.model.displayInd,Le.model.displayInd=J),ve!==void 0&&Y.model.dragX+Y.width>ve.x&&(Y.model.displayInd=ve.model.displayInd,ve.model.displayInd=H.dragDimensionDisplayInd),H.dragDimensionDisplayInd=Y.model.displayInd}G(H.parcatsViewModel),Z(H.parcatsViewModel),$(H.parcatsViewModel),j(H.parcatsViewModel)}}function N(H){if(H.parcatsViewModel.arrangement!=="fixed"&&H.dragDimensionDisplayInd!==null){A.select(this).selectAll("text").attr("font-weight","normal");var J={},ae=V(H.parcatsViewModel),K=H.parcatsViewModel.model.dimensions.map(function(ve){return ve.displayInd}),Y=H.initialDragDimensionDisplayInds.some(function(ve,Ae){return ve!==K[Ae]});Y&&K.forEach(function(ve,Ae){var ye=H.parcatsViewModel.model.dimensions[Ae].containerInd;J["dimensions["+ye+"].displayindex"]=ve});var ie=!1;if(H.dragCategoryDisplayInd!==null){var ne=H.model.categories.map(function(ve){return ve.displayInd});if(ie=H.initialDragCategoryDisplayInds.some(function(ve,Ae){return ve!==ne[Ae]}),ie){var le=H.model.categories.slice().sort(function(ve,Ae){return ve.displayInd-Ae.displayInd}),de=le.map(function(ve){return ve.categoryValue}),we=le.map(function(ve){return ve.categoryLabel});J["dimensions["+H.model.containerInd+"].categoryarray"]=[de],J["dimensions["+H.model.containerInd+"].ticktext"]=[we],J["dimensions["+H.model.containerInd+"].categoryorder"]="array"}}if(H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!H.dragHasMoved&&H.potentialClickBand&&(H.parcatsViewModel.hoveron==="color"?x(H.potentialClickBand,"plotly_click",A.event.sourceEvent):C(H.potentialClickBand,"plotly_click",A.event.sourceEvent)),H.model.dragX=null,H.dragCategoryDisplayInd!==null){var me=H.parcatsViewModel.dimensions[H.dragDimensionDisplayInd].categories[H.dragCategoryDisplayInd];me.model.dragY=null,H.dragCategoryDisplayInd=null}H.dragDimensionDisplayInd=null,H.parcatsViewModel.dragDimension=null,H.dragHasMoved=null,H.potentialClickBand=null,G(H.parcatsViewModel),Z(H.parcatsViewModel);var Le=A.transition().duration(300).ease("cubic-in-out");Le.each(function(){$(H.parcatsViewModel,!0),j(H.parcatsViewModel,!0)}).each("end",function(){(Y||ie)&&o.restyle(H.parcatsViewModel.graphDiv,J,[ae])})}}function V(H){for(var J,ae=H.graphDiv._fullData,K=0;K<ae.length;K++)if(H.key===ae[K].uid){J=K;break}return J}function j(H,J){J===void 0&&(J=!1);function ae(K){return J?K.transition():K}H.pathSelection.data(function(K){return K.paths},a),ae(H.pathSelection).attr("d",function(K){return K.svgD})}function $(H,J){J===void 0&&(J=!1);function ae(de){return J?de.transition():de}H.dimensionSelection.data(function(de){return de.dimensions},a);var K=H.dimensionSelection.selectAll("g.category").data(function(de){return de.categories},a);ae(H.dimensionSelection).attr("transform",function(de){return d(de.x,0)}),ae(K).attr("transform",function(de){return d(0,de.y)});var Y=K.select(".dimlabel");Y.text(function(de,we){return we===0?de.parcatsViewModel.model.dimensions[de.model.dimensionInd].dimensionLabel:null});var ie=K.select(".catlabel");ie.attr("text-anchor",function(de){return c(de)?"start":"end"}).attr("x",function(de){return c(de)?de.width+5:-5}).each(function(de){var we,me;c(de)?(we=de.width+5,me="start"):(we=-5,me="end"),A.select(this).selectAll("tspan").attr("x",we).attr("text-anchor",me)});var ne=K.selectAll("rect.bandrect").data(function(de){return de.bands},a),le=ne.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(de){return de.color}).attr("fill-opacity",0);ne.attr("fill",function(de){return de.color}).attr("width",function(de){return de.width}).attr("height",function(de){return de.height}).attr("y",function(de){return de.y}),p(le),ne.each(function(){M.raiseToTop(this)}),ne.exit().remove()}function q(H,J,ae){var K=ae[0],Y=J.margin||{l:80,r:80,t:100,b:80},ie=K.trace,ne=ie.domain,le=J.width,de=J.height,we=Math.floor(le*(ne.x[1]-ne.x[0])),me=Math.floor(de*(ne.y[1]-ne.y[0])),Le=ne.x[0]*le+Y.l,ve=J.height-ne.y[1]*J.height+Y.t,Ae=ie.line.shape,ye;ie.hoverinfo==="all"?ye=["count","probability"]:ye=(ie.hoverinfo||"").split("+");var Se={trace:ie,key:ie.uid,model:K,x:Le,y:ve,width:we,height:me,hoveron:ie.hoveron,hoverinfoItems:ye,arrangement:ie.arrangement,bundlecolors:ie.bundlecolors,sortpaths:ie.sortpaths,labelfont:ie.labelfont,categorylabelfont:ie.tickfont,pathShape:Ae,dragDimension:null,margin:Y,paths:[],dimensions:[],graphDiv:H,traceSelection:null,pathSelection:null,dimensionSelection:null};return K.dimensions&&(G(Se),Z(Se)),Se}function oe(H,J,ae,K,Y){var ie=[],ne=[],le,de;for(de=0;de<ae.length-1;de++)le=P(ae[de]+H[de],H[de+1]),ie.push(le(Y)),ne.push(le(1-Y));var we="M "+H[0]+","+J[0];for(we+="l"+ae[0]+",0 ",de=1;de<ae.length;de++)we+="C"+ie[de-1]+","+J[de-1]+" "+ne[de-1]+","+J[de]+" "+H[de]+","+J[de],we+="l"+ae[de]+",0 ";for(we+="l0,"+K+" ",we+="l -"+ae[ae.length-1]+",0 ",de=ae.length-2;de>=0;de--)we+="C"+ne[de]+","+(J[de+1]+K)+" "+ie[de]+","+(J[de]+K)+" "+(H[de]+ae[de])+","+(J[de]+K),we+="l-"+ae[de]+",0 ";return we+="Z",we}function Z(H){var J=H.dimensions,ae=H.model,K=J.map(function(Je){return Je.categories.map(function(Pe){return Pe.y})}),Y=H.model.dimensions.map(function(Je){return Je.categories.map(function(Pe){return Pe.displayInd})}),ie=H.model.dimensions.map(function(Je){return Je.displayInd}),ne=H.dimensions.map(function(Je){return Je.model.dimensionInd}),le=J.map(function(Je){return Je.x}),de=J.map(function(Je){return Je.width}),we=[];for(var me in ae.paths)ae.paths.hasOwnProperty(me)&&we.push(ae.paths[me]);function Le(Je){var Pe=Je.categoryInds.map(function(He,Oe){return Y[Oe][He]}),Ue=ne.map(function(He){return Pe[He]});return Ue}we.sort(function(Je,Pe){var Ue=Le(Je),He=Le(Pe);return H.sortpaths==="backward"&&(Ue.reverse(),He.reverse()),Ue.push(Je.valueInds[0]),He.push(Pe.valueInds[0]),H.bundlecolors&&(Ue.unshift(Je.rawColor),He.unshift(Pe.rawColor)),Ue<He?-1:Ue>He?1:0});for(var ve=new Array(we.length),Ae=J[0].model.count,ye=J[0].categories.map(function(Je){return Je.height}).reduce(function(Je,Pe){return Je+Pe}),Se=0;Se<we.length;Se++){var _e=we[Se],ze;Ae>0?ze=ye*(_e.count/Ae):ze=0;for(var Ie=new Array(K.length),Ne=0;Ne<_e.categoryInds.length;Ne++){var et=_e.categoryInds[Ne],st=Y[Ne][et],Ze=ie[Ne];Ie[Ze]=K[Ze][st],K[Ze][st]+=ze;var Ke=H.dimensions[Ze].categories[st],nt=Ke.bands.length,it=Ke.bands[nt-1];if(it===void 0||_e.rawColor!==it.rawColor){var lt=it===void 0?0:it.y+it.height;Ke.bands.push({key:lt,color:_e.color,rawColor:_e.rawColor,height:ze,width:Ke.width,count:_e.count,y:lt,categoryViewModel:Ke,parcatsViewModel:H})}else{var vt=Ke.bands[nt-1];vt.height+=ze,vt.count+=_e.count}}var xt;H.pathShape==="hspline"?xt=oe(le,Ie,de,ze,.5):xt=oe(le,Ie,de,ze,0),ve[Se]={key:_e.valueInds[0],model:_e,height:ze,leftXs:le,topYs:Ie,dimWidths:de,svgD:xt,parcatsViewModel:H}}H.paths=ve}function G(H){var J=H.model.dimensions.map(function(ne){return{displayInd:ne.displayInd,dimensionInd:ne.dimensionInd}});J.sort(function(ne,le){return ne.displayInd-le.displayInd});var ae=[];for(var K in J){var Y=J[K].dimensionInd,ie=H.model.dimensions[Y];ae.push(re(H,ie))}H.dimensions=ae}function re(H,J){var ae=40,K=16,Y=H.model.dimensions.length,ie=J.displayInd,ne,le,de;Y>1?ne=(H.width-2*ae-K)/(Y-1):ne=0,le=ae,de=le+ne*ie;var we=[],me=H.model.maxCats,Le=J.categories.length,ve=8,Ae=J.count,ye=H.height-ve*(me-1),Se,_e,ze,Ie,Ne,et=(me-Le)*ve/2,st=J.categories.map(function(Ze){return{displayInd:Ze.displayInd,categoryInd:Ze.categoryInd}});for(st.sort(function(Ze,Ke){return Ze.displayInd-Ke.displayInd}),Ne=0;Ne<Le;Ne++)Ie=st[Ne].categoryInd,_e=J.categories[Ie],Ae>0?Se=_e.count/Ae*ye:Se=0,ze={key:_e.valueInds[0],model:_e,width:K,height:Se,y:_e.dragY!==null?_e.dragY:et,bands:[],parcatsViewModel:H},et=et+Se+ve,we.push(ze);return{key:J.dimensionInd,x:J.dragX!==null?J.dragX:de,y:0,width:K,model:J,categories:we,parcatsViewModel:H,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},60268:function(te,X,e){var A=e(51036);te.exports=function(o,L,M,d){var g=o._fullLayout,r=g._paper,t=g._size;A(o,r,L,{width:t.w,height:t.h,margin:{t:t.t,r:t.r,b:t.b,l:t.l}},M,d)}},82296:function(te,X,e){var A=e(49084),P=e(94724),o=e(25376),L=e(86968).u,M=e(92880).extendFlat,d=e(31780).templatedArray;te.exports={domain:L({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:o({editType:"plot"}),tickfont:o({editType:"plot"}),rangefont:o({editType:"plot"}),dimensions:d("dimension",{label:{valType:"string",editType:"plot"},tickvals:M({},P.tickvals,{editType:"plot"}),ticktext:M({},P.ticktext,{editType:"plot"}),tickformat:M({},P.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:M({editType:"calc"},A("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(te,X,e){var A=e(30140),P=e(33428),o=e(71688).keyFun,L=e(71688).repeat,M=e(3400).sorterAsc,d=e(3400).strTranslate,g=A.bar.snapRatio;function r(N,V){return N*(1-g)+V*g}var t=A.bar.snapClose;function s(N,V){return N*(1-t)+V*t}function a(N,V,j,$){if(c(j,$))return j;var q=N?-1:1,oe=0,Z=V.length-1;if(q<0){var G=oe;oe=Z,Z=G}for(var re=V[oe],H=re,J=oe;q*J<q*Z;J+=q){var ae=J+q,K=V[ae];if(q*j<q*s(re,K))return r(re,H);if(q*j<q*K||ae===Z)return r(K,re);H=re,re=K}}function c(N,V){for(var j=0;j<V.length;j++)if(N>=V[j][0]&&N<=V[j][1])return!0;return!1}function u(N){N.attr("x",-A.bar.captureWidth/2).attr("width",A.bar.captureWidth)}function l(N){N.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(N){if(!N.brush.filterSpecified)return"0,"+N.height;for(var V=h(N.brush.filter.getConsolidated(),N.height),j=[0],$,q,oe,Z=V.length?V[0][0]:null,G=0;G<V.length;G++)$=V[G],q=$[1]-$[0],j.push(Z),j.push(q),oe=G+1,oe<V.length&&(Z=V[oe][0]-$[1]);return j.push(N.height),j}function h(N,V){return N.map(function(j){return j.map(function($){return Math.max(0,$*V)}).sort(M)})}function T(N,V){var j=A.bar.handleHeight;if(!(V>N[1]+j||V<N[0]-j))return V>=.9*N[1]+.1*N[0]?"n":V<=.9*N[0]+.1*N[1]?"s":"ns"}function f(){P.select(document.body).style("cursor",null)}function n(N){N.attr("stroke-dasharray",y)}function v(N,V){var j=P.select(N).selectAll(".highlight, .highlight-shadow"),$=V?j.transition().duration(A.bar.snapDuration).each("end",V):j;n($)}function m(N,V){var j=N.brush,$=j.filterSpecified,q=NaN,oe={},Z;if($){var G=N.height,re=j.filter.getConsolidated(),H=h(re,G),J=NaN,ae=NaN,K=NaN;for(Z=0;Z<=H.length;Z++){var Y=H[Z];if(Y&&Y[0]<=V&&V<=Y[1]){J=Z;break}else if(ae=Z?Z-1:NaN,Y&&Y[0]>V){K=Z;break}}if(q=J,isNaN(q)&&(isNaN(ae)||isNaN(K)?q=isNaN(ae)?K:ae:q=V-H[ae][1]<H[K][0]-V?ae:K),!isNaN(q)){var ie=H[q],ne=T(ie,V);ne&&(oe.interval=re[q],oe.intervalPix=ie,oe.region=ne)}}if(N.ordinal&&!oe.region){var le=N.unitTickvals,de=N.unitToPaddedPx.invert(V);for(Z=0;Z<le.length;Z++){var we=[le[Math.max(Z-1,0)]*.25+le[Z]*.75,le[Math.min(Z+1,le.length-1)]*.25+le[Z]*.75];if(de>=we[0]&&de<=we[1]){oe.clickableOrdinalRange=we;break}}}return oe}function b(N,V){P.event.sourceEvent.stopPropagation();var j=V.height-P.mouse(N)[1]-2*A.verticalPadding,$=V.unitToPaddedPx.invert(j),q=V.brush,oe=m(V,j),Z=oe.interval,G=q.svgBrush;if(G.wasDragged=!1,G.grabbingBar=oe.region==="ns",G.grabbingBar){var re=Z.map(V.unitToPaddedPx);G.grabPoint=j-re[0]-A.verticalPadding,G.barLength=re[1]-re[0]}G.clickableOrdinalRange=oe.clickableOrdinalRange,G.stayingIntervals=V.multiselect&&q.filterSpecified?q.filter.getConsolidated():[],Z&&(G.stayingIntervals=G.stayingIntervals.filter(function(H){return H[0]!==Z[0]&&H[1]!==Z[1]})),G.startExtent=oe.region?Z[oe.region==="s"?1:0]:$,V.parent.inBrushDrag=!0,G.brushStartCallback()}function E(N,V){P.event.sourceEvent.stopPropagation();var j=V.height-P.mouse(N)[1]-2*A.verticalPadding,$=V.brush.svgBrush;$.wasDragged=!0,$._dragging=!0,$.grabbingBar?$.newExtent=[j-$.grabPoint,j+$.barLength-$.grabPoint].map(V.unitToPaddedPx.invert):$.newExtent=[$.startExtent,V.unitToPaddedPx.invert(j)].sort(M),V.brush.filterSpecified=!0,$.extent=$.stayingIntervals.concat([$.newExtent]),$.brushCallback(V),v(N.parentNode)}function p(N,V){var j=V.brush,$=j.filter,q=j.svgBrush;q._dragging||(S(N,V),E(N,V),V.brush.svgBrush.wasDragged=!1),q._dragging=!1;var oe=P.event;oe.sourceEvent.stopPropagation();var Z=q.grabbingBar;if(q.grabbingBar=!1,q.grabLocation=void 0,V.parent.inBrushDrag=!1,f(),!q.wasDragged){q.wasDragged=void 0,q.clickableOrdinalRange?j.filterSpecified&&V.multiselect?q.extent.push(q.clickableOrdinalRange):(q.extent=[q.clickableOrdinalRange],j.filterSpecified=!0):Z?(q.extent=q.stayingIntervals,q.extent.length===0&&I(j)):I(j),q.brushCallback(V),v(N.parentNode),q.brushEndCallback(j.filterSpecified?$.getConsolidated():[]);return}var G=function(){$.set($.getConsolidated())};if(V.ordinal){var re=V.unitTickvals;re[re.length-1]<re[0]&&re.reverse(),q.newExtent=[a(0,re,q.newExtent[0],q.stayingIntervals),a(1,re,q.newExtent[1],q.stayingIntervals)];var H=q.newExtent[1]>q.newExtent[0];q.extent=q.stayingIntervals.concat(H?[q.newExtent]:[]),q.extent.length||I(j),q.brushCallback(V),H?v(N.parentNode,G):(G(),v(N.parentNode))}else G();q.brushEndCallback(j.filterSpecified?$.getConsolidated():[])}function S(N,V){var j=V.height-P.mouse(N)[1]-2*A.verticalPadding,$=m(V,j),q="crosshair";$.clickableOrdinalRange?q="pointer":$.region&&(q=$.region+"-resize"),P.select(document.body).style("cursor",q)}function w(N){N.on("mousemove",function(V){P.event.preventDefault(),V.parent.inBrushDrag||S(this,V)}).on("mouseleave",function(V){V.parent.inBrushDrag||f()}).call(P.behavior.drag().on("dragstart",function(V){b(this,V)}).on("drag",function(V){E(this,V)}).on("dragend",function(V){p(this,V)}))}function i(N,V){return N[0]-V[0]}function C(N,V,j){var $=j._context.staticPlot,q=N.selectAll(".background").data(L);q.enter().append("rect").classed("background",!0).call(u).call(l).style("pointer-events",$?"none":"auto").attr("transform",d(0,A.verticalPadding)),q.call(w).attr("height",function(G){return G.height-A.verticalPadding});var oe=N.selectAll(".highlight-shadow").data(L);oe.enter().append("line").classed("highlight-shadow",!0).attr("x",-A.bar.width/2).attr("stroke-width",A.bar.width+A.bar.strokeWidth).attr("stroke",V).attr("opacity",A.bar.strokeOpacity).attr("stroke-linecap","butt"),oe.attr("y1",function(G){return G.height}).call(n);var Z=N.selectAll(".highlight").data(L);Z.enter().append("line").classed("highlight",!0).attr("x",-A.bar.width/2).attr("stroke-width",A.bar.width-A.bar.strokeWidth).attr("stroke",A.bar.fillColor).attr("opacity",A.bar.fillOpacity).attr("stroke-linecap","butt"),Z.attr("y1",function(G){return G.height}).call(n)}function x(N,V,j){var $=N.selectAll("."+A.cn.axisBrush).data(L,o);$.enter().append("g").classed(A.cn.axisBrush,!0),C($,V,j)}function k(N){return N.svgBrush.extent.map(function(V){return V.slice()})}function I(N){N.filterSpecified=!1,N.svgBrush.extent=[[-1/0,1/0]]}function B(N){return function(j){var $=j.brush,q=k($),oe=q.slice();$.filter.set(oe),N()}}function _(N){for(var V=N.slice(),j=[],$,q=V.shift();q;){for($=q.slice();(q=V.shift())&&q[0]<=$[1];)$[1]=Math.max($[1],q[1]);j.push($)}return j.length===1&&j[0][0]>j[0][1]&&(j=[]),j}function z(){var N=[],V,j;return{set:function($){N=$.map(function(q){return q.slice().sort(M)}).sort(i),N.length===1&&N[0][0]===-1/0&&N[0][1]===1/0&&(N=[[0,-1]]),V=_(N),j=N.reduce(function(q,oe){return[Math.min(q[0],oe[0]),Math.max(q[1],oe[1])]},[1/0,-1/0])},get:function(){return N.slice()},getConsolidated:function(){return V},getBounds:function(){return j}}}function O(N,V,j,$,q,oe){var Z=z();return Z.set(j),{filter:Z,filterSpecified:V,svgBrush:{extent:[],brushStartCallback:$,brushCallback:B(q),brushEndCallback:oe}}}function F(N,V){if(Array.isArray(N[0])?(N=N.map(function($){return $.sort(M)}),V.multiselect?N=_(N.sort(i)):N=[N[0]]):N=[N.sort(M)],V.tickvals){var j=V.tickvals.slice().sort(M);if(N=N.map(function($){var q=[a(0,j,$[0],[]),a(1,j,$[1],[])];if(q[1]>q[0])return q}).filter(function($){return $}),!N.length)return}return N.length>1?N:N[0]}te.exports={makeBrush:O,ensureAxisBrush:x,cleanRanges:F}},61664:function(te,X,e){te.exports={attributes:e(82296),supplyDefaults:e(60664),calc:e(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(te,X,e){var A=e(33428),P=e(84888)._M,o=e(24196),L=e(9616);X.name="parcoords",X.plot=function(M){var d=P(M.calcdata,"parcoords")[0];d.length&&o(M,d)},X.clean=function(M,d,g,r){var t=r._has&&r._has("parcoords"),s=d._has&&d._has("parcoords");t&&!s&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},X.toSVG=function(M){var d=M._fullLayout._glimages,g=A.select(M).selectAll(".svg-container"),r=g.filter(function(s,a){return a===g.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function t(){var s=this,a=s.toDataURL("image/png"),c=d.append("svg:image");c.attr({xmlns:L.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:s.style.width,height:s.style.height})}r.each(t),window.setTimeout(function(){A.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},95044:function(te,X,e){var A=e(3400).isArrayOrTypedArray,P=e(8932),o=e(71688).wrap;te.exports=function(d,g){var r,t;return P.hasColorscale(g,"line")&&A(g.line.color)?(r=g.line.color,t=P.extractOpts(g.line).colorscale,P.calc(d,g,{vals:r,containerStr:"line",cLetter:"c"})):(r=L(g._length),t=[[0,g.line.color],[1,g.line.color]]),o({lineColor:r,cscale:t})};function L(M){for(var d=new Array(M),g=0;g<M;g++)d[g]=.5;return d}},30140:function(te){te.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,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"}}},60664:function(te,X,e){var A=e(3400),P=e(94288).hasColorscale,o=e(27260),L=e(86968).Q,M=e(51272),d=e(54460),g=e(82296),r=e(71864),t=e(30140).maxDimensionCount,s=e(26284);function a(u,l,y,h,T){var f=T("line.color",y);if(P(u,"line")&&A.isArrayOrTypedArray(f)){if(f.length)return T("line.colorscale"),o(u,l,h,T,{prefix:"line.",cLetter:"c"}),f.length;l.line.color=y}return 1/0}function c(u,l,y,h){function T(b,E){return A.coerce(u,l,g.dimensions,b,E)}var f=T("values"),n=T("visible");if(f&&f.length||(n=l.visible=!1),n){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var v=T("range");l._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:v},d.setConvert(l._ax,h.layout),T("multiselect");var m=T("constraintrange");m&&(l.constraintrange=r.cleanRanges(m,l))}}te.exports=function(l,y,h,T){function f(E,p){return A.coerce(l,y,g,E,p)}var n=l.dimensions;Array.isArray(n)&&n.length>t&&(A.log("parcoords traces support up to "+t+" dimensions at the moment"),n.splice(t));var v=M(l,y,{name:"dimensions",layout:T,handleItemDefaults:c}),m=a(l,y,h,T,f);L(y,T,f),(!Array.isArray(v)||!v.length)&&(y.visible=!1),s(y,v,"values",m);var b={family:T.font.family,size:Math.round(T.font.size/1.2),color:T.font.color};A.coerceFont(f,"labelfont",b),A.coerceFont(f,"tickfont",b),A.coerceFont(f,"rangefont",b),f("labelangle"),f("labelside"),f("unselected.line.color"),f("unselected.line.opacity")}},95724:function(te,X,e){var A=e(3400).isTypedArray;X.convertTypedArray=function(P){return A(P)?Array.prototype.slice.call(P):P},X.isOrdinal=function(P){return!!P.tickvals},X.isVisible=function(P){return P.visible||!("visible"in P)}},29928:function(te,X,e){var A=e(61664);A.plot=e(24196),te.exports=A},51352:function(te,X,e){var A=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(`
`),P=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(`
`),o=e(30140).maxDimensionCount,L=e(3400),M=1e-6,d=2048,g=new Uint8Array(4),r=new Uint8Array(4),t={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function s(p){p.read({x:0,y:0,width:1,height:1,data:g})}function a(p,S,w,i,C){var x=p._gl;x.enable(x.SCISSOR_TEST),x.scissor(S,w,i,C),p.clear({color:[0,0,0,0],depth:1})}function c(p,S,w,i,C,x){var k=x.key;function I(B){var _=Math.min(i,C-B*i);B===0&&(window.cancelAnimationFrame(w.currentRafs[k]),delete w.currentRafs[k],a(p,x.scissorX,x.scissorY,x.scissorWidth,x.viewBoxSize[1])),!w.clearOnly&&(x.count=2*_,x.offset=2*B*i,S(x),B*i+_<C&&(w.currentRafs[k]=window.requestAnimationFrame(function(){I(B+1)})),w.drawCompleted=!1)}w.drawCompleted||(s(p),w.drawCompleted=!0),I(0)}function u(p){return Math.max(M,Math.min(1-M,p))}function l(p,S){for(var w=new Array(256),i=0;i<256;i++)w[i]=p(i/255).concat(S);return w}function y(p,S){return(p>>>8*S)%256/255}function h(p,S,w){for(var i=new Array(p*(o+4)),C=0,x=0;x<p;x++){for(var k=0;k<o;k++)i[C++]=k<S.length?S[k].paddedUnitValues[x]:.5;i[C++]=y(x,2),i[C++]=y(x,1),i[C++]=y(x,0),i[C++]=u(w[x])}return i}function T(p,S,w){for(var i=new Array(S*8),C=0,x=0;x<S;x++)for(var k=0;k<2;k++)for(var I=0;I<4;I++){var B=p*4+I,_=w[x*64+B];B===63&&k===0&&(_*=-1),i[C++]=_}return i}function f(p){var S="0"+p;return S.substr(S.length-2)}function n(p){return p<o?"p"+f(p+1)+"_"+f(p+4):"colors"}function v(p,S,w){for(var i=0;i<=o;i+=4)p[n(i)](T(i/4,S,w))}function m(p){for(var S={},w=0;w<=o;w+=4)S[n(w)]=p.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return S}function b(p,S,w,i,C,x,k,I,B,_,z,O,F,N){for(var V=[[],[]],j=0;j<64;j++)V[0][j]=j===C?1:0,V[1][j]=j===x?1:0;k*=N,I*=N,B*=N,_*=N;var $=p.lines.canvasOverdrag*N,q=p.domain,oe=p.canvasWidth*N,Z=p.canvasHeight*N,G=p.pad.l*N,re=p.pad.b*N,H=p.layoutHeight*N,J=p.layoutWidth*N,ae=p.deselectedLines.color,K=p.deselectedLines.opacity,Y=L.extendFlat({key:z,resolution:[oe,Z],viewBoxPos:[k+$,I],viewBoxSize:[B,_],i0:C,i1:x,dim0A:V[0].slice(0,16),dim0B:V[0].slice(16,32),dim0C:V[0].slice(32,48),dim0D:V[0].slice(48,64),dim1A:V[1].slice(0,16),dim1B:V[1].slice(16,32),dim1C:V[1].slice(32,48),dim1D:V[1].slice(48,64),drwLayer:O,contextColor:[ae[0]/255,ae[1]/255,ae[2]/255,K!=="auto"?ae[3]*K:Math.max(1/255,Math.pow(1/p.lines.color.length,1/3))],scissorX:(i===S?0:k+$)+(G-$)+J*q.x[0],scissorWidth:(i===w?oe-k+$:B+.5)+(i===S?k+$:0),scissorY:I+re+H*q.y[0],scissorHeight:_,viewportX:G-$+J*q.x[0],viewportY:re+H*q.y[0],viewportWidth:oe,viewportHeight:Z},F);return Y}function E(p){var S=d-1,w=Math.max(0,Math.floor(p[0]*S),0),i=Math.min(S,Math.ceil(p[1]*S),S);return[Math.min(w,i),Math.max(w,i)]}te.exports=function(p,S){var w=S.context,i=S.pick,C=S.regl,x=C._gl,k=x.getParameter(x.ALIASED_LINE_WIDTH_RANGE),I=Math.max(k[0],Math.min(k[1],S.viewModel.plotGlPixelRatio)),B={currentRafs:{},drawCompleted:!0,clearOnly:!1},_,z,O,F,N=m(C),V,j=C.texture(t),$=[];oe(S);var q=C({profile:!1,blend:{enable:w,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:!w,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:C.prop("scissorX"),y:C.prop("scissorY"),width:C.prop("scissorWidth"),height:C.prop("scissorHeight")}},viewport:{x:C.prop("viewportX"),y:C.prop("viewportY"),width:C.prop("viewportWidth"),height:C.prop("viewportHeight")},dither:!1,vert:A,frag:P,primitive:"lines",lineWidth:I,attributes:N,uniforms:{resolution:C.prop("resolution"),viewBoxPos:C.prop("viewBoxPos"),viewBoxSize:C.prop("viewBoxSize"),dim0A:C.prop("dim0A"),dim1A:C.prop("dim1A"),dim0B:C.prop("dim0B"),dim1B:C.prop("dim1B"),dim0C:C.prop("dim0C"),dim1C:C.prop("dim1C"),dim0D:C.prop("dim0D"),dim1D:C.prop("dim1D"),loA:C.prop("loA"),hiA:C.prop("hiA"),loB:C.prop("loB"),hiB:C.prop("hiB"),loC:C.prop("loC"),hiC:C.prop("hiC"),loD:C.prop("loD"),hiD:C.prop("hiD"),palette:j,contextColor:C.prop("contextColor"),maskTexture:C.prop("maskTexture"),drwLayer:C.prop("drwLayer"),maskHeight:C.prop("maskHeight")},offset:C.prop("offset"),count:C.prop("count")});function oe(ae){_=ae.model,z=ae.viewModel,O=z.dimensions.slice(),F=O[0]?O[0].values.length:0;var K=_.lines,Y=i?K.color.map(function(ne,le){return le/K.color.length}):K.color,ie=h(F,O,Y);v(N,F,ie),!w&&!i&&(j=C.texture(L.extendFlat({data:l(_.unitToColor,255)},t)))}function Z(ae){var K,Y,ie,ne=[[],[]];for(ie=0;ie<64;ie++){var le=!ae&&ie<O.length?O[ie].brush.filter.getBounds():[-1/0,1/0];ne[0][ie]=le[0],ne[1][ie]=le[1]}var de=d*8,we=new Array(de);for(K=0;K<de;K++)we[K]=255;if(!ae)for(K=0;K<O.length;K++){var me=K%8,Le=(K-me)/8,ve=Math.pow(2,me),Ae=O[K],ye=Ae.brush.filter.get();if(!(ye.length<2)){var Se=E(ye[0])[1];for(Y=1;Y<ye.length;Y++){var _e=E(ye[Y]);for(ie=Se+1;ie<_e[0];ie++)we[ie*8+Le]&=~ve;Se=Math.max(Se,_e[1])}}}var ze={shape:[8,d],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:we};return V?V(ze):V=C.texture(ze),{maskTexture:V,maskHeight:d,loA:ne[0].slice(0,16),loB:ne[0].slice(16,32),loC:ne[0].slice(32,48),loD:ne[0].slice(48,64),hiA:ne[1].slice(0,16),hiB:ne[1].slice(16,32),hiC:ne[1].slice(32,48),hiD:ne[1].slice(48,64)}}function G(ae,K,Y){var ie=ae.length,ne,le,de,we=1/0,me=-1/0;for(ne=0;ne<ie;ne++)ae[ne].dim0.canvasX<we&&(we=ae[ne].dim0.canvasX,le=ne),ae[ne].dim1.canvasX>me&&(me=ae[ne].dim1.canvasX,de=ne);ie===0&&a(C,0,0,_.canvasWidth,_.canvasHeight);var Le=Z(w);for(ne=0;ne<ie;ne++){var ve=ae[ne],Ae=ve.dim0.crossfilterDimensionIndex,ye=ve.dim1.crossfilterDimensionIndex,Se=ve.canvasX,_e=ve.canvasY,ze=Se+ve.panelSizeX,Ie=ve.plotGlPixelRatio;if(K||!$[Ae]||$[Ae][0]!==Se||$[Ae][1]!==ze){$[Ae]=[Se,ze];var Ne=b(_,le,de,ne,Ae,ye,Se,_e,ve.panelSizeX,ve.panelSizeY,ve.dim0.crossfilterDimensionIndex,w?0:i?2:1,Le,Ie);B.clearOnly=Y;var et=K?_.lines.blockLineCount:F;c(C,q,B,et,F,Ne)}}}function re(ae,K){return C.read({x:ae,y:K,width:1,height:1,data:r}),r}function H(ae,K,Y,ie){var ne=new Uint8Array(4*Y*ie);return C.read({x:ae,y:K,width:Y,height:ie,data:ne}),ne}function J(){p.style["pointer-events"]="none",j.destroy(),V&&V.destroy();for(var ae in N)N[ae].destroy()}return{render:G,readPixel:re,readPixels:H,destroy:J,update:oe}}},26284:function(te){te.exports=function(X,e,A,P){P||(P=1/0);var o,L;for(o=0;o<e.length;o++)L=e[o],L.visible&&(P=Math.min(P,L[A].length));for(P===1/0&&(P=0),X._length=P,o=0;o<e.length;o++)L=e[o],L.visible&&(L._length=P);return P}},36336:function(te,X,e){var A=e(33428),P=e(3400),o=P.isArrayOrTypedArray,L=P.numberFormat,M=e(96824),d=e(54460),g=P.strRotate,r=P.strTranslate,t=e(72736),s=e(43616),a=e(8932),c=e(71688),u=c.keyFun,l=c.repeat,y=c.unwrap,h=e(95724),T=e(30140),f=e(71864),n=e(51352);function v($,q,oe){return P.aggNums($,null,q,oe)}function m($,q){return E(v(Math.min,$,q),v(Math.max,$,q))}function b($){var q=$.range;return q?E(q[0],q[1]):m($.values,$._length)}function E($,q){return(isNaN($)||!isFinite($))&&($=0),(isNaN(q)||!isFinite(q))&&(q=0),$===q&&($===0?($-=1,q+=1):($*=.9,q*=1.1)),[$,q]}function p($,q){return q?function(oe,Z){var G=q[Z];return G??$(oe)}:$}function S($,q,oe,Z,G){var re=b(oe);return Z?A.scale.ordinal().domain(Z.map(p(L(oe.tickformat),G))).range(Z.map(function(H){var J=(H-re[0])/(re[1]-re[0]);return $-q+J*(2*q-$)})):A.scale.linear().domain(re).range([$-q,q])}function w($,q){return A.scale.linear().range([q,$-q])}function i($,q){return A.scale.linear().domain(b($)).range([q,1-q])}function C($){if($.tickvals){var q=b($);return A.scale.ordinal().domain($.tickvals).range($.tickvals.map(function(oe){return(oe-q[0])/(q[1]-q[0])}))}}function x($){var q=$.map(function(re){return re[0]}),oe=$.map(function(re){var H=M(re[1]);return A.rgb("rgb("+H[0]+","+H[1]+","+H[2]+")")}),Z=function(re){return function(H){return H[re]}},G="rgb".split("").map(function(re){return A.scale.linear().clamp(!0).domain(q).range(oe.map(Z(re)))});return function(re){return G.map(function(H){return H(re)})}}function k($){return $.dimensions.some(function(q){return q.brush.filterSpecified})}function I($,q,oe){var Z=y(q),G=Z.trace,re=h.convertTypedArray(Z.lineColor),H=G.line,J={color:M(G.unselected.line.color),opacity:G.unselected.line.opacity},ae=a.extractOpts(H),K=ae.reversescale?a.flipScale(Z.cscale):Z.cscale,Y=G.domain,ie=G.dimensions,ne=$.width,le=G.labelangle,de=G.labelside,we=G.labelfont,me=G.tickfont,Le=G.rangefont,ve=P.extendDeepNoArrays({},H,{color:re.map(A.scale.linear().domain(b({values:re,range:[ae.min,ae.max],_length:G._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),Ae=Math.floor(ne*(Y.x[1]-Y.x[0])),ye=Math.floor($.height*(Y.y[1]-Y.y[0])),Se=$.margin||{l:80,r:80,t:100,b:80},_e=Ae,ze=ye;return{key:oe,colCount:ie.filter(h.isVisible).length,dimensions:ie,tickDistance:T.tickDistance,unitToColor:x(K),lines:ve,deselectedLines:J,labelAngle:le,labelSide:de,labelFont:we,tickFont:me,rangeFont:Le,layoutWidth:ne,layoutHeight:$.height,domain:Y,translateX:Y.x[0]*ne,translateY:$.height-Y.y[1]*$.height,pad:Se,canvasWidth:_e*T.canvasPixelRatio+2*ve.canvasOverdrag,canvasHeight:ze*T.canvasPixelRatio,width:_e,height:ze,canvasPixelRatio:T.canvasPixelRatio}}function B($,q,oe){var Z=oe.width,G=oe.height,re=oe.dimensions,H=oe.canvasPixelRatio,J=function(ne){return Z*ne/Math.max(1,oe.colCount-1)},ae=T.verticalPadding/G,K=w(G,T.verticalPadding),Y={key:oe.key,xScale:J,model:oe,inBrushDrag:!1},ie={};return Y.dimensions=re.filter(h.isVisible).map(function(ne,le){var de=i(ne,ae),we=ie[ne.label];ie[ne.label]=(we||0)+1;var me=ne.label+(we?"__"+we:""),Le=ne.constraintrange,ve=Le&&Le.length;ve&&!o(Le[0])&&(Le=[Le]);var Ae=ve?Le.map(function(Ke){return Ke.map(de)}):[[-1/0,1/0]],ye=function(){var Ke=Y;Ke.focusLayer&&Ke.focusLayer.render(Ke.panels,!0);var nt=k(Ke);!$.contextShown()&&nt?(Ke.contextLayer&&Ke.contextLayer.render(Ke.panels,!0),$.contextShown(!0)):$.contextShown()&&!nt&&(Ke.contextLayer&&Ke.contextLayer.render(Ke.panels,!0,!0),$.contextShown(!1))},Se=ne.values;Se.length>ne._length&&(Se=Se.slice(0,ne._length));var _e=ne.tickvals,ze;function Ie(Ke,nt){return{val:Ke,text:ze[nt]}}function Ne(Ke,nt){return Ke.val-nt.val}if(o(_e)&&_e.length){P.isTypedArray(_e)&&(_e=Array.from(_e)),ze=ne.ticktext,!o(ze)||!ze.length?ze=_e.map(L(ne.tickformat)):ze.length>_e.length?ze=ze.slice(0,_e.length):_e.length>ze.length&&(_e=_e.slice(0,ze.length));for(var et=1;et<_e.length;et++)if(_e[et]<_e[et-1]){for(var st=_e.map(Ie).sort(Ne),Ze=0;Ze<_e.length;Ze++)_e[Ze]=st[Ze].val,ze[Ze]=st[Ze].text;break}}else _e=void 0;return Se=h.convertTypedArray(Se),{key:me,label:ne.label,tickFormat:ne.tickformat,tickvals:_e,ticktext:ze,ordinal:h.isOrdinal(ne),multiselect:ne.multiselect,xIndex:le,crossfilterDimensionIndex:le,visibleIndex:ne._index,height:G,values:Se,paddedUnitValues:Se.map(de),unitTickvals:_e&&_e.map(de),xScale:J,x:J(le),canvasX:J(le)*H,unitToPaddedPx:K,domainScale:S(G,T.verticalPadding,ne,_e,ze),ordinalScale:C(ne),parent:Y,model:oe,brush:f.makeBrush($,ve,Ae,function(){$.linePickActive(!1)},ye,function(Ke){if(Y.focusLayer.render(Y.panels,!0),Y.pickLayer&&Y.pickLayer.render(Y.panels,!0),$.linePickActive(!0),q&&q.filterChanged){var nt=de.invert,it=Ke.map(function(lt){return lt.map(nt).sort(P.sorterAsc)}).sort(function(lt,vt){return lt[0]-vt[0]});q.filterChanged(Y.key,ne._index,it)}})}}),Y}function _($){$.classed(T.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function z(){var $=!0,q=!1;return{linePickActive:function(oe){return arguments.length?$=!!oe:$},contextShown:function(oe){return arguments.length?q=!!oe:q}}}function O($,q){var oe=q==="top"?1:-1,Z=$*Math.PI/180,G=Math.sin(Z),re=Math.cos(Z);return{dir:oe,dx:G,dy:re,degrees:$}}function F($,q,oe){for(var Z=q.panels||(q.panels=[]),G=$.data(),re=0;re<G.length-1;re++){var H=Z[re]||(Z[re]={}),J=G[re],ae=G[re+1];H.dim0=J,H.dim1=ae,H.canvasX=J.canvasX,H.panelSizeX=ae.canvasX-J.canvasX,H.panelSizeY=q.model.canvasHeight,H.y=0,H.canvasY=0,H.plotGlPixelRatio=oe}}function N($){for(var q=0;q<$.length;q++)for(var oe=0;oe<$[q].length;oe++)for(var Z=$[q][oe].trace,G=Z.dimensions,re=0;re<G.length;re++){var H=G[re].values,J=G[re]._ax;J&&(J.range?J.range=E(J.range[0],J.range[1]):J.range=m(H,Z._length),J.dtick||(J.dtick=.01*(Math.abs(J.range[1]-J.range[0])||1)),J.tickformat=G[re].tickformat,d.calcTicks(J),J.cleanRange())}}function V($,q){return d.tickText($._ax,q,!1).text}function j($,q){if($.ordinal)return"";var oe=$.domainScale.domain(),Z=oe[q?oe.length-1:0];return V($.model.dimensions[$.visibleIndex],Z)}te.exports=function(q,oe,Z,G){var re=q._context.staticPlot,H=q._fullLayout,J=H._toppaper,ae=H._glcontainer,K=q._context.plotGlPixelRatio,Y=q._fullLayout.paper_bgcolor;N(oe);var ie=z(),ne=oe.filter(function(Ze){return y(Ze).trace.visible}).map(I.bind(0,Z)).map(B.bind(0,ie,G));ae.each(function(Ze,Ke){return P.extendFlat(Ze,ne[Ke])});var le=ae.selectAll(".gl-canvas").each(function(Ze){Ze.viewModel=ne[0],Ze.viewModel.plotGlPixelRatio=K,Ze.viewModel.paperColor=Y,Ze.model=Ze.viewModel?Ze.viewModel.model:null}),de=null,we=le.filter(function(Ze){return Ze.pick});we.style("pointer-events",re?"none":"auto").on("mousemove",function(Ze){if(ie.linePickActive()&&Ze.lineLayer&&G&&G.hover){var Ke=A.event,nt=this.width,it=this.height,lt=A.mouse(this),vt=lt[0],xt=lt[1];if(vt<0||xt<0||vt>=nt||xt>=it)return;var Je=Ze.lineLayer.readPixel(vt,it-1-xt),Pe=Je[3]!==0,Ue=Pe?Je[2]+256*(Je[1]+256*Je[0]):null,He={x:vt,y:xt,clientX:Ke.clientX,clientY:Ke.clientY,dataIndex:Ze.model.key,curveNumber:Ue};Ue!==de&&(Pe?G.hover(He):G.unhover&&G.unhover(He),de=Ue)}}),le.style("opacity",function(Ze){return Ze.pick?0:1}),J.style("background","rgba(255, 255, 255, 0)");var me=J.selectAll("."+T.cn.parcoords).data(ne,u);me.exit().remove(),me.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),me.attr("transform",function(Ze){return r(Ze.model.translateX,Ze.model.translateY)});var Le=me.selectAll("."+T.cn.parcoordsControlView).data(l,u);Le.enter().append("g").classed(T.cn.parcoordsControlView,!0),Le.attr("transform",function(Ze){return r(Ze.model.pad.l,Ze.model.pad.t)});var ve=Le.selectAll("."+T.cn.yAxis).data(function(Ze){return Ze.dimensions},u);ve.enter().append("g").classed(T.cn.yAxis,!0),Le.each(function(Ze){F(ve,Ze,K)}),le.each(function(Ze){if(Ze.viewModel){!Ze.lineLayer||G?Ze.lineLayer=n(this,Ze):Ze.lineLayer.update(Ze),(Ze.key||Ze.key===0)&&(Ze.viewModel[Ze.key]=Ze.lineLayer);var Ke=!Ze.context||G;Ze.lineLayer.render(Ze.viewModel.panels,Ke)}}),ve.attr("transform",function(Ze){return r(Ze.xScale(Ze.xIndex),0)}),ve.call(A.behavior.drag().origin(function(Ze){return Ze}).on("drag",function(Ze){var Ke=Ze.parent;ie.linePickActive(!1),Ze.x=Math.max(-T.overdrag,Math.min(Ze.model.width+T.overdrag,A.event.x)),Ze.canvasX=Ze.x*Ze.model.canvasPixelRatio,ve.sort(function(nt,it){return nt.x-it.x}).each(function(nt,it){nt.xIndex=it,nt.x=Ze===nt?nt.x:nt.xScale(nt.xIndex),nt.canvasX=nt.x*nt.model.canvasPixelRatio}),F(ve,Ke,K),ve.filter(function(nt){return Math.abs(Ze.xIndex-nt.xIndex)!==0}).attr("transform",function(nt){return r(nt.xScale(nt.xIndex),0)}),A.select(this).attr("transform",r(Ze.x,0)),ve.each(function(nt,it,lt){lt===Ze.parent.key&&(Ke.dimensions[it]=nt)}),Ke.contextLayer&&Ke.contextLayer.render(Ke.panels,!1,!k(Ke)),Ke.focusLayer.render&&Ke.focusLayer.render(Ke.panels)}).on("dragend",function(Ze){var Ke=Ze.parent;Ze.x=Ze.xScale(Ze.xIndex),Ze.canvasX=Ze.x*Ze.model.canvasPixelRatio,F(ve,Ke,K),A.select(this).attr("transform",function(nt){return r(nt.x,0)}),Ke.contextLayer&&Ke.contextLayer.render(Ke.panels,!1,!k(Ke)),Ke.focusLayer&&Ke.focusLayer.render(Ke.panels),Ke.pickLayer&&Ke.pickLayer.render(Ke.panels,!0),ie.linePickActive(!0),G&&G.axesMoved&&G.axesMoved(Ke.key,Ke.dimensions.map(function(nt){return nt.crossfilterDimensionIndex}))})),ve.exit().remove();var Ae=ve.selectAll("."+T.cn.axisOverlays).data(l,u);Ae.enter().append("g").classed(T.cn.axisOverlays,!0),Ae.selectAll("."+T.cn.axis).remove();var ye=Ae.selectAll("."+T.cn.axis).data(l,u);ye.enter().append("g").classed(T.cn.axis,!0),ye.each(function(Ze){var Ke=Ze.model.height/Ze.model.tickDistance,nt=Ze.domainScale,it=nt.domain();A.select(this).call(A.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ke,Ze.tickFormat).tickValues(Ze.ordinal?it:null).tickFormat(function(lt){return h.isOrdinal(Ze)?lt:V(Ze.model.dimensions[Ze.visibleIndex],lt)}).scale(nt)),s.font(ye.selectAll("text"),Ze.model.tickFont)}),ye.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ye.selectAll("text").style("text-shadow",t.makeTextShadow(Y)).style("cursor","default");var Se=Ae.selectAll("."+T.cn.axisHeading).data(l,u);Se.enter().append("g").classed(T.cn.axisHeading,!0);var _e=Se.selectAll("."+T.cn.axisTitle).data(l,u);_e.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",re?"none":"auto"),_e.text(function(Ze){return Ze.label}).each(function(Ze){var Ke=A.select(this);s.font(Ke,Ze.model.labelFont),t.convertToTspans(Ke,q)}).attr("transform",function(Ze){var Ke=O(Ze.model.labelAngle,Ze.model.labelSide),nt=T.axisTitleOffset;return(Ke.dir>0?"":r(0,2*nt+Ze.model.height))+g(Ke.degrees)+r(-nt*Ke.dx,-nt*Ke.dy)}).attr("text-anchor",function(Ze){var Ke=O(Ze.model.labelAngle,Ze.model.labelSide),nt=Math.abs(Ke.dx),it=Math.abs(Ke.dy);return 2*nt>it?Ke.dir*Ke.dx<0?"start":"end":"middle"});var ze=Ae.selectAll("."+T.cn.axisExtent).data(l,u);ze.enter().append("g").classed(T.cn.axisExtent,!0);var Ie=ze.selectAll("."+T.cn.axisExtentTop).data(l,u);Ie.enter().append("g").classed(T.cn.axisExtentTop,!0),Ie.attr("transform",r(0,-T.axisExtentOffset));var Ne=Ie.selectAll("."+T.cn.axisExtentTopText).data(l,u);Ne.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(_),Ne.text(function(Ze){return j(Ze,!0)}).each(function(Ze){s.font(A.select(this),Ze.model.rangeFont)});var et=ze.selectAll("."+T.cn.axisExtentBottom).data(l,u);et.enter().append("g").classed(T.cn.axisExtentBottom,!0),et.attr("transform",function(Ze){return r(0,Ze.model.height+T.axisExtentOffset)});var st=et.selectAll("."+T.cn.axisExtentBottomText).data(l,u);st.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(_),st.text(function(Ze){return j(Ze,!1)}).each(function(Ze){s.font(A.select(this),Ze.model.rangeFont)}),f.ensureAxisBrush(Ae,Y,q)}},24196:function(te,X,e){var A=e(36336),P=e(5048),o=e(95724).isVisible,L={};function M(r,t,s){var a=t.indexOf(s),c=r.indexOf(a);return c===-1&&(c+=t.length),c}function d(r,t){return function(a,c){return M(r,t,a)-M(r,t,c)}}var g=te.exports=function(t,s){var a=t._fullLayout,c=P(t,[],L);if(c){var u={},l={},y={},h={},T=a._size;s.forEach(function(b,E){var p=b[0].trace;y[E]=p.index;var S=h[E]=p._fullInput.index;u[E]=t.data[S].dimensions,l[E]=t.data[S].dimensions.slice()});var f=function(b,E,p){var S=l[b][E],w=p.map(function(B){return B.slice()}),i="dimensions["+E+"].constraintrange",C=a._tracePreGUI[t._fullData[y[b]]._fullInput.uid];if(C[i]===void 0){var x=S.constraintrange;C[i]=x||null}var k=t._fullData[y[b]].dimensions[E];w.length?(w.length===1&&(w=w[0]),S.constraintrange=w,k.constraintrange=w.slice(),w=[w]):(delete S.constraintrange,delete k.constraintrange,w=null);var I={};I[i]=w,t.emit("plotly_restyle",[I,[h[b]]])},n=function(b){t.emit("plotly_hover",b)},v=function(b){t.emit("plotly_unhover",b)},m=function(b,E){var p=d(E,l[b].filter(o));u[b].sort(p),l[b].filter(function(S){return!o(S)}).sort(function(S){return l[b].indexOf(S)}).forEach(function(S){u[b].splice(u[b].indexOf(S),1),u[b].splice(l[b].indexOf(S),0,S)}),t.emit("plotly_restyle",[{dimensions:[u[b]]},[h[b]]])};A(t,s,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:f,hover:n,unhover:v,axesMoved:m})}};g.reglPrecompiled=L},74996:function(te,X,e){var A=e(45464),P=e(86968).u,o=e(25376),L=e(22548),M=e(21776).Ks,d=e(21776).Gw,g=e(92880).extendFlat,r=e(98192).c,t=o({editType:"plot",arrayOk:!0,colorEditType:"plot"});te.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:L.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:g({},A.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:M({},{keys:["label","color","value","percent","text"]}),texttemplate:d({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:g({},t,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:g({},t,{}),outsidetextfont:g({},t,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:g({},t,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:P({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:"angle",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:g({},t,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(te,X,e){var A=e(7316);X.name="pie",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},45768:function(te,X,e){var A=e(38248),P=e(49760),o=e(76308),L={};function M(t,s){var a=[],c=t._fullLayout,u=c.hiddenlabels||[],l=s.labels,y=s.marker.colors||[],h=s.values,T=s._length,f=s._hasValues&&T,n,v;if(s.dlabel)for(l=new Array(T),n=0;n<T;n++)l[n]=String(s.label0+n*s.dlabel);var m={},b=d(c["_"+s.type+"colormap"]),E=0,p=!1;for(n=0;n<T;n++){var S,w,i;if(f){if(S=h[n],!A(S))continue;S=+S}else S=1;w=l[n],(w===void 0||w==="")&&(w=n),w=String(w);var C=m[w];C===void 0?(m[w]=a.length,i=u.indexOf(w)!==-1,i||(E+=S),a.push({v:S,label:w,color:b(y[n],w),i:n,pts:[n],hidden:i})):(p=!0,v=a[C],v.v+=S,v.pts.push(n),v.hidden||(E+=S),v.color===!1&&y[n]&&(v.color=b(y[n],w)))}a=a.filter(function(k){return k.v>=0});var x=s.type==="funnelarea"?p:s.sort;return x&&a.sort(function(k,I){return I.v-k.v}),a[0]&&(a[0].vTotal=E),a}function d(t){return function(a,c){return!a||(a=P(a),!a.isValid())?!1:(a=o.addOpacity(a,a.getAlpha()),t[c]||(t[c]=a),a)}}function g(t,s){var a=(s||{}).type;a||(a="pie");var c=t._fullLayout,u=t.calcdata,l=c[a+"colorway"],y=c["_"+a+"colormap"];c["extend"+a+"colors"]&&(l=r(l,L));for(var h=0,T=0;T<u.length;T++){var f=u[T],n=f[0].trace.type;if(n===a)for(var v=0;v<f.length;v++){var m=f[v];m.color===!1&&(y[m.label]?m.color=y[m.label]:(y[m.label]=m.color=l[h%l.length],h++))}}}function r(t,s){var a,c=JSON.stringify(t),u=s[c];if(!u){for(u=t.slice(),a=0;a<t.length;a++)u.push(P(t[a]).lighten(20).toHexString());for(a=0;a<t.length;a++)u.push(P(t[a]).darken(20).toHexString());s[c]=u}return u}te.exports={calc:M,crossTraceCalc:g,makePullColorFn:d,generateExtendedColors:r}},74174:function(te,X,e){var A=e(38248),P=e(3400),o=e(74996),L=e(86968).Q,M=e(31508).handleText,d=e(3400).coercePattern;function g(s,a){var c=P.isArrayOrTypedArray(s),u=P.isArrayOrTypedArray(a),l=Math.min(c?s.length:1/0,u?a.length:1/0);if(isFinite(l)||(l=0),l&&u){for(var y,h=0;h<l;h++){var T=a[h];if(A(T)&&T>0){y=!0;break}}y||(l=0)}return{hasLabels:c,hasValues:u,len:l}}function r(s,a,c,u,l){var y=u("marker.line.width");y&&u("marker.line.color",l?void 0:c.paper_bgcolor);var h=u("marker.colors");d(u,"marker.pattern",h),s.marker&&!a.marker.pattern.fgcolor&&(a.marker.pattern.fgcolor=s.marker.colors),a.marker.pattern.bgcolor||(a.marker.pattern.bgcolor=c.paper_bgcolor)}function t(s,a,c,u){function l(C,x){return P.coerce(s,a,o,C,x)}var y=l("labels"),h=l("values"),T=g(y,h),f=T.len;if(a._hasLabels=T.hasLabels,a._hasValues=T.hasValues,!a._hasLabels&&a._hasValues&&(l("label0"),l("dlabel")),!f){a.visible=!1;return}a._length=f,r(s,a,u,l,!0),l("scalegroup");var n=l("text"),v=l("texttemplate"),m;if(v||(m=l("textinfo",P.isArrayOrTypedArray(n)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),v||m&&m!=="none"){var b=l("textposition");M(s,a,u,l,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var E=Array.isArray(b)||b==="auto",p=E||b==="outside";p&&l("automargin"),(b==="inside"||b==="auto"||Array.isArray(b))&&l("insidetextorientation")}else m==="none"&&l("textposition","none");L(a,u,l);var S=l("hole"),w=l("title.text");if(w){var i=l("title.position",S?"middle center":"top center");!S&&i==="middle center"&&(a.title.position="top center"),P.coerceFont(l,"title.font",u.font)}l("sort"),l("direction"),l("rotation"),l("pull")}te.exports={handleLabelsAndValues:g,handleMarkerDefaults:r,supplyDefaults:t}},53644:function(te,X,e){var A=e(10624).appendArrayMultiPointValues;te.exports=function(o,L){var M={curveNumber:L.index,pointNumbers:o.pts,data:L._input,fullData:L,label:o.label,color:o.color,value:o.v,percent:o.percent,text:o.text,bbox:o.bbox,v:o.v};return o.pts.length===1&&(M.pointNumber=M.i=o.pts[0]),A(M,L,o.pts),L.type==="funnelarea"&&(delete M.v,delete M.i),M}},21552:function(te,X,e){var A=e(43616),P=e(76308);te.exports=function(L,M,d,g){var r=d.marker.pattern;r&&r.shape?A.pointStyle(L,d,g,M):P.fill(L,M.color)}},69656:function(te,X,e){var A=e(3400);function P(o){return o.indexOf("e")!==-1?o.replace(/[.]?0+e/,"e"):o.indexOf(".")!==-1?o.replace(/[.]?0+$/,""):o}X.formatPiePercent=function(L,M){var d=P((L*100).toPrecision(3));return A.numSeparate(d,M)+"%"},X.formatPieValue=function(L,M){var d=P(L.toPrecision(10));return A.numSeparate(d,M)},X.getFirstFilled=function(L,M){if(A.isArrayOrTypedArray(L))for(var d=0;d<M.length;d++){var g=L[M[d]];if(g||g===0||g==="")return g}},X.castOption=function(L,M){if(A.isArrayOrTypedArray(L))return X.getFirstFilled(L,M);if(L)return L},X.getRotationAngle=function(o){return(o==="auto"?0:o)*Math.PI/180}},75792:function(te,X,e){te.exports={attributes:e(74996),supplyDefaults:e(74174).supplyDefaults,supplyLayoutDefaults:e(90248),layoutAttributes:e(85204),calc:e(45768).calc,crossTraceCalc:e(45768).crossTraceCalc,plot:e(37820).plot,style:e(22152),styleOne:e(10528),moduleType:"trace",name:"pie",basePlotModule:e(80036),categories:["pie-like","pie","showLegend"],meta:{}}},85204:function(te){te.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},90248:function(te,X,e){var A=e(3400),P=e(85204);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("hiddenlabels"),d("piecolorway",M.colorway),d("extendpiecolors")}},37820:function(te,X,e){var A=e(33428),P=e(7316),o=e(93024),L=e(76308),M=e(43616),d=e(3400),g=d.strScale,r=d.strTranslate,t=e(72736),s=e(82744),a=s.recordMinTextSize,c=s.clearMinTextSize,u=e(78048).TEXTPAD,l=e(69656),y=e(53644),h=e(3400).isValidTextValue;function T(G,re){var H=G._context.staticPlot,J=G._fullLayout,ae=J._size;c("pie",J),b(re,G),V(re,ae);var K=d.makeTraceGroups(J._pielayer,re,"trace").each(function(Y){var ie=A.select(this),ne=Y[0],le=ne.trace;$(Y),ie.attr("stroke-linejoin","round"),ie.each(function(){var de=A.select(this).selectAll("g.slice").data(Y);de.enter().append("g").classed("slice",!0),de.exit().remove();var we=[[[],[]],[[],[]]],me=!1;de.each(function(Ie,Ne){if(Ie.hidden){A.select(this).selectAll("path,g").remove();return}Ie.pointNumber=Ie.i,Ie.curveNumber=le.index,we[Ie.pxmid[1]<0?0:1][Ie.pxmid[0]<0?0:1].push(Ie);var et=ne.cx,st=ne.cy,Ze=A.select(this),Ke=Ze.selectAll("path.surface").data([Ie]);if(Ke.enter().append("path").classed("surface",!0).style({"pointer-events":H?"none":"all"}),Ze.call(n,G,Y),le.pull){var nt=+l.castOption(le.pull,Ie.pts)||0;nt>0&&(et+=nt*Ie.pxmid[0],st+=nt*Ie.pxmid[1])}Ie.cxFinal=et,Ie.cyFinal=st;function it(He,Oe,Ce,ge){var pe=ge*(Oe[0]-He[0]),Te=ge*(Oe[1]-He[1]);return"a"+ge*ne.r+","+ge*ne.r+" 0 "+Ie.largeArc+(Ce?" 1 ":" 0 ")+pe+","+Te}var lt=le.hole;if(Ie.v===ne.vTotal){var vt="M"+(et+Ie.px0[0])+","+(st+Ie.px0[1])+it(Ie.px0,Ie.pxmid,!0,1)+it(Ie.pxmid,Ie.px0,!0,1)+"Z";lt?Ke.attr("d","M"+(et+lt*Ie.px0[0])+","+(st+lt*Ie.px0[1])+it(Ie.px0,Ie.pxmid,!1,lt)+it(Ie.pxmid,Ie.px0,!1,lt)+"Z"+vt):Ke.attr("d",vt)}else{var xt=it(Ie.px0,Ie.px1,!0,1);if(lt){var Je=1-lt;Ke.attr("d","M"+(et+lt*Ie.px1[0])+","+(st+lt*Ie.px1[1])+it(Ie.px1,Ie.px0,!1,lt)+"l"+Je*Ie.px0[0]+","+Je*Ie.px0[1]+xt+"Z")}else Ke.attr("d","M"+et+","+st+"l"+Ie.px0[0]+","+Ie.px0[1]+xt+"Z")}oe(G,Ie,ne);var Pe=l.castOption(le.textposition,Ie.pts),Ue=Ze.selectAll("g.slicetext").data(Ie.text&&Pe!=="none"?[0]:[]);Ue.enter().append("g").classed("slicetext",!0),Ue.exit().remove(),Ue.each(function(){var He=d.ensureSingle(A.select(this),"text","",function(Ve){Ve.attr("data-notex",1)}),Oe=d.ensureUniformFontSize(G,Pe==="outside"?v(le,Ie,J.font):m(le,Ie,J.font));He.text(Ie.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(M.font,Oe).call(t.convertToTspans,G);var Ce=M.bBox(He.node()),ge;if(Pe==="outside")ge=I(Ce,Ie);else if(ge=E(Ce,Ie,ne),Pe==="auto"&&ge.scale<1){var pe=d.ensureUniformFontSize(G,le.outsidetextfont);He.call(M.font,pe),Ce=M.bBox(He.node()),ge=I(Ce,Ie)}var Te=ge.textPosAngle,be=Te===void 0?Ie.pxmid:q(ne.r,Te);if(ge.targetX=et+be[0]*ge.rCenter+(ge.x||0),ge.targetY=st+be[1]*ge.rCenter+(ge.y||0),Z(ge,Ce),ge.outside){var ke=ge.targetY;Ie.yLabelMin=ke-Ce.height/2,Ie.yLabelMid=ke,Ie.yLabelMax=ke+Ce.height/2,Ie.labelExtraX=0,Ie.labelExtraY=0,me=!0}ge.fontSize=Oe.size,a(le.type,ge,J),Y[Ne].transform=ge,d.setTransormAndDisplay(He,ge)})});var Le=A.select(this).selectAll("g.titletext").data(le.title.text?[0]:[]);if(Le.enter().append("g").classed("titletext",!0),Le.exit().remove(),Le.each(function(){var Ie=d.ensureSingle(A.select(this),"text","",function(st){st.attr("data-notex",1)}),Ne=le.title.text;le._meta&&(Ne=d.templateString(Ne,le._meta)),Ie.text(Ne).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(M.font,le.title.font).call(t.convertToTspans,G);var et;le.title.position==="middle center"?et=B(ne):et=_(ne,ae),Ie.attr("transform",r(et.x,et.y)+g(Math.min(1,et.scale))+r(et.tx,et.ty))}),me&&N(we,le),f(de,le),me&&le.automargin){var ve=M.bBox(ie.node()),Ae=le.domain,ye=ae.w*(Ae.x[1]-Ae.x[0]),Se=ae.h*(Ae.y[1]-Ae.y[0]),_e=(.5*ye-ne.r)/ae.w,ze=(.5*Se-ne.r)/ae.h;P.autoMargin(G,"pie."+le.uid+".automargin",{xl:Ae.x[0]-_e,xr:Ae.x[1]+_e,yb:Ae.y[0]-ze,yt:Ae.y[1]+ze,l:Math.max(ne.cx-ne.r-ve.left,0),r:Math.max(ve.right-(ne.cx+ne.r),0),b:Math.max(ve.bottom-(ne.cy+ne.r),0),t:Math.max(ne.cy-ne.r-ve.top,0),pad:5})}})});setTimeout(function(){K.selectAll("tspan").each(function(){var Y=A.select(this);Y.attr("dy")&&Y.attr("dy",Y.attr("dy"))})},0)}function f(G,re){G.each(function(H){var J=A.select(this);if(!H.labelExtraX&&!H.labelExtraY){J.select("path.textline").remove();return}var ae=J.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,d.setTransormAndDisplay(ae,H.transform);var K=H.cxFinal+H.pxmid[0],Y=H.cyFinal+H.pxmid[1],ie="M"+K+","+Y,ne=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var le=H.labelExtraX*H.pxmid[1]/H.pxmid[0],de=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(le)>Math.abs(de)?ie+="l"+de*H.pxmid[0]/H.pxmid[1]+","+de+"H"+(K+H.labelExtraX+ne):ie+="l"+H.labelExtraX+","+le+"v"+(de-le)+"h"+ne}else ie+="V"+(H.yLabelMid+H.labelExtraY)+"h"+ne;d.ensureSingle(J,"path","textline").call(L.stroke,re.outsidetextfont.color).attr({"stroke-width":Math.min(2,re.outsidetextfont.size/8),d:ie,fill:"none"})})}function n(G,re,H){var J=H[0],ae=J.cx,K=J.cy,Y=J.trace,ie=Y.type==="funnelarea";"_hasHoverLabel"in Y||(Y._hasHoverLabel=!1),"_hasHoverEvent"in Y||(Y._hasHoverEvent=!1),G.on("mouseover",function(ne){var le=re._fullLayout,de=re._fullData[Y.index];if(!(re._dragging||le.hovermode===!1)){var we=de.hoverinfo;if(Array.isArray(we)&&(we=o.castHoverinfo({hoverinfo:[l.castOption(we,ne.pts)],_module:Y._module},le,0)),we==="all"&&(we="label+text+value+percent+name"),de.hovertemplate||we!=="none"&&we!=="skip"&&we){var me=ne.rInscribed||0,Le=ae+ne.pxmid[0]*(1-me),ve=K+ne.pxmid[1]*(1-me),Ae=le.separators,ye=[];if(we&&we.indexOf("label")!==-1&&ye.push(ne.label),ne.text=l.castOption(de.hovertext||de.text,ne.pts),we&&we.indexOf("text")!==-1){var Se=ne.text;d.isValidTextValue(Se)&&ye.push(Se)}ne.value=ne.v,ne.valueLabel=l.formatPieValue(ne.v,Ae),we&&we.indexOf("value")!==-1&&ye.push(ne.valueLabel),ne.percent=ne.v/J.vTotal,ne.percentLabel=l.formatPiePercent(ne.percent,Ae),we&&we.indexOf("percent")!==-1&&ye.push(ne.percentLabel);var _e=de.hoverlabel,ze=_e.font,Ie=[];o.loneHover({trace:Y,x0:Le-me*J.r,x1:Le+me*J.r,y:ve,_x0:ie?ae+ne.TL[0]:Le-me*J.r,_x1:ie?ae+ne.TR[0]:Le+me*J.r,_y0:ie?K+ne.TL[1]:ve-me*J.r,_y1:ie?K+ne.BL[1]:ve+me*J.r,text:ye.join("<br>"),name:de.hovertemplate||we.indexOf("name")!==-1?de.name:void 0,idealAlign:ne.pxmid[0]<0?"left":"right",color:l.castOption(_e.bgcolor,ne.pts)||ne.color,borderColor:l.castOption(_e.bordercolor,ne.pts),fontFamily:l.castOption(ze.family,ne.pts),fontSize:l.castOption(ze.size,ne.pts),fontColor:l.castOption(ze.color,ne.pts),nameLength:l.castOption(_e.namelength,ne.pts),textAlign:l.castOption(_e.align,ne.pts),hovertemplate:l.castOption(de.hovertemplate,ne.pts),hovertemplateLabels:ne,eventData:[y(ne,de)]},{container:le._hoverlayer.node(),outerContainer:le._paper.node(),gd:re,inOut_bbox:Ie}),ne.bbox=Ie[0],Y._hasHoverLabel=!0}Y._hasHoverEvent=!0,re.emit("plotly_hover",{points:[y(ne,de)],event:A.event})}}),G.on("mouseout",function(ne){var le=re._fullLayout,de=re._fullData[Y.index],we=A.select(this).datum();Y._hasHoverEvent&&(ne.originalEvent=A.event,re.emit("plotly_unhover",{points:[y(we,de)],event:A.event}),Y._hasHoverEvent=!1),Y._hasHoverLabel&&(o.loneUnhover(le._hoverlayer.node()),Y._hasHoverLabel=!1)}),G.on("click",function(ne){var le=re._fullLayout,de=re._fullData[Y.index];re._dragging||le.hovermode===!1||(re._hoverdata=[y(ne,de)],o.click(re,A.event))})}function v(G,re,H){var J=l.castOption(G.outsidetextfont.color,re.pts)||l.castOption(G.textfont.color,re.pts)||H.color,ae=l.castOption(G.outsidetextfont.family,re.pts)||l.castOption(G.textfont.family,re.pts)||H.family,K=l.castOption(G.outsidetextfont.size,re.pts)||l.castOption(G.textfont.size,re.pts)||H.size;return{color:J,family:ae,size:K}}function m(G,re,H){var J=l.castOption(G.insidetextfont.color,re.pts);!J&&G._input.textfont&&(J=l.castOption(G._input.textfont.color,re.pts));var ae=l.castOption(G.insidetextfont.family,re.pts)||l.castOption(G.textfont.family,re.pts)||H.family,K=l.castOption(G.insidetextfont.size,re.pts)||l.castOption(G.textfont.size,re.pts)||H.size;return{color:J||L.contrast(re.color),family:ae,size:K}}function b(G,re){for(var H,J,ae=0;ae<G.length;ae++)if(H=G[ae][0],J=H.trace,J.title.text){var K=J.title.text;J._meta&&(K=d.templateString(K,J._meta));var Y=M.tester.append("text").attr("data-notex",1).text(K).call(M.font,J.title.font).call(t.convertToTspans,re),ie=M.bBox(Y.node(),!0);H.titleBox={width:ie.width,height:ie.height},Y.remove()}}function E(G,re,H){var J=H.r||re.rpx1,ae=re.rInscribed,K=re.startangle===re.stopangle;if(K)return{rCenter:1-ae,scale:0,rotate:0,textPosAngle:0};var Y=re.ring,ie=Y===1&&Math.abs(re.startangle-re.stopangle)===Math.PI*2,ne=re.halfangle,le=re.midangle,de=H.trace.insidetextorientation,we=de==="horizontal",me=de==="tangential",Le=de==="radial",ve=de==="auto",Ae=[],ye;if(!ve){var Se=function(Ze,Ke){if(p(re,Ze)){var nt=Math.abs(Ze-re.startangle),it=Math.abs(Ze-re.stopangle),lt=nt<it?nt:it;Ke==="tan"?ye=w(G,J,Y,lt,0):ye=S(G,J,Y,lt,Math.PI/2),ye.textPosAngle=Ze,Ae.push(ye)}},_e;if(we||me){for(_e=4;_e>=-4;_e-=2)Se(Math.PI*_e,"tan");for(_e=4;_e>=-4;_e-=2)Se(Math.PI*(_e+1),"tan")}if(we||Le){for(_e=4;_e>=-4;_e-=2)Se(Math.PI*(_e+1.5),"rad");for(_e=4;_e>=-4;_e-=2)Se(Math.PI*(_e+.5),"rad")}}if(ie||ve||we){var ze=Math.sqrt(G.width*G.width+G.height*G.height);if(ye={scale:ae*J*2/ze,rCenter:1-ae,rotate:0},ye.textPosAngle=(re.startangle+re.stopangle)/2,ye.scale>=1)return ye;Ae.push(ye)}(ve||Le)&&(ye=S(G,J,Y,ne,le),ye.textPosAngle=(re.startangle+re.stopangle)/2,Ae.push(ye)),(ve||me)&&(ye=w(G,J,Y,ne,le),ye.textPosAngle=(re.startangle+re.stopangle)/2,Ae.push(ye));for(var Ie=0,Ne=0,et=0;et<Ae.length;et++){var st=Ae[et].scale;if(Ne<st&&(Ne=st,Ie=et),!ve&&Ne>=1)break}return Ae[Ie]}function p(G,re){var H=G.startangle,J=G.stopangle;return H>re&&re>J||H<re&&re<J}function S(G,re,H,J,ae){re=Math.max(0,re-2*u);var K=G.width/G.height,Y=x(K,J,re,H);return{scale:Y*2/G.height,rCenter:i(K,Y/re),rotate:C(ae)}}function w(G,re,H,J,ae){re=Math.max(0,re-2*u);var K=G.height/G.width,Y=x(K,J,re,H);return{scale:Y*2/G.width,rCenter:i(K,Y/re),rotate:C(ae+Math.PI/2)}}function i(G,re){return Math.cos(re)-G*re}function C(G){return(180/Math.PI*G+720)%180-90}function x(G,re,H,J){var ae=G+1/(2*Math.tan(re));return H*Math.min(1/(Math.sqrt(ae*ae+.5)+ae),J/(Math.sqrt(G*G+J/2)+G))}function k(G,re){return G.v===re.vTotal&&!re.trace.hole?1:Math.min(1/(1+1/Math.sin(G.halfangle)),G.ring/2)}function I(G,re){var H=re.pxmid[0],J=re.pxmid[1],ae=G.width/2,K=G.height/2;return H<0&&(ae*=-1),J<0&&(K*=-1),{scale:1,rCenter:1,rotate:0,x:ae+Math.abs(K)*(ae>0?1:-1)/2,y:K/(1+H*H/(J*J)),outside:!0}}function B(G){var re=Math.sqrt(G.titleBox.width*G.titleBox.width+G.titleBox.height*G.titleBox.height);return{x:G.cx,y:G.cy,scale:G.trace.hole*G.r*2/re,tx:0,ty:-G.titleBox.height/2+G.trace.title.font.size}}function _(G,re){var H=1,J=1,ae,K=G.trace,Y={x:G.cx,y:G.cy},ie={tx:0,ty:0};ie.ty+=K.title.font.size,ae=F(K),K.title.position.indexOf("top")!==-1?(Y.y-=(1+ae)*G.r,ie.ty-=G.titleBox.height):K.title.position.indexOf("bottom")!==-1&&(Y.y+=(1+ae)*G.r);var ne=z(G.r,G.trace.aspectratio),le=re.w*(K.domain.x[1]-K.domain.x[0])/2;return K.title.position.indexOf("left")!==-1?(le=le+ne,Y.x-=(1+ae)*ne,ie.tx+=G.titleBox.width/2):K.title.position.indexOf("center")!==-1?le*=2:K.title.position.indexOf("right")!==-1&&(le=le+ne,Y.x+=(1+ae)*ne,ie.tx-=G.titleBox.width/2),H=le/G.titleBox.width,J=O(G,re)/G.titleBox.height,{x:Y.x,y:Y.y,scale:Math.min(H,J),tx:ie.tx,ty:ie.ty}}function z(G,re){return G/(re===void 0?1:re)}function O(G,re){var H=G.trace,J=re.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(G.titleBox.height,J/2)}function F(G){var re=G.pull;if(!re)return 0;var H;if(d.isArrayOrTypedArray(re))for(re=0,H=0;H<G.pull.length;H++)G.pull[H]>re&&(re=G.pull[H]);return re}function N(G,re){var H,J,ae,K,Y,ie,ne,le,de,we,me,Le,ve;function Ae(ze,Ie){return ze.pxmid[1]-Ie.pxmid[1]}function ye(ze,Ie){return Ie.pxmid[1]-ze.pxmid[1]}function Se(ze,Ie){Ie||(Ie={});var Ne=Ie.labelExtraY+(J?Ie.yLabelMax:Ie.yLabelMin),et=J?ze.yLabelMin:ze.yLabelMax,st=J?ze.yLabelMax:ze.yLabelMin,Ze=ze.cyFinal+Y(ze.px0[1],ze.px1[1]),Ke=Ne-et,nt,it,lt,vt,xt,Je;if(Ke*ne>0&&(ze.labelExtraY=Ke),!!d.isArrayOrTypedArray(re.pull))for(it=0;it<we.length;it++)lt=we[it],!(lt===ze||(l.castOption(re.pull,ze.pts)||0)>=(l.castOption(re.pull,lt.pts)||0))&&((ze.pxmid[1]-lt.pxmid[1])*ne>0?(vt=lt.cyFinal+Y(lt.px0[1],lt.px1[1]),Ke=vt-et-ze.labelExtraY,Ke*ne>0&&(ze.labelExtraY+=Ke)):(st+ze.labelExtraY-Ze)*ne>0&&(nt=3*ie*Math.abs(it-we.indexOf(ze)),xt=lt.cxFinal+K(lt.px0[0],lt.px1[0]),Je=xt+nt-(ze.cxFinal+ze.pxmid[0])-ze.labelExtraX,Je*ie>0&&(ze.labelExtraX+=Je)))}for(J=0;J<2;J++)for(ae=J?Ae:ye,Y=J?Math.max:Math.min,ne=J?1:-1,H=0;H<2;H++){for(K=H?Math.max:Math.min,ie=H?1:-1,le=G[J][H],le.sort(ae),de=G[1-J][H],we=de.concat(le),Le=[],me=0;me<le.length;me++)le[me].yLabelMid!==void 0&&Le.push(le[me]);for(ve=!1,me=0;J&&me<de.length;me++)if(de[me].yLabelMid!==void 0){ve=de[me];break}for(me=0;me<Le.length;me++){var _e=me&&Le[me-1];ve&&!me&&(_e=ve),Se(Le[me],_e)}}}function V(G,re){for(var H=[],J=0;J<G.length;J++){var ae=G[J][0],K=ae.trace,Y=K.domain,ie=re.w*(Y.x[1]-Y.x[0]),ne=re.h*(Y.y[1]-Y.y[0]);K.title.text&&K.title.position!=="middle center"&&(ne-=O(ae,re));var le=ie/2,de=ne/2;K.type==="funnelarea"&&!K.scalegroup&&(de/=K.aspectratio),ae.r=Math.min(le,de)/(1+F(K)),ae.cx=re.l+re.w*(K.domain.x[1]+K.domain.x[0])/2,ae.cy=re.t+re.h*(1-K.domain.y[0])-ne/2,K.title.text&&K.title.position.indexOf("bottom")!==-1&&(ae.cy-=O(ae,re)),K.scalegroup&&H.indexOf(K.scalegroup)===-1&&H.push(K.scalegroup)}j(G,H)}function j(G,re){for(var H,J,ae,K=0;K<re.length;K++){var Y=1/0,ie=re[K];for(J=0;J<G.length;J++)if(H=G[J][0],ae=H.trace,ae.scalegroup===ie){var ne;if(ae.type==="pie")ne=H.r*H.r;else if(ae.type==="funnelarea"){var le,de;ae.aspectratio>1?(le=H.r,de=le/ae.aspectratio):(de=H.r,le=de*ae.aspectratio),le*=(1+ae.baseratio)/2,ne=le*de}Y=Math.min(Y,ne/H.vTotal)}for(J=0;J<G.length;J++)if(H=G[J][0],ae=H.trace,ae.scalegroup===ie){var we=Y*H.vTotal;ae.type==="funnelarea"&&(we/=(1+ae.baseratio)/2,we/=ae.aspectratio),H.r=Math.sqrt(we)}}}function $(G){var re=G[0],H=re.r,J=re.trace,ae=l.getRotationAngle(J.rotation),K=2*Math.PI/re.vTotal,Y="px0",ie="px1",ne,le,de;if(J.direction==="counterclockwise"){for(ne=0;ne<G.length&&G[ne].hidden;ne++);if(ne===G.length)return;ae+=K*G[ne].v,K*=-1,Y="px1",ie="px0"}for(de=q(H,ae),ne=0;ne<G.length;ne++)le=G[ne],!le.hidden&&(le[Y]=de,le.startangle=ae,ae+=K*le.v/2,le.pxmid=q(H,ae),le.midangle=ae,ae+=K*le.v/2,de=q(H,ae),le.stopangle=ae,le[ie]=de,le.largeArc=le.v>re.vTotal/2?1:0,le.halfangle=Math.PI*Math.min(le.v/re.vTotal,.5),le.ring=1-J.hole,le.rInscribed=k(le,re))}function q(G,re){return[G*Math.sin(re),-G*Math.cos(re)]}function oe(G,re,H){var J=G._fullLayout,ae=H.trace,K=ae.texttemplate,Y=ae.textinfo;if(!K&&Y&&Y!=="none"){var ie=Y.split("+"),ne=function(Ie){return ie.indexOf(Ie)!==-1},le=ne("label"),de=ne("text"),we=ne("value"),me=ne("percent"),Le=J.separators,ve;if(ve=le?[re.label]:[],de){var Ae=l.getFirstFilled(ae.text,re.pts);h(Ae)&&ve.push(Ae)}we&&ve.push(l.formatPieValue(re.v,Le)),me&&ve.push(l.formatPiePercent(re.v/H.vTotal,Le)),re.text=ve.join("<br>")}function ye(Ie){return{label:Ie.label,value:Ie.v,valueLabel:l.formatPieValue(Ie.v,J.separators),percent:Ie.v/H.vTotal,percentLabel:l.formatPiePercent(Ie.v/H.vTotal,J.separators),color:Ie.color,text:Ie.text,customdata:d.castOption(ae,Ie.i,"customdata")}}if(K){var Se=d.castOption(ae,re.i,"texttemplate");if(!Se)re.text="";else{var _e=ye(re),ze=l.getFirstFilled(ae.text,re.pts);(h(ze)||ze==="")&&(_e.text=ze),re.text=d.texttemplateString(Se,_e,G._fullLayout._d3locale,_e,ae._meta||{})}}}function Z(G,re){var H=G.rotate*Math.PI/180,J=Math.cos(H),ae=Math.sin(H),K=(re.left+re.right)/2,Y=(re.top+re.bottom)/2;G.textX=K*J-Y*ae,G.textY=K*ae+Y*J,G.noCenter=!0}te.exports={plot:T,formatSliceLabel:oe,transformInsideText:E,determineInsideTextFont:m,positionTitleOutside:_,prerenderTitles:b,layoutAreas:V,attachFxHandlers:n,computeTransform:Z}},22152:function(te,X,e){var A=e(33428),P=e(10528),o=e(82744).resizeText;te.exports=function(M){var d=M._fullLayout._pielayer.selectAll(".trace");o(M,d,"pie"),d.each(function(g){var r=g[0],t=r.trace,s=A.select(this);s.style({opacity:t.opacity}),s.selectAll("path.surface").each(function(a){A.select(this).call(P,a,t,M)})})}},10528:function(te,X,e){var A=e(76308),P=e(69656).castOption,o=e(21552);te.exports=function(M,d,g,r){var t=g.marker.line,s=P(t.color,d.pts)||A.defaultLine,a=P(t.width,d.pts)||0;M.call(o,d,g,r).style("stroke-width",a).call(A.stroke,s)}},35484:function(te,X,e){var A=e(52904);te.exports={x:A.x,y:A.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:A.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}},11072:function(te,X,e){var A=e(67792).gl_pointcloud2d,P=e(3400).isArrayOrTypedArray,o=e(43080),L=e(19280).findExtremes,M=e(44928);function d(t,s){this.scene=t,this.uid=s,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=A(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var g=d.prototype;g.handlePick=function(t){var s=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[s*2],this.pickXYData[s*2+1]]:[this.pickXData[s],this.pickYData[s]],textLabel:P(this.textLabels)?this.textLabels[s]:this.textLabels,color:this.color,name:this.name,pointIndex:s,hoverinfo:this.hoverinfo}},g.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=M(t,{})},g.updateFast=function(t){var s=this.xData=this.pickXData=t.x,a=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,u=t.xbounds&&t.ybounds,l=t.indices,y,h,T,f=this.bounds,n,v,m;if(c){if(T=c,y=c.length>>>1,u)f[0]=t.xbounds[0],f[2]=t.xbounds[1],f[1]=t.ybounds[0],f[3]=t.ybounds[1];else for(m=0;m<y;m++)n=T[m*2],v=T[m*2+1],n<f[0]&&(f[0]=n),n>f[2]&&(f[2]=n),v<f[1]&&(f[1]=v),v>f[3]&&(f[3]=v);if(l)h=l;else for(h=new Int32Array(y),m=0;m<y;m++)h[m]=m}else for(y=s.length,T=new Float32Array(2*y),h=new Int32Array(y),m=0;m<y;m++)n=s[m],v=a[m],h[m]=m,T[m*2]=n,T[m*2+1]=v,n<f[0]&&(f[0]=n),n>f[2]&&(f[2]=n),v<f[1]&&(f[1]=v),v>f[3]&&(f[3]=v);this.idToIndex=h,this.pointcloudOptions.idToIndex=h,this.pointcloudOptions.positions=T;var b=o(t.marker.color),E=o(t.marker.border.color),p=t.opacity*t.marker.opacity;b[3]*=p,this.pointcloudOptions.color=b;var S=t.marker.blend;if(S===null){var w=100;S=s.length<w||a.length<w}this.pointcloudOptions.blend=S,E[3]*=p,this.pointcloudOptions.borderColor=E;var i=t.marker.sizemin,C=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=i,this.pointcloudOptions.sizeMax=C,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var x=this.scene.xaxis,k=this.scene.yaxis,I=C/2||.5;t._extremes[x._id]=L(x,[f[0],f[2]],{ppad:I}),t._extremes[k._id]=L(k,[f[1],f[3]],{ppad:I})},g.dispose=function(){this.pointcloud.dispose()};function r(t,s){var a=new d(t,s.uid);return a.update(s),a}te.exports=r},41904:function(te,X,e){var A=e(3400),P=e(35484);te.exports=function(L,M,d){function g(r,t){return A.coerce(L,M,P,r,t)}g("x"),g("y"),g("xbounds"),g("ybounds"),L.xy&&L.xy instanceof Float32Array&&(M.xy=L.xy),L.indices&&L.indices instanceof Int32Array&&(M.indices=L.indices),g("text"),g("marker.color",d),g("marker.opacity"),g("marker.blend"),g("marker.sizemin"),g("marker.sizemax"),g("marker.border.color",d),g("marker.border.arearatio"),M._length=null}},156:function(te,X,e){te.exports={attributes:e(35484),supplyDefaults:e(41904),calc:e(41484),plot:e(11072),moduleType:"trace",name:"pointcloud",basePlotModule:e(39952),categories:["gl","gl2d","showLegend"],meta:{}}},41440:function(te,X,e){var A=e(25376),P=e(45464),o=e(22548),L=e(55756),M=e(86968).u,d=e(21776).Ks,g=e(49084),r=e(31780).templatedArray,t=e(29736).descriptionOnlyNumbers,s=e(92880).extendFlat,a=e(67824).overrideAll,c=te.exports=a({hoverinfo:s({},P.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:L.hoverlabel,domain:M({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:t("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:A({}),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:o.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:L.hoverlabel,hovertemplate:d({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.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:L.hoverlabel,hovertemplate:d({},{keys:["value","label"]}),colorscales:r("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:s(g().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested");c.transforms=void 0},10760:function(te,X,e){var A=e(67824).overrideAll,P=e(84888)._M,o=e(59596),L=e(65460),M=e(93972),d=e(86476),g=e(22676).prepSelect,r=e(3400),t=e(24040),s="sankey";X.name=s,X.baseLayoutAttrOverrides=A({hoverlabel:L.hoverlabel},"plot","nested"),X.plot=function(c){var u=P(c.calcdata,s)[0];o(c,u),X.updateFx(c)},X.clean=function(c,u,l,y){var h=y._has&&y._has(s),T=u._has&&u._has(s);h&&!T&&(y._paperdiv.selectAll(".sankey").remove(),y._paperdiv.selectAll(".bgsankey").remove())},X.updateFx=function(c){for(var u=0;u<c._fullData.length;u++)a(c,u)};function a(c,u){var l=c._fullData[u],y=c._fullLayout,h=y.dragmode,T=y.dragmode==="pan"?"move":"crosshair",f=l._bgRect;if(f&&!(h==="pan"||h==="zoom")){M(f,T);var n={_id:"x",c2p:r.identity,_offset:l._sankey.translateX,_length:l._sankey.width},v={_id:"y",c2p:r.identity,_offset:l._sankey.translateY,_length:l._sankey.height},m={gd:c,element:f.node(),plotinfo:{id:u,xaxis:n,yaxis:v,fillRangeItems:r.noop},subplot:u,xaxes:[n],yaxes:[v],doneFnCompleted:function(b){var E=c._fullData[u],p,S=E.node.groups.slice(),w=[];function i(I){for(var B=E._sankey.graph.nodes,_=0;_<B.length;_++)if(B[_].pointNumber===I)return B[_]}for(var C=0;C<b.length;C++){var x=i(b[C].pointNumber);if(x)if(x.group){for(var k=0;k<x.childrenNodes.length;k++)w.push(x.childrenNodes[k].pointNumber);S[x.pointNumber-E.node._count]=!1}else w.push(x.pointNumber)}p=S.filter(Boolean).concat([w]),t.call("_guiRestyle",c,{"node.groups":[p]},u)}};m.prepFn=function(b,E,p){g(b,E,p,m,h)},d.init(m)}}},48068:function(te,X,e){var A=e(78484),P=e(3400),o=e(71688).wrap,L=P.isArrayOrTypedArray,M=P.isIndex,d=e(8932);function g(t){var s=t.node,a=t.link,c=[],u=L(a.color),l=L(a.hovercolor),y=L(a.customdata),h={},T={},f=a.colorscales.length,n;for(n=0;n<f;n++){var v=a.colorscales[n],m=d.extractScale(v,{cLetter:"c"}),b=d.makeColorScaleFunc(m);T[v.label]=b}var E=0;for(n=0;n<a.value.length;n++)a.source[n]>E&&(E=a.source[n]),a.target[n]>E&&(E=a.target[n]);var p=E+1;t.node._count=p;var S,w=t.node.groups,i={};for(n=0;n<w.length;n++){var C=w[n];for(S=0;S<C.length;S++){var x=C[S],k=p+n;i.hasOwnProperty(x)?P.warn("Node "+x+" is already part of a group."):i[x]=k}}var I={source:[],target:[]};for(n=0;n<a.value.length;n++){var B=a.value[n],_=a.source[n],z=a.target[n];if(B>0&&M(_,p)&&M(z,p)&&!(i.hasOwnProperty(_)&&i.hasOwnProperty(z)&&i[_]===i[z])){i.hasOwnProperty(z)&&(z=i[z]),i.hasOwnProperty(_)&&(_=i[_]),_=+_,z=+z,h[_]=h[z]=!0;var O="";a.label&&a.label[n]&&(O=a.label[n]);var F=null;O&&T.hasOwnProperty(O)&&(F=T[O]),c.push({pointNumber:n,label:O,color:u?a.color[n]:a.color,hovercolor:l?a.hovercolor[n]:a.hovercolor,customdata:y?a.customdata[n]:a.customdata,concentrationscale:F,source:_,target:z,value:+B}),I.source.push(_),I.target.push(z)}}var N=p+w.length,V=L(s.color),j=L(s.customdata),$=[];for(n=0;n<N;n++)if(h[n]){var q=s.label[n];$.push({group:n>p-1,childrenNodes:[],pointNumber:n,label:q,color:V?s.color[n]:s.color,customdata:j?s.customdata[n]:s.customdata})}var oe=!1;return r(N,I.source,I.target)&&(oe=!0),{circular:oe,links:c,nodes:$,groups:w,groupLookup:i}}function r(t,s,a){for(var c=P.init2dArray(t,0),u=0;u<Math.min(s.length,a.length);u++)if(P.isIndex(s[u],t)&&P.isIndex(a[u],t)){if(s[u]===a[u])return!0;c[s[u]].push(a[u])}var l=A(c);return l.components.some(function(y){return y.length>1})}te.exports=function(s,a){var c=g(a);return o({circular:c.circular,_nodes:c.nodes,_links:c.links,_groups:c.groups,_groupLookup:c.groupLookup})}},11820:function(te){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"}}},47140:function(te,X,e){var A=e(3400),P=e(41440),o=e(76308),L=e(49760),M=e(86968).Q,d=e(16132),g=e(31780),r=e(51272);te.exports=function(a,c,u,l){function y(k,I){return A.coerce(a,c,P,k,I)}var h=A.extendDeep(l.hoverlabel,a.hoverlabel),T=a.node,f=g.newContainer(c,"node");function n(k,I){return A.coerce(T,f,P.node,k,I)}n("label"),n("groups"),n("x"),n("y"),n("pad"),n("thickness"),n("line.color"),n("line.width"),n("hoverinfo",a.hoverinfo),d(T,f,n,h),n("hovertemplate"),n("align");var v=l.colorway,m=function(k){return v[k%v.length]};n("color",f.label.map(function(k,I){return o.addOpacity(m(I),.8)})),n("customdata");var b=a.link||{},E=g.newContainer(c,"link");function p(k,I){return A.coerce(b,E,P.link,k,I)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",a.hoverinfo),d(b,E,p,h),p("hovertemplate");var S=L(l.paper_bgcolor).getLuminance()<.333,w=S?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",i=p("color",w);function C(k){var I=L(k);if(!I.isValid())return k;var B=I.getAlpha();return B<=.8?I.setAlpha(B+.2):I=S?I.brighten():I.darken(),I.toRgbString()}p("hovercolor",Array.isArray(i)?i.map(C):C(i)),p("customdata"),r(b,E,{name:"colorscales",handleItemDefaults:t}),M(c,l,y),y("orientation"),y("valueformat"),y("valuesuffix");var x;f.x.length&&f.y.length&&(x="freeform"),y("arrangement",x),A.coerceFont(y,"textfont",A.extendFlat({},l.font)),c._length=null};function t(s,a){function c(u,l){return A.coerce(s,a,P.link.colorscales,u,l)}c("label"),c("cmin"),c("cmax"),c("colorscale")}},45499:function(te,X,e){te.exports={attributes:e(41440),supplyDefaults:e(47140),calc:e(48068),plot:e(59596),moduleType:"trace",name:"sankey",basePlotModule:e(10760),selectPoints:e(81128),categories:["noOpacity"],meta:{}}},59596:function(te,X,e){var A=e(33428),P=e(3400),o=P.numberFormat,L=e(83248),M=e(93024),d=e(76308),g=e(11820).cn,r=P._;function t(v){return v!==""}function s(v,m){return v.filter(function(b){return b.key===m.traceId})}function a(v,m){A.select(v).select("path").style("fill-opacity",m),A.select(v).select("rect").style("fill-opacity",m)}function c(v){A.select(v).select("text.name").style("fill","black")}function u(v){return function(m){return v.node.sourceLinks.indexOf(m.link)!==-1||v.node.targetLinks.indexOf(m.link)!==-1}}function l(v){return function(m){return m.node.sourceLinks.indexOf(v.link)!==-1||m.node.targetLinks.indexOf(v.link)!==-1}}function y(v,m,b){m&&b&&s(b,m).selectAll("."+g.sankeyLink).filter(u(m)).call(T.bind(0,m,b,!1))}function h(v,m,b){m&&b&&s(b,m).selectAll("."+g.sankeyLink).filter(u(m)).call(f.bind(0,m,b,!1))}function T(v,m,b,E){E.style("fill",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverHue}).style("fill-opacity",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverAlpha}),E.each(function(p){var S=p.link.label;S!==""&&s(m,v).selectAll("."+g.sankeyLink).filter(function(w){return w.link.label===S}).style("fill",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverHue}).style("fill-opacity",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverAlpha})}),b&&s(m,v).selectAll("."+g.sankeyNode).filter(l(v)).call(y)}function f(v,m,b,E){E.style("fill",function(p){return p.tinyColorHue}).style("fill-opacity",function(p){return p.tinyColorAlpha}),E.each(function(p){var S=p.link.label;S!==""&&s(m,v).selectAll("."+g.sankeyLink).filter(function(w){return w.link.label===S}).style("fill",function(w){return w.tinyColorHue}).style("fill-opacity",function(w){return w.tinyColorAlpha})}),b&&s(m,v).selectAll(g.sankeyNode).filter(l(v)).call(h)}function n(v,m){var b=v.hoverlabel||{},E=P.nestedProperty(b,m).get();return Array.isArray(E)?!1:E}te.exports=function(m,b){for(var E=m._fullLayout,p=E._paper,S=E._size,w=0;w<m._fullData.length;w++)if(m._fullData[w].visible&&m._fullData[w].type===g.sankey&&!m._fullData[w]._viewInitial){var i=m._fullData[w].node;m._fullData[w]._viewInitial={node:{groups:i.groups.slice(),x:i.x.slice(),y:i.y.slice()}}}var C=function(q,oe){var Z=oe.link;Z.originalEvent=A.event,m._hoverdata=[Z],M.click(m,{target:!0})},x=function(q,oe,Z){m._fullLayout.hovermode!==!1&&(A.select(q).call(T.bind(0,oe,Z,!0)),oe.link.trace.link.hoverinfo!=="skip"&&(oe.link.fullData=oe.link.trace,m.emit("plotly_hover",{event:A.event,points:[oe.link]})))},k=r(m,"source:")+" ",I=r(m,"target:")+" ",B=r(m,"concentration:")+" ",_=r(m,"incoming flow count:")+" ",z=r(m,"outgoing flow count:")+" ",O=function(q,oe){if(m._fullLayout.hovermode===!1)return;var Z=oe.link.trace.link;if(Z.hoverinfo==="none"||Z.hoverinfo==="skip")return;var G=[];function re(ne){var le,de;ne.circular?(le=(ne.circularPathData.leftInnerExtent+ne.circularPathData.rightInnerExtent)/2,de=ne.circularPathData.verticalFullExtent):(le=(ne.source.x1+ne.target.x0)/2,de=(ne.y0+ne.y1)/2);var we=[le,de];return ne.trace.orientation==="v"&&we.reverse(),we[0]+=oe.parent.translateX,we[1]+=oe.parent.translateY,we}for(var H=0,J=0;J<oe.flow.links.length;J++){var ae=oe.flow.links[J];if(!(m._fullLayout.hovermode==="closest"&&oe.link.pointNumber!==ae.pointNumber)){oe.link.pointNumber===ae.pointNumber&&(H=J),ae.fullData=ae.trace,Z=oe.link.trace.link;var K=re(ae),Y={valueLabel:o(oe.valueFormat)(ae.value)+oe.valueSuffix};G.push({x:K[0],y:K[1],name:Y.valueLabel,text:[ae.label||"",k+ae.source.label,I+ae.target.label,ae.concentrationscale?B+o("%0.2f")(ae.flow.labelConcentration):""].filter(t).join("<br>"),color:n(Z,"bgcolor")||d.addOpacity(ae.color,1),borderColor:n(Z,"bordercolor"),fontFamily:n(Z,"font.family"),fontSize:n(Z,"font.size"),fontColor:n(Z,"font.color"),nameLength:n(Z,"namelength"),textAlign:n(Z,"align"),idealAlign:A.event.x<K[0]?"right":"left",hovertemplate:Z.hovertemplate,hovertemplateLabels:Y,eventData:[ae]})}}var ie=M.loneHover(G,{container:E._hoverlayer.node(),outerContainer:E._paper.node(),gd:m,anchorIndex:H});ie.each(function(){var ne=this;oe.link.concentrationscale||a(ne,.65),c(ne)})},F=function(q,oe,Z){m._fullLayout.hovermode!==!1&&(A.select(q).call(f.bind(0,oe,Z,!0)),oe.link.trace.link.hoverinfo!=="skip"&&(oe.link.fullData=oe.link.trace,m.emit("plotly_unhover",{event:A.event,points:[oe.link]})),M.loneUnhover(E._hoverlayer.node()))},N=function(q,oe,Z){var G=oe.node;G.originalEvent=A.event,m._hoverdata=[G],A.select(q).call(h,oe,Z),M.click(m,{target:!0})},V=function(q,oe,Z){m._fullLayout.hovermode!==!1&&(A.select(q).call(y,oe,Z),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,m.emit("plotly_hover",{event:A.event,points:[oe.node]})))},j=function(q,oe){if(m._fullLayout.hovermode!==!1){var Z=oe.node.trace.node;if(!(Z.hoverinfo==="none"||Z.hoverinfo==="skip")){var G=A.select(q).select("."+g.nodeRect),re=m._fullLayout._paperdiv.node().getBoundingClientRect(),H=G.node().getBoundingClientRect(),J=H.left-2-re.left,ae=H.right+2-re.left,K=H.top+H.height/4-re.top,Y={valueLabel:o(oe.valueFormat)(oe.node.value)+oe.valueSuffix};oe.node.fullData=oe.node.trace,m._fullLayout._calcInverseTransform(m);var ie=m._fullLayout._invScaleX,ne=m._fullLayout._invScaleY,le=M.loneHover({x0:ie*J,x1:ie*ae,y:ne*K,name:o(oe.valueFormat)(oe.node.value)+oe.valueSuffix,text:[oe.node.label,_+oe.node.targetLinks.length,z+oe.node.sourceLinks.length].filter(t).join("<br>"),color:n(Z,"bgcolor")||oe.tinyColorHue,borderColor:n(Z,"bordercolor"),fontFamily:n(Z,"font.family"),fontSize:n(Z,"font.size"),fontColor:n(Z,"font.color"),nameLength:n(Z,"namelength"),textAlign:n(Z,"align"),idealAlign:"left",hovertemplate:Z.hovertemplate,hovertemplateLabels:Y,eventData:[oe.node]},{container:E._hoverlayer.node(),outerContainer:E._paper.node(),gd:m});a(le,.85),c(le)}}},$=function(q,oe,Z){m._fullLayout.hovermode!==!1&&(A.select(q).call(h,oe,Z),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,m.emit("plotly_unhover",{event:A.event,points:[oe.node]})),M.loneUnhover(E._hoverlayer.node()))};L(m,p,b,{width:S.w,height:S.h,margin:{t:S.t,r:S.r,b:S.b,l:S.l}},{linkEvents:{hover:x,follow:O,unhover:F,select:C},nodeEvents:{hover:V,follow:j,unhover:$,select:N}})}},83248:function(te,X,e){var A=e(49812),P=e(67756).Gz,o=e(33428),L=e(26800),M=e(48932),d=e(11820),g=e(49760),r=e(76308),t=e(43616),s=e(3400),a=s.strTranslate,c=s.strRotate,u=e(71688),l=u.keyFun,y=u.repeat,h=u.unwrap,T=e(72736),f=e(24040),n=e(84284),v=n.CAP_SHIFT,m=n.LINE_SPACING,b=3;function E(re,H,J){var ae=h(H),K=ae.trace,Y=K.domain,ie=K.orientation==="h",ne=K.node.pad,le=K.node.thickness,de={justify:L.sankeyJustify,left:L.sankeyLeft,right:L.sankeyRight,center:L.sankeyCenter}[K.node.align],we=re.width*(Y.x[1]-Y.x[0]),me=re.height*(Y.y[1]-Y.y[0]),Le=ae._nodes,ve=ae._links,Ae=ae.circular,ye;Ae?ye=M.sankeyCircular().circularLinkGap(0):ye=L.sankey(),ye.iterations(d.sankeyIterations).size(ie?[we,me]:[me,we]).nodeWidth(le).nodePadding(ne).nodeId(function(Je){return Je.pointNumber}).nodeAlign(de).nodes(Le).links(ve);var Se=ye();ye.nodePadding()<ne&&s.warn("node.pad was reduced to ",ye.nodePadding()," to fit within the figure.");var _e,ze,Ie;for(var Ne in ae._groupLookup){var et=parseInt(ae._groupLookup[Ne]),st;for(_e=0;_e<Se.nodes.length;_e++)if(Se.nodes[_e].pointNumber===et){st=Se.nodes[_e];break}if(st){var Ze={pointNumber:parseInt(Ne),x0:st.x0,x1:st.x1,y0:st.y0,y1:st.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};Se.nodes.unshift(Ze),st.childrenNodes.unshift(Ze)}}function Ke(){for(_e=0;_e<Se.nodes.length;_e++){var Je=Se.nodes[_e],Pe={},Ue,He;for(ze=0;ze<Je.targetLinks.length;ze++)He=Je.targetLinks[ze],Ue=He.source.pointNumber+":"+He.target.pointNumber,Pe.hasOwnProperty(Ue)||(Pe[Ue]=[]),Pe[Ue].push(He);var Oe=Object.keys(Pe);for(ze=0;ze<Oe.length;ze++){Ue=Oe[ze];var Ce=Pe[Ue],ge=0,pe={};for(Ie=0;Ie<Ce.length;Ie++)He=Ce[Ie],pe[He.label]||(pe[He.label]=0),pe[He.label]+=He.value,ge+=He.value;for(Ie=0;Ie<Ce.length;Ie++)He=Ce[Ie],He.flow={value:ge,labelConcentration:pe[He.label]/ge,concentration:He.value/ge,links:Ce},He.concentrationscale&&(He.color=g(He.concentrationscale(He.flow.labelConcentration)))}var Te=0;for(ze=0;ze<Je.sourceLinks.length;ze++)Te+=Je.sourceLinks[ze].value;for(ze=0;ze<Je.sourceLinks.length;ze++)He=Je.sourceLinks[ze],He.concentrationOut=He.value/Te;var be=0;for(ze=0;ze<Je.targetLinks.length;ze++)be+=Je.targetLinks[ze].value;for(ze=0;ze<Je.targetLinks.length;ze++)He=Je.targetLinks[ze],He.concenrationIn=He.value/be}}Ke();function nt(Je){Je.forEach(function(Pe){var Ue,He,Oe=0,Ce=Pe.length,ge;for(Pe.sort(function(pe,Te){return pe.y0-Te.y0}),ge=0;ge<Ce;++ge)Ue=Pe[ge],Ue.y0>=Oe||(He=Oe-Ue.y0,He>1e-6&&(Ue.y0+=He,Ue.y1+=He)),Oe=Ue.y1+ne})}function it(Je){var Pe=Je.map(function(Te,be){return{x0:Te.x0,index:be}}).sort(function(Te,be){return Te.x0-be.x0}),Ue=[],He=-1,Oe,Ce=-1/0,ge;for(_e=0;_e<Pe.length;_e++){var pe=Je[Pe[_e].index];pe.x0>Ce+le&&(He+=1,Oe=pe.x0),Ce=pe.x0,Ue[He]||(Ue[He]=[]),Ue[He].push(pe),ge=Oe-pe.x0,pe.x0+=ge,pe.x1+=ge}return Ue}if(K.node.x.length&&K.node.y.length){for(_e=0;_e<Math.min(K.node.x.length,K.node.y.length,Se.nodes.length);_e++)if(K.node.x[_e]&&K.node.y[_e]){var lt=[K.node.x[_e]*we,K.node.y[_e]*me];Se.nodes[_e].x0=lt[0]-le/2,Se.nodes[_e].x1=lt[0]+le/2;var vt=Se.nodes[_e].y1-Se.nodes[_e].y0;Se.nodes[_e].y0=lt[1]-vt/2,Se.nodes[_e].y1=lt[1]+vt/2}if(K.arrangement==="snap"){Le=Se.nodes;var xt=it(Le);nt(xt)}ye.update(Se)}return{circular:Ae,key:J,trace:K,guid:s.randstr(),horizontal:ie,width:we,height:me,nodePad:K.node.pad,nodeLineColor:K.node.line.color,nodeLineWidth:K.node.line.width,linkLineColor:K.link.line.color,linkLineWidth:K.link.line.width,linkArrowLength:K.link.arrowlen,valueFormat:K.valueformat,valueSuffix:K.valuesuffix,textFont:K.textfont,translateX:Y.x[0]*re.width+re.margin.l,translateY:re.height-Y.y[1]*re.height+re.margin.t,dragParallel:ie?me:we,dragPerpendicular:ie?we:me,arrangement:K.arrangement,sankey:ye,graph:Se,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function p(re,H,J){var ae=g(H.color),K=g(H.hovercolor),Y=H.source.label+"|"+H.target.label,ie=Y+"__"+J;return H.trace=re.trace,H.curveNumber=re.trace.index,{circular:re.circular,key:ie,traceId:re.key,pointNumber:H.pointNumber,link:H,tinyColorHue:r.tinyRGB(ae),tinyColorAlpha:ae.getAlpha(),tinyColorHoverHue:r.tinyRGB(K),tinyColorHoverAlpha:K.getAlpha(),linkPath:w,linkLineColor:re.linkLineColor,linkLineWidth:re.linkLineWidth,linkArrowLength:re.linkArrowLength,valueFormat:re.valueFormat,valueSuffix:re.valueSuffix,sankey:re.sankey,parent:re,interactionState:re.interactionState,flow:H.flow}}function S(re,H){var J="",ae=re.width/2,K=re.circularPathData;return re.circularLinkType==="top"?J="M "+(K.targetX-H)+" "+(K.targetY+ae)+" L"+(K.rightInnerExtent-H)+" "+(K.targetY+ae)+"A"+(K.rightLargeArcRadius+ae)+" "+(K.rightSmallArcRadius+ae)+" 0 0 1 "+(K.rightFullExtent-ae-H)+" "+(K.targetY-K.rightSmallArcRadius)+"L"+(K.rightFullExtent-ae-H)+" "+K.verticalRightInnerExtent+"A"+(K.rightLargeArcRadius+ae)+" "+(K.rightLargeArcRadius+ae)+" 0 0 1 "+(K.rightInnerExtent-H)+" "+(K.verticalFullExtent-ae)+"L"+K.leftInnerExtent+" "+(K.verticalFullExtent-ae)+"A"+(K.leftLargeArcRadius+ae)+" "+(K.leftLargeArcRadius+ae)+" 0 0 1 "+(K.leftFullExtent+ae)+" "+K.verticalLeftInnerExtent+"L"+(K.leftFullExtent+ae)+" "+(K.sourceY-K.leftSmallArcRadius)+"A"+(K.leftLargeArcRadius+ae)+" "+(K.leftSmallArcRadius+ae)+" 0 0 1 "+K.leftInnerExtent+" "+(K.sourceY+ae)+"L"+K.sourceX+" "+(K.sourceY+ae)+"L"+K.sourceX+" "+(K.sourceY-ae)+"L"+K.leftInnerExtent+" "+(K.sourceY-ae)+"A"+(K.leftLargeArcRadius-ae)+" "+(K.leftSmallArcRadius-ae)+" 0 0 0 "+(K.leftFullExtent-ae)+" "+(K.sourceY-K.leftSmallArcRadius)+"L"+(K.leftFullExtent-ae)+" "+K.verticalLeftInnerExtent+"A"+(K.leftLargeArcRadius-ae)+" "+(K.leftLargeArcRadius-ae)+" 0 0 0 "+K.leftInnerExtent+" "+(K.verticalFullExtent+ae)+"L"+(K.rightInnerExtent-H)+" "+(K.verticalFullExtent+ae)+"A"+(K.rightLargeArcRadius-ae)+" "+(K.rightLargeArcRadius-ae)+" 0 0 0 "+(K.rightFullExtent+ae-H)+" "+K.verticalRightInnerExtent+"L"+(K.rightFullExtent+ae-H)+" "+(K.targetY-K.rightSmallArcRadius)+"A"+(K.rightLargeArcRadius-ae)+" "+(K.rightSmallArcRadius-ae)+" 0 0 0 "+(K.rightInnerExtent-H)+" "+(K.targetY-ae)+"L"+(K.targetX-H)+" "+(K.targetY-ae)+(H>0?"L"+K.targetX+" "+K.targetY:"")+"Z":J="M "+(K.targetX-H)+" "+(K.targetY-ae)+" L"+(K.rightInnerExtent-H)+" "+(K.targetY-ae)+"A"+(K.rightLargeArcRadius+ae)+" "+(K.rightSmallArcRadius+ae)+" 0 0 0 "+(K.rightFullExtent-ae-H)+" "+(K.targetY+K.rightSmallArcRadius)+"L"+(K.rightFullExtent-ae-H)+" "+K.verticalRightInnerExtent+"A"+(K.rightLargeArcRadius+ae)+" "+(K.rightLargeArcRadius+ae)+" 0 0 0 "+(K.rightInnerExtent-H)+" "+(K.verticalFullExtent+ae)+"L"+K.leftInnerExtent+" "+(K.verticalFullExtent+ae)+"A"+(K.leftLargeArcRadius+ae)+" "+(K.leftLargeArcRadius+ae)+" 0 0 0 "+(K.leftFullExtent+ae)+" "+K.verticalLeftInnerExtent+"L"+(K.leftFullExtent+ae)+" "+(K.sourceY+K.leftSmallArcRadius)+"A"+(K.leftLargeArcRadius+ae)+" "+(K.leftSmallArcRadius+ae)+" 0 0 0 "+K.leftInnerExtent+" "+(K.sourceY-ae)+"L"+K.sourceX+" "+(K.sourceY-ae)+"L"+K.sourceX+" "+(K.sourceY+ae)+"L"+K.leftInnerExtent+" "+(K.sourceY+ae)+"A"+(K.leftLargeArcRadius-ae)+" "+(K.leftSmallArcRadius-ae)+" 0 0 1 "+(K.leftFullExtent-ae)+" "+(K.sourceY+K.leftSmallArcRadius)+"L"+(K.leftFullExtent-ae)+" "+K.verticalLeftInnerExtent+"A"+(K.leftLargeArcRadius-ae)+" "+(K.leftLargeArcRadius-ae)+" 0 0 1 "+K.leftInnerExtent+" "+(K.verticalFullExtent-ae)+"L"+(K.rightInnerExtent-H)+" "+(K.verticalFullExtent-ae)+"A"+(K.rightLargeArcRadius-ae)+" "+(K.rightLargeArcRadius-ae)+" 0 0 1 "+(K.rightFullExtent+ae-H)+" "+K.verticalRightInnerExtent+"L"+(K.rightFullExtent+ae-H)+" "+(K.targetY+K.rightSmallArcRadius)+"A"+(K.rightLargeArcRadius-ae)+" "+(K.rightSmallArcRadius-ae)+" 0 0 1 "+(K.rightInnerExtent-H)+" "+(K.targetY+ae)+"L"+(K.targetX-H)+" "+(K.targetY+ae)+(H>0?"L"+K.targetX+" "+K.targetY:"")+"Z",J}function w(){var re=.5;function H(J){var ae=J.linkArrowLength;if(J.link.circular)return S(J.link,ae);var K=Math.abs((J.link.target.x0-J.link.source.x1)/2);ae>K&&(ae=K);var Y=J.link.source.x1,ie=J.link.target.x0-ae,ne=P(Y,ie),le=ne(re),de=ne(1-re),we=J.link.y0-J.link.width/2,me=J.link.y0+J.link.width/2,Le=J.link.y1-J.link.width/2,ve=J.link.y1+J.link.width/2,Ae="M"+Y+","+we,ye="C"+le+","+we+" "+de+","+Le+" "+ie+","+Le,Se="C"+de+","+ve+" "+le+","+me+" "+Y+","+me,_e=ae>0?"L"+(ie+ae)+","+(Le+J.link.width/2):"";return _e+="L"+ie+","+ve,Ae+ye+_e+Se+"Z"}return H}function i(re,H){var J=g(H.color),ae=d.nodePadAcross,K=re.nodePad/2;H.dx=H.x1-H.x0,H.dy=H.y1-H.y0;var Y=H.dx,ie=Math.max(.5,H.dy),ne="node_"+H.pointNumber;return H.group&&(ne=s.randstr()),H.trace=re.trace,H.curveNumber=re.trace.index,{index:H.pointNumber,key:ne,partOfGroup:H.partOfGroup||!1,group:H.group,traceId:re.key,trace:re.trace,node:H,nodePad:re.nodePad,nodeLineColor:re.nodeLineColor,nodeLineWidth:re.nodeLineWidth,textFont:re.textFont,size:re.horizontal?re.height:re.width,visibleWidth:Math.ceil(Y),visibleHeight:ie,zoneX:-ae,zoneY:-K,zoneWidth:Y+2*ae,zoneHeight:ie+2*K,labelY:re.horizontal?H.dy/2+1:H.dx/2+1,left:H.originalLayer===1,sizeAcross:re.width,forceLayouts:re.forceLayouts,horizontal:re.horizontal,darkBackground:J.getBrightness()<=128,tinyColorHue:r.tinyRGB(J),tinyColorAlpha:J.getAlpha(),valueFormat:re.valueFormat,valueSuffix:re.valueSuffix,sankey:re.sankey,graph:re.graph,arrangement:re.arrangement,uniqueNodeLabelPathId:[re.guid,re.key,ne].join("_"),interactionState:re.interactionState,figure:re}}function C(re){re.attr("transform",function(H){return a(H.node.x0.toFixed(3),H.node.y0.toFixed(3))})}function x(re){re.call(C)}function k(re,H){re.call(x),H.attr("d",w())}function I(re){re.attr("width",function(H){return H.node.x1-H.node.x0}).attr("height",function(H){return H.visibleHeight})}function B(re){return re.link.width>1||re.linkLineWidth>0}function _(re){var H=a(re.translateX,re.translateY);return H+(re.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function z(re,H,J){re.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(J.hover(this,ae,H),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(J.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(J.unhover(this,ae,H),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(J.unhover(this,ae,H),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&J.select(this,ae,H)})}function O(re,H,J,ae){var K=o.behavior.drag().origin(function(Y){return{x:Y.node.x0+Y.visibleWidth/2,y:Y.node.y0+Y.visibleHeight/2}}).on("dragstart",function(Y){if(Y.arrangement!=="fixed"&&(s.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(ne){ae._fullLayout._dragCover=ne}),s.raiseToTop(this),Y.interactionState.dragInProgress=Y.node,q(Y.node),Y.interactionState.hovered&&(J.nodeEvents.unhover.apply(0,Y.interactionState.hovered),Y.interactionState.hovered=!1),Y.arrangement==="snap")){var ie=Y.traceId+"|"+Y.key;Y.forceLayouts[ie]?Y.forceLayouts[ie].alpha(1):F(re,ie,Y),N(re,H,Y,ie,ae)}}).on("drag",function(Y){if(Y.arrangement!=="fixed"){var ie=o.event.x,ne=o.event.y;Y.arrangement==="snap"?(Y.node.x0=ie-Y.visibleWidth/2,Y.node.x1=ie+Y.visibleWidth/2,Y.node.y0=ne-Y.visibleHeight/2,Y.node.y1=ne+Y.visibleHeight/2):(Y.arrangement==="freeform"&&(Y.node.x0=ie-Y.visibleWidth/2,Y.node.x1=ie+Y.visibleWidth/2),ne=Math.max(0,Math.min(Y.size-Y.visibleHeight/2,ne)),Y.node.y0=ne-Y.visibleHeight/2,Y.node.y1=ne+Y.visibleHeight/2),q(Y.node),Y.arrangement!=="snap"&&(Y.sankey.update(Y.graph),k(re.filter(oe(Y)),H))}}).on("dragend",function(Y){if(Y.arrangement!=="fixed"){Y.interactionState.dragInProgress=!1;for(var ie=0;ie<Y.node.childrenNodes.length;ie++)Y.node.childrenNodes[ie].x=Y.node.x,Y.node.childrenNodes[ie].y=Y.node.y;Y.arrangement!=="snap"&&j(Y,ae)}});re.on(".drag",null).call(K)}function F(re,H,J,ae){Z(J.graph.nodes);var K=J.graph.nodes.filter(function(Y){return Y.originalX===J.node.originalX}).filter(function(Y){return!Y.partOfGroup});J.forceLayouts[H]=A.forceSimulation(K).alphaDecay(0).force("collide",A.forceCollide().radius(function(Y){return Y.dy/2+J.nodePad/2}).strength(1).iterations(d.forceIterations)).force("constrain",V(re,H,K,J)).stop()}function N(re,H,J,ae,K){window.requestAnimationFrame(function Y(){var ie;for(ie=0;ie<d.forceTicksPerFrame;ie++)J.forceLayouts[ae].tick();var ne=J.graph.nodes;if(G(ne),J.sankey.update(J.graph),k(re.filter(oe(J)),H),J.forceLayouts[ae].alpha()>0)window.requestAnimationFrame(Y);else{var le=J.node.originalX;J.node.x0=le-J.visibleWidth/2,J.node.x1=le+J.visibleWidth/2,j(J,K)}})}function V(re,H,J,ae){return function(){for(var Y=0,ie=0;ie<J.length;ie++){var ne=J[ie];ne===ae.interactionState.dragInProgress?(ne.x=ne.lastDraggedX,ne.y=ne.lastDraggedY):(ne.vx=(ne.originalX-ne.x)/d.forceTicksPerFrame,ne.y=Math.min(ae.size-ne.dy/2,Math.max(ne.dy/2,ne.y))),Y=Math.max(Y,Math.abs(ne.vx),Math.abs(ne.vy))}!ae.interactionState.dragInProgress&&Y<.1&&ae.forceLayouts[H].alpha()>0&&ae.forceLayouts[H].alpha(0)}}function j(re,H){for(var J=[],ae=[],K=0;K<re.graph.nodes.length;K++){var Y=(re.graph.nodes[K].x0+re.graph.nodes[K].x1)/2,ie=(re.graph.nodes[K].y0+re.graph.nodes[K].y1)/2;J.push(Y/re.figure.width),ae.push(ie/re.figure.height)}f.call("_guiRestyle",H,{"node.x":[J],"node.y":[ae]},re.trace.index).then(function(){H._fullLayout._dragCover&&H._fullLayout._dragCover.remove()})}function $(re){var H=[],J;for(J=0;J<re.length;J++)re[J].originalX=(re[J].x0+re[J].x1)/2,re[J].originalY=(re[J].y0+re[J].y1)/2,H.indexOf(re[J].originalX)===-1&&H.push(re[J].originalX);for(H.sort(function(ae,K){return ae-K}),J=0;J<re.length;J++)re[J].originalLayerIndex=H.indexOf(re[J].originalX),re[J].originalLayer=re[J].originalLayerIndex/(H.length-1)}function q(re){re.lastDraggedX=re.x0+re.dx/2,re.lastDraggedY=re.y0+re.dy/2}function oe(re){return function(H){return H.node.originalX===re.node.originalX}}function Z(re){for(var H=0;H<re.length;H++)re[H].y=(re[H].y0+re[H].y1)/2,re[H].x=(re[H].x0+re[H].x1)/2}function G(re){for(var H=0;H<re.length;H++)re[H].y0=re[H].y-re[H].dy/2,re[H].y1=re[H].y0+re[H].dy,re[H].x0=re[H].x-re[H].dx/2,re[H].x1=re[H].x0+re[H].dx}te.exports=function(re,H,J,ae,K){var Y=re._context.staticPlot,ie=!1;s.ensureSingle(re._fullLayout._infolayer,"g","first-render",function(){ie=!0});var ne=re._fullLayout._dragCover,le=J.filter(function(Se){return h(Se).trace.visible}).map(E.bind(null,ae)),de=H.selectAll("."+d.cn.sankey).data(le,l);de.exit().remove(),de.enter().append("g").classed(d.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",Y?"none":"auto").attr("transform",_),de.each(function(Se,_e){re._fullData[_e]._sankey=Se;var ze="bgsankey-"+Se.trace.uid+"-"+_e;s.ensureSingle(re._fullLayout._draggers,"rect",ze),re._fullData[_e]._bgRect=o.select("."+ze),re._fullData[_e]._bgRect.style("pointer-events",Y?"none":"all").attr("width",Se.width).attr("height",Se.height).attr("x",Se.translateX).attr("y",Se.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),de.transition().ease(d.ease).duration(d.duration).attr("transform",_);var we=de.selectAll("."+d.cn.sankeyLinks).data(y,l);we.enter().append("g").classed(d.cn.sankeyLinks,!0).style("fill","none");var me=we.selectAll("."+d.cn.sankeyLink).data(function(Se){var _e=Se.graph.links;return _e.filter(function(ze){return ze.value}).map(p.bind(null,Se))},l);me.enter().append("path").classed(d.cn.sankeyLink,!0).call(z,de,K.linkEvents),me.style("stroke",function(Se){return B(Se)?r.tinyRGB(g(Se.linkLineColor)):Se.tinyColorHue}).style("stroke-opacity",function(Se){return B(Se)?r.opacity(Se.linkLineColor):Se.tinyColorAlpha}).style("fill",function(Se){return Se.tinyColorHue}).style("fill-opacity",function(Se){return Se.tinyColorAlpha}).style("stroke-width",function(Se){return B(Se)?Se.linkLineWidth:1}).attr("d",w()),me.style("opacity",function(){return re._context.staticPlot||ie||ne?1:0}).transition().ease(d.ease).duration(d.duration).style("opacity",1),me.exit().transition().ease(d.ease).duration(d.duration).style("opacity",0).remove();var Le=de.selectAll("."+d.cn.sankeyNodeSet).data(y,l);Le.enter().append("g").classed(d.cn.sankeyNodeSet,!0),Le.style("cursor",function(Se){switch(Se.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var ve=Le.selectAll("."+d.cn.sankeyNode).data(function(Se){var _e=Se.graph.nodes;return $(_e),_e.map(i.bind(null,Se))},l);ve.enter().append("g").classed(d.cn.sankeyNode,!0).call(C).style("opacity",function(Se){return(re._context.staticPlot||ie)&&!Se.partOfGroup?1:0}),ve.call(z,de,K.nodeEvents).call(O,me,K,re),ve.transition().ease(d.ease).duration(d.duration).call(C).style("opacity",function(Se){return Se.partOfGroup?0:1}),ve.exit().transition().ease(d.ease).duration(d.duration).style("opacity",0).remove();var Ae=ve.selectAll("."+d.cn.nodeRect).data(y);Ae.enter().append("rect").classed(d.cn.nodeRect,!0).call(I),Ae.style("stroke-width",function(Se){return Se.nodeLineWidth}).style("stroke",function(Se){return r.tinyRGB(g(Se.nodeLineColor))}).style("stroke-opacity",function(Se){return r.opacity(Se.nodeLineColor)}).style("fill",function(Se){return Se.tinyColorHue}).style("fill-opacity",function(Se){return Se.tinyColorAlpha}),Ae.transition().ease(d.ease).duration(d.duration).call(I);var ye=ve.selectAll("."+d.cn.nodeLabel).data(y);ye.enter().append("text").classed(d.cn.nodeLabel,!0).style("cursor","default"),ye.attr("data-notex",1).text(function(Se){return Se.node.label}).each(function(Se){var _e=o.select(this);t.font(_e,Se.textFont),T.convertToTspans(_e,re)}).style("text-shadow",T.makeTextShadow(re._fullLayout.paper_bgcolor)).attr("text-anchor",function(Se){return Se.horizontal&&Se.left?"end":"start"}).attr("transform",function(Se){var _e=o.select(this),ze=T.lineCount(_e),Ie=Se.textFont.size*((ze-1)*m-v),Ne=Se.nodeLineWidth/2+b,et=((Se.horizontal?Se.visibleHeight:Se.visibleWidth)-Ie)/2;Se.horizontal&&(Se.left?Ne=-Ne:Ne+=Se.visibleWidth);var st=Se.horizontal?"":"scale(-1,1)"+c(90);return a(Se.horizontal?Ne:et,Se.horizontal?et:Ne)+st}),ye.transition().ease(d.ease).duration(d.duration)}},81128:function(te){te.exports=function(e,A){for(var P=e.cd,o=[],L=P[0].trace,M=L._sankey.graph.nodes,d=0;d<M.length;d++){var g=M[d];if(!g.partOfGroup){var r=[(g.x0+g.x1)/2,(g.y0+g.y1)/2];L.orientation==="v"&&r.reverse(),A&&A.contains(r,!1,d,e)&&o.push({pointNumber:g.pointNumber})}}return o}},20148:function(te,X,e){var A=e(3400);te.exports=function(o,L){for(var M=0;M<o.length;M++)o[M].i=M;A.mergeArray(L.text,o,"tx"),A.mergeArray(L.texttemplate,o,"txt"),A.mergeArray(L.hovertext,o,"htx"),A.mergeArray(L.customdata,o,"data"),A.mergeArray(L.textposition,o,"tp"),L.textfont&&(A.mergeArrayCastPositive(L.textfont.size,o,"ts"),A.mergeArray(L.textfont.color,o,"tc"),A.mergeArray(L.textfont.family,o,"tf"));var d=L.marker;if(d){A.mergeArrayCastPositive(d.size,o,"ms"),A.mergeArrayCastPositive(d.opacity,o,"mo"),A.mergeArray(d.symbol,o,"mx"),A.mergeArray(d.angle,o,"ma"),A.mergeArray(d.standoff,o,"mf"),A.mergeArray(d.color,o,"mc");var g=d.line;d.line&&(A.mergeArray(g.color,o,"mlc"),A.mergeArrayCastPositive(g.width,o,"mlw"));var r=d.gradient;r&&r.type!=="none"&&(A.mergeArray(r.type,o,"mgt"),A.mergeArray(r.color,o,"mgc"))}}},52904:function(te,X,e){var A=e(29736).axisHoverFormat,P=e(21776).Gw,o=e(21776).Ks,L=e(49084),M=e(25376),d=e(98192).u,g=e(98192).c,r=e(43616),t=e(88200),s=e(92880).extendFlat,a=e(98304);function c(y){return{valType:"any",dflt:0,editType:"calc"}}function u(y){return{valType:"any",editType:"calc"}}function l(y){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}te.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:c(),yperiod:c(),xperiod0:u(),yperiod0:u(),xperiodalignment:l(),yperiodalignment:l(),xhoverformat:A("x"),yhoverformat:A("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},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:P({},{}),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:o({},{keys:t.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:s({},d,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},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:a(!0),fillgradient:s({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:g,marker:s({symbol:{valType:"enumerated",values:r.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",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:s({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},L("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"},L("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:M({editType:"calc",colorEditType:"style",arrayOk:!0})}},16356:function(te,X,e){var A=e(38248),P=e(3400),o=e(54460),L=e(1220),M=e(39032).BADNUM,d=e(43028),g=e(90136),r=e(20148),t=e(4500);function s(h,T){var f=h._fullLayout,n=T._xA=o.getFromId(h,T.xaxis||"x","x"),v=T._yA=o.getFromId(h,T.yaxis||"y","y"),m=n.makeCalcdata(T,"x"),b=v.makeCalcdata(T,"y"),E=L(T,n,"x",m),p=L(T,v,"y",b),S=E.vals,w=p.vals,i=T._length,C=new Array(i),x=T.ids,k=y(T,f,n,v),I=!1,B,_,z,O,F,N;u(f,T);var V="x",j="y",$;if(k)P.pushUnique(k.traceIndices,T._expandedIndex),B=k.orientation==="v",B?(j="s",$="x"):(V="s",$="y"),F=k.stackgaps==="interpolate";else{var q=c(T,i);a(h,T,n,v,S,w,q)}var oe=!!T.xperiodalignment,Z=!!T.yperiodalignment;for(_=0;_<i;_++){var G=C[_]={},re=A(S[_]),H=A(w[_]);re&&H?(G[V]=S[_],G[j]=w[_],oe&&(G.orig_x=m[_],G.xEnd=E.ends[_],G.xStart=E.starts[_]),Z&&(G.orig_y=b[_],G.yEnd=p.ends[_],G.yStart=p.starts[_])):k&&(B?re:H)?(G[$]=B?S[_]:w[_],G.gap=!0,F?(G.s=M,I=!0):G.s=0):G[V]=G[j]=M,x&&(G.id=String(x[_]))}if(r(C,T),g(h,T),t(C,T),k){for(_=0;_<C.length;)C[_][$]===M?C.splice(_,1):_++;if(P.sort(C,function(Y,ie){return Y[$]-ie[$]||Y.i-ie.i}),I){for(_=0;_<C.length-1&&C[_].gap;)_++;for(N=C[_].s,N||(N=C[_].s=0),z=0;z<_;z++)C[z].s=N;for(O=C.length-1;O>_&&C[O].gap;)O--;for(N=C[O].s,z=C.length-1;z>O;z--)C[z].s=N;for(;_<O;)if(_++,C[_].gap){for(z=_+1;C[z].gap;)z++;for(var J=C[_-1][$],ae=C[_-1].s,K=(C[z].s-ae)/(C[z][$]-J);_<z;)C[_].s=ae+(C[_][$]-J)*K,_++}}}return C}function a(h,T,f,n,v,m,b){var E=T._length,p=h._fullLayout,S=f._id,w=n._id,i=p._firstScatter[l(T)]===T.uid,C=(y(T,p,f,n)||{}).orientation,x=T.fill;f._minDtick=0,n._minDtick=0;var k={padded:!0},I={padded:!0};b&&(k.ppad=I.ppad=b);var B=E<2||v[0]!==v[E-1]||m[0]!==m[E-1];B&&(x==="tozerox"||x==="tonextx"&&(i||C==="h"))?k.tozero=!0:!(T.error_y||{}).visible&&(x==="tonexty"||x==="tozeroy"||!d.hasMarkers(T)&&!d.hasText(T))&&(k.padded=!1,k.ppad=0),B&&(x==="tozeroy"||x==="tonexty"&&(i||C==="v"))?I.tozero=!0:(x==="tonextx"||x==="tozerox")&&(I.padded=!1),S&&(T._extremes[S]=o.findExtremes(f,v,k)),w&&(T._extremes[w]=o.findExtremes(n,m,I))}function c(h,T){if(d.hasMarkers(h)){var f=h.marker,n=1.6*(h.marker.sizeref||1),v;if(h.marker.sizemode==="area"?v=function(S){return Math.max(Math.sqrt((S||0)/n),3)}:v=function(S){return Math.max((S||0)/n,3)},P.isArrayOrTypedArray(f.size)){var m={type:"linear"};o.setConvert(m);for(var b=m.makeCalcdata(h.marker,"size"),E=new Array(T),p=0;p<T;p++)E[p]=v(b[p]);return E}else return v(f.size)}}function u(h,T){var f=l(T),n=h._firstScatter;n[f]||(n[f]=T.uid)}function l(h){var T=h.stackgroup;return h.xaxis+h.yaxis+h.type+(T?"-"+T:"")}function y(h,T,f,n){var v=h.stackgroup;if(v){var m=T._scatterStackOpts[f._id+n._id][v],b=m.orientation==="v"?n:f;if(b.type==="linear"||b.type==="log")return m}}te.exports={calc:s,calcMarkerSize:c,calcAxisExpansion:a,setFirstScatter:u,getStackOpts:y}},4500:function(te,X,e){var A=e(3400);te.exports=function(o,L){A.isArrayOrTypedArray(L.selectedpoints)&&A.tagSelected(o,L)}},90136:function(te,X,e){var A=e(94288).hasColorscale,P=e(47128),o=e(43028);te.exports=function(M,d){o.hasLines(d)&&A(d,"line")&&P(M,d,{vals:d.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(d)&&(A(d,"marker")&&P(M,d,{vals:d.marker.color,containerStr:"marker",cLetter:"c"}),A(d,"marker.line")&&P(M,d,{vals:d.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},88200:function(te){te.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},96664:function(te,X,e){var A=e(16356),P=e(96376).setGroupPositions;function o(d,g){for(var r=g.xaxis,t=g.yaxis,s=d._fullLayout,a=d._fullData,c=d.calcdata,u=[],l=[],y=0;y<a.length;y++){var h=a[y];h.visible===!0&&h.type==="scatter"&&h.xaxis===r._id&&h.yaxis===t._id&&(h.orientation==="h"?u.push(c[y]):h.orientation==="v"&&l.push(c[y]))}var T={mode:s.scattermode,gap:s.scattergap};P(d,r,t,l,T),P(d,t,r,u,T)}te.exports=function(g,r){g._fullLayout.scattermode==="group"&&o(g,r);var t=r.xaxis,s=r.yaxis,a=t._id+s._id,c=g._fullLayout._scatterStackOpts[a];if(c){var u=g.calcdata,l,y,h,T,f,n,v,m,b,E,p,S,w,i,C;for(var x in c){E=c[x];var k=E.traceIndices;if(k.length){for(p=E.stackgaps==="interpolate",S=E.groupnorm,E.orientation==="v"?(w="x",i="y"):(w="y",i="x"),C=new Array(k.length),l=0;l<C.length;l++)C[l]=!1;n=u[k[0]];var I=new Array(n.length);for(l=0;l<n.length;l++)I[l]=n[l][w];for(l=1;l<k.length;l++){for(f=u[k[l]],y=h=0;y<f.length;y++){for(v=f[y][w];v>I[h]&&h<I.length;h++)L(f,y,I[h],l,C,p,w),y++;if(v!==I[h]){for(T=0;T<l;T++)L(u[k[T]],h,v,T,C,p,w);I.splice(h,0,v)}h++}for(;h<I.length;h++)L(f,y,I[h],l,C,p,w),y++}var B=I.length;for(y=0;y<n.length;y++){for(m=n[y][i]=n[y].s,l=1;l<k.length;l++)f=u[k[l]],f[0].trace._rawLength=f[0].trace._length,f[0].trace._length=B,m+=f[y].s,f[y][i]=m;if(S)for(b=(S==="fraction"?m:m/100)||1,l=0;l<k.length;l++){var _=u[k[l]][y];_[i]/=b,_.sNorm=_.s/b}}for(l=0;l<k.length;l++){f=u[k[l]];var z=f[0].trace,O=A.calcMarkerSize(z,z._rawLength),F=Array.isArray(O);if(O&&C[l]||F){var N=O;for(O=new Array(B),y=0;y<B;y++)O[y]=f[y].gap?0:F?N[f[y].i]:N}var V=new Array(B),j=new Array(B);for(y=0;y<B;y++)V[y]=f[y].x,j[y]=f[y].y;A.calcAxisExpansion(g,z,t,s,V,j,O),f[0].t.orientation=E.orientation}}}}};function L(d,g,r,t,s,a,c){s[t]=!0;var u={i:null,gap:!0,s:0};if(u[c]=r,d.splice(g,0,u),g&&r===d[g-1][c]){var l=d[g-1];u.s=l.s,u.i=l.i,u.gap=l.gap}else a&&(u.s=M(d,g,r,c));g||(d[0].t=d[1].t,d[0].trace=d[1].trace,delete d[1].t,delete d[1].trace)}function M(d,g,r,t){var s=d[g-1],a=d[g+1];return a?s?s.s+(a.s-s.s)*(r-s[t])/(a[t]-s[t]):a.s:s.s}},35036:function(te,X,e){var A=e(3400),P=e(20011),o=e(52904);te.exports=function(M,d){var g,r,t;function s(y){return A.coerce(r._input,r,o,y)}if(d.scattermode==="group")for(t=0;t<M.length;t++)r=M[t],r.type==="scatter"&&(g=r._input,P(g,r,d,s));for(t=0;t<M.length;t++){var a=M[t];if(a.type==="scatter"){var c=a.fill;if(!(c==="none"||c==="toself")&&(a.opacity=void 0,c==="tonexty"||c==="tonextx"))for(var u=t-1;u>=0;u--){var l=M[u];if(l.type==="scatter"&&l.xaxis===a.xaxis&&l.yaxis===a.yaxis){l.opacity=void 0;break}}}}}},18800:function(te,X,e){var A=e(3400),P=e(24040),o=e(52904),L=e(88200),M=e(43028),d=e(43980),g=e(31147),r=e(43912),t=e(74428),s=e(66828),a=e(11731),c=e(124),u=e(70840),l=e(3400).coercePattern;te.exports=function(h,T,f,n){function v(C,x){return A.coerce(h,T,o,C,x)}var m=d(h,T,n,v);if(m||(T.visible=!1),!!T.visible){g(h,T,n,v),v("xhoverformat"),v("yhoverformat");var b=r(h,T,n,v);n.scattermode==="group"&&T.orientation===void 0&&v("orientation","v");var E=!b&&m<L.PTS_LINESONLY?"lines+markers":"lines";v("text"),v("hovertext"),v("mode",E),M.hasMarkers(T)&&t(h,T,f,n,v,{gradient:!0}),M.hasLines(T)&&(s(h,T,f,n,v,{backoff:!0}),a(h,T,v),v("connectgaps"),v("line.simplify")),M.hasText(T)&&(v("texttemplate"),c(h,T,n,v));var p=[];(M.hasMarkers(T)||M.hasText(T))&&(v("cliponaxis"),v("marker.maxdisplayed"),p.push("points")),v("fill",b?b.fillDflt:"none"),T.fill!=="none"&&(u(h,T,f,v,{moduleHasFillgradient:!0}),M.hasLines(T)||a(h,T,v),l(v,"fillpattern",T.fillcolor,!1));var S=(T.line||{}).color,w=(T.marker||{}).color;(T.fill==="tonext"||T.fill==="toself")&&p.push("fills"),v("hoveron",p.join("+")||"points"),T.hoveron!=="fills"&&v("hovertemplate");var i=P.getComponentMethod("errorbars","supplyDefaults");i(h,T,S||w||f,{axis:"y"}),i(h,T,S||w||f,{axis:"x",inherit:"y"}),A.coerceSelectionMarkerOpacity(T,v)}}},98304:function(te){te.exports=function(e){return{valType:"color",editType:"style",anim:!0}}},70840:function(te,X,e){var A=e(76308),P=e(3400).isArrayOrTypedArray;function o(L){for(var M=A.interpolate(L[0][1],L[1][1],.5),d=2;d<L.length;d++){var g=A.interpolate(L[d-1][1],L[d][1],.5);M=A.interpolate(M,g,L[d-1][0]/L[d][0])}return M}te.exports=function(M,d,g,r,t){t||(t={});var s=!1;if(d.marker){var a=d.marker.color,c=(d.marker.line||{}).color;a&&!P(a)?s=a:c&&!P(c)&&(s=c)}var u;if(t.moduleHasFillgradient){var l=r("fillgradient.type");if(l!=="none"){r("fillgradient.start"),r("fillgradient.stop");var y=r("fillgradient.colorscale");y&&(u=o(y))}}r("fillcolor",A.addOpacity((d.line||{}).color||s||u||g,.5))}},76688:function(te,X,e){var A=e(54460);te.exports=function(o,L,M){var d={},g={_fullLayout:M},r=A.getFromTrace(g,L,"x"),t=A.getFromTrace(g,L,"y"),s=o.orig_x;s===void 0&&(s=o.x);var a=o.orig_y;return a===void 0&&(a=o.y),d.xLabel=A.tickText(r,r.c2l(s),!0).text,d.yLabel=A.tickText(t,t.c2l(a),!0).text,d}},44928:function(te,X,e){var A=e(76308),P=e(43028);te.exports=function(L,M){var d,g;if(L.mode==="lines")return d=L.line.color,d&&A.opacity(d)?d:L.fillcolor;if(L.mode==="none")return L.fill?L.fillcolor:"";var r=M.mcc||(L.marker||{}).color,t=M.mlcc||((L.marker||{}).line||{}).color;return g=r&&A.opacity(r)?r:t&&A.opacity(t)&&(M.mlw||((L.marker||{}).line||{}).width)?t:"",g?A.opacity(g)<.3?A.addOpacity(g,.3):g:(d=(L.line||{}).color,d&&A.opacity(d)&&P.hasLines(L)&&L.line.width?d:L.fillcolor)}},20011:function(te,X,e){var A=e(71888).getAxisGroup;te.exports=function(o,L,M,d){var g=L.orientation,r=L[{v:"x",h:"y"}[g]+"axis"],t=A(M,r)+g,s=M._alignmentOpts||{},a=d("alignmentgroup"),c=s[t];c||(c=s[t]={});var u=c[a];u?u.traces.push(L):u=c[a]={traces:[L],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var l=d("offsetgroup"),y=u.offsetGroups,h=y[l];l&&(h||(h=y[l]={offsetIndex:Object.keys(y).length}),L._offsetIndex=h.offsetIndex)}},98723:function(te,X,e){var A=e(3400),P=e(93024),o=e(24040),L=e(44928),M=e(76308),d=A.fillText;te.exports=function(r,t,s,a){var c=r.cd,u=c[0].trace,l=r.xa,y=r.ya,h=l.c2p(t),T=y.c2p(s),f=[h,T],n=u.hoveron||"",v=u.mode.indexOf("markers")!==-1?3:.5,m=!!u.xperiodalignment,b=!!u.yperiodalignment;if(n.indexOf("points")!==-1){var E=function($){if(m){var q=l.c2p($.xStart),oe=l.c2p($.xEnd);return h>=Math.min(q,oe)&&h<=Math.max(q,oe)?0:1/0}var Z=Math.max(3,$.mrc||0),G=1-1/Z,re=Math.abs(l.c2p($.x)-h);return re<Z?G*re/Z:re-Z+G},p=function($){if(b){var q=y.c2p($.yStart),oe=y.c2p($.yEnd);return T>=Math.min(q,oe)&&T<=Math.max(q,oe)?0:1/0}var Z=Math.max(3,$.mrc||0),G=1-1/Z,re=Math.abs(y.c2p($.y)-T);return re<Z?G*re/Z:re-Z+G},S=function($){var q=Math.max(v,$.mrc||0),oe=l.c2p($.x)-h,Z=y.c2p($.y)-T;return Math.max(Math.sqrt(oe*oe+Z*Z)-q,1-v/q)},w=P.getDistanceFunction(a,E,p,S);if(P.getClosest(c,w,r),r.index!==!1){var i=c[r.index],C=l.c2p(i.x,!0),x=y.c2p(i.y,!0),k=i.mrc||1;r.index=i.i;var I=c[0].t.orientation,B=I&&(i.sNorm||i.s),_=I==="h"?B:i.orig_x!==void 0?i.orig_x:i.x,z=I==="v"?B:i.orig_y!==void 0?i.orig_y:i.y;return A.extendFlat(r,{color:L(u,i),x0:C-k,x1:C+k,xLabelVal:_,y0:x-k,y1:x+k,yLabelVal:z,spikeDistance:S(i),hovertemplate:u.hovertemplate}),d(i,u,r),o.getComponentMethod("errorbars","hoverInfo")(i,u,r),[r]}}function O($){if(!$)return!1;var q=$.node();try{var oe=new DOMPoint(f[0],f[1]);return q.isPointInFill(oe)}catch{var Z=q.ownerSVGElement.createSVGPoint();return Z.x=f[0],Z.y=f[1],q.isPointInFill(Z)}}function F($){var q,oe=[],Z=1/0,G=-1/0,re=1/0,H=-1/0,J;for(q=0;q<$.length;q++){var ae=$[q];ae.contains(f)&&(oe.push(ae),re=Math.min(re,ae.ymin),H=Math.max(H,ae.ymax))}if(oe.length===0)return null;re=Math.max(re,0),H=Math.min(H,y._length),J=(re+H)/2;var K,Y,ie,ne,le,de,we;for(q=0;q<oe.length;q++)for(Y=oe[q].pts,K=1;K<Y.length;K++)de=Y[K-1][1],we=Y[K][1],de>J!=we>=J&&(ne=Y[K-1][0],le=Y[K][0],we-de&&(ie=ne+(le-ne)*(J-de)/(we-de),Z=Math.min(Z,ie),G=Math.max(G,ie)));return Z=Math.max(Z,0),G=Math.min(G,l._length),{x0:Z,x1:G,y0:J,y1:J}}if(n.indexOf("fills")!==-1&&u._fillElement){var N=O(u._fillElement)&&!O(u._fillExclusionElement);if(N){var V=F(u._polygons);V===null&&(V={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var j=M.defaultLine;return M.opacity(u.fillcolor)?j=u.fillcolor:M.opacity((u.line||{}).color)&&(j=u.line.color),A.extendFlat(r,{distance:r.maxHoverDistance,x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1,color:j,hovertemplate:!1}),delete r.index,u.text&&!A.isArrayOrTypedArray(u.text)?r.text=String(u.text):r.text=u.name,[r]}}}},65875:function(te,X,e){var A=e(43028);te.exports={hasLines:A.hasLines,hasMarkers:A.hasMarkers,hasText:A.hasText,isBubble:A.isBubble,attributes:e(52904),layoutAttributes:e(55308),supplyDefaults:e(18800),crossTraceDefaults:e(35036),supplyLayoutDefaults:e(59748),calc:e(16356).calc,crossTraceCalc:e(96664),arraysToCalcdata:e(20148),plot:e(96504),colorbar:e(5528),formatLabels:e(76688),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(98723),selectPoints:e(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(te){te.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(te,X,e){var A=e(3400),P=e(55308);te.exports=function(o,L){function M(g,r){return A.coerce(o,L,P,g,r)}var d=L.barmode==="group";L.scattermode==="group"&&M("scattergap",d?L.bargap:.2)}},66828:function(te,X,e){var A=e(3400).isArrayOrTypedArray,P=e(94288).hasColorscale,o=e(27260);te.exports=function(M,d,g,r,t,s){s||(s={});var a=(M.marker||{}).color;if(a&&a._inputArray&&(a=a._inputArray),t("line.color",g),P(M,"line"))o(M,d,r,t,{prefix:"line.",cLetter:"c"});else{var c=(A(a)?!1:a)||g;t("line.color",c)}t("line.width"),s.noDash||t("line.dash"),s.backoff&&t("line.backoff")}},52340:function(te,X,e){var A=e(43616),P=e(39032),o=P.BADNUM,L=P.LOG_CLIP,M=L+.5,d=L-.5,g=e(3400),r=g.segmentsIntersect,t=g.constrain,s=e(88200);te.exports=function(c,u){var l=u.trace||{},y=u.xaxis,h=u.yaxis,T=y.type==="log",f=h.type==="log",n=y._length,v=h._length,m=u.backoff,b=l.marker,E=u.connectGaps,p=u.baseTolerance,S=u.shape,w=S==="linear",i=l.fill&&l.fill!=="none",C=[],x=s.minTolerance,k=c.length,I=new Array(k),B=0,_,z,O,F,N,V,j,$,q,oe,Z,G,re,H,J,ae;function K(at){var ut=c[at];if(!ut)return!1;var Nt=u.linearized?y.l2p(ut.x):y.c2p(ut.x),Vt=u.linearized?h.l2p(ut.y):h.c2p(ut.y);if(Nt===o){if(T&&(Nt=y.c2p(ut.x,!0)),Nt===o)return!1;f&&Vt===o&&(Nt*=Math.abs(y._m*v*(y._m>0?M:d)/(h._m*n*(h._m>0?M:d)))),Nt*=1e3}if(Vt===o){if(f&&(Vt=h.c2p(ut.y,!0)),Vt===o)return!1;Vt*=1e3}return[Nt,Vt]}function Y(at,ut,Nt,Vt){var gt=Nt-at,Ct=Vt-ut,Yt=.5-at,gr=.5-ut,ht=gt*gt+Ct*Ct,Ht=gt*Yt+Ct*gr;if(Ht>0&&Ht<ht){var Wt=Yt*Ct-gr*gt;if(Wt*Wt<ht)return!0}}var ie,ne;function le(at,ut){var Nt=at[0]/n,Vt=at[1]/v,gt=Math.max(0,-Nt,Nt-1,-Vt,Vt-1);return gt&&ie!==void 0&&Y(Nt,Vt,ie,ne)&&(gt=0),gt&&ut&&Y(Nt,Vt,ut[0]/n,ut[1]/v)&&(gt=0),(1+s.toleranceGrowth*gt)*p}function de(at,ut){var Nt=at[0]-ut[0],Vt=at[1]-ut[1];return Math.sqrt(Nt*Nt+Vt*Vt)}var we=s.maxScreensAway,me=-n*we,Le=n*(1+we),ve=-v*we,Ae=v*(1+we),ye=[[me,ve,Le,ve],[Le,ve,Le,Ae],[Le,Ae,me,Ae],[me,Ae,me,ve]],Se,_e,ze,Ie,Ne,et;function st(at,ut){for(var Nt=[],Vt=0,gt=0;gt<4;gt++){var Ct=ye[gt],Yt=r(at[0],at[1],ut[0],ut[1],Ct[0],Ct[1],Ct[2],Ct[3]);Yt&&(!Vt||Math.abs(Yt.x-Nt[0][0])>1||Math.abs(Yt.y-Nt[0][1])>1)&&(Yt=[Yt.x,Yt.y],Vt&&de(Yt,at)<de(Nt[0],at)?Nt.unshift(Yt):Nt.push(Yt),Vt++)}return Nt}function Ze(at){if(at[0]<me||at[0]>Le||at[1]<ve||at[1]>Ae)return[t(at[0],me,Le),t(at[1],ve,Ae)]}function Ke(at,ut){if(at[0]===ut[0]&&(at[0]===me||at[0]===Le)||at[1]===ut[1]&&(at[1]===ve||at[1]===Ae))return!0}function nt(at,ut){var Nt=[],Vt=Ze(at),gt=Ze(ut);return Vt&&gt&&Ke(Vt,gt)||(Vt&&Nt.push(Vt),gt&&Nt.push(gt)),Nt}function it(at,ut,Nt){return function(Vt,gt){var Ct=Ze(Vt),Yt=Ze(gt),gr=[];if(Ct&&Yt&&Ke(Ct,Yt))return gr;Ct&&gr.push(Ct),Yt&&gr.push(Yt);var ht=2*g.constrain((Vt[at]+gt[at])/2,ut,Nt)-((Ct||Vt)[at]+(Yt||gt)[at]);if(ht){var Ht;Ct&&Yt?Ht=ht>0==Ct[at]>Yt[at]?Ct:Yt:Ht=Ct||Yt,Ht[at]+=ht}return gr}}var lt;S==="linear"||S==="spline"?lt=st:S==="hv"||S==="vh"?lt=nt:S==="hvh"?lt=it(0,me,Le):S==="vhv"&&(lt=it(1,ve,Ae));function vt(at,ut){var Nt=ut[0]-at[0],Vt=(ut[1]-at[1])/Nt,gt=(at[1]*ut[0]-ut[1]*at[0])/Nt;return gt>0?[Vt>0?me:Le,Ae]:[Vt>0?Le:me,ve]}function xt(at){var ut=at[0],Nt=at[1],Vt=ut===I[B-1][0],gt=Nt===I[B-1][1];if(!(Vt&&gt))if(B>1){var Ct=ut===I[B-2][0],Yt=Nt===I[B-2][1];Vt&&(ut===me||ut===Le)&&Ct?Yt?B--:I[B-1]=at:gt&&(Nt===ve||Nt===Ae)&&Yt?Ct?B--:I[B-1]=at:I[B++]=at}else I[B++]=at}function Je(at){I[B-1][0]!==at[0]&&I[B-1][1]!==at[1]&&xt([ze,Ie]),xt(at),Ne=null,ze=Ie=0}var Pe=g.isArrayOrTypedArray(b);function Ue(at){if(at&&m&&(at.i=_,at.d=c,at.trace=l,at.marker=Pe?b[at.i]:b,at.backoff=m),ie=at[0]/n,ne=at[1]/v,Se=at[0]<me?me:at[0]>Le?Le:0,_e=at[1]<ve?ve:at[1]>Ae?Ae:0,Se||_e){if(!B)I[B++]=[Se||at[0],_e||at[1]];else if(Ne){var ut=lt(Ne,at);ut.length>1&&(Je(ut[0]),I[B++]=ut[1])}else et=lt(I[B-1],at)[0],I[B++]=et;var Nt=I[B-1];Se&&_e&&(Nt[0]!==Se||Nt[1]!==_e)?(Ne&&(ze!==Se&&Ie!==_e?xt(ze&&Ie?vt(Ne,at):[ze||Se,Ie||_e]):ze&&Ie&&xt([ze,Ie])),xt([Se,_e])):ze-Se&&Ie-_e&&xt([Se||ze,_e||Ie]),Ne=at,ze=Se,Ie=_e}else Ne&&Je(lt(Ne,at)[0]),I[B++]=at}for(_=0;_<k;_++)if(z=K(_),!!z){for(B=0,Ne=null,Ue(z),_++;_<k;_++){if(F=K(_),!F){if(E)continue;break}if(!w||!u.simplify){Ue(F);continue}var He=K(_+1);if(oe=de(F,z),!(!(i&&(B===0||B===k-1))&&oe<le(F,He)*x)){for($=[(F[0]-z[0])/oe,(F[1]-z[1])/oe],N=z,Z=oe,G=H=J=0,j=!1,O=F,_++;_<c.length;_++){if(V=He,He=K(_+1),!V){if(E)continue;break}if(q=[V[0]-z[0],V[1]-z[1]],ae=q[0]*$[1]-q[1]*$[0],H=Math.min(H,ae),J=Math.max(J,ae),J-H>le(V,He))break;O=V,re=q[0]*$[0]+q[1]*$[1],re>Z?(Z=re,F=V,j=!1):re<G&&(G=re,N=V,j=!0)}if(j?(Ue(F),O!==N&&Ue(N)):(N!==z&&Ue(N),O!==F&&Ue(F)),Ue(O),_>=c.length||!V)break;Ue(V),z=V}}Ne&&xt([ze||Ne[0],Ie||Ne[1]]),C.push(I.slice(0,B))}var Oe=S.slice(S.length-1);if(m&&Oe!=="h"&&Oe!=="v"){for(var Ce=!1,ge=-1,pe=[],Te=0;Te<C.length;Te++)for(var be=0;be<C[Te].length-1;be++){var ke=C[Te][be],Ve=C[Te][be+1],je=A.applyBackoff(Ve,ke);(je[0]!==Ve[0]||je[1]!==Ve[1])&&(Ce=!0),pe[ge+1]||(ge++,pe[ge]=[ke,[je[0],je[1]]])}return Ce?pe:C}return C}},11731:function(te){te.exports=function(e,A,P){var o=P("line.shape");o==="spline"&&P("line.smoothing")}},14328:function(te){var X={tonextx:1,tonexty:1,tonext:1};te.exports=function(A,P,o){var L,M,d,g,r,t={},s=!1,a=-1,c=0,u=-1;for(M=0;M<o.length;M++)L=o[M][0].trace,d=L.stackgroup||"",d?d in t?r=t[d]:(r=t[d]=c,c++):L.fill in X&&u>=0?r=u:(r=u=c,c++),r<a&&(s=!0),L._groupIndex=a=r;var l=o.slice();s&&l.sort(function(h,T){var f=h[0].trace,n=T[0].trace;return f._groupIndex-n._groupIndex||f.index-n.index});var y={};for(M=0;M<l.length;M++)L=l[M][0].trace,d=L.stackgroup||"",L.visible===!0?(L._nexttrace=null,L.fill in X&&(g=y[d],L._prevtrace=g||null,g&&(g._nexttrace=L)),L._ownfill=L.fill&&(L.fill.substr(0,6)==="tozero"||L.fill==="toself"||L.fill.substr(0,2)==="to"&&!L._prevtrace),y[d]=L):L._prevtrace=L._nexttrace=L._ownfill=null;return l}},7152:function(te,X,e){var A=e(38248);te.exports=function(o,L){L||(L=2);var M=o.marker,d=M.sizeref||1,g=M.sizemin||0,r=M.sizemode==="area"?function(t){return Math.sqrt(t/d)}:function(t){return t/d};return function(t){var s=r(t/L);return A(s)&&s>0?Math.max(s,g):0}}},5528:function(te){te.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(te,X,e){var A=e(76308),P=e(94288).hasColorscale,o=e(27260),L=e(43028);te.exports=function(d,g,r,t,s,a){var c=L.isBubble(d),u=(d.line||{}).color,l;if(a=a||{},u&&(r=u),s("marker.symbol"),s("marker.opacity",c?.7:1),s("marker.size"),a.noAngle||(s("marker.angle"),a.noAngleRef||s("marker.angleref"),a.noStandOff||s("marker.standoff")),s("marker.color",r),P(d,"marker")&&o(d,g,t,s,{prefix:"marker.",cLetter:"c"}),a.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),a.noLine||(u&&!Array.isArray(u)&&g.marker.color!==u?l=u:c?l=A.background:l=A.defaultLine,s("marker.line.color",l),P(d,"marker.line")&&o(d,g,t,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",c?1:0)),c&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),a.gradient){var y=s("marker.gradient.type");y!=="none"&&s("marker.gradient.color")}}},31147:function(te,X,e){var A=e(3400).dateTick0,P=e(39032),o=P.ONEWEEK;function L(M,d){return M%o===0?A(d,1):A(d,0)}te.exports=function(d,g,r,t,s){if(s||(s={x:!0,y:!0}),s.x){var a=t("xperiod");a&&(t("xperiod0",L(a,g.xcalendar)),t("xperiodalignment"))}if(s.y){var c=t("yperiod");c&&(t("yperiod0",L(c,g.ycalendar)),t("yperiodalignment"))}}},96504:function(te,X,e){var A=e(33428),P=e(24040),o=e(3400),L=o.ensureSingle,M=o.identity,d=e(43616),g=e(43028),r=e(52340),t=e(14328),s=e(92065).tester;te.exports=function(y,h,T,f,n,v){var m,b,E=!n,p=!!n&&n.duration>0,S=t(y,h,T);if(m=f.selectAll("g.trace").data(S,function(i){return i[0].trace.uid}),m.enter().append("g").attr("class",function(i){return"trace scatter trace"+i[0].trace.uid}).style("stroke-miterlimit",2),m.order(),a(y,m,h),p){v&&(b=v());var w=A.transition().duration(n.duration).ease(n.easing).each("end",function(){b&&b()}).each("interrupt",function(){b&&b()});w.each(function(){f.selectAll("g.trace").each(function(i,C){c(y,C,h,i,S,this,n)})})}else m.each(function(i,C){c(y,C,h,i,S,this,n)});E&&m.exit().remove(),f.selectAll("path:not([d])").remove()};function a(l,y,h){y.each(function(T){var f=L(A.select(this),"g","fills");d.setClipUrl(f,h.layerClipId,l);var n=T[0].trace,v=[];n._ownfill&&v.push("_ownFill"),n._nexttrace&&v.push("_nextFill");var m=f.selectAll("g").data(v,M);m.enter().append("g"),m.exit().each(function(b){n[b]=null}).remove(),m.order().each(function(b){n[b]=L(A.select(this),"path","js-fill")})})}function c(l,y,h,T,f,n,v){var m=l._context.staticPlot,b;u(l,y,h,T,f);var E=!!v&&v.duration>0;function p(xt){return E?xt.transition():xt}var S=h.xaxis,w=h.yaxis,i=T[0].trace,C=i.line,x=A.select(n),k=L(x,"g","errorbars"),I=L(x,"g","lines"),B=L(x,"g","points"),_=L(x,"g","text");if(P.getComponentMethod("errorbars","plot")(l,k,h,v),i.visible!==!0)return;p(x).style("opacity",i.opacity);var z,O,F=i.fill.charAt(i.fill.length-1);F!=="x"&&F!=="y"&&(F="");var N,V;F==="y"?(N=1,V=w.c2p(0,!0)):F==="x"&&(N=0,V=S.c2p(0,!0)),T[0][h.isRangePlot?"nodeRangePlot3":"node3"]=x;var j="",$=[],q=i._prevtrace,oe=null,Z=null;q&&(j=q._prevRevpath||"",O=q._nextFill,$=q._ownPolygons,oe=q._fillsegments,Z=q._fillElement);var G,re,H="",J="",ae,K,Y,ie,ne,le,de=[];i._polygons=[];var we=[],me=[],Le=o.noop;if(z=i._ownFill,g.hasLines(i)||i.fill!=="none"){O&&O.datum(T),["hv","vh","hvh","vhv"].indexOf(C.shape)!==-1?(ae=d.steps(C.shape),K=d.steps(C.shape.split("").reverse().join(""))):C.shape==="spline"?ae=K=function(xt){var Je=xt[xt.length-1];return xt.length>1&&xt[0][0]===Je[0]&&xt[0][1]===Je[1]?d.smoothclosed(xt.slice(1),C.smoothing):d.smoothopen(xt,C.smoothing)}:ae=K=function(xt){return"M"+xt.join("L")},Y=function(xt){return K(xt.reverse())},me=r(T,{xaxis:S,yaxis:w,trace:i,connectGaps:i.connectgaps,baseTolerance:Math.max(C.width||1,3)/4,shape:C.shape,backoff:C.backoff,simplify:C.simplify,fill:i.fill}),we=new Array(me.length);var ve=0;for(b=0;b<me.length;b++){var Ae,ye=me[b];!Ae||!F?(Ae=ye.slice(),we[ve]=Ae,ve++):Ae.push.apply(Ae,ye)}i._fillElement=null,i._fillExclusionElement=Z,i._fillsegments=we.slice(0,ve),we=i._fillsegments,me.length&&(ie=me[0][0].slice(),ne=me[me.length-1],le=ne[ne.length-1].slice()),Le=function(xt){return function(Je){if(G=ae(Je),re=Y(Je),H?F?(H+="L"+G.substr(1),J=re+("L"+J.substr(1))):(H+="Z"+G,J=re+"Z"+J):(H=G,J=re),g.hasLines(i)){var Pe=A.select(this);if(Pe.datum(T),xt)p(Pe.style("opacity",0).attr("d",G).call(d.lineGroupStyle)).style("opacity",1);else{var Ue=p(Pe);Ue.attr("d",G),d.singleLineStyle(T,Ue)}}}}}var Se=I.selectAll(".js-line").data(me);p(Se.exit()).style("opacity",0).remove(),Se.each(Le(!1)),Se.enter().append("path").classed("js-line",!0).style("vector-effect",m?"none":"non-scaling-stroke").call(d.lineGroupStyle).each(Le(!0)),d.setClipUrl(Se,h.layerClipId,l);function _e(xt){p(xt).attr("d","M0,0Z")}var ze=function(){var xt=new Array(we.length);for(b=0;b<we.length;b++)xt[b]=s(we[b]);return xt},Ie=function(xt){var Je,Pe;if(!xt||xt.length===0)for(Je=new Array(we.length),Pe=0;Pe<we.length;Pe++){var Ue=we[Pe][0].slice(),He=we[Pe][we[Pe].length-1].slice();Ue[N]=He[N]=V;var Oe=[He,Ue],Ce=Oe.concat(we[Pe]);Je[Pe]=s(Ce)}else{for(Je=new Array(xt.length-1+we.length),Pe=0;Pe<xt.length-1;Pe++)Je[Pe]=s(xt[Pe]);var ge=xt[xt.length-1].slice();for(ge.reverse(),Pe=0;Pe<we.length;Pe++)Je[xt.length-1+Pe]=s(we[Pe].concat(ge))}return Je};me.length?(z?(z.datum(T),ie&&le&&(F?(ie[N]=le[N]=V,p(z).attr("d","M"+le+"L"+ie+"L"+H.substr(1)).call(d.singleFillStyle,l),de=Ie(null)):(p(z).attr("d",H+"Z").call(d.singleFillStyle,l),de=ze())),i._polygons=de,i._fillElement=z):O&&(i.fill.substr(0,6)==="tonext"&&H&&j?(i.fill==="tonext"?(p(O).attr("d",H+"Z"+j+"Z").call(d.singleFillStyle,l),de=ze(),i._polygons=de.concat($)):(p(O).attr("d",H+"L"+j.substr(1)+"Z").call(d.singleFillStyle,l),de=Ie(oe),i._polygons=de),i._fillElement=O):_e(O)),i._prevRevpath=J):(z?_e(z):O&&_e(O),i._prevRevpath=null),i._ownPolygons=de;function Ne(xt){return xt.filter(function(Je){return!Je.gap&&Je.vis})}function et(xt){return xt.filter(function(Je){return Je.vis})}function st(xt){return xt.filter(function(Je){return!Je.gap})}function Ze(xt){return xt.id}function Ke(xt){if(xt.ids)return Ze}function nt(){return!1}function it(xt,Je,Pe){var Ue,He,Oe,Ce=Pe[0].trace,ge=g.hasMarkers(Ce),pe=g.hasText(Ce),Te=Ke(Ce),be=nt,ke=nt;if(ge||pe){var Ve=M,je=Ce.stackgroup,at=je&&l._fullLayout._scatterStackOpts[S._id+w._id][je].stackgaps==="infer zero";Ce.marker.maxdisplayed||Ce._needsCull?Ve=at?et:Ne:je&&!at&&(Ve=st),ge&&(be=Ve),pe&&(ke=Ve)}He=xt.selectAll("path.point"),Ue=He.data(be,Te);var ut=Ue.enter().append("path").classed("point",!0);E&&ut.call(d.pointStyle,Ce,l).call(d.translatePoints,S,w).style("opacity",0).transition().style("opacity",1),Ue.order();var Nt;ge&&(Nt=d.makePointStyleFns(Ce)),Ue.each(function(Vt){var gt=A.select(this),Ct=p(gt);Oe=d.translatePoint(Vt,Ct,S,w),Oe?(d.singlePointStyle(Vt,Ct,Ce,Nt,l),h.layerClipId&&d.hideOutsideRangePoint(Vt,Ct,S,w,Ce.xcalendar,Ce.ycalendar),Ce.customdata&&gt.classed("plotly-customdata",Vt.data!==null&&Vt.data!==void 0)):Ct.remove()}),E?Ue.exit().transition().style("opacity",0).remove():Ue.exit().remove(),He=Je.selectAll("g"),Ue=He.data(ke,Te),Ue.enter().append("g").classed("textpoint",!0).append("text"),Ue.order(),Ue.each(function(Vt){var gt=A.select(this),Ct=p(gt.select("text"));Oe=d.translatePoint(Vt,Ct,S,w),Oe?h.layerClipId&&d.hideOutsideRangePoint(Vt,gt,S,w,Ce.xcalendar,Ce.ycalendar):gt.remove()}),Ue.selectAll("text").call(d.textPointStyle,Ce,l).each(function(Vt){var gt=S.c2p(Vt.x),Ct=w.c2p(Vt.y);A.select(this).selectAll("tspan.line").each(function(){p(A.select(this)).attr({x:gt,y:Ct})})}),Ue.exit().remove()}B.datum(T),_.datum(T),it(B,_,T);var lt=i.cliponaxis===!1,vt=lt?null:h.layerClipId;d.setClipUrl(B,vt,l),d.setClipUrl(_,vt,l)}function u(l,y,h,T,f){var n=h.xaxis,v=h.yaxis,m=A.extent(o.simpleMap(n.range,n.r2c)),b=A.extent(o.simpleMap(v.range,v.r2c)),E=T[0].trace;if(g.hasMarkers(E)){var p=E.marker.maxdisplayed;if(p!==0){var S=T.filter(function(x){return x.x>=m[0]&&x.x<=m[1]&&x.y>=b[0]&&x.y<=b[1]}),w=Math.ceil(S.length/p),i=0;f.forEach(function(x,k){var I=x[0].trace;g.hasMarkers(I)&&I.marker.maxdisplayed>0&&k<y&&i++});var C=Math.round(i*w/3+Math.floor(i/3)*w/7.1);T.forEach(function(x){delete x.vis}),S.forEach(function(x,k){Math.round((k+C)%w)===0&&(x.vis=!0)})}}}},91560:function(te,X,e){var A=e(43028);te.exports=function(o,L){var M=o.cd,d=o.xaxis,g=o.yaxis,r=[],t=M[0].trace,s,a,c,u,l=!A.hasMarkers(t)&&!A.hasText(t);if(l)return[];if(L===!1)for(s=0;s<M.length;s++)M[s].selected=0;else for(s=0;s<M.length;s++)a=M[s],c=d.c2p(a.x),u=g.c2p(a.y),a.i!==null&&L.contains([c,u],!1,s,o)?(r.push({pointNumber:a.i,x:d.c2d(a.x),y:g.c2d(a.y)}),a.selected=1):a.selected=0;return r}},43912:function(te){var X=["orientation","groupnorm","stackgaps"];te.exports=function(A,P,o,L){var M=o._scatterStackOpts,d=L("stackgroup");if(d){var g=P.xaxis+P.yaxis,r=M[g];r||(r=M[g]={});var t=r[d],s=!1;t?t.traces.push(P):(t=r[d]={traceIndices:[],traces:[P]},s=!0);for(var a={orientation:P.x&&!P.y?"h":"v"},c=0;c<X.length;c++){var u=X[c],l=u+"Found";if(!t[l]){var y=A[u]!==void 0,h=u==="orientation";if((y||s)&&(t[u]=L(u,a[u]),h&&(t.fillDflt=t[u]==="h"?"tonextx":"tonexty"),y&&(t[l]=!0,!s&&(delete t.traces[0][u],h))))for(var T=0;T<t.traces.length-1;T++){var f=t.traces[T];f._input.fill!==f.fill&&(f.fill=t.fillDflt)}}}return t}}},49224:function(te,X,e){var A=e(33428),P=e(43616),o=e(24040);function L(r){var t=A.select(r).selectAll("g.trace.scatter");t.style("opacity",function(s){return s[0].trace.opacity}),t.selectAll("g.points").each(function(s){var a=A.select(this),c=s.trace||s[0].trace;M(a,c,r)}),t.selectAll("g.text").each(function(s){var a=A.select(this),c=s.trace||s[0].trace;d(a,c,r)}),t.selectAll("g.trace path.js-line").call(P.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(P.fillGroupStyle,r,!1),o.getComponentMethod("errorbars","style")(t)}function M(r,t,s){P.pointStyle(r.selectAll("path.point"),t,s)}function d(r,t,s){P.textPointStyle(r.selectAll("text"),t,s)}function g(r,t,s){var a=t[0].trace;a.selectedpoints?(P.selectedPointStyle(s.selectAll("path.point"),a),P.selectedTextStyle(s.selectAll("text"),a)):(M(s,a,r),d(s,a,r))}te.exports={style:L,stylePoints:M,styleText:d,styleOnSelect:g}},43028:function(te,X,e){var A=e(3400),P=e(38116).isTypedArraySpec;te.exports={hasLines:function(o){return o.visible&&o.mode&&o.mode.indexOf("lines")!==-1},hasMarkers:function(o){return o.visible&&(o.mode&&o.mode.indexOf("markers")!==-1||o.type==="splom")},hasText:function(o){return o.visible&&o.mode&&o.mode.indexOf("text")!==-1},isBubble:function(o){var L=o.marker;return A.isPlainObject(L)&&(A.isArrayOrTypedArray(L.size)||P(L.size))}}},124:function(te,X,e){var A=e(3400);te.exports=function(P,o,L,M,d){d=d||{},M("textposition"),A.coerceFont(M,"textfont",d.font||L.font),d.noSelect||(M("selected.textfont.color"),M("unselected.textfont.color"))}},43980:function(te,X,e){var A=e(3400),P=e(24040);te.exports=function(L,M,d,g){var r=g("x"),t=g("y"),s,a=P.getComponentMethod("calendars","handleTraceDefaults");if(a(L,M,["x","y"],d),r){var c=A.minRowLength(r);t?s=Math.min(c,A.minRowLength(t)):(s=c,g("y0"),g("dy"))}else{if(!t)return 0;s=A.minRowLength(t),g("x0"),g("dx")}return M._length=s,s}},91592:function(te,X,e){var A=e(52904),P=e(49084),o=e(29736).axisHoverFormat,L=e(21776).Ks,M=e(21776).Gw,d=e(45464),g=e(99168),r=e(87792),t=e(92880).extendFlat,s=e(67824).overrideAll,a=e(95376),c=A.line,u=A.marker,l=u.line,y=t({width:c.width,dash:{valType:"enumerated",values:a(g),dflt:"solid"}},P("line"));function h(f){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:.6666666666666666}}}var T=te.exports=s({x:A.x,y:A.y,z:{valType:"data_array"},text:t({},A.text,{}),texttemplate:M({},{}),hovertext:t({},A.hovertext,{}),hovertemplate:L(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),mode:t({},A.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:h(),y:h(),z:h()},connectgaps:A.connectgaps,line:y,marker:t({symbol:{valType:"enumerated",values:a(r),dflt:"circle",arrayOk:!0},size:t({},u.size,{dflt:8}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:t({},u.opacity,{arrayOk:!1}),colorbar:u.colorbar,line:t({width:t({},l.width,{arrayOk:!1})},P("marker.line"))},P("marker")),textposition:t({},A.textposition,{dflt:"top center"}),textfont:{color:A.textfont.color,size:A.textfont.size,family:t({},A.textfont.family,{arrayOk:!1})},opacity:d.opacity,hoverinfo:t({},d.hoverinfo)},"calc","nested");T.x.editType=T.y.editType=T.z.editType="calc+clearAxisTypes"},41484:function(te,X,e){var A=e(20148),P=e(90136);te.exports=function(L,M){var d=[{x:!1,y:!1,trace:M,t:{}}];return A(d,M),P(L,M),d}},45156:function(te,X,e){var A=e(24040);function P(M,d,g,r){if(!d||!d.visible)return null;for(var t=A.getComponentMethod("errorbars","makeComputeError")(d),s=new Array(M.length),a=0;a<M.length;a++){var c=t(+M[a],a);if(r.type==="log"){var u=r.c2l(M[a]),l=M[a]-c[0],y=M[a]+c[1];if(s[a]=[(r.c2l(l,!0)-u)*g,(r.c2l(y,!0)-u)*g],l>0){var h=r.c2l(l);r._lowerLogErrorBound||(r._lowerLogErrorBound=h),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,h)}}else s[a]=[-c[0]*g,c[1]*g]}return s}function o(M){for(var d=0;d<M.length;d++)if(M[d])return M[d].length;return 0}function L(M,d,g){var r=[P(M.x,M.error_x,d[0],g.xaxis),P(M.y,M.error_y,d[1],g.yaxis),P(M.z,M.error_z,d[2],g.zaxis)],t=o(r);if(t===0)return null;for(var s=new Array(t),a=0;a<t;a++){for(var c=[[0,0,0],[0,0,0]],u=0;u<3;u++)if(r[u])for(var l=0;l<2;l++)c[l][u]=r[u][a][l];s[a]=c}return s}te.exports=L},41064:function(te,X,e){var A=e(67792).gl_line3d,P=e(67792).gl_scatter3d,o=e(67792).gl_error3d,L=e(67792).gl_mesh3d,M=e(67792).delaunay_triangulate,d=e(3400),g=e(43080),r=e(33040).formatColor,t=e(7152),s=e(99168),a=e(87792),c=e(54460),u=e(10624).appendArrayPointValue,l=e(45156);function y(x,k){this.scene=x,this.uid=k,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=y.prototype;h.handlePick=function(x){if(x.object&&(x.object===this.linePlot||x.object===this.delaunayMesh||x.object===this.textMarkers||x.object===this.scatterPlot)){var k=x.index=x.data.index;return x.object.highlight&&x.object.highlight(null),this.scatterPlot&&(x.object=this.scatterPlot,this.scatterPlot.highlight(x.data)),x.textLabel="",this.textLabels&&(d.isArrayOrTypedArray(this.textLabels)?(this.textLabels[k]||this.textLabels[k]===0)&&(x.textLabel=this.textLabels[k]):x.textLabel=this.textLabels),x.traceCoordinate=[this.data.x[k],this.data.y[k],this.data.z[k]],!0}};function T(x,k,I){var B=(I+1)%3,_=(I+2)%3,z=[],O=[],F;for(F=0;F<x.length;++F){var N=x[F];isNaN(N[B])||!isFinite(N[B])||isNaN(N[_])||!isFinite(N[_])||(z.push([N[B],N[_]]),O.push(F))}var V=M(z);for(F=0;F<V.length;++F)for(var j=V[F],$=0;$<j.length;++$)j[$]=O[j[$]];return{positions:x,cells:V,meshColor:k}}function f(x){for(var k=[0,0,0],I=[[0,0,0],[0,0,0],[0,0,0]],B=[1,1,1],_=0;_<3;_++){var z=x[_];z&&z.copy_zstyle!==!1&&x[2].visible!==!1&&(z=x[2]),!(!z||!z.visible)&&(k[_]=z.width/2,I[_]=g(z.color),B[_]=z.thickness)}return{capSize:k,color:I,lineWidth:B}}function n(x){return x==null?0:x.indexOf("left")>-1?-1:x.indexOf("right")>-1?1:0}function v(x){return x==null?0:x.indexOf("top")>-1?-1:x.indexOf("bottom")>-1?1:0}function m(x){var k=0,I=0,B=[k,I];if(Array.isArray(x))for(var _=0;_<x.length;_++)B[_]=[k,I],x[_]&&(B[_][0]=n(x[_]),B[_][1]=v(x[_]));else B[0]=n(x),B[1]=v(x);return B}function b(x,k){return k(x*4)}function E(x){return a[x]}function p(x,k,I,B,_){var z=null;if(d.isArrayOrTypedArray(x)){z=[];for(var O=0;O<k;O++)x[O]===void 0?z[O]=B:z[O]=I(x[O],_)}else z=I(x,d.identity);return z}function S(x,k){var I=[],B=x.fullSceneLayout,_=x.dataScale,z=B.xaxis,O=B.yaxis,F=B.zaxis,N=k.marker,V=k.line,j=k.x||[],$=k.y||[],q=k.z||[],oe=j.length,Z=k.xcalendar,G=k.ycalendar,re=k.zcalendar,H,J,ae,K,Y,ie;for(Y=0;Y<oe;Y++)H=z.d2l(j[Y],0,Z)*_[0],J=O.d2l($[Y],0,G)*_[1],ae=F.d2l(q[Y],0,re)*_[2],I[Y]=[H,J,ae];if(Array.isArray(k.text))ie=k.text;else if(d.isTypedArray(k.text))ie=Array.from(k.text);else if(k.text!==void 0)for(ie=new Array(oe),Y=0;Y<oe;Y++)ie[Y]=k.text;function ne(st,Ze){var Ke=B[st];return c.tickText(Ke,Ke.d2l(Ze),!0).text}var le=k.texttemplate;if(le){var de=x.fullLayout,we=de._d3locale,me=Array.isArray(le),Le=me?Math.min(le.length,oe):oe,ve=me?function(st){return le[st]}:function(){return le};for(ie=new Array(Le),Y=0;Y<Le;Y++){var Ae={x:j[Y],y:$[Y],z:q[Y]},ye={xLabel:ne("xaxis",j[Y]),yLabel:ne("yaxis",$[Y]),zLabel:ne("zaxis",q[Y])},Se={};u(Se,k,Y);var _e=k._meta||{};ie[Y]=d.texttemplateString(ve(Y),ye,we,Se,Ae,_e)}}if(K={position:I,mode:k.mode,text:ie},"line"in k&&(K.lineColor=r(V,1,oe),K.lineWidth=V.width,K.lineDashes=V.dash),"marker"in k){var ze=t(k);K.scatterColor=r(N,1,oe),K.scatterSize=p(N.size,oe,b,20,ze),K.scatterMarker=p(N.symbol,oe,E,"●"),K.scatterLineWidth=N.line.width,K.scatterLineColor=r(N.line,1,oe),K.scatterAngle=0}"textposition"in k&&(K.textOffset=m(k.textposition),K.textColor=r(k.textfont,1,oe),K.textSize=p(k.textfont.size,oe,d.identity,12),K.textFont=k.textfont.family,K.textAngle=0);var Ie=["x","y","z"];for(K.project=[!1,!1,!1],K.projectScale=[1,1,1],K.projectOpacity=[1,1,1],Y=0;Y<3;++Y){var Ne=k.projection[Ie[Y]];(K.project[Y]=Ne.show)&&(K.projectOpacity[Y]=Ne.opacity,K.projectScale[Y]=Ne.scale)}K.errorBounds=l(k,_,B);var et=f([k.error_x,k.error_y,k.error_z]);return K.errorColor=et.color,K.errorLineWidth=et.lineWidth,K.errorCapSize=et.capSize,K.delaunayAxis=k.surfaceaxis,K.delaunayColor=g(k.surfacecolor),K}function w(x){if(d.isArrayOrTypedArray(x)){var k=x[0];return d.isArrayOrTypedArray(k)&&(x=k),"rgb("+x.slice(0,3).map(function(I){return Math.round(I*255)})+")"}return null}function i(x){return d.isArrayOrTypedArray(x)?x.length===4&&typeof x[0]=="number"?w(x):x.map(w):null}h.update=function(x){var k=this.scene.glplot.gl,I,B,_,z,O=s.solid;this.data=x;var F=S(this.scene,x);"mode"in F&&(this.mode=F.mode),"lineDashes"in F&&F.lineDashes in s&&(O=s[F.lineDashes]),this.color=i(F.scatterColor)||i(F.lineColor),this.dataPoints=F.position,I={gl:this.scene.glplot.gl,position:F.position,color:F.lineColor,lineWidth:F.lineWidth||1,dashes:O[0],dashScale:O[1],opacity:x.opacity,connectGaps:x.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(I):(this.linePlot=A(I),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 N=x.opacity;if(x.marker&&x.marker.opacity!==void 0&&(N*=x.marker.opacity),B={gl:this.scene.glplot.gl,position:F.position,color:F.scatterColor,size:F.scatterSize,glyph:F.scatterMarker,opacity:N,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(B):(this.scatterPlot=P(B),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),z={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:x.opacity},this.textLabels=x.hovertext||x.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(z):(this.textMarkers=P(z),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),_={gl:this.scene.glplot.gl,position:F.position,color:F.errorColor,error:F.errorBounds,lineWidth:F.errorLineWidth,capSize:F.errorCapSize,opacity:x.opacity},this.errorBars?F.errorBounds?this.errorBars.update(_):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):F.errorBounds&&(this.errorBars=o(_),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),F.delaunayAxis>=0){var V=T(F.position,F.delaunayColor,F.delaunayAxis);V.opacity=x.opacity,this.delaunayMesh?this.delaunayMesh.update(V):(V.gl=k,this.delaunayMesh=L(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())};function C(x,k){var I=new y(x,k.uid);return I.update(k),I}te.exports=C},83484:function(te,X,e){var A=e(24040),P=e(3400),o=e(43028),L=e(74428),M=e(66828),d=e(124),g=e(91592);te.exports=function(s,a,c,u){function l(b,E){return P.coerce(s,a,g,b,E)}var y=r(s,a,l,u);if(!y){a.visible=!1;return}l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),l("mode"),o.hasMarkers(a)&&L(s,a,c,u,l,{noSelect:!0,noAngle:!0}),o.hasLines(a)&&(l("connectgaps"),M(s,a,c,u,l)),o.hasText(a)&&(l("texttemplate"),d(s,a,u,l,{noSelect:!0}));var h=(a.line||{}).color,T=(a.marker||{}).color;l("surfaceaxis")>=0&&l("surfacecolor",h||T);for(var f=["x","y","z"],n=0;n<3;++n){var v="projection."+f[n];l(v+".show")&&(l(v+".opacity"),l(v+".scale"))}var m=A.getComponentMethod("errorbars","supplyDefaults");m(s,a,h||T||c,{axis:"z"}),m(s,a,h||T||c,{axis:"y",inherit:"z"}),m(s,a,h||T||c,{axis:"x",inherit:"z"})};function r(t,s,a,c){var u=0,l=a("x"),y=a("y"),h=a("z"),T=A.getComponentMethod("calendars","handleTraceDefaults");return T(t,s,["x","y","z"],c),l&&y&&h&&(u=Math.min(l.length,y.length,h.length),s._length=s._xlength=s._ylength=s._zlength=u),u}},3296:function(te,X,e){te.exports={plot:e(41064),attributes:e(91592),markerSymbols:e(87792),supplyDefaults:e(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(41484),moduleType:"trace",name:"scatter3d",basePlotModule:e(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(te,X,e){var A=e(98304),P=e(52904),o=e(45464),L=e(21776).Ks,M=e(21776).Gw,d=e(49084),g=e(92880).extendFlat,r=P.marker,t=P.line,s=r.line;te.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:g({},P.mode,{dflt:"markers"}),text:g({},P.text,{}),texttemplate:M({editType:"plot"},{keys:["a","b","text"]}),hovertext:g({},P.hovertext,{}),line:{color:t.color,width:t.width,dash:t.dash,backoff:t.backoff,shape:g({},t.shape,{values:["linear","spline"]}),smoothing:t.smoothing,editType:"calc"},connectgaps:P.connectgaps,fill:g({},P.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:A(),marker:g({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:g({width:s.width,editType:"calc"},d("marker.line")),gradient:r.gradient,editType:"calc"},d("marker")),textfont:P.textfont,textposition:P.textposition,selected:P.selected,unselected:P.unselected,hoverinfo:g({},o.hoverinfo,{flags:["a","b","text","name"]}),hoveron:P.hoveron,hovertemplate:L()}},48228:function(te,X,e){var A=e(38248),P=e(90136),o=e(20148),L=e(4500),M=e(16356).calcMarkerSize,d=e(50948);te.exports=function(r,t){var s=t._carpetTrace=d(r,t);if(!(!s||!s.visible||s.visible==="legendonly")){var a;t.xaxis=s.xaxis,t.yaxis=s.yaxis;var c=t._length,u=new Array(c),l,y,h=!1;for(a=0;a<c;a++)if(l=t.a[a],y=t.b[a],A(l)&&A(y)){var T=s.ab2xy(+l,+y,!0),f=s.isVisible(+l,+y);f||(h=!0),u[a]={x:T[0],y:T[1],a:l,b:y,vis:f}}else u[a]={x:!1,y:!1};return t._needsCull=h,u[0].carpet=s,u[0].trace=t,M(t,c),P(r,t),o(u,t),L(u,t),u}}},6176:function(te,X,e){var A=e(3400),P=e(88200),o=e(43028),L=e(74428),M=e(66828),d=e(11731),g=e(124),r=e(70840),t=e(90372);te.exports=function(a,c,u,l){function y(b,E){return A.coerce(a,c,t,b,E)}y("carpet"),c.xaxis="x",c.yaxis="y";var h=y("a"),T=y("b"),f=Math.min(h.length,T.length);if(!f){c.visible=!1;return}c._length=f,y("text"),y("texttemplate"),y("hovertext");var n=f<P.PTS_LINESONLY?"lines+markers":"lines";y("mode",n),o.hasMarkers(c)&&L(a,c,u,l,y,{gradient:!0}),o.hasLines(c)&&(M(a,c,u,l,y,{backoff:!0}),d(a,c,y),y("connectgaps")),o.hasText(c)&&g(a,c,l,y);var v=[];(o.hasMarkers(c)||o.hasText(c))&&(y("marker.maxdisplayed"),v.push("points")),y("fill"),c.fill!=="none"&&(r(a,c,u,y),o.hasLines(c)||d(a,c,y)),(c.fill==="tonext"||c.fill==="toself")&&v.push("fills");var m=y("hoveron",v.join("+")||"points");m!=="fills"&&y("hovertemplate"),A.coerceSelectionMarkerOpacity(c,y)}},89307:function(te){te.exports=function(e,A,P,o,L){var M=o[L];return e.a=M.a,e.b=M.b,e.y=M.y,e}},52364:function(te){te.exports=function(e,A){var P={},o=A._carpet,L=o.ab2ij([e.a,e.b]),M=Math.floor(L[0]),d=L[0]-M,g=Math.floor(L[1]),r=L[1]-g,t=o.evalxy([],M,g,d,r);return P.yLabel=t[1].toFixed(3),P}},58960:function(te,X,e){var A=e(98723),P=e(3400).fillText;te.exports=function(L,M,d,g){var r=A(L,M,d,g);if(!r||r[0].index===!1)return;var t=r[0];if(t.index===void 0){var s=1-t.y0/L.ya._length,a=L.xa._length,c=a*s/2,u=a-c;return t.x0=Math.max(Math.min(t.x0,u),c),t.x1=Math.max(Math.min(t.x1,u),c),r}var l=t.cd[t.index];t.a=l.a,t.b=l.b,t.xLabelVal=void 0,t.yLabelVal=void 0;var y=t.trace,h=y._carpet,T=y._module.formatLabels(l,y);t.yLabel=T.yLabel,delete t.text;var f=[];function n(b,E){var p;b.labelprefix&&b.labelprefix.length>0?p=b.labelprefix.replace(/ = $/,""):p=b._hovertitle,f.push(p+": "+E.toFixed(3)+b.labelsuffix)}if(!y.hovertemplate){var v=l.hi||y.hoverinfo,m=v.split("+");m.indexOf("all")!==-1&&(m=["a","b","text"]),m.indexOf("a")!==-1&&n(h.aaxis,l.a),m.indexOf("b")!==-1&&n(h.baxis,l.b),f.push("y: "+t.yLabel),m.indexOf("text")!==-1&&P(l,y,f),t.extraText=f.join("<br>")}return r}},4184:function(te,X,e){te.exports={attributes:e(90372),supplyDefaults:e(6176),colorbar:e(5528),formatLabels:e(52364),calc:e(48228),plot:e(20036),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(58960),selectPoints:e(91560),eventData:e(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:e(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(te,X,e){var A=e(96504),P=e(54460),o=e(43616);te.exports=function(M,d,g,r){var t,s,a,c=g[0][0].carpet,u=P.getFromId(M,c.xaxis||"x"),l=P.getFromId(M,c.yaxis||"y"),y={xaxis:u,yaxis:l,plot:d.plot};for(t=0;t<g.length;t++)s=g[t][0].trace,s._xA=u,s._yA=l;for(A(M,y,g,r),t=0;t<g.length;t++)s=g[t][0].trace,a=r.selectAll("g.trace"+s.uid+" .js-line"),o.setClipUrl(a,g[t][0].carpet._clipPathId,M)}},6096:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(98304),L=e(52904),M=e(45464),d=e(49084),g=e(98192).u,r=e(92880).extendFlat,t=e(67824).overrideAll,s=L.marker,a=L.line,c=s.line;te.exports=t({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:r({},L.mode,{dflt:"markers"}),text:r({},L.text,{}),texttemplate:P({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:r({},L.hovertext,{}),textfont:L.textfont,textposition:L.textposition,line:{color:a.color,width:a.width,dash:g},connectgaps:L.connectgaps,marker:r({symbol:s.symbol,opacity:s.opacity,angle:s.angle,angleref:r({},s.angleref,{values:["previous","up","north"]}),standoff:s.standoff,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,colorbar:s.colorbar,line:r({width:c.width},d("marker.line")),gradient:s.gradient},d("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:o(),selected:L.selected,unselected:L.unselected,hoverinfo:r({},M.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:A()},"calc","nested")},25212:function(te,X,e){var A=e(38248),P=e(39032).BADNUM,o=e(90136),L=e(20148),M=e(4500),d=e(3400).isArrayOrTypedArray,g=e(3400)._;function r(t){return t&&typeof t=="string"}te.exports=function(s,a){var c=d(a.locations),u=c?a.locations.length:a._length,l=new Array(u),y;a.geojson?y=function(m){return r(m)||A(m)}:y=r;for(var h=0;h<u;h++){var T=l[h]={};if(c){var f=a.locations[h];T.loc=y(f)?f:null}else{var n=a.lon[h],v=a.lat[h];A(n)&&A(v)?T.lonlat=[+n,+v]:T.lonlat=[P,P]}}return L(l,a),o(s,a),M(l,a),u&&(l[0].t={labels:{lat:g(s,"lat:")+" ",lon:g(s,"lon:")+" "}}),l}},86188:function(te,X,e){var A=e(3400),P=e(43028),o=e(74428),L=e(66828),M=e(124),d=e(70840),g=e(6096);te.exports=function(t,s,a,c){function u(m,b){return A.coerce(t,s,g,m,b)}var l=u("locations"),y;if(l&&l.length){var h=u("geojson"),T;(typeof h=="string"&&h!==""||A.isPlainObject(h))&&(T="geojson-id");var f=u("locationmode",T);f==="geojson-id"&&u("featureidkey"),y=l.length}else{var n=u("lon")||[],v=u("lat")||[];y=Math.min(n.length,v.length)}if(!y){s.visible=!1;return}s._length=y,u("text"),u("hovertext"),u("hovertemplate"),u("mode"),P.hasMarkers(s)&&o(t,s,a,c,u,{gradient:!0}),P.hasLines(s)&&(L(t,s,a,c,u),u("connectgaps")),P.hasText(s)&&(u("texttemplate"),M(t,s,c,u)),u("fill"),s.fill!=="none"&&d(t,s,a,u),A.coerceSelectionMarkerOpacity(s,u)}},58544:function(te){te.exports=function(e,A,P,o,L){e.lon=A.lon,e.lat=A.lat,e.location=A.loc?A.loc:null;var M=o[L];return M.fIn&&M.fIn.properties&&(e.properties=M.fIn.properties),e}},56696:function(te,X,e){var A=e(54460);te.exports=function(o,L,M){var d={},g=M[L.geo]._subplot,r=g.mockAxis,t=o.lonlat;return d.lonLabel=A.tickText(r,r.c2l(t[0]),!0).text,d.latLabel=A.tickText(r,r.c2l(t[1]),!0).text,d}},64292:function(te,X,e){var A=e(93024),P=e(39032).BADNUM,o=e(44928),L=e(3400).fillText,M=e(6096);te.exports=function(r,t,s){var a=r.cd,c=a[0].trace,u=r.xa,l=r.ya,y=r.subplot,h=y.projection.isLonLatOverEdges,T=y.project;function f(S){var w=S.lonlat;if(w[0]===P||h(w))return 1/0;var i=T(w),C=T([t,s]),x=Math.abs(i[0]-C[0]),k=Math.abs(i[1]-C[1]),I=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(x*x+k*k)-I,1-3/I)}if(A.getClosest(a,f,r),r.index!==!1){var n=a[r.index],v=n.lonlat,m=[u.c2p(v),l.c2p(v)],b=n.mrc||1;r.x0=m[0]-b,r.x1=m[0]+b,r.y0=m[1]-b,r.y1=m[1]+b,r.loc=n.loc,r.lon=v[0],r.lat=v[1];var E={};E[c.geo]={_subplot:y};var p=c._module.formatLabels(n,c,E);return r.lonLabel=p.lonLabel,r.latLabel=p.latLabel,r.color=o(c,n),r.extraText=d(c,n,r,a[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}};function d(g,r,t,s){if(g.hovertemplate)return;var a=r.hi||g.hoverinfo,c=a==="all"?M.hoverinfo.flags:a.split("+"),u=c.indexOf("location")!==-1&&Array.isArray(g.locations),l=c.indexOf("lon")!==-1,y=c.indexOf("lat")!==-1,h=c.indexOf("text")!==-1,T=[];function f(n){return n+"°"}return u?T.push(r.loc):l&&y?T.push("("+f(t.latLabel)+", "+f(t.lonLabel)+")"):l?T.push(s.lon+f(t.lonLabel)):y&&T.push(s.lat+f(t.latLabel)),h&&L(r,g,T),T.join("<br>")}},36952:function(te,X,e){te.exports={attributes:e(6096),supplyDefaults:e(86188),colorbar:e(5528),formatLabels:e(56696),calc:e(25212),calcGeoJSON:e(48691).calcGeoJSON,plot:e(48691).plot,style:e(25064),styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(64292),eventData:e(58544),selectPoints:e(8796),moduleType:"trace",name:"scattergeo",basePlotModule:e(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(te,X,e){var A=e(33428),P=e(3400),o=e(59972).getTopojsonFeatures,L=e(44808),M=e(27144),d=e(19280).findExtremes,g=e(39032).BADNUM,r=e(16356).calcMarkerSize,t=e(43028),s=e(25064);function a(u,l,y){var h=l.layers.frontplot.select(".scatterlayer"),T=P.makeTraceGroups(h,y,"trace scattergeo");function f(n,v){n.lonlat[0]===g&&A.select(v).remove()}T.selectAll("*").remove(),T.each(function(n){var v=A.select(this),m=n[0].trace;if(t.hasLines(m)||m.fill!=="none"){var b=L.calcTraceToLineCoords(n),E=m.fill!=="none"?L.makePolygon(b):L.makeLine(b);v.selectAll("path.js-line").data([{geojson:E,trace:m}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}t.hasMarkers(m)&&v.selectAll("path.point").data(P.identity).enter().append("path").classed("point",!0).each(function(p){f(p,this)}),t.hasText(m)&&v.selectAll("g").data(P.identity).enter().append("g").append("text").each(function(p){f(p,this)}),s(u,n)})}function c(u,l){var y=u[0].trace,h=l[y.geo],T=h._subplot,f=y._length,n,v;if(P.isArrayOrTypedArray(y.locations)){var m=y.locationmode,b=m==="geojson-id"?M.extractTraceFeature(u):o(y,T.topojson);for(n=0;n<f;n++){v=u[n];var E=m==="geojson-id"?v.fOut:M.locationToFeature(m,v.loc,b);v.lonlat=E?E.properties.ct:[g,g]}}var p={padded:!0},S,w;if(h.fitbounds==="geojson"&&y.locationmode==="geojson-id"){var i=M.computeBbox(M.getTraceGeojson(y));S=[i[0],i[2]],w=[i[1],i[3]]}else{for(S=new Array(f),w=new Array(f),n=0;n<f;n++)v=u[n],S[n]=v.lonlat[0],w[n]=v.lonlat[1];p.ppad=r(y,f)}y._extremes.lon=d(h.lonaxis._ax,S,p),y._extremes.lat=d(h.lataxis._ax,w,p)}te.exports={calcGeoJSON:c,plot:a}},8796:function(te,X,e){var A=e(43028),P=e(39032).BADNUM;te.exports=function(L,M){var d=L.cd,g=L.xaxis,r=L.yaxis,t=[],s=d[0].trace,a,c,u,l,y,h=!A.hasMarkers(s)&&!A.hasText(s);if(h)return[];if(M===!1)for(y=0;y<d.length;y++)d[y].selected=0;else for(y=0;y<d.length;y++)a=d[y],c=a.lonlat,c[0]!==P&&(u=g.c2p(c),l=r.c2p(c),M.contains([u,l],null,y,L)?(t.push({pointNumber:y,lon:c[0],lat:c[1]}),a.selected=1):a.selected=0);return t}},25064:function(te,X,e){var A=e(33428),P=e(43616),o=e(76308),L=e(49224),M=L.stylePoints,d=L.styleText;te.exports=function(t,s){s&&g(t,s)};function g(r,t){var s=t[0].trace,a=t[0].node3;a.style("opacity",t[0].trace.opacity),M(a,s,r),d(a,s,r),a.selectAll("path.js-line").style("fill","none").each(function(c){var u=A.select(this),l=c.trace,y=l.line||{};u.call(o.stroke,y.color).call(P.dashLine,y.dash||"",y.width||0),l.fill!=="none"&&u.call(o.fill,l.fillcolor)})}},2876:function(te,X,e){var A=e(45464),P=e(98304),o=e(52904),L=e(29736).axisHoverFormat,M=e(49084),d=e(95376),g=e(92880).extendFlat,r=e(67824).overrideAll,t=e(67072).DASHES,s=o.line,a=o.marker,c=a.line,u=te.exports=r({x:o.x,x0:o.x0,dx:o.dx,y:o.y,y0:o.y0,dy:o.dy,xperiod:o.xperiod,yperiod:o.yperiod,xperiod0:o.xperiod0,yperiod0:o.yperiod0,xperiodalignment:o.xperiodalignment,yperiodalignment:o.yperiodalignment,xhoverformat:L("x"),yhoverformat:L("y"),text:o.text,hovertext:o.hovertext,textposition:o.textposition,textfont:o.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:s.color,width:s.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:d(t),dflt:"solid"}},marker:g({},M("marker"),{symbol:a.symbol,angle:a.angle,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,opacity:a.opacity,colorbar:a.colorbar,line:g({},M("marker.line"),{width:c.width})}),connectgaps:o.connectgaps,fill:g({},o.fill,{dflt:"none"}),fillcolor:P(),selected:{marker:o.selected.marker,textfont:o.selected.textfont},unselected:{marker:o.unselected.marker,textfont:o.unselected.textfont},opacity:A.opacity},"calc","nested");u.x.editType=u.y.editType=u.x0.editType=u.y0.editType="calc+clearAxisTypes",u.hovertemplate=o.hovertemplate,u.texttemplate=o.texttemplate},64628:function(te,X,e){var A=e(41272);te.exports={moduleType:"trace",name:"scattergl",basePlotModule:e(57952),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:e(2876),supplyDefaults:e(80220),crossTraceDefaults:e(35036),colorbar:e(5528),formatLabels:e(99396),calc:e(24856),hoverPoints:A.hoverPoints,selectPoints:e(73224),meta:{}}},24856:function(te,X,e){var A=e(3108),P=e(3400),o=e(79811),L=e(19280).findExtremes,M=e(1220),d=e(16356),g=d.calcMarkerSize,r=d.calcAxisExpansion,t=d.setFirstScatter,s=e(90136),a=e(84236),c=e(74588),u=e(39032).BADNUM,l=e(67072).TOO_MANY_POINTS;te.exports=function(f,n){var v=f._fullLayout,m=n._xA=o.getFromId(f,n.xaxis,"x"),b=n._yA=o.getFromId(f,n.yaxis,"y"),E=v._plots[n.xaxis+n.yaxis],p=n._length,S=p>=l,w=p*2,i={},C,x=m.makeCalcdata(n,"x"),k=b.makeCalcdata(n,"y"),I=M(n,m,"x",x),B=M(n,b,"y",k),_=I.vals,z=B.vals;n._x=_,n._y=z,n.xperiodalignment&&(n._origX=x,n._xStarts=I.starts,n._xEnds=I.ends),n.yperiodalignment&&(n._origY=k,n._yStarts=B.starts,n._yEnds=B.ends);var O=new Array(w),F=new Array(p);for(C=0;C<p;C++)O[C*2]=_[C]===u?NaN:_[C],O[C*2+1]=z[C]===u?NaN:z[C],F[C]=C;if(m.type==="log")for(C=0;C<w;C+=2)O[C]=m.c2l(O[C]);if(b.type==="log")for(C=1;C<w;C+=2)O[C]=b.c2l(O[C]);S&&m.type!=="log"&&b.type!=="log"?i.tree=A(O):i.ids=F,s(f,n);var N=h(f,E,n,O,_,z),V=c(f,E);t(v,n);var j;return S?N.marker&&(j=N.marker.sizeAvg||Math.max(N.marker.size,3)):j=g(n,p),r(f,n,m,b,_,z,j),N.errorX&&y(n,m,N.errorX),N.errorY&&y(n,b,N.errorY),N.fill&&!V.fill2d&&(V.fill2d=!0),N.marker&&!V.scatter2d&&(V.scatter2d=!0),N.line&&!V.line2d&&(V.line2d=!0),(N.errorX||N.errorY)&&!V.error2d&&(V.error2d=!0),N.text&&!V.glText&&(V.glText=!0),N.marker&&(N.marker.snap=p),V.lineOptions.push(N.line),V.errorXOptions.push(N.errorX),V.errorYOptions.push(N.errorY),V.fillOptions.push(N.fill),V.markerOptions.push(N.marker),V.markerSelectedOptions.push(N.markerSel),V.markerUnselectedOptions.push(N.markerUnsel),V.textOptions.push(N.text),V.textSelectedOptions.push(N.textSel),V.textUnselectedOptions.push(N.textUnsel),V.selectBatch.push([]),V.unselectBatch.push([]),i._scene=V,i.index=V.count,i.x=_,i.y=z,i.positions=O,V.count++,[{x:!1,y:!1,t:i,trace:n}]};function y(T,f,n){var v=T._extremes[f._id],m=L(f,n._bnds,{padded:!0});v.min=v.min.concat(m.min),v.max=v.max.concat(m.max)}function h(T,f,n,v,m,b){var E=a.style(T,n);if(E.marker&&(E.marker.positions=v),E.line&&v.length>1&&P.extendFlat(E.line,a.linePositions(T,n,v)),E.errorX||E.errorY){var p=a.errorBarPositions(T,n,v,m,b);E.errorX&&P.extendFlat(E.errorX,p.x),E.errorY&&P.extendFlat(E.errorY,p.y)}return E.text&&(P.extendFlat(E.text,{positions:v},a.textPosition(T,n,E.text,E.marker)),P.extendFlat(E.textSel,{positions:v},a.textPosition(T,n,E.text,E.markerSel)),P.extendFlat(E.textUnsel,{positions:v},a.textPosition(T,n,E.text,E.markerUnsel))),E}},67072:function(te){var X=20;te.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:X,SYMBOL_STROKE:X/20,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]}}},84236:function(te,X,e){var A=e(38248),P=e(20472),o=e(72160),L=e(24040),M=e(3400),d=M.isArrayOrTypedArray,g=e(43616),r=e(79811),t=e(33040).formatColor,s=e(43028),a=e(7152),c=e(80088),u=e(67072),l=e(13448).DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},h=e(10624).appendArrayPointValue;function T(B,_){var z,O={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},F=B._context.plotGlPixelRatio;if(_.visible!==!0)return O;if(s.hasText(_)&&(O.text=f(B,_),O.textSel=m(B,_,_.selected),O.textUnsel=m(B,_,_.unselected)),s.hasMarkers(_)&&(O.marker=n(B,_),O.markerSel=v(B,_,_.selected),O.markerUnsel=v(B,_,_.unselected),!_.unselected&&d(_.marker.opacity))){var N=_.marker.opacity;for(O.markerUnsel.opacity=new Array(N.length),z=0;z<N.length;z++)O.markerUnsel.opacity[z]=l*N[z]}if(s.hasLines(_)){O.line={overlay:!0,thickness:_.line.width*F,color:_.line.color,opacity:_.opacity};var V=(u.DASHES[_.line.dash]||[1]).slice();for(z=0;z<V.length;++z)V[z]*=_.line.width*F;O.line.dashes=V}return _.error_x&&_.error_x.visible&&(O.errorX=b(_,_.error_x,F)),_.error_y&&_.error_y.visible&&(O.errorY=b(_,_.error_y,F)),_.fill&&_.fill!=="none"&&(O.fill={closed:!0,fill:_.fillcolor,thickness:0}),O}function f(B,_){var z=B._fullLayout,O=_._length,F=_.textfont,N=_.textposition,V=d(N)?N:[N],j=F.color,$=F.size,q=F.family,oe={},Z,G=B._context.plotGlPixelRatio,re=_.texttemplate;if(re){oe.text=[];var H=z._d3locale,J=Array.isArray(re),ae=J?Math.min(re.length,O):O,K=J?function(me){return re[me]}:function(){return re};for(Z=0;Z<ae;Z++){var Y={i:Z},ie=_._module.formatLabels(Y,_,z),ne={};h(ne,_,Z);var le=_._meta||{};oe.text.push(M.texttemplateString(K(Z),ie,H,ne,Y,le))}}else d(_.text)&&_.text.length<O?oe.text=_.text.slice():oe.text=_.text;if(d(oe.text))for(Z=oe.text.length;Z<O;Z++)oe.text[Z]="";for(oe.opacity=_.opacity,oe.font={},oe.align=[],oe.baseline=[],Z=0;Z<V.length;Z++){var de=V[Z].split(/\s+/);switch(de[1]){case"left":oe.align.push("right");break;case"right":oe.align.push("left");break;default:oe.align.push(de[1])}switch(de[0]){case"top":oe.baseline.push("bottom");break;case"bottom":oe.baseline.push("top");break;default:oe.baseline.push(de[0])}}if(d(j))for(oe.color=new Array(O),Z=0;Z<O;Z++)oe.color[Z]=j[Z];else oe.color=j;if(d($)||d(q))for(oe.font=new Array(O),Z=0;Z<O;Z++){var we=oe.font[Z]={};we.size=(M.isTypedArray($)?$[Z]:d($)?A($[Z])?$[Z]:0:$)*G,we.family=d(q)?q[Z]:q}else oe.font={size:$*G,family:q};return oe}function n(B,_){var z=_._length,O=_.marker,F={},N,V=d(O.symbol),j=d(O.angle),$=d(O.color),q=d(O.line.color),oe=d(O.opacity),Z=d(O.size),G=d(O.line.width),re;if(V||(re=c.isOpenSymbol(O.symbol)),V||$||q||oe||j){F.symbols=new Array(z),F.angles=new Array(z),F.colors=new Array(z),F.borderColors=new Array(z);var H=O.symbol,J=O.angle,ae=t(O,O.opacity,z),K=t(O.line,O.opacity,z);if(!d(K[0])){var Y=K;for(K=Array(z),N=0;N<z;N++)K[N]=Y}if(!d(ae[0])){var ie=ae;for(ae=Array(z),N=0;N<z;N++)ae[N]=ie}if(!d(H)){var ne=H;for(H=Array(z),N=0;N<z;N++)H[N]=ne}if(!d(J)){var le=J;for(J=Array(z),N=0;N<z;N++)J[N]=le}for(F.symbols=H,F.angles=J,F.colors=ae,F.borderColors=K,N=0;N<z;N++)V&&(re=c.isOpenSymbol(O.symbol[N])),re&&(K[N]=ae[N].slice(),ae[N]=ae[N].slice(),ae[N][3]=0);for(F.opacity=_.opacity,F.markers=new Array(z),N=0;N<z;N++)F.markers[N]=C({mx:F.symbols[N],ma:F.angles[N]},_)}else re?(F.color=o(O.color,"uint8"),F.color[3]=0,F.borderColor=o(O.color,"uint8")):(F.color=o(O.color,"uint8"),F.borderColor=o(O.line.color,"uint8")),F.opacity=_.opacity*O.opacity,F.marker=C({mx:O.symbol,ma:O.angle},_);var de=1,we=a(_,de),me;if(Z||G){var Le=F.sizes=new Array(z),ve=F.borderSizes=new Array(z),Ae=0,ye;if(Z){for(N=0;N<z;N++)Le[N]=we(O.size[N]),Ae+=Le[N];ye=Ae/z}else for(me=we(O.size),N=0;N<z;N++)Le[N]=me;if(G)for(N=0;N<z;N++)ve[N]=O.line.width[N];else for(me=O.line.width,N=0;N<z;N++)ve[N]=me;F.sizeAvg=ye}else F.size=we(O&&O.size||10),F.borderSizes=we(O.line.width);return F}function v(B,_,z){var O=_.marker,F={};return z&&(z.marker&&z.marker.symbol?F=n(B,M.extendFlat({},O,z.marker)):z.marker&&(z.marker.size&&(F.size=z.marker.size),z.marker.color&&(F.colors=z.marker.color),z.marker.opacity!==void 0&&(F.opacity=z.marker.opacity))),F}function m(B,_,z){var O={};if(!z)return O;if(z.textfont){var F={opacity:1,text:_.text,texttemplate:_.texttemplate,textposition:_.textposition,textfont:M.extendFlat({},_.textfont)};z.textfont&&M.extendFlat(F.textfont,z.textfont),O=f(B,F)}return O}function b(B,_,z){var O={capSize:_.width*2*z,lineWidth:_.thickness*z,color:_.color};return _.copy_ystyle&&(O=B.error_y),O}var E=u.SYMBOL_SDF_SIZE,p=u.SYMBOL_SIZE,S=u.SYMBOL_STROKE,w={},i=g.symbolFuncs[0](p*.05);function C(B,_){var z=B.mx;if(z==="circle")return null;var O,F,N=g.symbolNumber(z),V=g.symbolFuncs[N%100],j=!!g.symbolNoDot[N%100],$=!!g.symbolNoFill[N%100],q=c.isDotSymbol(z);if(B.ma&&(z+="_"+B.ma),w[z])return w[z];var oe=g.getMarkerAngle(B,_);return q&&!j?O=V(p*1.1,oe)+i:O=V(p,oe),F=P(O,{w:E,h:E,viewBox:[-p,-p,p,p],stroke:$?S:-S}),w[z]=F,F||null}function x(B,_,z){var O=z.length,F=O/2,N,V;if(s.hasLines(_)&&F)if(_.line.shape==="hv"){for(N=[],V=0;V<F-1;V++)isNaN(z[V*2])||isNaN(z[V*2+1])?N.push(NaN,NaN,NaN,NaN):(N.push(z[V*2],z[V*2+1]),!isNaN(z[V*2+2])&&!isNaN(z[V*2+3])?N.push(z[V*2+2],z[V*2+1]):N.push(NaN,NaN));N.push(z[O-2],z[O-1])}else if(_.line.shape==="hvh"){for(N=[],V=0;V<F-1;V++)if(isNaN(z[V*2])||isNaN(z[V*2+1])||isNaN(z[V*2+2])||isNaN(z[V*2+3]))!isNaN(z[V*2])&&!isNaN(z[V*2+1])?N.push(z[V*2],z[V*2+1]):N.push(NaN,NaN),N.push(NaN,NaN);else{var j=(z[V*2]+z[V*2+2])/2;N.push(z[V*2],z[V*2+1],j,z[V*2+1],j,z[V*2+3])}N.push(z[O-2],z[O-1])}else if(_.line.shape==="vhv"){for(N=[],V=0;V<F-1;V++)if(isNaN(z[V*2])||isNaN(z[V*2+1])||isNaN(z[V*2+2])||isNaN(z[V*2+3]))!isNaN(z[V*2])&&!isNaN(z[V*2+1])?N.push(z[V*2],z[V*2+1]):N.push(NaN,NaN),N.push(NaN,NaN);else{var $=(z[V*2+1]+z[V*2+3])/2;N.push(z[V*2],z[V*2+1],z[V*2],$,z[V*2+2],$)}N.push(z[O-2],z[O-1])}else if(_.line.shape==="vh"){for(N=[],V=0;V<F-1;V++)isNaN(z[V*2])||isNaN(z[V*2+1])?N.push(NaN,NaN,NaN,NaN):(N.push(z[V*2],z[V*2+1]),!isNaN(z[V*2+2])&&!isNaN(z[V*2+3])?N.push(z[V*2],z[V*2+3]):N.push(NaN,NaN));N.push(z[O-2],z[O-1])}else N=z;var q=!1;for(V=0;V<N.length;V++)if(isNaN(N[V])){q=!0;break}var oe=q||N.length>u.TOO_MANY_POINTS||s.hasMarkers(_)?"rect":"round";if(q&&_.connectgaps){var Z=N[0],G=N[1];for(V=0;V<N.length;V+=2)isNaN(N[V])||isNaN(N[V+1])?(N[V]=Z,N[V+1]=G):(Z=N[V],G=N[V+1])}return{join:oe,positions:N}}function k(B,_,z,O,F){var N=L.getComponentMethod("errorbars","makeComputeError"),V=r.getFromId(B,_.xaxis,"x"),j=r.getFromId(B,_.yaxis,"y"),$=z.length/2,q={};function oe(Z,G){var re=G._id.charAt(0),H=_["error_"+re];if(H&&H.visible&&(G.type==="linear"||G.type==="log")){for(var J=N(H),ae={x:0,y:1}[re],K={x:[0,1,2,3],y:[2,3,0,1]}[re],Y=new Float64Array(4*$),ie=1/0,ne=-1/0,le=0,de=0;le<$;le++,de+=4){var we=Z[le];if(A(we)){var me=z[le*2+ae],Le=J(we,le),ve=Le[0],Ae=Le[1];if(A(ve)&&A(Ae)){var ye=we-ve,Se=we+Ae;Y[de+K[0]]=me-G.c2l(ye),Y[de+K[1]]=G.c2l(Se)-me,Y[de+K[2]]=0,Y[de+K[3]]=0,ie=Math.min(ie,we-ve),ne=Math.max(ne,we+Ae)}}}q[re]={positions:z,errors:Y,_bnds:[ie,ne]}}}return oe(O,V),oe(F,j),q}function I(B,_,z,O){var F=_._length,N={},V;if(s.hasMarkers(_)){var j=z.font,$=z.align,q=z.baseline;for(N.offset=new Array(F),V=0;V<F;V++){var oe=O.sizes?O.sizes[V]:O.size,Z=d(j)?j[V].size:j.size,G=d($)?$.length>1?$[V]:$[0]:$,re=d(q)?q.length>1?q[V]:q[0]:q,H=y[G],J=y[re],ae=oe?oe/.8+1:0,K=-J*ae-J*.5;N.offset[V]=[H*ae/Z,K/Z]}}return N}te.exports={style:T,markerStyle:n,markerSelection:v,linePositions:x,errorBarPositions:k,textPosition:I}},80220:function(te,X,e){var A=e(3400),P=e(24040),o=e(80088),L=e(2876),M=e(88200),d=e(43028),g=e(43980),r=e(31147),t=e(74428),s=e(66828),a=e(70840),c=e(124);te.exports=function(l,y,h,T){function f(w,i){return A.coerce(l,y,L,w,i)}var n=l.marker?o.isOpenSymbol(l.marker.symbol):!1,v=d.isBubble(l),m=g(l,y,T,f);if(!m){y.visible=!1;return}r(l,y,T,f),f("xhoverformat"),f("yhoverformat");var b=m<M.PTS_LINESONLY?"lines+markers":"lines";f("text"),f("hovertext"),f("hovertemplate"),f("mode",b),d.hasMarkers(y)&&(t(l,y,h,T,f,{noAngleRef:!0,noStandOff:!0}),f("marker.line.width",n||v?1:0)),d.hasLines(y)&&(f("connectgaps"),s(l,y,h,T,f),f("line.shape")),d.hasText(y)&&(f("texttemplate"),c(l,y,T,f));var E=(y.line||{}).color,p=(y.marker||{}).color;f("fill"),y.fill!=="none"&&a(l,y,h,f);var S=P.getComponentMethod("errorbars","supplyDefaults");S(l,y,E||p||h,{axis:"y"}),S(l,y,E||p||h,{axis:"x",inherit:"y"}),A.coerceSelectionMarkerOpacity(y,f)}},26768:function(te,X,e){var A=e(3400),P=e(76308),o=e(13448).DESELECTDIM;function L(M){var d=M[0],g=d.trace,r=d.t,t=r._scene,s=r.index,a=t.selectBatch[s],c=t.unselectBatch[s],u=t.textOptions[s],l=t.textSelectedOptions[s]||{},y=t.textUnselectedOptions[s]||{},h=A.extendFlat({},u),T,f;if(a.length||c.length){var n=l.color,v=y.color,m=u.color,b=A.isArrayOrTypedArray(m);for(h.color=new Array(g._length),T=0;T<a.length;T++)f=a[T],h.color[f]=n||(b?m[f]:m);for(T=0;T<c.length;T++){f=c[T];var E=b?m[f]:m;h.color[f]=v||(n?E:P.addOpacity(E,o))}}t.glText[s].update(h)}te.exports={styleTextSelection:L}},99396:function(te,X,e){var A=e(76688);te.exports=function(o,L,M){var d=o.i;return"x"in o||(o.x=L._x[d]),"y"in o||(o.y=L._y[d]),A(o,L,M)}},80088:function(te,X,e){var A=e(67072);X.isOpenSymbol=function(P){return typeof P=="string"?A.OPEN_RE.test(P):P%200>100},X.isDotSymbol=function(P){return typeof P=="string"?A.DOT_RE.test(P):P>200}},41272:function(te,X,e){var A=e(24040),P=e(3400),o=e(44928);function L(d,g,r,t){var s=d.cd,a=s[0].t,c=s[0].trace,u=d.xa,l=d.ya,y=a.x,h=a.y,T=u.c2p(g),f=l.c2p(r),n=d.distance,v;if(a.tree){var m=u.p2c(T-n),b=u.p2c(T+n),E=l.p2c(f-n),p=l.p2c(f+n);t==="x"?v=a.tree.range(Math.min(m,b),Math.min(l._rl[0],l._rl[1]),Math.max(m,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(m,b),Math.min(E,p),Math.max(m,b),Math.max(E,p))}else v=a.ids;var S,w,i,C,x,k,I,B,_,z=n;if(t==="x"){var O=!!c.xperiodalignment,F=!!c.yperiodalignment;for(x=0;x<v.length;x++){if(S=v[x],i=y[S],k=Math.abs(u.c2p(i)-T),O){var N=u.c2p(c._xStarts[S]),V=u.c2p(c._xEnds[S]);k=T>=Math.min(N,V)&&T<=Math.max(N,V)?0:1/0}if(k<z){if(z=k,C=h[S],I=l.c2p(C)-f,F){var j=l.c2p(c._yStarts[S]),$=l.c2p(c._yEnds[S]);I=f>=Math.min(j,$)&&f<=Math.max(j,$)?0:1/0}_=Math.sqrt(k*k+I*I),w=v[x]}}}else for(x=v.length-1;x>-1;x--)S=v[x],i=y[S],C=h[S],k=u.c2p(i)-T,I=l.c2p(C)-f,B=Math.sqrt(k*k+I*I),B<z&&(z=_=B,w=S);return d.index=w,d.distance=z,d.dxy=_,w===void 0?[d]:[M(d,y,h,c)]}function M(d,g,r,t){var s=d.xa,a=d.ya,c=d.distance,u=d.dxy,l=d.index,y={pointNumber:l,x:g[l],y:r[l]};y.tx=P.isArrayOrTypedArray(t.text)?t.text[l]:t.text,y.htx=Array.isArray(t.hovertext)?t.hovertext[l]:t.hovertext,y.data=Array.isArray(t.customdata)?t.customdata[l]:t.customdata,y.tp=Array.isArray(t.textposition)?t.textposition[l]:t.textposition;var h=t.textfont;h&&(y.ts=P.isArrayOrTypedArray(h.size)?h.size[l]:h.size,y.tc=Array.isArray(h.color)?h.color[l]:h.color,y.tf=Array.isArray(h.family)?h.family[l]:h.family);var T=t.marker;T&&(y.ms=P.isArrayOrTypedArray(T.size)?T.size[l]:T.size,y.mo=P.isArrayOrTypedArray(T.opacity)?T.opacity[l]:T.opacity,y.mx=P.isArrayOrTypedArray(T.symbol)?T.symbol[l]:T.symbol,y.ma=P.isArrayOrTypedArray(T.angle)?T.angle[l]:T.angle,y.mc=P.isArrayOrTypedArray(T.color)?T.color[l]:T.color);var f=T&&T.line;f&&(y.mlc=Array.isArray(f.color)?f.color[l]:f.color,y.mlw=P.isArrayOrTypedArray(f.width)?f.width[l]:f.width);var n=T&&T.gradient;n&&n.type!=="none"&&(y.mgt=Array.isArray(n.type)?n.type[l]:n.type,y.mgc=Array.isArray(n.color)?n.color[l]:n.color);var v=s.c2p(y.x,!0),m=a.c2p(y.y,!0),b=y.mrc||1,E=t.hoverlabel;E&&(y.hbg=Array.isArray(E.bgcolor)?E.bgcolor[l]:E.bgcolor,y.hbc=Array.isArray(E.bordercolor)?E.bordercolor[l]:E.bordercolor,y.hts=P.isArrayOrTypedArray(E.font.size)?E.font.size[l]:E.font.size,y.htc=Array.isArray(E.font.color)?E.font.color[l]:E.font.color,y.htf=Array.isArray(E.font.family)?E.font.family[l]:E.font.family,y.hnl=P.isArrayOrTypedArray(E.namelength)?E.namelength[l]:E.namelength);var p=t.hoverinfo;p&&(y.hi=Array.isArray(p)?p[l]:p);var S=t.hovertemplate;S&&(y.ht=Array.isArray(S)?S[l]:S);var w={};w[d.index]=y;var i=t._origX,C=t._origY,x=P.extendFlat({},d,{color:o(t,y),x0:v-b,x1:v+b,xLabelVal:i?i[l]:y.x,y0:m-b,y1:m+b,yLabelVal:C?C[l]:y.y,cd:w,distance:c,spikeDistance:u,hovertemplate:y.ht});return y.htx?x.text=y.htx:y.tx?x.text=y.tx:t.text&&(x.text=t.text),P.fillText(y,t,x),A.getComponentMethod("errorbars","hoverInfo")(y,t,x),x}te.exports={hoverPoints:L,calcHover:M}},38983:function(te,X,e){var A=e(64628);A.plot=e(89876),te.exports=A},89876:function(te,X,e){var A=e(38540),P=e(13472),o=e(24544),L=e(23352),M=e(3400),d=e(72760).selectMode,g=e(5048),r=e(43028),t=e(14328),s=e(26768).styleTextSelection,a={};function c(l,y,h,T){var f=l._size,n=l.width*T,v=l.height*T,m=f.l*T,b=f.b*T,E=f.r*T,p=f.t*T,S=f.w*T,w=f.h*T;return[m+y.domain[0]*S,b+h.domain[0]*w,n-E-(1-y.domain[1])*S,v-p-(1-h.domain[1])*w]}var u=te.exports=function(y,h,T){if(T.length){var f=y._fullLayout,n=h._scene,v=h.xaxis,m=h.yaxis,b,E;if(n){var p=g(y,["ANGLE_instanced_arrays","OES_element_index_uint"],a);if(!p){n.init();return}var S=n.count,w=f._glcanvas.data()[0].regl;if(t(y,h,T),n.dirty){if((n.line2d||n.error2d)&&!(n.scatter2d||n.fill2d||n.glText)&&w.clear({}),n.error2d===!0&&(n.error2d=o(w)),n.line2d===!0&&(n.line2d=P(w)),n.scatter2d===!0&&(n.scatter2d=A(w)),n.fill2d===!0&&(n.fill2d=P(w)),n.glText===!0)for(n.glText=new Array(S),b=0;b<S;b++)n.glText[b]=new L(w);if(n.glText){if(S>n.glText.length){var i=S-n.glText.length;for(b=0;b<i;b++)n.glText.push(new L(w))}else if(S<n.glText.length){var C=n.glText.length-S,x=n.glText.splice(S,C);x.forEach(function(K){K.destroy()})}for(b=0;b<S;b++)n.glText[b].update(n.textOptions[b])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(K){if(K&&K.positions){for(var Y=K.positions,ie=0;ie<Y.length&&(isNaN(Y[ie])||isNaN(Y[ie+1]));)ie+=2;for(var ne=Y.length-2;ne>ie&&(isNaN(Y[ne])||isNaN(Y[ne+1]));)ne-=2;K.positions=Y.slice(ie,ne+2)}return K}),n.line2d.update(n.lineOptions)),n.error2d){var k=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(k)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=M.repeat(null,S),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(K,Y){var ie=T[Y];if(!(!K||!ie||!ie[0]||!ie[0].trace)){var ne=ie[0],le=ne.trace,de=ne.t,we=n.lineOptions[Y],me,Le,ve=[];le._ownfill&&ve.push(Y),le._nexttrace&&ve.push(Y+1),ve.length&&(n.fillOrder[Y]=ve);var Ae=[],ye=we&&we.positions||de.positions,Se,_e;if(le.fill==="tozeroy"){for(Se=0;Se<ye.length&&isNaN(ye[Se+1]);)Se+=2;for(_e=ye.length-2;_e>Se&&isNaN(ye[_e+1]);)_e-=2;ye[Se+1]!==0&&(Ae=[ye[Se],0]),Ae=Ae.concat(ye.slice(Se,_e+2)),ye[_e+1]!==0&&(Ae=Ae.concat([ye[_e],0]))}else if(le.fill==="tozerox"){for(Se=0;Se<ye.length&&isNaN(ye[Se]);)Se+=2;for(_e=ye.length-2;_e>Se&&isNaN(ye[_e]);)_e-=2;ye[Se]!==0&&(Ae=[0,ye[Se+1]]),Ae=Ae.concat(ye.slice(Se,_e+2)),ye[_e]!==0&&(Ae=Ae.concat([0,ye[_e+1]]))}else if(le.fill==="toself"||le.fill==="tonext"){for(Ae=[],me=0,K.splitNull=!0,Le=0;Le<ye.length;Le+=2)(isNaN(ye[Le])||isNaN(ye[Le+1]))&&(Ae=Ae.concat(ye.slice(me,Le)),Ae.push(ye[me],ye[me+1]),Ae.push(null,null),me=Le+2);Ae=Ae.concat(ye.slice(me)),me&&Ae.push(ye[me],ye[me+1])}else{var ze=le._nexttrace;if(ze){var Ie=n.lineOptions[Y+1];if(Ie){var Ne=Ie.positions;if(le.fill==="tonexty"){for(Ae=ye.slice(),Y=Math.floor(Ne.length/2);Y--;){var et=Ne[Y*2],st=Ne[Y*2+1];isNaN(et)||isNaN(st)||Ae.push(et,st)}K.fill=ze.fillcolor}}}}if(le._prevtrace&&le._prevtrace.fill==="tonext"){var Ze=n.lineOptions[Y-1].positions,Ke=Ae.length/2;me=Ke;var nt=[me];for(Le=0;Le<Ze.length;Le+=2)(isNaN(Ze[Le])||isNaN(Ze[Le+1]))&&(nt.push(Le/2+Ke+1),me=Le+2);Ae=Ae.concat(Ze),K.hole=nt}return K.fillmode=le.fill,K.opacity=le.opacity,K.positions=Ae,K}}),n.fill2d.update(n.fillOptions))}var I=f.dragmode,B=d(I),_=f.clickmode.indexOf("select")>-1;for(b=0;b<S;b++){var z=T[b][0],O=z.trace,F=z.t,N=F.index,V=O._length,j=F.x,$=F.y;if(O.selectedpoints||B||_){if(B||(B=!0),O.selectedpoints){var q=n.selectBatch[N]=M.selIndices2selPoints(O),oe={};for(E=0;E<q.length;E++)oe[q[E]]=1;var Z=[];for(E=0;E<V;E++)oe[E]||Z.push(E);n.unselectBatch[N]=Z}var G=F.xpx=new Array(V),re=F.ypx=new Array(V);for(E=0;E<V;E++)G[E]=v.c2p(j[E]),re[E]=m.c2p($[E])}else F.xpx=F.ypx=null}if(B){if(n.select2d||(n.select2d=A(f._glcanvas.data()[1].regl)),n.scatter2d){var H=new Array(S);for(b=0;b<S;b++)H[b]=n.selectBatch[b].length||n.unselectBatch[b].length?n.markerUnselectedOptions[b]:{};n.scatter2d.update(H)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&T.forEach(function(K){var Y=((K||[])[0]||{}).trace||{};r.hasText(Y)&&s(K)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var J={viewport:c(f,v,m,y._context.plotGlPixelRatio),range:[(v._rl||v.range)[0],(m._rl||m.range)[0],(v._rl||v.range)[1],(m._rl||m.range)[1]]},ae=M.repeat(J,n.count);n.fill2d&&n.fill2d.update(ae),n.line2d&&n.line2d.update(ae),n.error2d&&n.error2d.update(ae.concat(ae)),n.scatter2d&&n.scatter2d.update(ae),n.select2d&&n.select2d.update(ae),n.glText&&n.glText.forEach(function(K){K.update(J)})}}};u.reglPrecompiled=a},74588:function(te,X,e){var A=e(3400);te.exports=function(o,L){var M=L._scene,d={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},g={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return L._scene||(M=L._scene={},M.init=function(){A.extendFlat(M,g,d)},M.init(),M.update=function(t){var s=A.repeat(t,M.count);if(M.fill2d&&M.fill2d.update(s),M.scatter2d&&M.scatter2d.update(s),M.line2d&&M.line2d.update(s),M.error2d&&M.error2d.update(s.concat(s)),M.select2d&&M.select2d.update(s),M.glText)for(var a=0;a<M.count;a++)M.glText[a].update(t)},M.draw=function(){for(var t=M.count,s=M.fill2d,a=M.error2d,c=M.line2d,u=M.scatter2d,l=M.glText,y=M.select2d,h=M.selectBatch,T=M.unselectBatch,f=0;f<t;f++){if(s&&M.fillOrder[f]&&s.draw(M.fillOrder[f]),c&&M.lineOptions[f]&&c.draw(f),a&&(M.errorXOptions[f]&&a.draw(f),M.errorYOptions[f]&&a.draw(f+t)),u&&M.markerOptions[f])if(T[f].length){var n=A.repeat([],M.count);n[f]=T[f],u.draw(n)}else h[f].length||u.draw(f);l[f]&&M.textOptions[f]&&l[f].render()}y&&y.draw(h),M.dirty=!1},M.destroy=function(){M.fill2d&&M.fill2d.destroy&&M.fill2d.destroy(),M.scatter2d&&M.scatter2d.destroy&&M.scatter2d.destroy(),M.error2d&&M.error2d.destroy&&M.error2d.destroy(),M.line2d&&M.line2d.destroy&&M.line2d.destroy(),M.select2d&&M.select2d.destroy&&M.select2d.destroy(),M.glText&&M.glText.forEach(function(t){t.destroy&&t.destroy()}),M.lineOptions=null,M.fillOptions=null,M.markerOptions=null,M.markerSelectedOptions=null,M.markerUnselectedOptions=null,M.errorXOptions=null,M.errorYOptions=null,M.textOptions=null,M.textSelectedOptions=null,M.textUnselectedOptions=null,M.selectBatch=null,M.unselectBatch=null,L._scene=null}),M.dirty||A.extendFlat(M,d),M}},73224:function(te,X,e){var A=e(43028),P=e(26768).styleTextSelection;te.exports=function(L,M){var d=L.cd,g=L.xaxis,r=L.yaxis,t=[],s=d[0].trace,a=d[0].t,c=s._length,u=a.x,l=a.y,y=a._scene,h=a.index;if(!y)return t;var T=A.hasText(s),f=A.hasMarkers(s),n=!f&&!T;if(s.visible!==!0||n)return t;var v=[],m=[];if(M!==!1&&!M.degenerate)for(var b=0;b<c;b++)M.contains([a.xpx[b],a.ypx[b]],!1,b,L)?(v.push(b),t.push({pointNumber:b,x:g.c2d(u[b]),y:r.c2d(l[b])})):m.push(b);if(f){var E=y.scatter2d;if(!v.length&&!m.length){var p=new Array(y.count);p[h]=y.markerOptions[h],E.update.apply(E,p)}else if(!y.selectBatch[h].length&&!y.unselectBatch[h].length){var S=new Array(y.count);S[h]=y.markerUnselectedOptions[h],E.update.apply(E,S)}}return y.selectBatch[h]=v,y.unselectBatch[h]=m,T&&P(d),t}},31512:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(98304),L=e(6096),M=e(52904),d=e(5232),g=e(45464),r=e(49084),t=e(92880).extendFlat,s=e(67824).overrideAll,a=e(5232),c=L.line,u=L.marker;te.exports=s({lon:L.lon,lat:L.lat,cluster:{enabled:{valType:"boolean"},maxzoom:t({},a.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:t({},u.opacity,{dflt:1})},mode:t({},M.mode,{dflt:"markers"}),text:t({},M.text,{}),texttemplate:P({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:t({},M.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:M.connectgaps,marker:t({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:u.opacity,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode},r("marker")),fill:L.fill,fillcolor:o(),textfont:d.layers.symbol.textfont,textposition:d.layers.symbol.textposition,below:{valType:"string"},selected:{marker:M.selected.marker},unselected:{marker:M.unselected.marker},hoverinfo:t({},g.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:A()},"calc","nested")},59392:function(te,X,e){var A=e(38248),P=e(3400),o=e(39032).BADNUM,L=e(44808),M=e(8932),d=e(43616),g=e(7152),r=e(43028),t=e(89032),s=e(10624).appendArrayPointValue,a=e(72736).NEWLINES,c=e(72736).BR_TAG_ALL;te.exports=function(m,b){var E=b[0].trace,p=E.visible===!0&&E._length!==0,S=E.fill!=="none",w=r.hasLines(E),i=r.hasMarkers(E),C=r.hasText(E),x=i&&E.marker.symbol==="circle",k=i&&E.marker.symbol!=="circle",I=E.cluster&&E.cluster.enabled,B=u("fill"),_=u("line"),z=u("circle"),O=u("symbol"),F={fill:B,line:_,circle:z,symbol:O};if(!p)return F;var N;if((S||w)&&(N=L.calcTraceToLineCoords(b)),S&&(B.geojson=L.makePolygon(N),B.layout.visibility="visible",P.extendFlat(B.paint,{"fill-color":E.fillcolor})),w&&(_.geojson=L.makeLine(N),_.layout.visibility="visible",P.extendFlat(_.paint,{"line-width":E.line.width,"line-color":E.line.color,"line-opacity":E.opacity})),x){var V=l(b);z.geojson=V.geojson,z.layout.visibility="visible",I&&(z.filter=["!",["has","point_count"]],F.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":n(E.cluster.color,E.cluster.step),"circle-radius":n(E.cluster.size,E.cluster.step),"circle-opacity":n(E.cluster.opacity,E.cluster.step)}},F.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":["Open Sans Regular","Arial Unicode MS Regular"],"text-size":12}}),P.extendFlat(z.paint,{"circle-color":V.mcc,"circle-radius":V.mrc,"circle-opacity":V.mo})}if(x&&I&&(z.filter=["!",["has","point_count"]]),(k||C)&&(O.geojson=y(b,m),P.extendFlat(O.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),k&&(P.extendFlat(O.layout,{"icon-size":E.marker.size/10}),"angle"in E.marker&&E.marker.angle!=="auto"&&P.extendFlat(O.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),O.layout["icon-allow-overlap"]=E.marker.allowoverlap,P.extendFlat(O.paint,{"icon-opacity":E.opacity*E.marker.opacity,"icon-color":E.marker.color})),C)){var j=(E.marker||{}).size,$=t(E.textposition,j);P.extendFlat(O.layout,{"text-size":E.textfont.size,"text-anchor":$.anchor,"text-offset":$.offset,"text-font":E.textfont.family.split(", ")}),P.extendFlat(O.paint,{"text-color":E.textfont.color,"text-opacity":E.opacity})}return F};function u(v){return{type:v,geojson:L.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function l(v){var m=v[0].trace,b=m.marker,E=m.selectedpoints,p=P.isArrayOrTypedArray(b.color),S=P.isArrayOrTypedArray(b.size),w=P.isArrayOrTypedArray(b.opacity),i;function C(j){return m.opacity*j}function x(j){return j/2}var k;p&&(M.hasColorscale(m,"marker")?k=M.makeColorScaleFuncFromTrace(b):k=P.identity);var I;S&&(I=g(m));var B;w&&(B=function(j){var $=A(j)?+P.constrain(j,0,1):0;return C($)});var _=[];for(i=0;i<v.length;i++){var z=v[i],O=z.lonlat;if(!f(O)){var F={};k&&(F.mcc=z.mcc=k(z.mc)),I&&(F.mrc=z.mrc=I(z.ms)),B&&(F.mo=B(z.mo)),E&&(F.selected=z.selected||0),_.push({type:"Feature",id:i+1,geometry:{type:"Point",coordinates:O},properties:F})}}var N;if(E)for(N=d.makeSelectedPointStyleFns(m),i=0;i<_.length;i++){var V=_[i].properties;N.selectedOpacityFn&&(V.mo=C(N.selectedOpacityFn(V))),N.selectedColorFn&&(V.mcc=N.selectedColorFn(V)),N.selectedSizeFn&&(V.mrc=N.selectedSizeFn(V))}return{geojson:{type:"FeatureCollection",features:_},mcc:p||N&&N.selectedColorFn?{type:"identity",property:"mcc"}:b.color,mrc:S||N&&N.selectedSizeFn?{type:"identity",property:"mrc"}:x(b.size),mo:w||N&&N.selectedOpacityFn?{type:"identity",property:"mo"}:C(b.opacity)}}function y(v,m){for(var b=m._fullLayout,E=v[0].trace,p=E.marker||{},S=p.symbol,w=p.angle,i=S!=="circle"?h(S):T,C=w!=="auto"?h(w,!0):T,x=r.hasText(E)?h(E.text):T,k=[],I=0;I<v.length;I++){var B=v[I];if(!f(B.lonlat)){var _=E.texttemplate,z;if(_){var O=Array.isArray(_)?_[I]||"":_,F=E._module.formatLabels(B,E,b),N={};s(N,E,B.i);var V=E._meta||{};z=P.texttemplateString(O,F,b._d3locale,N,B,V)}else z=x(I);z&&(z=z.replace(a,"").replace(c,`
`)),k.push({type:"Feature",geometry:{type:"Point",coordinates:B.lonlat},properties:{symbol:i(I),angle:C(I),text:z}})}}return{type:"FeatureCollection",features:k}}function h(v,m){return P.isArrayOrTypedArray(v)?m?function(b){return A(v[b])?+v[b]:0}:function(b){return v[b]}:v?function(){return v}:T}function T(){return""}function f(v){return v[0]===o}function n(v,m){var b;if(P.isArrayOrTypedArray(v)&&P.isArrayOrTypedArray(m)){b=["step",["get","point_count"],v[0]];for(var E=1;E<v.length;E++)b.push(m[E-1],v[E])}else b=v;return b}},15752:function(te,X,e){var A=e(3400),P=e(43028),o=e(74428),L=e(66828),M=e(124),d=e(70840),g=e(31512),r=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extra Bold Italic","Open Sans Extra Bold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];te.exports=function(a,c,u,l){function y(S,w){return A.coerce(a,c,g,S,w)}function h(S,w){return A.coerce2(a,c,g,S,w)}var T=t(a,c,y);if(!T){c.visible=!1;return}if(y("text"),y("texttemplate"),y("hovertext"),y("hovertemplate"),y("mode"),y("below"),P.hasMarkers(c)){o(a,c,u,l,y,{noLine:!0,noAngle:!0}),y("marker.allowoverlap"),y("marker.angle");var f=c.marker;f.symbol!=="circle"&&(A.isArrayOrTypedArray(f.size)&&(f.size=f.size[0]),A.isArrayOrTypedArray(f.color)&&(f.color=f.color[0]))}P.hasLines(c)&&(L(a,c,u,l,y,{noDash:!0}),y("connectgaps"));var n=h("cluster.maxzoom"),v=h("cluster.step"),m=h("cluster.color",c.marker&&c.marker.color||u),b=h("cluster.size"),E=h("cluster.opacity"),p=n!==!1||v!==!1||m!==!1||b!==!1||E!==!1;y("cluster.enabled",p),P.hasText(c)&&M(a,c,l,y,{noSelect:!0,font:{family:r.indexOf(l.font.family)!==-1?l.font.family:"Open Sans Regular",size:l.font.size,color:l.font.color}}),y("fill"),c.fill!=="none"&&d(a,c,u,y),A.coerceSelectionMarkerOpacity(c,y)};function t(s,a,c){var u=c("lon")||[],l=c("lat")||[],y=Math.min(u.length,l.length);return a._length=y,y}},37920:function(te){te.exports=function(e,A){return e.lon=A.lon,e.lat=A.lat,e}},11960:function(te,X,e){var A=e(54460);te.exports=function(o,L,M){var d={},g=M[L.subplot]._subplot,r=g.mockAxis,t=o.lonlat;return d.lonLabel=A.tickText(r,r.c2l(t[0]),!0).text,d.latLabel=A.tickText(r,r.c2l(t[1]),!0).text,d}},63312:function(te,X,e){var A=e(93024),P=e(3400),o=e(44928),L=P.fillText,M=e(39032).BADNUM,d=e(47552).traceLayerPrefix;function g(t,s,a){var c=t.cd,u=c[0].trace,l=t.xa,y=t.ya,h=t.subplot,T=[],f=d+u.uid+"-circle",n=u.cluster&&u.cluster.enabled;if(n){var v=h.map.queryRenderedFeatures(null,{layers:[f]});T=v.map(function(_){return _.id})}var m=s>=0?Math.floor((s+180)/360):Math.ceil((s-180)/360),b=m*360,E=s-b;function p(_){var z=_.lonlat;if(z[0]===M||n&&T.indexOf(_.i+1)===-1)return 1/0;var O=P.modHalf(z[0],360),F=z[1],N=h.project([O,F]),V=N.x-l.c2p([E,F]),j=N.y-y.c2p([O,a]),$=Math.max(3,_.mrc||0);return Math.max(Math.sqrt(V*V+j*j)-$,1-3/$)}if(A.getClosest(c,p,t),t.index!==!1){var S=c[t.index],w=S.lonlat,i=[P.modHalf(w[0],360)+b,w[1]],C=l.c2p(i),x=y.c2p(i),k=S.mrc||1;t.x0=C-k,t.x1=C+k,t.y0=x-k,t.y1=x+k;var I={};I[u.subplot]={_subplot:h};var B=u._module.formatLabels(S,u,I);return t.lonLabel=B.lonLabel,t.latLabel=B.latLabel,t.color=o(u,S),t.extraText=r(u,S,c[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}function r(t,s,a){if(t.hovertemplate)return;var c=s.hi||t.hoverinfo,u=c.split("+"),l=u.indexOf("all")!==-1,y=u.indexOf("lon")!==-1,h=u.indexOf("lat")!==-1,T=s.lonlat,f=[];function n(v){return v+"°"}return l||y&&h?f.push("("+n(T[1])+", "+n(T[0])+")"):y?f.push(a.lon+n(T[0])):h&&f.push(a.lat+n(T[1])),(l||u.indexOf("text")!==-1)&&L(s,t,f),f.join("<br>")}te.exports={hoverPoints:g,getExtraText:r}},11572:function(te,X,e){te.exports={attributes:e(31512),supplyDefaults:e(15752),colorbar:e(5528),formatLabels:e(11960),calc:e(25212),plot:e(9660),hoverPoints:e(63312).hoverPoints,eventData:e(37920),selectPoints:e(404),styleOnSelect:function(A,P){if(P){var o=P[0].trace;o._glTrace.update(P)}},moduleType:"trace",name:"scattermapbox",basePlotModule:e(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(te,X,e){var A=e(3400),P=e(59392),o=e(47552).traceLayerPrefix,L={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function M(g,r,t,s){this.type="scattermapbox",this.subplot=g,this.uid=r,this.clusterEnabled=t,this.isHidden=s,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:o+r+"-fill",line:o+r+"-line",circle:o+r+"-circle",symbol:o+r+"-symbol",cluster:o+r+"-cluster",clusterCount:o+r+"-cluster-count"},this.below=null}var d=M.prototype;d.addSource=function(g,r,t){var s={type:"geojson",data:r.geojson};t&&t.enabled&&A.extendFlat(s,{cluster:!0,clusterMaxZoom:t.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[g]);a?a.setData(r.geojson):this.subplot.map.addSource(this.sourceIds[g],s)},d.setSourceData=function(g,r){this.subplot.map.getSource(this.sourceIds[g]).setData(r.geojson)},d.addLayer=function(g,r,t){var s={type:r.type,id:this.layerIds[g],source:this.sourceIds[g],layout:r.layout,paint:r.paint};r.filter&&(s.filter=r.filter);for(var a=this.layerIds[g],c,u=this.subplot.getMapLayers(),l=0;l<u.length;l++)if(u[l].id===a){c=!0;break}c?(this.subplot.setOptions(a,"setLayoutProperty",s.layout),s.layout.visibility==="visible"&&this.subplot.setOptions(a,"setPaintProperty",s.paint)):this.subplot.addLayer(s,t)},d.update=function(r){var t=r[0].trace,s=this.subplot,a=s.map,c=P(s.gd,r),u=s.belowLookup["trace-"+this.uid],l=!!(t.cluster&&t.cluster.enabled),y=!!this.clusterEnabled,h=this;function T(w){w||h.addSource("circle",c.circle,t.cluster);for(var i=L.cluster,C=0;C<i.length;C++){var x=i[C],k=c[x];h.addLayer(x,k,u)}}function f(w){for(var i=L.cluster,C=i.length-1;C>=0;C--){var x=i[C];a.removeLayer(h.layerIds[x])}w||a.removeSource(h.sourceIds.circle)}function n(w){for(var i=L.nonCluster,C=0;C<i.length;C++){var x=i[C],k=c[x];w||h.addSource(x,k),h.addLayer(x,k,u)}}function v(w){for(var i=L.nonCluster,C=i.length-1;C>=0;C--){var x=i[C];a.removeLayer(h.layerIds[x]),w||a.removeSource(h.sourceIds[x])}}function m(w){y?f(w):v(w)}function b(w){l?T(w):n(w)}function E(){for(var w=l?L.cluster:L.nonCluster,i=0;i<w.length;i++){var C=w[i],x=c[C];x&&(s.setOptions(h.layerIds[C],"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&(C!=="cluster"&&h.setSourceData(C,x),s.setOptions(h.layerIds[C],"setPaintProperty",x.paint)))}}var p=this.isHidden,S=t.visible!==!0;S?p||m():p?S||b():y!==l?(m(),b()):(this.below!==u&&(m(!0),b(!0)),E()),this.clusterEnabled=l,this.isHidden=S,this.below=u,r[0].trace._glTrace=this},d.dispose=function(){for(var r=this.subplot.map,t=this.clusterEnabled?L.cluster:L.nonCluster,s=t.length-1;s>=0;s--){var a=t[s];r.removeLayer(this.layerIds[a]),r.removeSource(this.sourceIds[a])}},te.exports=function(r,t){var s=t[0].trace,a=s.cluster&&s.cluster.enabled,c=s.visible!==!0,u=new M(r,s.uid,a,c),l=P(r.gd,t),y=u.below=r.belowLookup["trace-"+s.uid],h,T,f;if(a)for(u.addSource("circle",l.circle,s.cluster),h=0;h<L.cluster.length;h++)T=L.cluster[h],f=l[T],u.addLayer(T,f,y);else for(h=0;h<L.nonCluster.length;h++)T=L.nonCluster[h],f=l[T],u.addSource(T,f,s.cluster),u.addLayer(T,f,y);return t[0].trace._glTrace=u,u}},404:function(te,X,e){var A=e(3400),P=e(43028),o=e(39032).BADNUM;te.exports=function(M,d){var g=M.cd,r=M.xaxis,t=M.yaxis,s=[],a=g[0].trace,c;if(!P.hasMarkers(a))return[];if(d===!1)for(c=0;c<g.length;c++)g[c].selected=0;else for(c=0;c<g.length;c++){var u=g[c],l=u.lonlat;if(l[0]!==o){var y=[A.modHalf(l[0],360),l[1]],h=[r.c2p(y),t.c2p(y)];d.contains(h,null,c,M)?(s.push({pointNumber:c,lon:l[0],lat:l[1]}),u.selected=1):u.selected=0}}return s}},8319:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(92880).extendFlat,L=e(98304),M=e(52904),d=e(45464),g=M.line;te.exports={mode:M.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:M.text,texttemplate:P({editType:"plot"},{keys:["r","theta","text"]}),hovertext:M.hovertext,line:{color:g.color,width:g.width,dash:g.dash,backoff:g.backoff,shape:o({},g.shape,{values:["linear","spline"]}),smoothing:g.smoothing,editType:"calc"},connectgaps:M.connectgaps,marker:M.marker,cliponaxis:o({},M.cliponaxis,{dflt:!1}),textposition:M.textposition,textfont:M.textfont,fill:o({},M.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:L(),hoverinfo:o({},d.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:M.hoveron,hovertemplate:A(),selected:M.selected,unselected:M.unselected}},58320:function(te,X,e){var A=e(38248),P=e(39032).BADNUM,o=e(54460),L=e(90136),M=e(20148),d=e(4500),g=e(16356).calcMarkerSize;te.exports=function(t,s){for(var a=t._fullLayout,c=s.subplot,u=a[c].radialaxis,l=a[c].angularaxis,y=u.makeCalcdata(s,"r"),h=l.makeCalcdata(s,"theta"),T=s._length,f=new Array(T),n=0;n<T;n++){var v=y[n],m=h[n],b=f[n]={};A(v)&&A(m)?(b.r=v,b.theta=m):b.r=P}var E=g(s,T);return s._extremes.x=o.findExtremes(u,y,{ppad:E}),L(t,s),M(f,s),d(f,s),f}},85968:function(te,X,e){var A=e(3400),P=e(43028),o=e(74428),L=e(66828),M=e(11731),d=e(124),g=e(70840),r=e(88200).PTS_LINESONLY,t=e(8319);function s(c,u,l,y){function h(n,v){return A.coerce(c,u,t,n,v)}var T=a(c,u,y,h);if(!T){u.visible=!1;return}h("thetaunit"),h("mode",T<r?"lines+markers":"lines"),h("text"),h("hovertext"),u.hoveron!=="fills"&&h("hovertemplate"),P.hasMarkers(u)&&o(c,u,l,y,h,{gradient:!0}),P.hasLines(u)&&(L(c,u,l,y,h,{backoff:!0}),M(c,u,h),h("connectgaps")),P.hasText(u)&&(h("texttemplate"),d(c,u,y,h));var f=[];(P.hasMarkers(u)||P.hasText(u))&&(h("cliponaxis"),h("marker.maxdisplayed"),f.push("points")),h("fill"),u.fill!=="none"&&(g(c,u,l,h),P.hasLines(u)||M(c,u,h)),(u.fill==="tonext"||u.fill==="toself")&&f.push("fills"),h("hoveron",f.join("+")||"points"),A.coerceSelectionMarkerOpacity(u,h)}function a(c,u,l,y){var h=y("r"),T=y("theta");A.isTypedArray(h)&&(u.r=h=Array.from(h)),A.isTypedArray(T)&&(u.theta=T=Array.from(T));var f;if(h)T?f=Math.min(h.length,T.length):(f=h.length,y("theta0"),y("dtheta"));else{if(!T)return 0;f=u.theta.length,y("r0"),y("dr")}return u._length=f,f}te.exports={handleRThetaDefaults:a,supplyDefaults:s}},22852:function(te,X,e){var A=e(3400),P=e(54460);te.exports=function(L,M,d){var g={},r=d[M.subplot]._subplot,t,s;r?(t=r.radialAxis,s=r.angularAxis):(r=d[M.subplot],t=r.radialaxis,s=r.angularaxis);var a=t.c2l(L.r);g.rLabel=P.tickText(t,a,!0).text;var c=s.thetaunit==="degrees"?A.rad2deg(L.theta):L.theta;return g.thetaLabel=P.tickText(s,c,!0).text,g}},8504:function(te,X,e){var A=e(98723);function P(L,M,d,g){var r=A(L,M,d,g);if(!(!r||r[0].index===!1)){var t=r[0];if(t.index===void 0)return r;var s=L.subplot,a=t.cd[t.index],c=t.trace;if(s.isPtInside(a))return t.xLabelVal=void 0,t.yLabelVal=void 0,o(a,c,s,t),t.hovertemplate=c.hovertemplate,r}}function o(L,M,d,g){var r=d.radialAxis,t=d.angularAxis;r._hovertitle="r",t._hovertitle="θ";var s={};s[M.subplot]={_subplot:d};var a=M._module.formatLabels(L,M,s);g.rLabel=a.rLabel,g.thetaLabel=a.thetaLabel;var c=L.hi||M.hoverinfo,u=[];function l(h,T){u.push(h._hovertitle+": "+T)}if(!M.hovertemplate){var y=c.split("+");y.indexOf("all")!==-1&&(y=["r","theta","text"]),y.indexOf("r")!==-1&&l(r,g.rLabel),y.indexOf("theta")!==-1&&l(t,g.thetaLabel),y.indexOf("text")!==-1&&g.text&&(u.push(g.text),delete g.text),g.extraText=u.join("<br>")}}te.exports={hoverPoints:P,makeHoverPointText:o}},76924:function(te,X,e){te.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(8319),supplyDefaults:e(85968).supplyDefaults,colorbar:e(5528),formatLabels:e(22852),calc:e(58320),plot:e(43456),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(8504).hoverPoints,selectPoints:e(91560),meta:{}}},43456:function(te,X,e){var A=e(96504),P=e(39032).BADNUM;te.exports=function(L,M,d){for(var g=M.layers.frontplot.select("g.scatterlayer"),r=M.xaxis,t=M.yaxis,s={xaxis:r,yaxis:t,plot:M.framework,layerClipId:M._hasClipOnAxisFalse?M.clipIds.forTraces:null},a=M.radialAxis,c=M.angularAxis,u=0;u<d.length;u++)for(var l=d[u],y=0;y<l.length;y++){y===0&&(l[0].trace._xA=r,l[0].trace._yA=t);var h=l[y],T=h.r;if(T===P)h.x=h.y=P;else{var f=a.c2g(T),n=c.c2g(h.theta);h.x=f*Math.cos(n),h.y=f*Math.sin(n)}}A(L,s,d,g)}},24396:function(te,X,e){var A=e(8319),P=e(2876),o=e(21776).Gw;te.exports={mode:A.mode,r:A.r,theta:A.theta,r0:A.r0,dr:A.dr,theta0:A.theta0,dtheta:A.dtheta,thetaunit:A.thetaunit,text:A.text,texttemplate:o({editType:"plot"},{keys:["r","theta","text"]}),hovertext:A.hovertext,hovertemplate:A.hovertemplate,line:{color:P.line.color,width:P.line.width,dash:P.line.dash,editType:"calc"},connectgaps:P.connectgaps,marker:P.marker,fill:P.fill,fillcolor:P.fillcolor,textposition:P.textposition,textfont:P.textfont,hoverinfo:A.hoverinfo,selected:A.selected,unselected:A.unselected}},27160:function(te,X,e){te.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:e(40872),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:e(24396),supplyDefaults:e(98608),colorbar:e(5528),formatLabels:e(94120),calc:e(66720),hoverPoints:e(1600).hoverPoints,selectPoints:e(73224),meta:{}}},66720:function(te,X,e){var A=e(90136),P=e(16356).calcMarkerSize,o=e(84236),L=e(54460),M=e(67072).TOO_MANY_POINTS;te.exports=function(g,r){var t=g._fullLayout,s=r.subplot,a=t[s].radialaxis,c=t[s].angularaxis,u=r._r=a.makeCalcdata(r,"r"),l=r._theta=c.makeCalcdata(r,"theta"),y=r._length,h={};y<u.length&&(u=u.slice(0,y)),y<l.length&&(l=l.slice(0,y)),h.r=u,h.theta=l,A(g,r);var T=h.opts=o.style(g,r),f;return y<M?f=P(r,y):T.marker&&(f=2*(T.marker.sizeAvg||Math.max(T.marker.size,3))),r._extremes.x=L.findExtremes(a,u,{ppad:f}),[{x:!1,y:!1,t:h,trace:r}]}},98608:function(te,X,e){var A=e(3400),P=e(43028),o=e(85968).handleRThetaDefaults,L=e(74428),M=e(66828),d=e(124),g=e(70840),r=e(88200).PTS_LINESONLY,t=e(24396);te.exports=function(a,c,u,l){function y(T,f){return A.coerce(a,c,t,T,f)}var h=o(a,c,l,y);if(!h){c.visible=!1;return}y("thetaunit"),y("mode",h<r?"lines+markers":"lines"),y("text"),y("hovertext"),c.hoveron!=="fills"&&y("hovertemplate"),P.hasMarkers(c)&&L(a,c,u,l,y,{noAngleRef:!0,noStandOff:!0}),P.hasLines(c)&&(M(a,c,u,l,y),y("connectgaps")),P.hasText(c)&&(y("texttemplate"),d(a,c,l,y)),y("fill"),c.fill!=="none"&&g(a,c,u,y),A.coerceSelectionMarkerOpacity(c,y)}},94120:function(te,X,e){var A=e(22852);te.exports=function(o,L,M){var d=o.i;return"r"in o||(o.r=L._r[d]),"theta"in o||(o.theta=L._theta[d]),A(o,L,M)}},1600:function(te,X,e){var A=e(41272),P=e(8504).makeHoverPointText;function o(L,M,d,g){var r=L.cd,t=r[0].t,s=t.r,a=t.theta,c=A.hoverPoints(L,M,d,g);if(!(!c||c[0].index===!1)){var u=c[0];if(u.index===void 0)return c;var l=L.subplot,y=u.cd[u.index],h=u.trace;if(y.r=s[u.index],y.theta=a[u.index],!!l.isPtInside(y))return u.xLabelVal=void 0,u.yLabelVal=void 0,P(y,h,l,u),c}}te.exports={hoverPoints:o}},62944:function(te,X,e){var A=e(27160);A.plot=e(56512),te.exports=A},56512:function(te,X,e){var A=e(3108),P=e(38248),o=e(89876),L=e(74588),M=e(84236),d=e(3400),g=e(67072).TOO_MANY_POINTS,r={};te.exports=function(s,a,c){if(c.length){var u=a.radialAxis,l=a.angularAxis,y=L(s,a);return c.forEach(function(h){if(!(!h||!h[0]||!h[0].trace)){var T=h[0],f=T.trace,n=T.t,v=f._length,m=n.r,b=n.theta,E=n.opts,p,S=m.slice(),w=b.slice();for(p=0;p<m.length;p++)a.isPtInside({r:m[p],theta:b[p]})||(S[p]=NaN,w[p]=NaN);var i=new Array(v*2),C=Array(v),x=Array(v);for(p=0;p<v;p++){var k=S[p],I,B;if(P(k)){var _=u.c2g(k),z=l.c2g(w[p],f.thetaunit);I=_*Math.cos(z),B=_*Math.sin(z)}else I=B=NaN;C[p]=i[p*2]=I,x[p]=i[p*2+1]=B}n.tree=A(i),E.marker&&v>=g&&(E.marker.cluster=n.tree),E.marker&&(E.markerSel.positions=E.markerUnsel.positions=E.marker.positions=i),E.line&&i.length>1&&d.extendFlat(E.line,M.linePositions(s,f,i)),E.text&&(d.extendFlat(E.text,{positions:i},M.textPosition(s,f,E.text,E.marker)),d.extendFlat(E.textSel,{positions:i},M.textPosition(s,f,E.text,E.markerSel)),d.extendFlat(E.textUnsel,{positions:i},M.textPosition(s,f,E.text,E.markerUnsel))),E.fill&&!y.fill2d&&(y.fill2d=!0),E.marker&&!y.scatter2d&&(y.scatter2d=!0),E.line&&!y.line2d&&(y.line2d=!0),E.text&&!y.glText&&(y.glText=!0),y.lineOptions.push(E.line),y.fillOptions.push(E.fill),y.markerOptions.push(E.marker),y.markerSelectedOptions.push(E.markerSel),y.markerUnselectedOptions.push(E.markerUnsel),y.textOptions.push(E.text),y.textSelectedOptions.push(E.textSel),y.textUnselectedOptions.push(E.textUnsel),y.selectBatch.push([]),y.unselectBatch.push([]),n.x=C,n.y=x,n.rawx=C,n.rawy=x,n.r=m,n.theta=b,n.positions=i,n._scene=y,n.index=y.count,y.count++}}),o(s,a,c)}},te.exports.reglPrecompiled=r},69496:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(92880).extendFlat,L=e(98304),M=e(52904),d=e(45464),g=M.line;te.exports={mode:M.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:M.text,texttemplate:P({editType:"plot"},{keys:["real","imag","text"]}),hovertext:M.hovertext,line:{color:g.color,width:g.width,dash:g.dash,backoff:g.backoff,shape:o({},g.shape,{values:["linear","spline"]}),smoothing:g.smoothing,editType:"calc"},connectgaps:M.connectgaps,marker:M.marker,cliponaxis:o({},M.cliponaxis,{dflt:!1}),textposition:M.textposition,textfont:M.textfont,fill:o({},M.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:L(),hoverinfo:o({},d.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:M.hoveron,hovertemplate:A(),selected:M.selected,unselected:M.unselected}},47507:function(te,X,e){var A=e(38248),P=e(39032).BADNUM,o=e(90136),L=e(20148),M=e(4500),d=e(16356).calcMarkerSize;te.exports=function(r,t){for(var s=r._fullLayout,a=t.subplot,c=s[a].realaxis,u=s[a].imaginaryaxis,l=c.makeCalcdata(t,"real"),y=u.makeCalcdata(t,"imag"),h=t._length,T=new Array(h),f=0;f<h;f++){var n=l[f],v=y[f],m=T[f]={};A(n)&&A(v)?(m.real=n,m.imag=v):m.real=P}return d(t,h),o(r,t),L(T,t),M(T,t),T}},76716:function(te,X,e){var A=e(3400),P=e(43028),o=e(74428),L=e(66828),M=e(11731),d=e(124),g=e(70840),r=e(88200).PTS_LINESONLY,t=e(69496);te.exports=function(c,u,l,y){function h(n,v){return A.coerce(c,u,t,n,v)}var T=s(c,u,y,h);if(!T){u.visible=!1;return}h("mode",T<r?"lines+markers":"lines"),h("text"),h("hovertext"),u.hoveron!=="fills"&&h("hovertemplate"),P.hasMarkers(u)&&o(c,u,l,y,h,{gradient:!0}),P.hasLines(u)&&(L(c,u,l,y,h,{backoff:!0}),M(c,u,h),h("connectgaps")),P.hasText(u)&&(h("texttemplate"),d(c,u,y,h));var f=[];(P.hasMarkers(u)||P.hasText(u))&&(h("cliponaxis"),h("marker.maxdisplayed"),f.push("points")),h("fill"),u.fill!=="none"&&(g(c,u,l,h),P.hasLines(u)||M(c,u,h)),(u.fill==="tonext"||u.fill==="toself")&&f.push("fills"),h("hoveron",f.join("+")||"points"),A.coerceSelectionMarkerOpacity(u,h)};function s(a,c,u,l){var y=l("real"),h=l("imag"),T;return y&&h&&(T=Math.min(y.length,h.length)),A.isTypedArray(y)&&(c.real=y=Array.from(y)),A.isTypedArray(h)&&(c.imag=h=Array.from(h)),c._length=T,T}},49504:function(te,X,e){var A=e(54460);te.exports=function(o,L,M){var d={},g=M[L.subplot]._subplot;return d.realLabel=A.tickText(g.radialAxis,o.real,!0).text,d.imagLabel=A.tickText(g.angularAxis,o.imag,!0).text,d}},25292:function(te,X,e){var A=e(98723);function P(L,M,d,g){var r=A(L,M,d,g);if(!(!r||r[0].index===!1)){var t=r[0];if(t.index===void 0)return r;var s=L.subplot,a=t.cd[t.index],c=t.trace;if(s.isPtInside(a))return t.xLabelVal=void 0,t.yLabelVal=void 0,o(a,c,s,t),t.hovertemplate=c.hovertemplate,r}}function o(L,M,d,g){var r=d.radialAxis,t=d.angularAxis;r._hovertitle="real",t._hovertitle="imag";var s={};s[M.subplot]={_subplot:d};var a=M._module.formatLabels(L,M,s);g.realLabel=a.realLabel,g.imagLabel=a.imagLabel;var c=L.hi||M.hoverinfo,u=[];function l(h,T){u.push(h._hovertitle+": "+T)}if(!M.hovertemplate){var y=c.split("+");y.indexOf("all")!==-1&&(y=["real","imag","text"]),y.indexOf("real")!==-1&&l(r,g.realLabel),y.indexOf("imag")!==-1&&l(t,g.imagLabel),y.indexOf("text")!==-1&&g.text&&(u.push(g.text),delete g.text),g.extraText=u.join("<br>")}}te.exports={hoverPoints:P,makeHoverPointText:o}},95443:function(te,X,e){te.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(69496),supplyDefaults:e(76716),colorbar:e(5528),formatLabels:e(49504),calc:e(47507),plot:e(34927),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(25292).hoverPoints,selectPoints:e(91560),meta:{}}},34927:function(te,X,e){var A=e(96504),P=e(39032).BADNUM,o=e(36416),L=o.smith;te.exports=function(d,g,r){for(var t=g.layers.frontplot.select("g.scatterlayer"),s=g.xaxis,a=g.yaxis,c={xaxis:s,yaxis:a,plot:g.framework,layerClipId:g._hasClipOnAxisFalse?g.clipIds.forTraces:null},u=0;u<r.length;u++)for(var l=r[u],y=0;y<l.length;y++){y===0&&(l[0].trace._xA=s,l[0].trace._yA=a);var h=l[y],T=h.real;if(T===P)h.x=h.y=P;else{var f=L([T,h.imag]);h.x=f[0],h.y=f[1]}}A(d,c,r,t)}},5896:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(98304),L=e(52904),M=e(45464),d=e(49084),g=e(98192).u,r=e(92880).extendFlat,t=L.marker,s=L.line,a=t.line;te.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:r({},L.mode,{dflt:"markers"}),text:r({},L.text,{}),texttemplate:P({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:r({},L.hovertext,{}),line:{color:s.color,width:s.width,dash:g,backoff:s.backoff,shape:r({},s.shape,{values:["linear","spline"]}),smoothing:s.smoothing,editType:"calc"},connectgaps:L.connectgaps,cliponaxis:L.cliponaxis,fill:r({},L.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o(),marker:r({symbol:t.symbol,opacity:t.opacity,angle:t.angle,angleref:t.angleref,standoff:t.standoff,maxdisplayed:t.maxdisplayed,size:t.size,sizeref:t.sizeref,sizemin:t.sizemin,sizemode:t.sizemode,line:r({width:a.width,editType:"calc"},d("marker.line")),gradient:t.gradient,editType:"calc"},d("marker")),textfont:L.textfont,textposition:L.textposition,selected:L.selected,unselected:L.unselected,hoverinfo:r({},M.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:L.hoveron,hovertemplate:A()}},34335:function(te,X,e){var A=e(38248),P=e(90136),o=e(20148),L=e(4500),M=e(16356).calcMarkerSize,d=["a","b","c"],g={a:["b","c"],b:["a","c"],c:["a","b"]};te.exports=function(t,s){var a=t._fullLayout[s.subplot],c=a.sum,u=s.sum||c,l={a:s.a,b:s.b,c:s.c},y,h,T,f,n,v;for(y=0;y<d.length;y++)if(T=d[y],!l[T]){for(n=l[g[T][0]],v=l[g[T][1]],f=new Array(n.length),h=0;h<n.length;h++)f[h]=u-n[h]-v[h];l[T]=f}var m=s._length,b=new Array(m),E,p,S,w,i,C;for(y=0;y<m;y++)E=l.a[y],p=l.b[y],S=l.c[y],A(E)&&A(p)&&A(S)?(E=+E,p=+p,S=+S,w=c/(E+p+S),w!==1&&(E*=w,p*=w,S*=w),C=E,i=S-p,b[y]={x:i,y:C,a:E,b:p,c:S}):b[y]={x:!1,y:!1};return M(s,m),P(t,s),o(b,s),L(b,s),b}},84256:function(te,X,e){var A=e(3400),P=e(88200),o=e(43028),L=e(74428),M=e(66828),d=e(11731),g=e(124),r=e(70840),t=e(5896);te.exports=function(a,c,u,l){function y(b,E){return A.coerce(a,c,t,b,E)}var h=y("a"),T=y("b"),f=y("c"),n;if(h?(n=h.length,T?(n=Math.min(n,T.length),f&&(n=Math.min(n,f.length))):f?n=Math.min(n,f.length):n=0):T&&f&&(n=Math.min(T.length,f.length)),!n){c.visible=!1;return}c._length=n,y("sum"),y("text"),y("hovertext"),c.hoveron!=="fills"&&y("hovertemplate");var v=n<P.PTS_LINESONLY?"lines+markers":"lines";y("mode",v),o.hasMarkers(c)&&L(a,c,u,l,y,{gradient:!0}),o.hasLines(c)&&(M(a,c,u,l,y,{backoff:!0}),d(a,c,y),y("connectgaps")),o.hasText(c)&&(y("texttemplate"),g(a,c,l,y));var m=[];(o.hasMarkers(c)||o.hasText(c))&&(y("cliponaxis"),y("marker.maxdisplayed"),m.push("points")),y("fill"),c.fill!=="none"&&(r(a,c,u,y),o.hasLines(c)||d(a,c,y)),(c.fill==="tonext"||c.fill==="toself")&&m.push("fills"),y("hoveron",m.join("+")||"points"),A.coerceSelectionMarkerOpacity(c,y)}},97476:function(te){te.exports=function(e,A,P,o,L){if(A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),o[L]){var M=o[L];e.a=M.a,e.b=M.b,e.c=M.c}else e.a=A.a,e.b=A.b,e.c=A.c;return e}},90404:function(te,X,e){var A=e(54460);te.exports=function(o,L,M){var d={},g=M[L.subplot]._subplot;return d.aLabel=A.tickText(g.aaxis,o.a,!0).text,d.bLabel=A.tickText(g.baxis,o.b,!0).text,d.cLabel=A.tickText(g.caxis,o.c,!0).text,d}},26596:function(te,X,e){var A=e(98723);te.exports=function(o,L,M,d){var g=A(o,L,M,d);if(!g||g[0].index===!1)return;var r=g[0];if(r.index===void 0){var t=1-r.y0/o.ya._length,s=o.xa._length,a=s*t/2,c=s-a;return r.x0=Math.max(Math.min(r.x0,c),a),r.x1=Math.max(Math.min(r.x1,c),a),g}var u=r.cd[r.index],l=r.trace,y=r.subplot;r.a=u.a,r.b=u.b,r.c=u.c,r.xLabelVal=void 0,r.yLabelVal=void 0;var h={};h[l.subplot]={_subplot:y};var T=l._module.formatLabels(u,l,h);r.aLabel=T.aLabel,r.bLabel=T.bLabel,r.cLabel=T.cLabel;var f=u.hi||l.hoverinfo,n=[];function v(b,E){n.push(b._hovertitle+": "+E)}if(!l.hovertemplate){var m=f.split("+");m.indexOf("all")!==-1&&(m=["a","b","c"]),m.indexOf("a")!==-1&&v(y.aaxis,r.aLabel),m.indexOf("b")!==-1&&v(y.baxis,r.bLabel),m.indexOf("c")!==-1&&v(y.caxis,r.cLabel)}return r.extraText=n.join("<br>"),r.hovertemplate=l.hovertemplate,g}},34864:function(te,X,e){te.exports={attributes:e(5896),supplyDefaults:e(84256),colorbar:e(5528),formatLabels:e(90404),calc:e(34335),plot:e(88776),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(26596),selectPoints:e(91560),eventData:e(97476),moduleType:"trace",name:"scatterternary",basePlotModule:e(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(te,X,e){var A=e(96504);te.exports=function(o,L,M){var d=L.plotContainer;d.select(".scatterlayer").selectAll("*").remove();for(var g=L.xaxis,r=L.yaxis,t={xaxis:g,yaxis:r,plot:d,layerClipId:L._hasClipOnAxisFalse?L.clipIdRelative:null},s=L.layers.frontplot.select("g.scatterlayer"),a=0;a<M.length;a++){var c=M[a];c.length&&(c[0].trace._xA=g,c[0].trace._yA=r)}A(o,t,M,s)}},44524:function(te,X,e){var A=e(52904),P=e(49084),o=e(29736).axisHoverFormat,L=e(21776).Ks,M=e(2876),d=e(33816).idRegex,g=e(31780).templatedArray,r=e(92880).extendFlat,t=A.marker,s=t.line,a=r(P("marker.line",{editTypeOverride:"calc"}),{width:r({},s.width,{editType:"calc"}),editType:"calc"}),c=r(P("marker"),{symbol:t.symbol,angle:t.angle,size:r({},t.size,{editType:"markerSize"}),sizeref:t.sizeref,sizemin:t.sizemin,sizemode:t.sizemode,opacity:t.opacity,colorbar:t.colorbar,line:a,editType:"calc"});c.color.editType=c.cmin.editType=c.cmax.editType="style";function u(l){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:d[l],editType:"plot"}}}te.exports={dimensions:g("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:r({},M.text,{}),hovertext:r({},M.hovertext,{}),hovertemplate:L(),xhoverformat:o("x"),yhoverformat:o("y"),marker:c,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:M.selected.marker,editType:"calc"},unselected:{marker:M.unselected.marker,editType:"calc"},opacity:M.opacity}},28888:function(te,X,e){var A=e(24040),P=e(12704);te.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e(44524),supplyDefaults:e(69544),colorbar:e(5528),calc:e(66821),plot:e(54840),hoverPoints:e(72248).hoverPoints,selectPoints:e(62500),editStyle:e(83156),meta:{}},A.register(P)},99332:function(te,X,e){var A=e(13472),P=e(24040),o=e(5048),L=e(84888)._M,M=e(57952),d=e(79811).getFromId,g=e(54460).shouldShowZeroLine,r="splom",t={};function s(h){var T=h._fullLayout,f=P.getModule(r),n=L(h.calcdata,f)[0],v=o(h,["ANGLE_instanced_arrays","OES_element_index_uint"],t);v&&(T._hasOnlyLargeSploms&&u(h),f.plot(h,{},n))}function a(h){var T=h.calcdata,f=h._fullLayout;f._hasOnlyLargeSploms&&u(h);for(var n=0;n<T.length;n++){var v=T[n][0],m=v.trace,b=f._splomScenes[m.uid];m.type==="splom"&&b&&b.matrix&&c(h,m,b)}}function c(h,T,f){for(var n=f.matrixOptions.data.length,v=T._visibleDims,m=f.viewOpts.ranges=new Array(n),b=0;b<v.length;b++){var E=v[b],p=m[b]=new Array(4),S=d(h,T._diag[E][0]);S&&(p[0]=S.r2l(S.range[0]),p[2]=S.r2l(S.range[1]));var w=d(h,T._diag[E][1]);w&&(p[1]=w.r2l(w.range[0]),p[3]=w.r2l(w.range[1]))}f.selectBatch.length||f.unselectBatch.length?f.matrix.update({ranges:m},{ranges:m}):f.matrix.update({ranges:m})}function u(h){var T=h._fullLayout,f=T._glcanvas.data()[0].regl,n=T._splomGrid;n||(n=T._splomGrid=A(f)),n.update(l(h))}function l(h){var T=h._context.plotGlPixelRatio,f=h._fullLayout,n=f._size,v=[0,0,f.width*T,f.height*T],m={},b;function E(V,j,$,q,oe,Z){$*=T,q*=T,oe*=T,Z*=T;var G=j[V+"color"],re=j[V+"width"],H=String(G+re);H in m?m[H].data.push(NaN,NaN,$,q,oe,Z):m[H]={data:[$,q,oe,Z],join:"rect",thickness:re*T,color:G,viewport:v,range:v,overlay:!1}}for(b in f._splomSubplots){var p=f._plots[b],S=p.xaxis,w=p.yaxis,i=S._gridVals,C=w._gridVals,x=S._offset,k=S._length,I=w._length,B=n.b+w.domain[0]*n.h,_=-w._m,z=-_*w.r2l(w.range[0],w.calendar),O,F;if(S.showgrid)for(b=0;b<i.length;b++)O=x+S.l2p(i[b].x),E("grid",S,O,B,O,B+I);if(w.showgrid)for(b=0;b<C.length;b++)F=B+z+_*C[b].x,E("grid",w,x,F,x+k,F);g(h,S,w)&&(O=x+S.l2p(0),E("zeroline",S,O,B,O,B+I)),g(h,w,S)&&(F=B+z+0,E("zeroline",w,x,F,x+k,F))}var N=[];for(b in m)N.push(m[b]);return N}function y(h,T,f,n){var v={},m;if(n._splomScenes){for(m=0;m<h.length;m++){var b=h[m];b.type==="splom"&&(v[b.uid]=1)}for(m=0;m<f.length;m++){var E=f[m];if(!v[E.uid]){var p=n._splomScenes[E.uid];p&&p.destroy&&p.destroy(),n._splomScenes[E.uid]=null,delete n._splomScenes[E.uid]}}}Object.keys(n._splomScenes||{}).length===0&&delete n._splomScenes,n._splomGrid&&!T._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),M.clean(h,T,f,n)}te.exports={name:r,attr:M.attr,attrRegex:M.attrRegex,layoutAttributes:M.layoutAttributes,supplyLayoutDefaults:M.supplyLayoutDefaults,drawFramework:M.drawFramework,plot:s,drag:a,updateGrid:u,clean:y,updateFx:M.updateFx,toSVG:M.toSVG,reglPrecompiled:t}},66821:function(te,X,e){var A=e(3400),P=e(79811),o=e(16356).calcMarkerSize,L=e(16356).calcAxisExpansion,M=e(90136),d=e(84236).markerSelection,g=e(84236).markerStyle,r=e(72308),t=e(39032).BADNUM,s=e(67072).TOO_MANY_POINTS;te.exports=function(c,u){var l=u.dimensions,y=u._length,h={},T=h.cdata=[],f=h.data=[],n=u._visibleDims=[],v,m,b,E,p;function S(k,I){for(var B=k.makeCalcdata({v:I.values,vcalendar:u.calendar},"v"),_=0;_<B.length;_++)B[_]=B[_]===t?NaN:B[_];T.push(B),f.push(k.type==="log"?A.simpleMap(B,k.c2l):B)}for(v=0;v<l.length;v++)if(b=l[v],b.visible){if(E=P.getFromId(c,u._diag[v][0]),p=P.getFromId(c,u._diag[v][1]),E&&p&&E.type!==p.type){A.log("Skipping splom dimension "+v+" with conflicting axis types");continue}E?(S(E,b),p&&p.type==="category"&&(p._categories=E._categories.slice())):S(p,b),n.push(v)}M(c,u),A.extendFlat(h,g(c,u));var w=T.length,i=w*y>s,C;for(i?C=h.sizeAvg||Math.max(h.size,3):C=o(u,y),m=0;m<n.length;m++)v=n[m],b=l[v],E=P.getFromId(c,u._diag[v][0])||{},p=P.getFromId(c,u._diag[v][1])||{},L(c,u,E,p,T[m],T[m],C);var x=r(c,u);return x.matrix||(x.matrix=!0),x.matrixOptions=h,x.selectedOptions=d(c,u,u.selected),x.unselectedOptions=d(c,u,u.unselected),[{x:!1,y:!1,t:{},trace:u}]}},69544:function(te,X,e){var A=e(3400),P=e(51272),o=e(44524),L=e(43028),M=e(74428),d=e(26284),g=e(80088).isOpenSymbol;te.exports=function(a,c,u,l){function y(E,p){return A.coerce(a,c,o,E,p)}var h=P(a,c,{name:"dimensions",handleItemDefaults:r}),T=y("diagonal.visible"),f=y("showupperhalf"),n=y("showlowerhalf"),v=d(c,h,"values");if(!v||!T&&!f&&!n){c.visible=!1;return}y("text"),y("hovertext"),y("hovertemplate"),y("xhoverformat"),y("yhoverformat"),M(a,c,u,l,y,{noAngleRef:!0,noStandOff:!0});var m=g(c.marker.symbol),b=L.isBubble(c);y("marker.line.width",m||b?1:0),t(a,c,l,y),A.coerceSelectionMarkerOpacity(c,y)};function r(s,a){function c(l,y){return A.coerce(s,a,o.dimensions,l,y)}c("label");var u=c("values");u&&u.length?c("visible"):a.visible=!1,c("axis.type"),c("axis.matches")}function t(s,a,c,u){var l=a.dimensions,y=l.length,h=a.showupperhalf,T=a.showlowerhalf,f=a.diagonal.visible,n,v,m=new Array(y),b=new Array(y);for(n=0;n<y;n++){var E=n?n+1:"";m[n]="x"+E,b[n]="y"+E}var p=u("xaxes",m),S=u("yaxes",b),w=a._diag=new Array(y);a._xaxes={},a._yaxes={};var i=[],C=[];function x(V,j,$,q){if(V){var oe=V.charAt(0),Z=c._splomAxes[oe];if(a["_"+oe+"axes"][V]=1,q.push(V),!(V in Z)){var G=Z[V]={};$&&(G.label=$.label||"",$.visible&&$.axis&&($.axis.type&&(G.type=$.axis.type),$.axis.matches&&(G.matches=j)))}}}var k=!f&&!T,I=!f&&!h;for(a._axesDim={},n=0;n<y;n++){var B=l[n],_=n===0,z=n===y-1,O=_&&k||z&&I?void 0:p[n],F=_&&I||z&&k?void 0:S[n];x(O,F,B,i),x(F,O,B,C),w[n]=[O,F],a._axesDim[O]=n,a._axesDim[F]=n}for(n=0;n<i.length;n++)for(v=0;v<C.length;v++){var N=i[n]+C[v];(n>v&&h||n<v&&T||n===v&&(f||!T||!h))&&(c._splomSubplots[N]=1)}(!T||!f&&h&&T)&&(c._splomGridDflt.xside="bottom",c._splomGridDflt.yside="left")}},83156:function(te,X,e){var A=e(3400),P=e(90136),o=e(84236).markerStyle;te.exports=function(M,d){var g=d.trace,r=M._fullLayout._splomScenes[g.uid];if(r){P(M,g),A.extendFlat(r.matrixOptions,o(M,g));var t=A.extendFlat({},r.matrixOptions,r.viewOpts);r.matrix.update(t,null)}}},50328:function(te,X){X.getDimIndex=function(A,P){for(var o=P._id,L=o.charAt(0),M={x:0,y:1}[L],d=A._visibleDims,g=0;g<d.length;g++){var r=d[g];if(A._diag[r][M]===o)return g}return!1}},72248:function(te,X,e){var A=e(50328),P=e(41272).calcHover;function o(L,M,d){var g=L.cd,r=g[0].trace,t=L.scene,s=t.matrixOptions.cdata,a=L.xa,c=L.ya,u=a.c2p(M),l=c.c2p(d),y=L.distance,h=A.getDimIndex(r,a),T=A.getDimIndex(r,c);if(h===!1||T===!1)return[L];for(var f=s[h],n=s[T],v,m,b=y,E=0;E<f.length;E++){var p=f[E],S=n[E],w=a.c2p(p)-u,i=c.c2p(S)-l,C=Math.sqrt(w*w+i*i);C<b&&(b=m=C,v=E)}return L.index=v,L.distance=b,L.dxy=m,v===void 0?[L]:[P(L,f,n,r)]}te.exports={hoverPoints:o}},97924:function(te,X,e){var A=e(28888);A.basePlotModule=e(99332),te.exports=A},54840:function(te,X,e){var A=e(55795),P=e(3400),o=e(79811),L=e(72760).selectMode;te.exports=function(g,r,t){if(t.length)for(var s=0;s<t.length;s++)M(g,t[s][0])};function M(d,g){var r=d._fullLayout,t=r._size,s=g.trace,a=g.t,c=r._splomScenes[s.uid],u=c.matrixOptions,l=u.cdata,y=r._glcanvas.data()[0].regl,h=r.dragmode,T,f,n,v,m;if(l.length!==0){u.lower=s.showupperhalf,u.upper=s.showlowerhalf,u.diagonal=s.diagonal.visible;var b=s._visibleDims,E=l.length,p=c.viewOpts={};for(p.ranges=new Array(E),p.domains=new Array(E),m=0;m<b.length;m++){n=b[m];var S=p.ranges[m]=new Array(4),w=p.domains[m]=new Array(4);T=o.getFromId(d,s._diag[n][0]),T&&(S[0]=T._rl[0],S[2]=T._rl[1],w[0]=T.domain[0],w[2]=T.domain[1]),f=o.getFromId(d,s._diag[n][1]),f&&(S[1]=f._rl[0],S[3]=f._rl[1],w[1]=f.domain[0],w[3]=f.domain[1])}var i=d._context.plotGlPixelRatio,C=t.l*i,x=t.b*i,k=t.w*i,I=t.h*i;p.viewport=[C,x,k+C,I+x],c.matrix===!0&&(c.matrix=A(y));var B=r.clickmode.indexOf("select")>-1,_=L(h)||!!s.selectedpoints||B,z=!0;if(_){var O=s._length;if(s.selectedpoints){c.selectBatch=s.selectedpoints;var F=s.selectedpoints,N={};for(n=0;n<F.length;n++)N[F[n]]=!0;var V=[];for(n=0;n<O;n++)N[n]||V.push(n);c.unselectBatch=V}var j=a.xpx=new Array(E),$=a.ypx=new Array(E);for(m=0;m<b.length;m++){if(n=b[m],T=o.getFromId(d,s._diag[n][0]),T)for(j[m]=new Array(O),v=0;v<O;v++)j[m][v]=T.c2p(l[m][v]);if(f=o.getFromId(d,s._diag[n][1]),f)for($[m]=new Array(O),v=0;v<O;v++)$[m][v]=f.c2p(l[m][v])}if(c.selectBatch.length||c.unselectBatch.length){var q=P.extendFlat({},u,c.unselectedOptions,p),oe=P.extendFlat({},u,c.selectedOptions,p);c.matrix.update(q,oe),z=!1}}else a.xpx=a.ypx=null;if(z){var Z=P.extendFlat({},u,p);c.matrix.update(Z,null)}}}},72308:function(te,X,e){var A=e(3400);te.exports=function(o,L){var M=o._fullLayout,d=L.uid,g=M._splomScenes;g||(g=M._splomScenes={});var r={dirty:!0,selectBatch:[],unselectBatch:[]},t={matrix:!1,selectBatch:[],unselectBatch:[]},s=g[L.uid];return s||(s=g[d]=A.extendFlat({},r,t),s.draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||A.extendFlat(s,r),s}},62500:function(te,X,e){var A=e(3400),P=A.pushUnique,o=e(43028),L=e(50328);te.exports=function(d,g){var r=d.cd,t=r[0].trace,s=r[0].t,a=d.scene,c=a.matrixOptions.cdata,u=d.xaxis,l=d.yaxis,y=[];if(!a)return y;var h=!o.hasMarkers(t)&&!o.hasText(t);if(t.visible!==!0||h)return y;var T=L.getDimIndex(t,u),f=L.getDimIndex(t,l);if(T===!1||f===!1)return y;var n=s.xpx[T],v=s.ypx[f],m=c[T],b=c[f],E=(d.scene.selectBatch||[]).slice(),p=[];if(g!==!1&&!g.degenerate)for(var S=0;S<m.length;S++)g.contains([n[S],v[S]],null,S,d)?(y.push({pointNumber:S,x:m[S],y:b[S]}),P(E,S)):E.indexOf(S)!==-1?P(E,S):p.push(S);var w=a.matrixOptions;return!E.length&&!p.length?a.matrix.update(w,null):!a.selectBatch.length&&!a.unselectBatch.length&&a.matrix.update(a.unselectedOptions,A.extendFlat({},w,a.selectedOptions,a.viewOpts)),a.selectBatch=E,a.unselectBatch=p,y}},90167:function(te,X,e){var A=e(49084),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(52948),M=e(45464),d=e(92880).extendFlat,g={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:o({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:P("u",1),vhoverformat:P("v",1),whoverformat:P("w",1),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),showlegend:d({},M.showlegend,{dflt:!1})};d(g,A("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(t){g[t]=L[t]}),g.hoverinfo=d({},M.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),g.transforms=void 0,te.exports=g},3832:function(te,X,e){var A=e(3400),P=e(47128);function o(g,r){r._len=Math.min(r.u.length,r.v.length,r.w.length,r.x.length,r.y.length,r.z.length),r._u=d(r.u,r._len),r._v=d(r.v,r._len),r._w=d(r.w,r._len),r._x=d(r.x,r._len),r._y=d(r.y,r._len),r._z=d(r.z,r._len);var t=L(r);r._gridFill=t.fill,r._Xs=t.Xs,r._Ys=t.Ys,r._Zs=t.Zs,r._len=t.len;var s=0,a,c,u;r.starts&&(a=d(r.starts.x||[]),c=d(r.starts.y||[]),u=d(r.starts.z||[]),s=Math.min(a.length,c.length,u.length)),r._startsX=a||[],r._startsY=c||[],r._startsZ=u||[];var l=0,y=1/0,h;for(h=0;h<r._len;h++){var T=r._u[h],f=r._v[h],n=r._w[h],v=Math.sqrt(T*T+f*f+n*n);l=Math.max(l,v),y=Math.min(y,v)}for(P(g,r,{vals:[y,l],containerStr:"",cLetter:"c"}),h=0;h<s;h++){var m=a[h];t.xMax=Math.max(t.xMax,m),t.xMin=Math.min(t.xMin,m);var b=c[h];t.yMax=Math.max(t.yMax,b),t.yMin=Math.min(t.yMin,b);var E=u[h];t.zMax=Math.max(t.zMax,E),t.zMin=Math.min(t.zMin,E)}r._slen=s,r._normMax=l,r._xbnds=[t.xMin,t.xMax],r._ybnds=[t.yMin,t.yMax],r._zbnds=[t.zMin,t.zMax]}function L(g){var r=g._x,t=g._y,s=g._z,a=g._len,c,u,l,y=-1/0,h=1/0,T=-1/0,f=1/0,n=-1/0,v=1/0,m="",b,E,p,S,w,i,C,x,k;for(a&&(S=r[0],i=t[0],x=s[0]),a>1&&(w=r[a-1],C=t[a-1],k=s[a-1]),c=0;c<a;c++)y=Math.max(y,r[c]),h=Math.min(h,r[c]),T=Math.max(T,t[c]),f=Math.min(f,t[c]),n=Math.max(n,s[c]),v=Math.min(v,s[c]),!b&&r[c]!==S&&(b=!0,m+="x"),!E&&t[c]!==i&&(E=!0,m+="y"),!p&&s[c]!==x&&(p=!0,m+="z");b||(m+="x"),E||(m+="y"),p||(m+="z");var I=M(g._x),B=M(g._y),_=M(g._z);m=m.replace("x",(S>w?"-":"+")+"x"),m=m.replace("y",(i>C?"-":"+")+"y"),m=m.replace("z",(x>k?"-":"+")+"z");var z=function(){a=0,I=[],B=[],_=[]};(!a||a<I.length*B.length*_.length)&&z();var O=function(le){return le==="x"?r:le==="y"?t:s},F=function(le){return le==="x"?I:le==="y"?B:_},N=function(le){return le[a-1]<le[0]?-1:1},V=O(m[1]),j=O(m[3]),$=O(m[5]),q=F(m[1]).length,oe=F(m[3]).length,Z=F(m[5]).length,G=!1,re=function(le,de,we){return q*(oe*le+de)+we},H=N(O(m[1])),J=N(O(m[3])),ae=N(O(m[5]));for(c=0;c<Z-1;c++){for(u=0;u<oe-1;u++){for(l=0;l<q-1;l++){var K=re(c,u,l),Y=re(c,u,l+1),ie=re(c,u+1,l),ne=re(c+1,u,l);if((!(V[K]*H<V[Y]*H)||!(j[K]*J<j[ie]*J)||!($[K]*ae<$[ne]*ae))&&(G=!0),G)break}if(G)break}if(G)break}return G&&(A.warn("Encountered arbitrary coordinates! Unable to input data grid."),z()),{xMin:h,yMin:f,zMin:v,xMax:y,yMax:T,zMax:n,Xs:I,Ys:B,Zs:_,len:a,fill:m}}function M(g){return A.distinctVals(g).vals}function d(g,r){if(r===void 0&&(r=g.length),A.isTypedArray(g))return g.subarray(0,r);for(var t=[],s=0;s<r;s++)t[s]=+g[s];return t}te.exports={calc:o,filter:d,processGrid:L}},25668:function(te,X,e){var A=e(67792).gl_streamtube3d,P=A.createTubeMesh,o=e(3400),L=e(33040).parseColorScale,M=e(8932).extractOpts,d=e(52094),g={xaxis:0,yaxis:1,zaxis:2};function r(l,y){this.scene=l,this.uid=y,this.mesh=null,this.data=null}var t=r.prototype;t.handlePick=function(l){var y=this.scene.fullSceneLayout,h=this.scene.dataScale;function T(v,m){var b=y[m],E=h[g[m]];return b.l2c(v)/E}if(l.object===this.mesh){var f=l.data.position,n=l.data.velocity;return l.traceCoordinate=[T(f[0],"xaxis"),T(f[1],"yaxis"),T(f[2],"zaxis"),T(n[0],"xaxis"),T(n[1],"yaxis"),T(n[2],"zaxis"),l.data.intensity*this.data._normMax,l.data.divergence],l.textLabel=this.data.hovertext||this.data.text,!0}};function s(l){var y=l.length,h;return y>2?h=l.slice(1,y-1):y===2?h=[(l[0]+l[1])/2]:h=l,h}function a(l){var y=l.length;return y===1?[.5,.5]:[l[1]-l[0],l[y-1]-l[y-2]]}function c(l,y){var h=l.fullSceneLayout,T=l.dataScale,f=y._len,n={};function v(oe,Z){var G=h[Z],re=T[g[Z]];return o.simpleMap(oe,function(H){return G.d2l(H)*re})}if(n.vectors=d(v(y._u,"xaxis"),v(y._v,"yaxis"),v(y._w,"zaxis"),f),!f)return{positions:[],cells:[]};var m=v(y._Xs,"xaxis"),b=v(y._Ys,"yaxis"),E=v(y._Zs,"zaxis");n.meshgrid=[m,b,E],n.gridFill=y._gridFill;var p=y._slen;if(p)n.startingPositions=d(v(y._startsX,"xaxis"),v(y._startsY,"yaxis"),v(y._startsZ,"zaxis"));else{for(var S=b[0],w=s(m),i=s(E),C=new Array(w.length*i.length),x=0,k=0;k<w.length;k++)for(var I=0;I<i.length;I++)C[x++]=[w[k],S,i[I]];n.startingPositions=C}n.colormap=L(y),n.tubeSize=y.sizeref,n.maxLength=y.maxdisplayed;var B=v(y._xbnds,"xaxis"),_=v(y._ybnds,"yaxis"),z=v(y._zbnds,"zaxis"),O=a(m),F=a(b),N=a(E),V=[[B[0]-O[0],_[0]-F[0],z[0]-N[0]],[B[1]+O[1],_[1]+F[1],z[1]+N[1]]],j=A(n,V),$=M(y);j.vertexIntensityBounds=[$.min/y._normMax,$.max/y._normMax];var q=y.lightposition;return j.lightPosition=[q.x,q.y,q.z],j.ambient=y.lighting.ambient,j.diffuse=y.lighting.diffuse,j.specular=y.lighting.specular,j.roughness=y.lighting.roughness,j.fresnel=y.lighting.fresnel,j.opacity=y.opacity,y._pad=j.tubeScale*y.sizeref*2,j}t.update=function(l){this.data=l;var y=c(this.scene,l);this.mesh.update(y)},t.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function u(l,y){var h=l.glplot.gl,T=c(l,y),f=P(h,T),n=new r(l,y.uid);return n.mesh=f,n.data=y,f._trace=n,l.glplot.add(f),n}te.exports=u},54304:function(te,X,e){var A=e(3400),P=e(27260),o=e(90167);te.exports=function(M,d,g,r){function t(h,T){return A.coerce(M,d,o,h,T)}var s=t("u"),a=t("v"),c=t("w"),u=t("x"),l=t("y"),y=t("z");if(!s||!s.length||!a||!a.length||!c||!c.length||!u||!u.length||!l||!l.length||!y||!y.length){d.visible=!1;return}t("starts.x"),t("starts.y"),t("starts.z"),t("maxdisplayed"),t("sizeref"),t("lighting.ambient"),t("lighting.diffuse"),t("lighting.specular"),t("lighting.roughness"),t("lighting.fresnel"),t("lightposition.x"),t("lightposition.y"),t("lightposition.z"),P(M,d,r,t,{prefix:"",cLetter:"c"}),t("text"),t("hovertext"),t("hovertemplate"),t("uhoverformat"),t("vhoverformat"),t("whoverformat"),t("xhoverformat"),t("yhoverformat"),t("zhoverformat"),d._length=null}},15436:function(te,X,e){te.exports={moduleType:"trace",name:"streamtube",basePlotModule:e(12536),categories:["gl3d","showLegend"],attributes:e(90167),supplyDefaults:e(54304),colorbar:{min:"cmin",max:"cmax"},calc:e(3832).calc,plot:e(25668),eventData:function(A,P){return A.tubex=A.x,A.tubey=A.y,A.tubez=A.z,A.tubeu=P.traceCoordinate[3],A.tubev=P.traceCoordinate[4],A.tubew=P.traceCoordinate[5],A.norm=P.traceCoordinate[6],A.divergence=P.traceCoordinate[7],delete A.x,delete A.y,delete A.z,A},meta:{}}},424:function(te,X,e){var A=e(45464),P=e(21776).Ks,o=e(21776).Gw,L=e(49084),M=e(86968).u,d=e(74996),g=e(27328),r=e(92880).extendFlat,t=e(98192).c;te.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:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},d.marker.line.color,{dflt:null}),width:r({},d.marker.line.width,{dflt:1}),editType:"calc"},pattern:t,editType:"calc"},L("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:d.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:o({editType:"plot"},{keys:g.eventDataKeys.concat(["label","value"])}),hovertext:d.hovertext,hoverinfo:r({},A.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:P({},{keys:g.eventDataKeys}),textfont:d.textfont,insidetextorientation:d.insidetextorientation,insidetextfont:d.insidetextfont,outsidetextfont:r({},d.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:d.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:M({name:"sunburst",trace:!0,editType:"calc"})}},54904:function(te,X,e){var A=e(7316);X.name="sunburst",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},3776:function(te,X,e){var A=e(74148),P=e(38248),o=e(3400),L=e(8932).makeColorScaleFuncFromTrace,M=e(45768).makePullColorFn,d=e(45768).generateExtendedColors,g=e(8932).calc,r=e(39032).ALMOST_EQUAL,t={},s={},a={};X.calc=function(u,l){var y=u._fullLayout,h=l.ids,T=o.isArrayOrTypedArray(h),f=l.labels,n=l.parents,v=l.values,m=o.isArrayOrTypedArray(v),b=[],E={},p={},S=function(H,J){E[H]?E[H].push(J):E[H]=[J],p[J]=1},w=function(H){return H||typeof H=="number"},i=function(H){return!m||P(v[H])&&v[H]>=0},C,x,k;T?(C=Math.min(h.length,n.length),x=function(H){return w(h[H])&&i(H)},k=function(H){return String(h[H])}):(C=Math.min(f.length,n.length),x=function(H){return w(f[H])&&i(H)},k=function(H){return String(f[H])}),m&&(C=Math.min(C,v.length));for(var I=0;I<C;I++)if(x(I)){var B=k(I),_=w(n[I])?String(n[I]):"",z={i:I,id:B,pid:_,label:w(f[I])?String(f[I]):""};m&&(z.v=+v[I]),b.push(z),S(_,B)}if(E[""]){if(E[""].length>1){for(var N=o.randstr(),V=0;V<b.length;V++)b[V].pid===""&&(b[V].pid=N);b.unshift({hasMultipleRoots:!0,id:N,pid:"",label:""})}}else{var O=[],F;for(F in E)p[F]||O.push(F);if(O.length===1)F=O[0],b.unshift({hasImpliedRoot:!0,id:F,pid:"",label:F});else return o.warn(["Multiple implied roots, cannot build",l.type,"hierarchy of",l.name+".","These roots include:",O.join(", ")].join(" "))}var j;try{j=A.stratify().id(function(H){return H.id}).parentId(function(H){return H.pid})(b)}catch(H){return o.warn(["Failed to build",l.type,"hierarchy of",l.name+".","Error:",H.message].join(" "))}var $=A.hierarchy(j),q=!1;if(m)switch(l.branchvalues){case"remainder":$.sum(function(H){return H.data.v});break;case"total":$.each(function(H){var J=H.data.data,ae=J.v;if(H.children){var K=H.children.reduce(function(Y,ie){return Y+ie.data.data.v},0);if((J.hasImpliedRoot||J.hasMultipleRoots)&&(ae=K),ae<K*r)return q=!0,o.warn(["Total value for node",H.data.data.id,"of",l.name,"is smaller than the sum of its children.",`
parent value =`,ae,`
children sum =`,K].join(" "))}H.value=ae});break}else c($,l,{branches:l.count.indexOf("branches")!==-1,leaves:l.count.indexOf("leaves")!==-1});if(!q){l.sort&&$.sort(function(H,J){return J.value-H.value});var oe,Z,G=l.marker.colors||[],re=!!G.length;return l._hasColorscale?(re||(G=m?l.values:l._values),g(u,l,{vals:G,containerStr:"marker",cLetter:"c"}),Z=L(l.marker)):oe=M(y["_"+l.type+"colormap"]),$.each(function(H){var J=H.data.data;J.color=l._hasColorscale?Z(G[J.i]):oe(G[J.i],J.id)}),b[0].hierarchy=$,b}},X._runCrossTraceCalc=function(u,l){var y=l._fullLayout,h=l.calcdata,T=y[u+"colorway"],f=y["_"+u+"colormap"];y["extend"+u+"colors"]&&(T=d(T,u==="icicle"?a:u==="treemap"?s:t));var n=0,v;function m(S){var w=S.data.data,i=w.id;w.color===!1&&(f[i]?w.color=f[i]:S.parent?S.parent.parent?w.color=S.parent.data.data.color:(f[i]=w.color=T[n%T.length],n++):w.color=v)}for(var b=0;b<h.length;b++){var E=h[b],p=E[0];p.trace.type===u&&p.hierarchy&&(v=p.trace.root.color,p.hierarchy.each(m))}},X.crossTraceCalc=function(u){return X._runCrossTraceCalc("sunburst",u)};function c(u,l,y){var h=0,T=u.children;if(T){for(var f=T.length,n=0;n<f;n++)h+=c(T[n],l,y);y.branches&&h++}else y.leaves&&h++;return u.value=u.data.data.value=h,l._values||(l._values=[]),l._values[u.data.data.i]=h,h}},27328:function(te){te.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},25244:function(te,X,e){var A=e(3400),P=e(424),o=e(86968).Q,L=e(31508).handleText,M=e(74174).handleMarkerDefaults,d=e(8932),g=d.hasColorscale,r=d.handleDefaults;te.exports=function(s,a,c,u){function l(m,b){return A.coerce(s,a,P,m,b)}var y=l("labels"),h=l("parents");if(!y||!y.length||!h||!h.length){a.visible=!1;return}var T=l("values");T&&T.length?l("branchvalues"):l("count"),l("level"),l("maxdepth"),M(s,a,u,l);var f=a._hasColorscale=g(s,"marker","colors")||(s.marker||{}).coloraxis;f&&r(s,a,u,l,{prefix:"marker.",cLetter:"c"}),l("leaf.opacity",f?1:.7);var n=l("text");l("texttemplate"),a.texttemplate||l("textinfo",A.isArrayOrTypedArray(n)?"text+label":"label"),l("hovertext"),l("hovertemplate");var v="auto";L(s,a,u,l,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),l("insidetextorientation"),l("sort"),l("rotation"),l("root.color"),o(a,u,l),a._length=null}},60404:function(te,X,e){var A=e(43616),P=e(76308);te.exports=function(L,M,d,g,r){var t=M.data.data,s=t.i,a=r||t.color;if(s>=0){M.i=t.i;var c=d.marker;c.pattern?(!c.colors||!c.pattern.shape)&&(c.color=a,M.color=a):(c.color=a,M.color=a),A.pointStyle(L,d,g,M)}else P.fill(L,a)}},45716:function(te,X,e){var A=e(33428),P=e(24040),o=e(10624).appendArrayPointValue,L=e(93024),M=e(3400),d=e(95924),g=e(78176),r=e(69656),t=r.formatPieValue;te.exports=function(c,u,l,y,h){var T=y[0],f=T.trace,n=T.hierarchy,v=f.type==="sunburst",m=f.type==="treemap"||f.type==="icicle";"_hasHoverLabel"in f||(f._hasHoverLabel=!1),"_hasHoverEvent"in f||(f._hasHoverEvent=!1);var b=function(S){var w=l._fullLayout;if(!(l._dragging||w.hovermode===!1)){var i=l._fullData[f.index],C=S.data.data,x=C.i,k=g.isHierarchyRoot(S),I=g.getParent(n,S),B=g.getValue(S),_=function(Y){return M.castOption(i,x,Y)},z=_("hovertemplate"),O=L.castHoverinfo(i,w,x),F=w.separators,N;if(z||O&&O!=="none"&&O!=="skip"){var V,j;v&&(V=T.cx+S.pxmid[0]*(1-S.rInscribed),j=T.cy+S.pxmid[1]*(1-S.rInscribed)),m&&(V=S._hoverX,j=S._hoverY);var $={},q=[],oe=[],Z=function(Y){return q.indexOf(Y)!==-1};O&&(q=O==="all"?i._module.attributes.hoverinfo.flags:O.split("+")),$.label=C.label,Z("label")&&$.label&&oe.push($.label),C.hasOwnProperty("v")&&($.value=C.v,$.valueLabel=t($.value,F),Z("value")&&oe.push($.valueLabel)),$.currentPath=S.currentPath=g.getPath(S.data),Z("current path")&&!k&&oe.push($.currentPath);var G,re=[],H=function(){re.indexOf(G)===-1&&(oe.push(G),re.push(G))};$.percentParent=S.percentParent=B/g.getValue(I),$.parent=S.parentString=g.getPtLabel(I),Z("percent parent")&&(G=g.formatPercent($.percentParent,F)+" of "+$.parent,H()),$.percentEntry=S.percentEntry=B/g.getValue(u),$.entry=S.entry=g.getPtLabel(u),Z("percent entry")&&!k&&!S.onPathbar&&(G=g.formatPercent($.percentEntry,F)+" of "+$.entry,H()),$.percentRoot=S.percentRoot=B/g.getValue(n),$.root=S.root=g.getPtLabel(n),Z("percent root")&&!k&&(G=g.formatPercent($.percentRoot,F)+" of "+$.root,H()),$.text=_("hovertext")||_("text"),Z("text")&&(G=$.text,M.isValidTextValue(G)&&oe.push(G)),N=[s(S,i,h.eventDataKeys)];var J={trace:i,y:j,_x0:S._x0,_x1:S._x1,_y0:S._y0,_y1:S._y1,text:oe.join("<br>"),name:z||Z("name")?i.name:void 0,color:_("hoverlabel.bgcolor")||C.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:z,hovertemplateLabels:$,eventData:N};v&&(J.x0=V-S.rInscribed*S.rpx1,J.x1=V+S.rInscribed*S.rpx1,J.idealAlign=S.pxmid[0]<0?"left":"right"),m&&(J.x=V,J.idealAlign=V<0?"left":"right");var ae=[];L.loneHover(J,{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:l,inOut_bbox:ae}),N[0].bbox=ae[0],f._hasHoverLabel=!0}if(m){var K=c.select("path.surface");h.styleOne(K,S,i,l,{hovered:!0})}f._hasHoverEvent=!0,l.emit("plotly_hover",{points:N||[s(S,i,h.eventDataKeys)],event:A.event})}},E=function(S){var w=l._fullLayout,i=l._fullData[f.index],C=A.select(this).datum();if(f._hasHoverEvent&&(S.originalEvent=A.event,l.emit("plotly_unhover",{points:[s(C,i,h.eventDataKeys)],event:A.event}),f._hasHoverEvent=!1),f._hasHoverLabel&&(L.loneUnhover(w._hoverlayer.node()),f._hasHoverLabel=!1),m){var x=c.select("path.surface");h.styleOne(x,C,i,l,{hovered:!1})}},p=function(S){var w=l._fullLayout,i=l._fullData[f.index],C=v&&(g.isHierarchyRoot(S)||g.isLeaf(S)),x=g.getPtId(S),k=g.isEntry(S)?g.findEntryWithChild(n,x):g.findEntryWithLevel(n,x),I=g.getPtId(k),B={points:[s(S,i,h.eventDataKeys)],event:A.event};C||(B.nextLevel=I);var _=d.triggerHandler(l,"plotly_"+f.type+"click",B);if(_!==!1&&w.hovermode&&(l._hoverdata=[s(S,i,h.eventDataKeys)],L.click(l,A.event)),!C&&_!==!1&&!l._dragging&&!l._transitioning){P.call("_storeDirectGUIEdit",i,w._tracePreGUI[i.uid],{level:i.level});var z={data:[{level:I}],traces:[f.index]},O={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};L.loneUnhover(w._hoverlayer.node()),P.call("animate",l,z,O)}};c.on("mouseover",b),c.on("mouseout",E),c.on("click",p)};function s(a,c,u){for(var l=a.data.data,y={curveNumber:c.index,pointNumber:l.i,data:c._input,fullData:c},h=0;h<u.length;h++){var T=u[h];T in a&&(y[T]=a[T])}return"parentString"in a&&!g.isHierarchyRoot(a)&&(y.parent=a.parentString),o(y,c,l.i),y}},78176:function(te,X,e){var A=e(3400),P=e(76308),o=e(93972),L=e(69656);X.findEntryWithLevel=function(r,t){var s;return t&&r.eachAfter(function(a){if(X.getPtId(a)===t)return s=a.copy()}),s||r},X.findEntryWithChild=function(r,t){var s;return r.eachAfter(function(a){for(var c=a.children||[],u=0;u<c.length;u++){var l=c[u];if(X.getPtId(l)===t)return s=a.copy()}}),s||r},X.isEntry=function(r){return!r.parent},X.isLeaf=function(r){return!r.children},X.getPtId=function(r){return r.data.data.id},X.getPtLabel=function(r){return r.data.data.label},X.getValue=function(r){return r.value},X.isHierarchyRoot=function(r){return g(r)===""},X.setSliceCursor=function(r,t,s){var a=s.isTransitioning;if(!a){var c=r.datum();a=s.hideOnRoot&&X.isHierarchyRoot(c)||s.hideOnLeaves&&X.isLeaf(c)}o(r,a?null:"pointer")};function M(r,t,s){return{color:X.getOutsideTextFontKey("color",r,t,s),family:X.getOutsideTextFontKey("family",r,t,s),size:X.getOutsideTextFontKey("size",r,t,s)}}function d(r,t,s,a){var c=(a||{}).onPathbar,u=t.data.data,l=u.i,y=A.castOption(r,l,(c?"pathbar.textfont":"insidetextfont")+".color");return!y&&r._input.textfont&&(y=A.castOption(r._input,l,"textfont.color")),{color:y||P.contrast(u.color),family:X.getInsideTextFontKey("family",r,t,s,a),size:X.getInsideTextFontKey("size",r,t,s,a)}}X.getInsideTextFontKey=function(r,t,s,a,c){var u=(c||{}).onPathbar,l=u?"pathbar.textfont":"insidetextfont",y=s.data.data.i;return A.castOption(t,y,l+"."+r)||A.castOption(t,y,"textfont."+r)||a.size},X.getOutsideTextFontKey=function(r,t,s,a){var c=s.data.data.i;return A.castOption(t,c,"outsidetextfont."+r)||A.castOption(t,c,"textfont."+r)||a.size},X.isOutsideText=function(r,t){return!r._hasColorscale&&X.isHierarchyRoot(t)},X.determineTextFont=function(r,t,s,a){return X.isOutsideText(r,t)?M(r,t,s):d(r,t,s,a)},X.hasTransition=function(r){return!!(r&&r.duration>0)},X.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},X.isHeader=function(r,t){return!(X.isLeaf(r)||r.depth===t._maxDepth-1)};function g(r){return r.data.data.pid}X.getParent=function(r,t){return X.findEntryWithLevel(r,g(t))},X.listPath=function(r,t){var s=r.parent;if(!s)return[];var a=t?[s.data[t]]:[s];return X.listPath(s,t).concat(a)},X.getPath=function(r){return X.listPath(r,"label").join("/")+"/"},X.formatValue=L.formatPieValue,X.formatPercent=function(r,t){var s=A.formatPercent(r,0);return s==="0%"&&(s=L.formatPiePercent(r,t)),s}},5621:function(te,X,e){te.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(54904),categories:[],animatable:!0,attributes:e(424),layoutAttributes:e(84920),supplyDefaults:e(25244),supplyLayoutDefaults:e(28732),calc:e(3776).calc,crossTraceCalc:e(3776).crossTraceCalc,plot:e(96488).plot,style:e(85676).style,colorbar:e(5528),meta:{}}},84920:function(te){te.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(te,X,e){var A=e(3400),P=e(84920);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("sunburstcolorway",M.colorway),d("extendsunburstcolors")}},96488:function(te,X,e){var A=e(33428),P=e(74148),o=e(67756).qy,L=e(43616),M=e(3400),d=e(72736),g=e(82744),r=g.recordMinTextSize,t=g.clearMinTextSize,s=e(37820),a=e(69656).getRotationAngle,c=s.computeTransform,u=s.transformInsideText,l=e(85676).styleOne,y=e(60100).resizeText,h=e(45716),T=e(27328),f=e(78176);X.plot=function(p,S,w,i){var C=p._fullLayout,x=C._sunburstlayer,k,I,B=!w,_=!C.uniformtext.mode&&f.hasTransition(w);if(t("sunburst",C),k=x.selectAll("g.trace.sunburst").data(S,function(O){return O[0].trace.uid}),k.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),k.order(),_){i&&(I=i());var z=A.transition().duration(w.duration).ease(w.easing).each("end",function(){I&&I()}).each("interrupt",function(){I&&I()});z.each(function(){x.selectAll("g.trace").each(function(O){n(p,O,this,w)})})}else k.each(function(O){n(p,O,this,w)}),C.uniformtext.mode&&y(p,C._sunburstlayer.selectAll(".trace"),"sunburst");B&&k.exit().remove()};function n(p,S,w,i){var C=p._context.staticPlot,x=p._fullLayout,k=!x.uniformtext.mode&&f.hasTransition(i),I=A.select(w),B=I.selectAll("g.slice"),_=S[0],z=_.trace,O=_.hierarchy,F=f.findEntryWithLevel(O,z.level),N=f.getMaxDepth(z),V=x._size,j=z.domain,$=V.w*(j.x[1]-j.x[0]),q=V.h*(j.y[1]-j.y[0]),oe=.5*Math.min($,q),Z=_.cx=V.l+V.w*(j.x[1]+j.x[0])/2,G=_.cy=V.t+V.h*(1-j.y[0])-q/2;if(!F)return B.remove();var re=null,H={};k&&B.each(function(Ne){H[f.getPtId(Ne)]={rpx0:Ne.rpx0,rpx1:Ne.rpx1,x0:Ne.x0,x1:Ne.x1,transform:Ne.transform},!re&&f.isEntry(Ne)&&(re=Ne)});var J=v(F).descendants(),ae=F.height+1,K=0,Y=N;_.hasMultipleRoots&&f.isHierarchyRoot(F)&&(J=J.slice(1),ae-=1,K=1,Y+=1),J=J.filter(function(Ne){return Ne.y1<=Y});var ie=a(z.rotation);ie&&J.forEach(function(Ne){Ne.x0+=ie,Ne.x1+=ie});var ne=Math.min(ae,N),le=function(Ne){return(Ne-K)/ne*oe},de=function(Ne,et){return[Ne*Math.cos(et),-Ne*Math.sin(et)]},we=function(Ne){return M.pathAnnulus(Ne.rpx0,Ne.rpx1,Ne.x0,Ne.x1,Z,G)},me=function(Ne){return Z+b(Ne)[0]*(Ne.transform.rCenter||0)+(Ne.transform.x||0)},Le=function(Ne){return G+b(Ne)[1]*(Ne.transform.rCenter||0)+(Ne.transform.y||0)};B=B.data(J,f.getPtId),B.enter().append("g").classed("slice",!0),k?B.exit().transition().each(function(){var Ne=A.select(this),et=Ne.select("path.surface");et.transition().attrTween("d",function(Ze){var Ke=Se(Ze);return function(nt){return we(Ke(nt))}});var st=Ne.select("g.slicetext");st.attr("opacity",0)}).remove():B.exit().remove(),B.order();var ve=null;if(k&&re){var Ae=f.getPtId(re);B.each(function(Ne){ve===null&&f.getPtId(Ne)===Ae&&(ve=Ne.x1)})}var ye=B;k&&(ye=ye.transition().each("end",function(){var Ne=A.select(this);f.setSliceCursor(Ne,p,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ye.each(function(Ne){var et=A.select(this),st=M.ensureSingle(et,"path","surface",function(vt){vt.style("pointer-events",C?"none":"all")});Ne.rpx0=le(Ne.y0),Ne.rpx1=le(Ne.y1),Ne.xmid=(Ne.x0+Ne.x1)/2,Ne.pxmid=de(Ne.rpx1,Ne.xmid),Ne.midangle=-(Ne.xmid-Math.PI/2),Ne.startangle=-(Ne.x0-Math.PI/2),Ne.stopangle=-(Ne.x1-Math.PI/2),Ne.halfangle=.5*Math.min(M.angleDelta(Ne.x0,Ne.x1)||Math.PI,Math.PI),Ne.ring=1-Ne.rpx0/Ne.rpx1,Ne.rInscribed=m(Ne),k?st.transition().attrTween("d",function(vt){var xt=_e(vt);return function(Je){return we(xt(Je))}}):st.attr("d",we),et.call(h,F,p,S,{eventDataKeys:T.eventDataKeys,transitionTime:T.CLICK_TRANSITION_TIME,transitionEasing:T.CLICK_TRANSITION_EASING}).call(f.setSliceCursor,p,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:p._transitioning}),st.call(l,Ne,z,p);var Ze=M.ensureSingle(et,"g","slicetext"),Ke=M.ensureSingle(Ze,"text","",function(vt){vt.attr("data-notex",1)}),nt=M.ensureUniformFontSize(p,f.determineTextFont(z,Ne,x.font));Ke.text(X.formatSliceLabel(Ne,F,z,S,x)).classed("slicetext",!0).attr("text-anchor","middle").call(L.font,nt).call(d.convertToTspans,p);var it=L.bBox(Ke.node());Ne.transform=u(it,Ne,_),Ne.transform.targetX=me(Ne),Ne.transform.targetY=Le(Ne);var lt=function(vt,xt){var Je=vt.transform;return c(Je,xt),Je.fontSize=nt.size,r(z.type,Je,x),M.getTextTransform(Je)};k?Ke.transition().attrTween("transform",function(vt){var xt=ze(vt);return function(Je){return lt(xt(Je),it)}}):Ke.attr("transform",lt(Ne,it))});function Se(Ne){var et=f.getPtId(Ne),st=H[et],Ze=H[f.getPtId(F)],Ke;if(Ze){var nt=(Ne.x1>Ze.x1?2*Math.PI:0)+ie;Ke=Ne.rpx1<Ze.rpx1?{x0:Ne.x0,x1:Ne.x1,rpx0:0,rpx1:0}:{x0:nt,x1:nt,rpx0:Ne.rpx0,rpx1:Ne.rpx1}}else{var it,lt=f.getPtId(Ne.parent);B.each(function(Ue){if(f.getPtId(Ue)===lt)return it=Ue});var vt=it.children,xt;vt.forEach(function(Ue,He){if(f.getPtId(Ue)===et)return xt=He});var Je=vt.length,Pe=o(it.x0,it.x1);Ke={rpx0:oe,rpx1:oe,x0:Pe(xt/Je),x1:Pe((xt+1)/Je)}}return o(st,Ke)}function _e(Ne){var et=H[f.getPtId(Ne)],st,Ze={x0:Ne.x0,x1:Ne.x1,rpx0:Ne.rpx0,rpx1:Ne.rpx1};if(et)st=et;else if(re)if(Ne.parent)if(ve){var Ke=(Ne.x1>ve?2*Math.PI:0)+ie;st={x0:Ke,x1:Ke}}else st={rpx0:oe,rpx1:oe},M.extendFlat(st,Ie(Ne));else st={rpx0:0,rpx1:0};else st={x0:ie,x1:ie};return o(st,Ze)}function ze(Ne){var et=H[f.getPtId(Ne)],st,Ze=Ne.transform;if(et)st=et;else if(st={rpx1:Ne.rpx1,transform:{textPosAngle:Ze.textPosAngle,scale:0,rotate:Ze.rotate,rCenter:Ze.rCenter,x:Ze.x,y:Ze.y}},re)if(Ne.parent)if(ve){var Ke=Ne.x1>ve?2*Math.PI:0;st.x0=st.x1=Ke}else M.extendFlat(st,Ie(Ne));else st.x0=st.x1=ie;else st.x0=st.x1=ie;var nt=o(st.transform.textPosAngle,Ne.transform.textPosAngle),it=o(st.rpx1,Ne.rpx1),lt=o(st.x0,Ne.x0),vt=o(st.x1,Ne.x1),xt=o(st.transform.scale,Ze.scale),Je=o(st.transform.rotate,Ze.rotate),Pe=Ze.rCenter===0?3:st.transform.rCenter===0?1/3:1,Ue=o(st.transform.rCenter,Ze.rCenter),He=function(Oe){return Ue(Math.pow(Oe,Pe))};return function(Oe){var Ce=it(Oe),ge=lt(Oe),pe=vt(Oe),Te=He(Oe),be=de(Ce,(ge+pe)/2),ke=nt(Oe),Ve={pxmid:be,rpx1:Ce,transform:{textPosAngle:ke,rCenter:Te,x:Ze.x,y:Ze.y}};return r(z.type,Ze,x),{transform:{targetX:me(Ve),targetY:Le(Ve),scale:xt(Oe),rotate:Je(Oe),rCenter:Te}}}}function Ie(Ne){var et=Ne.parent,st=H[f.getPtId(et)],Ze={};if(st){var Ke=et.children,nt=Ke.indexOf(Ne),it=Ke.length,lt=o(st.x0,st.x1);Ze.x0=lt(nt/it),Ze.x1=lt(nt/it)}else Ze.x0=Ze.x1=0;return Ze}}function v(p){return P.partition().size([2*Math.PI,p.height+1])(p)}X.formatSliceLabel=function(p,S,w,i,C){var x=w.texttemplate,k=w.textinfo;if(!x&&(!k||k==="none"))return"";var I=C.separators,B=i[0],_=p.data.data,z=B.hierarchy,O=f.isHierarchyRoot(p),F=f.getParent(z,p),N=f.getValue(p);if(!x){var V=k.split("+"),j=function(K){return V.indexOf(K)!==-1},$=[],q;if(j("label")&&_.label&&$.push(_.label),_.hasOwnProperty("v")&&j("value")&&$.push(f.formatValue(_.v,I)),!O){j("current path")&&$.push(f.getPath(p.data));var oe=0;j("percent parent")&&oe++,j("percent entry")&&oe++,j("percent root")&&oe++;var Z=oe>1;if(oe){var G,re=function(K){q=f.formatPercent(G,I),Z&&(q+=" of "+K),$.push(q)};j("percent parent")&&!O&&(G=N/f.getValue(F),re("parent")),j("percent entry")&&(G=N/f.getValue(S),re("entry")),j("percent root")&&(G=N/f.getValue(z),re("root"))}}return j("text")&&(q=M.castOption(w,_.i,"text"),M.isValidTextValue(q)&&$.push(q)),$.join("<br>")}var H=M.castOption(w,_.i,"texttemplate");if(!H)return"";var J={};_.label&&(J.label=_.label),_.hasOwnProperty("v")&&(J.value=_.v,J.valueLabel=f.formatValue(_.v,I)),J.currentPath=f.getPath(p.data),O||(J.percentParent=N/f.getValue(F),J.percentParentLabel=f.formatPercent(J.percentParent,I),J.parent=f.getPtLabel(F)),J.percentEntry=N/f.getValue(S),J.percentEntryLabel=f.formatPercent(J.percentEntry,I),J.entry=f.getPtLabel(S),J.percentRoot=N/f.getValue(z),J.percentRootLabel=f.formatPercent(J.percentRoot,I),J.root=f.getPtLabel(z),_.hasOwnProperty("color")&&(J.color=_.color);var ae=M.castOption(w,_.i,"text");return(M.isValidTextValue(ae)||ae==="")&&(J.text=ae),J.customdata=M.castOption(w,_.i,"customdata"),M.texttemplateString(H,J,C._d3locale,J,w._meta||{})};function m(p){return p.rpx0===0&&M.isFullCircle([p.x0,p.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(p.halfangle)),p.ring/2))}function b(p){return E(p.rpx1,p.transform.textPosAngle)}function E(p,S){return[p*Math.sin(S),-p*Math.cos(S)]}},85676:function(te,X,e){var A=e(33428),P=e(76308),o=e(3400),L=e(82744).resizeText,M=e(60404);function d(r){var t=r._fullLayout._sunburstlayer.selectAll(".trace");L(r,t,"sunburst"),t.each(function(s){var a=A.select(this),c=s[0],u=c.trace;a.style("opacity",u.opacity),a.selectAll("path.surface").each(function(l){A.select(this).call(g,l,u,r)})})}function g(r,t,s,a){var c=t.data.data,u=!t.children,l=c.i,y=o.castOption(s,l,"marker.line.color")||P.defaultLine,h=o.castOption(s,l,"marker.line.width")||0;r.call(M,t,s,a).style("stroke-width",h).call(P.stroke,y).style("opacity",u?s.leaf.opacity:null)}te.exports={style:d,styleOne:g}},16716:function(te,X,e){var A=e(76308),P=e(49084),o=e(29736).axisHoverFormat,L=e(21776).Ks,M=e(45464),d=e(92880).extendFlat,g=e(67824).overrideAll;function r(a){return{valType:"boolean",dflt:!1}}function t(a){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:r(),y:r(),z:r()},color:{valType:"color",dflt:A.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:A.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var s=te.exports=g(d({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:L(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},P("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:t(),y:t(),z:t()},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:d({},P.zauto,{}),zmin:d({},P.zmin,{}),zmax:d({},P.zmax,{})},hoverinfo:d({},M.hoverinfo),showlegend:d({},M.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType="calc+clearAxisTypes",s.transforms=void 0},56576:function(te,X,e){var A=e(47128);te.exports=function(o,L){L.surfacecolor?A(o,L,{vals:L.surfacecolor,containerStr:"",cLetter:"c"}):A(o,L,{vals:L.z,containerStr:"",cLetter:"c"})}},79164:function(te,X,e){var A=e(67792).gl_surface3d,P=e(67792).ndarray,o=e(67792).ndarray_linear_interpolate.d2,L=e(70448),M=e(11240),d=e(3400).isArrayOrTypedArray,g=e(33040).parseColorScale,r=e(43080),t=e(8932).extractOpts;function s(i,C,x){this.scene=i,this.uid=x,this.surface=C,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var a=s.prototype;a.getXat=function(i,C,x,k){var I=d(this.data.x)?d(this.data.x[0])?this.data.x[C][i]:this.data.x[i]:i;return x===void 0?I:k.d2l(I,0,x)},a.getYat=function(i,C,x,k){var I=d(this.data.y)?d(this.data.y[0])?this.data.y[C][i]:this.data.y[C]:C;return x===void 0?I:k.d2l(I,0,x)},a.getZat=function(i,C,x,k){var I=this.data.z[C][i];return I===null&&this.data.connectgaps&&this.data._interpolatedZ&&(I=this.data._interpolatedZ[C][i]),x===void 0?I:k.d2l(I,0,x)},a.handlePick=function(i){if(i.object===this.surface){var C=(i.data.index[0]-1)/this.dataScaleX-1,x=(i.data.index[1]-1)/this.dataScaleY-1,k=Math.max(Math.min(Math.round(C),this.data.z[0].length-1),0),I=Math.max(Math.min(Math.round(x),this.data._ylength-1),0);i.index=[k,I],i.traceCoordinate=[this.getXat(k,I),this.getYat(k,I),this.getZat(k,I)],i.dataCoordinate=[this.getXat(k,I,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(k,I,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(k,I,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var B=0;B<3;B++){var _=i.dataCoordinate[B];_!=null&&(i.dataCoordinate[B]*=this.scene.dataScale[B])}var z=this.data.hovertext||this.data.text;return d(z)&&z[I]&&z[I][k]!==void 0?i.textLabel=z[I][k]:z?i.textLabel=z:i.textLabel="",i.data.dataCoordinate=i.dataCoordinate.slice(),this.surface.highlight(i.data),this.scene.glplot.spikes.position=i.dataCoordinate,!0}};function c(i){var C=i[0].rgb,x=i[i.length-1].rgb;return C[0]===x[0]&&C[1]===x[1]&&C[2]===x[2]&&C[3]===x[3]}var u=[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 l(i,C){if(i<C)return 0;for(var x=0;Math.floor(i%C)===0;)i/=C,x++;return x}function y(i){for(var C=[],x=0;x<u.length;x++){var k=u[x];C.push(l(i,k))}return C}function h(i){for(var C=y(i),x=i,k=0;k<u.length;k++)if(C[k]>0){x=u[k];break}return x}function T(i,C){if(!(i<1||C<1)){for(var x=y(i),k=y(C),I=1,B=0;B<u.length;B++)I*=Math.pow(u[B],Math.max(x[B],k[B]));return I}}function f(i){if(i.length!==0){for(var C=1,x=0;x<i.length;x++)C=T(C,i[x]);return C}}a.calcXnums=function(i){var C,x=[];for(C=1;C<i;C++){var k=this.getXat(C-1,0),I=this.getXat(C,0);I!==k&&k!==void 0&&k!==null&&I!==void 0&&I!==null?x[C-1]=Math.abs(I-k):x[C-1]=0}var B=0;for(C=1;C<i;C++)B+=x[C-1];for(C=1;C<i;C++)x[C-1]===0?x[C-1]=1:x[C-1]=Math.round(B/x[C-1]);return x},a.calcYnums=function(i){var C,x=[];for(C=1;C<i;C++){var k=this.getYat(0,C-1),I=this.getYat(0,C);I!==k&&k!==void 0&&k!==null&&I!==void 0&&I!==null?x[C-1]=Math.abs(I-k):x[C-1]=0}var B=0;for(C=1;C<i;C++)B+=x[C-1];for(C=1;C<i;C++)x[C-1]===0?x[C-1]=1:x[C-1]=Math.round(B/x[C-1]);return x};var n=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],v=n[9],m=n[13];a.estimateScale=function(i,C){for(var x=C===0?this.calcXnums(i):this.calcYnums(i),k=1+f(x);k<v;)k*=2;for(;k>m;)k--,k/=h(k),k++,k<v&&(k=m);var I=Math.round(k/i);return I>1?I:1};function b(i,C,x){var k=x[8]+x[2]*C[0]+x[5]*C[1];return i[0]=(x[6]+x[0]*C[0]+x[3]*C[1])/k,i[1]=(x[7]+x[1]*C[0]+x[4]*C[1])/k,i}function E(i,C,x){return p(i,C,b,x),i}function p(i,C,x,k){for(var I=[0,0],B=i.shape[0],_=i.shape[1],z=0;z<B;z++)for(var O=0;O<_;O++)x(I,[z,O],k),i.set(z,O,o(C,I[0],I[1]));return i}a.refineCoords=function(i){for(var C=this.dataScaleX,x=this.dataScaleY,k=i[0].shape[0],I=i[0].shape[1],B=Math.floor(i[0].shape[0]*C+1)|0,_=Math.floor(i[0].shape[1]*x+1)|0,z=1+k+1,O=1+I+1,F=P(new Float32Array(z*O),[z,O]),N=[1/C,0,0,0,1/x,0,0,0,1],V=0;V<i.length;++V){this.surface.padField(F,i[V]);var j=P(new Float32Array(B*_),[B,_]);E(j,F,N),i[V]=j}};function S(i,C){for(var x=!1,k=0;k<i.length;k++)if(C===i[k]){x=!0;break}x===!1&&i.push(C)}a.setContourLevels=function(){var i=[[],[],[]],C=[!1,!1,!1],x=!1,k,I,B;for(k=0;k<3;++k)if(this.showContour[k]&&(x=!0,this.contourSize[k]>0&&this.contourStart[k]!==null&&this.contourEnd[k]!==null&&this.contourEnd[k]>this.contourStart[k]))for(C[k]=!0,I=this.contourStart[k];I<this.contourEnd[k];I+=this.contourSize[k])B=I*this.scene.dataScale[k],S(i[k],B);if(x){var _=[[],[],[]];for(k=0;k<3;++k)this.showContour[k]&&(_[k]=C[k]?i[k]:this.scene.contourLevels[k]);this.surface.update({levels:_})}},a.update=function(i){var C=this.scene,x=C.fullSceneLayout,k=this.surface,I=g(i),B=C.dataScale,_=i.z[0].length,z=i._ylength,O=C.contourLevels;this.data=i;var F,N,V,j,$=[];for(F=0;F<3;F++)for($[F]=[],N=0;N<_;N++)$[F][N]=[];for(N=0;N<_;N++)for(V=0;V<z;V++)$[0][N][V]=this.getXat(N,V,i.xcalendar,x.xaxis),$[1][N][V]=this.getYat(N,V,i.ycalendar,x.yaxis),$[2][N][V]=this.getZat(N,V,i.zcalendar,x.zaxis);if(i.connectgaps)for(i._emptypoints=M($[2]),L($[2],i._emptypoints),i._interpolatedZ=[],N=0;N<_;N++)for(i._interpolatedZ[N]=[],V=0;V<z;V++)i._interpolatedZ[N][V]=$[2][N][V];for(F=0;F<3;F++)for(N=0;N<_;N++)for(V=0;V<z;V++)j=$[F][N][V],j==null?$[F][N][V]=NaN:j=$[F][N][V]*=B[F];for(F=0;F<3;F++)for(N=0;N<_;N++)for(V=0;V<z;V++)j=$[F][N][V],j!=null&&(this.minValues[F]>j&&(this.minValues[F]=j),this.maxValues[F]<j&&(this.maxValues[F]=j));for(F=0;F<3;F++)this.objectOffset[F]=.5*(this.minValues[F]+this.maxValues[F]);for(F=0;F<3;F++)for(N=0;N<_;N++)for(V=0;V<z;V++)j=$[F][N][V],j!=null&&($[F][N][V]-=this.objectOffset[F]);var q=[P(new Float32Array(_*z),[_,z]),P(new Float32Array(_*z),[_,z]),P(new Float32Array(_*z),[_,z])];for(F=0;F<3;F++)for(N=0;N<_;N++)for(V=0;V<z;V++)q[F].set(N,V,$[F][N][V]);$=[];var oe={colormap:I,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!i.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:i.opacityscale,opacity:i.opacity},Z=t(i);if(oe.intensityBounds=[Z.min,Z.max],i.surfacecolor){var G=P(new Float32Array(_*z),[_,z]);for(N=0;N<_;N++)for(V=0;V<z;V++)G.set(N,V,i.surfacecolor[V][N]);q.push(G)}else oe.intensityBounds[0]*=B[2],oe.intensityBounds[1]*=B[2];(m<q[0].shape[0]||m<q[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(q[0].shape[0],0),this.dataScaleY=this.estimateScale(q[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(q)),i.surfacecolor&&(oe.intensity=q.pop());var re=[!0,!0,!0],H=["x","y","z"];for(F=0;F<3;++F){var J=i.contours[H[F]];re[F]=J.highlight,oe.showContour[F]=J.show||J.highlight,oe.showContour[F]&&(oe.contourProject[F]=[J.project.x,J.project.y,J.project.z],J.show?(this.showContour[F]=!0,oe.levels[F]=O[F],k.highlightColor[F]=oe.contourColor[F]=r(J.color),J.usecolormap?k.highlightTint[F]=oe.contourTint[F]=0:k.highlightTint[F]=oe.contourTint[F]=1,oe.contourWidth[F]=J.width,this.contourStart[F]=J.start,this.contourEnd[F]=J.end,this.contourSize[F]=J.size):(this.showContour[F]=!1,this.contourStart[F]=null,this.contourEnd[F]=null,this.contourSize[F]=0),J.highlight&&(oe.dynamicColor[F]=r(J.highlightcolor),oe.dynamicWidth[F]=J.highlightwidth))}c(I)&&(oe.vertexColor=!0),oe.objectOffset=this.objectOffset,oe.coords=q,k.update(oe),k.visible=i.visible,k.enableDynamic=re,k.enableHighlight=re,k.snapToData=!0,"lighting"in i&&(k.ambientLight=i.lighting.ambient,k.diffuseLight=i.lighting.diffuse,k.specularLight=i.lighting.specular,k.roughness=i.lighting.roughness,k.fresnel=i.lighting.fresnel),"lightposition"in i&&(k.lightPosition=[i.lightposition.x,i.lightposition.y,i.lightposition.z])},a.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function w(i,C){var x=i.glplot.gl,k=A({gl:x}),I=new s(i,k,C.uid);return k._trace=I,I.update(C),i.glplot.add(k),I}te.exports=w},60192:function(te,X,e){var A=e(24040),P=e(3400),o=e(27260),L=e(16716),M=.1;function d(a,c){for(var u=[],l=32,y=0;y<l;y++){var h=y/(l-1),T=c+(1-c)*(1-Math.pow(Math.sin(a*h*Math.PI),2));u.push([h,Math.max(0,Math.min(1,T))])}return u}function g(a){var c=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 u=0;u<a.length;u++){var l=a[u];if(l.length!==2||+l[0]<c)return!1;c=+l[0]}return!0}function r(a,c,u,l){var y,h;function T(i,C){return P.coerce(a,c,L,i,C)}var f=T("x"),n=T("y"),v=T("z");if(!v||!v.length||f&&f.length<1||n&&n.length<1){c.visible=!1;return}c._xlength=Array.isArray(f)&&P.isArrayOrTypedArray(f[0])?v.length:v[0].length,c._ylength=v.length;var m=A.getComponentMethod("calendars","handleTraceDefaults");m(a,c,["x","y","z"],l),T("text"),T("hovertext"),T("hovertemplate"),T("xhoverformat"),T("yhoverformat"),T("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(i){T(i)});var b=T("surfacecolor"),E=["x","y","z"];for(y=0;y<3;++y){var p="contours."+E[y],S=T(p+".show"),w=T(p+".highlight");if(S||w)for(h=0;h<3;++h)T(p+".project."+E[h]);S&&(T(p+".color"),T(p+".width"),T(p+".usecolormap")),w&&(T(p+".highlightcolor"),T(p+".highlightwidth")),T(p+".start"),T(p+".end"),T(p+".size")}b||(s(a,"zmin","cmin"),s(a,"zmax","cmax"),s(a,"zauto","cauto")),o(a,c,l,T,{prefix:"",cLetter:"c"}),t(a,c,l,T),c._length=null}function t(a,c,u,l){var y=l("opacityscale");y==="max"?c.opacityscale=[[0,M],[1,1]]:y==="min"?c.opacityscale=[[0,1],[1,M]]:y==="extremes"?c.opacityscale=d(1,M):g(y)||(c.opacityscale=void 0)}function s(a,c,u){c in a&&!(u in a)&&(a[u]=a[c])}te.exports={supplyDefaults:r,opacityscaleDefaults:t}},91304:function(te,X,e){te.exports={attributes:e(16716),supplyDefaults:e(60192).supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:e(56576),plot:e(79164),moduleType:"trace",name:"surface",basePlotModule:e(12536),categories:["gl3d","2dMap","showLegend"],meta:{}}},60520:function(te,X,e){var A=e(13916),P=e(92880).extendFlat,o=e(67824).overrideAll,L=e(25376),M=e(86968).u,d=e(29736).descriptionOnlyNumbers,g=te.exports=o({domain:M({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:d("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:P({},A.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:P({},L({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:d("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:P({},A.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:P({},L({arrayOk:!0}))}},"calc","from-root");g.transforms=void 0},85852:function(te,X,e){var A=e(84888)._M,P=e(24752),o="table";X.name=o,X.plot=function(L){var M=A(L.calcdata,o)[0];M.length&&P(L,M)},X.clean=function(L,M,d,g){var r=g._has&&g._has(o),t=M._has&&M._has(o);r&&!t&&g._paperdiv.selectAll(".table").remove()}},39312:function(te,X,e){var A=e(71688).wrap;te.exports=function(){return A({})}},23536:function(te){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",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},55992:function(te,X,e){var A=e(23536),P=e(92880).extendFlat,o=e(38248),L=e(38116).isTypedArray,M=e(38116).isArrayOrTypedArray;te.exports=function(y,h){var T=r(h.cells.values),f=function(j){return j.slice(h.header.values.length,j.length)},n=r(h.header.values);n.length&&!n[0].length&&(n[0]=[""],n=r(n));var v=n.concat(f(T).map(function(){return t((n[0]||[""]).length)})),m=h.domain,b=Math.floor(y._fullLayout._size.w*(m.x[1]-m.x[0])),E=Math.floor(y._fullLayout._size.h*(m.y[1]-m.y[0])),p=h.header.values.length?v[0].map(function(){return h.header.height}):[A.emptyHeaderHeight],S=T.length?T[0].map(function(){return h.cells.height}):[],w=p.reduce(g,0),i=E-w,C=i+A.uplift,x=c(S,C),k=c(p,w),I=a(k,[]),B=a(x,I),_={},z=h._fullInput.columnorder;M(z)&&(z=Array.from(z)),z=z.concat(f(T.map(function(j,$){return $})));var O=v.map(function(j,$){var q=M(h.columnwidth)?h.columnwidth[Math.min($,h.columnwidth.length-1)]:h.columnwidth;return o(q)?Number(q):1}),F=O.reduce(g,0);O=O.map(function(j){return j/F*b});var N=Math.max(d(h.header.line.width),d(h.cells.line.width)),V={key:h.uid+y._context.staticPlot,translateX:m.x[0]*y._fullLayout._size.w,translateY:y._fullLayout._size.h*(1-m.y[1]),size:y._fullLayout._size,width:b,maxLineWidth:N,height:E,columnOrder:z,groupHeight:E,rowBlocks:B,headerRowBlocks:I,scrollY:0,cells:P({},h.cells,{values:T}),headerCells:P({},h.header,{values:v}),gdColumns:v.map(function(j){return j[0]}),gdColumnsOriginalOrder:v.map(function(j){return j[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:v.map(function(j,$){var q=_[j];_[j]=(q||0)+1;var oe=j+"__"+_[j];return{key:oe,label:j,specIndex:$,xIndex:z[$],xScale:s,x:void 0,calcdata:void 0,columnWidth:O[$]}})};return V.columns.forEach(function(j){j.calcdata=V,j.x=s(j)}),V};function d(l){if(M(l)){for(var y=0,h=0;h<l.length;h++)y=Math.max(y,d(l[h]));return y}return l}function g(l,y){return l+y}function r(l){var y=l.slice(),h=1/0,T=0,f;for(f=0;f<y.length;f++)L(y[f])?y[f]=Array.from(y[f]):M(y[f])||(y[f]=[y[f]]),h=Math.min(h,y[f].length),T=Math.max(T,y[f].length);if(h!==T)for(f=0;f<y.length;f++){var n=T-y[f].length;n&&(y[f]=y[f].concat(t(n)))}return y}function t(l){for(var y=new Array(l),h=0;h<l;h++)y[h]="";return y}function s(l){return l.calcdata.columns.reduce(function(y,h){return h.xIndex<l.xIndex?y+h.columnWidth:y},0)}function a(l,y){var h=Object.keys(l);return h.map(function(T){return P({},l[T],{auxiliaryBlocks:y})})}function c(l,y){for(var h={},T,f=0,n=0,v=u(),m=0,b=0,E=0;E<l.length;E++)T=l[E],v.rows.push({rowIndex:E,rowHeight:T}),n+=T,(n>=y||E===l.length-1)&&(h[f]=v,v.key=b++,v.firstRowIndex=m,v.lastRowIndex=E,v=u(),f+=n,m=E+1,n=0);return h}function u(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},53056:function(te,X,e){var A=e(92880).extendFlat;X.splitToPanels=function(o){var L=[0,0],M=A({},o,{key:"header",type:"header",page:0,prevPages:L,currentRepaint:[null,null],dragHandle:!0,values:o.calcdata.headerCells.values[o.specIndex],rowBlocks:o.calcdata.headerRowBlocks,calcdata:A({},o.calcdata,{cells:o.calcdata.headerCells})}),d=A({},o,{key:"cells1",type:"cells",page:0,prevPages:L,currentRepaint:[null,null],dragHandle:!1,values:o.calcdata.cells.values[o.specIndex],rowBlocks:o.calcdata.rowBlocks}),g=A({},o,{key:"cells2",type:"cells",page:1,prevPages:L,currentRepaint:[null,null],dragHandle:!1,values:o.calcdata.cells.values[o.specIndex],rowBlocks:o.calcdata.rowBlocks});return[d,g,M]},X.splitToCells=function(o){var L=P(o);return(o.values||[]).slice(L[0],L[1]).map(function(M,d){var g=typeof M=="string"&&M.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:d+g,key:L[0]+d,column:o,calcdata:o.calcdata,page:o.page,rowBlocks:o.rowBlocks,value:M}})};function P(o){var L=o.rowBlocks[o.page],M=L?L.rows[0].rowIndex:0,d=L?M+L.rows.length:0;return[M,d]}},53212:function(te,X,e){var A=e(3400),P=e(60520),o=e(86968).Q;function L(M,d){for(var g=M.columnorder||[],r=M.header.values.length,t=g.slice(0,r),s=t.slice().sort(function(u,l){return u-l}),a=t.map(function(u){return s.indexOf(u)}),c=a.length;c<r;c++)a.push(c);d("columnorder",a)}te.exports=function(d,g,r,t){function s(a,c){return A.coerce(d,g,P,a,c)}o(g,t,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),A.coerceFont(s,"header.font",A.extendFlat({},t.font)),L(g,s),s("cells.values"),s("cells.format"),s("cells.align"),s("cells.prefix"),s("cells.suffix"),s("cells.height"),s("cells.line.width"),s("cells.line.color"),s("cells.fill.color"),A.coerceFont(s,"cells.font",A.extendFlat({},t.font)),g._length=null}},41724:function(te,X,e){te.exports={attributes:e(60520),supplyDefaults:e(53212),calc:e(39312),plot:e(24752),moduleType:"trace",name:"table",basePlotModule:e(85852),categories:["noOpacity"],meta:{}}},24752:function(te,X,e){var A=e(23536),P=e(33428),o=e(3400),L=o.numberFormat,M=e(71688),d=e(43616),g=e(72736),r=e(3400).raiseToTop,t=e(3400).strTranslate,s=e(3400).cancelTransition,a=e(55992),c=e(53056),u=e(76308);te.exports=function(ie,ne){var le=!ie._context.staticPlot,de=ie._fullLayout._paper.selectAll("."+A.cn.table).data(ne.map(function(Ze){var Ke=M.unwrap(Ze),nt=Ke.trace;return a(ie,nt)}),M.keyFun);de.exit().remove(),de.enter().append("g").classed(A.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"),de.attr("width",function(Ze){return Ze.width+Ze.size.l+Ze.size.r}).attr("height",function(Ze){return Ze.height+Ze.size.t+Ze.size.b}).attr("transform",function(Ze){return t(Ze.translateX,Ze.translateY)});var we=de.selectAll("."+A.cn.tableControlView).data(M.repeat,M.keyFun),me=we.enter().append("g").classed(A.cn.tableControlView,!0).style("box-sizing","content-box");if(le){var Le="onwheel"in document?"wheel":"mousewheel";me.on("mousemove",function(Ze){we.filter(function(Ke){return Ze===Ke}).call(f,ie)}).on(Le,function(Ze){if(!Ze.scrollbarState.wheeling){Ze.scrollbarState.wheeling=!0;var Ke=Ze.scrollY+P.event.deltaY,nt=j(ie,we,null,Ke)(Ze);nt||(P.event.stopPropagation(),P.event.preventDefault()),Ze.scrollbarState.wheeling=!1}}).call(f,ie,!0)}we.attr("transform",function(Ze){return t(Ze.size.l,Ze.size.t)});var ve=we.selectAll("."+A.cn.scrollBackground).data(M.repeat,M.keyFun);ve.enter().append("rect").classed(A.cn.scrollBackground,!0).attr("fill","none"),ve.attr("width",function(Ze){return Ze.width}).attr("height",function(Ze){return Ze.height}),we.each(function(Ze){d.setClipUrl(P.select(this),y(ie,Ze),ie)});var Ae=we.selectAll("."+A.cn.yColumn).data(function(Ze){return Ze.columns},M.keyFun);Ae.enter().append("g").classed(A.cn.yColumn,!0),Ae.exit().remove(),Ae.attr("transform",function(Ze){return t(Ze.x,0)}),le&&Ae.call(P.behavior.drag().origin(function(Ze){var Ke=P.select(this);return _(Ke,Ze,-A.uplift),r(this),Ze.calcdata.columnDragInProgress=!0,f(we.filter(function(nt){return Ze.calcdata.key===nt.key}),ie),Ze}).on("drag",function(Ze){var Ke=P.select(this),nt=function(vt){return(Ze===vt?P.event.x:vt.x)+vt.columnWidth/2};Ze.x=Math.max(-A.overdrag,Math.min(Ze.calcdata.width+A.overdrag-Ze.columnWidth,P.event.x));var it=T(Ae).filter(function(vt){return vt.calcdata.key===Ze.calcdata.key}),lt=it.sort(function(vt,xt){return nt(vt)-nt(xt)});lt.forEach(function(vt,xt){vt.xIndex=xt,vt.x=Ze===vt?vt.x:vt.xScale(vt)}),Ae.filter(function(vt){return Ze!==vt}).transition().ease(A.transitionEase).duration(A.transitionDuration).attr("transform",function(vt){return t(vt.x,0)}),Ke.call(s).attr("transform",t(Ze.x,-A.uplift))}).on("dragend",function(Ze){var Ke=P.select(this),nt=Ze.calcdata;Ze.x=Ze.xScale(Ze),Ze.calcdata.columnDragInProgress=!1,_(Ke,Ze,0),I(ie,nt,nt.columns.map(function(it){return it.xIndex}))})),Ae.each(function(Ze){d.setClipUrl(P.select(this),h(ie,Ze),ie)});var ye=Ae.selectAll("."+A.cn.columnBlock).data(c.splitToPanels,M.keyFun);ye.enter().append("g").classed(A.cn.columnBlock,!0).attr("id",function(Ze){return Ze.key}),ye.style("cursor",function(Ze){return Ze.dragHandle?"ew-resize":Ze.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Se=ye.filter(O),_e=ye.filter(z);le&&_e.call(P.behavior.drag().origin(function(Ze){return P.event.stopPropagation(),Ze}).on("drag",j(ie,we,-1)).on("dragend",function(){})),n(ie,we,Se,ye),n(ie,we,_e,ye);var ze=we.selectAll("."+A.cn.scrollAreaClip).data(M.repeat,M.keyFun);ze.enter().append("clipPath").classed(A.cn.scrollAreaClip,!0).attr("id",function(Ze){return y(ie,Ze)});var Ie=ze.selectAll("."+A.cn.scrollAreaClipRect).data(M.repeat,M.keyFun);Ie.enter().append("rect").classed(A.cn.scrollAreaClipRect,!0).attr("x",-A.overdrag).attr("y",-A.uplift).attr("fill","none"),Ie.attr("width",function(Ze){return Ze.width+2*A.overdrag}).attr("height",function(Ze){return Ze.height+A.uplift});var Ne=Ae.selectAll("."+A.cn.columnBoundary).data(M.repeat,M.keyFun);Ne.enter().append("g").classed(A.cn.columnBoundary,!0);var et=Ae.selectAll("."+A.cn.columnBoundaryClippath).data(M.repeat,M.keyFun);et.enter().append("clipPath").classed(A.cn.columnBoundaryClippath,!0),et.attr("id",function(Ze){return h(ie,Ze)});var st=et.selectAll("."+A.cn.columnBoundaryRect).data(M.repeat,M.keyFun);st.enter().append("rect").classed(A.cn.columnBoundaryRect,!0).attr("fill","none"),st.attr("width",function(Ze){return Ze.columnWidth+2*l(Ze)}).attr("height",function(Ze){return Ze.calcdata.height+2*l(Ze)+A.uplift}).attr("x",function(Ze){return-l(Ze)}).attr("y",function(Ze){return-l(Ze)}),V(null,_e,we)};function l(Y){return Math.ceil(Y.calcdata.maxLineWidth/2)}function y(Y,ie){return"clip"+Y._fullLayout._uid+"_scrollAreaBottomClip_"+ie.key}function h(Y,ie){return"clip"+Y._fullLayout._uid+"_columnBoundaryClippath_"+ie.calcdata.key+"_"+ie.specIndex}function T(Y){return[].concat.apply([],Y.map(function(ie){return ie})).map(function(ie){return ie.__data__})}function f(Y,ie,ne){function le(Ae){var ye=Ae.rowBlocks;return re(ye,ye.length-1)+(ye.length?H(ye[ye.length-1],1/0):1)}var de=Y.selectAll("."+A.cn.scrollbarKit).data(M.repeat,M.keyFun);de.enter().append("g").classed(A.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),de.each(function(Ae){var ye=Ae.scrollbarState;ye.totalHeight=le(Ae),ye.scrollableAreaHeight=Ae.groupHeight-F(Ae),ye.currentlyVisibleHeight=Math.min(ye.totalHeight,ye.scrollableAreaHeight),ye.ratio=ye.currentlyVisibleHeight/ye.totalHeight,ye.barLength=Math.max(ye.ratio*ye.currentlyVisibleHeight,A.goldenRatio*A.scrollbarWidth),ye.barWiggleRoom=ye.currentlyVisibleHeight-ye.barLength,ye.wiggleRoom=Math.max(0,ye.totalHeight-ye.scrollableAreaHeight),ye.topY=ye.barWiggleRoom===0?0:Ae.scrollY/ye.wiggleRoom*ye.barWiggleRoom,ye.bottomY=ye.topY+ye.barLength,ye.dragMultiplier=ye.wiggleRoom/ye.barWiggleRoom}).attr("transform",function(Ae){var ye=Ae.width+A.scrollbarWidth/2+A.scrollbarOffset;return t(ye,F(Ae))});var we=de.selectAll("."+A.cn.scrollbar).data(M.repeat,M.keyFun);we.enter().append("g").classed(A.cn.scrollbar,!0);var me=we.selectAll("."+A.cn.scrollbarSlider).data(M.repeat,M.keyFun);me.enter().append("g").classed(A.cn.scrollbarSlider,!0),me.attr("transform",function(Ae){return t(0,Ae.scrollbarState.topY||0)});var Le=me.selectAll("."+A.cn.scrollbarGlyph).data(M.repeat,M.keyFun);Le.enter().append("line").classed(A.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",A.scrollbarWidth).attr("stroke-linecap","round").attr("y1",A.scrollbarWidth/2),Le.attr("y2",function(Ae){return Ae.scrollbarState.barLength-A.scrollbarWidth/2}).attr("stroke-opacity",function(Ae){return Ae.columnDragInProgress||!Ae.scrollbarState.barWiggleRoom||ne?0:.4}),Le.transition().delay(0).duration(0),Le.transition().delay(A.scrollbarHideDelay).duration(A.scrollbarHideDuration).attr("stroke-opacity",0);var ve=we.selectAll("."+A.cn.scrollbarCaptureZone).data(M.repeat,M.keyFun);ve.enter().append("line").classed(A.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",A.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ae){var ye=P.event.y,Se=this.getBoundingClientRect(),_e=Ae.scrollbarState,ze=ye-Se.top,Ie=P.scale.linear().domain([0,_e.scrollableAreaHeight]).range([0,_e.totalHeight]).clamp(!0);_e.topY<=ze&&ze<=_e.bottomY||j(ie,Y,null,Ie(ze-_e.barLength/2))(Ae)}).call(P.behavior.drag().origin(function(Ae){return P.event.stopPropagation(),Ae.scrollbarState.scrollbarScrollInProgress=!0,Ae}).on("drag",j(ie,Y)).on("dragend",function(){})),ve.attr("y2",function(Ae){return Ae.scrollbarState.scrollableAreaHeight}),ie._context.staticPlot&&(Le.remove(),ve.remove())}function n(Y,ie,ne,le){var de=v(ne),we=m(de);S(we);var me=b(we);i(me);var Le=p(we),ve=E(Le);w(ve),C(ve,ie,le,Y),G(we)}function v(Y){var ie=Y.selectAll("."+A.cn.columnCells).data(M.repeat,M.keyFun);return ie.enter().append("g").classed(A.cn.columnCells,!0),ie.exit().remove(),ie}function m(Y){var ie=Y.selectAll("."+A.cn.columnCell).data(c.splitToCells,function(ne){return ne.keyWithinBlock});return ie.enter().append("g").classed(A.cn.columnCell,!0),ie.exit().remove(),ie}function b(Y){var ie=Y.selectAll("."+A.cn.cellRect).data(M.repeat,function(ne){return ne.keyWithinBlock});return ie.enter().append("rect").classed(A.cn.cellRect,!0),ie}function E(Y){var ie=Y.selectAll("."+A.cn.cellText).data(M.repeat,function(ne){return ne.keyWithinBlock});return ie.enter().append("text").classed(A.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){P.event.stopPropagation()}),ie}function p(Y){var ie=Y.selectAll("."+A.cn.cellTextHolder).data(M.repeat,function(ne){return ne.keyWithinBlock});return ie.enter().append("g").classed(A.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ie}function S(Y){Y.each(function(ie,ne){var le=ie.calcdata.cells.font,de=ie.column.specIndex,we={size:B(le.size,de,ne),color:B(le.color,de,ne),family:B(le.family,de,ne)};ie.rowNumber=ie.key,ie.align=B(ie.calcdata.cells.align,de,ne),ie.cellBorderWidth=B(ie.calcdata.cells.line.width,de,ne),ie.font=we})}function w(Y){Y.each(function(ie){d.font(P.select(this),ie.font)})}function i(Y){Y.attr("width",function(ie){return ie.column.columnWidth}).attr("stroke-width",function(ie){return ie.cellBorderWidth}).each(function(ie){var ne=P.select(this);u.stroke(ne,B(ie.calcdata.cells.line.color,ie.column.specIndex,ie.rowNumber)),u.fill(ne,B(ie.calcdata.cells.fill.color,ie.column.specIndex,ie.rowNumber))})}function C(Y,ie,ne,le){Y.text(function(de){var we=de.column.specIndex,me=de.rowNumber,Le=de.value,ve=typeof Le=="string",Ae=ve&&Le.match(/<br>/i),ye=!ve||Ae;de.mayHaveMarkup=ve&&Le.match(/[<&>]/);var Se=x(Le);de.latex=Se;var _e=Se?"":B(de.calcdata.cells.prefix,we,me)||"",ze=Se?"":B(de.calcdata.cells.suffix,we,me)||"",Ie=Se?null:B(de.calcdata.cells.format,we,me)||null,Ne=_e+(Ie?L(Ie)(de.value):de.value)+ze,et;de.wrappingNeeded=!de.wrapped&&!ye&&!Se&&(et=k(Ne)),de.cellHeightMayIncrease=Ae||Se||de.mayHaveMarkup||(et===void 0?k(Ne):et),de.needsConvertToTspans=de.mayHaveMarkup||de.wrappingNeeded||de.latex;var st;if(de.wrappingNeeded){var Ze=A.wrapSplitCharacter===" "?Ne.replace(/<a href=/ig,"<a_href="):Ne,Ke=Ze.split(A.wrapSplitCharacter),nt=A.wrapSplitCharacter===" "?Ke.map(function(it){return it.replace(/<a_href=/ig,"<a href=")}):Ke;de.fragments=nt.map(function(it){return{text:it,width:null}}),de.fragments.push({fragment:A.wrapSpacer,width:null}),st=nt.join(A.lineBreaker)+A.lineBreaker+A.wrapSpacer}else delete de.fragments,st=Ne;return st}).attr("dy",function(de){return de.needsConvertToTspans?0:"0.75em"}).each(function(de){var we=this,me=P.select(we),Le=de.wrappingNeeded?q:oe;de.needsConvertToTspans?g.convertToTspans(me,le,Le(ne,we,ie,le,de)):P.select(we.parentNode).attr("transform",function(ve){return t(Z(ve),A.cellPad)}).attr("text-anchor",function(ve){return{left:"start",center:"middle",right:"end"}[ve.align]})})}function x(Y){return typeof Y=="string"&&Y.match(A.latexCheck)}function k(Y){return Y.indexOf(A.wrapSplitCharacter)!==-1}function I(Y,ie,ne){var le=ie.gdColumnsOriginalOrder;ie.gdColumns.sort(function(de,we){return ne[le.indexOf(de)]-ne[le.indexOf(we)]}),ie.columnorder=ne,Y.emit("plotly_restyle")}function B(Y,ie,ne){if(o.isArrayOrTypedArray(Y)){var le=Y[Math.min(ie,Y.length-1)];return o.isArrayOrTypedArray(le)?le[Math.min(ne,le.length-1)]:le}else return Y}function _(Y,ie,ne){Y.transition().ease(A.releaseTransitionEase).duration(A.releaseTransitionDuration).attr("transform",t(ie.x,ne))}function z(Y){return Y.type==="cells"}function O(Y){return Y.type==="header"}function F(Y){var ie=Y.rowBlocks.length?Y.rowBlocks[0].auxiliaryBlocks:[];return ie.reduce(function(ne,le){return ne+H(le,1/0)},0)}function N(Y,ie,ne){for(var le=[],de=0,we=0;we<Y.length;we++){for(var me=Y[we],Le=me.rows,ve=0,Ae=0;Ae<Le.length;Ae++)ve+=Le[Ae].rowHeight;me.allRowsHeight=ve;var ye=de+ve,Se=ie,_e=Se+ne;Se<ye&&_e>de&&le.push(we),de+=ve}return le}function V(Y,ie,ne){var le=T(ie)[0];if(le!==void 0){var de=le.rowBlocks,we=le.calcdata,me=re(de,de.length),Le=le.calcdata.groupHeight-F(le),ve=we.scrollY=Math.max(0,Math.min(me-Le,we.scrollY)),Ae=N(de,ve,Le);Ae.length===1&&(Ae[0]===de.length-1?Ae.unshift(Ae[0]-1):Ae.push(Ae[0]+1)),Ae[0]%2&&Ae.reverse(),ie.each(function(ye,Se){ye.page=Ae[Se],ye.scrollY=ve}),ie.attr("transform",function(ye){var Se=re(ye.rowBlocks,ye.page)-ye.scrollY;return t(0,Se)}),Y&&($(Y,ne,ie,Ae,le.prevPages,le,0),$(Y,ne,ie,Ae,le.prevPages,le,1),f(ne,Y))}}function j(Y,ie,ne,le){return function(we){var me=we.calcdata?we.calcdata:we,Le=ie.filter(function(Se){return me.key===Se.key}),ve=ne||me.scrollbarState.dragMultiplier,Ae=me.scrollY;me.scrollY=le===void 0?me.scrollY+ve*P.event.dy:le;var ye=Le.selectAll("."+A.cn.yColumn).selectAll("."+A.cn.columnBlock).filter(z);return V(Y,ye,Le),me.scrollY===Ae}}function $(Y,ie,ne,le,de,we,me){var Le=le[me]!==de[me];Le&&(clearTimeout(we.currentRepaint[me]),we.currentRepaint[me]=setTimeout(function(){var ve=ne.filter(function(Ae,ye){return ye===me&&le[ye]!==de[ye]});n(Y,ie,ve,ne),de[me]=le[me]}))}function q(Y,ie,ne,le){return function(){var we=P.select(ie.parentNode);we.each(function(me){var Le=me.fragments;we.selectAll("tspan.line").each(function(Ne,et){Le[et].width=this.getComputedTextLength()});var ve=Le[Le.length-1].width,Ae=Le.slice(0,-1),ye=[],Se,_e,ze=0,Ie=me.column.columnWidth-2*A.cellPad;for(me.value="";Ae.length;)Se=Ae.shift(),_e=Se.width+ve,ze+_e>Ie&&(me.value+=ye.join(A.wrapSpacer)+A.lineBreaker,ye=[],ze=0),ye.push(Se.text),ze+=_e;ze&&(me.value+=ye.join(A.wrapSpacer)),me.wrapped=!0}),we.selectAll("tspan.line").remove(),C(we.select("."+A.cn.cellText),ne,Y,le),P.select(ie.parentNode.parentNode).call(G)}}function oe(Y,ie,ne,le,de){return function(){if(!de.settledY){var me=P.select(ie.parentNode),Le=ae(de),ve=de.key-Le.firstRowIndex,Ae=Le.rows[ve].rowHeight,ye=de.cellHeightMayIncrease?ie.parentNode.getBoundingClientRect().height+2*A.cellPad:Ae,Se=Math.max(ye,Ae),_e=Se-Le.rows[ve].rowHeight;_e&&(Le.rows[ve].rowHeight=Se,Y.selectAll("."+A.cn.columnCell).call(G),V(null,Y.filter(z),0),f(ne,le,!0)),me.attr("transform",function(){var ze=this,Ie=ze.parentNode,Ne=Ie.getBoundingClientRect(),et=P.select(ze.parentNode).select("."+A.cn.cellRect).node().getBoundingClientRect(),st=ze.transform.baseVal.consolidate(),Ze=et.top-Ne.top+(st?st.matrix.f:A.cellPad);return t(Z(de,P.select(ze.parentNode).select("."+A.cn.cellTextHolder).node().getBoundingClientRect().width),Ze)}),de.settledY=!0}}}function Z(Y,ie){switch(Y.align){case"left":return A.cellPad;case"right":return Y.column.columnWidth-(ie||0)-A.cellPad;case"center":return(Y.column.columnWidth-(ie||0))/2;default:return A.cellPad}}function G(Y){Y.attr("transform",function(ie){var ne=ie.rowBlocks[0].auxiliaryBlocks.reduce(function(me,Le){return me+H(Le,1/0)},0),le=ae(ie),de=H(le,ie.key),we=de+ne;return t(0,we)}).selectAll("."+A.cn.cellRect).attr("height",function(ie){return K(ae(ie),ie.key).rowHeight})}function re(Y,ie){for(var ne=0,le=ie-1;le>=0;le--)ne+=J(Y[le]);return ne}function H(Y,ie){for(var ne=0,le=0;le<Y.rows.length&&Y.rows[le].rowIndex<ie;le++)ne+=Y.rows[le].rowHeight;return ne}function J(Y){var ie=Y.allRowsHeight;if(ie!==void 0)return ie;for(var ne=0,le=0;le<Y.rows.length;le++)ne+=Y.rows[le].rowHeight;return Y.allRowsHeight=ne,ne}function ae(Y){return Y.rowBlocks[Y.page]}function K(Y,ie){return Y.rows[ie-Y.firstRowIndex]}},40516:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(49084),L=e(86968).u,M=e(74996),d=e(424),g=e(32984),r=e(92880).extendFlat,t=e(98192).c;te.exports={labels:d.labels,parents:d.parents,values:d.values,branchvalues:d.branchvalues,count:d.count,level:d.level,maxdepth:d.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:r({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:d.marker.colors,pattern:t,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:d.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},o("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:r({},M.textfont,{}),editType:"calc"},text:M.text,textinfo:d.textinfo,texttemplate:P({editType:"plot"},{keys:g.eventDataKeys.concat(["label","value"])}),hovertext:M.hovertext,hoverinfo:d.hoverinfo,hovertemplate:A({},{keys:g.eventDataKeys}),textfont:M.textfont,insidetextfont:M.insidetextfont,outsidetextfont:r({},M.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:M.sort,root:d.root,domain:L({name:"treemap",trace:!0,editType:"calc"})}},79516:function(te,X,e){var A=e(7316);X.name="treemap",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},97840:function(te,X,e){var A=e(3776);X.r=function(P,o){return A.calc(P,o)},X.q=function(P){return A._runCrossTraceCalc("treemap",P)}},32984:function(te){te.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(te,X,e){var A=e(3400),P=e(40516),o=e(76308),L=e(86968).Q,M=e(31508).handleText,d=e(78048).TEXTPAD,g=e(74174).handleMarkerDefaults,r=e(8932),t=r.hasColorscale,s=r.handleDefaults;te.exports=function(c,u,l,y){function h(i,C){return A.coerce(c,u,P,i,C)}var T=h("labels"),f=h("parents");if(!T||!T.length||!f||!f.length){u.visible=!1;return}var n=h("values");n&&n.length?h("branchvalues"):h("count"),h("level"),h("maxdepth");var v=h("tiling.packing");v==="squarify"&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var m=h("text");h("texttemplate"),u.texttemplate||h("textinfo",A.isArrayOrTypedArray(m)?"text+label":"label"),h("hovertext"),h("hovertemplate");var b=h("pathbar.visible"),E="auto";M(c,u,y,h,E,{hasPathbar:b,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var p=u.textposition.indexOf("bottom")!==-1;g(c,u,y,h);var S=u._hasColorscale=t(c,"marker","colors")||(c.marker||{}).coloraxis;S?s(c,u,y,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(u.marker.colors||[]).length);var w=u.textfont.size*2;h("marker.pad.t",p?w/4:w),h("marker.pad.l",w/4),h("marker.pad.r",w/4),h("marker.pad.b",p?w:w/4),h("marker.cornerradius"),u._hovered={marker:{line:{width:2,color:o.contrast(y.paper_bgcolor)}}},b&&(h("pathbar.thickness",u.pathbar.textfont.size+2*d),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),L(u,y,h),u._length=null}},95808:function(te,X,e){var A=e(33428),P=e(78176),o=e(82744),L=o.clearMinTextSize,M=e(60100).resizeText,d=e(52960);te.exports=function(r,t,s,a,c){var u=c.type,l=c.drawDescendants,y=r._fullLayout,h=y["_"+u+"layer"],T,f,n=!s;if(L(u,y),T=h.selectAll("g.trace."+u).data(t,function(m){return m[0].trace.uid}),T.enter().append("g").classed("trace",!0).classed(u,!0),T.order(),!y.uniformtext.mode&&P.hasTransition(s)){a&&(f=a());var v=A.transition().duration(s.duration).ease(s.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});v.each(function(){h.selectAll("g.trace").each(function(m){d(r,m,this,s,l)})})}else T.each(function(m){d(r,m,this,s,l)}),y.uniformtext.mode&&M(r,h.selectAll(".trace"),u);n&&T.exit().remove()}},27336:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(72736),M=e(13832),d=e(66192).styleOne,g=e(32984),r=e(78176),t=e(45716),s=!0;te.exports=function(c,u,l,y,h){var T=h.barDifY,f=h.width,n=h.height,v=h.viewX,m=h.viewY,b=h.pathSlice,E=h.toMoveInsideSlice,p=h.strTransform,S=h.hasTransition,w=h.handleSlicesExit,i=h.makeUpdateSliceInterpolator,C=h.makeUpdateTextInterpolator,x={},k=c._context.staticPlot,I=c._fullLayout,B=u[0],_=B.trace,z=B.hierarchy,O=f/_._entryDepth,F=r.listPath(l.data,"id"),N=M(z.copy(),[f,n],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();N=N.filter(function(j){var $=F.indexOf(j.data.id);return $===-1?!1:(j.x0=O*$,j.x1=O*($+1),j.y0=T,j.y1=T+n,j.onPathbar=!0,!0)}),N.reverse(),y=y.data(N,r.getPtId),y.enter().append("g").classed("pathbar",!0),w(y,s,x,[f,n],b),y.order();var V=y;S&&(V=V.transition().each("end",function(){var j=A.select(this);r.setSliceCursor(j,c,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(j){j._x0=v(j.x0),j._x1=v(j.x1),j._y0=m(j.y0),j._y1=m(j.y1),j._hoverX=v(j.x1-Math.min(f,n)/2),j._hoverY=m(j.y1-n/2);var $=A.select(this),q=P.ensureSingle($,"path","surface",function(re){re.style("pointer-events",k?"none":"all")});S?q.transition().attrTween("d",function(re){var H=i(re,s,x,[f,n]);return function(J){return b(H(J))}}):q.attr("d",b),$.call(t,l,c,u,{styleOne:d,eventDataKeys:g.eventDataKeys,transitionTime:g.CLICK_TRANSITION_TIME,transitionEasing:g.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:c._transitioning}),q.call(d,j,_,c,{hovered:!1}),j._text=(r.getPtLabel(j)||"").split("<br>").join(" ")||"";var oe=P.ensureSingle($,"g","slicetext"),Z=P.ensureSingle(oe,"text","",function(re){re.attr("data-notex",1)}),G=P.ensureUniformFontSize(c,r.determineTextFont(_,j,I.font,{onPathbar:!0}));Z.text(j._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(o.font,G).call(L.convertToTspans,c),j.textBB=o.bBox(Z.node()),j.transform=E(j,{fontSize:G.size,onPathbar:!0}),j.transform.fontSize=G.size,S?Z.transition().attrTween("transform",function(re){var H=C(re,s,x,[f,n]);return function(J){return p(H(J))}}):Z.attr("transform",p(j))})}},76477:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(72736),M=e(13832),d=e(66192).styleOne,g=e(32984),r=e(78176),t=e(45716),s=e(96488).formatSliceLabel,a=!1;te.exports=function(u,l,y,h,T){var f=T.width,n=T.height,v=T.viewX,m=T.viewY,b=T.pathSlice,E=T.toMoveInsideSlice,p=T.strTransform,S=T.hasTransition,w=T.handleSlicesExit,i=T.makeUpdateSliceInterpolator,C=T.makeUpdateTextInterpolator,x=T.prevEntry,k={},I=u._context.staticPlot,B=u._fullLayout,_=l[0],z=_.trace,O=z.textposition.indexOf("left")!==-1,F=z.textposition.indexOf("right")!==-1,N=z.textposition.indexOf("bottom")!==-1,V=!N&&!z.marker.pad.t||N&&!z.marker.pad.b,j=M(y,[f,n],{packing:z.tiling.packing,squarifyratio:z.tiling.squarifyratio,flipX:z.tiling.flip.indexOf("x")>-1,flipY:z.tiling.flip.indexOf("y")>-1,pad:{inner:z.tiling.pad,top:z.marker.pad.t,left:z.marker.pad.l,right:z.marker.pad.r,bottom:z.marker.pad.b}}),$=j.descendants(),q=1/0,oe=-1/0;$.forEach(function(J){var ae=J.depth;ae>=z._maxDepth?(J.x0=J.x1=(J.x0+J.x1)/2,J.y0=J.y1=(J.y0+J.y1)/2):(q=Math.min(q,ae),oe=Math.max(oe,ae))}),h=h.data($,r.getPtId),z._maxVisibleLayers=isFinite(oe)?oe-q+1:0,h.enter().append("g").classed("slice",!0),w(h,a,k,[f,n],b),h.order();var Z=null;if(S&&x){var G=r.getPtId(x);h.each(function(J){Z===null&&r.getPtId(J)===G&&(Z={x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1})})}var re=function(){return Z||{x0:0,x1:f,y0:0,y1:n}},H=h;return S&&(H=H.transition().each("end",function(){var J=A.select(this);r.setSliceCursor(J,u,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(J){var ae=r.isHeader(J,z);J._x0=v(J.x0),J._x1=v(J.x1),J._y0=m(J.y0),J._y1=m(J.y1),J._hoverX=v(J.x1-z.marker.pad.r),J._hoverY=m(N?J.y1-z.marker.pad.b/2:J.y0+z.marker.pad.t/2);var K=A.select(this),Y=P.ensureSingle(K,"path","surface",function(me){me.style("pointer-events",I?"none":"all")});S?Y.transition().attrTween("d",function(me){var Le=i(me,a,re(),[f,n]);return function(ve){return b(Le(ve))}}):Y.attr("d",b),K.call(t,y,u,l,{styleOne:d,eventDataKeys:g.eventDataKeys,transitionTime:g.CLICK_TRANSITION_TIME,transitionEasing:g.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,u,{isTransitioning:u._transitioning}),Y.call(d,J,z,u,{hovered:!1}),J.x0===J.x1||J.y0===J.y1?J._text="":ae?J._text=V?"":r.getPtLabel(J)||"":J._text=s(J,y,z,l,B)||"";var ie=P.ensureSingle(K,"g","slicetext"),ne=P.ensureSingle(ie,"text","",function(me){me.attr("data-notex",1)}),le=P.ensureUniformFontSize(u,r.determineTextFont(z,J,B.font)),de=J._text||" ",we=ae&&de.indexOf("<br>")===-1;ne.text(de).classed("slicetext",!0).attr("text-anchor",F?"end":O||we?"start":"middle").call(o.font,le).call(L.convertToTspans,u),J.textBB=o.bBox(ne.node()),J.transform=E(J,{fontSize:le.size,isHeader:ae}),J.transform.fontSize=le.size,S?ne.transition().attrTween("transform",function(me){var Le=C(me,a,re(),[f,n]);return function(ve){return p(Le(ve))}}):ne.attr("transform",p(J))}),Z}},83024:function(te){te.exports=function X(e,A,P){var o;P.swapXY&&(o=e.x0,e.x0=e.y0,e.y0=o,o=e.x1,e.x1=e.y1,e.y1=o),P.flipX&&(o=e.x0,e.x0=A[0]-e.x1,e.x1=A[0]-o),P.flipY&&(o=e.y0,e.y0=A[1]-e.y1,e.y1=A[1]-o);var L=e.children;if(L)for(var M=0;M<L.length;M++)X(L[M],A,P)}},31991:function(te,X,e){te.exports={moduleType:"trace",name:"treemap",basePlotModule:e(79516),categories:[],animatable:!0,attributes:e(40516),layoutAttributes:e(45392),supplyDefaults:e(34092),supplyLayoutDefaults:e(77480),calc:e(97840).r,crossTraceCalc:e(97840).q,plot:e(53264),style:e(66192).style,colorbar:e(5528),meta:{}}},45392:function(te){te.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},77480:function(te,X,e){var A=e(3400),P=e(45392);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("treemapcolorway",M.colorway),d("extendtreemapcolors")}},13832:function(te,X,e){var A=e(74148),P=e(83024);te.exports=function(M,d,g){var r=g.flipX,t=g.flipY,s=g.packing==="dice-slice",a=g.pad[t?"bottom":"top"],c=g.pad[r?"right":"left"],u=g.pad[r?"left":"right"],l=g.pad[t?"top":"bottom"],y;s&&(y=c,c=a,a=y,y=u,u=l,l=y);var h=A.treemap().tile(o(g.packing,g.squarifyratio)).paddingInner(g.pad.inner).paddingLeft(c).paddingRight(u).paddingTop(a).paddingBottom(l).size(s?[d[1],d[0]]:d)(M);return(s||r||t)&&P(h,d,{swapXY:s,flipX:r,flipY:t}),h};function o(L,M){switch(L){case"squarify":return A.treemapSquarify.ratio(M);case"binary":return A.treemapBinary;case"dice":return A.treemapDice;case"slice":return A.treemapSlice;default:return A.treemapSliceDice}}},53264:function(te,X,e){var A=e(95808),P=e(76477);te.exports=function(L,M,d,g){return A(L,M,d,g,{type:"treemap",drawDescendants:P})}},52960:function(te,X,e){var A=e(33428),P=e(67756).qy,o=e(78176),L=e(3400),M=e(78048).TEXTPAD,d=e(98184),g=d.toMoveInsideBar,r=e(82744),t=r.recordMinTextSize,s=e(32984),a=e(27336);function c(u){return o.isHierarchyRoot(u)?"":o.getPtId(u)}te.exports=function(l,y,h,T,f){var n=l._fullLayout,v=y[0],m=v.trace,b=m.type,E=b==="icicle",p=v.hierarchy,S=o.findEntryWithLevel(p,m.level),w=A.select(h),i=w.selectAll("g.pathbar"),C=w.selectAll("g.slice");if(!S){i.remove(),C.remove();return}var x=o.isHierarchyRoot(S),k=!n.uniformtext.mode&&o.hasTransition(T),I=o.getMaxDepth(m),B=function(Pe){return Pe.data.depth-S.data.depth<I},_=n._size,z=m.domain,O=_.w*(z.x[1]-z.x[0]),F=_.h*(z.y[1]-z.y[0]),N=O,V=m.pathbar.thickness,j=m.marker.line.width+s.gapWithPathbar,$=m.pathbar.visible?m.pathbar.side.indexOf("bottom")>-1?F+j:-(V+j):0,q={x0:N,x1:N,y0:$,y1:$+V},oe=function(Pe,Ue,He){var Oe=m.tiling.pad,Ce=function(be){return be-Oe<=Ue.x0},ge=function(be){return be+Oe>=Ue.x1},pe=function(be){return be-Oe<=Ue.y0},Te=function(be){return be+Oe>=Ue.y1};return Pe.x0===Ue.x0&&Pe.x1===Ue.x1&&Pe.y0===Ue.y0&&Pe.y1===Ue.y1?{x0:Pe.x0,x1:Pe.x1,y0:Pe.y0,y1:Pe.y1}:{x0:Ce(Pe.x0-Oe)?0:ge(Pe.x0-Oe)?He[0]:Pe.x0,x1:Ce(Pe.x1+Oe)?0:ge(Pe.x1+Oe)?He[0]:Pe.x1,y0:pe(Pe.y0-Oe)?0:Te(Pe.y0-Oe)?He[1]:Pe.y0,y1:pe(Pe.y1+Oe)?0:Te(Pe.y1+Oe)?He[1]:Pe.y1}},Z=null,G={},re={},H=null,J=function(Pe,Ue){return Ue?G[c(Pe)]:re[c(Pe)]},ae=function(Pe,Ue,He,Oe){if(Ue)return G[c(p)]||q;var Ce=re[m.level]||He;return B(Pe)?oe(Pe,Ce,Oe):{}};v.hasMultipleRoots&&x&&I++,m._maxDepth=I,m._backgroundColor=n.paper_bgcolor,m._entryDepth=S.data.depth,m._atRootLevel=x;var K=-O/2+_.l+_.w*(z.x[1]+z.x[0])/2,Y=-F/2+_.t+_.h*(1-(z.y[1]+z.y[0])/2),ie=function(Pe){return K+Pe},ne=function(Pe){return Y+Pe},le=ne(0),de=ie(0),we=function(Pe){return de+Pe},me=function(Pe){return le+Pe};function Le(Pe,Ue){return Pe+","+Ue}var ve=we(0),Ae=function(Pe){Pe.x=Math.max(ve,Pe.x)},ye=m.pathbar.edgeshape,Se=function(Pe){var Ue=we(Math.max(Math.min(Pe.x0,Pe.x0),0)),He=we(Math.min(Math.max(Pe.x1,Pe.x1),N)),Oe=me(Pe.y0),Ce=me(Pe.y1),ge=V/2,pe={},Te={};pe.x=Ue,Te.x=He,pe.y=Te.y=(Oe+Ce)/2;var be={x:Ue,y:Oe},ke={x:He,y:Oe},Ve={x:He,y:Ce},je={x:Ue,y:Ce};return ye===">"?(be.x-=ge,ke.x-=ge,Ve.x-=ge,je.x-=ge):ye==="/"?(Ve.x-=ge,je.x-=ge,pe.x-=ge/2,Te.x-=ge/2):ye==="\\"?(be.x-=ge,ke.x-=ge,pe.x-=ge/2,Te.x-=ge/2):ye==="<"&&(pe.x-=ge,Te.x-=ge),Ae(be),Ae(je),Ae(pe),Ae(ke),Ae(Ve),Ae(Te),"M"+Le(be.x,be.y)+"L"+Le(ke.x,ke.y)+"L"+Le(Te.x,Te.y)+"L"+Le(Ve.x,Ve.y)+"L"+Le(je.x,je.y)+"L"+Le(pe.x,pe.y)+"Z"},_e=m[E?"tiling":"marker"].pad,ze=function(Pe){return m.textposition.indexOf(Pe)!==-1},Ie=ze("top"),Ne=ze("left"),et=ze("right"),st=ze("bottom"),Ze=function(Pe){var Ue=ie(Pe.x0),He=ie(Pe.x1),Oe=ne(Pe.y0),Ce=ne(Pe.y1),ge=He-Ue,pe=Ce-Oe;if(!ge||!pe)return"";var Te=m.marker.cornerradius||0,be=Math.min(Te,ge/2,pe/2);be&&Pe.data&&Pe.data.data&&Pe.data.data.label&&(Ie&&(be=Math.min(be,_e.t)),Ne&&(be=Math.min(be,_e.l)),et&&(be=Math.min(be,_e.r)),st&&(be=Math.min(be,_e.b)));var ke=function(Ve,je){return be?"a"+Le(be,be)+" 0 0 1 "+Le(Ve,je):""};return"M"+Le(Ue,Oe+be)+ke(be,-be)+"L"+Le(He-be,Oe)+ke(be,be)+"L"+Le(He,Ce-be)+ke(-be,be)+"L"+Le(Ue+be,Ce)+ke(-be,-be)+"Z"},Ke=function(Pe,Ue){var He=Pe.x0,Oe=Pe.x1,Ce=Pe.y0,ge=Pe.y1,pe=Pe.textBB,Te=Ie||Ue.isHeader&&!st,be=Te?"start":st?"end":"middle",ke=ze("right"),Ve=ze("left")||Ue.onPathbar,je=Ve?-1:ke?1:0;if(Ue.isHeader){if(He+=(E?_e:_e.l)-M,Oe-=(E?_e:_e.r)-M,He>=Oe){var at=(He+Oe)/2;He=at,Oe=at}var ut;st?(ut=ge-(E?_e:_e.b),Ce<ut&&ut<ge&&(Ce=ut)):(ut=Ce+(E?_e:_e.t),Ce<ut&&ut<ge&&(ge=ut))}var Nt=g(He,Oe,Ce,ge,pe,{isHorizontal:!1,constrained:!0,angle:0,anchor:be,leftToRight:je});return Nt.fontSize=Ue.fontSize,Nt.targetX=ie(Nt.targetX),Nt.targetY=ne(Nt.targetY),isNaN(Nt.targetX)||isNaN(Nt.targetY)?{}:(He!==Oe&&Ce!==ge&&t(m.type,Nt,n),{scale:Nt.scale,rotate:Nt.rotate,textX:Nt.textX,textY:Nt.textY,anchorX:Nt.anchorX,anchorY:Nt.anchorY,targetX:Nt.targetX,targetY:Nt.targetY})},nt=function(Pe,Ue){for(var He,Oe=0,Ce=Pe;!He&&Oe<I;)Oe++,Ce=Ce.parent,Ce?He=J(Ce,Ue):Oe=I;return He||{}},it=function(Pe,Ue,He,Oe){var Ce=J(Pe,Ue),ge;if(Ue)ge=q;else{var pe=J(S,Ue);pe?ge=oe(Pe,pe,Oe):ge={}}return P(Ce,ge)},lt=function(Pe,Ue,He,Oe,Ce){var ge=J(Pe,Ue),pe;if(ge)pe=ge;else if(Ue)pe=q;else if(Z)if(Pe.parent){var Te=H||He;Te&&!Ue?pe=oe(Pe,Te,Oe):(pe={},L.extendFlat(pe,nt(Pe,Ue)))}else pe=L.extendFlat({},Pe),E&&(Ce.orientation==="h"?Ce.flipX?pe.x0=Pe.x1:pe.x1=0:Ce.flipY?pe.y0=Pe.y1:pe.y1=0);else pe={};return P(pe,{x0:Pe.x0,x1:Pe.x1,y0:Pe.y0,y1:Pe.y1})},vt=function(Pe,Ue,He,Oe){var Ce=J(Pe,Ue),ge={},pe=ae(Pe,Ue,He,Oe);L.extendFlat(ge,{transform:Ke({x0:pe.x0,x1:pe.x1,y0:pe.y0,y1:pe.y1,textBB:Pe.textBB,_text:Pe._text},{isHeader:o.isHeader(Pe,m)})}),Ce?ge=Ce:Pe.parent&&L.extendFlat(ge,nt(Pe,Ue));var Te=Pe.transform;return Pe.x0!==Pe.x1&&Pe.y0!==Pe.y1&&t(m.type,Te,n),P(ge,{transform:{scale:Te.scale,rotate:Te.rotate,textX:Te.textX,textY:Te.textY,anchorX:Te.anchorX,anchorY:Te.anchorY,targetX:Te.targetX,targetY:Te.targetY}})},xt=function(Pe,Ue,He,Oe,Ce){var ge=Oe[0],pe=Oe[1];k?Pe.exit().transition().each(function(){var Te=A.select(this),be=Te.select("path.surface");be.transition().attrTween("d",function(Ve){var je=it(Ve,Ue,He,[ge,pe]);return function(at){return Ce(je(at))}});var ke=Te.select("g.slicetext");ke.attr("opacity",0)}).remove():Pe.exit().remove()},Je=function(Pe){var Ue=Pe.transform;return Pe.x0!==Pe.x1&&Pe.y0!==Pe.y1&&t(m.type,Ue,n),L.getTextTransform({textX:Ue.textX,textY:Ue.textY,anchorX:Ue.anchorX,anchorY:Ue.anchorY,targetX:Ue.targetX,targetY:Ue.targetY,scale:Ue.scale,rotate:Ue.rotate})};k&&(i.each(function(Pe){G[c(Pe)]={x0:Pe.x0,x1:Pe.x1,y0:Pe.y0,y1:Pe.y1},Pe.transform&&(G[c(Pe)].transform={textX:Pe.transform.textX,textY:Pe.transform.textY,anchorX:Pe.transform.anchorX,anchorY:Pe.transform.anchorY,targetX:Pe.transform.targetX,targetY:Pe.transform.targetY,scale:Pe.transform.scale,rotate:Pe.transform.rotate})}),C.each(function(Pe){re[c(Pe)]={x0:Pe.x0,x1:Pe.x1,y0:Pe.y0,y1:Pe.y1},Pe.transform&&(re[c(Pe)].transform={textX:Pe.transform.textX,textY:Pe.transform.textY,anchorX:Pe.transform.anchorX,anchorY:Pe.transform.anchorY,targetX:Pe.transform.targetX,targetY:Pe.transform.targetY,scale:Pe.transform.scale,rotate:Pe.transform.rotate}),!Z&&o.isEntry(Pe)&&(Z=Pe)})),H=f(l,y,S,C,{width:O,height:F,viewX:ie,viewY:ne,pathSlice:Ze,toMoveInsideSlice:Ke,prevEntry:Z,makeUpdateSliceInterpolator:lt,makeUpdateTextInterpolator:vt,handleSlicesExit:xt,hasTransition:k,strTransform:Je}),m.pathbar.visible?a(l,y,S,i,{barDifY:$,width:N,height:V,viewX:we,viewY:me,pathSlice:Se,toMoveInsideSlice:Ke,makeUpdateSliceInterpolator:lt,makeUpdateTextInterpolator:vt,handleSlicesExit:xt,hasTransition:k,strTransform:Je}):i.remove()}},66192:function(te,X,e){var A=e(33428),P=e(76308),o=e(3400),L=e(78176),M=e(82744).resizeText,d=e(60404);function g(t){var s=t._fullLayout._treemaplayer.selectAll(".trace");M(t,s,"treemap"),s.each(function(a){var c=A.select(this),u=a[0],l=u.trace;c.style("opacity",l.opacity),c.selectAll("path.surface").each(function(y){A.select(this).call(r,y,l,t,{hovered:!1})})})}function r(t,s,a,c,u){var l=(u||{}).hovered,y=s.data.data,h=y.i,T,f,n=y.color,v=L.isHierarchyRoot(s),m=1;if(l)T=a._hovered.marker.line.color,f=a._hovered.marker.line.width;else if(v&&n===a.root.color)m=100,T="rgba(0,0,0,0)",f=0;else if(T=o.castOption(a,h,"marker.line.color")||P.defaultLine,f=o.castOption(a,h,"marker.line.width")||0,!a._hasColorscale&&!s.onPathbar){var b=a.marker.depthfade;if(b){var E=P.combine(P.addOpacity(a._backgroundColor,.75),n),p;if(b===!0){var S=L.getMaxDepth(a);isFinite(S)?L.isLeaf(s)?p=0:p=a._maxVisibleLayers-(s.data.depth-a._entryDepth):p=s.data.height+1}else p=s.data.depth-a._entryDepth,a._atRootLevel||p++;if(p>0)for(var w=0;w<p;w++){var i=.5*w/p;n=P.combine(P.addOpacity(E,i),n)}}}t.call(d,s,a,c,n).style("stroke-width",f).call(P.stroke,T).style("opacity",m)}te.exports={style:g,styleOne:r}},13988:function(te,X,e){var A=e(63188),P=e(92880).extendFlat,o=e(29736).axisHoverFormat;te.exports={y:A.y,x:A.x,x0:A.x0,y0:A.y0,xhoverformat:o("x"),yhoverformat:o("y"),name:P({},A.name,{}),orientation:P({},A.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:A.fillcolor,points:P({},A.boxpoints,{}),jitter:P({},A.jitter,{}),pointpos:P({},A.pointpos,{}),width:P({},A.width,{}),marker:A.marker,text:A.text,hovertext:A.hovertext,hovertemplate:A.hovertemplate,quartilemethod:A.quartilemethod,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:A.offsetgroup,alignmentgroup:A.alignmentgroup,selected:A.selected,unselected:A.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},67064:function(te,X,e){var A=e(3400),P=e(54460),o=e(62555),L=e(63800),M=e(39032).BADNUM;te.exports=function(s,a){var c=o(s,a);if(c[0].t.empty)return c;for(var u=s._fullLayout,l=P.getFromId(s,a[a.orientation==="h"?"xaxis":"yaxis"]),y=1/0,h=-1/0,T=0,f=0,n=0;n<c.length;n++){var v=c[n],m=v.pts.map(L.extractVal),b=v.bandwidth=g(a,v,m),E=v.span=r(a,v,l,b);if(v.min===v.max&&b===0)E=v.span=[v.min,v.max],v.density=[{v:1,t:E[0]}],v.bandwidth=b,T=Math.max(T,1);else{var p=E[1]-E[0],S=Math.ceil(p/(b/3)),w=p/S;if(!isFinite(w)||!isFinite(S))return A.error("Something went wrong with computing the violin span"),c[0].t.empty=!0,c;var i=L.makeKDE(v,a,m);v.density=new Array(S);for(var C=0,x=E[0];x<E[1]+w/2;C++,x+=w){var k=i(x);v.density[C]={v:k,t:x},T=Math.max(T,k)}}f=Math.max(f,m.length),y=Math.min(y,E[0]),h=Math.max(h,E[1])}var I=P.findExtremes(l,[y,h],{padded:!0});if(a._extremes[l._id]=I,a.width)c[0].t.maxKDE=T;else{var B=u._violinScaleGroupStats,_=a.scalegroup,z=B[_];z?(z.maxKDE=Math.max(z.maxKDE,T),z.maxCount=Math.max(z.maxCount,f)):B[_]={maxKDE:T,maxCount:f}}return c[0].t.labels.kde=A._(s,"kde:"),c};function d(t,s,a){var c=Math.min(s,a/1.349);return 1.059*c*Math.pow(t,-.2)}function g(t,s,a){var c=s.max-s.min;if(!c)return t.bandwidth?t.bandwidth:0;if(t.bandwidth)return Math.max(t.bandwidth,c/1e4);var u=a.length,l=A.stdev(a,u-1,s.mean);return Math.max(d(u,l,s.q3-s.q1),c/100)}function r(t,s,a,c){var u=t.spanmode,l=t.span||[],y=[s.min,s.max],h=[s.min-2*c,s.max+2*c],T;function f(v){var m=l[v],b=a.type==="multicategory"?a.r2c(m):a.d2c(m,0,t[s.valLetter+"calendar"]);return b===M?h[v]:b}u==="soft"?T=h:u==="hard"?T=y:T=[f(0),f(1)];var n={type:"linear",range:T};return P.setConvert(n),n.cleanRange(),T}},14348:function(te,X,e){var A=e(96404).setPositionOffset,P=["v","h"];te.exports=function(L,M){for(var d=L.calcdata,g=M.xaxis,r=M.yaxis,t=0;t<P.length;t++){for(var s=P[t],a=s==="h"?r:g,c=[],u=0;u<d.length;u++){var l=d[u],y=l[0].t,h=l[0].trace;h.visible===!0&&h.type==="violin"&&!y.empty&&h.orientation===s&&h.xaxis===g._id&&h.yaxis===r._id&&c.push(u)}A("violin",L,c,a)}}},36240:function(te,X,e){var A=e(3400),P=e(76308),o=e(90624),L=e(13988);te.exports=function(d,g,r,t){function s(w,i){return A.coerce(d,g,L,w,i)}function a(w,i){return A.coerce2(d,g,L,w,i)}if(o.handleSampleDefaults(d,g,s,t),g.visible!==!1){s("bandwidth"),s("side");var c=s("width");c||(s("scalegroup",g.name),s("scalemode"));var u=s("span"),l;Array.isArray(u)&&(l="manual"),s("spanmode",l);var y=s("line.color",(d.marker||{}).color||r),h=s("line.width"),T=s("fillcolor",P.addOpacity(g.line.color,.5));o.handlePointsDefaults(d,g,s,{prefix:""});var f=a("box.width"),n=a("box.fillcolor",T),v=a("box.line.color",y),m=a("box.line.width",h),b=s("box.visible",!!(f||n||v||m));b||(g.box={visible:!1});var E=a("meanline.color",y),p=a("meanline.width",h),S=s("meanline.visible",!!(E||p));S||(g.meanline={visible:!1}),s("quartilemethod")}}},63800:function(te,X,e){var A=e(3400),P={gaussian:function(o){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*o*o)}};X.makeKDE=function(o,L,M){var d=M.length,g=P.gaussian,r=o.bandwidth,t=1/(d*r);return function(s){for(var a=0,c=0;c<d;c++)a+=g((s-M[c])/r);return t*a}},X.getPositionOnKdePath=function(o,L,M){var d,g;L.orientation==="h"?(d="y",g="x"):(d="x",g="y");var r=A.findPointOnPath(o.path,M,g,{pathLength:o.pathLength}),t=o.posCenterPx,s=r[d],a=L.side==="both"?2*t-s:t;return[s,a]},X.getKdeValue=function(o,L,M){var d=o.pts.map(X.extractVal),g=X.makeKDE(o,L,d);return g(M)/o.posDensityScale},X.extractVal=function(o){return o.v}},78e3:function(te,X,e){var A=e(76308),P=e(3400),o=e(54460),L=e(27576),M=e(63800);te.exports=function(g,r,t,s,a){a||(a={});var c=a.hoverLayer,u=g.cd,l=u[0].trace,y=l.hoveron,h=y.indexOf("violins")!==-1,T=y.indexOf("kde")!==-1,f=[],n,v;if(h||T){var m=L.hoverOnBoxes(g,r,t,s);if(T&&m.length>0){var b=g.xa,E=g.ya,p,S,w,i,C;l.orientation==="h"?(C=r,p="y",w=E,S="x",i=b):(C=t,p="x",w=b,S="y",i=E);var x=u[g.index];if(C>=x.span[0]&&C<=x.span[1]){var k=P.extendFlat({},g),I=i.c2p(C,!0),B=M.getKdeValue(x,l,C),_=M.getPositionOnKdePath(x,l,I),z=w._offset,O=w._length;k[p+"0"]=_[0],k[p+"1"]=_[1],k[S+"0"]=k[S+"1"]=I,k[S+"Label"]=S+": "+o.hoverLabelText(i,C,l[S+"hoverformat"])+", "+u[0].t.labels.kde+" "+B.toFixed(3);for(var F=0,N=0;N<m.length;N++)if(m[N].attr==="med"){F=N;break}k.spikeDistance=m[F].spikeDistance;var V=p+"Spike";k[V]=m[F][V],m[F].spikeDistance=void 0,m[F][V]=void 0,k.hovertemplate=!1,f.push(k),v={},v[p+"1"]=P.constrain(z+_[0],z,z+O),v[p+"2"]=P.constrain(z+_[1],z,z+O),v[S+"1"]=v[S+"2"]=i._offset+I}}h&&(f=f.concat(m))}y.indexOf("points")!==-1&&(n=L.hoverOnPoints(g,r,t));var j=c.selectAll(".violinline-"+l.uid).data(v?[0]:[]);return j.enter().append("line").classed("violinline-"+l.uid,!0).attr("stroke-width",1.5),j.exit().remove(),j.attr(v).call(A.stroke,g.color),s==="closest"?n?[n]:f:(n&&f.push(n),f)}},22869:function(te,X,e){te.exports={attributes:e(13988),layoutAttributes:e(98228),supplyDefaults:e(36240),crossTraceDefaults:e(90624).crossTraceDefaults,supplyLayoutDefaults:e(8939),calc:e(67064),crossTraceCalc:e(14348),plot:e(5140),style:e(95908),styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(78e3),selectPoints:e(8264),moduleType:"trace",name:"violin",basePlotModule:e(57952),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},98228:function(te,X,e){var A=e(16560),P=e(3400).extendFlat;te.exports={violinmode:P({},A.boxmode,{}),violingap:P({},A.boxgap,{}),violingroupgap:P({},A.boxgroupgap,{})}},8939:function(te,X,e){var A=e(3400),P=e(98228),o=e(68832);te.exports=function(M,d,g){function r(t,s){return A.coerce(M,d,P,t,s)}o._supply(M,d,g,r,"violin")}},5140:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(18728),M=e(52340),d=e(63800);te.exports=function(r,t,s,a){var c=r._context.staticPlot,u=r._fullLayout,l=t.xaxis,y=t.yaxis;function h(T,f){var n=M(T,{xaxis:l,yaxis:y,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return o.smoothopen(n[0],1)}P.makeTraceGroups(a,s,"trace violins").each(function(T){var f=A.select(this),n=T[0],v=n.t,m=n.trace;if(m.visible!==!0||v.empty){f.remove();return}var b=v.bPos,E=v.bdPos,p=t[v.valLetter+"axis"],S=t[v.posLetter+"axis"],w=m.side==="both",i=w||m.side==="positive",C=w||m.side==="negative",x=f.selectAll("path.violin").data(P.identity);x.enter().append("path").style("vector-effect",c?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(N){var V=A.select(this),j=N.density,$=j.length,q=S.c2l(N.pos+b,!0),oe=S.l2p(q),Z;if(m.width)Z=v.maxKDE/E;else{var G=u._violinScaleGroupStats[m.scalegroup];Z=m.scalemode==="count"?G.maxKDE/E*(G.maxCount/N.pts.length):G.maxKDE/E}var re,H,J,ae,K,Y,ie;if(i){for(Y=new Array($),ae=0;ae<$;ae++)ie=Y[ae]={},ie[v.posLetter]=q+j[ae].v/Z,ie[v.valLetter]=p.c2l(j[ae].t,!0);re=h(Y,m)}if(C){for(Y=new Array($),K=0,ae=$-1;K<$;K++,ae--)ie=Y[K]={},ie[v.posLetter]=q-j[ae].v/Z,ie[v.valLetter]=p.c2l(j[ae].t,!0);H=h(Y,m)}if(w)J=re+"L"+H.substr(1)+"Z";else{var ne=[oe,p.c2p(j[0].t)],le=[oe,p.c2p(j[$-1].t)];m.orientation==="h"&&(ne.reverse(),le.reverse()),i?J="M"+ne+"L"+re.substr(1)+"L"+le:J="M"+le+"L"+H.substr(1)+"L"+ne}V.attr("d",J),N.posCenterPx=oe,N.posDensityScale=Z*E,N.path=V.node(),N.pathLength=N.path.getTotalLength()/(w?2:1)});var k=m.box,I=k.width,B=(k.line||{}).width,_,z;w?(_=E*I,z=0):i?(_=[0,E*I/2],z=B*{x:1,y:-1}[v.posLetter]):(_=[E*I/2,0],z=B*{x:-1,y:1}[v.posLetter]),L.plotBoxAndWhiskers(f,{pos:S,val:p},m,{bPos:b,bdPos:_,bPosPxOffset:z}),L.plotBoxMean(f,{pos:S,val:p},m,{bPos:b,bdPos:_,bPosPxOffset:z});var O;!m.box.visible&&m.meanline.visible&&(O=P.identity);var F=f.selectAll("path.meanline").data(O||[]);F.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",c?"none":"non-scaling-stroke"),F.exit().remove(),F.each(function(N){var V=p.c2p(N.mean,!0),j=d.getPositionOnKdePath(N,m,V);A.select(this).attr("d",m.orientation==="h"?"M"+V+","+j[0]+"V"+j[1]:"M"+j[0]+","+V+"H"+j[1])}),L.plotPoints(f,{x:l,y},m,v)})}},95908:function(te,X,e){var A=e(33428),P=e(76308),o=e(49224).stylePoints;te.exports=function(M){var d=A.select(M).selectAll("g.trace.violins");d.style("opacity",function(g){return g[0].trace.opacity}),d.each(function(g){var r=g[0].trace,t=A.select(this),s=r.box||{},a=s.line||{},c=r.meanline||{},u=c.width;t.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(P.stroke,r.line.color).call(P.fill,r.fillcolor),t.selectAll("path.box").style("stroke-width",a.width+"px").call(P.stroke,a.color).call(P.fill,s.fillcolor);var l={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};t.selectAll("path.mean").style(l).call(P.stroke,c.color),t.selectAll("path.meanline").style(l).call(P.stroke,c.color),o(t,r,M)})}},58168:function(te,X,e){var A=e(49084),P=e(50048),o=e(16716),L=e(45464),M=e(92880).extendFlat,d=e(67824).overrideAll,g=te.exports=d(M({x:P.x,y:P.y,z:P.z,value:P.value,isomin:P.isomin,isomax:P.isomax,surface:P.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:P.slices,caps:P.caps,text:P.text,hovertext:P.hovertext,xhoverformat:P.xhoverformat,yhoverformat:P.yhoverformat,zhoverformat:P.zhoverformat,valuehoverformat:P.valuehoverformat,hovertemplate:P.hovertemplate},A("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:P.colorbar,opacity:P.opacity,opacityscale:o.opacityscale,lightposition:P.lightposition,lighting:P.lighting,flatshading:P.flatshading,contour:P.contour,hoverinfo:M({},L.hoverinfo),showlegend:M({},L.showlegend,{dflt:!1})}),"calc","nested");g.x.editType=g.y.editType=g.z.editType=g.value.editType="calc+clearAxisTypes",g.transforms=void 0},91976:function(te,X,e){var A=e(67792).gl_mesh3d,P=e(33040).parseColorScale,o=e(3400).isArrayOrTypedArray,L=e(43080),M=e(8932).extractOpts,d=e(52094),g=e(31460).findNearestOnAxis,r=e(31460).generateIsoMeshes;function t(c,u,l){this.scene=c,this.uid=l,this.mesh=u,this.name="",this.data=null,this.showContour=!1}var s=t.prototype;s.handlePick=function(c){if(c.object===this.mesh){var u=c.data.index,l=this.data._meshX[u],y=this.data._meshY[u],h=this.data._meshZ[u],T=this.data._Ys.length,f=this.data._Zs.length,n=g(l,this.data._Xs).id,v=g(y,this.data._Ys).id,m=g(h,this.data._Zs).id,b=c.index=m+f*v+f*T*n;c.traceCoordinate=[this.data._meshX[b],this.data._meshY[b],this.data._meshZ[b],this.data._value[b]];var E=this.data.hovertext||this.data.text;return o(E)&&E[b]!==void 0?c.textLabel=E[b]:E&&(c.textLabel=E),!0}},s.update=function(c){var u=this.scene,l=u.fullSceneLayout;this.data=r(c);function y(v,m,b,E){return m.map(function(p){return v.d2l(p,0,E)*b})}var h=d(y(l.xaxis,c._meshX,u.dataScale[0],c.xcalendar),y(l.yaxis,c._meshY,u.dataScale[1],c.ycalendar),y(l.zaxis,c._meshZ,u.dataScale[2],c.zcalendar)),T=d(c._meshI,c._meshJ,c._meshK),f={positions:h,cells:T,lightPosition:[c.lightposition.x,c.lightposition.y,c.lightposition.z],ambient:c.lighting.ambient,diffuse:c.lighting.diffuse,specular:c.lighting.specular,roughness:c.lighting.roughness,fresnel:c.lighting.fresnel,vertexNormalsEpsilon:c.lighting.vertexnormalsepsilon,faceNormalsEpsilon:c.lighting.facenormalsepsilon,opacity:c.opacity,opacityscale:c.opacityscale,contourEnable:c.contour.show,contourColor:L(c.contour.color).slice(0,3),contourWidth:c.contour.width,useFacetNormals:c.flatshading},n=M(c);f.vertexIntensity=c._meshIntensity,f.vertexIntensityBounds=[n.min,n.max],f.colormap=P(c),this.mesh.update(f)},s.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function a(c,u){var l=c.glplot.gl,y=A({gl:l}),h=new t(c,y,u.uid);return y._trace=h,h.update(u),c.glplot.add(y),h}te.exports=a},12448:function(te,X,e){var A=e(3400),P=e(58168),o=e(70548).supplyIsoDefaults,L=e(60192).opacityscaleDefaults;te.exports=function(d,g,r,t){function s(a,c){return A.coerce(d,g,P,a,c)}o(d,g,r,t,s),L(d,g,t,s)}},67776:function(te,X,e){te.exports={attributes:e(58168),supplyDefaults:e(12448),calc:e(62624),colorbar:{min:"cmin",max:"cmax"},plot:e(91976),moduleType:"trace",name:"volume",basePlotModule:e(12536),categories:["gl3d","showLegend"],meta:{}}},65776:function(te,X,e){var A=e(20832),P=e(52904).line,o=e(45464),L=e(29736).axisHoverFormat,M=e(21776).Ks,d=e(21776).Gw,g=e(10213),r=e(92880).extendFlat,t=e(76308);function s(a){return{marker:{color:r({},A.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},A.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},A.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}te.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:A.x,x0:A.x0,dx:A.dx,y:A.y,y0:A.y0,dy:A.dy,xperiod:A.xperiod,yperiod:A.yperiod,xperiod0:A.xperiod0,yperiod0:A.yperiod0,xperiodalignment:A.xperiodalignment,yperiodalignment:A.yperiodalignment,xhoverformat:L("x"),yhoverformat:L("y"),hovertext:A.hovertext,hovertemplate:M({},{keys:g.eventDataKeys}),hoverinfo:r({},o.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:d({editType:"plot"},{keys:g.eventDataKeys.concat(["label"])}),text:A.text,textposition:A.textposition,insidetextanchor:A.insidetextanchor,textangle:A.textangle,textfont:A.textfont,insidetextfont:A.insidetextfont,outsidetextfont:A.outsidetextfont,constraintext:A.constraintext,cliponaxis:A.cliponaxis,orientation:A.orientation,offset:A.offset,width:A.width,increasing:s(),decreasing:s(),totals:s(),connector:{line:{color:r({},P.color,{dflt:t.defaultLine}),width:r({},P.width,{editType:"plot"}),dash:P.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:A.offsetgroup,alignmentgroup:A.alignmentgroup}},73540:function(te,X,e){var A=e(54460),P=e(1220),o=e(3400).mergeArray,L=e(4500),M=e(39032).BADNUM;function d(r){return r==="a"||r==="absolute"}function g(r){return r==="t"||r==="total"}te.exports=function(t,s){var a=A.getFromId(t,s.xaxis||"x"),c=A.getFromId(t,s.yaxis||"y"),u,l,y,h,T,f;s.orientation==="h"?(u=a.makeCalcdata(s,"x"),y=c.makeCalcdata(s,"y"),h=P(s,c,"y",y),T=!!s.yperiodalignment,f="y"):(u=c.makeCalcdata(s,"y"),y=a.makeCalcdata(s,"x"),h=P(s,a,"x",y),T=!!s.xperiodalignment,f="x"),l=h.vals;for(var n=Math.min(l.length,u.length),v=new Array(n),m=0,b,E=!1,p=0;p<n;p++){var S=u[p]||0,w=!1;(u[p]!==M||g(s.measure[p])||d(s.measure[p]))&&p+1<n&&(u[p+1]!==M||g(s.measure[p+1])||d(s.measure[p+1]))&&(w=!0);var i=v[p]={i:p,p:l[p],s:S,rawS:S,cNext:w};d(s.measure[p])?(m=i.s,i.isSum=!0,i.dir="totals",i.s=m):g(s.measure[p])?(i.isSum=!0,i.dir="totals",i.s=m):(i.isSum=!1,i.dir=i.rawS<0?"decreasing":"increasing",b=i.s,i.s=m+b,m+=b),i.dir==="totals"&&(E=!0),T&&(v[p].orig_p=y[p],v[p][f+"End"]=h.ends[p],v[p][f+"Start"]=h.starts[p]),s.ids&&(i.id=String(s.ids[p])),i.v=(s.base||0)+m}return v.length&&(v[0].hasTotals=E),o(s.text,v,"tx"),o(s.hovertext,v,"htx"),L(v,s),v}},10213:function(te){te.exports={eventDataKeys:["initial","delta","final"]}},50152:function(te,X,e){var A=e(96376).setGroupPositions;te.exports=function(o,L){var M=o._fullLayout,d=o._fullData,g=o.calcdata,r=L.xaxis,t=L.yaxis,s=[],a=[],c=[],u,l;for(l=0;l<d.length;l++){var y=d[l];y.visible===!0&&y.xaxis===r._id&&y.yaxis===t._id&&y.type==="waterfall"&&(u=g[l],y.orientation==="h"?c.push(u):a.push(u),s.push(u))}var h={mode:M.waterfallmode,norm:M.waterfallnorm,gap:M.waterfallgap,groupgap:M.waterfallgroupgap};for(A(o,r,t,a,h),A(o,t,r,c,h),l=0;l<s.length;l++){u=s[l];for(var T=0;T<u.length;T++){var f=u[T];f.isSum===!1&&(f.s0+=T===0?0:u[T-1].s),T+1<u.length&&(u[T].nextP0=u[T+1].p0,u[T].nextS0=u[T+1].s0)}}}},24224:function(te,X,e){var A=e(3400),P=e(20011),o=e(31508).handleText,L=e(43980),M=e(31147),d=e(65776),g=e(76308),r=e(48164),t=r.INCREASING.COLOR,s=r.DECREASING.COLOR,a="#4499FF";function c(y,h,T){y(h+".marker.color",T),y(h+".marker.line.color",g.defaultLine),y(h+".marker.line.width")}function u(y,h,T,f){function n(p,S){return A.coerce(y,h,d,p,S)}var v=L(y,h,f,n);if(!v){h.visible=!1;return}M(y,h,f,n),n("xhoverformat"),n("yhoverformat"),n("measure"),n("orientation",h.x&&!h.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var m=n("textposition");o(y,h,f,n,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),h.textposition!=="none"&&(n("texttemplate"),h.texttemplate||n("textinfo")),c(n,"increasing",t),c(n,"decreasing",s),c(n,"totals",a);var b=n("connector.visible");if(b){n("connector.mode");var E=n("connector.line.width");E&&(n("connector.line.color"),n("connector.line.dash"))}}function l(y,h){var T,f;function n(m){return A.coerce(f._input,f,d,m)}if(h.waterfallmode==="group")for(var v=0;v<y.length;v++)f=y[v],T=f._input,P(T,f,h,n)}te.exports={supplyDefaults:u,crossTraceDefaults:l}},53256:function(te){te.exports=function(e,A){return e.x="xVal"in A?A.xVal:A.x,e.y="yVal"in A?A.yVal:A.y,"initial"in A&&(e.initial=A.initial),"delta"in A&&(e.delta=A.delta),"final"in A&&(e.final=A.final),A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),e}},94196:function(te,X,e){var A=e(54460).hoverLabelText,P=e(76308).opacity,o=e(63400).hoverOnBars,L=e(48164),M={increasing:L.INCREASING.SYMBOL,decreasing:L.DECREASING.SYMBOL};te.exports=function(r,t,s,a,c){var u=o(r,t,s,a,c);if(!u)return;var l=u.cd,y=l[0].trace,h=y.orientation==="h",T=h?"x":"y",f=h?r.xa:r.ya;function n(x){return A(f,x,y[T+"hoverformat"])}var v=u.index,m=l[v],b=m.isSum?m.b+m.s:m.rawS;u.initial=m.b+m.s-b,u.delta=b,u.final=u.initial+u.delta;var E=n(Math.abs(u.delta));u.deltaLabel=b<0?"("+E+")":E,u.finalLabel=n(u.final),u.initialLabel=n(u.initial);var p=m.hi||y.hoverinfo,S=[];if(p&&p!=="none"&&p!=="skip"){var w=p==="all",i=p.split("+"),C=function(x){return w||i.indexOf(x)!==-1};m.isSum||(C("final")&&(h?!C("x"):!C("y"))&&S.push(u.finalLabel),C("delta")&&(b<0?S.push(u.deltaLabel+" "+M.decreasing):S.push(u.deltaLabel+" "+M.increasing)),C("initial")&&S.push("Initial: "+u.initialLabel))}return S.length&&(u.extraText=S.join("<br>")),u.color=d(y,m),[u]};function d(g,r){var t=g[r.dir].marker,s=t.color,a=t.line.color,c=t.line.width;if(P(s))return s;if(P(a)&&c)return a}},95952:function(te,X,e){te.exports={attributes:e(65776),layoutAttributes:e(91352),supplyDefaults:e(24224).supplyDefaults,crossTraceDefaults:e(24224).crossTraceDefaults,supplyLayoutDefaults:e(59464),calc:e(73540),crossTraceCalc:e(50152),plot:e(64488),style:e(12252).style,hoverPoints:e(94196),eventData:e(53256),selectPoints:e(45784),moduleType:"trace",name:"waterfall",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(te){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"}}},59464:function(te,X,e){var A=e(3400),P=e(91352);te.exports=function(o,L,M){var d=!1;function g(s,a){return A.coerce(o,L,P,s,a)}for(var r=0;r<M.length;r++){var t=M[r];if(t.visible&&t.type==="waterfall"){d=!0;break}}d&&(g("waterfallmode"),g("waterfallgap",.2),g("waterfallgroupgap"))}},64488:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(39032).BADNUM,M=e(98184),d=e(82744).clearMinTextSize;te.exports=function(s,a,c,u){var l=s._fullLayout;d("waterfall",l),M.plot(s,a,c,u,{mode:l.waterfallmode,norm:l.waterfallmode,gap:l.waterfallgap,groupgap:l.waterfallgroupgap}),g(s,a,c,u)};function g(t,s,a,c){var u=s.xaxis,l=s.yaxis;P.makeTraceGroups(c,a,"trace bars").each(function(y){var h=A.select(this),T=y[0].trace,f=P.ensureSingle(h,"g","lines");if(!T.connector||!T.connector.visible){f.remove();return}var n=T.orientation==="h",v=T.connector.mode,m=f.selectAll("g.line").data(P.identity);m.enter().append("g").classed("line",!0),m.exit().remove();var b=m.size();m.each(function(E,p){if(!(p!==b-1&&!E.cNext)){var S=r(E,u,l,n),w=S[0],i=S[1],C="";w[0]!==L&&i[0]!==L&&w[1]!==L&&i[1]!==L&&(v==="spanning"&&!E.isSum&&p>0&&(n?C+="M"+w[0]+","+i[1]+"V"+i[0]:C+="M"+w[1]+","+i[0]+"H"+w[0]),v!=="between"&&(E.isSum||p<b-1)&&(n?C+="M"+w[1]+","+i[0]+"V"+i[1]:C+="M"+w[0]+","+i[1]+"H"+w[1]),w[2]!==L&&i[2]!==L&&(n?C+="M"+w[1]+","+i[1]+"V"+i[2]:C+="M"+w[1]+","+i[1]+"H"+w[2])),C===""&&(C="M0,0Z"),P.ensureSingle(A.select(this),"path").attr("d",C).call(o.setClipUrl,s.layerClipId,t)}})})}function r(t,s,a,c){var u=[],l=[],y=c?s:a,h=c?a:s;return u[0]=y.c2p(t.s0,!0),l[0]=h.c2p(t.p0,!0),u[1]=y.c2p(t.s1,!0),l[1]=h.c2p(t.p1,!0),u[2]=y.c2p(t.nextS0,!0),l[2]=h.c2p(t.nextP0,!0),c?[u,l]:[l,u]}},12252:function(te,X,e){var A=e(33428),P=e(43616),o=e(76308),L=e(13448).DESELECTDIM,M=e(60100),d=e(82744).resizeText,g=M.styleTextPoints;function r(t,s,a){var c=a||A.select(t).selectAll("g.waterfalllayer").selectAll("g.trace");d(t,c,"waterfall"),c.style("opacity",function(u){return u[0].trace.opacity}),c.each(function(u){var l=A.select(this),y=u[0].trace;l.selectAll(".point > path").each(function(h){if(!h.isBlank){var T=y[h.dir].marker;A.select(this).call(o.fill,T.color).call(o.stroke,T.line.color).call(P.dashLine,T.line.dash,T.line.width).style("opacity",y.selectedpoints&&!h.selected?L:1)}}),g(l,y,t),l.selectAll(".lines").each(function(){var h=y.connector.line;P.lineGroupStyle(A.select(this).selectAll("path"),h.width,h.color,h.dash)})})}te.exports={style:r}},84224:function(te,X,e){var A=e(54460),P=e(3400),o=e(73060),L=e(60468).W,M=e(39032).BADNUM;X.moduleType="transform",X.name="aggregate";var d=X.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"},g=d.aggregations;X.supplyDefaults=function(u,l){var y={},h;function T(x,k){return P.coerce(u,y,d,x,k)}var f=T("enabled");if(!f)return y;var n=o.findArrayAttributes(l),v={};for(h=0;h<n.length;h++)v[n[h]]=1;var m=T("groups");if(!Array.isArray(m)){if(!v[m])return y.enabled=!1,y;v[m]=0}var b=u.aggregations||[],E=y.aggregations=new Array(b.length),p;function S(x,k){return P.coerce(b[h],p,g,x,k)}for(h=0;h<b.length;h++){p={_index:h};var w=S("target"),i=S("func"),C=S("enabled");C&&w&&(v[w]||i==="count"&&v[w]===void 0)?(i==="stddev"&&S("funcmode"),v[w]=0,E[h]=p):E[h]={enabled:!1,_index:h}}for(h=0;h<n.length;h++)v[n[h]]&&E.push({target:n[h],func:g.func.dflt,enabled:!0,_index:-1});return y},X.calcTransform=function(u,l,y){if(y.enabled){var h=y.groups,T=P.getTargetArray(l,{target:h});if(T){var f,n,v,m,b={},E={},p=[],S=L(l.transforms,y),w=T.length;for(l._length&&(w=Math.min(w,l._length)),f=0;f<w;f++)n=T[f],v=b[n],v===void 0?(b[n]=p.length,m=[f],p.push(m),E[b[n]]=S(f)):(p[v].push(f),E[b[n]]=(E[b[n]]||[]).concat(S(f)));y._indexToPoints=E;var i=y.aggregations;for(f=0;f<i.length;f++)r(u,l,p,i[f]);typeof h=="string"&&r(u,l,p,{target:h,func:"first",enabled:!0}),l._length=p.length}}};function r(u,l,y,h){if(h.enabled){for(var T=h.target,f=P.nestedProperty(l,T),n=f.get(),v=A.getDataConversions(u,l,T,n),m=t(h,v),b=new Array(y.length),E=0;E<y.length;E++)b[E]=m(n,y[E]);f.set(b),h.func==="count"&&P.pushUnique(l._arrayAttrs,T)}}function t(u,l){var y=u.func,h=l.d2c,T=l.c2d;switch(y){case"count":return s;case"first":return a;case"last":return c;case"sum":return function(f,n){for(var v=0,m=0;m<n.length;m++){var b=h(f[n[m]]);b!==M&&(v+=b)}return T(v)};case"avg":return function(f,n){for(var v=0,m=0,b=0;b<n.length;b++){var E=h(f[n[b]]);E!==M&&(v+=E,m++)}return m?T(v/m):M};case"min":return function(f,n){for(var v=1/0,m=0;m<n.length;m++){var b=h(f[n[m]]);b!==M&&(v=Math.min(v,b))}return v===1/0?M:T(v)};case"max":return function(f,n){for(var v=-1/0,m=0;m<n.length;m++){var b=h(f[n[m]]);b!==M&&(v=Math.max(v,b))}return v===-1/0?M:T(v)};case"range":return function(f,n){for(var v=1/0,m=-1/0,b=0;b<n.length;b++){var E=h(f[n[b]]);E!==M&&(v=Math.min(v,E),m=Math.max(m,E))}return m===-1/0||v===1/0?M:T(m-v)};case"change":return function(f,n){var v=h(f[n[0]]),m=h(f[n[n.length-1]]);return v===M||m===M?M:T(m-v)};case"median":return function(f,n){for(var v=[],m=0;m<n.length;m++){var b=h(f[n[m]]);b!==M&&v.push(b)}if(!v.length)return M;v.sort(P.sorterAsc);var E=(v.length-1)/2;return T((v[Math.floor(E)]+v[Math.ceil(E)])/2)};case"mode":return function(f,n){for(var v={},m=0,b=M,E=0;E<n.length;E++){var p=h(f[n[E]]);if(p!==M){var S=v[p]=(v[p]||0)+1;S>m&&(m=S,b=p)}}return m?T(b):M};case"rms":return function(f,n){for(var v=0,m=0,b=0;b<n.length;b++){var E=h(f[n[b]]);E!==M&&(v+=E*E,m++)}return m?T(Math.sqrt(v/m)):M};case"stddev":return function(f,n){var v=0,m=0,b=1,E=M,p;for(p=0;p<n.length&&E===M;p++)E=h(f[n[p]]);if(E===M)return M;for(;p<n.length;p++){var S=h(f[n[p]]);if(S!==M){var w=S-E;v+=w,m+=w*w,b++}}var i=u.funcmode==="sample"?b-1:b;return i?Math.sqrt((m-v*v/b)/i):0}}}function s(u,l){return l.length}function a(u,l){return u[l[0]]}function c(u,l){return u[l[l.length-1]]}},76744:function(te,X,e){var A=e(3400),P=e(24040),o=e(54460),L=e(60468).W,M=e(69104),d=M.COMPARISON_OPS,g=M.INTERVAL_OPS,r=M.SET_OPS;X.moduleType="transform",X.name="filter",X.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(d).concat(g).concat(r),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},X.supplyDefaults=function(s){var a={};function c(h,T){return A.coerce(s,a,X.attributes,h,T)}var u=c("enabled");if(u){var l=c("target");if(A.isArrayOrTypedArray(l)&&l.length===0)return a.enabled=!1,a;c("preservegaps"),c("operation"),c("value");var y=P.getComponentMethod("calendars","handleDefaults");y(s,a,"valuecalendar",null),y(s,a,"targetcalendar",null)}return a},X.calcTransform=function(s,a,c){if(!c.enabled)return;var u=A.getTargetArray(a,c);if(!u)return;var l=c.target,y=u.length;a._length&&(y=Math.min(y,a._length));var h=c.targetcalendar,T=a._arrayAttrs,f=c.preservegaps;if(typeof l=="string"){var n=A.nestedProperty(a,l+"calendar").get();n&&(h=n)}var v=o.getDataToCoordFunc(s,a,l,u),m=t(c,v,h),b={},E={},p=0;function S(I,B){for(var _=0;_<T.length;_++){var z=A.nestedProperty(a,T[_]);I(z,B)}}var w,i;f?(w=function(I){b[I.astr]=A.extendDeep([],I.get()),I.set(new Array(y))},i=function(I,B){var _=b[I.astr][B];I.get()[B]=_}):(w=function(I){b[I.astr]=A.extendDeep([],I.get()),I.set([])},i=function(I,B){var _=b[I.astr][B];I.get().push(_)}),S(w);for(var C=L(a.transforms,c),x=0;x<y;x++){var k=m(u[x]);k?(S(i,x),E[p++]=C(x)):f&&p++}c._indexToPoints=E,a._length=p};function t(s,a,c){var u=s.operation,l=s.value,y=A.isArrayOrTypedArray(l);function h(v){return v.indexOf(u)!==-1}var T=function(v){return a(v,0,s.valuecalendar)},f=function(v){return a(v,0,c)},n;switch(h(d)?n=T(y?l[0]:l):h(g)?n=y?[T(l[0]),T(l[1])]:[T(l),T(l)]:h(r)&&(n=y?l.map(T):[T(l)]),u){case"=":return function(v){return f(v)===n};case"!=":return function(v){return f(v)!==n};case"<":return function(v){return f(v)<n};case"<=":return function(v){return f(v)<=n};case">":return function(v){return f(v)>n};case">=":return function(v){return f(v)>=n};case"[]":return function(v){var m=f(v);return m>=n[0]&&m<=n[1]};case"()":return function(v){var m=f(v);return m>n[0]&&m<n[1]};case"[)":return function(v){var m=f(v);return m>=n[0]&&m<n[1]};case"(]":return function(v){var m=f(v);return m>n[0]&&m<=n[1]};case"][":return function(v){var m=f(v);return m<=n[0]||m>=n[1]};case")(":return function(v){var m=f(v);return m<n[0]||m>n[1]};case"](":return function(v){var m=f(v);return m<=n[0]||m>n[1]};case")[":return function(v){var m=f(v);return m<n[0]||m>=n[1]};case"{}":return function(v){return n.indexOf(f(v))!==-1};case"}{":return function(v){return n.indexOf(f(v))===-1}}}},32028:function(te,X,e){var A=e(3400),P=e(73060),o=e(7316),L=e(60468).W;X.moduleType="transform",X.name="groupby",X.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"},X.supplyDefaults=function(d,g,r){var t,s={};function a(T,f){return A.coerce(d,s,X.attributes,T,f)}var c=a("enabled");if(!c)return s;a("groups"),a("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var u=d.styles,l=s.styles=[];if(u)for(t=0;t<u.length;t++){var y=l[t]={};A.coerce(u[t],l[t],X.attributes.styles,"target");var h=A.coerce(u[t],l[t],X.attributes.styles,"value");A.isPlainObject(h)?y.value=A.extendDeep({},h):h&&delete y.value}return s},X.transform=function(d,g){var r,t,s,a=[];for(t=0;t<d.length;t++)for(r=M(d[t],g),s=0;s<r.length;s++)a.push(r[s]);return a};function M(d,g){var r,t,s,a,c,u,l,y,h,T,f=g.transform,n=g.transformIndex,v=d.transforms[n].groups,m=L(d.transforms,f);if(!A.isArrayOrTypedArray(v)||v.length===0)return[d];var b=A.filterUnique(v),E=new Array(b.length),p=v.length,S=P.findArrayAttributes(d),w=f.styles||[],i={};for(r=0;r<w.length;r++)i[w[r].target]=w[r].value;f.styles&&(T=A.keyedContainer(f,"styles","target","value.name"));var C={},x={};for(r=0;r<b.length;r++){u=b[r],C[u]=r,x[u]=0,l=E[r]=A.extendDeepNoArrays({},d),l._group=u,l.transforms[n]._indexToPoints={};var k=null;for(T&&(k=T.get(u)),k||k===""?l.name=k:l.name=A.templateString(f.nameformat,{trace:d.name,group:u}),y=l.transforms,l.transforms=[],t=0;t<y.length;t++)l.transforms[t]=A.extendDeepNoArrays({},y[t]);for(t=0;t<S.length;t++)A.nestedProperty(l,S[t]).set([])}for(s=0;s<S.length;s++){for(a=S[s],t=0,h=[];t<b.length;t++)h[t]=A.nestedProperty(E[t],a).get();for(c=A.nestedProperty(d,a).get(),t=0;t<p;t++)h[C[v[t]]].push(c[t])}for(t=0;t<p;t++){l=E[C[v[t]]];var I=l.transforms[n]._indexToPoints;I[x[v[t]]]=m(t),x[v[t]]++}for(r=0;r<b.length;r++)u=b[r],l=E[r],o.clearExpandedTraceDefaultColors(l),l=A.extendDeepNoArrays(l,i[u]||{});return E}},60468:function(te,X){X.W=function(e,A){for(var P,o,L=0;L<e.length&&(P=e[L],P!==A);L++)!P._indexToPoints||P.enabled===!1||(o=P._indexToPoints);var M=o?function(d){return o[d]}:function(d){return[d]};return M}},76272:function(te,X,e){var A=e(3400),P=e(54460),o=e(60468).W,L=e(39032).BADNUM;X.moduleType="transform",X.name="sort",X.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"},X.supplyDefaults=function(g){var r={};function t(a,c){return A.coerce(g,r,X.attributes,a,c)}var s=t("enabled");return s&&(t("target"),t("order")),r},X.calcTransform=function(g,r,t){if(t.enabled){var s=A.getTargetArray(r,t);if(s){var a=t.target,c=s.length;r._length&&(c=Math.min(c,r._length));var u=r._arrayAttrs,l=P.getDataToCoordFunc(g,r,a,s),y=M(t,s,l,c),h=o(r.transforms,t),T={},f,n;for(f=0;f<u.length;f++){var v=A.nestedProperty(r,u[f]),m=v.get(),b=new Array(c);for(n=0;n<c;n++)b[n]=m[y[n]];v.set(b)}for(n=0;n<c;n++)T[n]=h(y[n]);t._indexToPoints=T,r._length=c}}};function M(g,r,t,s){var a=new Array(s),c=new Array(s),u;for(u=0;u<s;u++)a[u]={v:r[u],i:u};for(a.sort(d(g,t)),u=0;u<s;u++)c[u]=a[u].i;return c}function d(g,r){switch(g.order){case"ascending":return function(t,s){var a=r(t.v),c=r(s.v);return a===L?1:c===L?-1:a-c};case"descending":return function(t,s){var a=r(t.v),c=r(s.v);return a===L?1:c===L?-1:c-a}}}},25788:function(te,X){X.version="2.30.1"},67792:function(te,X,e){var A=e(4168);(function(o,L){te.exports=L()})(self,function(){return function(){var P={7386:function(d,g,r){d.exports={alpha_shape:r(2350),convex_hull:r(5537),delaunay_triangulate:r(4419),gl_cone3d:r(1140),gl_error3d:r(3110),gl_heatmap2d:r(6386),gl_line3d:r(6086),gl_mesh3d:r(8116),gl_plot2d:r(2117),gl_plot3d:r(1059),gl_pointcloud2d:r(8271),gl_scatter3d:r(2182),gl_select_box:r(6623),gl_spikes2d:r(3050),gl_streamtube3d:r(7307),gl_surface3d:r(3754),ndarray:r(5050),ndarray_linear_interpolate:r(3581)}},2146:function(d,g,r){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/function t(ge,pe){if(!(ge instanceof pe))throw new TypeError("Cannot call a class as a function")}function s(ge,pe){for(var Te=0;Te<pe.length;Te++){var be=pe[Te];be.enumerable=be.enumerable||!1,be.configurable=!0,"value"in be&&(be.writable=!0),Object.defineProperty(ge,be.key,be)}}function a(ge,pe,Te){return s(ge.prototype,pe),Object.defineProperty(ge,"prototype",{writable:!1}),ge}function c(ge,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Super expression must either be null or a function");ge.prototype=Object.create(pe&&pe.prototype,{constructor:{value:ge,writable:!0,configurable:!0}}),Object.defineProperty(ge,"prototype",{writable:!1}),pe&&u(ge,pe)}function u(ge,pe){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(be,ke){return be.__proto__=ke,be},u(ge,pe)}function l(ge){var pe=T();return function(){var be=f(ge),ke;if(pe){var Ve=f(this).constructor;ke=Reflect.construct(be,arguments,Ve)}else ke=be.apply(this,arguments);return y(this,ke)}}function y(ge,pe){if(pe&&(n(pe)==="object"||typeof pe=="function"))return pe;if(pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(ge)}function h(ge){if(ge===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge}function T(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function f(ge){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Te){return Te.__proto__||Object.getPrototypeOf(Te)},f(ge)}function n(ge){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pe){return typeof pe}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe},n(ge)}var v=r(3910),m=r(3187),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;g.lW=w,g.h2=50;var E=2147483647;w.TYPED_ARRAY_SUPPORT=p(),!w.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.");function p(){try{var ge=new Uint8Array(1),pe={foo:function(){return 42}};return Object.setPrototypeOf(pe,Uint8Array.prototype),Object.setPrototypeOf(ge,pe),ge.foo()===42}catch{return!1}}Object.defineProperty(w.prototype,"parent",{enumerable:!0,get:function(){if(w.isBuffer(this))return this.buffer}}),Object.defineProperty(w.prototype,"offset",{enumerable:!0,get:function(){if(w.isBuffer(this))return this.byteOffset}});function S(ge){if(ge>E)throw new RangeError('The value "'+ge+'" is invalid for option "size"');var pe=new Uint8Array(ge);return Object.setPrototypeOf(pe,w.prototype),pe}function w(ge,pe,Te){if(typeof ge=="number"){if(typeof pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return k(ge)}return i(ge,pe,Te)}w.poolSize=8192;function i(ge,pe,Te){if(typeof ge=="string")return I(ge,pe);if(ArrayBuffer.isView(ge))return _(ge);if(ge==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(ge));if(Pe(ge,ArrayBuffer)||ge&&Pe(ge.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(ge,SharedArrayBuffer)||ge&&Pe(ge.buffer,SharedArrayBuffer)))return z(ge,pe,Te);if(typeof ge=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var be=ge.valueOf&&ge.valueOf();if(be!=null&&be!==ge)return w.from(be,pe,Te);var ke=O(ge);if(ke)return ke;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ge[Symbol.toPrimitive]=="function")return w.from(ge[Symbol.toPrimitive]("string"),pe,Te);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(ge))}w.from=function(ge,pe,Te){return i(ge,pe,Te)},Object.setPrototypeOf(w.prototype,Uint8Array.prototype),Object.setPrototypeOf(w,Uint8Array);function C(ge){if(typeof ge!="number")throw new TypeError('"size" argument must be of type number');if(ge<0)throw new RangeError('The value "'+ge+'" is invalid for option "size"')}function x(ge,pe,Te){return C(ge),ge<=0?S(ge):pe!==void 0?typeof Te=="string"?S(ge).fill(pe,Te):S(ge).fill(pe):S(ge)}w.alloc=function(ge,pe,Te){return x(ge,pe,Te)};function k(ge){return C(ge),S(ge<0?0:F(ge)|0)}w.allocUnsafe=function(ge){return k(ge)},w.allocUnsafeSlow=function(ge){return k(ge)};function I(ge,pe){if((typeof pe!="string"||pe==="")&&(pe="utf8"),!w.isEncoding(pe))throw new TypeError("Unknown encoding: "+pe);var Te=N(ge,pe)|0,be=S(Te),ke=be.write(ge,pe);return ke!==Te&&(be=be.slice(0,ke)),be}function B(ge){for(var pe=ge.length<0?0:F(ge.length)|0,Te=S(pe),be=0;be<pe;be+=1)Te[be]=ge[be]&255;return Te}function _(ge){if(Pe(ge,Uint8Array)){var pe=new Uint8Array(ge);return z(pe.buffer,pe.byteOffset,pe.byteLength)}return B(ge)}function z(ge,pe,Te){if(pe<0||ge.byteLength<pe)throw new RangeError('"offset" is outside of buffer bounds');if(ge.byteLength<pe+(Te||0))throw new RangeError('"length" is outside of buffer bounds');var be;return pe===void 0&&Te===void 0?be=new Uint8Array(ge):Te===void 0?be=new Uint8Array(ge,pe):be=new Uint8Array(ge,pe,Te),Object.setPrototypeOf(be,w.prototype),be}function O(ge){if(w.isBuffer(ge)){var pe=F(ge.length)|0,Te=S(pe);return Te.length===0||ge.copy(Te,0,0,pe),Te}if(ge.length!==void 0)return typeof ge.length!="number"||Ue(ge.length)?S(0):B(ge);if(ge.type==="Buffer"&&Array.isArray(ge.data))return B(ge.data)}function F(ge){if(ge>=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ge|0}w.isBuffer=function(pe){return pe!=null&&pe._isBuffer===!0&&pe!==w.prototype},w.compare=function(pe,Te){if(Pe(pe,Uint8Array)&&(pe=w.from(pe,pe.offset,pe.byteLength)),Pe(Te,Uint8Array)&&(Te=w.from(Te,Te.offset,Te.byteLength)),!w.isBuffer(pe)||!w.isBuffer(Te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(pe===Te)return 0;for(var be=pe.length,ke=Te.length,Ve=0,je=Math.min(be,ke);Ve<je;++Ve)if(pe[Ve]!==Te[Ve]){be=pe[Ve],ke=Te[Ve];break}return be<ke?-1:ke<be?1:0},w.isEncoding=function(pe){switch(String(pe).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}},w.concat=function(pe,Te){if(!Array.isArray(pe))throw new TypeError('"list" argument must be an Array of Buffers');if(pe.length===0)return w.alloc(0);var be;if(Te===void 0)for(Te=0,be=0;be<pe.length;++be)Te+=pe[be].length;var ke=w.allocUnsafe(Te),Ve=0;for(be=0;be<pe.length;++be){var je=pe[be];if(Pe(je,Uint8Array))Ve+je.length>ke.length?(w.isBuffer(je)||(je=w.from(je)),je.copy(ke,Ve)):Uint8Array.prototype.set.call(ke,je,Ve);else if(w.isBuffer(je))je.copy(ke,Ve);else throw new TypeError('"list" argument must be an Array of Buffers');Ve+=je.length}return ke};function N(ge,pe){if(w.isBuffer(ge))return ge.length;if(ArrayBuffer.isView(ge)||Pe(ge,ArrayBuffer))return ge.byteLength;if(typeof ge!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+n(ge));var Te=ge.length,be=arguments.length>2&&arguments[2]===!0;if(!be&&Te===0)return 0;for(var ke=!1;;)switch(pe){case"ascii":case"latin1":case"binary":return Te;case"utf8":case"utf-8":return it(ge).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te*2;case"hex":return Te>>>1;case"base64":return xt(ge).length;default:if(ke)return be?-1:it(ge).length;pe=(""+pe).toLowerCase(),ke=!0}}w.byteLength=N;function V(ge,pe,Te){var be=!1;if((pe===void 0||pe<0)&&(pe=0),pe>this.length||((Te===void 0||Te>this.length)&&(Te=this.length),Te<=0)||(Te>>>=0,pe>>>=0,Te<=pe))return"";for(ge||(ge="utf8");;)switch(ge){case"hex":return le(this,pe,Te);case"utf8":case"utf-8":return ae(this,pe,Te);case"ascii":return ie(this,pe,Te);case"latin1":case"binary":return ne(this,pe,Te);case"base64":return J(this,pe,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,pe,Te);default:if(be)throw new TypeError("Unknown encoding: "+ge);ge=(ge+"").toLowerCase(),be=!0}}w.prototype._isBuffer=!0;function j(ge,pe,Te){var be=ge[pe];ge[pe]=ge[Te],ge[Te]=be}w.prototype.swap16=function(){var pe=this.length;if(pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Te=0;Te<pe;Te+=2)j(this,Te,Te+1);return this},w.prototype.swap32=function(){var pe=this.length;if(pe%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Te=0;Te<pe;Te+=4)j(this,Te,Te+3),j(this,Te+1,Te+2);return this},w.prototype.swap64=function(){var pe=this.length;if(pe%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Te=0;Te<pe;Te+=8)j(this,Te,Te+7),j(this,Te+1,Te+6),j(this,Te+2,Te+5),j(this,Te+3,Te+4);return this},w.prototype.toString=function(){var pe=this.length;return pe===0?"":arguments.length===0?ae(this,0,pe):V.apply(this,arguments)},w.prototype.toLocaleString=w.prototype.toString,w.prototype.equals=function(pe){if(!w.isBuffer(pe))throw new TypeError("Argument must be a Buffer");return this===pe?!0:w.compare(this,pe)===0},w.prototype.inspect=function(){var pe="",Te=g.h2;return pe=this.toString("hex",0,Te).replace(/(.{2})/g,"$1 ").trim(),this.length>Te&&(pe+=" ... "),"<Buffer "+pe+">"},b&&(w.prototype[b]=w.prototype.inspect),w.prototype.compare=function(pe,Te,be,ke,Ve){if(Pe(pe,Uint8Array)&&(pe=w.from(pe,pe.offset,pe.byteLength)),!w.isBuffer(pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+n(pe));if(Te===void 0&&(Te=0),be===void 0&&(be=pe?pe.length:0),ke===void 0&&(ke=0),Ve===void 0&&(Ve=this.length),Te<0||be>pe.length||ke<0||Ve>this.length)throw new RangeError("out of range index");if(ke>=Ve&&Te>=be)return 0;if(ke>=Ve)return-1;if(Te>=be)return 1;if(Te>>>=0,be>>>=0,ke>>>=0,Ve>>>=0,this===pe)return 0;for(var je=Ve-ke,at=be-Te,ut=Math.min(je,at),Nt=this.slice(ke,Ve),Vt=pe.slice(Te,be),gt=0;gt<ut;++gt)if(Nt[gt]!==Vt[gt]){je=Nt[gt],at=Vt[gt];break}return je<at?-1:at<je?1:0};function $(ge,pe,Te,be,ke){if(ge.length===0)return-1;if(typeof Te=="string"?(be=Te,Te=0):Te>2147483647?Te=2147483647:Te<-2147483648&&(Te=-2147483648),Te=+Te,Ue(Te)&&(Te=ke?0:ge.length-1),Te<0&&(Te=ge.length+Te),Te>=ge.length){if(ke)return-1;Te=ge.length-1}else if(Te<0)if(ke)Te=0;else return-1;if(typeof pe=="string"&&(pe=w.from(pe,be)),w.isBuffer(pe))return pe.length===0?-1:q(ge,pe,Te,be,ke);if(typeof pe=="number")return pe=pe&255,typeof Uint8Array.prototype.indexOf=="function"?ke?Uint8Array.prototype.indexOf.call(ge,pe,Te):Uint8Array.prototype.lastIndexOf.call(ge,pe,Te):q(ge,[pe],Te,be,ke);throw new TypeError("val must be string, number or Buffer")}function q(ge,pe,Te,be,ke){var Ve=1,je=ge.length,at=pe.length;if(be!==void 0&&(be=String(be).toLowerCase(),be==="ucs2"||be==="ucs-2"||be==="utf16le"||be==="utf-16le")){if(ge.length<2||pe.length<2)return-1;Ve=2,je/=2,at/=2,Te/=2}function ut(Yt,gr){return Ve===1?Yt[gr]:Yt.readUInt16BE(gr*Ve)}var Nt;if(ke){var Vt=-1;for(Nt=Te;Nt<je;Nt++)if(ut(ge,Nt)===ut(pe,Vt===-1?0:Nt-Vt)){if(Vt===-1&&(Vt=Nt),Nt-Vt+1===at)return Vt*Ve}else Vt!==-1&&(Nt-=Nt-Vt),Vt=-1}else for(Te+at>je&&(Te=je-at),Nt=Te;Nt>=0;Nt--){for(var gt=!0,Ct=0;Ct<at;Ct++)if(ut(ge,Nt+Ct)!==ut(pe,Ct)){gt=!1;break}if(gt)return Nt}return-1}w.prototype.includes=function(pe,Te,be){return this.indexOf(pe,Te,be)!==-1},w.prototype.indexOf=function(pe,Te,be){return $(this,pe,Te,be,!0)},w.prototype.lastIndexOf=function(pe,Te,be){return $(this,pe,Te,be,!1)};function oe(ge,pe,Te,be){Te=Number(Te)||0;var ke=ge.length-Te;be?(be=Number(be),be>ke&&(be=ke)):be=ke;var Ve=pe.length;be>Ve/2&&(be=Ve/2);var je;for(je=0;je<be;++je){var at=parseInt(pe.substr(je*2,2),16);if(Ue(at))return je;ge[Te+je]=at}return je}function Z(ge,pe,Te,be){return Je(it(pe,ge.length-Te),ge,Te,be)}function G(ge,pe,Te,be){return Je(lt(pe),ge,Te,be)}function re(ge,pe,Te,be){return Je(xt(pe),ge,Te,be)}function H(ge,pe,Te,be){return Je(vt(pe,ge.length-Te),ge,Te,be)}w.prototype.write=function(pe,Te,be,ke){if(Te===void 0)ke="utf8",be=this.length,Te=0;else if(be===void 0&&typeof Te=="string")ke=Te,be=this.length,Te=0;else if(isFinite(Te))Te=Te>>>0,isFinite(be)?(be=be>>>0,ke===void 0&&(ke="utf8")):(ke=be,be=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ve=this.length-Te;if((be===void 0||be>Ve)&&(be=Ve),pe.length>0&&(be<0||Te<0)||Te>this.length)throw new RangeError("Attempt to write outside buffer bounds");ke||(ke="utf8");for(var je=!1;;)switch(ke){case"hex":return oe(this,pe,Te,be);case"utf8":case"utf-8":return Z(this,pe,Te,be);case"ascii":case"latin1":case"binary":return G(this,pe,Te,be);case"base64":return re(this,pe,Te,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,pe,Te,be);default:if(je)throw new TypeError("Unknown encoding: "+ke);ke=(""+ke).toLowerCase(),je=!0}},w.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(ge,pe,Te){return pe===0&&Te===ge.length?v.fromByteArray(ge):v.fromByteArray(ge.slice(pe,Te))}function ae(ge,pe,Te){Te=Math.min(ge.length,Te);for(var be=[],ke=pe;ke<Te;){var Ve=ge[ke],je=null,at=Ve>239?4:Ve>223?3:Ve>191?2:1;if(ke+at<=Te){var ut=void 0,Nt=void 0,Vt=void 0,gt=void 0;switch(at){case 1:Ve<128&&(je=Ve);break;case 2:ut=ge[ke+1],(ut&192)===128&&(gt=(Ve&31)<<6|ut&63,gt>127&&(je=gt));break;case 3:ut=ge[ke+1],Nt=ge[ke+2],(ut&192)===128&&(Nt&192)===128&&(gt=(Ve&15)<<12|(ut&63)<<6|Nt&63,gt>2047&&(gt<55296||gt>57343)&&(je=gt));break;case 4:ut=ge[ke+1],Nt=ge[ke+2],Vt=ge[ke+3],(ut&192)===128&&(Nt&192)===128&&(Vt&192)===128&&(gt=(Ve&15)<<18|(ut&63)<<12|(Nt&63)<<6|Vt&63,gt>65535&&gt<1114112&&(je=gt))}}je===null?(je=65533,at=1):je>65535&&(je-=65536,be.push(je>>>10&1023|55296),je=56320|je&1023),be.push(je),ke+=at}return Y(be)}var K=4096;function Y(ge){var pe=ge.length;if(pe<=K)return String.fromCharCode.apply(String,ge);for(var Te="",be=0;be<pe;)Te+=String.fromCharCode.apply(String,ge.slice(be,be+=K));return Te}function ie(ge,pe,Te){var be="";Te=Math.min(ge.length,Te);for(var ke=pe;ke<Te;++ke)be+=String.fromCharCode(ge[ke]&127);return be}function ne(ge,pe,Te){var be="";Te=Math.min(ge.length,Te);for(var ke=pe;ke<Te;++ke)be+=String.fromCharCode(ge[ke]);return be}function le(ge,pe,Te){var be=ge.length;(!pe||pe<0)&&(pe=0),(!Te||Te<0||Te>be)&&(Te=be);for(var ke="",Ve=pe;Ve<Te;++Ve)ke+=He[ge[Ve]];return ke}function de(ge,pe,Te){for(var be=ge.slice(pe,Te),ke="",Ve=0;Ve<be.length-1;Ve+=2)ke+=String.fromCharCode(be[Ve]+be[Ve+1]*256);return ke}w.prototype.slice=function(pe,Te){var be=this.length;pe=~~pe,Te=Te===void 0?be:~~Te,pe<0?(pe+=be,pe<0&&(pe=0)):pe>be&&(pe=be),Te<0?(Te+=be,Te<0&&(Te=0)):Te>be&&(Te=be),Te<pe&&(Te=pe);var ke=this.subarray(pe,Te);return Object.setPrototypeOf(ke,w.prototype),ke};function we(ge,pe,Te){if(ge%1!==0||ge<0)throw new RangeError("offset is not uint");if(ge+pe>Te)throw new RangeError("Trying to access beyond buffer length")}w.prototype.readUintLE=w.prototype.readUIntLE=function(pe,Te,be){pe=pe>>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=this[pe],Ve=1,je=0;++je<Te&&(Ve*=256);)ke+=this[pe+je]*Ve;return ke},w.prototype.readUintBE=w.prototype.readUIntBE=function(pe,Te,be){pe=pe>>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=this[pe+--Te],Ve=1;Te>0&&(Ve*=256);)ke+=this[pe+--Te]*Ve;return ke},w.prototype.readUint8=w.prototype.readUInt8=function(pe,Te){return pe=pe>>>0,Te||we(pe,1,this.length),this[pe]},w.prototype.readUint16LE=w.prototype.readUInt16LE=function(pe,Te){return pe=pe>>>0,Te||we(pe,2,this.length),this[pe]|this[pe+1]<<8},w.prototype.readUint16BE=w.prototype.readUInt16BE=function(pe,Te){return pe=pe>>>0,Te||we(pe,2,this.length),this[pe]<<8|this[pe+1]},w.prototype.readUint32LE=w.prototype.readUInt32LE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),(this[pe]|this[pe+1]<<8|this[pe+2]<<16)+this[pe+3]*16777216},w.prototype.readUint32BE=w.prototype.readUInt32BE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),this[pe]*16777216+(this[pe+1]<<16|this[pe+2]<<8|this[pe+3])},w.prototype.readBigUInt64LE=Oe(function(pe){pe=pe>>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=Te+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,24),Ve=this[++pe]+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+be*Math.pow(2,24);return BigInt(ke)+(BigInt(Ve)<<BigInt(32))}),w.prototype.readBigUInt64BE=Oe(function(pe){pe=pe>>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=Te*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe],Ve=this[++pe]*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+be;return(BigInt(ke)<<BigInt(32))+BigInt(Ve)}),w.prototype.readIntLE=function(pe,Te,be){pe=pe>>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=this[pe],Ve=1,je=0;++je<Te&&(Ve*=256);)ke+=this[pe+je]*Ve;return Ve*=128,ke>=Ve&&(ke-=Math.pow(2,8*Te)),ke},w.prototype.readIntBE=function(pe,Te,be){pe=pe>>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=Te,Ve=1,je=this[pe+--ke];ke>0&&(Ve*=256);)je+=this[pe+--ke]*Ve;return Ve*=128,je>=Ve&&(je-=Math.pow(2,8*Te)),je},w.prototype.readInt8=function(pe,Te){return pe=pe>>>0,Te||we(pe,1,this.length),this[pe]&128?(255-this[pe]+1)*-1:this[pe]},w.prototype.readInt16LE=function(pe,Te){pe=pe>>>0,Te||we(pe,2,this.length);var be=this[pe]|this[pe+1]<<8;return be&32768?be|4294901760:be},w.prototype.readInt16BE=function(pe,Te){pe=pe>>>0,Te||we(pe,2,this.length);var be=this[pe+1]|this[pe]<<8;return be&32768?be|4294901760:be},w.prototype.readInt32LE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),this[pe]|this[pe+1]<<8|this[pe+2]<<16|this[pe+3]<<24},w.prototype.readInt32BE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),this[pe]<<24|this[pe+1]<<16|this[pe+2]<<8|this[pe+3]},w.prototype.readBigInt64LE=Oe(function(pe){pe=pe>>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=this[pe+4]+this[pe+5]*Math.pow(2,8)+this[pe+6]*Math.pow(2,16)+(be<<24);return(BigInt(ke)<<BigInt(32))+BigInt(Te+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,24))}),w.prototype.readBigInt64BE=Oe(function(pe){pe=pe>>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=(Te<<24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe];return(BigInt(ke)<<BigInt(32))+BigInt(this[++pe]*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+be)}),w.prototype.readFloatLE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),m.read(this,pe,!0,23,4)},w.prototype.readFloatBE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),m.read(this,pe,!1,23,4)},w.prototype.readDoubleLE=function(pe,Te){return pe=pe>>>0,Te||we(pe,8,this.length),m.read(this,pe,!0,52,8)},w.prototype.readDoubleBE=function(pe,Te){return pe=pe>>>0,Te||we(pe,8,this.length),m.read(this,pe,!1,52,8)};function me(ge,pe,Te,be,ke,Ve){if(!w.isBuffer(ge))throw new TypeError('"buffer" argument must be a Buffer instance');if(pe>ke||pe<Ve)throw new RangeError('"value" argument is out of bounds');if(Te+be>ge.length)throw new RangeError("Index out of range")}w.prototype.writeUintLE=w.prototype.writeUIntLE=function(pe,Te,be,ke){if(pe=+pe,Te=Te>>>0,be=be>>>0,!ke){var Ve=Math.pow(2,8*be)-1;me(this,pe,Te,be,Ve,0)}var je=1,at=0;for(this[Te]=pe&255;++at<be&&(je*=256);)this[Te+at]=pe/je&255;return Te+be},w.prototype.writeUintBE=w.prototype.writeUIntBE=function(pe,Te,be,ke){if(pe=+pe,Te=Te>>>0,be=be>>>0,!ke){var Ve=Math.pow(2,8*be)-1;me(this,pe,Te,be,Ve,0)}var je=be-1,at=1;for(this[Te+je]=pe&255;--je>=0&&(at*=256);)this[Te+je]=pe/at&255;return Te+be},w.prototype.writeUint8=w.prototype.writeUInt8=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,1,255,0),this[Te]=pe&255,Te+1},w.prototype.writeUint16LE=w.prototype.writeUInt16LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,65535,0),this[Te]=pe&255,this[Te+1]=pe>>>8,Te+2},w.prototype.writeUint16BE=w.prototype.writeUInt16BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,65535,0),this[Te]=pe>>>8,this[Te+1]=pe&255,Te+2},w.prototype.writeUint32LE=w.prototype.writeUInt32LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,4294967295,0),this[Te+3]=pe>>>24,this[Te+2]=pe>>>16,this[Te+1]=pe>>>8,this[Te]=pe&255,Te+4},w.prototype.writeUint32BE=w.prototype.writeUInt32BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,4294967295,0),this[Te]=pe>>>24,this[Te+1]=pe>>>16,this[Te+2]=pe>>>8,this[Te+3]=pe&255,Te+4};function Le(ge,pe,Te,be,ke){et(pe,be,ke,ge,Te,7);var Ve=Number(pe&BigInt(4294967295));ge[Te++]=Ve,Ve=Ve>>8,ge[Te++]=Ve,Ve=Ve>>8,ge[Te++]=Ve,Ve=Ve>>8,ge[Te++]=Ve;var je=Number(pe>>BigInt(32)&BigInt(4294967295));return ge[Te++]=je,je=je>>8,ge[Te++]=je,je=je>>8,ge[Te++]=je,je=je>>8,ge[Te++]=je,Te}function ve(ge,pe,Te,be,ke){et(pe,be,ke,ge,Te,7);var Ve=Number(pe&BigInt(4294967295));ge[Te+7]=Ve,Ve=Ve>>8,ge[Te+6]=Ve,Ve=Ve>>8,ge[Te+5]=Ve,Ve=Ve>>8,ge[Te+4]=Ve;var je=Number(pe>>BigInt(32)&BigInt(4294967295));return ge[Te+3]=je,je=je>>8,ge[Te+2]=je,je=je>>8,ge[Te+1]=je,je=je>>8,ge[Te]=je,Te+8}w.prototype.writeBigUInt64LE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Le(this,pe,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),w.prototype.writeBigUInt64BE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ve(this,pe,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),w.prototype.writeIntLE=function(pe,Te,be,ke){if(pe=+pe,Te=Te>>>0,!ke){var Ve=Math.pow(2,8*be-1);me(this,pe,Te,be,Ve-1,-Ve)}var je=0,at=1,ut=0;for(this[Te]=pe&255;++je<be&&(at*=256);)pe<0&&ut===0&&this[Te+je-1]!==0&&(ut=1),this[Te+je]=(pe/at>>0)-ut&255;return Te+be},w.prototype.writeIntBE=function(pe,Te,be,ke){if(pe=+pe,Te=Te>>>0,!ke){var Ve=Math.pow(2,8*be-1);me(this,pe,Te,be,Ve-1,-Ve)}var je=be-1,at=1,ut=0;for(this[Te+je]=pe&255;--je>=0&&(at*=256);)pe<0&&ut===0&&this[Te+je+1]!==0&&(ut=1),this[Te+je]=(pe/at>>0)-ut&255;return Te+be},w.prototype.writeInt8=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,1,127,-128),pe<0&&(pe=255+pe+1),this[Te]=pe&255,Te+1},w.prototype.writeInt16LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,32767,-32768),this[Te]=pe&255,this[Te+1]=pe>>>8,Te+2},w.prototype.writeInt16BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,32767,-32768),this[Te]=pe>>>8,this[Te+1]=pe&255,Te+2},w.prototype.writeInt32LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,2147483647,-2147483648),this[Te]=pe&255,this[Te+1]=pe>>>8,this[Te+2]=pe>>>16,this[Te+3]=pe>>>24,Te+4},w.prototype.writeInt32BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,2147483647,-2147483648),pe<0&&(pe=4294967295+pe+1),this[Te]=pe>>>24,this[Te+1]=pe>>>16,this[Te+2]=pe>>>8,this[Te+3]=pe&255,Te+4},w.prototype.writeBigInt64LE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Le(this,pe,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),w.prototype.writeBigInt64BE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ve(this,pe,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ae(ge,pe,Te,be,ke,Ve){if(Te+be>ge.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("Index out of range")}function ye(ge,pe,Te,be,ke){return pe=+pe,Te=Te>>>0,ke||Ae(ge,pe,Te,4),m.write(ge,pe,Te,be,23,4),Te+4}w.prototype.writeFloatLE=function(pe,Te,be){return ye(this,pe,Te,!0,be)},w.prototype.writeFloatBE=function(pe,Te,be){return ye(this,pe,Te,!1,be)};function Se(ge,pe,Te,be,ke){return pe=+pe,Te=Te>>>0,ke||Ae(ge,pe,Te,8),m.write(ge,pe,Te,be,52,8),Te+8}w.prototype.writeDoubleLE=function(pe,Te,be){return Se(this,pe,Te,!0,be)},w.prototype.writeDoubleBE=function(pe,Te,be){return Se(this,pe,Te,!1,be)},w.prototype.copy=function(pe,Te,be,ke){if(!w.isBuffer(pe))throw new TypeError("argument should be a Buffer");if(be||(be=0),!ke&&ke!==0&&(ke=this.length),Te>=pe.length&&(Te=pe.length),Te||(Te=0),ke>0&&ke<be&&(ke=be),ke===be||pe.length===0||this.length===0)return 0;if(Te<0)throw new RangeError("targetStart out of bounds");if(be<0||be>=this.length)throw new RangeError("Index out of range");if(ke<0)throw new RangeError("sourceEnd out of bounds");ke>this.length&&(ke=this.length),pe.length-Te<ke-be&&(ke=pe.length-Te+be);var Ve=ke-be;return this===pe&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Te,be,ke):Uint8Array.prototype.set.call(pe,this.subarray(be,ke),Te),Ve},w.prototype.fill=function(pe,Te,be,ke){if(typeof pe=="string"){if(typeof Te=="string"?(ke=Te,Te=0,be=this.length):typeof be=="string"&&(ke=be,be=this.length),ke!==void 0&&typeof ke!="string")throw new TypeError("encoding must be a string");if(typeof ke=="string"&&!w.isEncoding(ke))throw new TypeError("Unknown encoding: "+ke);if(pe.length===1){var Ve=pe.charCodeAt(0);(ke==="utf8"&&Ve<128||ke==="latin1")&&(pe=Ve)}}else typeof pe=="number"?pe=pe&255:typeof pe=="boolean"&&(pe=Number(pe));if(Te<0||this.length<Te||this.length<be)throw new RangeError("Out of range index");if(be<=Te)return this;Te=Te>>>0,be=be===void 0?this.length:be>>>0,pe||(pe=0);var je;if(typeof pe=="number")for(je=Te;je<be;++je)this[je]=pe;else{var at=w.isBuffer(pe)?pe:w.from(pe,ke),ut=at.length;if(ut===0)throw new TypeError('The value "'+pe+'" is invalid for argument "value"');for(je=0;je<be-Te;++je)this[je+Te]=at[je%ut]}return this};var _e={};function ze(ge,pe,Te){_e[ge]=function(be){c(Ve,be);var ke=l(Ve);function Ve(){var je;return t(this,Ve),je=ke.call(this),Object.defineProperty(h(je),"message",{value:pe.apply(h(je),arguments),writable:!0,configurable:!0}),je.name="".concat(je.name," [").concat(ge,"]"),je.stack,delete je.name,je}return a(Ve,[{key:"code",get:function(){return ge},set:function(at){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:at,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ge,"]: ").concat(this.message)}}]),Ve}(Te)}ze("ERR_BUFFER_OUT_OF_BOUNDS",function(ge){return ge?"".concat(ge," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),ze("ERR_INVALID_ARG_TYPE",function(ge,pe){return'The "'.concat(ge,'" argument must be of type number. Received type ').concat(n(pe))},TypeError),ze("ERR_OUT_OF_RANGE",function(ge,pe,Te){var be='The value of "'.concat(ge,'" is out of range.'),ke=Te;return Number.isInteger(Te)&&Math.abs(Te)>Math.pow(2,32)?ke=Ie(String(Te)):typeof Te=="bigint"&&(ke=String(Te),(Te>Math.pow(BigInt(2),BigInt(32))||Te<-Math.pow(BigInt(2),BigInt(32)))&&(ke=Ie(ke)),ke+="n"),be+=" It must be ".concat(pe,". Received ").concat(ke),be},RangeError);function Ie(ge){for(var pe="",Te=ge.length,be=ge[0]==="-"?1:0;Te>=be+4;Te-=3)pe="_".concat(ge.slice(Te-3,Te)).concat(pe);return"".concat(ge.slice(0,Te)).concat(pe)}function Ne(ge,pe,Te){st(pe,"offset"),(ge[pe]===void 0||ge[pe+Te]===void 0)&&Ze(pe,ge.length-(Te+1))}function et(ge,pe,Te,be,ke,Ve){if(ge>Te||ge<pe){var je=typeof pe=="bigint"?"n":"",at;throw pe===0||pe===BigInt(0)?at=">= 0".concat(je," and < 2").concat(je," ** ").concat((Ve+1)*8).concat(je):at=">= -(2".concat(je," ** ").concat((Ve+1)*8-1).concat(je,") and < 2 ** ")+"".concat((Ve+1)*8-1).concat(je),new _e.ERR_OUT_OF_RANGE("value",at,ge)}Ne(be,ke,Ve)}function st(ge,pe){if(typeof ge!="number")throw new _e.ERR_INVALID_ARG_TYPE(pe,"number",ge)}function Ze(ge,pe,Te){throw Math.floor(ge)!==ge?(st(ge,Te),new _e.ERR_OUT_OF_RANGE("offset","an integer",ge)):pe<0?new _e.ERR_BUFFER_OUT_OF_BOUNDS:new _e.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(pe),ge)}var Ke=/[^+/0-9A-Za-z-_]/g;function nt(ge){if(ge=ge.split("=")[0],ge=ge.trim().replace(Ke,""),ge.length<2)return"";for(;ge.length%4!==0;)ge=ge+"=";return ge}function it(ge,pe){pe=pe||1/0;for(var Te,be=ge.length,ke=null,Ve=[],je=0;je<be;++je){if(Te=ge.charCodeAt(je),Te>55295&&Te<57344){if(!ke){if(Te>56319){(pe-=3)>-1&&Ve.push(239,191,189);continue}else if(je+1===be){(pe-=3)>-1&&Ve.push(239,191,189);continue}ke=Te;continue}if(Te<56320){(pe-=3)>-1&&Ve.push(239,191,189),ke=Te;continue}Te=(ke-55296<<10|Te-56320)+65536}else ke&&(pe-=3)>-1&&Ve.push(239,191,189);if(ke=null,Te<128){if((pe-=1)<0)break;Ve.push(Te)}else if(Te<2048){if((pe-=2)<0)break;Ve.push(Te>>6|192,Te&63|128)}else if(Te<65536){if((pe-=3)<0)break;Ve.push(Te>>12|224,Te>>6&63|128,Te&63|128)}else if(Te<1114112){if((pe-=4)<0)break;Ve.push(Te>>18|240,Te>>12&63|128,Te>>6&63|128,Te&63|128)}else throw new Error("Invalid code point")}return Ve}function lt(ge){for(var pe=[],Te=0;Te<ge.length;++Te)pe.push(ge.charCodeAt(Te)&255);return pe}function vt(ge,pe){for(var Te,be,ke,Ve=[],je=0;je<ge.length&&!((pe-=2)<0);++je)Te=ge.charCodeAt(je),be=Te>>8,ke=Te%256,Ve.push(ke),Ve.push(be);return Ve}function xt(ge){return v.toByteArray(nt(ge))}function Je(ge,pe,Te,be){var ke;for(ke=0;ke<be&&!(ke+Te>=pe.length||ke>=ge.length);++ke)pe[ke+Te]=ge[ke];return ke}function Pe(ge,pe){return ge instanceof pe||ge!=null&&ge.constructor!=null&&ge.constructor.name!=null&&ge.constructor.name===pe.name}function Ue(ge){return ge!==ge}var He=function(){for(var ge="0123456789abcdef",pe=new Array(256),Te=0;Te<16;++Te)for(var be=Te*16,ke=0;ke<16;++ke)pe[be+ke]=ge[Te]+ge[ke];return pe}();function Oe(ge){return typeof BigInt>"u"?Ce:ge}function Ce(){throw new Error("BigInt not supported")}},2321:function(d){d.exports=s,d.exports.isMobile=s,d.exports.default=s;var g=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,t=/android|ipad|playbook|silk/i;function s(a){a||(a={});var c=a.ua;if(!c&&typeof navigator<"u"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;var u=g.test(c)&&!r.test(c)||!!a.tablet&&t.test(c);return!u&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(u=!0),u}},3910:function(d,g){g.byteLength=y,g.toByteArray=T,g.fromByteArray=v;for(var r=[],t=[],s=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,u=a.length;c<u;++c)r[c]=a[c],t[a.charCodeAt(c)]=c;t[45]=62,t[95]=63;function l(m){var b=m.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=m.indexOf("=");E===-1&&(E=b);var p=E===b?0:4-E%4;return[E,p]}function y(m){var b=l(m),E=b[0],p=b[1];return(E+p)*3/4-p}function h(m,b,E){return(b+E)*3/4-E}function T(m){var b,E=l(m),p=E[0],S=E[1],w=new s(h(m,p,S)),i=0,C=S>0?p-4:p,x;for(x=0;x<C;x+=4)b=t[m.charCodeAt(x)]<<18|t[m.charCodeAt(x+1)]<<12|t[m.charCodeAt(x+2)]<<6|t[m.charCodeAt(x+3)],w[i++]=b>>16&255,w[i++]=b>>8&255,w[i++]=b&255;return S===2&&(b=t[m.charCodeAt(x)]<<2|t[m.charCodeAt(x+1)]>>4,w[i++]=b&255),S===1&&(b=t[m.charCodeAt(x)]<<10|t[m.charCodeAt(x+1)]<<4|t[m.charCodeAt(x+2)]>>2,w[i++]=b>>8&255,w[i++]=b&255),w}function f(m){return r[m>>18&63]+r[m>>12&63]+r[m>>6&63]+r[m&63]}function n(m,b,E){for(var p,S=[],w=b;w<E;w+=3)p=(m[w]<<16&16711680)+(m[w+1]<<8&65280)+(m[w+2]&255),S.push(f(p));return S.join("")}function v(m){for(var b,E=m.length,p=E%3,S=[],w=16383,i=0,C=E-p;i<C;i+=w)S.push(n(m,i,i+w>C?C:i+w));return p===1?(b=m[E-1],S.push(r[b>>2]+r[b<<4&63]+"==")):p===2&&(b=(m[E-2]<<8)+m[E-1],S.push(r[b>>10]+r[b>>4&63]+r[b<<2&63]+"=")),S.join("")}},3187:function(d,g){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */g.read=function(r,t,s,a,c){var u,l,y=c*8-a-1,h=(1<<y)-1,T=h>>1,f=-7,n=s?c-1:0,v=s?-1:1,m=r[t+n];for(n+=v,u=m&(1<<-f)-1,m>>=-f,f+=y;f>0;u=u*256+r[t+n],n+=v,f-=8);for(l=u&(1<<-f)-1,u>>=-f,f+=a;f>0;l=l*256+r[t+n],n+=v,f-=8);if(u===0)u=1-T;else{if(u===h)return l?NaN:(m?-1:1)*(1/0);l=l+Math.pow(2,a),u=u-T}return(m?-1:1)*l*Math.pow(2,u-a)},g.write=function(r,t,s,a,c,u){var l,y,h,T=u*8-c-1,f=(1<<T)-1,n=f>>1,v=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:u-1,b=a?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(y=isNaN(t)?1:0,l=f):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+n>=1?t+=v/h:t+=v*Math.pow(2,1-n),t*h>=2&&(l++,h/=2),l+n>=f?(y=0,l=f):l+n>=1?(y=(t*h-1)*Math.pow(2,c),l=l+n):(y=t*Math.pow(2,n-1)*Math.pow(2,c),l=0));c>=8;r[s+m]=y&255,m+=b,y/=256,c-=8);for(l=l<<c|y,T+=c;T>0;r[s+m]=l&255,m+=b,l/=256,T-=8);r[s+m-b]|=E*128}},1152:function(d,g,r){d.exports=l;var t=r(3440),s=r(7774),a=r(9298);function c(y,h){this._controllerNames=Object.keys(y),this._controllerList=this._controllerNames.map(function(T){return y[T]}),this._mode=h,this._active=y[h],this._active||(this._mode="turntable",this._active=y.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 u=c.prototype;u.flush=function(y){for(var h=this._controllerList,T=0;T<h.length;++T)h[T].flush(y)},u.idle=function(y){for(var h=this._controllerList,T=0;T<h.length;++T)h[T].idle(y)},u.lookAt=function(y,h,T,f){for(var n=this._controllerList,v=0;v<n.length;++v)n[v].lookAt(y,h,T,f)},u.rotate=function(y,h,T,f){for(var n=this._controllerList,v=0;v<n.length;++v)n[v].rotate(y,h,T,f)},u.pan=function(y,h,T,f){for(var n=this._controllerList,v=0;v<n.length;++v)n[v].pan(y,h,T,f)},u.translate=function(y,h,T,f){for(var n=this._controllerList,v=0;v<n.length;++v)n[v].translate(y,h,T,f)},u.setMatrix=function(y,h){for(var T=this._controllerList,f=0;f<T.length;++f)T[f].setMatrix(y,h)},u.setDistanceLimits=function(y,h){for(var T=this._controllerList,f=0;f<T.length;++f)T[f].setDistanceLimits(y,h)},u.setDistance=function(y,h){for(var T=this._controllerList,f=0;f<T.length;++f)T[f].setDistance(y,h)},u.recalcMatrix=function(y){this._active.recalcMatrix(y)},u.getDistance=function(y){return this._active.getDistance(y)},u.getDistanceLimits=function(y){return this._active.getDistanceLimits(y)},u.lastT=function(){return this._active.lastT()},u.setMode=function(y){if(y!==this._mode){var h=this._controllerNames.indexOf(y);if(!(h<0)){var T=this._active,f=this._controllerList[h],n=Math.max(T.lastT(),f.lastT());T.recalcMatrix(n),f.setMatrix(n,T.computedMatrix),this._active=f,this._mode=y,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}}},u.getMode=function(){return this._mode};function l(y){y=y||{};var h=y.eye||[0,0,1],T=y.center||[0,0,0],f=y.up||[0,1,0],n=y.distanceLimits||[0,1/0],v=y.mode||"turntable",m=t(),b=s(),E=a();return m.setDistanceLimits(n[0],n[1]),m.lookAt(0,h,T,f),b.setDistanceLimits(n[0],n[1]),b.lookAt(0,h,T,f),E.setDistanceLimits(n[0],n[1]),E.lookAt(0,h,T,f),new c({turntable:m,orbit:b,matrix:E},v)}},8126:function(d,g,r){var t=typeof WeakMap>"u"?r(5346):WeakMap,s=r(5827),a=r(2944),c=new t;function u(l){var y=c.get(l),h=y&&(y._triangleBuffer.handle||y._triangleBuffer.buffer);if(!h||!l.isBuffer(h)){var T=s(l,new Float32Array([-1,-1,-1,4,4,-1]));y=a(l,[{buffer:T,type:l.FLOAT,size:2}]),y._triangleBuffer=T,c.set(l,y)}y.bind(),l.drawArrays(l.TRIANGLES,0,3),y.unbind()}d.exports=u},8008:function(d,g,r){var t=r(4930);d.exports=s;function s(a,c,u){c=typeof c=="number"?c:1,u=u||": ";var l=a.split(/\r?\n/),y=String(l.length+c-1).length;return l.map(function(h,T){var f=T+c,n=String(f).length,v=t(f,y-n);return v+u+h}).join(`
`)}},2153:function(d,g,r){d.exports=a;var t=r(417);function s(c,u){for(var l=new Array(u+1),y=0;y<c.length;++y)l[y]=c[y];for(var y=0;y<=c.length;++y){for(var h=c.length;h<=u;++h){for(var T=new Array(u),f=0;f<u;++f)T[f]=Math.pow(h+1-y,f);l[h]=T}var n=t.apply(void 0,l);if(n)return!0}return!1}function a(c){var u=c.length;if(u===0)return[];if(u===1)return[0];for(var l=c[0].length,y=[c[0]],h=[0],T=1;T<u;++T){if(y.push(c[T]),!s(y,l)){y.pop();continue}if(h.push(T),h.length===l+1)return h}return h}},4653:function(d,g,r){d.exports=a;var t=r(4419),s=r(1778);function a(c,u){return t(u).filter(function(l){for(var y=new Array(l.length),h=0;h<l.length;++h)y[h]=u[l[h]];return s(y)*c<1})}},2350:function(d,g,r){d.exports=a;var t=r(4653),s=r(8691);function a(c,u){return s(t(c,u))}},7896:function(d){d.exports=function(r){return atob(r)}},957:function(d,g,r){d.exports=a;var t=r(6606);function s(c){for(var u=0,l=0;l<c.length;++l)u+=c[l];return u}function a(c,u){for(var l=u.length,y=new Array(l+1),h=0;h<l;++h){for(var T=new Array(l+1),f=0;f<=l;++f)T[f]=c[f][h];y[h]=T}y[l]=new Array(l+1);for(var h=0;h<=l;++h)y[l][h]=1;for(var n=new Array(l+1),h=0;h<l;++h)n[h]=u[h];n[l]=1;var v=t(y,n),m=s(v[l+1]);m===0&&(m=1);for(var b=new Array(l+1),h=0;h<=l;++h)b[h]=s(v[h])/m;return b}},1539:function(d,g,r){var t=r(8524);d.exports=s;function s(a,c){return t(a[0].mul(c[1]).add(c[0].mul(a[1])),a[1].mul(c[1]))}},8846:function(d){d.exports=g;function g(r,t){return r[0].mul(t[1]).cmp(t[0].mul(r[1]))}},9189:function(d,g,r){var t=r(8524);d.exports=s;function s(a,c){return t(a[0].mul(c[1]),a[1].mul(c[0]))}},5125:function(d,g,r){var t=r(234),s=r(3218),a=r(5514),c=r(2813),u=r(8524),l=r(9189);d.exports=y;function y(h,T){if(t(h))return T?l(h,y(T)):[h[0].clone(),h[1].clone()];var f=0,n,v;if(s(h))n=h.clone();else if(typeof h=="string")n=c(h);else{if(h===0)return[a(0),a(1)];if(h===Math.floor(h))n=a(h);else{for(;h!==Math.floor(h);)h=h*Math.pow(2,256),f-=256;n=a(h)}}if(t(T))n.mul(T[1]),v=T[0].clone();else if(s(T))v=T.clone();else if(typeof T=="string")v=c(T);else if(!T)v=a(1);else if(T===Math.floor(T))v=a(T);else{for(;T!==Math.floor(T);)T=T*Math.pow(2,256),f+=256;v=a(T)}return f>0?n=n.ushln(f):f<0&&(v=v.ushln(-f)),u(n,v)}},234:function(d,g,r){var t=r(3218);d.exports=s;function s(a){return Array.isArray(a)&&a.length===2&&t(a[0])&&t(a[1])}},4275:function(d,g,r){var t=r(1928);d.exports=s;function s(a){return a.cmp(new t(0))}},9958:function(d,g,r){var t=r(4275);d.exports=s;function s(a){var c=a.length,u=a.words,l=0;if(c===1)l=u[0];else if(c===2)l=u[0]+u[1]*67108864;else for(var y=0;y<c;y++){var h=u[y];l+=h*Math.pow(67108864,y)}return t(a)*l}},1112:function(d,g,r){var t=r(8362),s=r(2288).countTrailingZeros;d.exports=a;function a(c){var u=s(t.lo(c));if(u<32)return u;var l=s(t.hi(c));return l>20?52:l+32}},3218:function(d,g,r){r(1928),d.exports=t;function t(s){return s&&typeof s=="object"&&!!s.words}},5514:function(d,g,r){var t=r(1928),s=r(8362);d.exports=a;function a(c){var u=s.exponent(c);return u<52?new t(c):new t(c*Math.pow(2,52-u)).ushln(u-52)}},8524:function(d,g,r){var t=r(5514),s=r(4275);d.exports=a;function a(c,u){var l=s(c),y=s(u);if(l===0)return[t(0),t(1)];if(y===0)return[t(0),t(0)];y<0&&(c=c.neg(),u=u.neg());var h=c.gcd(u);return h.cmpn(1)?[c.div(h),u.div(h)]:[c,u]}},2813:function(d,g,r){var t=r(1928);d.exports=s;function s(a){return new t(a)}},3962:function(d,g,r){var t=r(8524);d.exports=s;function s(a,c){return t(a[0].mul(c[0]),a[1].mul(c[1]))}},4951:function(d,g,r){var t=r(4275);d.exports=s;function s(a){return t(a[0])*t(a[1])}},4354:function(d,g,r){var t=r(8524);d.exports=s;function s(a,c){return t(a[0].mul(c[1]).sub(a[1].mul(c[0])),a[1].mul(c[1]))}},7999:function(d,g,r){var t=r(9958),s=r(1112);d.exports=a;function a(c){var u=c[0],l=c[1];if(u.cmpn(0)===0)return 0;var y=u.abs().divmod(l.abs()),h=y.div,T=t(h),f=y.mod,n=u.negative!==l.negative?-1:1;if(f.cmpn(0)===0)return n*T;if(T){var v=s(T)+4,m=t(f.ushln(v).divRound(l));return n*(T+m*Math.pow(2,-v))}else{var b=l.bitLength()-f.bitLength()+53,m=t(f.ushln(b).divRound(l));return b<1023?n*m*Math.pow(2,-b):(m*=Math.pow(2,-1023),n*m*Math.pow(2,1023-b))}}},5070:function(d){function g(u,l,y,h,T){for(var f=T+1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m>=0?(f=n,T=n-1):h=n+1}return f}function r(u,l,y,h,T){for(var f=T+1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m>0?(f=n,T=n-1):h=n+1}return f}function t(u,l,y,h,T){for(var f=h-1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m<0?(f=n,h=n+1):T=n-1}return f}function s(u,l,y,h,T){for(var f=h-1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m<=0?(f=n,h=n+1):T=n-1}return f}function a(u,l,y,h,T){for(;h<=T;){var f=h+T>>>1,n=u[f],v=y!==void 0?y(n,l):n-l;if(v===0)return f;v<=0?h=f+1:T=f-1}return-1}function c(u,l,y,h,T,f){return typeof y=="function"?f(u,l,y,h===void 0?0:h|0,T===void 0?u.length-1:T|0):f(u,l,void 0,y===void 0?0:y|0,h===void 0?u.length-1:h|0)}d.exports={ge:function(u,l,y,h,T){return c(u,l,y,h,T,g)},gt:function(u,l,y,h,T){return c(u,l,y,h,T,r)},lt:function(u,l,y,h,T){return c(u,l,y,h,T,t)},le:function(u,l,y,h,T){return c(u,l,y,h,T,s)},eq:function(u,l,y,h,T){return c(u,l,y,h,T,a)}}},2288:function(d,g){"use restrict";var r=32;g.INT_BITS=r,g.INT_MAX=2147483647,g.INT_MIN=-1<<r-1,g.sign=function(a){return(a>0)-(a<0)},g.abs=function(a){var c=a>>r-1;return(a^c)-c},g.min=function(a,c){return c^(a^c)&-(a<c)},g.max=function(a,c){return a^(a^c)&-(a<c)},g.isPow2=function(a){return!(a&a-1)&&!!a},g.log2=function(a){var c,u;return c=(a>65535)<<4,a>>>=c,u=(a>255)<<3,a>>>=u,c|=u,u=(a>15)<<2,a>>>=u,c|=u,u=(a>3)<<1,a>>>=u,c|=u,c|a>>1},g.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},g.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function t(a){var c=32;return a&=-a,a&&c--,a&65535&&(c-=16),a&16711935&&(c-=8),a&252645135&&(c-=4),a&858993459&&(c-=2),a&1431655765&&(c-=1),c}g.countTrailingZeros=t,g.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},g.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},g.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var s=new Array(256);(function(a){for(var c=0;c<256;++c){var u=c,l=c,y=7;for(u>>>=1;u;u>>>=1)l<<=1,l|=u&1,--y;a[c]=l<<y&255}})(s),g.reverse=function(a){return s[a&255]<<24|s[a>>>8&255]<<16|s[a>>>16&255]<<8|s[a>>>24&255]},g.interleave2=function(a,c){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,a|c<<1},g.deinterleave2=function(a,c){return a=a>>>c&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},g.interleave3=function(a,c,u){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,a|=c<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,a|u<<2},g.deinterleave3=function(a,c){return a=a>>>c&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},g.nextCombination=function(a){var c=a|a-1;return c+1|(~c&-~c)-1>>>t(a)+1}},1928:function(d,g,r){d=r.nmd(d),function(t,s){function a(O,F){if(!O)throw new Error(F||"Assertion failed")}function c(O,F){O.super_=F;var N=function(){};N.prototype=F.prototype,O.prototype=new N,O.prototype.constructor=O}function u(O,F,N){if(u.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((F==="le"||F==="be")&&(N=F,F=10),this._init(O||0,F||10,N||"be"))}typeof t=="object"?t.exports=u:s.BN=u,u.BN=u,u.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=r(6601).Buffer}catch{}u.isBN=function(F){return F instanceof u?!0:F!==null&&typeof F=="object"&&F.constructor.wordSize===u.wordSize&&Array.isArray(F.words)},u.max=function(F,N){return F.cmp(N)>0?F:N},u.min=function(F,N){return F.cmp(N)<0?F:N},u.prototype._init=function(F,N,V){if(typeof F=="number")return this._initNumber(F,N,V);if(typeof F=="object")return this._initArray(F,N,V);N==="hex"&&(N=16),a(N===(N|0)&&N>=2&&N<=36),F=F.toString().replace(/\s+/g,"");var j=0;F[0]==="-"&&(j++,this.negative=1),j<F.length&&(N===16?this._parseHex(F,j,V):(this._parseBase(F,N,j),V==="le"&&this._initArray(this.toArray(),N,V)))},u.prototype._initNumber=function(F,N,V){F<0&&(this.negative=1,F=-F),F<67108864?(this.words=[F&67108863],this.length=1):F<4503599627370496?(this.words=[F&67108863,F/67108864&67108863],this.length=2):(a(F<9007199254740992),this.words=[F&67108863,F/67108864&67108863,1],this.length=3),V==="le"&&this._initArray(this.toArray(),N,V)},u.prototype._initArray=function(F,N,V){if(a(typeof F.length=="number"),F.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(F.length/3),this.words=new Array(this.length);for(var j=0;j<this.length;j++)this.words[j]=0;var $,q,oe=0;if(V==="be")for(j=F.length-1,$=0;j>=0;j-=3)q=F[j]|F[j-1]<<8|F[j-2]<<16,this.words[$]|=q<<oe&67108863,this.words[$+1]=q>>>26-oe&67108863,oe+=24,oe>=26&&(oe-=26,$++);else if(V==="le")for(j=0,$=0;j<F.length;j+=3)q=F[j]|F[j+1]<<8|F[j+2]<<16,this.words[$]|=q<<oe&67108863,this.words[$+1]=q>>>26-oe&67108863,oe+=24,oe>=26&&(oe-=26,$++);return this.strip()};function y(O,F){var N=O.charCodeAt(F);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function h(O,F,N){var V=y(O,N);return N-1>=F&&(V|=y(O,N-1)<<4),V}u.prototype._parseHex=function(F,N,V){this.length=Math.ceil((F.length-N)/6),this.words=new Array(this.length);for(var j=0;j<this.length;j++)this.words[j]=0;var $=0,q=0,oe;if(V==="be")for(j=F.length-1;j>=N;j-=2)oe=h(F,N,j)<<$,this.words[q]|=oe&67108863,$>=18?($-=18,q+=1,this.words[q]|=oe>>>26):$+=8;else{var Z=F.length-N;for(j=Z%2===0?N+1:N;j<F.length;j+=2)oe=h(F,N,j)<<$,this.words[q]|=oe&67108863,$>=18?($-=18,q+=1,this.words[q]|=oe>>>26):$+=8}this.strip()};function T(O,F,N,V){for(var j=0,$=Math.min(O.length,N),q=F;q<$;q++){var oe=O.charCodeAt(q)-48;j*=V,oe>=49?j+=oe-49+10:oe>=17?j+=oe-17+10:j+=oe}return j}u.prototype._parseBase=function(F,N,V){this.words=[0],this.length=1;for(var j=0,$=1;$<=67108863;$*=N)j++;j--,$=$/N|0;for(var q=F.length-V,oe=q%j,Z=Math.min(q,q-oe)+V,G=0,re=V;re<Z;re+=j)G=T(F,re,re+j,N),this.imuln($),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(oe!==0){var H=1;for(G=T(F,re,F.length,N),re=0;re<oe;re++)H*=N;this.imuln(H),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G)}this.strip()},u.prototype.copy=function(F){F.words=new Array(this.length);for(var N=0;N<this.length;N++)F.words[N]=this.words[N];F.length=this.length,F.negative=this.negative,F.red=this.red},u.prototype.clone=function(){var F=new u(null);return this.copy(F),F},u.prototype._expand=function(F){for(;this.length<F;)this.words[this.length++]=0;return this},u.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},u.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"],n=[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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];u.prototype.toString=function(F,N){F=F||10,N=N|0||1;var V;if(F===16||F==="hex"){V="";for(var j=0,$=0,q=0;q<this.length;q++){var oe=this.words[q],Z=((oe<<j|$)&16777215).toString(16);$=oe>>>24-j&16777215,$!==0||q!==this.length-1?V=f[6-Z.length]+Z+V:V=Z+V,j+=2,j>=26&&(j-=26,q--)}for($!==0&&(V=$.toString(16)+V);V.length%N!==0;)V="0"+V;return this.negative!==0&&(V="-"+V),V}if(F===(F|0)&&F>=2&&F<=36){var G=n[F],re=v[F];V="";var H=this.clone();for(H.negative=0;!H.isZero();){var J=H.modn(re).toString(F);H=H.idivn(re),H.isZero()?V=J+V:V=f[G-J.length]+J+V}for(this.isZero()&&(V="0"+V);V.length%N!==0;)V="0"+V;return this.negative!==0&&(V="-"+V),V}a(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var F=this.words[0];return this.length===2?F+=this.words[1]*67108864:this.length===3&&this.words[2]===1?F+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-F:F},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(F,N){return a(typeof l<"u"),this.toArrayLike(l,F,N)},u.prototype.toArray=function(F,N){return this.toArrayLike(Array,F,N)},u.prototype.toArrayLike=function(F,N,V){var j=this.byteLength(),$=V||Math.max(1,j);a(j<=$,"byte array longer than desired length"),a($>0,"Requested array length <= 0"),this.strip();var q=N==="le",oe=new F($),Z,G,re=this.clone();if(q){for(G=0;!re.isZero();G++)Z=re.andln(255),re.iushrn(8),oe[G]=Z;for(;G<$;G++)oe[G]=0}else{for(G=0;G<$-j;G++)oe[G]=0;for(G=0;!re.isZero();G++)Z=re.andln(255),re.iushrn(8),oe[$-G-1]=Z}return oe},Math.clz32?u.prototype._countBits=function(F){return 32-Math.clz32(F)}:u.prototype._countBits=function(F){var N=F,V=0;return N>=4096&&(V+=13,N>>>=13),N>=64&&(V+=7,N>>>=7),N>=8&&(V+=4,N>>>=4),N>=2&&(V+=2,N>>>=2),V+N},u.prototype._zeroBits=function(F){if(F===0)return 26;var N=F,V=0;return N&8191||(V+=13,N>>>=13),N&127||(V+=7,N>>>=7),N&15||(V+=4,N>>>=4),N&3||(V+=2,N>>>=2),N&1||V++,V},u.prototype.bitLength=function(){var F=this.words[this.length-1],N=this._countBits(F);return(this.length-1)*26+N};function m(O){for(var F=new Array(O.bitLength()),N=0;N<F.length;N++){var V=N/26|0,j=N%26;F[N]=(O.words[V]&1<<j)>>>j}return F}u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var F=0,N=0;N<this.length;N++){var V=this._zeroBits(this.words[N]);if(F+=V,V!==26)break}return F},u.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},u.prototype.toTwos=function(F){return this.negative!==0?this.abs().inotn(F).iaddn(1):this.clone()},u.prototype.fromTwos=function(F){return this.testn(F-1)?this.notn(F).iaddn(1).ineg():this.clone()},u.prototype.isNeg=function(){return this.negative!==0},u.prototype.neg=function(){return this.clone().ineg()},u.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},u.prototype.iuor=function(F){for(;this.length<F.length;)this.words[this.length++]=0;for(var N=0;N<F.length;N++)this.words[N]=this.words[N]|F.words[N];return this.strip()},u.prototype.ior=function(F){return a((this.negative|F.negative)===0),this.iuor(F)},u.prototype.or=function(F){return this.length>F.length?this.clone().ior(F):F.clone().ior(this)},u.prototype.uor=function(F){return this.length>F.length?this.clone().iuor(F):F.clone().iuor(this)},u.prototype.iuand=function(F){var N;this.length>F.length?N=F:N=this;for(var V=0;V<N.length;V++)this.words[V]=this.words[V]&F.words[V];return this.length=N.length,this.strip()},u.prototype.iand=function(F){return a((this.negative|F.negative)===0),this.iuand(F)},u.prototype.and=function(F){return this.length>F.length?this.clone().iand(F):F.clone().iand(this)},u.prototype.uand=function(F){return this.length>F.length?this.clone().iuand(F):F.clone().iuand(this)},u.prototype.iuxor=function(F){var N,V;this.length>F.length?(N=this,V=F):(N=F,V=this);for(var j=0;j<V.length;j++)this.words[j]=N.words[j]^V.words[j];if(this!==N)for(;j<N.length;j++)this.words[j]=N.words[j];return this.length=N.length,this.strip()},u.prototype.ixor=function(F){return a((this.negative|F.negative)===0),this.iuxor(F)},u.prototype.xor=function(F){return this.length>F.length?this.clone().ixor(F):F.clone().ixor(this)},u.prototype.uxor=function(F){return this.length>F.length?this.clone().iuxor(F):F.clone().iuxor(this)},u.prototype.inotn=function(F){a(typeof F=="number"&&F>=0);var N=Math.ceil(F/26)|0,V=F%26;this._expand(N),V>0&&N--;for(var j=0;j<N;j++)this.words[j]=~this.words[j]&67108863;return V>0&&(this.words[j]=~this.words[j]&67108863>>26-V),this.strip()},u.prototype.notn=function(F){return this.clone().inotn(F)},u.prototype.setn=function(F,N){a(typeof F=="number"&&F>=0);var V=F/26|0,j=F%26;return this._expand(V+1),N?this.words[V]=this.words[V]|1<<j:this.words[V]=this.words[V]&~(1<<j),this.strip()},u.prototype.iadd=function(F){var N;if(this.negative!==0&&F.negative===0)return this.negative=0,N=this.isub(F),this.negative^=1,this._normSign();if(this.negative===0&&F.negative!==0)return F.negative=0,N=this.isub(F),F.negative=1,N._normSign();var V,j;this.length>F.length?(V=this,j=F):(V=F,j=this);for(var $=0,q=0;q<j.length;q++)N=(V.words[q]|0)+(j.words[q]|0)+$,this.words[q]=N&67108863,$=N>>>26;for(;$!==0&&q<V.length;q++)N=(V.words[q]|0)+$,this.words[q]=N&67108863,$=N>>>26;if(this.length=V.length,$!==0)this.words[this.length]=$,this.length++;else if(V!==this)for(;q<V.length;q++)this.words[q]=V.words[q];return this},u.prototype.add=function(F){var N;return F.negative!==0&&this.negative===0?(F.negative=0,N=this.sub(F),F.negative^=1,N):F.negative===0&&this.negative!==0?(this.negative=0,N=F.sub(this),this.negative=1,N):this.length>F.length?this.clone().iadd(F):F.clone().iadd(this)},u.prototype.isub=function(F){if(F.negative!==0){F.negative=0;var N=this.iadd(F);return F.negative=1,N._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(F),this.negative=1,this._normSign();var V=this.cmp(F);if(V===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,$;V>0?(j=this,$=F):(j=F,$=this);for(var q=0,oe=0;oe<$.length;oe++)N=(j.words[oe]|0)-($.words[oe]|0)+q,q=N>>26,this.words[oe]=N&67108863;for(;q!==0&&oe<j.length;oe++)N=(j.words[oe]|0)+q,q=N>>26,this.words[oe]=N&67108863;if(q===0&&oe<j.length&&j!==this)for(;oe<j.length;oe++)this.words[oe]=j.words[oe];return this.length=Math.max(this.length,oe),j!==this&&(this.negative=1),this.strip()},u.prototype.sub=function(F){return this.clone().isub(F)};function b(O,F,N){N.negative=F.negative^O.negative;var V=O.length+F.length|0;N.length=V,V=V-1|0;var j=O.words[0]|0,$=F.words[0]|0,q=j*$,oe=q&67108863,Z=q/67108864|0;N.words[0]=oe;for(var G=1;G<V;G++){for(var re=Z>>>26,H=Z&67108863,J=Math.min(G,F.length-1),ae=Math.max(0,G-O.length+1);ae<=J;ae++){var K=G-ae|0;j=O.words[K]|0,$=F.words[ae]|0,q=j*$+H,re+=q/67108864|0,H=q&67108863}N.words[G]=H|0,Z=re|0}return Z!==0?N.words[G]=Z|0:N.length--,N.strip()}var E=function(F,N,V){var j=F.words,$=N.words,q=V.words,oe=0,Z,G,re,H=j[0]|0,J=H&8191,ae=H>>>13,K=j[1]|0,Y=K&8191,ie=K>>>13,ne=j[2]|0,le=ne&8191,de=ne>>>13,we=j[3]|0,me=we&8191,Le=we>>>13,ve=j[4]|0,Ae=ve&8191,ye=ve>>>13,Se=j[5]|0,_e=Se&8191,ze=Se>>>13,Ie=j[6]|0,Ne=Ie&8191,et=Ie>>>13,st=j[7]|0,Ze=st&8191,Ke=st>>>13,nt=j[8]|0,it=nt&8191,lt=nt>>>13,vt=j[9]|0,xt=vt&8191,Je=vt>>>13,Pe=$[0]|0,Ue=Pe&8191,He=Pe>>>13,Oe=$[1]|0,Ce=Oe&8191,ge=Oe>>>13,pe=$[2]|0,Te=pe&8191,be=pe>>>13,ke=$[3]|0,Ve=ke&8191,je=ke>>>13,at=$[4]|0,ut=at&8191,Nt=at>>>13,Vt=$[5]|0,gt=Vt&8191,Ct=Vt>>>13,Yt=$[6]|0,gr=Yt&8191,ht=Yt>>>13,Ht=$[7]|0,Wt=Ht&8191,cr=Ht>>>13,er=$[8]|0,ct=er&8191,qe=er>>>13,dt=$[9]|0,bt=dt&8191,Et=dt>>>13;V.negative=F.negative^N.negative,V.length=19,Z=Math.imul(J,Ue),G=Math.imul(J,He),G=G+Math.imul(ae,Ue)|0,re=Math.imul(ae,He);var Mt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,Z=Math.imul(Y,Ue),G=Math.imul(Y,He),G=G+Math.imul(ie,Ue)|0,re=Math.imul(ie,He),Z=Z+Math.imul(J,Ce)|0,G=G+Math.imul(J,ge)|0,G=G+Math.imul(ae,Ce)|0,re=re+Math.imul(ae,ge)|0;var _t=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(_t>>>26)|0,_t&=67108863,Z=Math.imul(le,Ue),G=Math.imul(le,He),G=G+Math.imul(de,Ue)|0,re=Math.imul(de,He),Z=Z+Math.imul(Y,Ce)|0,G=G+Math.imul(Y,ge)|0,G=G+Math.imul(ie,Ce)|0,re=re+Math.imul(ie,ge)|0,Z=Z+Math.imul(J,Te)|0,G=G+Math.imul(J,be)|0,G=G+Math.imul(ae,Te)|0,re=re+Math.imul(ae,be)|0;var It=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(It>>>26)|0,It&=67108863,Z=Math.imul(me,Ue),G=Math.imul(me,He),G=G+Math.imul(Le,Ue)|0,re=Math.imul(Le,He),Z=Z+Math.imul(le,Ce)|0,G=G+Math.imul(le,ge)|0,G=G+Math.imul(de,Ce)|0,re=re+Math.imul(de,ge)|0,Z=Z+Math.imul(Y,Te)|0,G=G+Math.imul(Y,be)|0,G=G+Math.imul(ie,Te)|0,re=re+Math.imul(ie,be)|0,Z=Z+Math.imul(J,Ve)|0,G=G+Math.imul(J,je)|0,G=G+Math.imul(ae,Ve)|0,re=re+Math.imul(ae,je)|0;var Gt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,Z=Math.imul(Ae,Ue),G=Math.imul(Ae,He),G=G+Math.imul(ye,Ue)|0,re=Math.imul(ye,He),Z=Z+Math.imul(me,Ce)|0,G=G+Math.imul(me,ge)|0,G=G+Math.imul(Le,Ce)|0,re=re+Math.imul(Le,ge)|0,Z=Z+Math.imul(le,Te)|0,G=G+Math.imul(le,be)|0,G=G+Math.imul(de,Te)|0,re=re+Math.imul(de,be)|0,Z=Z+Math.imul(Y,Ve)|0,G=G+Math.imul(Y,je)|0,G=G+Math.imul(ie,Ve)|0,re=re+Math.imul(ie,je)|0,Z=Z+Math.imul(J,ut)|0,G=G+Math.imul(J,Nt)|0,G=G+Math.imul(ae,ut)|0,re=re+Math.imul(ae,Nt)|0;var nr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(nr>>>26)|0,nr&=67108863,Z=Math.imul(_e,Ue),G=Math.imul(_e,He),G=G+Math.imul(ze,Ue)|0,re=Math.imul(ze,He),Z=Z+Math.imul(Ae,Ce)|0,G=G+Math.imul(Ae,ge)|0,G=G+Math.imul(ye,Ce)|0,re=re+Math.imul(ye,ge)|0,Z=Z+Math.imul(me,Te)|0,G=G+Math.imul(me,be)|0,G=G+Math.imul(Le,Te)|0,re=re+Math.imul(Le,be)|0,Z=Z+Math.imul(le,Ve)|0,G=G+Math.imul(le,je)|0,G=G+Math.imul(de,Ve)|0,re=re+Math.imul(de,je)|0,Z=Z+Math.imul(Y,ut)|0,G=G+Math.imul(Y,Nt)|0,G=G+Math.imul(ie,ut)|0,re=re+Math.imul(ie,Nt)|0,Z=Z+Math.imul(J,gt)|0,G=G+Math.imul(J,Ct)|0,G=G+Math.imul(ae,gt)|0,re=re+Math.imul(ae,Ct)|0;var ar=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(ar>>>26)|0,ar&=67108863,Z=Math.imul(Ne,Ue),G=Math.imul(Ne,He),G=G+Math.imul(et,Ue)|0,re=Math.imul(et,He),Z=Z+Math.imul(_e,Ce)|0,G=G+Math.imul(_e,ge)|0,G=G+Math.imul(ze,Ce)|0,re=re+Math.imul(ze,ge)|0,Z=Z+Math.imul(Ae,Te)|0,G=G+Math.imul(Ae,be)|0,G=G+Math.imul(ye,Te)|0,re=re+Math.imul(ye,be)|0,Z=Z+Math.imul(me,Ve)|0,G=G+Math.imul(me,je)|0,G=G+Math.imul(Le,Ve)|0,re=re+Math.imul(Le,je)|0,Z=Z+Math.imul(le,ut)|0,G=G+Math.imul(le,Nt)|0,G=G+Math.imul(de,ut)|0,re=re+Math.imul(de,Nt)|0,Z=Z+Math.imul(Y,gt)|0,G=G+Math.imul(Y,Ct)|0,G=G+Math.imul(ie,gt)|0,re=re+Math.imul(ie,Ct)|0,Z=Z+Math.imul(J,gr)|0,G=G+Math.imul(J,ht)|0,G=G+Math.imul(ae,gr)|0,re=re+Math.imul(ae,ht)|0;var ir=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(ir>>>26)|0,ir&=67108863,Z=Math.imul(Ze,Ue),G=Math.imul(Ze,He),G=G+Math.imul(Ke,Ue)|0,re=Math.imul(Ke,He),Z=Z+Math.imul(Ne,Ce)|0,G=G+Math.imul(Ne,ge)|0,G=G+Math.imul(et,Ce)|0,re=re+Math.imul(et,ge)|0,Z=Z+Math.imul(_e,Te)|0,G=G+Math.imul(_e,be)|0,G=G+Math.imul(ze,Te)|0,re=re+Math.imul(ze,be)|0,Z=Z+Math.imul(Ae,Ve)|0,G=G+Math.imul(Ae,je)|0,G=G+Math.imul(ye,Ve)|0,re=re+Math.imul(ye,je)|0,Z=Z+Math.imul(me,ut)|0,G=G+Math.imul(me,Nt)|0,G=G+Math.imul(Le,ut)|0,re=re+Math.imul(Le,Nt)|0,Z=Z+Math.imul(le,gt)|0,G=G+Math.imul(le,Ct)|0,G=G+Math.imul(de,gt)|0,re=re+Math.imul(de,Ct)|0,Z=Z+Math.imul(Y,gr)|0,G=G+Math.imul(Y,ht)|0,G=G+Math.imul(ie,gr)|0,re=re+Math.imul(ie,ht)|0,Z=Z+Math.imul(J,Wt)|0,G=G+Math.imul(J,cr)|0,G=G+Math.imul(ae,Wt)|0,re=re+Math.imul(ae,cr)|0;var Be=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Be>>>26)|0,Be&=67108863,Z=Math.imul(it,Ue),G=Math.imul(it,He),G=G+Math.imul(lt,Ue)|0,re=Math.imul(lt,He),Z=Z+Math.imul(Ze,Ce)|0,G=G+Math.imul(Ze,ge)|0,G=G+Math.imul(Ke,Ce)|0,re=re+Math.imul(Ke,ge)|0,Z=Z+Math.imul(Ne,Te)|0,G=G+Math.imul(Ne,be)|0,G=G+Math.imul(et,Te)|0,re=re+Math.imul(et,be)|0,Z=Z+Math.imul(_e,Ve)|0,G=G+Math.imul(_e,je)|0,G=G+Math.imul(ze,Ve)|0,re=re+Math.imul(ze,je)|0,Z=Z+Math.imul(Ae,ut)|0,G=G+Math.imul(Ae,Nt)|0,G=G+Math.imul(ye,ut)|0,re=re+Math.imul(ye,Nt)|0,Z=Z+Math.imul(me,gt)|0,G=G+Math.imul(me,Ct)|0,G=G+Math.imul(Le,gt)|0,re=re+Math.imul(Le,Ct)|0,Z=Z+Math.imul(le,gr)|0,G=G+Math.imul(le,ht)|0,G=G+Math.imul(de,gr)|0,re=re+Math.imul(de,ht)|0,Z=Z+Math.imul(Y,Wt)|0,G=G+Math.imul(Y,cr)|0,G=G+Math.imul(ie,Wt)|0,re=re+Math.imul(ie,cr)|0,Z=Z+Math.imul(J,ct)|0,G=G+Math.imul(J,qe)|0,G=G+Math.imul(ae,ct)|0,re=re+Math.imul(ae,qe)|0;var Fe=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,Z=Math.imul(xt,Ue),G=Math.imul(xt,He),G=G+Math.imul(Je,Ue)|0,re=Math.imul(Je,He),Z=Z+Math.imul(it,Ce)|0,G=G+Math.imul(it,ge)|0,G=G+Math.imul(lt,Ce)|0,re=re+Math.imul(lt,ge)|0,Z=Z+Math.imul(Ze,Te)|0,G=G+Math.imul(Ze,be)|0,G=G+Math.imul(Ke,Te)|0,re=re+Math.imul(Ke,be)|0,Z=Z+Math.imul(Ne,Ve)|0,G=G+Math.imul(Ne,je)|0,G=G+Math.imul(et,Ve)|0,re=re+Math.imul(et,je)|0,Z=Z+Math.imul(_e,ut)|0,G=G+Math.imul(_e,Nt)|0,G=G+Math.imul(ze,ut)|0,re=re+Math.imul(ze,Nt)|0,Z=Z+Math.imul(Ae,gt)|0,G=G+Math.imul(Ae,Ct)|0,G=G+Math.imul(ye,gt)|0,re=re+Math.imul(ye,Ct)|0,Z=Z+Math.imul(me,gr)|0,G=G+Math.imul(me,ht)|0,G=G+Math.imul(Le,gr)|0,re=re+Math.imul(Le,ht)|0,Z=Z+Math.imul(le,Wt)|0,G=G+Math.imul(le,cr)|0,G=G+Math.imul(de,Wt)|0,re=re+Math.imul(de,cr)|0,Z=Z+Math.imul(Y,ct)|0,G=G+Math.imul(Y,qe)|0,G=G+Math.imul(ie,ct)|0,re=re+Math.imul(ie,qe)|0,Z=Z+Math.imul(J,bt)|0,G=G+Math.imul(J,Et)|0,G=G+Math.imul(ae,bt)|0,re=re+Math.imul(ae,Et)|0;var Rt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,Z=Math.imul(xt,Ce),G=Math.imul(xt,ge),G=G+Math.imul(Je,Ce)|0,re=Math.imul(Je,ge),Z=Z+Math.imul(it,Te)|0,G=G+Math.imul(it,be)|0,G=G+Math.imul(lt,Te)|0,re=re+Math.imul(lt,be)|0,Z=Z+Math.imul(Ze,Ve)|0,G=G+Math.imul(Ze,je)|0,G=G+Math.imul(Ke,Ve)|0,re=re+Math.imul(Ke,je)|0,Z=Z+Math.imul(Ne,ut)|0,G=G+Math.imul(Ne,Nt)|0,G=G+Math.imul(et,ut)|0,re=re+Math.imul(et,Nt)|0,Z=Z+Math.imul(_e,gt)|0,G=G+Math.imul(_e,Ct)|0,G=G+Math.imul(ze,gt)|0,re=re+Math.imul(ze,Ct)|0,Z=Z+Math.imul(Ae,gr)|0,G=G+Math.imul(Ae,ht)|0,G=G+Math.imul(ye,gr)|0,re=re+Math.imul(ye,ht)|0,Z=Z+Math.imul(me,Wt)|0,G=G+Math.imul(me,cr)|0,G=G+Math.imul(Le,Wt)|0,re=re+Math.imul(Le,cr)|0,Z=Z+Math.imul(le,ct)|0,G=G+Math.imul(le,qe)|0,G=G+Math.imul(de,ct)|0,re=re+Math.imul(de,qe)|0,Z=Z+Math.imul(Y,bt)|0,G=G+Math.imul(Y,Et)|0,G=G+Math.imul(ie,bt)|0,re=re+Math.imul(ie,Et)|0;var Lt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,Z=Math.imul(xt,Te),G=Math.imul(xt,be),G=G+Math.imul(Je,Te)|0,re=Math.imul(Je,be),Z=Z+Math.imul(it,Ve)|0,G=G+Math.imul(it,je)|0,G=G+Math.imul(lt,Ve)|0,re=re+Math.imul(lt,je)|0,Z=Z+Math.imul(Ze,ut)|0,G=G+Math.imul(Ze,Nt)|0,G=G+Math.imul(Ke,ut)|0,re=re+Math.imul(Ke,Nt)|0,Z=Z+Math.imul(Ne,gt)|0,G=G+Math.imul(Ne,Ct)|0,G=G+Math.imul(et,gt)|0,re=re+Math.imul(et,Ct)|0,Z=Z+Math.imul(_e,gr)|0,G=G+Math.imul(_e,ht)|0,G=G+Math.imul(ze,gr)|0,re=re+Math.imul(ze,ht)|0,Z=Z+Math.imul(Ae,Wt)|0,G=G+Math.imul(Ae,cr)|0,G=G+Math.imul(ye,Wt)|0,re=re+Math.imul(ye,cr)|0,Z=Z+Math.imul(me,ct)|0,G=G+Math.imul(me,qe)|0,G=G+Math.imul(Le,ct)|0,re=re+Math.imul(Le,qe)|0,Z=Z+Math.imul(le,bt)|0,G=G+Math.imul(le,Et)|0,G=G+Math.imul(de,bt)|0,re=re+Math.imul(de,Et)|0;var Ut=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,Z=Math.imul(xt,Ve),G=Math.imul(xt,je),G=G+Math.imul(Je,Ve)|0,re=Math.imul(Je,je),Z=Z+Math.imul(it,ut)|0,G=G+Math.imul(it,Nt)|0,G=G+Math.imul(lt,ut)|0,re=re+Math.imul(lt,Nt)|0,Z=Z+Math.imul(Ze,gt)|0,G=G+Math.imul(Ze,Ct)|0,G=G+Math.imul(Ke,gt)|0,re=re+Math.imul(Ke,Ct)|0,Z=Z+Math.imul(Ne,gr)|0,G=G+Math.imul(Ne,ht)|0,G=G+Math.imul(et,gr)|0,re=re+Math.imul(et,ht)|0,Z=Z+Math.imul(_e,Wt)|0,G=G+Math.imul(_e,cr)|0,G=G+Math.imul(ze,Wt)|0,re=re+Math.imul(ze,cr)|0,Z=Z+Math.imul(Ae,ct)|0,G=G+Math.imul(Ae,qe)|0,G=G+Math.imul(ye,ct)|0,re=re+Math.imul(ye,qe)|0,Z=Z+Math.imul(me,bt)|0,G=G+Math.imul(me,Et)|0,G=G+Math.imul(Le,bt)|0,re=re+Math.imul(Le,Et)|0;var Qt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,Z=Math.imul(xt,ut),G=Math.imul(xt,Nt),G=G+Math.imul(Je,ut)|0,re=Math.imul(Je,Nt),Z=Z+Math.imul(it,gt)|0,G=G+Math.imul(it,Ct)|0,G=G+Math.imul(lt,gt)|0,re=re+Math.imul(lt,Ct)|0,Z=Z+Math.imul(Ze,gr)|0,G=G+Math.imul(Ze,ht)|0,G=G+Math.imul(Ke,gr)|0,re=re+Math.imul(Ke,ht)|0,Z=Z+Math.imul(Ne,Wt)|0,G=G+Math.imul(Ne,cr)|0,G=G+Math.imul(et,Wt)|0,re=re+Math.imul(et,cr)|0,Z=Z+Math.imul(_e,ct)|0,G=G+Math.imul(_e,qe)|0,G=G+Math.imul(ze,ct)|0,re=re+Math.imul(ze,qe)|0,Z=Z+Math.imul(Ae,bt)|0,G=G+Math.imul(Ae,Et)|0,G=G+Math.imul(ye,bt)|0,re=re+Math.imul(ye,Et)|0;var rr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(rr>>>26)|0,rr&=67108863,Z=Math.imul(xt,gt),G=Math.imul(xt,Ct),G=G+Math.imul(Je,gt)|0,re=Math.imul(Je,Ct),Z=Z+Math.imul(it,gr)|0,G=G+Math.imul(it,ht)|0,G=G+Math.imul(lt,gr)|0,re=re+Math.imul(lt,ht)|0,Z=Z+Math.imul(Ze,Wt)|0,G=G+Math.imul(Ze,cr)|0,G=G+Math.imul(Ke,Wt)|0,re=re+Math.imul(Ke,cr)|0,Z=Z+Math.imul(Ne,ct)|0,G=G+Math.imul(Ne,qe)|0,G=G+Math.imul(et,ct)|0,re=re+Math.imul(et,qe)|0,Z=Z+Math.imul(_e,bt)|0,G=G+Math.imul(_e,Et)|0,G=G+Math.imul(ze,bt)|0,re=re+Math.imul(ze,Et)|0;var Kt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,Z=Math.imul(xt,gr),G=Math.imul(xt,ht),G=G+Math.imul(Je,gr)|0,re=Math.imul(Je,ht),Z=Z+Math.imul(it,Wt)|0,G=G+Math.imul(it,cr)|0,G=G+Math.imul(lt,Wt)|0,re=re+Math.imul(lt,cr)|0,Z=Z+Math.imul(Ze,ct)|0,G=G+Math.imul(Ze,qe)|0,G=G+Math.imul(Ke,ct)|0,re=re+Math.imul(Ke,qe)|0,Z=Z+Math.imul(Ne,bt)|0,G=G+Math.imul(Ne,Et)|0,G=G+Math.imul(et,bt)|0,re=re+Math.imul(et,Et)|0;var Dt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,Z=Math.imul(xt,Wt),G=Math.imul(xt,cr),G=G+Math.imul(Je,Wt)|0,re=Math.imul(Je,cr),Z=Z+Math.imul(it,ct)|0,G=G+Math.imul(it,qe)|0,G=G+Math.imul(lt,ct)|0,re=re+Math.imul(lt,qe)|0,Z=Z+Math.imul(Ze,bt)|0,G=G+Math.imul(Ze,Et)|0,G=G+Math.imul(Ke,bt)|0,re=re+Math.imul(Ke,Et)|0;var sr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(sr>>>26)|0,sr&=67108863,Z=Math.imul(xt,ct),G=Math.imul(xt,qe),G=G+Math.imul(Je,ct)|0,re=Math.imul(Je,qe),Z=Z+Math.imul(it,bt)|0,G=G+Math.imul(it,Et)|0,G=G+Math.imul(lt,bt)|0,re=re+Math.imul(lt,Et)|0;var fr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,Z=Math.imul(xt,bt),G=Math.imul(xt,Et),G=G+Math.imul(Je,bt)|0,re=Math.imul(Je,Et);var vr=(oe+Z|0)+((G&8191)<<13)|0;return oe=(re+(G>>>13)|0)+(vr>>>26)|0,vr&=67108863,q[0]=Mt,q[1]=_t,q[2]=It,q[3]=Gt,q[4]=nr,q[5]=ar,q[6]=ir,q[7]=Be,q[8]=Fe,q[9]=Rt,q[10]=Lt,q[11]=Ut,q[12]=Qt,q[13]=rr,q[14]=Kt,q[15]=Dt,q[16]=sr,q[17]=fr,q[18]=vr,oe!==0&&(q[19]=oe,V.length++),V};Math.imul||(E=b);function p(O,F,N){N.negative=F.negative^O.negative,N.length=O.length+F.length;for(var V=0,j=0,$=0;$<N.length-1;$++){var q=j;j=0;for(var oe=V&67108863,Z=Math.min($,F.length-1),G=Math.max(0,$-O.length+1);G<=Z;G++){var re=$-G,H=O.words[re]|0,J=F.words[G]|0,ae=H*J,K=ae&67108863;q=q+(ae/67108864|0)|0,K=K+oe|0,oe=K&67108863,q=q+(K>>>26)|0,j+=q>>>26,q&=67108863}N.words[$]=oe,V=q,q=j}return V!==0?N.words[$]=V:N.length--,N.strip()}function S(O,F,N){var V=new w;return V.mulp(O,F,N)}u.prototype.mulTo=function(F,N){var V,j=this.length+F.length;return this.length===10&&F.length===10?V=E(this,F,N):j<63?V=b(this,F,N):j<1024?V=p(this,F,N):V=S(this,F,N),V};function w(O,F){this.x=O,this.y=F}w.prototype.makeRBT=function(F){for(var N=new Array(F),V=u.prototype._countBits(F)-1,j=0;j<F;j++)N[j]=this.revBin(j,V,F);return N},w.prototype.revBin=function(F,N,V){if(F===0||F===V-1)return F;for(var j=0,$=0;$<N;$++)j|=(F&1)<<N-$-1,F>>=1;return j},w.prototype.permute=function(F,N,V,j,$,q){for(var oe=0;oe<q;oe++)j[oe]=N[F[oe]],$[oe]=V[F[oe]]},w.prototype.transform=function(F,N,V,j,$,q){this.permute(q,F,N,V,j,$);for(var oe=1;oe<$;oe<<=1)for(var Z=oe<<1,G=Math.cos(2*Math.PI/Z),re=Math.sin(2*Math.PI/Z),H=0;H<$;H+=Z)for(var J=G,ae=re,K=0;K<oe;K++){var Y=V[H+K],ie=j[H+K],ne=V[H+K+oe],le=j[H+K+oe],de=J*ne-ae*le;le=J*le+ae*ne,ne=de,V[H+K]=Y+ne,j[H+K]=ie+le,V[H+K+oe]=Y-ne,j[H+K+oe]=ie-le,K!==Z&&(de=G*J-re*ae,ae=G*ae+re*J,J=de)}},w.prototype.guessLen13b=function(F,N){var V=Math.max(N,F)|1,j=V&1,$=0;for(V=V/2|0;V;V=V>>>1)$++;return 1<<$+1+j},w.prototype.conjugate=function(F,N,V){if(!(V<=1))for(var j=0;j<V/2;j++){var $=F[j];F[j]=F[V-j-1],F[V-j-1]=$,$=N[j],N[j]=-N[V-j-1],N[V-j-1]=-$}},w.prototype.normalize13b=function(F,N){for(var V=0,j=0;j<N/2;j++){var $=Math.round(F[2*j+1]/N)*8192+Math.round(F[2*j]/N)+V;F[j]=$&67108863,$<67108864?V=0:V=$/67108864|0}return F},w.prototype.convert13b=function(F,N,V,j){for(var $=0,q=0;q<N;q++)$=$+(F[q]|0),V[2*q]=$&8191,$=$>>>13,V[2*q+1]=$&8191,$=$>>>13;for(q=2*N;q<j;++q)V[q]=0;a($===0),a(($&-8192)===0)},w.prototype.stub=function(F){for(var N=new Array(F),V=0;V<F;V++)N[V]=0;return N},w.prototype.mulp=function(F,N,V){var j=2*this.guessLen13b(F.length,N.length),$=this.makeRBT(j),q=this.stub(j),oe=new Array(j),Z=new Array(j),G=new Array(j),re=new Array(j),H=new Array(j),J=new Array(j),ae=V.words;ae.length=j,this.convert13b(F.words,F.length,oe,j),this.convert13b(N.words,N.length,re,j),this.transform(oe,q,Z,G,j,$),this.transform(re,q,H,J,j,$);for(var K=0;K<j;K++){var Y=Z[K]*H[K]-G[K]*J[K];G[K]=Z[K]*J[K]+G[K]*H[K],Z[K]=Y}return this.conjugate(Z,G,j),this.transform(Z,G,ae,q,j,$),this.conjugate(ae,q,j),this.normalize13b(ae,j),V.negative=F.negative^N.negative,V.length=F.length+N.length,V.strip()},u.prototype.mul=function(F){var N=new u(null);return N.words=new Array(this.length+F.length),this.mulTo(F,N)},u.prototype.mulf=function(F){var N=new u(null);return N.words=new Array(this.length+F.length),S(this,F,N)},u.prototype.imul=function(F){return this.clone().mulTo(F,this)},u.prototype.imuln=function(F){a(typeof F=="number"),a(F<67108864);for(var N=0,V=0;V<this.length;V++){var j=(this.words[V]|0)*F,$=(j&67108863)+(N&67108863);N>>=26,N+=j/67108864|0,N+=$>>>26,this.words[V]=$&67108863}return N!==0&&(this.words[V]=N,this.length++),this},u.prototype.muln=function(F){return this.clone().imuln(F)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(F){var N=m(F);if(N.length===0)return new u(1);for(var V=this,j=0;j<N.length&&N[j]===0;j++,V=V.sqr());if(++j<N.length)for(var $=V.sqr();j<N.length;j++,$=$.sqr())N[j]!==0&&(V=V.mul($));return V},u.prototype.iushln=function(F){a(typeof F=="number"&&F>=0);var N=F%26,V=(F-N)/26,j=67108863>>>26-N<<26-N,$;if(N!==0){var q=0;for($=0;$<this.length;$++){var oe=this.words[$]&j,Z=(this.words[$]|0)-oe<<N;this.words[$]=Z|q,q=oe>>>26-N}q&&(this.words[$]=q,this.length++)}if(V!==0){for($=this.length-1;$>=0;$--)this.words[$+V]=this.words[$];for($=0;$<V;$++)this.words[$]=0;this.length+=V}return this.strip()},u.prototype.ishln=function(F){return a(this.negative===0),this.iushln(F)},u.prototype.iushrn=function(F,N,V){a(typeof F=="number"&&F>=0);var j;N?j=(N-N%26)/26:j=0;var $=F%26,q=Math.min((F-$)/26,this.length),oe=67108863^67108863>>>$<<$,Z=V;if(j-=q,j=Math.max(0,j),Z){for(var G=0;G<q;G++)Z.words[G]=this.words[G];Z.length=q}if(q!==0)if(this.length>q)for(this.length-=q,G=0;G<this.length;G++)this.words[G]=this.words[G+q];else this.words[0]=0,this.length=1;var re=0;for(G=this.length-1;G>=0&&(re!==0||G>=j);G--){var H=this.words[G]|0;this.words[G]=re<<26-$|H>>>$,re=H&oe}return Z&&re!==0&&(Z.words[Z.length++]=re),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(F,N,V){return a(this.negative===0),this.iushrn(F,N,V)},u.prototype.shln=function(F){return this.clone().ishln(F)},u.prototype.ushln=function(F){return this.clone().iushln(F)},u.prototype.shrn=function(F){return this.clone().ishrn(F)},u.prototype.ushrn=function(F){return this.clone().iushrn(F)},u.prototype.testn=function(F){a(typeof F=="number"&&F>=0);var N=F%26,V=(F-N)/26,j=1<<N;if(this.length<=V)return!1;var $=this.words[V];return!!($&j)},u.prototype.imaskn=function(F){a(typeof F=="number"&&F>=0);var N=F%26,V=(F-N)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=V)return this;if(N!==0&&V++,this.length=Math.min(V,this.length),N!==0){var j=67108863^67108863>>>N<<N;this.words[this.length-1]&=j}return this.strip()},u.prototype.maskn=function(F){return this.clone().imaskn(F)},u.prototype.iaddn=function(F){return a(typeof F=="number"),a(F<67108864),F<0?this.isubn(-F):this.negative!==0?this.length===1&&(this.words[0]|0)<F?(this.words[0]=F-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(F),this.negative=1,this):this._iaddn(F)},u.prototype._iaddn=function(F){this.words[0]+=F;for(var N=0;N<this.length&&this.words[N]>=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},u.prototype.isubn=function(F){if(a(typeof F=="number"),a(F<67108864),F<0)return this.iaddn(-F);if(this.negative!==0)return this.negative=0,this.iaddn(F),this.negative=1,this;if(this.words[0]-=F,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N<this.length&&this.words[N]<0;N++)this.words[N]+=67108864,this.words[N+1]-=1;return this.strip()},u.prototype.addn=function(F){return this.clone().iaddn(F)},u.prototype.subn=function(F){return this.clone().isubn(F)},u.prototype.iabs=function(){return this.negative=0,this},u.prototype.abs=function(){return this.clone().iabs()},u.prototype._ishlnsubmul=function(F,N,V){var j=F.length+V,$;this._expand(j);var q,oe=0;for($=0;$<F.length;$++){q=(this.words[$+V]|0)+oe;var Z=(F.words[$]|0)*N;q-=Z&67108863,oe=(q>>26)-(Z/67108864|0),this.words[$+V]=q&67108863}for(;$<this.length-V;$++)q=(this.words[$+V]|0)+oe,oe=q>>26,this.words[$+V]=q&67108863;if(oe===0)return this.strip();for(a(oe===-1),oe=0,$=0;$<this.length;$++)q=-(this.words[$]|0)+oe,oe=q>>26,this.words[$]=q&67108863;return this.negative=1,this.strip()},u.prototype._wordDiv=function(F,N){var V=this.length-F.length,j=this.clone(),$=F,q=$.words[$.length-1]|0,oe=this._countBits(q);V=26-oe,V!==0&&($=$.ushln(V),j.iushln(V),q=$.words[$.length-1]|0);var Z=j.length-$.length,G;if(N!=="mod"){G=new u(null),G.length=Z+1,G.words=new Array(G.length);for(var re=0;re<G.length;re++)G.words[re]=0}var H=j.clone()._ishlnsubmul($,1,Z);H.negative===0&&(j=H,G&&(G.words[Z]=1));for(var J=Z-1;J>=0;J--){var ae=(j.words[$.length+J]|0)*67108864+(j.words[$.length+J-1]|0);for(ae=Math.min(ae/q|0,67108863),j._ishlnsubmul($,ae,J);j.negative!==0;)ae--,j.negative=0,j._ishlnsubmul($,1,J),j.isZero()||(j.negative^=1);G&&(G.words[J]=ae)}return G&&G.strip(),j.strip(),N!=="div"&&V!==0&&j.iushrn(V),{div:G||null,mod:j}},u.prototype.divmod=function(F,N,V){if(a(!F.isZero()),this.isZero())return{div:new u(0),mod:new u(0)};var j,$,q;return this.negative!==0&&F.negative===0?(q=this.neg().divmod(F,N),N!=="mod"&&(j=q.div.neg()),N!=="div"&&($=q.mod.neg(),V&&$.negative!==0&&$.iadd(F)),{div:j,mod:$}):this.negative===0&&F.negative!==0?(q=this.divmod(F.neg(),N),N!=="mod"&&(j=q.div.neg()),{div:j,mod:q.mod}):this.negative&F.negative?(q=this.neg().divmod(F.neg(),N),N!=="div"&&($=q.mod.neg(),V&&$.negative!==0&&$.isub(F)),{div:q.div,mod:$}):F.length>this.length||this.cmp(F)<0?{div:new u(0),mod:this}:F.length===1?N==="div"?{div:this.divn(F.words[0]),mod:null}:N==="mod"?{div:null,mod:new u(this.modn(F.words[0]))}:{div:this.divn(F.words[0]),mod:new u(this.modn(F.words[0]))}:this._wordDiv(F,N)},u.prototype.div=function(F){return this.divmod(F,"div",!1).div},u.prototype.mod=function(F){return this.divmod(F,"mod",!1).mod},u.prototype.umod=function(F){return this.divmod(F,"mod",!0).mod},u.prototype.divRound=function(F){var N=this.divmod(F);if(N.mod.isZero())return N.div;var V=N.div.negative!==0?N.mod.isub(F):N.mod,j=F.ushrn(1),$=F.andln(1),q=V.cmp(j);return q<0||$===1&&q===0?N.div:N.div.negative!==0?N.div.isubn(1):N.div.iaddn(1)},u.prototype.modn=function(F){a(F<=67108863);for(var N=(1<<26)%F,V=0,j=this.length-1;j>=0;j--)V=(N*V+(this.words[j]|0))%F;return V},u.prototype.idivn=function(F){a(F<=67108863);for(var N=0,V=this.length-1;V>=0;V--){var j=(this.words[V]|0)+N*67108864;this.words[V]=j/F|0,N=j%F}return this.strip()},u.prototype.divn=function(F){return this.clone().idivn(F)},u.prototype.egcd=function(F){a(F.negative===0),a(!F.isZero());var N=this,V=F.clone();N.negative!==0?N=N.umod(F):N=N.clone();for(var j=new u(1),$=new u(0),q=new u(0),oe=new u(1),Z=0;N.isEven()&&V.isEven();)N.iushrn(1),V.iushrn(1),++Z;for(var G=V.clone(),re=N.clone();!N.isZero();){for(var H=0,J=1;!(N.words[0]&J)&&H<26;++H,J<<=1);if(H>0)for(N.iushrn(H);H-- >0;)(j.isOdd()||$.isOdd())&&(j.iadd(G),$.isub(re)),j.iushrn(1),$.iushrn(1);for(var ae=0,K=1;!(V.words[0]&K)&&ae<26;++ae,K<<=1);if(ae>0)for(V.iushrn(ae);ae-- >0;)(q.isOdd()||oe.isOdd())&&(q.iadd(G),oe.isub(re)),q.iushrn(1),oe.iushrn(1);N.cmp(V)>=0?(N.isub(V),j.isub(q),$.isub(oe)):(V.isub(N),q.isub(j),oe.isub($))}return{a:q,b:oe,gcd:V.iushln(Z)}},u.prototype._invmp=function(F){a(F.negative===0),a(!F.isZero());var N=this,V=F.clone();N.negative!==0?N=N.umod(F):N=N.clone();for(var j=new u(1),$=new u(0),q=V.clone();N.cmpn(1)>0&&V.cmpn(1)>0;){for(var oe=0,Z=1;!(N.words[0]&Z)&&oe<26;++oe,Z<<=1);if(oe>0)for(N.iushrn(oe);oe-- >0;)j.isOdd()&&j.iadd(q),j.iushrn(1);for(var G=0,re=1;!(V.words[0]&re)&&G<26;++G,re<<=1);if(G>0)for(V.iushrn(G);G-- >0;)$.isOdd()&&$.iadd(q),$.iushrn(1);N.cmp(V)>=0?(N.isub(V),j.isub($)):(V.isub(N),$.isub(j))}var H;return N.cmpn(1)===0?H=j:H=$,H.cmpn(0)<0&&H.iadd(F),H},u.prototype.gcd=function(F){if(this.isZero())return F.abs();if(F.isZero())return this.abs();var N=this.clone(),V=F.clone();N.negative=0,V.negative=0;for(var j=0;N.isEven()&&V.isEven();j++)N.iushrn(1),V.iushrn(1);do{for(;N.isEven();)N.iushrn(1);for(;V.isEven();)V.iushrn(1);var $=N.cmp(V);if($<0){var q=N;N=V,V=q}else if($===0||V.cmpn(1)===0)break;N.isub(V)}while(!0);return V.iushln(j)},u.prototype.invm=function(F){return this.egcd(F).a.umod(F)},u.prototype.isEven=function(){return(this.words[0]&1)===0},u.prototype.isOdd=function(){return(this.words[0]&1)===1},u.prototype.andln=function(F){return this.words[0]&F},u.prototype.bincn=function(F){a(typeof F=="number");var N=F%26,V=(F-N)/26,j=1<<N;if(this.length<=V)return this._expand(V+1),this.words[V]|=j,this;for(var $=j,q=V;$!==0&&q<this.length;q++){var oe=this.words[q]|0;oe+=$,$=oe>>>26,oe&=67108863,this.words[q]=oe}return $!==0&&(this.words[q]=$,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(F){var N=F<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;this.strip();var V;if(this.length>1)V=1;else{N&&(F=-F),a(F<=67108863,"Number is too big");var j=this.words[0]|0;V=j===F?0:j<F?-1:1}return this.negative!==0?-V|0:V},u.prototype.cmp=function(F){if(this.negative!==0&&F.negative===0)return-1;if(this.negative===0&&F.negative!==0)return 1;var N=this.ucmp(F);return this.negative!==0?-N|0:N},u.prototype.ucmp=function(F){if(this.length>F.length)return 1;if(this.length<F.length)return-1;for(var N=0,V=this.length-1;V>=0;V--){var j=this.words[V]|0,$=F.words[V]|0;if(j!==$){j<$?N=-1:j>$&&(N=1);break}}return N},u.prototype.gtn=function(F){return this.cmpn(F)===1},u.prototype.gt=function(F){return this.cmp(F)===1},u.prototype.gten=function(F){return this.cmpn(F)>=0},u.prototype.gte=function(F){return this.cmp(F)>=0},u.prototype.ltn=function(F){return this.cmpn(F)===-1},u.prototype.lt=function(F){return this.cmp(F)===-1},u.prototype.lten=function(F){return this.cmpn(F)<=0},u.prototype.lte=function(F){return this.cmp(F)<=0},u.prototype.eqn=function(F){return this.cmpn(F)===0},u.prototype.eq=function(F){return this.cmp(F)===0},u.red=function(F){return new _(F)},u.prototype.toRed=function(F){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),F.convertTo(this)._forceRed(F)},u.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(F){return this.red=F,this},u.prototype.forceRed=function(F){return a(!this.red,"Already a number in reduction context"),this._forceRed(F)},u.prototype.redAdd=function(F){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,F)},u.prototype.redIAdd=function(F){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,F)},u.prototype.redSub=function(F){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,F)},u.prototype.redISub=function(F){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,F)},u.prototype.redShl=function(F){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,F)},u.prototype.redMul=function(F){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.mul(this,F)},u.prototype.redIMul=function(F){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.imul(this,F)},u.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(F){return a(this.red&&!F.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,F)};var i={k256:null,p224:null,p192:null,p25519:null};function C(O,F){this.name=O,this.p=new u(F,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var F=new u(null);return F.words=new Array(Math.ceil(this.n/13)),F},C.prototype.ireduce=function(F){var N=F,V;do this.split(N,this.tmp),N=this.imulK(N),N=N.iadd(this.tmp),V=N.bitLength();while(V>this.n);var j=V<this.n?-1:N.ucmp(this.p);return j===0?(N.words[0]=0,N.length=1):j>0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},C.prototype.split=function(F,N){F.iushrn(this.n,0,N)},C.prototype.imulK=function(F){return F.imul(this.k)};function x(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(x,C),x.prototype.split=function(F,N){for(var V=4194303,j=Math.min(F.length,9),$=0;$<j;$++)N.words[$]=F.words[$];if(N.length=j,F.length<=9){F.words[0]=0,F.length=1;return}var q=F.words[9];for(N.words[N.length++]=q&V,$=10;$<F.length;$++){var oe=F.words[$]|0;F.words[$-10]=(oe&V)<<4|q>>>22,q=oe}q>>>=22,F.words[$-10]=q,q===0&&F.length>10?F.length-=10:F.length-=9},x.prototype.imulK=function(F){F.words[F.length]=0,F.words[F.length+1]=0,F.length+=2;for(var N=0,V=0;V<F.length;V++){var j=F.words[V]|0;N+=j*977,F.words[V]=N&67108863,N=j*64+(N/67108864|0)}return F.words[F.length-1]===0&&(F.length--,F.words[F.length-1]===0&&F.length--),F};function k(){C.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}c(k,C);function I(){C.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}c(I,C);function B(){C.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}c(B,C),B.prototype.imulK=function(F){for(var N=0,V=0;V<F.length;V++){var j=(F.words[V]|0)*19+N,$=j&67108863;j>>>=26,F.words[V]=$,N=j}return N!==0&&(F.words[F.length++]=N),F},u._prime=function(F){if(i[F])return i[F];var N;if(F==="k256")N=new x;else if(F==="p224")N=new k;else if(F==="p192")N=new I;else if(F==="p25519")N=new B;else throw new Error("Unknown prime "+F);return i[F]=N,N};function _(O){if(typeof O=="string"){var F=u._prime(O);this.m=F.p,this.prime=F}else a(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}_.prototype._verify1=function(F){a(F.negative===0,"red works only with positives"),a(F.red,"red works only with red numbers")},_.prototype._verify2=function(F,N){a((F.negative|N.negative)===0,"red works only with positives"),a(F.red&&F.red===N.red,"red works only with red numbers")},_.prototype.imod=function(F){return this.prime?this.prime.ireduce(F)._forceRed(this):F.umod(this.m)._forceRed(this)},_.prototype.neg=function(F){return F.isZero()?F.clone():this.m.sub(F)._forceRed(this)},_.prototype.add=function(F,N){this._verify2(F,N);var V=F.add(N);return V.cmp(this.m)>=0&&V.isub(this.m),V._forceRed(this)},_.prototype.iadd=function(F,N){this._verify2(F,N);var V=F.iadd(N);return V.cmp(this.m)>=0&&V.isub(this.m),V},_.prototype.sub=function(F,N){this._verify2(F,N);var V=F.sub(N);return V.cmpn(0)<0&&V.iadd(this.m),V._forceRed(this)},_.prototype.isub=function(F,N){this._verify2(F,N);var V=F.isub(N);return V.cmpn(0)<0&&V.iadd(this.m),V},_.prototype.shl=function(F,N){return this._verify1(F),this.imod(F.ushln(N))},_.prototype.imul=function(F,N){return this._verify2(F,N),this.imod(F.imul(N))},_.prototype.mul=function(F,N){return this._verify2(F,N),this.imod(F.mul(N))},_.prototype.isqr=function(F){return this.imul(F,F.clone())},_.prototype.sqr=function(F){return this.mul(F,F)},_.prototype.sqrt=function(F){if(F.isZero())return F.clone();var N=this.m.andln(3);if(a(N%2===1),N===3){var V=this.m.add(new u(1)).iushrn(2);return this.pow(F,V)}for(var j=this.m.subn(1),$=0;!j.isZero()&&j.andln(1)===0;)$++,j.iushrn(1);a(!j.isZero());var q=new u(1).toRed(this),oe=q.redNeg(),Z=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new u(2*G*G).toRed(this);this.pow(G,Z).cmp(oe)!==0;)G.redIAdd(oe);for(var re=this.pow(G,j),H=this.pow(F,j.addn(1).iushrn(1)),J=this.pow(F,j),ae=$;J.cmp(q)!==0;){for(var K=J,Y=0;K.cmp(q)!==0;Y++)K=K.redSqr();a(Y<ae);var ie=this.pow(re,new u(1).iushln(ae-Y-1));H=H.redMul(ie),re=ie.redSqr(),J=J.redMul(re),ae=Y}return H},_.prototype.invm=function(F){var N=F._invmp(this.m);return N.negative!==0?(N.negative=0,this.imod(N).redNeg()):this.imod(N)},_.prototype.pow=function(F,N){if(N.isZero())return new u(1).toRed(this);if(N.cmpn(1)===0)return F.clone();var V=4,j=new Array(1<<V);j[0]=new u(1).toRed(this),j[1]=F;for(var $=2;$<j.length;$++)j[$]=this.mul(j[$-1],F);var q=j[0],oe=0,Z=0,G=N.bitLength()%26;for(G===0&&(G=26),$=N.length-1;$>=0;$--){for(var re=N.words[$],H=G-1;H>=0;H--){var J=re>>H&1;if(q!==j[0]&&(q=this.sqr(q)),J===0&&oe===0){Z=0;continue}oe<<=1,oe|=J,Z++,!(Z!==V&&($!==0||H!==0))&&(q=this.mul(q,j[oe]),Z=0,oe=0)}G=26}return q},_.prototype.convertTo=function(F){var N=F.umod(this.m);return N===F?N.clone():N},_.prototype.convertFrom=function(F){var N=F.clone();return N.red=null,N},u.mont=function(F){return new z(F)};function z(O){_.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new u(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)}c(z,_),z.prototype.convertTo=function(F){return this.imod(F.ushln(this.shift))},z.prototype.convertFrom=function(F){var N=this.imod(F.mul(this.rinv));return N.red=null,N},z.prototype.imul=function(F,N){if(F.isZero()||N.isZero())return F.words[0]=0,F.length=1,F;var V=F.imul(N),j=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=V.isub(j).iushrn(this.shift),q=$;return $.cmp(this.m)>=0?q=$.isub(this.m):$.cmpn(0)<0&&(q=$.iadd(this.m)),q._forceRed(this)},z.prototype.mul=function(F,N){if(F.isZero()||N.isZero())return new u(0)._forceRed(this);var V=F.mul(N),j=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=V.isub(j).iushrn(this.shift),q=$;return $.cmp(this.m)>=0?q=$.isub(this.m):$.cmpn(0)<0&&(q=$.iadd(this.m)),q._forceRed(this)},z.prototype.invm=function(F){var N=this.imod(F._invmp(this.m).mul(this.r2));return N._forceRed(this)}}(d,this)},2692:function(d){d.exports=g;function g(r){var t,s,a,c=r.length,u=0;for(t=0;t<c;++t)u+=r[t].length;var l=new Array(u),y=0;for(t=0;t<c;++t){var h=r[t],T=h.length;for(s=0;s<T;++s){var f=l[y++]=new Array(T-1),n=0;for(a=0;a<T;++a)a!==s&&(f[n++]=h[a]);if(s&1){var v=f[1];f[1]=f[0],f[0]=v}}}return l}},2569:function(d,g,r){d.exports=n;var t=r(5306),s=r(1390),a=r(2337);function c(v,m){for(var b=0;b<v;++b)if(!(m[b]<=m[b+v]))return!0;return!1}function u(v,m,b,E){for(var p=0,S=0,w=0,i=v.length;w<i;++w){var C=v[w];if(!c(m,C)){for(var x=0;x<2*m;++x)b[p++]=C[x];E[S++]=w}}return S}function l(v,m,b,E){var p=v.length,S=m.length;if(!(p<=0||S<=0)){var w=v[0].length>>>1;if(!(w<=0)){var i,C=t.mallocDouble(2*w*p),x=t.mallocInt32(p);if(p=u(v,w,C,x),p>0){if(w===1&&E)s.init(p),i=s.sweepComplete(w,b,0,p,C,x,0,p,C,x);else{var k=t.mallocDouble(2*w*S),I=t.mallocInt32(S);S=u(m,w,k,I),S>0&&(s.init(p+S),w===1?i=s.sweepBipartite(w,b,0,p,C,x,0,S,k,I):i=a(w,b,E,p,C,x,S,k,I),t.free(k),t.free(I))}t.free(C),t.free(x)}return i}}}var y;function h(v,m){y.push([v,m])}function T(v){return y=[],l(v,v,h,!0),y}function f(v,m){return y=[],l(v,m,h,!1),y}function n(v,m,b){switch(arguments.length){case 1:return T(v);case 2:return typeof m=="function"?l(v,v,m,!0):f(v,m);case 3:return l(v,m,b,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(d,g){function r(){function a(l,y,h,T,f,n,v,m,b,E,p){for(var S=2*l,w=T,i=S*T;w<f;++w,i+=S){var C=n[y+i],x=n[y+i+l],k=v[w];e:for(var I=m,B=S*m;I<b;++I,B+=S){var _=E[y+B],z=E[y+B+l],O=p[I];if(!(z<C||x<_)){for(var F=y+1;F<l;++F){var N=n[F+i],V=n[F+l+i],j=E[F+B],$=E[F+l+B];if(V<j||$<N)continue e}var q=h(k,O);if(q!==void 0)return q}}}}function c(l,y,h,T,f,n,v,m,b,E,p){for(var S=2*l,w=m,i=S*m;w<b;++w,i+=S){var C=E[y+i],x=E[y+i+l],k=p[w];e:for(var I=T,B=S*T;I<f;++I,B+=S){var _=n[y+B],z=n[y+B+l],O=v[I];if(!(x<_||z<C)){for(var F=y+1;F<l;++F){var N=n[F+B],V=n[F+l+B],j=E[F+i],$=E[F+l+i];if(V<j||$<N)continue e}var q=h(O,k);if(q!==void 0)return q}}}}function u(l,y,h,T,f,n,v,m,b,E,p){return f-T>b-m?a(l,y,h,T,f,n,v,m,b,E,p):c(l,y,h,T,f,n,v,m,b,E,p)}return u}function t(){function a(h,T,f,n,v,m,b,E,p,S,w){for(var i=2*h,C=n,x=i*n;C<v;++C,x+=i){var k=m[T+x],I=m[T+x+h],B=b[C];e:for(var _=E,z=i*E;_<p;++_,z+=i){var O=S[T+z],F=w[_];if(!(O<=k||I<O)){for(var N=T+1;N<h;++N){var V=m[N+x],j=m[N+h+x],$=S[N+z],q=S[N+h+z];if(j<$||q<V)continue e}var oe=f(F,B);if(oe!==void 0)return oe}}}}function c(h,T,f,n,v,m,b,E,p,S,w){for(var i=2*h,C=n,x=i*n;C<v;++C,x+=i){var k=m[T+x],I=m[T+x+h],B=b[C];e:for(var _=E,z=i*E;_<p;++_,z+=i){var O=S[T+z],F=w[_];if(!(O<k||I<O)){for(var N=T+1;N<h;++N){var V=m[N+x],j=m[N+h+x],$=S[N+z],q=S[N+h+z];if(j<$||q<V)continue e}var oe=f(B,F);if(oe!==void 0)return oe}}}}function u(h,T,f,n,v,m,b,E,p,S,w){for(var i=2*h,C=E,x=i*E;C<p;++C,x+=i){var k=S[T+x],I=w[C];e:for(var B=n,_=i*n;B<v;++B,_+=i){var z=m[T+_],O=m[T+_+h],F=b[B];if(!(k<=z||O<k)){for(var N=T+1;N<h;++N){var V=m[N+_],j=m[N+h+_],$=S[N+x],q=S[N+h+x];if(j<$||q<V)continue e}var oe=f(I,F);if(oe!==void 0)return oe}}}}function l(h,T,f,n,v,m,b,E,p,S,w){for(var i=2*h,C=E,x=i*E;C<p;++C,x+=i){var k=S[T+x],I=w[C];e:for(var B=n,_=i*n;B<v;++B,_+=i){var z=m[T+_],O=m[T+_+h],F=b[B];if(!(k<z||O<k)){for(var N=T+1;N<h;++N){var V=m[N+_],j=m[N+h+_],$=S[N+x],q=S[N+h+x];if(j<$||q<V)continue e}var oe=f(F,I);if(oe!==void 0)return oe}}}}function y(h,T,f,n,v,m,b,E,p,S,w,i){return m-v>S-p?n?a(h,T,f,v,m,b,E,p,S,w,i):c(h,T,f,v,m,b,E,p,S,w,i):n?u(h,T,f,v,m,b,E,p,S,w,i):l(h,T,f,v,m,b,E,p,S,w,i)}return y}function s(a){return a?r():t()}g.partial=s(!1),g.full=s(!0)},2337:function(d,g,r){d.exports=O;var t=r(5306),s=r(2288),a=r(7333),c=a.partial,u=a.full,l=r(1390),y=r(2464),h=r(122),T=128,f=1<<22,n=1<<22,v=h("!(lo>=p0)&&!(p1>=hi)"),m=h("lo===p0"),b=h("lo<p0"),E=h("hi<=p0"),p=h("lo<=p0&&p0<=hi"),S=h("lo<p0&&p0<=hi"),w=6,i=2,C=1024,x=t.mallocInt32(C),k=t.mallocDouble(C);function I(F,N){var V=8*s.log2(N+1)*(F+1)|0,j=s.nextPow2(w*V);x.length<j&&(t.free(x),x=t.mallocInt32(j));var $=s.nextPow2(i*V);k.length<$&&(t.free(k),k=t.mallocDouble($))}function B(F,N,V,j,$,q,oe,Z,G){var re=w*F;x[re]=N,x[re+1]=V,x[re+2]=j,x[re+3]=$,x[re+4]=q,x[re+5]=oe;var H=i*F;k[H]=Z,k[H+1]=G}function _(F,N,V,j,$,q,oe,Z,G,re,H){var J=2*F,ae=G*J,K=re[ae+N];e:for(var Y=$,ie=$*J;Y<q;++Y,ie+=J){var ne=oe[ie+N],le=oe[ie+N+F];if(!(K<ne||le<K)&&!(j&&K===ne)){for(var de=Z[Y],we=N+1;we<F;++we){var ne=oe[ie+we],le=oe[ie+we+F],me=re[ae+we],Le=re[ae+we+F];if(le<me||Le<ne)continue e}var ve;if(j?ve=V(H,de):ve=V(de,H),ve!==void 0)return ve}}}function z(F,N,V,j,$,q,oe,Z,G,re){var H=2*F,J=Z*H,ae=G[J+N];e:for(var K=j,Y=j*H;K<$;++K,Y+=H){var ie=oe[K];if(ie!==re){var ne=q[Y+N],le=q[Y+N+F];if(!(ae<ne||le<ae)){for(var de=N+1;de<F;++de){var ne=q[Y+de],le=q[Y+de+F],we=G[J+de],me=G[J+de+F];if(le<we||me<ne)continue e}var Le=V(ie,re);if(Le!==void 0)return Le}}}}function O(F,N,V,j,$,q,oe,Z,G){I(F,j+oe);var re=0,H=2*F,J;for(B(re++,0,0,j,0,oe,V?16:0,-1/0,1/0),V||B(re++,0,0,oe,0,j,1,-1/0,1/0);re>0;){re-=1;var ae=re*w,K=x[ae],Y=x[ae+1],ie=x[ae+2],ne=x[ae+3],le=x[ae+4],de=x[ae+5],we=re*i,me=k[we],Le=k[we+1],ve=de&1,Ae=!!(de&16),ye=$,Se=q,_e=Z,ze=G;if(ve&&(ye=Z,Se=G,_e=$,ze=q),!(de&2&&(ie=b(F,K,Y,ie,ye,Se,Le),Y>=ie))&&!(de&4&&(Y=E(F,K,Y,ie,ye,Se,me),Y>=ie))){var Ie=ie-Y,Ne=le-ne;if(Ae){if(F*Ie*(Ie+Ne)<n){if(J=l.scanComplete(F,K,N,Y,ie,ye,Se,ne,le,_e,ze),J!==void 0)return J;continue}}else if(F*Math.min(Ie,Ne)<T){if(J=c(F,K,N,ve,Y,ie,ye,Se,ne,le,_e,ze),J!==void 0)return J;continue}else if(F*Ie*Ne<f){if(J=l.scanBipartite(F,K,N,ve,Y,ie,ye,Se,ne,le,_e,ze),J!==void 0)return J;continue}var et=v(F,K,Y,ie,ye,Se,me,Le);if(Y<et)if(F*(et-Y)<T){if(J=u(F,K+1,N,Y,et,ye,Se,ne,le,_e,ze),J!==void 0)return J}else if(K===F-2){if(ve?J=l.sweepBipartite(F,N,ne,le,_e,ze,Y,et,ye,Se):J=l.sweepBipartite(F,N,Y,et,ye,Se,ne,le,_e,ze),J!==void 0)return J}else B(re++,K+1,Y,et,ne,le,ve,-1/0,1/0),B(re++,K+1,ne,le,Y,et,ve^1,-1/0,1/0);if(et<ie){var st=y(F,K,ne,le,_e,ze),Ze=_e[H*st+K],Ke=m(F,K,st,le,_e,ze,Ze);if(Ke<le&&B(re++,K,et,ie,Ke,le,(ve|4)+(Ae?16:0),Ze,Le),ne<st&&B(re++,K,et,ie,ne,st,(ve|2)+(Ae?16:0),me,Ze),st+1===Ke){if(Ae?J=z(F,K,N,et,ie,ye,Se,st,_e,ze[st]):J=_(F,K,N,ve,et,ie,ye,Se,st,_e,ze[st]),J!==void 0)return J}else if(st<Ke){var nt;if(Ae){if(nt=p(F,K,et,ie,ye,Se,Ze),et<nt){var it=m(F,K,et,nt,ye,Se,Ze);if(K===F-2){if(et<it&&(J=l.sweepComplete(F,N,et,it,ye,Se,st,Ke,_e,ze),J!==void 0)||it<nt&&(J=l.sweepBipartite(F,N,it,nt,ye,Se,st,Ke,_e,ze),J!==void 0))return J}else et<it&&B(re++,K+1,et,it,st,Ke,16,-1/0,1/0),it<nt&&(B(re++,K+1,it,nt,st,Ke,0,-1/0,1/0),B(re++,K+1,st,Ke,it,nt,1,-1/0,1/0))}}else ve?nt=S(F,K,et,ie,ye,Se,Ze):nt=p(F,K,et,ie,ye,Se,Ze),et<nt&&(K===F-2?ve?J=l.sweepBipartite(F,N,st,Ke,_e,ze,et,nt,ye,Se):J=l.sweepBipartite(F,N,et,nt,ye,Se,st,Ke,_e,ze):(B(re++,K+1,et,nt,st,Ke,ve,-1/0,1/0),B(re++,K+1,st,Ke,et,nt,ve^1,-1/0,1/0)))}}}}}},2464:function(d,g,r){d.exports=u;var t=r(122),s=t("lo<p0"),a=8;function c(l,y,h,T,f,n){for(var v=2*l,m=v*(h+1)+y,b=h+1;b<T;++b,m+=v)for(var E=f[m],p=b,S=v*(b-1);p>h&&f[S+y]>E;--p,S-=v){for(var w=S,i=S+v,C=0;C<v;++C,++w,++i){var x=f[w];f[w]=f[i],f[i]=x}var k=n[p];n[p]=n[p-1],n[p-1]=k}}function u(l,y,h,T,f,n){if(T<=h+1)return h;for(var v=h,m=T,b=T+h>>>1,E=2*l,p=b,S=f[E*b+y];v<m;){if(m-v<a){c(l,y,v,m,f,n),S=f[E*b+y];break}var w=m-v,i=Math.random()*w+v|0,C=f[E*i+y],x=Math.random()*w+v|0,k=f[E*x+y],I=Math.random()*w+v|0,B=f[E*I+y];C<=k?B>=k?(p=x,S=k):C>=B?(p=i,S=C):(p=I,S=B):k>=B?(p=x,S=k):B>=C?(p=i,S=C):(p=I,S=B);for(var O=E*(m-1),F=E*p,_=0;_<E;++_,++O,++F){var z=f[O];f[O]=f[F],f[F]=z}var N=n[m-1];n[m-1]=n[p],n[p]=N,p=s(l,y,v,m-1,f,n,S);for(var O=E*(m-1),F=E*p,_=0;_<E;++_,++O,++F){var z=f[O];f[O]=f[F],f[F]=z}var N=n[m-1];if(n[m-1]=n[p],n[p]=N,b<p){for(m=p-1;v<m&&f[E*(m-1)+y]===S;)m-=1;m+=1}else if(p<b)for(v=p+1;v<m&&f[E*v+y]===S;)v+=1;else break}return s(l,y,h,b,f,n,f[E*b+y])}},122:function(d){d.exports=r;var g={"lo===p0":t,"lo<p0":s,"lo<=p0":a,"hi<=p0":c,"lo<p0&&p0<=hi":l,"lo<=p0&&p0<=hi":u,"!(lo>=p0)&&!(p1>=hi)":y};function r(h){return g[h]}function t(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i];if(k===b)if(w===x)w+=1,S+=E;else{for(var I=0;E>I;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function s(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i];if(k<b)if(w===x)w+=1,S+=E;else{for(var I=0;E>I;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function a(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+C];if(k<=b)if(w===x)w+=1,S+=E;else{for(var I=0;E>I;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function c(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+C];if(k<=b)if(w===x)w+=1,S+=E;else{for(var I=0;E>I;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function u(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i],I=v[p+C];if(k<=b&&b<=I)if(w===x)w+=1,S+=E;else{for(var B=0;E>B;++B){var _=v[p+B];v[p+B]=v[S],v[S++]=_}var z=m[x];m[x]=m[w],m[w++]=z}}return w}function l(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i],I=v[p+C];if(k<b&&b<=I)if(w===x)w+=1,S+=E;else{for(var B=0;E>B;++B){var _=v[p+B];v[p+B]=v[S],v[S++]=_}var z=m[x];m[x]=m[w],m[w++]=z}}return w}function y(h,T,f,n,v,m,b,E){for(var p=2*h,S=p*f,w=S,i=f,C=T,x=h+T,k=f;n>k;++k,S+=p){var I=v[S+C],B=v[S+x];if(!(I>=b)&&!(E>=B))if(i===k)i+=1,w+=p;else{for(var _=0;p>_;++_){var z=v[S+_];v[S+_]=v[w],v[w++]=z}var O=m[k];m[k]=m[i],m[i++]=O}}return i}},309:function(d){d.exports=r;var g=32;function r(T,f){f<=4*g?t(0,f-1,T):h(0,f-1,T)}function t(T,f,n){for(var v=2*(T+1),m=T+1;m<=f;++m){for(var b=n[v++],E=n[v++],p=m,S=v-2;p-- >T;){var w=n[S-2],i=n[S-1];if(w<b)break;if(w===b&&i<E)break;n[S]=w,n[S+1]=i,S-=2}n[S]=b,n[S+1]=E}}function s(T,f,n){T*=2,f*=2;var v=n[T],m=n[T+1];n[T]=n[f],n[T+1]=n[f+1],n[f]=v,n[f+1]=m}function a(T,f,n){T*=2,f*=2,n[T]=n[f],n[T+1]=n[f+1]}function c(T,f,n,v){T*=2,f*=2,n*=2;var m=v[T],b=v[T+1];v[T]=v[f],v[T+1]=v[f+1],v[f]=v[n],v[f+1]=v[n+1],v[n]=m,v[n+1]=b}function u(T,f,n,v,m){T*=2,f*=2,m[T]=m[f],m[f]=n,m[T+1]=m[f+1],m[f+1]=v}function l(T,f,n){T*=2,f*=2;var v=n[T],m=n[f];return v<m?!1:v===m?n[T+1]>n[f+1]:!0}function y(T,f,n,v){T*=2;var m=v[T];return m<f?!0:m===f?v[T+1]<n:!1}function h(T,f,n){var v=(f-T+1)/6|0,m=T+v,b=f-v,E=T+f>>1,p=E-v,S=E+v,w=m,i=p,C=E,x=S,k=b,I=T+1,B=f-1,_=0;l(w,i,n)&&(_=w,w=i,i=_),l(x,k,n)&&(_=x,x=k,k=_),l(w,C,n)&&(_=w,w=C,C=_),l(i,C,n)&&(_=i,i=C,C=_),l(w,x,n)&&(_=w,w=x,x=_),l(C,x,n)&&(_=C,C=x,x=_),l(i,k,n)&&(_=i,i=k,k=_),l(i,C,n)&&(_=i,i=C,C=_),l(x,k,n)&&(_=x,x=k,k=_);for(var z=n[2*i],O=n[2*i+1],F=n[2*x],N=n[2*x+1],V=2*w,j=2*C,$=2*k,q=2*m,oe=2*E,Z=2*b,G=0;G<2;++G){var re=n[V+G],H=n[j+G],J=n[$+G];n[q+G]=re,n[oe+G]=H,n[Z+G]=J}a(p,T,n),a(S,f,n);for(var ae=I;ae<=B;++ae)if(y(ae,z,O,n))ae!==I&&s(ae,I,n),++I;else if(!y(ae,F,N,n))for(;;)if(y(B,F,N,n)){y(B,z,O,n)?(c(ae,I,B,n),++I,--B):(s(ae,B,n),--B);break}else{if(--B<ae)break;continue}u(T,I-1,z,O,n),u(f,B+1,F,N,n),I-2-T<=g?t(T,I-2,n):h(T,I-2,n),f-(B+2)<=g?t(B+2,f,n):h(B+2,f,n),B-I<=g?t(I,B,n):h(I,B,n)}},1390:function(d,g,r){d.exports={init:m,sweepBipartite:p,sweepComplete:S,scanBipartite:w,scanComplete:i};var t=r(5306),s=r(2288),a=r(309),c=1<<28,u=1024,l=t.mallocInt32(u),y=t.mallocInt32(u),h=t.mallocInt32(u),T=t.mallocInt32(u),f=t.mallocInt32(u),n=t.mallocInt32(u),v=t.mallocDouble(u*8);function m(C){var x=s.nextPow2(C);l.length<x&&(t.free(l),l=t.mallocInt32(x)),y.length<x&&(t.free(y),y=t.mallocInt32(x)),h.length<x&&(t.free(h),h=t.mallocInt32(x)),T.length<x&&(t.free(T),T=t.mallocInt32(x)),f.length<x&&(t.free(f),f=t.mallocInt32(x)),n.length<x&&(t.free(n),n=t.mallocInt32(x));var k=8*x;v.length<k&&(t.free(v),v=t.mallocDouble(k))}function b(C,x,k,I){var B=x[I],_=C[k-1];C[B]=_,x[_]=B}function E(C,x,k,I){C[k]=I,x[I]=k}function p(C,x,k,I,B,_,z,O,F,N){for(var V=0,j=2*C,$=C-1,q=j-1,oe=k;oe<I;++oe){var Z=_[oe],G=j*oe;v[V++]=B[G+$],v[V++]=-(Z+1),v[V++]=B[G+q],v[V++]=Z}for(var oe=z;oe<O;++oe){var Z=N[oe]+c,re=j*oe;v[V++]=F[re+$],v[V++]=-Z,v[V++]=F[re+q],v[V++]=Z}var H=V>>>1;a(v,H);for(var J=0,ae=0,oe=0;oe<H;++oe){var K=v[2*oe+1]|0;if(K>=c)K=K-c|0,b(h,T,ae--,K);else if(K>=0)b(l,y,J--,K);else if(K<=-268435456){K=-K-c|0;for(var Y=0;Y<J;++Y){var ie=x(l[Y],K);if(ie!==void 0)return ie}E(h,T,ae++,K)}else{K=-K-1|0;for(var Y=0;Y<ae;++Y){var ie=x(K,h[Y]);if(ie!==void 0)return ie}E(l,y,J++,K)}}}function S(C,x,k,I,B,_,z,O,F,N){for(var V=0,j=2*C,$=C-1,q=j-1,oe=k;oe<I;++oe){var Z=_[oe]+1<<1,G=j*oe;v[V++]=B[G+$],v[V++]=-Z,v[V++]=B[G+q],v[V++]=Z}for(var oe=z;oe<O;++oe){var Z=N[oe]+1<<1,re=j*oe;v[V++]=F[re+$],v[V++]=-Z|1,v[V++]=F[re+q],v[V++]=Z|1}var H=V>>>1;a(v,H);for(var J=0,ae=0,K=0,oe=0;oe<H;++oe){var Y=v[2*oe+1]|0,ie=Y&1;if(oe<H-1&&Y>>1===v[2*oe+3]>>1&&(ie=2,oe+=1),Y<0){for(var ne=-(Y>>1)-1,le=0;le<K;++le){var de=x(f[le],ne);if(de!==void 0)return de}if(ie!==0)for(var le=0;le<J;++le){var de=x(l[le],ne);if(de!==void 0)return de}if(ie!==1)for(var le=0;le<ae;++le){var de=x(h[le],ne);if(de!==void 0)return de}ie===0?E(l,y,J++,ne):ie===1?E(h,T,ae++,ne):ie===2&&E(f,n,K++,ne)}else{var ne=(Y>>1)-1;ie===0?b(l,y,J--,ne):ie===1?b(h,T,ae--,ne):ie===2&&b(f,n,K--,ne)}}}function w(C,x,k,I,B,_,z,O,F,N,V,j){var $=0,q=2*C,oe=x,Z=x+C,G=1,re=1;I?re=c:G=c;for(var H=B;H<_;++H){var J=H+G,ae=q*H;v[$++]=z[ae+oe],v[$++]=-J,v[$++]=z[ae+Z],v[$++]=J}for(var H=F;H<N;++H){var J=H+re,K=q*H;v[$++]=V[K+oe],v[$++]=-J}var Y=$>>>1;a(v,Y);for(var ie=0,H=0;H<Y;++H){var ne=v[2*H+1]|0;if(ne<0){var J=-ne,le=!1;if(J>=c?(le=!I,J-=c):(le=!!I,J-=1),le)E(l,y,ie++,J);else{var de=j[J],we=q*J,me=V[we+x+1],Le=V[we+x+1+C];e:for(var ve=0;ve<ie;++ve){var Ae=l[ve],ye=q*Ae;if(!(Le<z[ye+x+1]||z[ye+x+1+C]<me)){for(var Se=x+2;Se<C;++Se)if(V[we+Se+C]<z[ye+Se]||z[ye+Se+C]<V[we+Se])continue e;var _e=O[Ae],ze;if(I?ze=k(de,_e):ze=k(_e,de),ze!==void 0)return ze}}}}else b(l,y,ie--,ne-G)}}function i(C,x,k,I,B,_,z,O,F,N,V){for(var j=0,$=2*C,q=x,oe=x+C,Z=I;Z<B;++Z){var G=Z+c,re=$*Z;v[j++]=_[re+q],v[j++]=-G,v[j++]=_[re+oe],v[j++]=G}for(var Z=O;Z<F;++Z){var G=Z+1,H=$*Z;v[j++]=N[H+q],v[j++]=-G}var J=j>>>1;a(v,J);for(var ae=0,Z=0;Z<J;++Z){var K=v[2*Z+1]|0;if(K<0){var G=-K;if(G>=c)l[ae++]=G-c;else{G-=1;var Y=V[G],ie=$*G,ne=N[ie+x+1],le=N[ie+x+1+C];e:for(var de=0;de<ae;++de){var we=l[de],me=z[we];if(me===Y)break;var Le=$*we;if(!(le<_[Le+x+1]||_[Le+x+1+C]<ne)){for(var ve=x+2;ve<C;++ve)if(N[ie+ve+C]<_[Le+ve]||_[Le+ve+C]<N[ie+ve])continue e;var Ae=k(me,Y);if(Ae!==void 0)return Ae}}}}else{for(var G=K-c,de=ae-1;de>=0;--de)if(l[de]===G){for(var ve=de+1;ve<ae;++ve)l[ve-1]=l[ve];break}--ae}}}},7761:function(d,g,r){var t=r(9971),s=r(743),a=r(2161),c=r(7098);d.exports=T;function u(f){return[Math.min(f[0],f[1]),Math.max(f[0],f[1])]}function l(f,n){return f[0]-n[0]||f[1]-n[1]}function y(f){return f.map(u).sort(l)}function h(f,n,v){return n in f?f[n]:v}function T(f,n,v){Array.isArray(n)?(v=v||{},n=n||[]):(v=n||{},n=[]);var m=!!h(v,"delaunay",!0),b=!!h(v,"interior",!0),E=!!h(v,"exterior",!0),p=!!h(v,"infinity",!1);if(!b&&!E||f.length===0)return[];var S=t(f,n);if(m||b!==E||p){for(var w=s(f.length,y(n)),i=0;i<S.length;++i){var C=S[i];w.addTriangle(C[0],C[1],C[2])}return m&&a(f,w),E?b?p?c(w,0,p):w.cells():c(w,1,p):c(w,-1)}else return S}},2161:function(d,g,r){var t=r(2227)[4];r(5070),d.exports=a;function s(c,u,l,y,h,T){var f=u.opposite(y,h);if(!(f<0)){if(h<y){var n=y;y=h,h=n,n=T,T=f,f=n}u.isConstraint(y,h)||t(c[y],c[h],c[T],c[f])<0&&l.push(y,h)}}function a(c,u){for(var l=[],y=c.length,h=u.stars,T=0;T<y;++T)for(var f=h[T],n=1;n<f.length;n+=2){var v=f[n];if(!(v<T)&&!u.isConstraint(T,v)){for(var m=f[n-1],b=-1,E=1;E<f.length;E+=2)if(f[E-1]===v){b=f[E];break}b<0||t(c[T],c[v],c[m],c[b])<0&&l.push(T,v)}}for(;l.length>0;){for(var v=l.pop(),T=l.pop(),m=-1,b=-1,f=h[T],p=1;p<f.length;p+=2){var S=f[p-1],w=f[p];S===v?b=w:w===v&&(m=S)}m<0||b<0||t(c[T],c[v],c[m],c[b])>=0||(u.flip(T,v),s(c,u,l,m,T,b),s(c,u,l,T,b,m),s(c,u,l,b,v,m),s(c,u,l,v,m,b))}}},7098:function(d,g,r){var t=r(5070);d.exports=y;function s(h,T,f,n,v,m,b){this.cells=h,this.neighbor=T,this.flags=n,this.constraint=f,this.active=v,this.next=m,this.boundary=b}var a=s.prototype;function c(h,T){return h[0]-T[0]||h[1]-T[1]||h[2]-T[2]}a.locate=function(){var h=[0,0,0];return function(T,f,n){var v=T,m=f,b=n;return f<n?f<T&&(v=f,m=n,b=T):n<T&&(v=n,m=T,b=f),v<0?-1:(h[0]=v,h[1]=m,h[2]=b,t.eq(this.cells,h,c))}}();function u(h,T){for(var f=h.cells(),n=f.length,v=0;v<n;++v){var m=f[v],b=m[0],E=m[1],p=m[2];E<p?E<b&&(m[0]=E,m[1]=p,m[2]=b):p<b&&(m[0]=p,m[1]=b,m[2]=E)}f.sort(c);for(var S=new Array(n),v=0;v<S.length;++v)S[v]=0;var w=[],i=[],C=new Array(3*n),x=new Array(3*n),k=null;T&&(k=[]);for(var I=new s(f,C,x,S,w,i,k),v=0;v<n;++v)for(var m=f[v],B=0;B<3;++B){var b=m[B],E=m[(B+1)%3],_=C[3*v+B]=I.locate(E,b,h.opposite(E,b)),z=x[3*v+B]=h.isConstraint(b,E);_<0&&(z?i.push(v):(w.push(v),S[v]=1),T&&k.push([E,b,-1]))}return I}function l(h,T,f){for(var n=0,v=0;v<h.length;++v)T[v]===f&&(h[n++]=h[v]);return h.length=n,h}function y(h,T,f){var n=u(h,f);if(T===0)return f?n.cells.concat(n.boundary):n.cells;for(var v=1,m=n.active,b=n.next,E=n.flags,p=n.cells,S=n.constraint,w=n.neighbor;m.length>0||b.length>0;){for(;m.length>0;){var i=m.pop();if(E[i]!==-v){E[i]=v,p[i];for(var C=0;C<3;++C){var x=w[3*i+C];x>=0&&E[x]===0&&(S[3*i+C]?b.push(x):(m.push(x),E[x]=v))}}}var k=b;b=m,m=k,b.length=0,v=-v}var I=l(p,E,T);return f?I.concat(n.boundary):I}},9971:function(d,g,r){var t=r(5070),s=r(417)[3],a=0,c=1,u=2;d.exports=b;function l(E,p,S,w,i){this.a=E,this.b=p,this.idx=S,this.lowerIds=w,this.upperIds=i}function y(E,p,S,w){this.a=E,this.b=p,this.type=S,this.idx=w}function h(E,p){var S=E.a[0]-p.a[0]||E.a[1]-p.a[1]||E.type-p.type;return S||E.type!==a&&(S=s(E.a,E.b,p.b),S)?S:E.idx-p.idx}function T(E,p){return s(E.a,E.b,p)}function f(E,p,S,w,i){for(var C=t.lt(p,w,T),x=t.gt(p,w,T),k=C;k<x;++k){for(var I=p[k],B=I.lowerIds,z=B.length;z>1&&s(S[B[z-2]],S[B[z-1]],w)>0;)E.push([B[z-1],B[z-2],i]),z-=1;B.length=z,B.push(i);for(var _=I.upperIds,z=_.length;z>1&&s(S[_[z-2]],S[_[z-1]],w)<0;)E.push([_[z-2],_[z-1],i]),z-=1;_.length=z,_.push(i)}}function n(E,p){var S;return E.a[0]<p.a[0]?S=s(E.a,E.b,p.a):S=s(p.b,p.a,E.a),S||(p.b[0]<E.b[0]?S=s(E.a,E.b,p.b):S=s(p.b,p.a,E.b),S||E.idx-p.idx)}function v(E,p,S){var w=t.le(E,S,n),i=E[w],C=i.upperIds,x=C[C.length-1];i.upperIds=[x],E.splice(w+1,0,new l(S.a,S.b,S.idx,[x],C))}function m(E,p,S){var w=S.a;S.a=S.b,S.b=w;var i=t.eq(E,S,n),C=E[i],x=E[i-1];x.upperIds=C.upperIds,E.splice(i,1)}function b(E,p){for(var S=E.length,w=p.length,i=[],C=0;C<S;++C)i.push(new y(E[C],null,a,C));for(var C=0;C<w;++C){var x=p[C],k=E[x[0]],I=E[x[1]];k[0]<I[0]?i.push(new y(k,I,u,C),new y(I,k,c,C)):k[0]>I[0]&&i.push(new y(I,k,u,C),new y(k,I,c,C))}i.sort(h);for(var B=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),_=[new l([B,1],[B,0],-1,[],[])],z=[],C=0,O=i.length;C<O;++C){var F=i[C],N=F.type;N===a?f(z,_,E,F.a,F.idx):N===u?v(_,E,F):m(_,E,F)}return z}},743:function(d,g,r){var t=r(5070);d.exports=u;function s(l,y){this.stars=l,this.edges=y}var a=s.prototype;function c(l,y,h){for(var T=1,f=l.length;T<f;T+=2)if(l[T-1]===y&&l[T]===h){l[T-1]=l[f-2],l[T]=l[f-1],l.length=f-2;return}}a.isConstraint=function(){var l=[0,0];function y(h,T){return h[0]-T[0]||h[1]-T[1]}return function(h,T){return l[0]=Math.min(h,T),l[1]=Math.max(h,T),t.eq(this.edges,l,y)>=0}}(),a.removeTriangle=function(l,y,h){var T=this.stars;c(T[l],y,h),c(T[y],h,l),c(T[h],l,y)},a.addTriangle=function(l,y,h){var T=this.stars;T[l].push(y,h),T[y].push(h,l),T[h].push(l,y)},a.opposite=function(l,y){for(var h=this.stars[y],T=1,f=h.length;T<f;T+=2)if(h[T]===l)return h[T-1];return-1},a.flip=function(l,y){var h=this.opposite(l,y),T=this.opposite(y,l);this.removeTriangle(l,y,h),this.removeTriangle(y,l,T),this.addTriangle(l,T,h),this.addTriangle(y,h,T)},a.edges=function(){for(var l=this.stars,y=[],h=0,T=l.length;h<T;++h)for(var f=l[h],n=0,v=f.length;n<v;n+=2)y.push([f[n],f[n+1]]);return y},a.cells=function(){for(var l=this.stars,y=[],h=0,T=l.length;h<T;++h)for(var f=l[h],n=0,v=f.length;n<v;n+=2){var m=f[n],b=f[n+1];h<Math.min(m,b)&&y.push([h,m,b])}return y};function u(l,y){for(var h=new Array(l),T=0;T<l;++T)h[T]=[];return new s(h,y)}},9887:function(d){d.exports=g;function g(r){for(var t=1,s=1;s<r.length;++s)for(var a=0;a<s;++a)if(r[s]<r[a])t=-t;else if(r[a]===r[s])return 0;return t}},9243:function(d,g,r){var t=r(3094),s=r(6606);function a(l,y){for(var h=0,T=l.length,f=0;f<T;++f)h+=l[f]*y[f];return h}function c(l){var y=l.length;if(y===0)return[];l[0].length;var h=t([l.length+1,l.length+1],1),T=t([l.length+1],1);h[y][y]=0;for(var f=0;f<y;++f){for(var n=0;n<=f;++n)h[n][f]=h[f][n]=2*a(l[f],l[n]);T[f]=a(l[f],l[f])}for(var v=s(h,T),m=0,b=v[y+1],f=0;f<b.length;++f)m+=b[f];for(var E=new Array(y),f=0;f<y;++f){for(var b=v[f],p=0,n=0;n<b.length;++n)p+=b[n];E[f]=p/m}return E}function u(l){if(l.length===0)return[];for(var y=l[0].length,h=t([y]),T=c(l),f=0;f<l.length;++f)for(var n=0;n<y;++n)h[n]+=l[f][n]*T[f];return h}u.barycenetric=c,d.exports=u},1778:function(d,g,r){d.exports=s;var t=r(9243);function s(a){for(var c=t(a),u=0,l=0;l<a.length;++l)for(var y=a[l],h=0;h<c.length;++h)u+=Math.pow(y[h]-c[h],2);return Math.sqrt(u/a.length)}},197:function(d,g,r){d.exports=k;var t=r(1731),s=r(2569),a=r(4434),c=r(5125),u=r(8846),l=r(7999),y=r(2826),h=r(8551),T=r(5528);function f(I){var B=l(I);return[h(B,-1/0),h(B,1/0)]}function n(I,B){for(var _=new Array(B.length),z=0;z<B.length;++z){var O=B[z],F=I[O[0]],N=I[O[1]];_[z]=[h(Math.min(F[0],N[0]),-1/0),h(Math.min(F[1],N[1]),-1/0),h(Math.max(F[0],N[0]),1/0),h(Math.max(F[1],N[1]),1/0)]}return _}function v(I){for(var B=new Array(I.length),_=0;_<I.length;++_){var z=I[_];B[_]=[h(z[0],-1/0),h(z[1],-1/0),h(z[0],1/0),h(z[1],1/0)]}return B}function m(I,B,_){var z=[];return s(_,function(O,F){var N=B[O],V=B[F];if(!(N[0]===V[0]||N[0]===V[1]||N[1]===V[0]||N[1]===V[1])){var j=I[N[0]],$=I[N[1]],q=I[V[0]],oe=I[V[1]];a(j,$,q,oe)&&z.push([O,F])}}),z}function b(I,B,_,z){var O=[];return s(_,z,function(F,N){var V=B[F];if(!(V[0]===N||V[1]===N)){var j=I[N],$=I[V[0]],q=I[V[1]];a($,q,j,j)&&O.push([F,N])}}),O}function E(I,B,_,z,O){var F,N,V=I.map(function(we){return[c(we[0]),c(we[1])]});for(F=0;F<_.length;++F){var j=_[F];N=j[0];var $=j[1],q=B[N],oe=B[$],Z=T(y(I[q[0]]),y(I[q[1]]),y(I[oe[0]]),y(I[oe[1]]));if(Z){var G=I.length;I.push([l(Z[0]),l(Z[1])]),V.push(Z),z.push([N,G],[$,G])}}for(z.sort(function(we,me){if(we[0]!==me[0])return we[0]-me[0];var Le=V[we[1]],ve=V[me[1]];return u(Le[0],ve[0])||u(Le[1],ve[1])}),F=z.length-1;F>=0;--F){var re=z[F];N=re[0];var H=B[N],J=H[0],ae=H[1],K=I[J],Y=I[ae];if((K[0]-Y[0]||K[1]-Y[1])<0){var ie=J;J=ae,ae=ie}H[0]=J;var ne=H[1]=re[1],le;for(O&&(le=H[2]);F>0&&z[F-1][0]===N;){var re=z[--F],de=re[1];O?B.push([ne,de,le]):B.push([ne,de]),ne=de}O?B.push([ne,ae,le]):B.push([ne,ae])}return V}function p(I,B,_){for(var z=B.length,O=new t(z),F=[],N=0;N<B.length;++N){var V=B[N],j=f(V[0]),$=f(V[1]);F.push([h(j[0],-1/0),h($[0],-1/0),h(j[1],1/0),h($[1],1/0)])}s(F,function(re,H){O.link(re,H)});for(var q=!0,oe=new Array(z),N=0;N<z;++N){var Z=O.find(N);Z!==N&&(q=!1,I[Z]=[Math.min(I[N][0],I[Z][0]),Math.min(I[N][1],I[Z][1])])}if(q)return null;for(var G=0,N=0;N<z;++N){var Z=O.find(N);Z===N?(oe[N]=G,I[G++]=I[N]):oe[N]=-1}I.length=G;for(var N=0;N<z;++N)oe[N]<0&&(oe[N]=oe[O.find(N)]);return oe}function S(I,B){return I[0]-B[0]||I[1]-B[1]}function w(I,B){var _=I[0]-B[0]||I[1]-B[1];return _||(I[2]<B[2]?-1:I[2]>B[2]?1:0)}function i(I,B,_){if(I.length!==0){if(B)for(var z=0;z<I.length;++z){var O=I[z],F=B[O[0]],N=B[O[1]];O[0]=Math.min(F,N),O[1]=Math.max(F,N)}else for(var z=0;z<I.length;++z){var O=I[z],F=O[0],N=O[1];O[0]=Math.min(F,N),O[1]=Math.max(F,N)}_?I.sort(w):I.sort(S);for(var V=1,z=1;z<I.length;++z){var j=I[z-1],$=I[z];$[0]===j[0]&&$[1]===j[1]&&(!_||$[2]===j[2])||(I[V++]=$)}I.length=V}}function C(I,B,_){var z=p(I,[],v(I));return i(B,z,_),!!z}function x(I,B,_){var z=n(I,B),O=m(I,B,z),F=v(I),N=b(I,B,z,F),V=E(I,B,O,N,_),j=p(I,V);return i(B,j,_),j?!0:O.length>0||N.length>0}function k(I,B,_){var z;if(_){z=B;for(var O=new Array(B.length),F=0;F<B.length;++F){var N=B[F];O[F]=[N[0],N[1],_[F]]}B=O}for(var V=C(I,B,!!_);x(I,B,!!_);)V=!0;if(_&&V){z.length=0,_.length=0;for(var F=0;F<B.length;++F){var N=B[F];z.push([N[0],N[1]]),_.push(N[2])}}return V}},5528:function(d,g,r){d.exports=T;var t=r(3962),s=r(9189),a=r(4354),c=r(4951),u=r(6695),l=r(7584),y=r(4469);function h(f,n){return a(t(f[0],n[1]),t(f[1],n[0]))}function T(f,n,v,m){var b=u(n,f),E=u(m,v),p=h(b,E);if(c(p)===0)return null;var S=u(f,v),w=h(E,S),i=s(w,p),C=y(b,i),x=l(f,C);return x}},5692:function(d){d.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]}],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]},{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]}]}},9156:function(d,g,r){var t=r(5692),s=r(3578);d.exports=a;function a(y){var h,T,f,n,v,m,b,E,i,p,S;if(y||(y={}),E=(y.nshades||72)-1,b=y.format||"hex",m=y.colormap,m||(m="jet"),typeof m=="string"){if(m=m.toLowerCase(),!t[m])throw Error(m+" not a supported colorscale");v=t[m]}else if(Array.isArray(m))v=m.slice();else throw Error("unsupported colormap option",m);if(v.length>E+1)throw new Error(m+" map requires nshades to be at least size "+v.length);Array.isArray(y.alpha)?y.alpha.length!==2?p=[1,1]:p=y.alpha.slice():typeof y.alpha=="number"?p=[y.alpha,y.alpha]:p=[1,1],h=v.map(function(k){return Math.round(k.index*E)}),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var w=v.map(function(k,I){var B=v[I].index,_=v[I].rgb.slice();return _.length===4&&_[3]>=0&&_[3]<=1||(_[3]=p[0]+(p[1]-p[0])*B),_}),i=[];for(S=0;S<h.length-1;++S){n=h[S+1]-h[S],T=w[S],f=w[S+1];for(var C=0;C<n;C++){var x=C/n;i.push([Math.round(s(T[0],f[0],x)),Math.round(s(T[1],f[1],x)),Math.round(s(T[2],f[2],x)),s(T[3],f[3],x)])}}return i.push(v[v.length-1].rgb.concat(p[1])),b==="hex"?i=i.map(u):b==="rgbaString"?i=i.map(l):b==="float"&&(i=i.map(c)),i}function c(y){return[y[0]/255,y[1]/255,y[2]/255,y[3]]}function u(y){for(var h,T="#",f=0;f<3;++f)h=y[f],h=h.toString(16),T+=("00"+h).substr(h.length);return T}function l(y){return"rgba("+y.join(",")+")"}},9398:function(d,g,r){d.exports=y;var t=r(417),s=r(7538),a=r(87),c=r(2019),u=r(9662);function l(h,T,f){var n=a(h[0],-T[0]),v=a(h[1],-T[1]),m=a(f[0],-T[0]),b=a(f[1],-T[1]),E=u(c(n,m),c(v,b));return E[E.length-1]>=0}function y(h,T,f,n){var v=t(T,f,n);if(v===0){var m=s(t(h,T,f)),b=s(t(h,T,n));if(m===b){if(m===0){var E=l(h,T,f),p=l(h,T,n);return E===p?0:E?1:-1}return 0}else{if(b===0)return m>0||l(h,T,n)?-1:1;if(m===0)return b>0||l(h,T,f)?1:-1}return s(b-m)}var S=t(h,T,f);if(S>0)return v>0&&t(h,T,n)>0?1:-1;if(S<0)return v>0||t(h,T,n)>0?1:-1;var w=t(h,T,n);return w>0||l(h,T,f)?1:-1}},7538:function(d){d.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(d){d.exports=t;var g=Math.min;function r(s,a){return s-a}function t(s,a){var c=s.length,u=s.length-a.length;if(u)return u;switch(c){case 0:return 0;case 1:return s[0]-a[0];case 2:return s[0]+s[1]-a[0]-a[1]||g(s[0],s[1])-g(a[0],a[1]);case 3:var l=s[0]+s[1],y=a[0]+a[1];if(u=l+s[2]-(y+a[2]),u)return u;var h=g(s[0],s[1]),T=g(a[0],a[1]);return g(h,s[2])-g(T,a[2])||g(h+s[2],l)-g(T+a[2],y);case 4:var f=s[0],n=s[1],v=s[2],m=s[3],b=a[0],E=a[1],p=a[2],S=a[3];return f+n+v+m-(b+E+p+S)||g(f,n,v,m)-g(b,E,p,S,b)||g(f+n,f+v,f+m,n+v,n+m,v+m)-g(b+E,b+p,b+S,E+p,E+S,p+S)||g(f+n+v,f+n+m,f+v+m,n+v+m)-g(b+E+p,b+E+S,b+p+S,E+p+S);default:for(var w=s.slice().sort(r),i=a.slice().sort(r),C=0;C<c;++C)if(u=w[C]-i[C],u)return u;return 0}}},1284:function(d,g,r){var t=r(9209),s=r(9887);d.exports=a;function a(c,u){return t(c,u)||s(c)-s(u)}},5537:function(d,g,r){var t=r(8950),s=r(8722),a=r(3332);d.exports=c;function c(u){var l=u.length;if(l===0)return[];if(l===1)return[[0]];var y=u[0].length;return y===0?[]:y===1?t(u):y===2?s(u):a(u,y)}},8950:function(d){d.exports=g;function g(r){for(var t=0,s=0,a=1;a<r.length;++a)r[a][0]<r[t][0]&&(t=a),r[a][0]>r[s][0]&&(s=a);return t<s?[[t],[s]]:t>s?[[s],[t]]:[[t]]}},8722:function(d,g,r){d.exports=s;var t=r(3266);function s(a){var c=t(a),u=c.length;if(u<=2)return[];for(var l=new Array(u),y=c[u-1],h=0;h<u;++h){var T=c[h];l[h]=[y,T],y=T}return l}},3332:function(d,g,r){d.exports=u;var t=r(2183),s=r(2153);function a(l,y){for(var h=l.length,T=new Array(h),f=0;f<y.length;++f)T[f]=l[y[f]];for(var n=y.length,f=0;f<h;++f)y.indexOf(f)<0&&(T[n++]=l[f]);return T}function c(l,y){for(var h=l.length,T=y.length,f=0;f<h;++f)for(var n=l[f],v=0;v<n.length;++v){var m=n[v];if(m<T)n[v]=y[m];else{m=m-T;for(var b=0;b<T;++b)m>=y[b]&&(m+=1);n[v]=m}}return l}function u(l,y){try{return t(l,!0)}catch{var h=s(l);if(h.length<=y)return[];var T=a(l,h),f=t(T,!0);return c(f,h)}}},9680:function(d){function g(t,s,a,c,u,l){var y=6*u*u-6*u,h=3*u*u-4*u+1,T=-6*u*u+6*u,f=3*u*u-2*u;if(t.length){l||(l=new Array(t.length));for(var n=t.length-1;n>=0;--n)l[n]=y*t[n]+h*s[n]+T*a[n]+f*c[n];return l}return y*t+h*s+T*a[n]+f*c}function r(t,s,a,c,u,l){var y=u-1,h=u*u,T=y*y,f=(1+2*u)*T,n=u*T,v=h*(3-2*u),m=h*y;if(t.length){l||(l=new Array(t.length));for(var b=t.length-1;b>=0;--b)l[b]=f*t[b]+n*s[b]+v*a[b]+m*c[b];return l}return f*t+n*s+v*a+m*c}d.exports=r,d.exports.derivative=g},4419:function(d,g,r){var t=r(2183),s=r(1215);d.exports=l;function a(y,h){this.point=y,this.index=h}function c(y,h){for(var T=y.point,f=h.point,n=T.length,v=0;v<n;++v){var m=f[v]-T[v];if(m)return m}return 0}function u(y,h,T){if(y===1)return T?[[-1,0]]:[];var f=h.map(function(E,p){return[E[0],p]});f.sort(function(E,p){return E[0]-p[0]});for(var n=new Array(y-1),v=1;v<y;++v){var m=f[v-1],b=f[v];n[v-1]=[m[1],b[1]]}return T&&n.push([-1,n[0][1]],[n[y-1][1],-1]),n}function l(y,h){var T=y.length;if(T===0)return[];var f=y[0].length;if(f<1)return[];if(f===1)return u(T,y,h);for(var n=new Array(T),v=1,m=0;m<T;++m){for(var b=y[m],E=new Array(f+1),p=0,S=0;S<f;++S){var w=b[S];E[S]=w,p+=w*w}E[f]=p,n[m]=new a(E,m),v=Math.max(p,v)}s(n,c),T=n.length;for(var i=new Array(T+f+1),C=new Array(T+f+1),x=(f+1)*(f+1)*v,k=new Array(f+1),m=0;m<=f;++m)k[m]=0;k[f]=x,i[0]=k.slice(),C[0]=-1;for(var m=0;m<=f;++m){var E=k.slice();E[m]=1,i[m+1]=E,C[m+1]=-1}for(var m=0;m<T;++m){var I=n[m];i[m+f+1]=I.point,C[m+f+1]=I.index}var B=t(i,!1);if(h?B=B.filter(function(_){for(var z=0,O=0;O<=f;++O){var F=C[_[O]];if(F<0&&++z>=2)return!1;_[O]=F}return!0}):B=B.filter(function(_){for(var z=0;z<=f;++z){var O=C[_[z]];if(O<0)return!1;_[z]=O}return!0}),f&1)for(var m=0;m<B.length;++m){var I=B[m],E=I[0];I[0]=I[1],I[1]=E}return B}},8362:function(d){var g=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),t=new Uint32Array(r.buffer);if(r[0]=1,g=!0,t[1]===1072693248){let a=function(l,y){return t[0]=l,t[1]=y,r[0]},c=function(l){return r[0]=l,t[0]},u=function(l){return r[0]=l,t[1]};d.exports=function(y){return r[0]=y,[t[0],t[1]]},d.exports.pack=a,d.exports.lo=c,d.exports.hi=u}else if(t[0]===1072693248){let a=function(l,y){return t[1]=l,t[0]=y,r[0]},c=function(l){return r[0]=l,t[1]},u=function(l){return r[0]=l,t[0]};d.exports=function(y){return r[0]=y,[t[1],t[0]]},d.exports.pack=a,d.exports.lo=c,d.exports.hi=u}else g=!1}if(!g){let a=function(l,y){return s.writeUInt32LE(l,0,!0),s.writeUInt32LE(y,4,!0),s.readDoubleLE(0,!0)},c=function(l){return s.writeDoubleLE(l,0,!0),s.readUInt32LE(0,!0)},u=function(l){return s.writeDoubleLE(l,0,!0),s.readUInt32LE(4,!0)};var s=new Buffer(8);d.exports=function(y){return s.writeDoubleLE(y,0,!0),[s.readUInt32LE(0,!0),s.readUInt32LE(4,!0)]},d.exports.pack=a,d.exports.lo=c,d.exports.hi=u}d.exports.sign=function(a){return d.exports.hi(a)>>>31},d.exports.exponent=function(a){var c=d.exports.hi(a);return(c<<1>>>21)-1023},d.exports.fraction=function(a){var c=d.exports.lo(a),u=d.exports.hi(a),l=u&(1<<20)-1;return u&2146435072&&(l+=1048576),[c,l]},d.exports.denormalized=function(a){var c=d.exports.hi(a);return!(c&2146435072)}},3094:function(d){function g(s,a,c){var u=s[c]|0;if(u<=0)return[];var l=new Array(u),y;if(c===s.length-1)for(y=0;y<u;++y)l[y]=a;else for(y=0;y<u;++y)l[y]=g(s,a,c+1);return l}function r(s,a){var c,u;for(c=new Array(s),u=0;u<s;++u)c[u]=a;return c}function t(s,a){switch(typeof a>"u"&&(a=0),typeof s){case"number":if(s>0)return r(s|0,a);break;case"object":if(typeof s.length=="number")return g(s,a,0);break}return[]}d.exports=t},8348:function(d,g,r){d.exports=s;var t=r(1215);function s(a,c){var u=a.length;if(typeof c!="number"){c=0;for(var l=0;l<u;++l){var y=a[l];c=Math.max(c,y[0],y[1])}c=(c|0)+1}c=c|0;for(var h=new Array(c),l=0;l<c;++l)h[l]=[];for(var l=0;l<u;++l){var y=a[l];h[y[0]].push(y[1]),h[y[1]].push(y[0])}for(var T=0;T<c;++T)t(h[T],function(f,n){return f-n});return h}},5795:function(d){d.exports=g;function g(r,t,s){var a=t||0,c=s||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[a*r[12]+r[8],a*r[13]+r[9],a*r[14]+r[10],a*r[15]+r[11]],[c*r[12]-r[8],c*r[13]-r[9],c*r[14]-r[10],c*r[15]-r[11]]]}},8444:function(d,g,r){d.exports=y;var t=r(9680),s=r(5070);function a(h,T,f){return Math.min(T,Math.max(h,f))}function c(h,T,f){this.dimension=h.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=h.slice().reverse(),this._velocity=T.slice().reverse(),this._time=[f],this._scratch=[h.slice(),h.slice(),h.slice(),h.slice(),h.slice()]}var u=c.prototype;u.flush=function(h){var T=s.gt(this._time,h)-1;T<=0||(this._time.splice(0,T),this._state.splice(0,T*this.dimension),this._velocity.splice(0,T*this.dimension))},u.curve=function(h){var T=this._time,f=T.length,n=s.le(T,h),v=this._scratch[0],m=this._state,b=this._velocity,E=this.dimension,p=this.bounds;if(n<0)for(var S=E-1,w=0;w<E;++w,--S)v[w]=m[S];else if(n>=f-1)for(var S=m.length-1,i=h-T[f-1],w=0;w<E;++w,--S)v[w]=m[S]+i*b[S];else{for(var S=E*(n+1)-1,C=T[n],x=T[n+1],k=x-C||1,I=this._scratch[1],B=this._scratch[2],_=this._scratch[3],z=this._scratch[4],O=!0,w=0;w<E;++w,--S)I[w]=m[S],_[w]=b[S]*k,B[w]=m[S+E],z[w]=b[S+E]*k,O=O&&I[w]===B[w]&&_[w]===z[w]&&_[w]===0;if(O)for(var w=0;w<E;++w)v[w]=I[w];else t(I,_,B,z,(h-C)/k,v)}for(var F=p[0],N=p[1],w=0;w<E;++w)v[w]=a(F[w],N[w],v[w]);return v},u.dcurve=function(h){var T=this._time,f=T.length,n=s.le(T,h),v=this._scratch[0],m=this._state,b=this._velocity,E=this.dimension;if(n>=f-1){var p=m.length-1;h-T[f-1];for(var S=0;S<E;++S,--p)v[S]=b[p]}else{for(var p=E*(n+1)-1,w=T[n],i=T[n+1],C=i-w||1,x=this._scratch[1],k=this._scratch[2],I=this._scratch[3],B=this._scratch[4],_=!0,S=0;S<E;++S,--p)x[S]=m[p],I[S]=b[p]*C,k[S]=m[p+E],B[S]=b[p+E]*C,_=_&&x[S]===k[S]&&I[S]===B[S]&&I[S]===0;if(_)for(var S=0;S<E;++S)v[S]=0;else{t.derivative(x,I,k,B,(h-w)/C,v);for(var S=0;S<E;++S)v[S]/=C}}return v},u.lastT=function(){var h=this._time;return h[h.length-1]},u.stable=function(){for(var h=this._velocity,T=h.length,f=this.dimension-1;f>=0;--f)if(h[--T])return!1;return!0},u.jump=function(h){var T=this.lastT(),f=this.dimension;if(!(h<T||arguments.length!==f+1)){var n=this._state,v=this._velocity,m=n.length-this.dimension,b=this.bounds,E=b[0],p=b[1];this._time.push(T,h);for(var S=0;S<2;++S)for(var w=0;w<f;++w)n.push(n[m++]),v.push(0);this._time.push(h);for(var w=f;w>0;--w)n.push(a(E[w-1],p[w-1],arguments[w])),v.push(0)}},u.push=function(h){var T=this.lastT(),f=this.dimension;if(!(h<T||arguments.length!==f+1)){var n=this._state,v=this._velocity,m=n.length-this.dimension,b=h-T,E=this.bounds,p=E[0],S=E[1],w=b>1e-6?1/b:0;this._time.push(h);for(var i=f;i>0;--i){var C=a(p[i-1],S[i-1],arguments[i]);n.push(C),v.push((C-n[m++])*w)}}},u.set=function(h){var T=this.dimension;if(!(h<this.lastT()||arguments.length!==T+1)){var f=this._state,n=this._velocity,v=this.bounds,m=v[0],b=v[1];this._time.push(h);for(var E=T;E>0;--E)f.push(a(m[E-1],b[E-1],arguments[E])),n.push(0)}},u.move=function(h){var T=this.lastT(),f=this.dimension;if(!(h<=T||arguments.length!==f+1)){var n=this._state,v=this._velocity,m=n.length-this.dimension,b=this.bounds,E=b[0],p=b[1],S=h-T,w=S>1e-6?1/S:0;this._time.push(h);for(var i=f;i>0;--i){var C=arguments[i];n.push(a(E[i-1],p[i-1],n[m++]+C)),v.push(C*w)}}},u.idle=function(h){var T=this.lastT();if(!(h<T)){var f=this.dimension,n=this._state,v=this._velocity,m=n.length-f,b=this.bounds,E=b[0],p=b[1],S=h-T;this._time.push(h);for(var w=f-1;w>=0;--w)n.push(a(E[w],p[w],n[m]+S*v[m])),v.push(0),m+=1}};function l(h){for(var T=new Array(h),f=0;f<h;++f)T[f]=0;return T}function y(h,T,f){switch(arguments.length){case 0:return new c([0],[0],0);case 1:if(typeof h=="number"){var n=l(h);return new c(n,n,0)}else return new c(h,l(h.length),0);case 2:if(typeof T=="number"){var n=l(h.length);return new c(h,n,+T)}else f=0;case 3:if(h.length!==T.length)throw new Error("state and velocity lengths must match");return new c(h,T,f)}}},7080:function(d){d.exports=E;var g=0,r=1;function t(p,S,w,i,C,x){this._color=p,this.key=S,this.value=w,this.left=i,this.right=C,this._count=x}function s(p){return new t(p._color,p.key,p.value,p.left,p.right,p._count)}function a(p,S){return new t(p,S.key,S.value,S.left,S.right,S._count)}function c(p){p._count=1+(p.left?p.left._count:0)+(p.right?p.right._count:0)}function u(p,S){this._compare=p,this.root=S}var l=u.prototype;Object.defineProperty(l,"keys",{get:function(){var p=[];return this.forEach(function(S,w){p.push(S)}),p}}),Object.defineProperty(l,"values",{get:function(){var p=[];return this.forEach(function(S,w){p.push(w)}),p}}),Object.defineProperty(l,"length",{get:function(){return this.root?this.root._count:0}}),l.insert=function(p,S){for(var w=this._compare,i=this.root,C=[],x=[];i;){var k=w(p,i.key);C.push(i),x.push(k),k<=0?i=i.left:i=i.right}C.push(new t(g,p,S,null,null,1));for(var I=C.length-2;I>=0;--I){var i=C[I];x[I]<=0?C[I]=new t(i._color,i.key,i.value,C[I+1],i.right,i._count+1):C[I]=new t(i._color,i.key,i.value,i.left,C[I+1],i._count+1)}for(var I=C.length-1;I>1;--I){var B=C[I-1],i=C[I];if(B._color===r||i._color===r)break;var _=C[I-2];if(_.left===B)if(B.left===i){var z=_.right;if(z&&z._color===g)B._color=r,_.right=a(r,z),_._color=g,I-=1;else{if(_._color=g,_.left=B.right,B._color=r,B.right=_,C[I-2]=B,C[I-1]=i,c(_),c(B),I>=3){var O=C[I-3];O.left===_?O.left=B:O.right=B}break}}else{var z=_.right;if(z&&z._color===g)B._color=r,_.right=a(r,z),_._color=g,I-=1;else{if(B.right=i.left,_._color=g,_.left=i.right,i._color=r,i.left=B,i.right=_,C[I-2]=i,C[I-1]=B,c(_),c(B),c(i),I>=3){var O=C[I-3];O.left===_?O.left=i:O.right=i}break}}else if(B.right===i){var z=_.left;if(z&&z._color===g)B._color=r,_.left=a(r,z),_._color=g,I-=1;else{if(_._color=g,_.right=B.left,B._color=r,B.left=_,C[I-2]=B,C[I-1]=i,c(_),c(B),I>=3){var O=C[I-3];O.right===_?O.right=B:O.left=B}break}}else{var z=_.left;if(z&&z._color===g)B._color=r,_.left=a(r,z),_._color=g,I-=1;else{if(B.left=i.right,_._color=g,_.right=i.left,i._color=r,i.right=B,i.left=_,C[I-2]=i,C[I-1]=B,c(_),c(B),c(i),I>=3){var O=C[I-3];O.right===_?O.right=i:O.left=i}break}}}return C[0]._color=r,new u(w,C[0])};function y(p,S){if(S.left){var w=y(p,S.left);if(w)return w}var w=p(S.key,S.value);if(w)return w;if(S.right)return y(p,S.right)}function h(p,S,w,i){var C=S(p,i.key);if(C<=0){if(i.left){var x=h(p,S,w,i.left);if(x)return x}var x=w(i.key,i.value);if(x)return x}if(i.right)return h(p,S,w,i.right)}function T(p,S,w,i,C){var x=w(p,C.key),k=w(S,C.key),I;if(x<=0&&(C.left&&(I=T(p,S,w,i,C.left),I)||k>0&&(I=i(C.key,C.value),I)))return I;if(k>0&&C.right)return T(p,S,w,i,C.right)}l.forEach=function(S,w,i){if(this.root)switch(arguments.length){case 1:return y(S,this.root);case 2:return h(w,this._compare,S,this.root);case 3:return this._compare(w,i)>=0?void 0:T(w,i,this._compare,S,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var p=[],S=this.root;S;)p.push(S),S=S.left;return new f(this,p)}}),Object.defineProperty(l,"end",{get:function(){for(var p=[],S=this.root;S;)p.push(S),S=S.right;return new f(this,p)}}),l.at=function(p){if(p<0)return new f(this,[]);for(var S=this.root,w=[];;){if(w.push(S),S.left){if(p<S.left._count){S=S.left;continue}p-=S.left._count}if(!p)return new f(this,w);if(p-=1,S.right){if(p>=S.right._count)break;S=S.right}else break}return new f(this,[])},l.ge=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x<=0&&(C=i.length),x<=0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.gt=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x<0&&(C=i.length),x<0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.lt=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x>0&&(C=i.length),x<=0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.le=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x>=0&&(C=i.length),x<0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.find=function(p){for(var S=this._compare,w=this.root,i=[];w;){var C=S(p,w.key);if(i.push(w),C===0)return new f(this,i);C<=0?w=w.left:w=w.right}return new f(this,[])},l.remove=function(p){var S=this.find(p);return S?S.remove():this},l.get=function(p){for(var S=this._compare,w=this.root;w;){var i=S(p,w.key);if(i===0)return w.value;i<=0?w=w.left:w=w.right}};function f(p,S){this.tree=p,this._stack=S}var n=f.prototype;Object.defineProperty(n,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(n,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),n.clone=function(){return new f(this.tree,this._stack.slice())};function v(p,S){p.key=S.key,p.value=S.value,p.left=S.left,p.right=S.right,p._color=S._color,p._count=S._count}function m(p){for(var S,w,i,C,x=p.length-1;x>=0;--x){if(S=p[x],x===0){S._color=r;return}if(w=p[x-1],w.left===S){if(i=w.right,i.right&&i.right._color===g){if(i=w.right=s(i),C=i.right=s(i.right),w.right=i.left,i.left=w,i.right=C,i._color=w._color,S._color=r,w._color=r,C._color=r,c(w),c(i),x>1){var k=p[x-2];k.left===w?k.left=i:k.right=i}p[x-1]=i;return}else if(i.left&&i.left._color===g){if(i=w.right=s(i),C=i.left=s(i.left),w.right=C.left,i.left=C.right,C.left=w,C.right=i,C._color=w._color,w._color=r,i._color=r,S._color=r,c(w),c(i),c(C),x>1){var k=p[x-2];k.left===w?k.left=C:k.right=C}p[x-1]=C;return}if(i._color===r)if(w._color===g){w._color=r,w.right=a(g,i);return}else{w.right=a(g,i);continue}else{if(i=s(i),w.right=i.left,i.left=w,i._color=w._color,w._color=g,c(w),c(i),x>1){var k=p[x-2];k.left===w?k.left=i:k.right=i}p[x-1]=i,p[x]=w,x+1<p.length?p[x+1]=S:p.push(S),x=x+2}}else{if(i=w.left,i.left&&i.left._color===g){if(i=w.left=s(i),C=i.left=s(i.left),w.left=i.right,i.right=w,i.left=C,i._color=w._color,S._color=r,w._color=r,C._color=r,c(w),c(i),x>1){var k=p[x-2];k.right===w?k.right=i:k.left=i}p[x-1]=i;return}else if(i.right&&i.right._color===g){if(i=w.left=s(i),C=i.right=s(i.right),w.left=C.right,i.right=C.left,C.right=w,C.left=i,C._color=w._color,w._color=r,i._color=r,S._color=r,c(w),c(i),c(C),x>1){var k=p[x-2];k.right===w?k.right=C:k.left=C}p[x-1]=C;return}if(i._color===r)if(w._color===g){w._color=r,w.left=a(g,i);return}else{w.left=a(g,i);continue}else{if(i=s(i),w.left=i.right,i.right=w,i._color=w._color,w._color=g,c(w),c(i),x>1){var k=p[x-2];k.right===w?k.right=i:k.left=i}p[x-1]=i,p[x]=w,x+1<p.length?p[x+1]=S:p.push(S),x=x+2}}}}n.remove=function(){var p=this._stack;if(p.length===0)return this.tree;var S=new Array(p.length),w=p[p.length-1];S[S.length-1]=new t(w._color,w.key,w.value,w.left,w.right,w._count);for(var i=p.length-2;i>=0;--i){var w=p[i];w.left===p[i+1]?S[i]=new t(w._color,w.key,w.value,S[i+1],w.right,w._count):S[i]=new t(w._color,w.key,w.value,w.left,S[i+1],w._count)}if(w=S[S.length-1],w.left&&w.right){var C=S.length;for(w=w.left;w.right;)S.push(w),w=w.right;var x=S[C-1];S.push(new t(w._color,x.key,x.value,w.left,w.right,w._count)),S[C-1].key=w.key,S[C-1].value=w.value;for(var i=S.length-2;i>=C;--i)w=S[i],S[i]=new t(w._color,w.key,w.value,w.left,S[i+1],w._count);S[C-1].left=S[C]}if(w=S[S.length-1],w._color===g){var k=S[S.length-2];k.left===w?k.left=null:k.right===w&&(k.right=null),S.pop();for(var i=0;i<S.length;++i)S[i]._count--;return new u(this.tree._compare,S[0])}else if(w.left||w.right){w.left?v(w,w.left):w.right&&v(w,w.right),w._color=r;for(var i=0;i<S.length-1;++i)S[i]._count--;return new u(this.tree._compare,S[0])}else{if(S.length===1)return new u(this.tree._compare,null);for(var i=0;i<S.length;++i)S[i]._count--;var I=S[S.length-2];m(S),I.left===w?I.left=null:I.right=null}return new u(this.tree._compare,S[0])},Object.defineProperty(n,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(n,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(n,"index",{get:function(){var p=0,S=this._stack;if(S.length===0){var w=this.tree.root;return w?w._count:0}else S[S.length-1].left&&(p=S[S.length-1].left._count);for(var i=S.length-2;i>=0;--i)S[i+1]===S[i].right&&(++p,S[i].left&&(p+=S[i].left._count));return p},enumerable:!0}),n.next=function(){var p=this._stack;if(p.length!==0){var S=p[p.length-1];if(S.right)for(S=S.right;S;)p.push(S),S=S.left;else for(p.pop();p.length>0&&p[p.length-1].right===S;)S=p[p.length-1],p.pop()}},Object.defineProperty(n,"hasNext",{get:function(){var p=this._stack;if(p.length===0)return!1;if(p[p.length-1].right)return!0;for(var S=p.length-1;S>0;--S)if(p[S-1].left===p[S])return!0;return!1}}),n.update=function(p){var S=this._stack;if(S.length===0)throw new Error("Can't update empty node!");var w=new Array(S.length),i=S[S.length-1];w[w.length-1]=new t(i._color,i.key,p,i.left,i.right,i._count);for(var C=S.length-2;C>=0;--C)i=S[C],i.left===S[C+1]?w[C]=new t(i._color,i.key,i.value,w[C+1],i.right,i._count):w[C]=new t(i._color,i.key,i.value,i.left,w[C+1],i._count);return new u(this.tree._compare,w[0])},n.prev=function(){var p=this._stack;if(p.length!==0){var S=p[p.length-1];if(S.left)for(S=S.left;S;)p.push(S),S=S.right;else for(p.pop();p.length>0&&p[p.length-1].left===S;)S=p[p.length-1],p.pop()}},Object.defineProperty(n,"hasPrev",{get:function(){var p=this._stack;if(p.length===0)return!1;if(p[p.length-1].left)return!0;for(var S=p.length-1;S>0;--S)if(p[S-1].right===p[S])return!0;return!1}});function b(p,S){return p<S?-1:p>S?1:0}function E(p){return new u(p||b,null)}},7453:function(d,g,r){d.exports=i;var t=r(9557),s=r(1681),a=r(1011),c=r(2864),u=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function y(C,x){return C[0]=x[0],C[1]=x[1],C[2]=x[2],C}function h(C){this.gl=C,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.zeroLineWidth=[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=a(C)}var T=h.prototype;T.update=function(C){C=C||{};function x(q,oe,Z){if(Z in C){var G=C[Z],re=this[Z],H;(q?Array.isArray(G)&&Array.isArray(G[0]):Array.isArray(G))?this[Z]=H=[oe(G[0]),oe(G[1]),oe(G[2])]:this[Z]=H=[oe(G),oe(G),oe(G)];for(var J=0;J<3;++J)if(H[J]!==re[J])return!0}return!1}var k=x.bind(this,!1,Number),I=x.bind(this,!1,Boolean),B=x.bind(this,!1,String),_=x.bind(this,!0,function(q){if(Array.isArray(q)){if(q.length===3)return[+q[0],+q[1],+q[2],1];if(q.length===4)return[+q[0],+q[1],+q[2],+q[3]]}return[0,0,0,1]}),z,O=!1,F=!1;if("bounds"in C)for(var N=C.bounds,V=0;V<2;++V)for(var j=0;j<3;++j)N[V][j]!==this.bounds[V][j]&&(F=!0),this.bounds[V][j]=N[V][j];if("ticks"in C){z=C.ticks,O=!0,this.autoTicks=!1;for(var V=0;V<3;++V)this.tickSpacing[V]=0}else k("tickSpacing")&&(this.autoTicks=!0,F=!0);if(this._firstInit&&("ticks"in C||"tickSpacing"in C||(this.autoTicks=!0),F=!0,O=!0,this._firstInit=!1),F&&this.autoTicks&&(z=u.create(this.bounds,this.tickSpacing),O=!0),O){for(var V=0;V<3;++V)z[V].sort(function(oe,Z){return oe.x-Z.x});u.equal(z,this.ticks)?O=!1:this.ticks=z}I("tickEnable"),B("tickFont")&&(O=!0),k("tickSize"),k("tickAngle"),k("tickPad"),_("tickColor");var $=B("labels");B("labelFont")&&($=!0),I("labelEnable"),k("labelSize"),k("labelPad"),_("labelColor"),I("lineEnable"),I("lineMirror"),k("lineWidth"),_("lineColor"),I("lineTickEnable"),I("lineTickMirror"),k("lineTickLength"),k("lineTickWidth"),_("lineTickColor"),I("gridEnable"),k("gridWidth"),_("gridColor"),I("zeroEnable"),_("zeroLineColor"),k("zeroLineWidth"),I("backgroundEnable"),_("backgroundColor"),this._text?this._text&&($||O)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=t(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&O&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=s(this.gl,this.bounds,this.ticks))};function f(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var n=[new f,new f,new f];function v(C,x,k,I,B){for(var _=C.primalOffset,z=C.primalMinor,O=C.mirrorOffset,F=C.mirrorMinor,N=I[x],V=0;V<3;++V)if(x!==V){var j=_,$=O,q=z,oe=F;N&1<<V&&(j=O,$=_,q=F,oe=z),j[V]=k[0][V],$[V]=k[1][V],B[V]>0?(q[V]=-1,oe[V]=0):(q[V]=0,oe[V]=1)}}var m=[0,0,0],b={model:l,view:l,projection:l,_ortho:!1};T.isOpaque=function(){return!0},T.isTransparent=function(){return!1},T.drawTransparent=function(C){};var E=0,p=[0,0,0],S=[0,0,0],w=[0,0,0];T.draw=function(C){C=C||b;for(var re=this.gl,x=C.model||l,k=C.view||l,I=C.projection||l,B=this.bounds,_=C._ortho||!1,z=c(x,k,I,B,_),O=z.cubeEdges,F=z.axis,N=k[12],V=k[13],j=k[14],$=k[15],q=_?2:1,oe=q*this.pixelRatio*(I[3]*N+I[7]*V+I[11]*j+I[15]*$)/re.drawingBufferHeight,Z=0;Z<3;++Z)this.lastCubeProps.cubeEdges[Z]=O[Z],this.lastCubeProps.axis[Z]=F[Z];for(var G=n,Z=0;Z<3;++Z)v(n[Z],Z,this.bounds,O,F);for(var re=this.gl,H=m,Z=0;Z<3;++Z)this.backgroundEnable[Z]?H[Z]=F[Z]:H[Z]=0;this._background.draw(x,k,I,B,H,this.backgroundColor),this._lines.bind(x,k,I,this);for(var Z=0;Z<3;++Z){var J=[0,0,0];F[Z]>0?J[Z]=B[1][Z]:J[Z]=B[0][Z];for(var ae=0;ae<2;++ae){var K=(Z+1+ae)%3,Y=(Z+1+(ae^1))%3;this.gridEnable[K]&&this._lines.drawGrid(K,Y,this.bounds,J,this.gridColor[K],this.gridWidth[K]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var K=(Z+1+ae)%3,Y=(Z+1+(ae^1))%3;this.zeroEnable[Y]&&Math.min(B[0][Y],B[1][Y])<=0&&Math.max(B[0][Y],B[1][Y])>=0&&this._lines.drawZero(K,Y,this.bounds,J,this.zeroLineColor[Y],this.zeroLineWidth[Y]*this.pixelRatio)}}for(var Z=0;Z<3;++Z){this.lineEnable[Z]&&this._lines.drawAxisLine(Z,this.bounds,G[Z].primalOffset,this.lineColor[Z],this.lineWidth[Z]*this.pixelRatio),this.lineMirror[Z]&&this._lines.drawAxisLine(Z,this.bounds,G[Z].mirrorOffset,this.lineColor[Z],this.lineWidth[Z]*this.pixelRatio);for(var ie=y(p,G[Z].primalMinor),ne=y(S,G[Z].mirrorMinor),le=this.lineTickLength,ae=0;ae<3;++ae){var de=oe/x[5*ae];ie[ae]*=le[ae]*de,ne[ae]*=le[ae]*de}this.lineTickEnable[Z]&&this._lines.drawAxisTicks(Z,G[Z].primalOffset,ie,this.lineTickColor[Z],this.lineTickWidth[Z]*this.pixelRatio),this.lineTickMirror[Z]&&this._lines.drawAxisTicks(Z,G[Z].mirrorOffset,ne,this.lineTickColor[Z],this.lineTickWidth[Z]*this.pixelRatio)}this._lines.unbind(),this._text.bind(x,k,I,this.pixelRatio);var we,me=.5,Le,ve;function Ae(Ne){ve=[0,0,0],ve[Ne]=1}function ye(Ne,et,st){var Ze=(Ne+1)%3,Ke=(Ne+2)%3,nt=et[Ze],it=et[Ke],lt=st[Ze],vt=st[Ke];if(nt>0&&vt>0){Ae(Ze);return}else if(nt>0&&vt<0){Ae(Ze);return}else if(nt<0&&vt>0){Ae(Ze);return}else if(nt<0&&vt<0){Ae(Ze);return}else if(it>0&&lt>0){Ae(Ke);return}else if(it>0&&lt<0){Ae(Ke);return}else if(it<0&&lt>0){Ae(Ke);return}else if(it<0&&lt<0){Ae(Ke);return}}for(var Z=0;Z<3;++Z){for(var Se=G[Z].primalMinor,_e=G[Z].mirrorMinor,ze=y(w,G[Z].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[Z]&&(ze[ae]+=oe*Se[ae]*Math.max(this.lineTickLength[ae],0)/x[5*ae]);var Ie=[0,0,0];if(Ie[Z]=1,this.tickEnable[Z]){this.tickAngle[Z]===-3600?(this.tickAngle[Z]=0,this.tickAlign[Z]="auto"):this.tickAlign[Z]=-1,Le=1,we=[this.tickAlign[Z],me,Le],we[0]==="auto"?we[0]=E:we[0]=parseInt(""+we[0]),ve=[0,0,0],ye(Z,Se,_e);for(var ae=0;ae<3;++ae)ze[ae]+=oe*Se[ae]*this.tickPad[ae]/x[5*ae];this._text.drawTicks(Z,this.tickSize[Z],this.tickAngle[Z],ze,this.tickColor[Z],Ie,ve,we)}if(this.labelEnable[Z]){Le=0,ve=[0,0,0],this.labels[Z].length>4&&(Ae(Z),Le=1),we=[this.labelAlign[Z],me,Le],we[0]==="auto"?we[0]=E:we[0]=parseInt(""+we[0]);for(var ae=0;ae<3;++ae)ze[ae]+=oe*Se[ae]*this.labelPad[ae]/x[5*ae];ze[Z]+=.5*(B[0][Z]+B[1][Z]),this._text.drawLabel(Z,this.labelSize[Z],this.labelAngle[Z],ze,this.labelColor[Z],[0,0,0],ve,we)}}this._text.unbind()},T.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function i(C,x){var k=new h(C);return k.update(x),k}},1011:function(d,g,r){d.exports=l;var t=r(5827),s=r(2944),a=r(1943).bg;function c(y,h,T,f){this.gl=y,this.buffer=h,this.vao=T,this.shader=f}var u=c.prototype;u.draw=function(y,h,T,f,n,v){for(var m=!1,b=0;b<3;++b)m=m||n[b];if(m){var E=this.gl;E.enable(E.POLYGON_OFFSET_FILL),E.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:y,view:h,projection:T,bounds:f,enable:n,colors:v},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),E.disable(E.POLYGON_OFFSET_FILL)}},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function l(y){for(var h=[],T=[],f=0,n=0;n<3;++n)for(var v=(n+1)%3,m=(n+2)%3,b=[0,0,0],E=[0,0,0],p=-1;p<=1;p+=2){T.push(f,f+2,f+1,f+1,f+2,f+3),b[n]=p,E[n]=p;for(var S=-1;S<=1;S+=2){b[v]=S;for(var w=-1;w<=1;w+=2)b[m]=w,h.push(b[0],b[1],b[2],E[0],E[1],E[2]),f+=1}var i=v;v=m,m=i}var C=t(y,new Float32Array(h)),x=t(y,new Uint16Array(T),y.ELEMENT_ARRAY_BUFFER),k=s(y,[{buffer:C,type:y.FLOAT,size:3,offset:0,stride:24},{buffer:C,type:y.FLOAT,size:3,offset:12,stride:24}],x),I=a(y);return I.attributes.position.location=0,I.attributes.normal.location=1,new c(y,C,k,I)}},2864:function(d,g,r){d.exports=p;var t=r(2288),s=r(104),a=r(4670),c=r(417),u=new Array(16),l=new Array(8),y=new Array(8),h=new Array(3),T=[0,0,0];(function(){for(var S=0;S<8;++S)l[S]=[1,1,1,1],y[S]=[1,1,1]})();function f(S,w,i){for(var C=0;C<4;++C){S[C]=i[12+C];for(var x=0;x<3;++x)S[C]+=w[x]*i[4*x+C]}}var n=[[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 v(S){for(var w=0;w<n.length;++w)if(S=a.positive(S,n[w]),S.length<3)return 0;for(var i=S[0],C=i[0]/i[3],x=i[1]/i[3],k=0,w=1;w+1<S.length;++w){var I=S[w],B=S[w+1],_=I[0]/I[3],z=I[1]/I[3],O=B[0]/B[3],F=B[1]/B[3],N=_-C,V=z-x,j=O-C,$=F-x;k+=Math.abs(N*$-V*j)}return k}var m=[1,1,1],b=[0,0,0],E={cubeEdges:m,axis:b};function p(S,w,i,C,x){s(u,w,S),s(u,i,u);for(var k=0,I=0;I<2;++I){h[2]=C[I][2];for(var B=0;B<2;++B){h[1]=C[B][1];for(var _=0;_<2;++_)h[0]=C[_][0],f(l[k],h,u),k+=1}}for(var z=-1,I=0;I<8;++I){for(var O=l[I][3],F=0;F<3;++F)y[I][F]=l[I][F]/O;x&&(y[I][2]*=-1),O<0&&(z<0||y[I][2]<y[z][2])&&(z=I)}if(z<0){z=0;for(var N=0;N<3;++N){for(var V=(N+2)%3,j=(N+1)%3,$=-1,q=-1,oe=0;oe<2;++oe){var Z=oe<<N,G=Z+(oe<<V)+(1-oe<<j),re=Z+(1-oe<<V)+(oe<<j);c(y[Z],y[G],y[re],T)<0||(oe?$=1:q=1)}if($<0||q<0){q>$&&(z|=1<<N);continue}for(var oe=0;oe<2;++oe){var Z=oe<<N,G=Z+(oe<<V)+(1-oe<<j),re=Z+(1-oe<<V)+(oe<<j),H=v([l[Z],l[G],l[re],l[Z+(1<<V)+(1<<j)]]);oe?$=H:q=H}if(q>$){z|=1<<N;continue}}}for(var J=7^z,ae=-1,I=0;I<8;++I)I===z||I===J||(ae<0||y[ae][1]>y[I][1])&&(ae=I);for(var K=-1,I=0;I<3;++I){var Y=ae^1<<I;if(!(Y===z||Y===J)){K<0&&(K=Y);var j=y[Y];j[0]<y[K][0]&&(K=Y)}}for(var ie=-1,I=0;I<3;++I){var Y=ae^1<<I;if(!(Y===z||Y===J||Y===K)){ie<0&&(ie=Y);var j=y[Y];j[0]>y[ie][0]&&(ie=Y)}}var ne=m;ne[0]=ne[1]=ne[2]=0,ne[t.log2(K^ae)]=ae&K,ne[t.log2(ae^ie)]=ae&ie;var le=ie^7;le===z||le===J?(le=K^7,ne[t.log2(ie^le)]=le&ie):ne[t.log2(K^le)]=le&K;for(var de=b,we=z,N=0;N<3;++N)we&1<<N?de[N]=-1:de[N]=1;return E}},1681:function(d,g,r){d.exports=m;var t=r(5827),s=r(2944),a=r(1943).j,c=[0,0,0],u=[0,0,0],l=[0,0,0],y=[0,0,0],h=[1,1];function T(b){return b[0]=b[1]=b[2]=0,b}function f(b,E){return b[0]=E[0],b[1]=E[1],b[2]=E[2],b}function n(b,E,p,S,w,i,C,x){this.gl=b,this.vertBuffer=E,this.vao=p,this.shader=S,this.tickCount=w,this.tickOffset=i,this.gridCount=C,this.gridOffset=x}var v=n.prototype;v.bind=function(b,E,p){this.shader.bind(),this.shader.uniforms.model=b,this.shader.uniforms.view=E,this.shader.uniforms.projection=p,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=h,this.vao.bind()},v.unbind=function(){this.vao.unbind()},v.drawAxisLine=function(b,E,p,S,w){var i=T(u);this.shader.uniforms.majorAxis=u,i[b]=E[1][b]-E[0][b],this.shader.uniforms.minorAxis=i;var C=f(y,p);C[b]+=E[0][b],this.shader.uniforms.offset=C,this.shader.uniforms.lineWidth=w,this.shader.uniforms.color=S;var x=T(l);x[(b+2)%3]=1,this.shader.uniforms.screenAxis=x,this.vao.draw(this.gl.TRIANGLES,6);var x=T(l);x[(b+1)%3]=1,this.shader.uniforms.screenAxis=x,this.vao.draw(this.gl.TRIANGLES,6)},v.drawAxisTicks=function(b,E,p,S,w){if(this.tickCount[b]){var i=T(c);i[b]=1,this.shader.uniforms.majorAxis=i,this.shader.uniforms.offset=E,this.shader.uniforms.minorAxis=p,this.shader.uniforms.color=S,this.shader.uniforms.lineWidth=w;var C=T(l);C[b]=1,this.shader.uniforms.screenAxis=C,this.vao.draw(this.gl.TRIANGLES,this.tickCount[b],this.tickOffset[b])}},v.drawGrid=function(b,E,p,S,w,i){if(this.gridCount[b]){var C=T(u);C[E]=p[1][E]-p[0][E],this.shader.uniforms.minorAxis=C;var x=f(y,S);x[E]+=p[0][E],this.shader.uniforms.offset=x;var k=T(c);k[b]=1,this.shader.uniforms.majorAxis=k;var I=T(l);I[b]=1,this.shader.uniforms.screenAxis=I,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=w,this.vao.draw(this.gl.TRIANGLES,this.gridCount[b],this.gridOffset[b])}},v.drawZero=function(b,E,p,S,w,i){var C=T(u);this.shader.uniforms.majorAxis=C,C[b]=p[1][b]-p[0][b],this.shader.uniforms.minorAxis=C;var x=f(y,S);x[b]+=p[0][b],this.shader.uniforms.offset=x;var k=T(l);k[E]=1,this.shader.uniforms.screenAxis=k,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=w,this.vao.draw(this.gl.TRIANGLES,6)},v.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function m(b,E,p){var S=[],w=[0,0,0],i=[0,0,0],C=[0,0,0],x=[0,0,0];S.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var k=0;k<3;++k){for(var _=S.length/3|0,I=0;I<p[k].length;++I){var B=+p[k][I].x;S.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var O=S.length/3|0;w[k]=_,i[k]=O-_;for(var _=S.length/3|0,z=0;z<p[k].length;++z){var B=+p[k][z].x;S.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var O=S.length/3|0;C[k]=_,x[k]=O-_}var F=t(b,new Float32Array(S)),N=s(b,[{buffer:F,type:b.FLOAT,size:3,stride:0,offset:0}]),V=a(b);return V.attributes.position.location=0,new n(b,F,N,V,i,w,x,C)}},1943:function(d,g,r){var t=r(6832),s=r(5158),a=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;
vec3 project(vec3 p) {
vec4 pp = projection * view * model * vec4(p, 1.0);
return pp.xyz / max(pp.w, 0.0001);
}
void main() {
vec3 major = position.x * majorAxis;
vec3 minor = position.y * minorAxis;
vec3 vPosition = major + minor + offset;
vec3 pPosition = project(vPosition);
vec3 offset = project(vPosition + screenAxis * position.z);
vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;
gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]),c=t([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);g.j=function(T){return s(T,a,c,null,[{name:"position",type:"vec3"}])};var u=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;
vec3 project(vec3 p) {
vec4 pp = projection * view * model * vec4(p, 1.0);
return pp.xyz / max(pp.w, 0.0001);
}
float computeViewAngle(vec3 a, vec3 b) {
vec3 A = project(a);
vec3 B = project(b);
return atan(
(B.y - A.y) * resolution.y,
(B.x - A.x) * resolution.x
);
}
const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;
int option = int(floor(alignOpt.x + 0.001));
float hv_ratio = alignOpt.y;
bool enableAlign = (alignOpt.z != 0.0);
float mod_angle(float a) {
return mod(a, PI);
}
float positive_angle(float a) {
return mod_angle((a < 0.0) ?
a + TWO_PI :
a
);
}
float look_upwards(float a) {
float b = positive_angle(a);
return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?
b - PI :
b;
}
float look_horizontal_or_vertical(float a, float ratio) {
// ratio controls the ratio between being horizontal to (vertical + horizontal)
// if ratio is set to 0.5 then it is 50%, 50%.
// when using a higher ratio e.g. 0.75 the result would
// likely be more horizontal than vertical.
float b = positive_angle(a);
return
(b < ( ratio) * HALF_PI) ? 0.0 :
(b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :
(b < (2.0 + ratio) * HALF_PI) ? 0.0 :
(b < (4.0 - ratio) * HALF_PI) ? HALF_PI :
0.0;
}
float roundTo(float a, float b) {
return float(b * floor((a + 0.5 * b) / b));
}
float look_round_n_directions(float a, int n) {
float b = positive_angle(a);
float div = TWO_PI / float(n);
float c = roundTo(b, div);
return look_upwards(c);
}
float applyAlignOption(float rawAngle, float delta) {
return
(option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions
(option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical
(option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis
(option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards
(option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal
rawAngle; // otherwise return back raw input angle
}
bool isAxisTitle = (axis.x == 0.0) &&
(axis.y == 0.0) &&
(axis.z == 0.0);
void main() {
//Compute world offset
float axisDistance = position.z;
vec3 dataPosition = axisDistance * axis + offset;
float beta = angle; // i.e. user defined attributes for each tick
float axisAngle;
float clipAngle;
float flip;
if (enableAlign) {
axisAngle = (isAxisTitle) ? HALF_PI :
computeViewAngle(dataPosition, dataPosition + axis);
clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);
axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;
clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;
flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),
vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;
beta += applyAlignOption(clipAngle, flip * PI);
}
//Compute plane offset
vec2 planeCoord = position.xy * pixelScale;
mat2 planeXform = scale * mat2(
cos(beta), sin(beta),
-sin(beta), cos(beta)
);
vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;
//Compute clip position
vec3 clipPosition = project(dataPosition);
//Apply text offset in clip coordinates
clipPosition += vec3(viewOffset, 0.0);
//Done
gl_Position = vec4(clipPosition, 1.0);
}`]),l=t([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);g.f=function(T){return s(T,u,l,null,[{name:"position",type:"vec3"}])};var y=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
attribute vec3 normal;
uniform mat4 model, view, projection;
uniform vec3 enable;
uniform vec3 bounds[2];
varying vec3 colorChannel;
void main() {
vec3 signAxis = sign(bounds[1] - bounds[0]);
vec3 realNormal = signAxis * normal;
if(dot(realNormal, enable) > 0.0) {
vec3 minRange = min(bounds[0], bounds[1]);
vec3 maxRange = max(bounds[0], bounds[1]);
vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));
gl_Position = projection * view * model * vec4(nPosition, 1.0);
} else {
gl_Position = vec4(0,0,0,0);
}
colorChannel = abs(realNormal);
}`]),h=t([`precision highp float;
#define GLSLIFY 1
uniform vec4 colors[3];
varying vec3 colorChannel;
void main() {
gl_FragColor = colorChannel.x * colors[0] +
colorChannel.y * colors[1] +
colorChannel.z * colors[2];
}`]);g.bg=function(T){return s(T,y,h,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(d,g,r){d.exports=v;var t=r(5827),s=r(2944),a=r(875),c=r(1943).f,u=window||A.global||{},l=u.__TEXT_CACHE||{};u.__TEXT_CACHE={};var y=3;function h(m,b,E,p){this.gl=m,this.shader=b,this.buffer=E,this.vao=p,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var T=h.prototype,f=[0,0];T.bind=function(m,b,E,p){this.vao.bind(),this.shader.bind();var S=this.shader.uniforms;S.model=m,S.view=b,S.projection=E,S.pixelScale=p,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},T.unbind=function(){this.vao.unbind()},T.update=function(m,b,E,p,S){var w=[];function i(F,N,V,j,$,q){var oe=l[V];oe||(oe=l[V]={});var Z=oe[N];Z||(Z=oe[N]=n(N,{triangles:!0,font:V,textAlign:"center",textBaseline:"middle",lineSpacing:$,styletags:q}));for(var G=(j||12)/12,re=Z.positions,H=Z.cells,J=0,ae=H.length;J<ae;++J)for(var K=H[J],Y=2;Y>=0;--Y){var ie=re[K[Y]];w.push(G*ie[0],-G*ie[1],F)}}for(var C=[0,0,0],x=[0,0,0],k=[0,0,0],I=[0,0,0],B=1.25,_={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},z=0;z<3;++z){k[z]=w.length/y|0,i(.5*(m[0][z]+m[1][z]),b[z],E[z],12,B,_),I[z]=(w.length/y|0)-k[z],C[z]=w.length/y|0;for(var O=0;O<p[z].length;++O)p[z][O].text&&i(p[z][O].x,p[z][O].text,p[z][O].font||S,p[z][O].fontSize||12,B,_);x[z]=(w.length/y|0)-C[z]}this.buffer.update(w),this.tickOffset=C,this.tickCount=x,this.labelOffset=k,this.labelCount=I},T.drawTicks=function(m,b,E,p,S,w,i,C){this.tickCount[m]&&(this.shader.uniforms.axis=w,this.shader.uniforms.color=S,this.shader.uniforms.angle=E,this.shader.uniforms.scale=b,this.shader.uniforms.offset=p,this.shader.uniforms.alignDir=i,this.shader.uniforms.alignOpt=C,this.vao.draw(this.gl.TRIANGLES,this.tickCount[m],this.tickOffset[m]))},T.drawLabel=function(m,b,E,p,S,w,i,C){this.labelCount[m]&&(this.shader.uniforms.axis=w,this.shader.uniforms.color=S,this.shader.uniforms.angle=E,this.shader.uniforms.scale=b,this.shader.uniforms.offset=p,this.shader.uniforms.alignDir=i,this.shader.uniforms.alignOpt=C,this.vao.draw(this.gl.TRIANGLES,this.labelCount[m],this.labelOffset[m]))},T.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function n(m,b){try{return a(m,b)}catch(E){return console.warn('error vectorizing text:"'+m+'" error:',E),{cells:[],positions:[]}}}function v(m,b,E,p,S,w){var i=t(m),C=s(m,[{buffer:i,size:3}]),x=c(m);x.attributes.position.location=0;var k=new h(m,x,i,C);return k.update(b,E,p,S,w),k}},8468:function(d,g){g.create=t,g.equal=s;function r(a,c){var u=a+"",l=u.indexOf("."),y=0;l>=0&&(y=u.length-l-1);var h=Math.pow(10,y),T=Math.round(a*c*h),f=T+"";if(f.indexOf("e")>=0)return f;var n=T/h,v=T%h;T<0?(n=-Math.ceil(n)|0,v=-v|0):(n=Math.floor(n)|0,v=v|0);var m=""+n;if(T<0&&(m="-"+m),y){for(var b=""+v;b.length<y;)b="0"+b;return m+"."+b}else return m}function t(a,c){for(var u=[],l=0;l<3;++l){var y=[];.5*(a[0][l]+a[1][l]);for(var h=0;h*c[l]<=a[1][l];++h)y.push({x:h*c[l],text:r(c[l],h)});for(var h=-1;h*c[l]>=a[0][l];--h)y.push({x:h*c[l],text:r(c[l],h)});u.push(y)}return u}function s(a,c){for(var u=0;u<3;++u){if(a[u].length!==c[u].length)return!1;for(var l=0;l<a[u].length;++l){var y=a[u][l],h=c[u][l];if(y.x!==h.x||y.text!==h.text||y.font!==h.font||y.fontColor!==h.fontColor||y.fontSize!==h.fontSize||y.dx!==h.dx||y.dy!==h.dy)return!1}}return!0}},2771:function(d,g,r){d.exports=E;var t=r(5795),s=r(4670),a=r(2864),c=r(104),u=r(2142),l=r(6342),y=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),h=new Float32Array(16);function T(p,S,w){this.lo=p,this.hi=S,this.pixelsPerDataUnit=w}var f=[0,0,0,1],n=[0,0,0,1];function v(p,S,w,i,C){for(var x=0;x<3;++x){for(var k=f,I=n,B=0;B<3;++B)I[B]=k[B]=w[B];I[3]=k[3]=1,I[x]+=1,l(I,I,S),I[3]<0&&(p[x]=1/0),k[x]-=1,l(k,k,S),k[3]<0&&(p[x]=1/0);var _=(k[0]/k[3]-I[0]/I[3])*i,z=(k[1]/k[3]-I[1]/I[3])*C;p[x]=.25*Math.sqrt(_*_+z*z)}return p}var m=[new T(1/0,-1/0,1/0),new T(1/0,-1/0,1/0),new T(1/0,-1/0,1/0)],b=[0,0,0];function E(p,S,w,i,z){var x=S.model||y,k=S.view||y,I=S.projection||y,B=S._ortho||!1,_=p.bounds,z=z||a(x,k,I,_,B),O=z.axis;c(h,k,x),c(h,I,h);for(var F=m,N=0;N<3;++N)F[N].lo=1/0,F[N].hi=-1/0,F[N].pixelsPerDataUnit=1/0;var V=t(u(h,h));u(h,h);for(var j=0;j<3;++j){var $=(j+1)%3,q=(j+2)%3,oe=b;e:for(var N=0;N<2;++N){var Z=[];if(O[j]<0!=!!N){oe[j]=_[N][j];for(var G=0;G<2;++G){oe[$]=_[G^N][$];for(var re=0;re<2;++re)oe[q]=_[re^G^N][q],Z.push(oe.slice())}for(var H=B?5:4,G=H;G===H;++G){if(Z.length===0)continue e;Z=s.positive(Z,V[G])}for(var G=0;G<Z.length;++G)for(var q=Z[G],J=v(b,h,q,w,i),re=0;re<3;++re)F[re].lo=Math.min(F[re].lo,q[re]),F[re].hi=Math.max(F[re].hi,q[re]),re!==j&&(F[re].pixelsPerDataUnit=Math.min(F[re].pixelsPerDataUnit,Math.abs(J[re])))}}}return F}},5827:function(d,g,r){var t=r(5306),s=r(7498),a=r(5050),c=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function u(n,v,m,b,E){this.gl=n,this.type=v,this.handle=m,this.length=b,this.usage=E}var l=u.prototype;l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)};function y(n,v,m,b,E,p){var S=E.length*E.BYTES_PER_ELEMENT;if(p<0)return n.bufferData(v,E,b),S;if(S+p>m)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return n.bufferSubData(v,p,E),m}function h(n,v){for(var m=t.malloc(n.length,v),b=n.length,E=0;E<b;++E)m[E]=n[E];return m}function T(n,v){for(var m=1,b=v.length-1;b>=0;--b){if(v[b]!==m)return!1;m*=n[b]}return!0}l.update=function(n,v){if(typeof v!="number"&&(v=-1),this.bind(),typeof n=="object"&&typeof n.shape<"u"){var m=n.dtype;if(c.indexOf(m)<0&&(m="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var b=gl.getExtension("OES_element_index_uint");b&&m!=="uint16"?m="uint32":m="uint16"}if(m===n.dtype&&T(n.shape,n.stride))n.offset===0&&n.data.length===n.shape[0]?this.length=y(this.gl,this.type,this.length,this.usage,n.data,v):this.length=y(this.gl,this.type,this.length,this.usage,n.data.subarray(n.offset,n.shape[0]),v);else{var E=t.malloc(n.size,m),p=a(E,n.shape);s.assign(p,n),v<0?this.length=y(this.gl,this.type,this.length,this.usage,E,v):this.length=y(this.gl,this.type,this.length,this.usage,E.subarray(0,n.size),v),t.free(E)}}else if(Array.isArray(n)){var S;this.type===this.gl.ELEMENT_ARRAY_BUFFER?S=h(n,"uint16"):S=h(n,"float32"),v<0?this.length=y(this.gl,this.type,this.length,this.usage,S,v):this.length=y(this.gl,this.type,this.length,this.usage,S.subarray(0,n.length),v),t.free(S)}else if(typeof n=="object"&&typeof n.length=="number")this.length=y(this.gl,this.type,this.length,this.usage,n,v);else if(typeof n=="number"||n===void 0){if(v>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");n=n|0,n<=0&&(n=1),this.gl.bufferData(this.type,n|0,this.usage),this.length=n}else throw new Error("gl-buffer: Invalid data type")};function f(n,v,m,b){if(m=m||n.ARRAY_BUFFER,b=b||n.DYNAMIC_DRAW,m!==n.ARRAY_BUFFER&&m!==n.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(b!==n.DYNAMIC_DRAW&&b!==n.STATIC_DRAW&&b!==n.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 E=n.createBuffer(),p=new u(n,m,E,0,b);return p.update(v),p}d.exports=f},1140:function(d,g,r){var t=r(2858);d.exports=function(a,c){var u=a.positions,l=a.vectors,y={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),y;for(var h=0,T=1/0,f=-1/0,n=1/0,v=-1/0,m=1/0,b=-1/0,E=null,p=null,S=[],w=1/0,i=!1,C=0;C<u.length;C++){var x=u[C];T=Math.min(x[0],T),f=Math.max(x[0],f),n=Math.min(x[1],n),v=Math.max(x[1],v),m=Math.min(x[2],m),b=Math.max(x[2],b);var k=l[C];if(t.length(k)>h&&(h=t.length(k)),C){var I=2*t.distance(E,x)/(t.length(p)+t.length(k));I?(w=Math.min(w,I),i=!1):i=!0}i||(E=x,p=k),S.push(k)}var B=[T,n,m],_=[f,v,b];c&&(c[0]=B,c[1]=_),h===0&&(h=1);var z=1/h;isFinite(w)||(w=1),y.vectorScale=w;var O=a.coneSize||.5;a.absoluteConeSize&&(O=a.absoluteConeSize*z),y.coneScale=O;for(var C=0,F=0;C<u.length;C++)for(var x=u[C],N=x[0],V=x[1],j=x[2],$=S[C],q=t.length($)*z,oe=0,Z=8;oe<Z;oe++){y.positions.push([N,V,j,F++]),y.positions.push([N,V,j,F++]),y.positions.push([N,V,j,F++]),y.positions.push([N,V,j,F++]),y.positions.push([N,V,j,F++]),y.positions.push([N,V,j,F++]),y.vectors.push($),y.vectors.push($),y.vectors.push($),y.vectors.push($),y.vectors.push($),y.vectors.push($),y.vertexIntensity.push(q,q,q),y.vertexIntensity.push(q,q,q);var G=y.positions.length;y.cells.push([G-6,G-5,G-4],[G-3,G-2,G-1])}return y};var s=r(7234);d.exports.createMesh=r(5028),d.exports.createConeMesh=function(a,c){return d.exports.createMesh(a,c,{shaders:s,traceType:"cone"})}},5028:function(d,g,r){var t=r(5158),s=r(5827),a=r(2944),c=r(8931),u=r(104),l=r(7437),y=r(5050),h=r(9156),T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(S,w,i,C,x,k,I,B,_,z,O){this.gl=S,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=w,this.dirty=!0,this.triShader=i,this.pickShader=C,this.trianglePositions=x,this.triangleVectors=k,this.triangleColors=B,this.triangleUVs=_,this.triangleIds=I,this.triangleVAO=z,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=O,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=T,this._view=T,this._projection=T,this._resolution=[1,1]}var n=f.prototype;n.isOpaque=function(){return this.opacity>=1},n.isTransparent=function(){return this.opacity<1},n.pickSlots=1,n.setPickBase=function(S){this.pickId=S};function v(S){for(var w=h({colormap:S,nshades:256,format:"rgba"}),i=new Uint8Array(256*4),C=0;C<256;++C){for(var x=w[C],k=0;k<3;++k)i[4*C+k]=x[k];i[4*C+3]=x[3]*255}return y(i,[256,256,4],[4,0,1])}function m(S){for(var w=S.length,i=new Array(w),C=0;C<w;++C)i[C]=S[C][2];return i}n.update=function(S){S=S||{};var w=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=w.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=w.LINEAR,this.texture.setPixels(v(S.colormap)),this.texture.generateMipmap());var i=S.cells,C=S.positions,x=S.vectors;if(!(!C||!i||!x)){var k=[],I=[],B=[],_=[],z=[];this.cells=i,this.positions=C,this.vectors=x;var O=S.meshColor||[1,1,1,1],F=S.vertexIntensity,N=1/0,V=-1/0;if(F)if(S.vertexIntensityBounds)N=+S.vertexIntensityBounds[0],V=+S.vertexIntensityBounds[1];else for(var j=0;j<F.length;++j){var $=F[j];N=Math.min(N,$),V=Math.max(V,$)}else for(var j=0;j<C.length;++j){var $=C[j][2];N=Math.min(N,$),V=Math.max(V,$)}F?this.intensity=F:this.intensity=m(C),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var j=0;j<C.length;++j)for(var q=C[j],oe=0;oe<3;++oe)isNaN(q[oe])||!isFinite(q[oe])||(this.bounds[0][oe]=Math.min(this.bounds[0][oe],q[oe]),this.bounds[1][oe]=Math.max(this.bounds[1][oe],q[oe]));var Z=0;e:for(var j=0;j<i.length;++j){var G=i[j];switch(G.length){case 3:for(var oe=0;oe<3;++oe)for(var re=G[oe],q=C[re],H=0;H<3;++H)if(isNaN(q[H])||!isFinite(q[H]))continue e;for(var oe=0;oe<3;++oe){var re=G[2-oe],q=C[re];k.push(q[0],q[1],q[2],q[3]);var J=x[re];I.push(J[0],J[1],J[2],J[3]||0);var ae=O;ae.length===3?B.push(ae[0],ae[1],ae[2],1):B.push(ae[0],ae[1],ae[2],ae[3]);var K;F?K=[(F[re]-N)/(V-N),0]:K=[(q[2]-N)/(V-N),0],_.push(K[0],K[1]),z.push(j)}Z+=1;break}}this.triangleCount=Z,this.trianglePositions.update(k),this.triangleVectors.update(I),this.triangleColors.update(B),this.triangleUVs.update(_),this.triangleIds.update(new Uint32Array(z))}},n.drawTransparent=n.draw=function(S){S=S||{};for(var w=this.gl,i=S.model||T,C=S.view||T,x=S.projection||T,k=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)k[0][I]=Math.max(k[0][I],this.clipBounds[0][I]),k[1][I]=Math.min(k[1][I],this.clipBounds[1][I]);var B={model:i,view:C,projection:x,inverseModel:T.slice(),clipBounds:k,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};B.inverseModel=l(B.inverseModel,B.model),w.disable(w.CULL_FACE),this.texture.bind(0);var _=new Array(16);u(_,B.view,B.model),u(_,B.projection,_),l(_,_);for(var I=0;I<3;++I)B.eyePosition[I]=_[12+I]/_[15];for(var z=_[15],I=0;I<3;++I)z+=this.lightPosition[I]*_[4*I+3];for(var I=0;I<3;++I){for(var O=_[12+I],F=0;F<3;++F)O+=_[4*F+I]*this.lightPosition[F];B.lightPosition[I]=O/z}if(this.triangleCount>0){var N=this.triShader;N.bind(),N.uniforms=B,this.triangleVAO.bind(),w.drawArrays(w.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},n.drawPick=function(S){S=S||{};for(var w=this.gl,i=S.model||T,C=S.view||T,x=S.projection||T,k=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)k[0][I]=Math.max(k[0][I],this.clipBounds[0][I]),k[1][I]=Math.min(k[1][I],this.clipBounds[1][I]);this._model=[].slice.call(i),this._view=[].slice.call(C),this._projection=[].slice.call(x),this._resolution=[w.drawingBufferWidth,w.drawingBufferHeight];var B={model:i,view:C,projection:x,clipBounds:k,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},_=this.pickShader;_.bind(),_.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),w.drawArrays(w.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},n.pick=function(S){if(!S||S.id!==this.pickId)return null;var w=S.value[0]+256*S.value[1]+65536*S.value[2],i=this.cells[w],C=this.positions[i[1]].slice(0,3),x={position:C,dataCoordinate:C,index:Math.floor(i[1]/48)};return this.traceType==="cone"?x.index=Math.floor(i[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[i[1]],x.velocity=this.vectors[i[1]].slice(0,3),x.divergence=this.vectors[i[1]][3],x.index=w),x},n.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()};function b(S,w){var i=t(S,w.meshShader.vertex,w.meshShader.fragment,null,w.meshShader.attributes);return i.attributes.position.location=0,i.attributes.color.location=2,i.attributes.uv.location=3,i.attributes.vector.location=4,i}function E(S,w){var i=t(S,w.pickShader.vertex,w.pickShader.fragment,null,w.pickShader.attributes);return i.attributes.position.location=0,i.attributes.id.location=1,i.attributes.vector.location=4,i}function p(S,w,i){var C=i.shaders;arguments.length===1&&(w=S,S=w.gl);var x=b(S,C),k=E(S,C),I=c(S,y(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=S.LINEAR_MIPMAP_LINEAR,I.magFilter=S.LINEAR;var B=s(S),_=s(S),z=s(S),O=s(S),F=s(S),N=a(S,[{buffer:B,type:S.FLOAT,size:4},{buffer:F,type:S.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:z,type:S.FLOAT,size:4},{buffer:O,type:S.FLOAT,size:2},{buffer:_,type:S.FLOAT,size:4}]),V=new f(S,I,x,k,B,_,F,z,O,N,i.traceType||"cone");return V.update(w),V}d.exports=p},7234:function(d,g,r){var t=r(6832),s=t([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// 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).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
// segment + 0 top vertex
// segment + 1 perimeter vertex a+1
// segment + 2 perimeter vertex a
// segment + 3 center base vertex
// segment + 4 perimeter vertex a
// segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {
const float segmentCount = 8.0;
float index = rawIndex - floor(rawIndex /
(segmentCount * 6.0)) *
(segmentCount * 6.0);
float segment = floor(0.001 + index/6.0);
float segmentIndex = index - (segment*6.0);
normal = -normalize(d);
if (segmentIndex > 2.99 && segmentIndex < 3.01) {
return mix(vec3(0.0), -d, coneOffset);
}
float nextAngle = (
(segmentIndex > 0.99 && segmentIndex < 1.01) ||
(segmentIndex > 4.99 && segmentIndex < 5.01)
) ? 1.0 : 0.0;
float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);
vec3 v1 = mix(d, vec3(0.0), coneOffset);
vec3 v2 = v1 - d;
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d)*0.25;
vec3 y = v * sin(angle) * length(d)*0.25;
vec3 v3 = v2 + x + y;
if (segmentIndex < 3.0) {
vec3 tx = u * sin(angle);
vec3 ty = v * -cos(angle);
vec3 tangent = tx + ty;
normal = normalize(cross(v3 - v1, tangent));
}
if (segmentIndex == 0.0) {
return mix(d, vec3(0.0), coneOffset);
}
return v3;
}
attribute vec3 vector;
attribute vec4 color, position;
attribute vec2 uv;
uniform float vectorScale, coneScale, coneOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
// Scale the vector magnitude to stay constant with
// model & view changes.
vec3 normal;
vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);
vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
//Lighting geometry parameters
vec4 cameraCoordinate = view * conePosition;
cameraCoordinate.xyz /= cameraCoordinate.w;
f_lightDirection = lightPosition - cameraCoordinate.xyz;
f_eyeDirection = eyePosition - cameraCoordinate.xyz;
f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
// vec4 m_position = model * vec4(conePosition, 1.0);
vec4 t_position = view * conePosition;
gl_Position = projection * t_position;
f_color = color;
f_data = conePosition.xyz;
f_position = position.xyz;
f_uv = uv;
}
`]),a=t([`#extension GL_OES_standard_derivatives : enable
precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float cookTorranceSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness,
float fresnel) {
float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
//Half angle vector
vec3 H = normalize(lightDirection + viewDirection);
//Geometric term
float NdotH = max(dot(surfaceNormal, H), 0.0);
float VdotH = max(dot(viewDirection, H), 0.000001);
float LdotH = max(dot(lightDirection, H), 0.000001);
float G1 = (2.0 * NdotH * VdotN) / VdotH;
float G2 = (2.0 * NdotH * LdotN) / LdotH;
float G = min(1.0, min(G1, G2));
//Distribution term
float D = beckmannDistribution(NdotH, roughness);
//Fresnel term
float F = pow(1.0 - VdotN, fresnel);
//Multiply terms and done
return G * F * D / max(3.14159265 * VdotN, 0.000001);
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
vec3 N = normalize(f_normal);
vec3 L = normalize(f_lightDirection);
vec3 V = normalize(f_eyeDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
vec4 surfaceColor = f_color * texture2D(texture, f_uv);
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = litColor * opacity;
}
`]),c=t([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// 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).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
// segment + 0 top vertex
// segment + 1 perimeter vertex a+1
// segment + 2 perimeter vertex a
// segment + 3 center base vertex
// segment + 4 perimeter vertex a
// segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {
const float segmentCount = 8.0;
float index = rawIndex - floor(rawIndex /
(segmentCount * 6.0)) *
(segmentCount * 6.0);
float segment = floor(0.001 + index/6.0);
float segmentIndex = index - (segment*6.0);
normal = -normalize(d);
if (segmentIndex > 2.99 && segmentIndex < 3.01) {
return mix(vec3(0.0), -d, coneOffset);
}
float nextAngle = (
(segmentIndex > 0.99 && segmentIndex < 1.01) ||
(segmentIndex > 4.99 && segmentIndex < 5.01)
) ? 1.0 : 0.0;
float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);
vec3 v1 = mix(d, vec3(0.0), coneOffset);
vec3 v2 = v1 - d;
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d)*0.25;
vec3 y = v * sin(angle) * length(d)*0.25;
vec3 v3 = v2 + x + y;
if (segmentIndex < 3.0) {
vec3 tx = u * sin(angle);
vec3 ty = v * -cos(angle);
vec3 tangent = tx + ty;
normal = normalize(cross(v3 - v1, tangent));
}
if (segmentIndex == 0.0) {
return mix(d, vec3(0.0), coneOffset);
}
return v3;
}
attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform float vectorScale, coneScale, coneOffset;
varying vec3 f_position;
varying vec4 f_id;
void main() {
vec3 normal;
vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);
vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
gl_Position = projection * view * conePosition;
f_id = id;
f_position = position.xyz;
}
`]),u=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float pickId;
varying vec3 f_position;
varying vec4 f_id;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
gl_FragColor = vec4(pickId, f_id.xyz);
}`]);g.meshShader={vertex:s,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},g.pickShader={vertex:c,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(d){d.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_SHADERS",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"}},6603:function(d,g,r){var t=r(1950);d.exports=function(a){return t[a]}},3110:function(d,g,r){d.exports=f;var t=r(5827),s=r(2944),a=r(7667),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(n,v,m,b){this.gl=n,this.shader=b,this.buffer=v,this.vao=m,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 l=u.prototype;l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(n){var v=this.gl,m=this.shader.uniforms;this.shader.bind();var b=m.view=n.view||c,E=m.projection=n.projection||c;m.model=n.model||c,m.clipBounds=this.clipBounds,m.opacity=this.opacity;var p=b[12],S=b[13],w=b[14],i=b[15],C=n._ortho||!1,x=C?2:1,k=x*this.pixelRatio*(E[3]*p+E[7]*S+E[11]*w+E[15]*i)/v.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)v.lineWidth(this.lineWidth[I]*this.pixelRatio),m.capSize=this.capSize[I]*k,this.lineCount[I]&&v.drawArrays(v.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function y(n,v){for(var m=0;m<3;++m)n[0][m]=Math.min(n[0][m],v[m]),n[1][m]=Math.max(n[1][m],v[m])}var h=function(){for(var n=new Array(3),v=0;v<3;++v){for(var m=[],b=1;b<=2;++b)for(var E=-1;E<=1;E+=2){var p=(b+v)%3,S=[0,0,0];S[p]=E,m.push(S)}n[v]=m}return n}();function T(n,v,m,b){for(var E=h[b],p=0;p<E.length;++p){var S=E[p];n.push(v[0],v[1],v[2],m[0],m[1],m[2],m[3],S[0],S[1],S[2])}return E.length}l.update=function(n){n=n||{},"lineWidth"in n&&(this.lineWidth=n.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in n&&(this.capSize=n.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in n&&(this.opacity=+n.opacity,this.opacity<1&&(this.hasAlpha=!0));var v=n.color||[[0,0,0],[0,0,0],[0,0,0]],m=n.position,b=n.error;if(Array.isArray(v[0])||(v=[v,v,v]),m&&b){var E=[],p=m.length,S=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var w=0;w<3;++w){this.lineOffset[w]=S;e:for(var i=0;i<p;++i){for(var C=m[i],x=0;x<3;++x)if(isNaN(C[x])||!isFinite(C[x]))continue e;var k=b[i],I=v[w];if(Array.isArray(I[0])&&(I=v[i]),I.length===3?I=[I[0],I[1],I[2],1]:I.length===4&&(I=[I[0],I[1],I[2],I[3]],!this.hasAlpha&&I[3]<1&&(this.hasAlpha=!0)),!(isNaN(k[0][w])||isNaN(k[1][w]))){if(k[0][w]<0){var B=C.slice();B[w]+=k[0][w],E.push(C[0],C[1],C[2],I[0],I[1],I[2],I[3],0,0,0,B[0],B[1],B[2],I[0],I[1],I[2],I[3],0,0,0),y(this.bounds,B),S+=2+T(E,B,I,w)}if(k[1][w]>0){var B=C.slice();B[w]+=k[1][w],E.push(C[0],C[1],C[2],I[0],I[1],I[2],I[3],0,0,0,B[0],B[1],B[2],I[0],I[1],I[2],I[3],0,0,0),y(this.bounds,B),S+=2+T(E,B,I,w)}}}this.lineCount[w]=S-this.lineOffset[w]}this.buffer.update(E)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function f(n){var v=n.gl,m=t(v),b=s(v,[{buffer:m,type:v.FLOAT,size:3,offset:0,stride:40},{buffer:m,type:v.FLOAT,size:4,offset:12,stride:40},{buffer:m,type:v.FLOAT,size:3,offset:28,stride:40}]),E=a(v);E.attributes.position.location=0,E.attributes.color.location=1,E.attributes.offset.location=2;var p=new u(v,m,b,E);return p.update(n),p}},7667:function(d,g,r){var t=r(6832),s=r(5158),a=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, offset;
attribute vec4 color;
uniform mat4 model, view, projection;
uniform float capSize;
varying vec4 fragColor;
varying vec3 fragPosition;
void main() {
vec4 worldPosition = model * vec4(position, 1.0);
worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);
gl_Position = projection * view * worldPosition;
fragColor = color;
fragPosition = position;
}`]),c=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float opacity;
varying vec3 fragPosition;
varying vec4 fragColor;
void main() {
if (
outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||
fragColor.a * opacity == 0.
) discard;
gl_FragColor = opacity * fragColor;
}`]);d.exports=function(u){return s(u,a,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(d,g,r){var t=r(8931);d.exports=S;var s=null,a,c,u,l;function y(w){var i=w.getParameter(w.FRAMEBUFFER_BINDING),C=w.getParameter(w.RENDERBUFFER_BINDING),x=w.getParameter(w.TEXTURE_BINDING_2D);return[i,C,x]}function h(w,i){w.bindFramebuffer(w.FRAMEBUFFER,i[0]),w.bindRenderbuffer(w.RENDERBUFFER,i[1]),w.bindTexture(w.TEXTURE_2D,i[2])}function T(w,i){var C=w.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL);s=new Array(C+1);for(var x=0;x<=C;++x){for(var k=new Array(C),I=0;I<x;++I)k[I]=w.COLOR_ATTACHMENT0+I;for(var I=x;I<C;++I)k[I]=w.NONE;s[x]=k}}function f(w){switch(w){case a:throw new Error("gl-fbo: Framebuffer unsupported");case c:throw new Error("gl-fbo: Framebuffer incomplete attachment");case u:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case l:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function n(w,i,C,x,k,I){if(!x)return null;var B=t(w,i,C,k,x);return B.magFilter=w.NEAREST,B.minFilter=w.NEAREST,B.mipSamples=1,B.bind(),w.framebufferTexture2D(w.FRAMEBUFFER,I,w.TEXTURE_2D,B.handle,0),B}function v(w,i,C,x,k){var I=w.createRenderbuffer();return w.bindRenderbuffer(w.RENDERBUFFER,I),w.renderbufferStorage(w.RENDERBUFFER,x,i,C),w.framebufferRenderbuffer(w.FRAMEBUFFER,k,w.RENDERBUFFER,I),I}function m(w){var i=y(w.gl),C=w.gl,x=w.handle=C.createFramebuffer(),k=w._shape[0],I=w._shape[1],B=w.color.length,_=w._ext,z=w._useStencil,O=w._useDepth,F=w._colorType;C.bindFramebuffer(C.FRAMEBUFFER,x);for(var N=0;N<B;++N)w.color[N]=n(C,k,I,F,C.RGBA,C.COLOR_ATTACHMENT0+N);B===0?(w._color_rb=v(C,k,I,C.RGBA4,C.COLOR_ATTACHMENT0),_&&_.drawBuffersWEBGL(s[0])):B>1&&_.drawBuffersWEBGL(s[B]);var V=C.getExtension("WEBGL_depth_texture");V?z?w.depth=n(C,k,I,V.UNSIGNED_INT_24_8_WEBGL,C.DEPTH_STENCIL,C.DEPTH_STENCIL_ATTACHMENT):O&&(w.depth=n(C,k,I,C.UNSIGNED_SHORT,C.DEPTH_COMPONENT,C.DEPTH_ATTACHMENT)):O&&z?w._depth_rb=v(C,k,I,C.DEPTH_STENCIL,C.DEPTH_STENCIL_ATTACHMENT):O?w._depth_rb=v(C,k,I,C.DEPTH_COMPONENT16,C.DEPTH_ATTACHMENT):z&&(w._depth_rb=v(C,k,I,C.STENCIL_INDEX,C.STENCIL_ATTACHMENT));var j=C.checkFramebufferStatus(C.FRAMEBUFFER);if(j!==C.FRAMEBUFFER_COMPLETE){w._destroyed=!0,C.bindFramebuffer(C.FRAMEBUFFER,null),C.deleteFramebuffer(w.handle),w.handle=null,w.depth&&(w.depth.dispose(),w.depth=null),w._depth_rb&&(C.deleteRenderbuffer(w._depth_rb),w._depth_rb=null);for(var N=0;N<w.color.length;++N)w.color[N].dispose(),w.color[N]=null;w._color_rb&&(C.deleteRenderbuffer(w._color_rb),w._color_rb=null),h(C,i),f(j)}h(C,i)}function b(w,i,C,x,k,I,B,_){this.gl=w,this._shape=[i|0,C|0],this._destroyed=!1,this._ext=_,this.color=new Array(k);for(var z=0;z<k;++z)this.color[z]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=x,this._useDepth=I,this._useStencil=B;var O=this,F=[i|0,C|0];Object.defineProperties(F,{0:{get:function(){return O._shape[0]},set:function(N){return O.width=N}},1:{get:function(){return O._shape[1]},set:function(N){return O.height=N}}}),this._shapeVector=F,m(this)}var E=b.prototype;function p(w,i,C){if(w._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(w._shape[0]===i&&w._shape[1]===C)){var x=w.gl,k=x.getParameter(x.MAX_RENDERBUFFER_SIZE);if(i<0||i>k||C<0||C>k)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");w._shape[0]=i,w._shape[1]=C;for(var I=y(x),B=0;B<w.color.length;++B)w.color[B].shape=w._shape;w._color_rb&&(x.bindRenderbuffer(x.RENDERBUFFER,w._color_rb),x.renderbufferStorage(x.RENDERBUFFER,x.RGBA4,w._shape[0],w._shape[1])),w.depth&&(w.depth.shape=w._shape),w._depth_rb&&(x.bindRenderbuffer(x.RENDERBUFFER,w._depth_rb),w._useDepth&&w._useStencil?x.renderbufferStorage(x.RENDERBUFFER,x.DEPTH_STENCIL,w._shape[0],w._shape[1]):w._useDepth?x.renderbufferStorage(x.RENDERBUFFER,x.DEPTH_COMPONENT16,w._shape[0],w._shape[1]):w._useStencil&&x.renderbufferStorage(x.RENDERBUFFER,x.STENCIL_INDEX,w._shape[0],w._shape[1])),x.bindFramebuffer(x.FRAMEBUFFER,w.handle);var _=x.checkFramebufferStatus(x.FRAMEBUFFER);_!==x.FRAMEBUFFER_COMPLETE&&(w.dispose(),h(x,I),f(_)),h(x,I)}}Object.defineProperties(E,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(w){if(Array.isArray(w)||(w=[w|0,w|0]),w.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var i=w[0]|0,C=w[1]|0;return p(this,i,C),[i,C]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(w){return w=w|0,p(this,w,this._shape[1]),w},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(w){return w=w|0,p(this,this._shape[0],w),w},enumerable:!1}}),E.bind=function(){if(!this._destroyed){var w=this.gl;w.bindFramebuffer(w.FRAMEBUFFER,this.handle),w.viewport(0,0,this._shape[0],this._shape[1])}},E.dispose=function(){if(!this._destroyed){this._destroyed=!0;var w=this.gl;w.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(w.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var i=0;i<this.color.length;++i)this.color[i].dispose(),this.color[i]=null;this._color_rb&&(w.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function S(w,i,C,x){a||(a=w.FRAMEBUFFER_UNSUPPORTED,c=w.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,u=w.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,l=w.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var k=w.getExtension("WEBGL_draw_buffers");if(!s&&k&&T(w,k),Array.isArray(i)&&(x=C,C=i[1]|0,i=i[0]|0),typeof i!="number")throw new Error("gl-fbo: Missing shape parameter");var I=w.getParameter(w.MAX_RENDERBUFFER_SIZE);if(i<0||i>I||C<0||C>I)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var B=1;if("color"in x){if(B=Math.max(x.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(k){if(B>w.getParameter(k.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+B+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var _=w.UNSIGNED_BYTE,z=w.getExtension("OES_texture_float");if(x.float&&B>0){if(!z)throw new Error("gl-fbo: Context does not support floating point textures");_=w.FLOAT}else x.preferFloat&&B>0&&z&&(_=w.FLOAT);var O=!0;"depth"in x&&(O=!!x.depth);var F=!1;return"stencil"in x&&(F=!!x.stencil),new b(w,i,C,_,B,O,F,k)}},3530:function(d,g,r){var t=r(8974).sprintf,s=r(6603),a=r(9365),c=r(8008);d.exports=u;function u(l,y,h){var T=a(y)||"of unknown name (see npm glsl-shader-name)",f="unknown type";h!==void 0&&(f=h===s.FRAGMENT_SHADER?"fragment":"vertex");for(var n=t(`Error compiling %s shader %s:
`,f,T),v=t("%s%s",n,l),m=l.split(`
`),b={},E=0;E<m.length;E++){var p=m[E];if(!(p===""||p==="\0")){var S=parseInt(p.split(":")[2]);if(isNaN(S))throw new Error(t("Could not parse error: %s",p));b[S]=p}}for(var w=c(y).split(`
`),E=0;E<w.length;E++)if(!(!b[E+3]&&!b[E+2]&&!b[E+1])){var i=w[E];if(n+=i+`
`,b[E+1]){var C=b[E+1];C=C.substr(C.split(":",3).join(":").length+1).trim(),n+=t(`^^^ %s
`,C)}}return{long:n.trim(),short:v.trim()}}},6386:function(d,g,r){d.exports=f;var t=r(5070),s=r(9560),a=r(5306),c=r(5158),u=r(5827),l=r(1292);function y(n,v,m,b,E,p,S){this.plot=n,this.shader=v,this.pickShader=m,this.positionBuffer=b,this.weightBuffer=E,this.colorBuffer=p,this.idBuffer=S,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var h=y.prototype,T=[0,0,1,0,0,1,1,0,1,1,0,1];h.draw=function(){var n=[1,0,0,0,1,0,0,0,1];return function(){var v=this.plot,m=this.shader,b=this.bounds,E=this.numVertices;if(!(E<=0)){var p=v.gl,S=v.dataBox,w=b[2]-b[0],i=b[3]-b[1],C=S[2]-S[0],x=S[3]-S[1];n[0]=2*w/C,n[4]=2*i/x,n[6]=2*(b[0]-S[0])/C-1,n[7]=2*(b[1]-S[1])/x-1,m.bind();var k=m.uniforms;k.viewTransform=n,k.shape=this.shape;var I=m.attributes;this.positionBuffer.bind(),I.position.pointer(),this.weightBuffer.bind(),I.weight.pointer(p.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),I.color.pointer(p.UNSIGNED_BYTE,!0),p.drawArrays(p.TRIANGLES,0,E)}}}(),h.drawPick=function(){var n=[1,0,0,0,1,0,0,0,1],v=[0,0,0,0];return function(m){var b=this.plot,E=this.pickShader,p=this.bounds,S=this.numVertices;if(!(S<=0)){var w=b.gl,i=b.dataBox,C=p[2]-p[0],x=p[3]-p[1],k=i[2]-i[0],I=i[3]-i[1];n[0]=2*C/k,n[4]=2*x/I,n[6]=2*(p[0]-i[0])/k-1,n[7]=2*(p[1]-i[1])/I-1;for(var B=0;B<4;++B)v[B]=m>>B*8&255;this.pickOffset=m,E.bind();var _=E.uniforms;_.viewTransform=n,_.pickOffset=v,_.shape=this.shape;var z=E.attributes;return this.positionBuffer.bind(),z.position.pointer(),this.weightBuffer.bind(),z.weight.pointer(w.UNSIGNED_BYTE,!1),this.idBuffer.bind(),z.pickId.pointer(w.UNSIGNED_BYTE,!1),w.drawArrays(w.TRIANGLES,0,S),m+this.shape[0]*this.shape[1]}}}(),h.pick=function(n,v,m){var b=this.pickOffset,E=this.shape[0]*this.shape[1];if(m<b||m>=b+E)return null;var p=m-b,S=this.xData,w=this.yData;return{object:this,pointId:p,dataCoord:[S[p%this.shape[0]],w[p/this.shape[0]|0]]}},h.update=function(n){n=n||{};var v=n.shape||[0,0],m=n.x||s(v[0]),b=n.y||s(v[1]),E=n.z||new Float32Array(v[0]*v[1]),p=n.zsmooth!==!1;this.xData=m,this.yData=b;var S=n.colorLevels||[0],w=n.colorValues||[0,0,0,1],i=S.length,C=this.bounds,x,k,I,B;p?(x=C[0]=m[0],k=C[1]=b[0],I=C[2]=m[m.length-1],B=C[3]=b[b.length-1]):(x=C[0]=m[0]+(m[1]-m[0])/2,k=C[1]=b[0]+(b[1]-b[0])/2,I=C[2]=m[m.length-1]+(m[m.length-1]-m[m.length-2])/2,B=C[3]=b[b.length-1]+(b[b.length-1]-b[b.length-2])/2);var _=1/(I-x),z=1/(B-k),O=v[0],F=v[1];this.shape=[O,F];var N=(p?(O-1)*(F-1):O*F)*(T.length>>>1);this.numVertices=N;for(var V=a.mallocUint8(N*4),j=a.mallocFloat32(N*2),$=a.mallocUint8(N*2),q=a.mallocUint32(N),oe=0,Z=p?O-1:O,G=p?F-1:F,re=0;re<G;++re){var H,J;p?(H=z*(b[re]-k),J=z*(b[re+1]-k)):(H=re<F-1?z*(b[re]-(b[re+1]-b[re])/2-k):z*(b[re]-(b[re]-b[re-1])/2-k),J=re<F-1?z*(b[re]+(b[re+1]-b[re])/2-k):z*(b[re]+(b[re]-b[re-1])/2-k));for(var ae=0;ae<Z;++ae){var K,Y;p?(K=_*(m[ae]-x),Y=_*(m[ae+1]-x)):(K=ae<O-1?_*(m[ae]-(m[ae+1]-m[ae])/2-x):_*(m[ae]-(m[ae]-m[ae-1])/2-x),Y=ae<O-1?_*(m[ae]+(m[ae+1]-m[ae])/2-x):_*(m[ae]+(m[ae]-m[ae-1])/2-x));for(var ie=0;ie<T.length;ie+=2){var ne=T[ie],le=T[ie+1],de=p?(re+le)*O+(ae+ne):re*O+ae,we=E[de],me=t.le(S,we),Le,ve,Ae,ye;if(me<0)Le=w[0],ve=w[1],Ae=w[2],ye=w[3];else if(me===i-1)Le=w[4*i-4],ve=w[4*i-3],Ae=w[4*i-2],ye=w[4*i-1];else{var Se=(we-S[me])/(S[me+1]-S[me]),_e=1-Se,ze=4*me,Ie=4*(me+1);Le=_e*w[ze]+Se*w[Ie],ve=_e*w[ze+1]+Se*w[Ie+1],Ae=_e*w[ze+2]+Se*w[Ie+2],ye=_e*w[ze+3]+Se*w[Ie+3]}V[4*oe]=255*Le,V[4*oe+1]=255*ve,V[4*oe+2]=255*Ae,V[4*oe+3]=255*ye,j[2*oe]=K*.5+Y*.5,j[2*oe+1]=H*.5+J*.5,$[2*oe]=ne,$[2*oe+1]=le,q[oe]=re*O+ae,oe+=1}}}this.positionBuffer.update(j),this.weightBuffer.update($),this.colorBuffer.update(V),this.idBuffer.update(q),a.free(j),a.free(V),a.free($),a.free(q)},h.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)};function f(n,v){var m=n.gl,b=c(m,l.vertex,l.fragment),E=c(m,l.pickVertex,l.pickFragment),p=u(m),S=u(m),w=u(m),i=u(m),C=new y(n,b,E,p,S,w,i);return C.update(v),n.addObject(C),C}},1292:function(d,g,r){var t=r(6832);d.exports={fragment:t([`precision lowp float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);
}
`]),vertex:t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
attribute vec4 color;
attribute vec2 weight;
uniform vec2 shape;
uniform mat3 viewTransform;
varying vec4 fragColor;
void main() {
vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
fragColor = color;
gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`]),pickFragment:t([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragId;
varying vec2 vWeight;
uniform vec2 shape;
uniform vec4 pickOffset;
void main() {
vec2 d = step(.5, vWeight);
vec4 id = fragId + pickOffset;
id.x += d.x + d.y*shape.x;
id.y += floor(id.x / 256.0);
id.x -= floor(id.x / 256.0) * 256.0;
id.z += floor(id.y / 256.0);
id.y -= floor(id.y / 256.0) * 256.0;
id.w += floor(id.z / 256.0);
id.z -= floor(id.z / 256.0) * 256.0;
gl_FragColor = id/255.;
}
`]),pickVertex:t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
attribute vec4 pickId;
attribute vec2 weight;
uniform vec2 shape;
uniform mat3 viewTransform;
varying vec4 fragId;
varying vec2 vWeight;
void main() {
vWeight = weight;
fragId = pickId;
vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`])}},248:function(d,g,r){var t=r(6832),s=r(5158),a=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;
uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;
varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;
vec4 project(vec3 p) {
return projection * view * model * vec4(p, 1.0);
}
void main() {
vec4 startPoint = project(position);
vec4 endPoint = project(nextPosition);
vec2 A = startPoint.xy / startPoint.w;
vec2 B = endPoint.xy / endPoint.w;
float clipAngle = atan(
(B.y - A.y) * screenShape.y,
(B.x - A.x) * screenShape.x
);
vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
sin(clipAngle),
-cos(clipAngle)
) / screenShape;
gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);
worldPosition = position;
pixelArcLength = arcLength;
fragColor = color;
}
`]),c=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform sampler2D dashTexture;
uniform float dashScale;
uniform float opacity;
varying vec3 worldPosition;
varying float pixelArcLength;
varying vec4 fragColor;
void main() {
if (
outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||
fragColor.a * opacity == 0.
) discard;
float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;
if(dashWeight < 0.5) {
discard;
}
gl_FragColor = fragColor * opacity;
}
`]),u=t([`precision highp float;
#define GLSLIFY 1
#define FLOAT_MAX 1.70141184e38
#define FLOAT_MIN 1.17549435e-38
// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl
vec4 packFloat(float v) {
float av = abs(v);
//Handle special cases
if(av < FLOAT_MIN) {
return vec4(0.0, 0.0, 0.0, 0.0);
} else if(v > FLOAT_MAX) {
return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;
} else if(v < -FLOAT_MAX) {
return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;
}
vec4 c = vec4(0,0,0,0);
//Compute exponent and mantissa
float e = floor(log2(av));
float m = av * pow(2.0, -e) - 1.0;
//Unpack mantissa
c[1] = floor(128.0 * m);
m -= c[1] / 128.0;
c[2] = floor(32768.0 * m);
m -= c[2] / 32768.0;
c[3] = floor(8388608.0 * m);
//Unpack exponent
float ebias = e + 127.0;
c[0] = floor(ebias / 2.0);
ebias -= c[0] * 2.0;
c[1] += floor(ebias) * 128.0;
//Unpack sign bit
c[0] += 128.0 * step(0.0, -v);
//Scale back to range
return c / 255.0;
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform float pickId;
uniform vec3 clipBounds[2];
varying vec3 worldPosition;
varying float pixelArcLength;
varying vec4 fragColor;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;
gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);
}`]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];g.createShader=function(y){return s(y,a,c,null,l)},g.createPickShader=function(y){return s(y,a,u,null,l)}},6086:function(d,g,r){d.exports=w;var t=r(5827),s=r(2944),a=r(8931),c=new Uint8Array(4),u=new Float32Array(c.buffer);function l(i,C,x,k){return c[0]=k,c[1]=x,c[2]=C,c[3]=i,u[0]}var y=r(5070),h=r(5050),T=r(248),f=T.createShader,n=T.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function m(i,C){for(var x=0,k=0;k<3;++k){var I=i[k]-C[k];x+=I*I}return Math.sqrt(x)}function b(i){for(var C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],x=0;x<3;++x)C[0][x]=Math.max(i[0][x],C[0][x]),C[1][x]=Math.min(i[1][x],C[1][x]);return C}function E(i,C,x,k){this.arcLength=i,this.position=C,this.index=x,this.dataCoordinate=k}function p(i,C,x,k,I,B){this.gl=i,this.shader=C,this.pickShader=x,this.buffer=k,this.vao=I,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=B,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var S=p.prototype;S.isTransparent=function(){return this.hasAlpha},S.isOpaque=function(){return!this.hasAlpha},S.pickSlots=1,S.setPickBase=function(i){this.pickId=i},S.drawTransparent=S.draw=function(i){if(this.vertexCount){var C=this.gl,x=this.shader,k=this.vao;x.bind(),x.uniforms={model:i.model||v,view:i.view||v,projection:i.projection||v,clipBounds:b(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[C.drawingBufferWidth,C.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(C.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},S.drawPick=function(i){if(this.vertexCount){var C=this.gl,x=this.pickShader,k=this.vao;x.bind(),x.uniforms={model:i.model||v,view:i.view||v,projection:i.projection||v,pickId:this.pickId,clipBounds:b(this.clipBounds),screenShape:[C.drawingBufferWidth,C.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(C.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},S.update=function(i){var C,x;this.dirty=!0;var k=!!i.connectGaps;"dashScale"in i&&(this.dashScale=i.dashScale),this.hasAlpha=!1,"opacity"in i&&(this.opacity=+i.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],B=[],_=[],z=0,O=0,F=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=i.position||i.positions;if(N){var V=i.color||i.colors||[0,0,0,1],j=i.lineWidth||1,$=!1;e:for(C=1;C<N.length;++C){var q=N[C-1],oe=N[C];for(B.push(z),_.push(q.slice()),x=0;x<3;++x){if(isNaN(q[x])||isNaN(oe[x])||!isFinite(q[x])||!isFinite(oe[x])){if(!k&&I.length>0){for(var Z=0;Z<24;++Z)I.push(I[I.length-12]);O+=2,$=!0}continue e}F[0][x]=Math.min(F[0][x],q[x],oe[x]),F[1][x]=Math.max(F[1][x],q[x],oe[x])}var G,re;Array.isArray(V[0])?(G=V.length>C-1?V[C-1]:V.length>0?V[V.length-1]:[0,0,0,1],re=V.length>C?V[C]:V.length>0?V[V.length-1]:[0,0,0,1]):G=re=V,G.length===3&&(G=[G[0],G[1],G[2],1]),re.length===3&&(re=[re[0],re[1],re[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var H;Array.isArray(j)?H=j.length>C-1?j[C-1]:j.length>0?j[j.length-1]:[0,0,0,1]:H=j;var J=z;if(z+=m(q,oe),$){for(x=0;x<2;++x)I.push(q[0],q[1],q[2],oe[0],oe[1],oe[2],J,H,G[0],G[1],G[2],G[3]);O+=2,$=!1}I.push(q[0],q[1],q[2],oe[0],oe[1],oe[2],J,H,G[0],G[1],G[2],G[3],q[0],q[1],q[2],oe[0],oe[1],oe[2],J,-H,G[0],G[1],G[2],G[3],oe[0],oe[1],oe[2],q[0],q[1],q[2],z,-H,re[0],re[1],re[2],re[3],oe[0],oe[1],oe[2],q[0],q[1],q[2],z,H,re[0],re[1],re[2],re[3]),O+=4}}if(this.buffer.update(I),B.push(z),_.push(N[N.length-1].slice()),this.bounds=F,this.vertexCount=O,this.points=_,this.arcLength=B,"dashes"in i){var ae=i.dashes,K=ae.slice();for(K.unshift(0),C=1;C<K.length;++C)K[C]=K[C-1]+K[C];var Y=h(new Array(256*4),[256,1,4]);for(C=0;C<256;++C){for(x=0;x<4;++x)Y.set(C,0,x,0);y.le(K,K[K.length-1]*C/255)&1?Y.set(C,0,0,0):Y.set(C,0,0,255)}this.texture.setPixels(Y)}},S.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},S.pick=function(i){if(!i||i.id!==this.pickId)return null;var C=l(i.value[0],i.value[1],i.value[2],0),x=y.le(this.arcLength,C);if(x<0)return null;if(x===this.arcLength.length-1)return new E(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),x);for(var k=this.points[x],I=this.points[Math.min(x+1,this.points.length-1)],B=(C-this.arcLength[x])/(this.arcLength[x+1]-this.arcLength[x]),_=1-B,z=[0,0,0],O=0;O<3;++O)z[O]=_*k[O]+B*I[O];var F=Math.min(B<.5?x:x+1,this.points.length-1);return new E(C,z,F,this.points[F])};function w(i){var C=i.gl||i.scene&&i.scene.gl,x=f(C);x.attributes.position.location=0,x.attributes.nextPosition.location=1,x.attributes.arcLength.location=2,x.attributes.lineWidth.location=3,x.attributes.color.location=4;var k=n(C);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 I=t(C),B=s(C,[{buffer:I,size:3,offset:0,stride:48},{buffer:I,size:3,offset:12,stride:48},{buffer:I,size:1,offset:24,stride:48},{buffer:I,size:1,offset:28,stride:48},{buffer:I,size:4,offset:32,stride:48}]),_=h(new Array(256*4),[256,1,4]),z=0;z<1024;++z)_.data[z]=255;var O=a(C,_);O.wrap=C.REPEAT;var F=new p(C,x,k,I,B,O);return F.update(i),F}},7332:function(d){d.exports=g;function g(r){var t=new Float32Array(16);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],t}},9823:function(d){d.exports=g;function g(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7787:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2],c=r[3],u=r[4],l=r[5],y=r[6],h=r[7],T=r[8],f=r[9],n=r[10],v=r[11],m=r[12],b=r[13],E=r[14],p=r[15],S=t*l-s*u,w=t*y-a*u,i=t*h-c*u,C=s*y-a*l,x=s*h-c*l,k=a*h-c*y,I=T*b-f*m,B=T*E-n*m,_=T*p-v*m,z=f*E-n*b,O=f*p-v*b,F=n*p-v*E;return S*F-w*O+i*z+C*_-x*B+k*I}},5950:function(d){d.exports=g;function g(r,t){var s=t[0],a=t[1],c=t[2],u=t[3],l=s+s,y=a+a,h=c+c,T=s*l,f=a*l,n=a*y,v=c*l,m=c*y,b=c*h,E=u*l,p=u*y,S=u*h;return r[0]=1-n-b,r[1]=f+S,r[2]=v-p,r[3]=0,r[4]=f-S,r[5]=1-T-b,r[6]=m+E,r[7]=0,r[8]=v+p,r[9]=m-E,r[10]=1-T-n,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7280:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=t[3],y=a+a,h=c+c,T=u+u,f=a*y,n=a*h,v=a*T,m=c*h,b=c*T,E=u*T,p=l*y,S=l*h,w=l*T;return r[0]=1-(m+E),r[1]=n+w,r[2]=v-S,r[3]=0,r[4]=n-w,r[5]=1-(f+E),r[6]=b+p,r[7]=0,r[8]=v+S,r[9]=b-p,r[10]=1-(f+m),r[11]=0,r[12]=s[0],r[13]=s[1],r[14]=s[2],r[15]=1,r}},9947:function(d){d.exports=g;function g(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7437:function(d){d.exports=g;function g(r,t){var s=t[0],a=t[1],c=t[2],u=t[3],l=t[4],y=t[5],h=t[6],T=t[7],f=t[8],n=t[9],v=t[10],m=t[11],b=t[12],E=t[13],p=t[14],S=t[15],w=s*y-a*l,i=s*h-c*l,C=s*T-u*l,x=a*h-c*y,k=a*T-u*y,I=c*T-u*h,B=f*E-n*b,_=f*p-v*b,z=f*S-m*b,O=n*p-v*E,F=n*S-m*E,N=v*S-m*p,V=w*N-i*F+C*O+x*z-k*_+I*B;return V?(V=1/V,r[0]=(y*N-h*F+T*O)*V,r[1]=(c*F-a*N-u*O)*V,r[2]=(E*I-p*k+S*x)*V,r[3]=(v*k-n*I-m*x)*V,r[4]=(h*z-l*N-T*_)*V,r[5]=(s*N-c*z+u*_)*V,r[6]=(p*C-b*I-S*i)*V,r[7]=(f*I-v*C+m*i)*V,r[8]=(l*F-y*z+T*B)*V,r[9]=(a*z-s*F-u*B)*V,r[10]=(b*k-E*C+S*w)*V,r[11]=(n*C-f*k-m*w)*V,r[12]=(y*_-l*O-h*B)*V,r[13]=(s*O-a*_+c*B)*V,r[14]=(E*i-b*x-p*w)*V,r[15]=(f*x-n*i+v*w)*V,r):null}},3012:function(d,g,r){var t=r(9947);d.exports=s;function s(a,c,u,l){var y,h,T,f,n,v,m,b,E,p,S=c[0],w=c[1],i=c[2],C=l[0],x=l[1],k=l[2],I=u[0],B=u[1],_=u[2];return Math.abs(S-I)<1e-6&&Math.abs(w-B)<1e-6&&Math.abs(i-_)<1e-6?t(a):(m=S-I,b=w-B,E=i-_,p=1/Math.sqrt(m*m+b*b+E*E),m*=p,b*=p,E*=p,y=x*E-k*b,h=k*m-C*E,T=C*b-x*m,p=Math.sqrt(y*y+h*h+T*T),p?(p=1/p,y*=p,h*=p,T*=p):(y=0,h=0,T=0),f=b*T-E*h,n=E*y-m*T,v=m*h-b*y,p=Math.sqrt(f*f+n*n+v*v),p?(p=1/p,f*=p,n*=p,v*=p):(f=0,n=0,v=0),a[0]=y,a[1]=f,a[2]=m,a[3]=0,a[4]=h,a[5]=n,a[6]=b,a[7]=0,a[8]=T,a[9]=v,a[10]=E,a[11]=0,a[12]=-(y*S+h*w+T*i),a[13]=-(f*S+n*w+v*i),a[14]=-(m*S+b*w+E*i),a[15]=1,a)}},104:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=t[3],y=t[4],h=t[5],T=t[6],f=t[7],n=t[8],v=t[9],m=t[10],b=t[11],E=t[12],p=t[13],S=t[14],w=t[15],i=s[0],C=s[1],x=s[2],k=s[3];return r[0]=i*a+C*y+x*n+k*E,r[1]=i*c+C*h+x*v+k*p,r[2]=i*u+C*T+x*m+k*S,r[3]=i*l+C*f+x*b+k*w,i=s[4],C=s[5],x=s[6],k=s[7],r[4]=i*a+C*y+x*n+k*E,r[5]=i*c+C*h+x*v+k*p,r[6]=i*u+C*T+x*m+k*S,r[7]=i*l+C*f+x*b+k*w,i=s[8],C=s[9],x=s[10],k=s[11],r[8]=i*a+C*y+x*n+k*E,r[9]=i*c+C*h+x*v+k*p,r[10]=i*u+C*T+x*m+k*S,r[11]=i*l+C*f+x*b+k*w,i=s[12],C=s[13],x=s[14],k=s[15],r[12]=i*a+C*y+x*n+k*E,r[13]=i*c+C*h+x*v+k*p,r[14]=i*u+C*T+x*m+k*S,r[15]=i*l+C*f+x*b+k*w,r}},5268:function(d){d.exports=g;function g(r,t,s,a,c,u,l){var y=1/(t-s),h=1/(a-c),T=1/(u-l);return r[0]=-2*y,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*h,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*T,r[11]=0,r[12]=(t+s)*y,r[13]=(c+a)*h,r[14]=(l+u)*T,r[15]=1,r}},1120:function(d){d.exports=g;function g(r,t,s,a,c){var u=1/Math.tan(t/2),l=1/(a-c);return r[0]=u/s,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=u,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(c+a)*l,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*c*a*l,r[15]=0,r}},4422:function(d){d.exports=g;function g(r,t,s,a){var c=a[0],u=a[1],l=a[2],y=Math.sqrt(c*c+u*u+l*l),h,T,f,n,v,m,b,E,p,S,w,i,C,x,k,I,B,_,z,O,F,N,V,j;return Math.abs(y)<1e-6?null:(y=1/y,c*=y,u*=y,l*=y,h=Math.sin(s),T=Math.cos(s),f=1-T,n=t[0],v=t[1],m=t[2],b=t[3],E=t[4],p=t[5],S=t[6],w=t[7],i=t[8],C=t[9],x=t[10],k=t[11],I=c*c*f+T,B=u*c*f+l*h,_=l*c*f-u*h,z=c*u*f-l*h,O=u*u*f+T,F=l*u*f+c*h,N=c*l*f+u*h,V=u*l*f-c*h,j=l*l*f+T,r[0]=n*I+E*B+i*_,r[1]=v*I+p*B+C*_,r[2]=m*I+S*B+x*_,r[3]=b*I+w*B+k*_,r[4]=n*z+E*O+i*F,r[5]=v*z+p*O+C*F,r[6]=m*z+S*O+x*F,r[7]=b*z+w*O+k*F,r[8]=n*N+E*V+i*j,r[9]=v*N+p*V+C*j,r[10]=m*N+S*V+x*j,r[11]=b*N+w*V+k*j,t!==r&&(r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r)}},6109:function(d){d.exports=g;function g(r,t,s){var a=Math.sin(s),c=Math.cos(s),u=t[4],l=t[5],y=t[6],h=t[7],T=t[8],f=t[9],n=t[10],v=t[11];return t!==r&&(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[4]=u*c+T*a,r[5]=l*c+f*a,r[6]=y*c+n*a,r[7]=h*c+v*a,r[8]=T*c-u*a,r[9]=f*c-l*a,r[10]=n*c-y*a,r[11]=v*c-h*a,r}},7115:function(d){d.exports=g;function g(r,t,s){var a=Math.sin(s),c=Math.cos(s),u=t[0],l=t[1],y=t[2],h=t[3],T=t[8],f=t[9],n=t[10],v=t[11];return t!==r&&(r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=u*c-T*a,r[1]=l*c-f*a,r[2]=y*c-n*a,r[3]=h*c-v*a,r[8]=u*a+T*c,r[9]=l*a+f*c,r[10]=y*a+n*c,r[11]=h*a+v*c,r}},5240:function(d){d.exports=g;function g(r,t,s){var a=Math.sin(s),c=Math.cos(s),u=t[0],l=t[1],y=t[2],h=t[3],T=t[4],f=t[5],n=t[6],v=t[7];return t!==r&&(r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=u*c+T*a,r[1]=l*c+f*a,r[2]=y*c+n*a,r[3]=h*c+v*a,r[4]=T*c-u*a,r[5]=f*c-l*a,r[6]=n*c-y*a,r[7]=v*c-h*a,r}},3668:function(d){d.exports=g;function g(r,t,s){var a=s[0],c=s[1],u=s[2];return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=t[3]*a,r[4]=t[4]*c,r[5]=t[5]*c,r[6]=t[6]*c,r[7]=t[7]*c,r[8]=t[8]*u,r[9]=t[9]*u,r[10]=t[10]*u,r[11]=t[11]*u,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}},998:function(d){d.exports=g;function g(r,t,s){var a=s[0],c=s[1],u=s[2],l,y,h,T,f,n,v,m,b,E,p,S;return t===r?(r[12]=t[0]*a+t[4]*c+t[8]*u+t[12],r[13]=t[1]*a+t[5]*c+t[9]*u+t[13],r[14]=t[2]*a+t[6]*c+t[10]*u+t[14],r[15]=t[3]*a+t[7]*c+t[11]*u+t[15]):(l=t[0],y=t[1],h=t[2],T=t[3],f=t[4],n=t[5],v=t[6],m=t[7],b=t[8],E=t[9],p=t[10],S=t[11],r[0]=l,r[1]=y,r[2]=h,r[3]=T,r[4]=f,r[5]=n,r[6]=v,r[7]=m,r[8]=b,r[9]=E,r[10]=p,r[11]=S,r[12]=l*a+f*c+b*u+t[12],r[13]=y*a+n*c+E*u+t[13],r[14]=h*a+v*c+p*u+t[14],r[15]=T*a+m*c+S*u+t[15]),r}},2142:function(d){d.exports=g;function g(r,t){if(r===t){var s=t[1],a=t[2],c=t[3],u=t[6],l=t[7],y=t[11];r[1]=t[4],r[2]=t[8],r[3]=t[12],r[4]=s,r[6]=t[9],r[7]=t[13],r[8]=a,r[9]=u,r[11]=t[14],r[12]=c,r[13]=l,r[14]=y}else r[0]=t[0],r[1]=t[4],r[2]=t[8],r[3]=t[12],r[4]=t[1],r[5]=t[5],r[6]=t[9],r[7]=t[13],r[8]=t[2],r[9]=t[6],r[10]=t[10],r[11]=t[14],r[12]=t[3],r[13]=t[7],r[14]=t[11],r[15]=t[15];return r}},4340:function(d,g,r){var t=r(957),s=r(7309);d.exports=y;function a(h,T){for(var f=[0,0,0,0],n=0;n<4;++n)for(var v=0;v<4;++v)f[v]+=h[4*n+v]*T[n];return f}function c(h,T,f,n,v){for(var m=a(n,a(f,a(T,[h[0],h[1],h[2],1]))),b=0;b<3;++b)m[b]/=m[3];return[.5*v[0]*(1+m[0]),.5*v[1]*(1-m[1])]}function u(h,T){if(h.length===2){for(var f=0,n=0,v=0;v<2;++v)f+=Math.pow(T[v]-h[0][v],2),n+=Math.pow(T[v]-h[1][v],2);return f=Math.sqrt(f),n=Math.sqrt(n),f+n<1e-6?[1,0]:[n/(f+n),f/(n+f)]}else if(h.length===3){var m=[0,0];return s(h[0],h[1],h[2],T,m),t(h,m)}return[]}function l(h,T){for(var f=[0,0,0],n=0;n<h.length;++n)for(var v=h[n],m=T[n],b=0;b<3;++b)f[b]+=m*v[b];return f}function y(h,T,f,n,v,m){if(h.length===1)return[0,h[0].slice()];for(var b=new Array(h.length),E=0;E<h.length;++E)b[E]=c(h[E],f,n,v,m);for(var p=0,S=1/0,E=0;E<b.length;++E){for(var w=0,i=0;i<2;++i)w+=Math.pow(b[E][i]-T[i],2);w<S&&(S=w,p=E)}for(var C=u(b,T),x=0,E=0;E<3;++E){if(C[E]<-.001||C[E]>1.0001)return null;x+=C[E]}return Math.abs(x-1)>.001?null:[p,l(h,C),C]}},2056:function(d,g,r){var t=r(6832),s=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, normal;
attribute vec4 color;
attribute vec2 uv;
uniform mat4 model
, view
, projection
, inverseModel;
uniform vec3 eyePosition
, lightPosition;
varying vec3 f_normal
, f_lightDirection
, f_eyeDirection
, f_data;
varying vec4 f_color;
varying vec2 f_uv;
vec4 project(vec3 p) {
return projection * view * model * vec4(p, 1.0);
}
void main() {
gl_Position = project(position);
//Lighting geometry parameters
vec4 cameraCoordinate = view * vec4(position , 1.0);
cameraCoordinate.xyz /= cameraCoordinate.w;
f_lightDirection = lightPosition - cameraCoordinate.xyz;
f_eyeDirection = eyePosition - cameraCoordinate.xyz;
f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
f_color = color;
f_data = position;
f_uv = uv;
}
`]),a=t([`#extension GL_OES_standard_derivatives : enable
precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float cookTorranceSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness,
float fresnel) {
float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
//Half angle vector
vec3 H = normalize(lightDirection + viewDirection);
//Geometric term
float NdotH = max(dot(surfaceNormal, H), 0.0);
float VdotH = max(dot(viewDirection, H), 0.000001);
float LdotH = max(dot(lightDirection, H), 0.000001);
float G1 = (2.0 * NdotH * VdotN) / VdotH;
float G2 = (2.0 * NdotH * LdotN) / LdotH;
float G = min(1.0, min(G1, G2));
//Distribution term
float D = beckmannDistribution(NdotH, roughness);
//Fresnel term
float F = pow(1.0 - VdotN, fresnel);
//Multiply terms and done
return G * F * D / max(3.14159265 * VdotN, 0.000001);
}
//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float roughness
, fresnel
, kambient
, kdiffuse
, kspecular;
uniform sampler2D texture;
varying vec3 f_normal
, f_lightDirection
, f_eyeDirection
, f_data;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (f_color.a == 0.0 ||
outOfRange(clipBounds[0], clipBounds[1], f_data)
) discard;
vec3 N = normalize(f_normal);
vec3 L = normalize(f_lightDirection);
vec3 V = normalize(f_eyeDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
//float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = litColor * f_color.a;
}
`]),c=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
uniform mat4 model, view, projection;
varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;
void main() {
gl_Position = projection * view * model * vec4(position, 1.0);
f_color = color;
f_data = position;
f_uv = uv;
}`]),u=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform sampler2D texture;
uniform float opacity;
varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;
gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]),l=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
attribute float pointSize;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);
} else {
gl_Position = projection * view * model * vec4(position, 1.0);
}
gl_PointSize = pointSize;
f_color = color;
f_uv = uv;
}`]),y=t([`precision highp float;
#define GLSLIFY 1
uniform sampler2D texture;
uniform float opacity;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);
if(dot(pointR, pointR) > 0.25) {
discard;
}
gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]),h=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
attribute vec4 id;
uniform mat4 model, view, projection;
varying vec3 f_position;
varying vec4 f_id;
void main() {
gl_Position = projection * view * model * vec4(position, 1.0);
f_id = id;
f_position = position;
}`]),T=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float pickId;
varying vec3 f_position;
varying vec4 f_id;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
gl_FragColor = vec4(pickId, f_id.xyz);
}`]),f=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute float pointSize;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];
varying vec3 f_position;
varying vec4 f_id;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
} else {
gl_Position = projection * view * model * vec4(position, 1.0);
gl_PointSize = pointSize;
}
f_id = id;
f_position = position;
}`]),n=t([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
void main() {
gl_Position = projection * view * model * vec4(position, 1.0);
}`]),v=t([`precision highp float;
#define GLSLIFY 1
uniform vec3 contourColor;
void main() {
gl_FragColor = vec4(contourColor, 1.0);
}
`]);g.meshShader={vertex:s,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},g.wireShader={vertex:c,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},g.pointShader={vertex:l,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},g.pickShader={vertex:h,fragment:T,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},g.pointPickShader={vertex:f,fragment:T,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},g.contourShader={vertex:n,fragment:v,attributes:[{name:"position",type:"vec3"}]}},8116:function(d,g,r){var t=1e-6,s=1e-6,a=r(5158),c=r(5827),u=r(2944),l=r(8931),y=r(115),h=r(104),T=r(7437),f=r(5050),n=r(9156),v=r(7212),m=r(5306),b=r(2056),E=r(4340),p=b.meshShader,S=b.wireShader,w=b.pointShader,i=b.pickShader,C=b.pointPickShader,x=b.contourShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(Z,G,re,H,J,ae,K,Y,ie,ne,le,de,we,me,Le,ve,Ae,ye,Se,_e,ze,Ie,Ne,et,st,Ze,Ke){this.gl=Z,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=re,this.lineShader=H,this.pointShader=J,this.pickShader=ae,this.pointPickShader=K,this.contourShader=Y,this.trianglePositions=ie,this.triangleColors=le,this.triangleNormals=we,this.triangleUVs=de,this.triangleIds=ne,this.triangleVAO=me,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Le,this.edgeColors=Ae,this.edgeUVs=ye,this.edgeIds=ve,this.edgeVAO=Se,this.edgeCount=0,this.pointPositions=_e,this.pointColors=Ie,this.pointUVs=Ne,this.pointSizes=et,this.pointIds=ze,this.pointVAO=st,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ze,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 B=I.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(Z){this.pickId=Z};function _(Z,G){if(!G||!G.length)return 1;for(var re=0;re<G.length;++re){if(G.length<2)return 1;if(G[re][0]===Z)return G[re][1];if(G[re][0]>Z&&re>0){var H=(G[re][0]-Z)/(G[re][0]-G[re-1][0]);return G[re][1]*(1-H)+H*G[re-1][1]}}return 1}function z(Z,G){for(var re=n({colormap:Z,nshades:256,format:"rgba"}),H=new Uint8Array(256*4),J=0;J<256;++J){for(var ae=re[J],K=0;K<3;++K)H[4*J+K]=ae[K];G?H[4*J+3]=255*_(J/255,G):H[4*J+3]=255*ae[3]}return f(H,[256,256,4],[4,0,1])}function O(Z){for(var G=Z.length,re=new Array(G),H=0;H<G;++H)re[H]=Z[H][2];return re}B.highlight=function(Z){if(!Z||!this.contourEnable){this.contourCount=0;return}for(var G=v(this.cells,this.intensity,Z.intensity),re=G.cells,H=G.vertexIds,J=G.vertexWeights,ae=re.length,K=m.mallocFloat32(2*3*ae),Y=0,ie=0;ie<ae;++ie)for(var ne=re[ie],le=0;le<2;++le){var de=ne[0];ne.length===2&&(de=ne[le]);for(var we=H[de][0],me=H[de][1],Le=J[de],ve=1-Le,Ae=this.positions[we],ye=this.positions[me],Se=0;Se<3;++Se)K[Y++]=Le*Ae[Se]+ve*ye[Se]}this.contourCount=Y/3|0,this.contourPositions.update(K.subarray(0,Y)),m.free(K)},B.update=function(Z){Z=Z||{};var G=this.gl;this.dirty=!0,"contourEnable"in Z&&(this.contourEnable=Z.contourEnable),"contourColor"in Z&&(this.contourColor=Z.contourColor),"lineWidth"in Z&&(this.lineWidth=Z.lineWidth),"lightPosition"in Z&&(this.lightPosition=Z.lightPosition),this.hasAlpha=!1,"opacity"in Z&&(this.opacity=Z.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in Z&&(this.opacityscale=Z.opacityscale,this.hasAlpha=!0),"ambient"in Z&&(this.ambientLight=Z.ambient),"diffuse"in Z&&(this.diffuseLight=Z.diffuse),"specular"in Z&&(this.specularLight=Z.specular),"roughness"in Z&&(this.roughness=Z.roughness),"fresnel"in Z&&(this.fresnel=Z.fresnel),Z.texture?(this.texture.dispose(),this.texture=l(G,Z.texture)):Z.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=G.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=G.LINEAR,this.texture.setPixels(z(Z.colormap,this.opacityscale)),this.texture.generateMipmap());var re=Z.cells,H=Z.positions;if(!(!H||!re)){var J=[],ae=[],K=[],Y=[],ie=[],ne=[],le=[],de=[],we=[],me=[],Le=[],ve=[],Ae=[],ye=[];this.cells=re,this.positions=H;var Se=Z.vertexNormals,_e=Z.cellNormals,ze=Z.vertexNormalsEpsilon===void 0?t:Z.vertexNormalsEpsilon,Ie=Z.faceNormalsEpsilon===void 0?s:Z.faceNormalsEpsilon;Z.useFacetNormals&&!_e&&(_e=y.faceNormals(re,H,Ie)),!_e&&!Se&&(Se=y.vertexNormals(re,H,ze));var Ne=Z.vertexColors,et=Z.cellColors,st=Z.meshColor||[1,1,1,1],Ze=Z.vertexUVs,Ke=Z.vertexIntensity,nt=Z.cellUVs,it=Z.cellIntensity,lt=1/0,vt=-1/0;if(!Ze&&!nt)if(Ke)if(Z.vertexIntensityBounds)lt=+Z.vertexIntensityBounds[0],vt=+Z.vertexIntensityBounds[1];else for(var xt=0;xt<Ke.length;++xt){var Je=Ke[xt];lt=Math.min(lt,Je),vt=Math.max(vt,Je)}else if(it)if(Z.cellIntensityBounds)lt=+Z.cellIntensityBounds[0],vt=+Z.cellIntensityBounds[1];else for(var xt=0;xt<it.length;++xt){var Je=it[xt];lt=Math.min(lt,Je),vt=Math.max(vt,Je)}else for(var xt=0;xt<H.length;++xt){var Je=H[xt][2];lt=Math.min(lt,Je),vt=Math.max(vt,Je)}Ke?this.intensity=Ke:it?this.intensity=it:this.intensity=O(H),this.pickVertex=!(it||et);var Pe=Z.pointSizes,Ue=Z.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var xt=0;xt<H.length;++xt)for(var He=H[xt],Oe=0;Oe<3;++Oe)isNaN(He[Oe])||!isFinite(He[Oe])||(this.bounds[0][Oe]=Math.min(this.bounds[0][Oe],He[Oe]),this.bounds[1][Oe]=Math.max(this.bounds[1][Oe],He[Oe]));var Ce=0,ge=0,pe=0;e:for(var xt=0;xt<re.length;++xt){var Te=re[xt];switch(Te.length){case 1:for(var be=Te[0],He=H[be],Oe=0;Oe<3;++Oe)if(isNaN(He[Oe])||!isFinite(He[Oe]))continue e;me.push(He[0],He[1],He[2]);var ke;Ne?ke=Ne[be]:et?ke=et[xt]:ke=st,this.opacityscale&&Ke?ae.push(ke[0],ke[1],ke[2],this.opacity*_((Ke[be]-lt)/(vt-lt),this.opacityscale)):ke.length===3?Le.push(ke[0],ke[1],ke[2],this.opacity):(Le.push(ke[0],ke[1],ke[2],ke[3]*this.opacity),ke[3]<1&&(this.hasAlpha=!0));var Ve;Ze?Ve=Ze[be]:Ke?Ve=[(Ke[be]-lt)/(vt-lt),0]:nt?Ve=nt[xt]:it?Ve=[(it[xt]-lt)/(vt-lt),0]:Ve=[(He[2]-lt)/(vt-lt),0],ve.push(Ve[0],Ve[1]),Pe?Ae.push(Pe[be]):Ae.push(Ue),ye.push(xt),pe+=1;break;case 2:for(var Oe=0;Oe<2;++Oe)for(var be=Te[Oe],He=H[be],je=0;je<3;++je)if(isNaN(He[je])||!isFinite(He[je]))continue e;for(var Oe=0;Oe<2;++Oe){var be=Te[Oe],He=H[be];ne.push(He[0],He[1],He[2]);var ke;Ne?ke=Ne[be]:et?ke=et[xt]:ke=st,this.opacityscale&&Ke?ae.push(ke[0],ke[1],ke[2],this.opacity*_((Ke[be]-lt)/(vt-lt),this.opacityscale)):ke.length===3?le.push(ke[0],ke[1],ke[2],this.opacity):(le.push(ke[0],ke[1],ke[2],ke[3]*this.opacity),ke[3]<1&&(this.hasAlpha=!0));var Ve;Ze?Ve=Ze[be]:Ke?Ve=[(Ke[be]-lt)/(vt-lt),0]:nt?Ve=nt[xt]:it?Ve=[(it[xt]-lt)/(vt-lt),0]:Ve=[(He[2]-lt)/(vt-lt),0],de.push(Ve[0],Ve[1]),we.push(xt)}ge+=1;break;case 3:for(var Oe=0;Oe<3;++Oe)for(var be=Te[Oe],He=H[be],je=0;je<3;++je)if(isNaN(He[je])||!isFinite(He[je]))continue e;for(var Oe=0;Oe<3;++Oe){var be=Te[2-Oe],He=H[be];J.push(He[0],He[1],He[2]);var ke;Ne?ke=Ne[be]:et?ke=et[xt]:ke=st,ke?this.opacityscale&&Ke?ae.push(ke[0],ke[1],ke[2],this.opacity*_((Ke[be]-lt)/(vt-lt),this.opacityscale)):ke.length===3?ae.push(ke[0],ke[1],ke[2],this.opacity):(ae.push(ke[0],ke[1],ke[2],ke[3]*this.opacity),ke[3]<1&&(this.hasAlpha=!0)):ae.push(.5,.5,.5,1);var Ve;Ze?Ve=Ze[be]:Ke?Ve=[(Ke[be]-lt)/(vt-lt),0]:nt?Ve=nt[xt]:it?Ve=[(it[xt]-lt)/(vt-lt),0]:Ve=[(He[2]-lt)/(vt-lt),0],Y.push(Ve[0],Ve[1]);var at;Se?at=Se[be]:at=_e[xt],K.push(at[0],at[1],at[2]),ie.push(xt)}Ce+=1;break}}this.pointCount=pe,this.edgeCount=ge,this.triangleCount=Ce,this.pointPositions.update(me),this.pointColors.update(Le),this.pointUVs.update(ve),this.pointSizes.update(Ae),this.pointIds.update(new Uint32Array(ye)),this.edgePositions.update(ne),this.edgeColors.update(le),this.edgeUVs.update(de),this.edgeIds.update(new Uint32Array(we)),this.trianglePositions.update(J),this.triangleColors.update(ae),this.triangleUVs.update(Y),this.triangleNormals.update(K),this.triangleIds.update(new Uint32Array(ie))}},B.drawTransparent=B.draw=function(Z){Z=Z||{};for(var G=this.gl,re=Z.model||k,H=Z.view||k,J=Z.projection||k,ae=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],K=0;K<3;++K)ae[0][K]=Math.max(ae[0][K],this.clipBounds[0][K]),ae[1][K]=Math.min(ae[1][K],this.clipBounds[1][K]);var Y={model:re,view:H,projection:J,inverseModel:k.slice(),clipBounds:ae,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};Y.inverseModel=T(Y.inverseModel,Y.model),G.disable(G.CULL_FACE),this.texture.bind(0);var ie=new Array(16);h(ie,Y.view,Y.model),h(ie,Y.projection,ie),T(ie,ie);for(var K=0;K<3;++K)Y.eyePosition[K]=ie[12+K]/ie[15];for(var ne=ie[15],K=0;K<3;++K)ne+=this.lightPosition[K]*ie[4*K+3];for(var K=0;K<3;++K){for(var le=ie[12+K],de=0;de<3;++de)le+=ie[4*de+K]*this.lightPosition[de];Y.lightPosition[K]=le/ne}if(this.triangleCount>0){var we=this.triShader;we.bind(),we.uniforms=Y,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=Y,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=Y,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=Y,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(Z){Z=Z||{};for(var G=this.gl,re=Z.model||k,H=Z.view||k,J=Z.projection||k,ae=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],K=0;K<3;++K)ae[0][K]=Math.max(ae[0][K],this.clipBounds[0][K]),ae[1][K]=Math.min(ae[1][K],this.clipBounds[1][K]);this._model=[].slice.call(re),this._view=[].slice.call(H),this._projection=[].slice.call(J),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var Y={model:re,view:H,projection:J,clipBounds:ae,pickId:this.pickId/255},ie=this.pickShader;if(ie.bind(),ie.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ie=this.pointPickShader;ie.bind(),ie.uniforms=Y,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(Z){if(!Z||Z.id!==this.pickId)return null;for(var G=Z.value[0]+256*Z.value[1]+65536*Z.value[2],re=this.cells[G],H=this.positions,J=new Array(re.length),ae=0;ae<re.length;++ae)J[ae]=H[re[ae]];var K=Z.coord[0],Y=Z.coord[1];if(!this.pickVertex){var ie=this.positions[re[0]],ne=this.positions[re[1]],le=this.positions[re[2]],de=[(ie[0]+ne[0]+le[0])/3,(ie[1]+ne[1]+le[1])/3,(ie[2]+ne[2]+le[2])/3];return{_cellCenter:!0,position:[K,Y],index:G,cell:re,cellId:G,intensity:this.intensity[G],dataCoordinate:de}}var we=E(J,[K*this.pixelRatio,this._resolution[1]-Y*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!we)return null;for(var me=we[2],Le=0,ae=0;ae<re.length;++ae)Le+=me[ae]*this.intensity[re[ae]];return{position:we[1],index:re[we[0]],cell:re,cellId:G,intensity:Le,dataCoordinate:this.positions[re[we[0]]]}},B.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()};function F(Z){var G=a(Z,p.vertex,p.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G.attributes.normal.location=4,G}function N(Z){var G=a(Z,S.vertex,S.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G}function V(Z){var G=a(Z,w.vertex,w.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G.attributes.pointSize.location=4,G}function j(Z){var G=a(Z,i.vertex,i.fragment);return G.attributes.position.location=0,G.attributes.id.location=1,G}function $(Z){var G=a(Z,C.vertex,C.fragment);return G.attributes.position.location=0,G.attributes.id.location=1,G.attributes.pointSize.location=4,G}function q(Z){var G=a(Z,x.vertex,x.fragment);return G.attributes.position.location=0,G}function oe(Z,G){arguments.length===1&&(G=Z,Z=G.gl);var re=Z.getExtension("OES_standard_derivatives")||Z.getExtension("MOZ_OES_standard_derivatives")||Z.getExtension("WEBKIT_OES_standard_derivatives");if(!re)throw new Error("derivatives not supported");var H=F(Z),J=N(Z),ae=V(Z),K=j(Z),Y=$(Z),ie=q(Z),ne=l(Z,f(new Uint8Array([255,255,255,255]),[1,1,4]));ne.generateMipmap(),ne.minFilter=Z.LINEAR_MIPMAP_LINEAR,ne.magFilter=Z.LINEAR;var le=c(Z),de=c(Z),we=c(Z),me=c(Z),Le=c(Z),ve=u(Z,[{buffer:le,type:Z.FLOAT,size:3},{buffer:Le,type:Z.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:de,type:Z.FLOAT,size:4},{buffer:we,type:Z.FLOAT,size:2},{buffer:me,type:Z.FLOAT,size:3}]),Ae=c(Z),ye=c(Z),Se=c(Z),_e=c(Z),ze=u(Z,[{buffer:Ae,type:Z.FLOAT,size:3},{buffer:_e,type:Z.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ye,type:Z.FLOAT,size:4},{buffer:Se,type:Z.FLOAT,size:2}]),Ie=c(Z),Ne=c(Z),et=c(Z),st=c(Z),Ze=c(Z),Ke=u(Z,[{buffer:Ie,type:Z.FLOAT,size:3},{buffer:Ze,type:Z.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ne,type:Z.FLOAT,size:4},{buffer:et,type:Z.FLOAT,size:2},{buffer:st,type:Z.FLOAT,size:1}]),nt=c(Z),it=u(Z,[{buffer:nt,type:Z.FLOAT,size:3}]),lt=new I(Z,ne,H,J,ae,K,Y,ie,le,Le,de,we,me,ve,Ae,_e,ye,Se,ze,Ie,Ze,Ne,et,st,Ke,nt,it);return lt.update(G),lt}d.exports=oe},4554:function(d,g,r){d.exports=l;var t=r(5827),s=r(5158),a=r(2709);function c(y,h,T){this.plot=y,this.vbo=h,this.shader=T}var u=c.prototype;u.bind=function(){var y=this.shader;this.vbo.bind(),this.shader.bind(),y.attributes.coord.pointer(),y.uniforms.screenBox=this.plot.screenBox},u.drawBox=function(){var y=[0,0],h=[0,0];return function(T,f,n,v,m){var b=this.plot,E=this.shader,p=b.gl;y[0]=T,y[1]=f,h[0]=n,h[1]=v,E.uniforms.lo=y,E.uniforms.hi=h,E.uniforms.color=m,p.drawArrays(p.TRIANGLE_STRIP,0,4)}}(),u.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function l(y){var h=y.gl,T=t(h,[0,0,0,1,1,0,1,1]),f=s(h,a.boxVert,a.lineFrag);return new c(y,T,f)}},3016:function(d,g,r){d.exports=h;var t=r(5827),s=r(5158),a=r(5070),c=r(2709);function u(T,f,n,v){this.plot=T,this.vbo=f,this.shader=n,this.tickShader=v,this.ticks=[[],[]]}function l(T,f){return T-f}var y=u.prototype;y.draw=function(){var T=[0,0],f=[0,0],n=[0,0];return function(){for(var v=this.plot,m=this.vbo,b=this.shader,E=this.ticks,p=v.gl,S=v._tickBounds,w=v.dataBox,i=v.viewBox,C=v.gridLineWidth,x=v.gridLineColor,k=v.gridLineEnable,I=v.pixelRatio,B=0;B<2;++B){var _=S[B],z=S[B+2],O=z-_,F=.5*(w[B+2]+w[B]),N=w[B+2]-w[B];f[B]=2*O/N,T[B]=2*(_-F)/N}b.bind(),m.bind(),b.attributes.dataCoord.pointer(),b.uniforms.dataShift=T,b.uniforms.dataScale=f;for(var V=0,B=0;B<2;++B){n[0]=n[1]=0,n[B]=1,b.uniforms.dataAxis=n,b.uniforms.lineWidth=C[B]/(i[B+2]-i[B])*I,b.uniforms.color=x[B];var j=E[B].length*6;k[B]&&j&&p.drawArrays(p.TRIANGLES,V,j),V+=j}}}(),y.drawTickMarks=function(){var T=[0,0],f=[0,0],n=[1,0],v=[0,1],m=[0,0],b=[0,0];return function(){for(var E=this.plot,p=this.vbo,S=this.tickShader,w=this.ticks,i=E.gl,C=E._tickBounds,x=E.dataBox,k=E.viewBox,I=E.pixelRatio,B=E.screenBox,_=B[2]-B[0],z=B[3]-B[1],O=k[2]-k[0],F=k[3]-k[1],N=0;N<2;++N){var V=C[N],j=C[N+2],$=j-V,q=.5*(x[N+2]+x[N]),oe=x[N+2]-x[N];f[N]=2*$/oe,T[N]=2*(V-q)/oe}f[0]*=O/_,T[0]*=O/_,f[1]*=F/z,T[1]*=F/z,S.bind(),p.bind(),S.attributes.dataCoord.pointer();var Z=S.uniforms;Z.dataShift=T,Z.dataScale=f;var G=E.tickMarkLength,re=E.tickMarkWidth,H=E.tickMarkColor,J=0,ae=w[0].length*6,K=Math.min(a.ge(w[0],(x[0]-C[0])/(C[2]-C[0]),l),w[0].length),Y=Math.min(a.gt(w[0],(x[2]-C[0])/(C[2]-C[0]),l),w[0].length),ie=J+6*K,ne=6*Math.max(0,Y-K),le=Math.min(a.ge(w[1],(x[1]-C[1])/(C[3]-C[1]),l),w[1].length),de=Math.min(a.gt(w[1],(x[3]-C[1])/(C[3]-C[1]),l),w[1].length),we=ae+6*le,me=6*Math.max(0,de-le);m[0]=2*(k[0]-G[1])/_-1,m[1]=(k[3]+k[1])/z-1,b[0]=G[1]*I/_,b[1]=re[1]*I/z,me&&(Z.color=H[1],Z.tickScale=b,Z.dataAxis=v,Z.screenOffset=m,i.drawArrays(i.TRIANGLES,we,me)),m[0]=(k[2]+k[0])/_-1,m[1]=2*(k[1]-G[0])/z-1,b[0]=re[0]*I/_,b[1]=G[0]*I/z,ne&&(Z.color=H[0],Z.tickScale=b,Z.dataAxis=n,Z.screenOffset=m,i.drawArrays(i.TRIANGLES,ie,ne)),m[0]=2*(k[2]+G[3])/_-1,m[1]=(k[3]+k[1])/z-1,b[0]=G[3]*I/_,b[1]=re[3]*I/z,me&&(Z.color=H[3],Z.tickScale=b,Z.dataAxis=v,Z.screenOffset=m,i.drawArrays(i.TRIANGLES,we,me)),m[0]=(k[2]+k[0])/_-1,m[1]=2*(k[3]+G[2])/z-1,b[0]=re[2]*I/_,b[1]=G[2]*I/z,ne&&(Z.color=H[2],Z.tickScale=b,Z.dataAxis=n,Z.screenOffset=m,i.drawArrays(i.TRIANGLES,ie,ne))}}(),y.update=function(){var T=[1,1,-1,-1,1,-1],f=[1,-1,1,1,-1,-1];return function(n){var v=n.ticks,m=n.bounds,b=new Float32Array(6*3*(v[0].length+v[1].length));this.plot.zeroLineEnable;for(var E=0,p=[[],[]],S=0;S<2;++S)for(var w=p[S],i=v[S],C=m[S],x=m[S+2],k=0;k<i.length;++k){var I=(i[k].x-C)/(x-C);w.push(I);for(var B=0;B<6;++B)b[E++]=I,b[E++]=T[B],b[E++]=f[B]}this.ticks=p,this.vbo.update(b)}}(),y.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()};function h(T){var f=T.gl,n=t(f),v=s(f,c.gridVert,c.gridFrag),m=s(f,c.tickVert,c.gridFrag),b=new u(T,n,v,m);return b}},1154:function(d,g,r){d.exports=l;var t=r(5827),s=r(5158),a=r(2709);function c(y,h,T){this.plot=y,this.vbo=h,this.shader=T}var u=c.prototype;u.bind=function(){var y=this.shader;this.vbo.bind(),this.shader.bind(),y.attributes.coord.pointer(),y.uniforms.screenBox=this.plot.screenBox},u.drawLine=function(){var y=[0,0],h=[0,0];return function(T,f,n,v,m,b){var E=this.plot,p=this.shader,S=E.gl;y[0]=T,y[1]=f,h[0]=n,h[1]=v,p.uniforms.start=y,p.uniforms.end=h,p.uniforms.width=m*E.pixelRatio,p.uniforms.color=b,S.drawArrays(S.TRIANGLE_STRIP,0,4)}}(),u.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function l(y){var h=y.gl,T=t(h,[-1,-1,-1,1,1,-1,1,1]),f=s(h,a.lineVert,a.lineFrag),n=new c(y,T,f);return n}},2709:function(d,g,r){var t=r(6832),s=t([`precision lowp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = vec4(color.xyz * color.w, color.w);
}
`]);d.exports={lineVert:t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 coord;
uniform vec4 screenBox;
uniform vec2 start, end;
uniform float width;
vec2 perp(vec2 v) {
return vec2(v.y, -v.x);
}
vec2 screen(vec2 v) {
return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}
void main() {
vec2 delta = normalize(perp(start - end));
vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));
gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);
}
`]),lineFrag:s,textVert:t([`#define GLSLIFY 1
attribute vec3 textCoordinate;
uniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;
uniform float angle;
void main() {
float dataOffset = textCoordinate.z;
vec2 glyphOffset = textCoordinate.xy;
mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +
glyphMatrix * glyphOffset * textScale + screenOffset;
gl_Position = vec4(screenCoordinate, 0, 1);
}
`]),textFrag:s,gridVert:t([`precision mediump float;
#define GLSLIFY 1
attribute vec3 dataCoord;
uniform vec2 dataAxis, dataShift, dataScale;
uniform float lineWidth;
void main() {
vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;
gl_Position = vec4(pos, 0, 1);
}
`]),gridFrag:s,boxVert:t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 coord;
uniform vec4 screenBox;
uniform vec2 lo, hi;
vec2 screen(vec2 v) {
return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}
void main() {
gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);
}
`]),tickVert:t([`precision mediump float;
#define GLSLIFY 1
attribute vec3 dataCoord;
uniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;
void main() {
vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);
}
`])}},5613:function(d,g,r){d.exports=h;var t=r(5827),s=r(5158),a=r(6946),c=r(5070),u=r(2709);function l(T,f,n){this.plot=T,this.vbo=f,this.shader=n,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var y=l.prototype;y.drawTicks=function(){var T=[0,0],f=[0,0],n=[0,0];return function(v){var m=this.plot,b=this.shader,E=this.tickX[v],p=this.tickOffset[v],S=m.gl,w=m.viewBox,i=m.dataBox,C=m.screenBox,x=m.pixelRatio,k=m.tickEnable,I=m.tickPad,B=m.tickColor,_=m.tickAngle,z=m.labelEnable,O=m.labelPad,F=m.labelColor,N=m.labelAngle,V=this.labelOffset[v],j=this.labelCount[v],$=c.lt(E,i[v]),q=c.le(E,i[v+2]);T[0]=T[1]=0,T[v]=1,f[v]=(w[2+v]+w[v])/(C[2+v]-C[v])-1;var oe=2/C[2+(v^1)]-C[v^1];f[v^1]=oe*w[v^1]-1,k[v]&&(f[v^1]-=oe*x*I[v],$<q&&p[q]>p[$]&&(b.uniforms.dataAxis=T,b.uniforms.screenOffset=f,b.uniforms.color=B[v],b.uniforms.angle=_[v],S.drawArrays(S.TRIANGLES,p[$],p[q]-p[$]))),z[v]&&j&&(f[v^1]-=oe*x*O[v],b.uniforms.dataAxis=n,b.uniforms.screenOffset=f,b.uniforms.color=F[v],b.uniforms.angle=N[v],S.drawArrays(S.TRIANGLES,V,j)),f[v^1]=oe*w[2+(v^1)]-1,k[v+2]&&(f[v^1]+=oe*x*I[v+2],$<q&&p[q]>p[$]&&(b.uniforms.dataAxis=T,b.uniforms.screenOffset=f,b.uniforms.color=B[v+2],b.uniforms.angle=_[v+2],S.drawArrays(S.TRIANGLES,p[$],p[q]-p[$]))),z[v+2]&&j&&(f[v^1]+=oe*x*O[v+2],b.uniforms.dataAxis=n,b.uniforms.screenOffset=f,b.uniforms.color=F[v+2],b.uniforms.angle=N[v+2],S.drawArrays(S.TRIANGLES,V,j))}}(),y.drawTitle=function(){var T=[0,0],f=[0,0];return function(){var n=this.plot,v=this.shader,m=n.gl,b=n.screenBox,E=n.titleCenter,p=n.titleAngle,S=n.titleColor,w=n.pixelRatio;if(this.titleCount){for(var i=0;i<2;++i)f[i]=2*(E[i]*w-b[i])/(b[2+i]-b[i])-1;v.bind(),v.uniforms.dataAxis=T,v.uniforms.screenOffset=f,v.uniforms.angle=p,v.uniforms.color=S,m.drawArrays(m.TRIANGLES,this.titleOffset,this.titleCount)}}}(),y.bind=function(){var T=[0,0],f=[0,0],n=[0,0];return function(){var v=this.plot,m=this.shader,b=v._tickBounds,E=v.dataBox,p=v.screenBox,S=v.viewBox;m.bind();for(var w=0;w<2;++w){var i=b[w],C=b[w+2],x=C-i,k=.5*(E[w+2]+E[w]),I=E[w+2]-E[w],B=S[w],_=S[w+2],z=_-B,O=p[w],F=p[w+2],N=F-O;f[w]=2*x/I*z/N,T[w]=2*(i-k)/I*z/N}n[1]=2*v.pixelRatio/(p[3]-p[1]),n[0]=n[1]*(p[3]-p[1])/(p[2]-p[0]),m.uniforms.dataScale=f,m.uniforms.dataShift=T,m.uniforms.textScale=n,this.vbo.bind(),m.attributes.textCoordinate.pointer()}}(),y.update=function(T){var f=[],n=T.ticks,v=T.bounds,m,b,E,p,S;for(S=0;S<2;++S){var w=[Math.floor(f.length/3)],i=[-1/0],C=n[S];for(m=0;m<C.length;++m){var x=C[m],k=x.x,I=x.text,B=x.font||"sans-serif";p=x.fontSize||12;for(var _=1/(v[S+2]-v[S]),z=v[S],O=I.split(`
`),F=0;F<O.length;F++)for(E=a(B,O[F]).data,b=0;b<E.length;b+=2)f.push(E[b]*p,-E[b+1]*p-F*p*1.2,(k-z)*_);w.push(Math.floor(f.length/3)),i.push(k)}this.tickOffset[S]=w,this.tickX[S]=i}for(S=0;S<2;++S){for(this.labelOffset[S]=Math.floor(f.length/3),E=a(T.labelFont[S],T.labels[S],{textAlign:"center"}).data,p=T.labelSize[S],m=0;m<E.length;m+=2)f.push(E[m]*p,-E[m+1]*p,0);this.labelCount[S]=Math.floor(f.length/3)-this.labelOffset[S]}for(this.titleOffset=Math.floor(f.length/3),E=a(T.titleFont,T.title).data,p=T.titleSize,m=0;m<E.length;m+=2)f.push(E[m]*p,-E[m+1]*p,0);this.titleCount=Math.floor(f.length/3)-this.titleOffset,this.vbo.update(f)},y.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function h(T){var f=T.gl,n=t(f),v=s(f,u.textVert,u.textFrag),m=new l(T,n,v);return m}},2117:function(d,g,r){d.exports=f;var t=r(2611),s=r(3016),a=r(5613),c=r(1154),u=r(4554);function l(n,v){this.gl=n,this.pickBuffer=v,this.screenBox=[0,0,n.drawingBufferWidth,n.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.zeroLineWidth=[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 y=l.prototype;y.setDirty=function(){this.dirty=this.pickDirty=!0},y.setOverlayDirty=function(){this.dirty=!0},y.nextDepthValue=function(){return this._depthCounter++/65536},y.draw=function(){return function(){var n=this.gl,v=this.screenBox,m=this.viewBox,b=this.dataBox,E=this.pixelRatio,p=this.grid,S=this.line,w=this.text,i=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,n.bindFramebuffer(n.FRAMEBUFFER,null),n.enable(n.SCISSOR_TEST),n.disable(n.DEPTH_TEST),n.depthFunc(n.LESS),n.depthMask(!1),n.enable(n.BLEND),n.blendEquation(n.FUNC_ADD,n.FUNC_ADD),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),this.borderColor){n.scissor(v[0],v[1],v[2]-v[0],v[3]-v[1]);var C=this.borderColor;n.clearColor(C[0]*C[3],C[1]*C[3],C[2]*C[3],C[3]),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)}n.scissor(m[0],m[1],m[2]-m[0],m[3]-m[1]),n.viewport(m[0],m[1],m[2]-m[0],m[3]-m[1]);var x=this.backgroundColor;n.clearColor(x[0]*x[3],x[1]*x[3],x[2]*x[3],x[3]),n.clear(n.COLOR_BUFFER_BIT),p.draw();var k=this.zeroLineEnable,I=this.zeroLineColor,B=this.zeroLineWidth;if(k[0]||k[1]){S.bind();for(var _=0;_<2;++_)if(!(!k[_]||!(b[_]<=0&&b[_+2]>=0))){var z=v[_]-b[_]*(v[_+2]-v[_])/(b[_+2]-b[_]);_===0?S.drawLine(z,v[1],z,v[3],B[_],I[_]):S.drawLine(v[0],z,v[2],z,B[_],I[_])}}for(var _=0;_<i.length;++_)i[_].draw();n.viewport(v[0],v[1],v[2]-v[0],v[3]-v[1]),n.scissor(v[0],v[1],v[2]-v[0],v[3]-v[1]),this.grid.drawTickMarks(),S.bind();var O=this.borderLineEnable,F=this.borderLineWidth,N=this.borderLineColor;O[1]&&S.drawLine(m[0],m[1]-.5*F[1]*E,m[0],m[3]+.5*F[3]*E,F[1],N[1]),O[0]&&S.drawLine(m[0]-.5*F[0]*E,m[1],m[2]+.5*F[2]*E,m[1],F[0],N[0]),O[3]&&S.drawLine(m[2],m[1]-.5*F[1]*E,m[2],m[3]+.5*F[3]*E,F[3],N[3]),O[2]&&S.drawLine(m[0]-.5*F[0]*E,m[3],m[2]+.5*F[2]*E,m[3],F[2],N[2]),w.bind();for(var _=0;_<2;++_)w.drawTicks(_);this.titleEnable&&w.drawTitle();for(var V=this.overlays,_=0;_<V.length;++_)V[_].draw();n.disable(n.SCISSOR_TEST),n.disable(n.BLEND),n.depthMask(!0)}}}(),y.drawPick=function(){return function(){if(!this.static){var n=this.pickBuffer;this.gl,this._pickTimeout=null,n.begin();for(var v=1,m=this.objects,b=0;b<m.length;++b)v=m[b].drawPick(v);n.end()}}}(),y.pick=function(){return function(n,v){if(!this.static){var m=this.pixelRatio,b=this.pickPixelRatio,E=this.viewBox,p=Math.round((n-E[0]/m)*b)|0,S=Math.round((v-E[1]/m)*b)|0,w=this.pickBuffer.query(p,S,this.pickRadius);if(!w)return null;for(var i=w.id+(w.value[0]<<8)+(w.value[1]<<16)+(w.value[2]<<24),C=this.objects,x=0;x<C.length;++x){var k=C[x].pick(p,S,i);if(k)return k}return null}}}();function h(n){for(var v=n.slice(),m=0;m<v.length;++m)v[m]=v[m].slice();return v}function T(n,v){return n.x-v.x}y.setScreenBox=function(n){var v=this.screenBox,m=this.pixelRatio;v[0]=Math.round(n[0]*m)|0,v[1]=Math.round(n[1]*m)|0,v[2]=Math.round(n[2]*m)|0,v[3]=Math.round(n[3]*m)|0,this.setDirty()},y.setDataBox=function(n){var v=this.dataBox,m=v[0]!==n[0]||v[1]!==n[1]||v[2]!==n[2]||v[3]!==n[3];m&&(v[0]=n[0],v[1]=n[1],v[2]=n[2],v[3]=n[3],this.setDirty())},y.setViewBox=function(n){var v=this.pixelRatio,m=this.viewBox;m[0]=Math.round(n[0]*v)|0,m[1]=Math.round(n[1]*v)|0,m[2]=Math.round(n[2]*v)|0,m[3]=Math.round(n[3]*v)|0;var b=this.pickPixelRatio;this.pickBuffer.shape=[Math.round((n[2]-n[0])*b)|0,Math.round((n[3]-n[1])*b)|0],this.setDirty()},y.update=function(n){n=n||{};var v=this.gl;this.pixelRatio=n.pixelRatio||1;var m=this.pixelRatio;this.pickPixelRatio=Math.max(m,1),this.setScreenBox(n.screenBox||[0,0,v.drawingBufferWidth/m,v.drawingBufferHeight/m]),this.screenBox,this.setViewBox(n.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/m,.125*(this.screenBox[3]-this.screenBox[1])/m,.875*(this.screenBox[2]-this.screenBox[0])/m,.875*(this.screenBox[3]-this.screenBox[1])/m]);var b=this.viewBox,E=(b[2]-b[0])/(b[3]-b[1]);this.setDataBox(n.dataBox||[-10,-10/E,10,10/E]),this.borderColor=n.borderColor!==!1?(n.borderColor||[0,0,0,0]).slice():!1,this.backgroundColor=(n.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(n.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(n.gridLineWidth||[1,1]).slice(),this.gridLineColor=h(n.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(n.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(n.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=h(n.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(n.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(n.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=h(n.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(n.titleCenter||[.5*(b[0]+b[2])/m,(b[3]+120)/m]).slice(),this.titleEnable=!("titleEnable"in n)||!!n.titleEnable,this.titleAngle=n.titleAngle||0,this.titleColor=(n.titleColor||[0,0,0,1]).slice(),this.labelPad=(n.labelPad||[15,15,15,15]).slice(),this.labelAngle=(n.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(n.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=h(n.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(n.tickPad||[15,15,15,15]).slice(),this.tickAngle=(n.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(n.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=h(n.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(n.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(n.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=h(n.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var p=n.ticks||[[],[]],S=this._tickBounds;S[0]=S[1]=1/0,S[2]=S[3]=-1/0;for(var w=0;w<2;++w){var i=p[w].slice(0);i.length!==0&&(i.sort(T),S[w]=Math.min(S[w],i[0].x),S[w+2]=Math.max(S[w+2],i[i.length-1].x))}this.grid.update({bounds:S,ticks:p}),this.text.update({bounds:S,ticks:p,labels:n.labels||["x","y"],labelSize:n.labelSize||[12,12],labelFont:n.labelFont||["sans-serif","sans-serif"],title:n.title||"",titleSize:n.titleSize||18,titleFont:n.titleFont||"sans-serif"}),this.static=!!n.static,this.setDirty()},y.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var n=this.objects.length-1;n>=0;--n)this.objects[n].dispose();this.objects.length=0;for(var n=this.overlays.length-1;n>=0;--n)this.overlays[n].dispose();this.overlays.length=0,this.gl=null},y.addObject=function(n){this.objects.indexOf(n)<0&&(this.objects.push(n),this.setDirty())},y.removeObject=function(n){for(var v=this.objects,m=0;m<v.length;++m)if(v[m]===n){v.splice(m,1),this.setDirty();break}},y.addOverlay=function(n){this.overlays.indexOf(n)<0&&(this.overlays.push(n),this.setOverlayDirty())},y.removeOverlay=function(n){for(var v=this.overlays,m=0;m<v.length;++m)if(v[m]===n){v.splice(m,1),this.setOverlayDirty();break}};function f(n){var v=n.gl,m=t(v,[v.drawingBufferWidth,v.drawingBufferHeight]),b=new l(v,m);return b.grid=s(b),b.text=a(b),b.line=c(b),b.box=u(b),b.update(n),b}},4296:function(d,g,r){d.exports=y;var t=r(8161),s=r(1152),a=r(6145),c=r(6475),u=r(2565),l=r(5233);function y(h,T){h=h||document.body,T=T||{};var f=[.01,1/0];"distanceLimits"in T&&(f[0]=T.distanceLimits[0],f[1]=T.distanceLimits[1]),"zoomMin"in T&&(f[0]=T.zoomMin),"zoomMax"in T&&(f[1]=T.zoomMax);var n=s({center:T.center||[0,0,0],up:T.up||[0,1,0],eye:T.eye||[0,0,10],mode:T.mode||"orbit",distanceLimits:f}),v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],m=0,b=h.clientWidth,E=h.clientHeight,p={keyBindingMode:"rotate",enableWheel:!0,view:n,element:h,delay:T.delay||16,rotateSpeed:T.rotateSpeed||1,zoomSpeed:T.zoomSpeed||1,translateSpeed:T.translateSpeed||1,flipX:!!T.flipX,flipY:!!T.flipY,modes:n.modes,_ortho:T._ortho||T.projection&&T.projection.type==="orthographic"||!1,tick:function(){var S=t(),w=this.delay,i=S-2*w;n.idle(S-w),n.recalcMatrix(i),n.flush(S-(100+w*2));for(var C=!0,x=n.computedMatrix,k=0;k<16;++k)C=C&&v[k]===x[k],v[k]=x[k];var I=h.clientWidth===b&&h.clientHeight===E;return b=h.clientWidth,E=h.clientHeight,C?!I:(m=Math.exp(n.computedRadius[0]),!0)},lookAt:function(S,w,i){n.lookAt(n.lastT(),S,w,i)},rotate:function(S,w,i){n.rotate(n.lastT(),S,w,i)},pan:function(S,w,i){n.pan(n.lastT(),S,w,i)},translate:function(S,w,i){n.translate(n.lastT(),S,w,i)}};return Object.defineProperties(p,{matrix:{get:function(){return n.computedMatrix},set:function(S){return n.setMatrix(n.lastT(),S),n.computedMatrix},enumerable:!0},mode:{get:function(){return n.getMode()},set:function(S){var w=n.computedUp.slice(),i=n.computedEye.slice(),C=n.computedCenter.slice();if(n.setMode(S),S==="turntable"){var x=t();n._active.lookAt(x,i,C,w),n._active.lookAt(x+500,i,C,[0,0,1]),n._active.flush(x)}return n.getMode()},enumerable:!0},center:{get:function(){return n.computedCenter},set:function(S){return n.lookAt(n.lastT(),null,S),n.computedCenter},enumerable:!0},eye:{get:function(){return n.computedEye},set:function(S){return n.lookAt(n.lastT(),S),n.computedEye},enumerable:!0},up:{get:function(){return n.computedUp},set:function(S){return n.lookAt(n.lastT(),null,null,S),n.computedUp},enumerable:!0},distance:{get:function(){return m},set:function(S){return n.setDistance(n.lastT(),S),S},enumerable:!0},distanceLimits:{get:function(){return n.getDistanceLimits(f)},set:function(S){return n.setDistanceLimits(S),S},enumerable:!0}}),h.addEventListener("contextmenu",function(S){return S.preventDefault(),!1}),p._lastX=-1,p._lastY=-1,p._lastMods={shift:!1,control:!1,alt:!1,meta:!1},p.enableMouseListeners=function(){p.mouseListener=a(h,S),h.addEventListener("touchstart",function(w){var i=u(w.changedTouches[0],h);S(0,i[0],i[1],p._lastMods),S(1,i[0],i[1],p._lastMods)},l?{passive:!0}:!1),h.addEventListener("touchmove",function(w){var i=u(w.changedTouches[0],h);S(1,i[0],i[1],p._lastMods),w.preventDefault()},l?{passive:!1}:!1),h.addEventListener("touchend",function(w){S(0,p._lastX,p._lastY,p._lastMods)},l?{passive:!0}:!1);function S(w,i,C,x){var k=p.keyBindingMode;if(k!==!1){var I=k==="rotate",B=k==="pan",_=k==="zoom",z=!!x.control,O=!!x.alt,F=!!x.shift,N=!!(w&1),V=!!(w&2),j=!!(w&4),$=1/h.clientHeight,q=$*(i-p._lastX),oe=$*(C-p._lastY),Z=p.flipX?1:-1,G=p.flipY?1:-1,re=Math.PI*p.rotateSpeed,H=t();if(p._lastX!==-1&&p._lastY!==-1&&((I&&N&&!z&&!O&&!F||N&&!z&&!O&&F)&&n.rotate(H,Z*re*q,-G*re*oe,0),(B&&N&&!z&&!O&&!F||V||N&&z&&!O&&!F)&&n.pan(H,-p.translateSpeed*q*m,p.translateSpeed*oe*m,0),_&&N&&!z&&!O&&!F||j||N&&!z&&O&&!F)){var J=-p.zoomSpeed*oe/window.innerHeight*(H-n.lastT())*100;n.pan(H,0,0,m*(Math.exp(J)-1))}return p._lastX=i,p._lastY=C,p._lastMods=x,!0}}p.wheelListener=c(h,function(w,i){if(p.keyBindingMode!==!1&&p.enableWheel){var C=p.flipX?1:-1,x=p.flipY?1:-1,k=t();if(Math.abs(w)>Math.abs(i))n.rotate(k,0,0,-w*C*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var I=-p.zoomSpeed*x*i/window.innerHeight*(k-n.lastT())/20;n.pan(k,0,0,m*(Math.exp(I)-1))}}},!0)},p.enableMouseListeners(),p}},8245:function(d,g,r){var t=r(6832),s=r(5158),a=t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
uv = position;
gl_Position = vec4(position, 0, 1);
}`]),c=t([`precision mediump float;
#define GLSLIFY 1
uniform sampler2D accumBuffer;
varying vec2 uv;
void main() {
vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));
gl_FragColor = min(vec4(1,1,1,1), accum);
}`]);d.exports=function(u){return s(u,a,c,null,[{name:"position",type:"vec2"}])}},1059:function(d,g,r){var t=r(4296),s=r(7453),a=r(2771),c=r(6496),u=r(2611),l=r(4234),y=r(8126),h=r(6145),T=r(1120),f=r(5268),n=r(8245),v=r(2321)({tablet:!0,featureDetect:!0});d.exports={createScene:S,createCamera:t};function m(){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 b(i,C){var x=null;try{x=i.getContext("webgl",C),x||(x=i.getContext("experimental-webgl",C))}catch{return null}return x}function E(i){var C=Math.round(Math.log(Math.abs(i))/Math.log(10));if(C<0){var x=Math.round(Math.pow(10,-C));return Math.ceil(i*x)/x}else if(C>0){var x=Math.round(Math.pow(10,C));return Math.ceil(i/x)*x}return Math.ceil(i)}function p(i){return typeof i=="boolean"?i:!0}function S(i){i=i||{},i.camera=i.camera||{};var C=i.canvas;if(!C)if(C=document.createElement("canvas"),i.container){var x=i.container;x.appendChild(C)}else document.body.appendChild(C);var k=i.gl;if(k||(i.glOptions&&(v=!!i.glOptions.preserveDrawingBuffer),k=b(C,i.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:v})),!k)throw new Error("webgl not supported");var I=i.bounds||[[-10,-10,-10],[10,10,10]],B=new m,_=l(k,k.drawingBufferWidth,k.drawingBufferHeight,{preferFloat:!v}),z=n(k),O=i.cameraObject&&i.cameraObject._ortho===!0||i.camera.projection&&i.camera.projection.type==="orthographic"||!1,F={eye:i.camera.eye||[2,0,0],center:i.camera.center||[0,0,0],up:i.camera.up||[0,1,0],zoomMin:i.camera.zoomMax||.1,zoomMax:i.camera.zoomMin||100,mode:i.camera.mode||"turntable",_ortho:O},N=i.axes||{},V=s(k,N);V.enable=!N.disable;var j=i.spikes||{},$=c(k,j),q=[],oe=[],Z=[],G=[],re=!0,K=!0,H=new Array(16),J=new Array(16),ae={view:null,projection:H,model:J,_ortho:!1},K=!0,Y=[k.drawingBufferWidth,k.drawingBufferHeight],ie=i.cameraObject||t(C,F),ne={gl:k,contextLost:!1,pixelRatio:i.pixelRatio||1,canvas:C,selection:B,camera:ie,axes:V,axesPixels:null,spikes:$,bounds:I,objects:q,shape:Y,aspect:i.aspectRatio||[1,1,1],pickRadius:i.pickRadius||10,zNear:i.zNear||.01,zFar:i.zFar||1e3,fovy:i.fovy||Math.PI/4,clearColor:i.clearColor||[0,0,0,0],autoResize:p(i.autoResize),autoBounds:p(i.autoBounds),autoScale:!!i.autoScale,autoCenter:p(i.autoCenter),clipToBounds:p(i.clipToBounds),snapToData:!!i.snapToData,onselect:i.onselect||null,onrender:i.onrender||null,onclick:i.onclick||null,cameraParams:ae,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(_e){this.aspect[0]=_e.x,this.aspect[1]=_e.y,this.aspect[2]=_e.z,K=!0},setBounds:function(_e,ze){this.bounds[0][_e]=ze.min,this.bounds[1][_e]=ze.max},setClearColor:function(_e){this.clearColor=_e},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)}},le=[k.drawingBufferWidth/ne.pixelRatio|0,k.drawingBufferHeight/ne.pixelRatio|0];function de(){if(!ne._stopped&&ne.autoResize){var _e=C.parentNode,ze=1,Ie=1;_e&&_e!==document.body?(ze=_e.clientWidth,Ie=_e.clientHeight):(ze=window.innerWidth,Ie=window.innerHeight);var Ne=Math.ceil(ze*ne.pixelRatio)|0,et=Math.ceil(Ie*ne.pixelRatio)|0;if(Ne!==C.width||et!==C.height){C.width=Ne,C.height=et;var st=C.style;st.position=st.position||"absolute",st.left="0px",st.top="0px",st.width=ze+"px",st.height=Ie+"px",re=!0}}}ne.autoResize&&de(),window.addEventListener("resize",de);function we(){for(var _e=q.length,ze=G.length,Ie=0;Ie<ze;++Ie)Z[Ie]=0;e:for(var Ie=0;Ie<_e;++Ie){var Ne=q[Ie],et=Ne.pickSlots;if(!et){oe[Ie]=-1;continue}for(var st=0;st<ze;++st)if(Z[st]+et<255){oe[Ie]=st,Ne.setPickBase(Z[st]+1),Z[st]+=et;continue e}var Ze=u(k,Y);oe[Ie]=ze,G.push(Ze),Z.push(et),Ne.setPickBase(1),ze+=1}for(;ze>0&&Z[ze-1]===0;)Z.pop(),G.pop().dispose()}ne.update=function(_e){ne._stopped||(re=!0,K=!0)},ne.add=function(_e){ne._stopped||(_e.axes=V,q.push(_e),oe.push(-1),re=!0,K=!0,we())},ne.remove=function(_e){if(!ne._stopped){var ze=q.indexOf(_e);ze<0||(q.splice(ze,1),oe.pop(),re=!0,K=!0,we())}},ne.dispose=function(){if(!ne._stopped&&(ne._stopped=!0,window.removeEventListener("resize",de),C.removeEventListener("webglcontextlost",me),ne.mouseListener.enabled=!1,!ne.contextLost)){V.dispose(),$.dispose();for(var _e=0;_e<q.length;++_e)q[_e].dispose();_.dispose();for(var _e=0;_e<G.length;++_e)G[_e].dispose();z.dispose(),k=null,V=null,$=null,q=[]}},ne._mouseRotating=!1,ne._prevButtons=0,ne.enableMouseListeners=function(){ne.mouseListener=h(C,function(_e,ze,Ie){if(!ne._stopped){var Ne=G.length,et=q.length,st=B.object;B.distance=1/0,B.mouse[0]=ze,B.mouse[1]=Ie,B.object=null,B.screen=null,B.dataCoordinate=B.dataPosition=null;var Ze=!1;if(_e&&ne._prevButtons)ne._mouseRotating=!0;else{ne._mouseRotating&&(K=!0),ne._mouseRotating=!1;for(var Ke=0;Ke<Ne;++Ke){var nt=G[Ke].query(ze,le[1]-Ie-1,ne.pickRadius);if(nt){if(nt.distance>B.distance)continue;for(var it=0;it<et;++it){var lt=q[it];if(oe[it]===Ke){var vt=lt.pick(nt);vt&&(B.buttons=_e,B.screen=nt.coord,B.distance=nt.distance,B.object=lt,B.index=vt.distance,B.dataPosition=vt.position,B.dataCoordinate=vt.dataCoordinate,B.data=vt,Ze=!0)}}}}}st&&st!==B.object&&(st.highlight&&st.highlight(null),re=!0),B.object&&(B.object.highlight&&B.object.highlight(B.data),re=!0),Ze=Ze||B.object!==st,Ze&&ne.onselect&&ne.onselect(B),_e&1&&!(ne._prevButtons&1)&&ne.onclick&&ne.onclick(B),ne._prevButtons=_e}})};function me(){if(ne.contextLost)return!0;k.isContextLost()&&(ne.contextLost=!0,ne.mouseListener.enabled=!1,ne.selection.object=null,ne.oncontextloss&&ne.oncontextloss())}C.addEventListener("webglcontextlost",me);function Le(){if(!me()){k.colorMask(!0,!0,!0,!0),k.depthMask(!0),k.disable(k.BLEND),k.enable(k.DEPTH_TEST),k.depthFunc(k.LEQUAL);for(var _e=q.length,ze=G.length,Ie=0;Ie<ze;++Ie){var Ne=G[Ie];Ne.shape=le,Ne.begin();for(var et=0;et<_e;++et)if(oe[et]===Ie){var st=q[et];st.drawPick&&(st.pixelRatio=1,st.drawPick(ae))}Ne.end()}}}var ve=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Ae=[ve[0].slice(),ve[1].slice()];function ye(){if(!me()){de();var _e=ne.camera.tick();ae.view=ne.camera.matrix,re=re||_e,K=K||_e,V.pixelRatio=ne.pixelRatio,$.pixelRatio=ne.pixelRatio;var ze=q.length,Ie=ve[0],Ne=ve[1];Ie[0]=Ie[1]=Ie[2]=1/0,Ne[0]=Ne[1]=Ne[2]=-1/0;for(var et=0;et<ze;++et){var st=q[et];st.pixelRatio=ne.pixelRatio,st.axes=ne.axes,re=re||!!st.dirty,K=K||!!st.dirty;var Ze=st.bounds;if(Ze)for(var Ke=Ze[0],nt=Ze[1],it=0;it<3;++it)Ie[it]=Math.min(Ie[it],Ke[it]),Ne[it]=Math.max(Ne[it],nt[it])}var lt=ne.bounds;if(ne.autoBounds)for(var it=0;it<3;++it){if(Ne[it]<Ie[it])Ie[it]=-1,Ne[it]=1;else{Ie[it]===Ne[it]&&(Ie[it]-=1,Ne[it]+=1);var vt=.05*(Ne[it]-Ie[it]);Ie[it]=Ie[it]-vt,Ne[it]=Ne[it]+vt}lt[0][it]=Ie[it],lt[1][it]=Ne[it]}for(var xt=!1,it=0;it<3;++it)xt=xt||Ae[0][it]!==lt[0][it]||Ae[1][it]!==lt[1][it],Ae[0][it]=lt[0][it],Ae[1][it]=lt[1][it];if(K=K||xt,re=re||xt,!!re){if(xt){for(var Je=[0,0,0],et=0;et<3;++et)Je[et]=E((lt[1][et]-lt[0][et])/10);V.autoTicks?V.update({bounds:lt,tickSpacing:Je}):V.update({bounds:lt})}var Pe=k.drawingBufferWidth,Ue=k.drawingBufferHeight;Y[0]=Pe,Y[1]=Ue,le[0]=Math.max(Pe/ne.pixelRatio,1)|0,le[1]=Math.max(Ue/ne.pixelRatio,1)|0,w(ne,O);for(var et=0;et<ze;++et){var st=q[et];st.axesBounds=lt,ne.clipToBounds&&(st.clipBounds=lt)}B.object&&(ne.snapToData?$.position=B.dataCoordinate:$.position=B.dataPosition,$.bounds=lt),K&&(K=!1,Le()),ne.axesPixels=a(ne.axes,ae,Pe,Ue),ne.onrender&&ne.onrender(),k.bindFramebuffer(k.FRAMEBUFFER,null),k.viewport(0,0,Pe,Ue),ne.clearRGBA(),k.depthMask(!0),k.colorMask(!0,!0,!0,!0),k.enable(k.DEPTH_TEST),k.depthFunc(k.LEQUAL),k.disable(k.BLEND),k.disable(k.CULL_FACE);var He=!1;V.enable&&(He=He||V.isTransparent(),V.draw(ae)),$.axes=V,B.object&&$.draw(ae),k.disable(k.CULL_FACE);for(var et=0;et<ze;++et){var st=q[et];st.axes=V,st.pixelRatio=ne.pixelRatio,st.isOpaque&&st.isOpaque()&&st.draw(ae),st.isTransparent&&st.isTransparent()&&(He=!0)}if(He){_.shape=Y,_.bind(),k.clear(k.DEPTH_BUFFER_BIT),k.colorMask(!1,!1,!1,!1),k.depthMask(!0),k.depthFunc(k.LESS),V.enable&&V.isTransparent()&&V.drawTransparent(ae);for(var et=0;et<ze;++et){var st=q[et];st.isOpaque&&st.isOpaque()&&st.draw(ae)}k.enable(k.BLEND),k.blendEquation(k.FUNC_ADD),k.blendFunc(k.ONE,k.ONE_MINUS_SRC_ALPHA),k.colorMask(!0,!0,!0,!0),k.depthMask(!1),k.clearColor(0,0,0,0),k.clear(k.COLOR_BUFFER_BIT),V.isTransparent()&&V.drawTransparent(ae);for(var et=0;et<ze;++et){var st=q[et];st.isTransparent&&st.isTransparent()&&st.drawTransparent(ae)}k.bindFramebuffer(k.FRAMEBUFFER,null),k.blendFunc(k.ONE,k.ONE_MINUS_SRC_ALPHA),k.disable(k.DEPTH_TEST),z.bind(),_.color[0].bind(0),z.uniforms.accumBuffer=0,y(k),k.disable(k.BLEND)}re=!1;for(var et=0;et<ze;++et)q[et].dirty=!1}}}function Se(){ne._stopped||ne.contextLost||(ye(),requestAnimationFrame(Se))}return ne.enableMouseListeners(),Se(),ne.redraw=function(){ne._stopped||(re=!0,ye())},ne}function w(i,C){var x=i.bounds,k=i.cameraParams,I=k.projection,B=k.model,_=i.gl.drawingBufferWidth,z=i.gl.drawingBufferHeight,O=i.zNear,F=i.zFar,N=i.fovy,V=_/z;C?(f(I,-V,V,-1,1,O,F),k._ortho=!0):(T(I,N,V,O,F),k._ortho=!1);for(var j=0;j<16;++j)B[j]=0;B[15]=1;for(var $=0,j=0;j<3;++j)$=Math.max($,x[1][j]-x[0][j]);for(var j=0;j<3;++j)i.autoScale?B[5*j]=i.aspect[j]/(x[1][j]-x[0][j]):B[5*j]=1/$,i.autoCenter&&(B[12+j]=-B[5*j]*.5*(x[0][j]+x[1][j]))}},8023:function(d,g,r){var t=r(6832);g.pointVertex=t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
uniform mat3 matrix;
uniform float pointSize;
uniform float pointCloud;
highp float rand(vec2 co) {
highp float a = 12.9898;
highp float b = 78.233;
highp float c = 43758.5453;
highp float d = dot(co.xy, vec2(a, b));
highp float e = mod(d, 3.14);
return fract(sin(e) * c);
}
void main() {
vec3 hgPosition = matrix * vec3(position, 1);
gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);
// if we don't jitter the point size a bit, overall point cloud
// saturation 'jumps' on zooming, which is disturbing and confusing
gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);
if(pointCloud != 0.0) { // pointCloud is truthy
// get the same square surface as circle would be
gl_PointSize *= 0.886;
}
}`]),g.pointFragment=t([`precision mediump float;
#define GLSLIFY 1
uniform vec4 color, borderColor;
uniform float centerFraction;
uniform float pointCloud;
void main() {
float radius;
vec4 baseColor;
if(pointCloud != 0.0) { // pointCloud is truthy
if(centerFraction == 1.0) {
gl_FragColor = color;
} else {
gl_FragColor = mix(borderColor, color, centerFraction);
}
} else {
radius = length(2.0 * gl_PointCoord.xy - 1.0);
if(radius > 1.0) {
discard;
}
baseColor = mix(borderColor, color, step(radius, centerFraction));
gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);
}
}
`]),g.pickVertex=t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
attribute vec4 pickId;
uniform mat3 matrix;
uniform float pointSize;
uniform vec4 pickOffset;
varying vec4 fragId;
void main() {
vec3 hgPosition = matrix * vec3(position, 1);
gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);
gl_PointSize = pointSize;
vec4 id = pickId + pickOffset;
id.y += floor(id.x / 256.0);
id.x -= floor(id.x / 256.0) * 256.0;
id.z += floor(id.y / 256.0);
id.y -= floor(id.y / 256.0) * 256.0;
id.w += floor(id.z / 256.0);
id.z -= floor(id.z / 256.0) * 256.0;
fragId = id;
}
`]),g.pickFragment=t([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragId;
void main() {
float radius = length(2.0 * gl_PointCoord.xy - 1.0);
if(radius > 1.0) {
discard;
}
gl_FragColor = fragId / 255.0;
}
`])},8271:function(d,g,r){var t=r(5158),s=r(5827),a=r(5306),c=r(8023);d.exports=h;function u(T,f,n,v,m){this.plot=T,this.offsetBuffer=f,this.pickBuffer=n,this.shader=v,this.pickShader=m,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}var l=u.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.update=function(T){var f;T=T||{};function n(w,i){return w in T?T[w]:i}this.sizeMin=n("sizeMin",.5),this.sizeMax=n("sizeMax",20),this.color=n("color",[1,0,0,1]).slice(),this.areaRatio=n("areaRatio",1),this.borderColor=n("borderColor",[0,0,0,1]).slice(),this.blend=n("blend",!1);var v=T.positions.length>>>1,m=T.positions instanceof Float32Array,b=T.idToIndex instanceof Int32Array&&T.idToIndex.length>=v,E=T.positions,p=m?E:a.mallocFloat32(E.length),S=b?T.idToIndex:a.mallocInt32(v);if(m||p.set(E),!b)for(p.set(E),f=0;f<v;f++)S[f]=f;this.points=E,this.offsetBuffer.update(p),this.pickBuffer.update(S),m||a.free(p),b||a.free(S),this.pointCount=v,this.pickOffset=0};function y(T,f){var n=0,v=T.length>>>1,m;for(m=0;m<v;m++){var b=T[m*2],E=T[m*2+1];b>=f[0]&&b<=f[2]&&E>=f[1]&&E<=f[3]&&n++}return n}l.unifiedDraw=function(){var T=[1,0,0,0,1,0,0,0,1],f=[0,0,0,0];return function(n){var v=n!==void 0,m=v?this.pickShader:this.shader,b=this.plot.gl,E=this.plot.dataBox;if(this.pointCount===0)return n;var p=E[2]-E[0],S=E[3]-E[1],w=y(this.points,E),i=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(w,.33333)));T[0]=2/p,T[4]=2/S,T[6]=-2*E[0]/p-1,T[7]=-2*E[1]/S-1,this.offsetBuffer.bind(),m.bind(),m.attributes.position.pointer(),m.uniforms.matrix=T,m.uniforms.color=this.color,m.uniforms.borderColor=this.borderColor,m.uniforms.pointCloud=i<5,m.uniforms.pointSize=i,m.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),v&&(f[0]=n&255,f[1]=n>>8&255,f[2]=n>>16&255,f[3]=n>>24&255,this.pickBuffer.bind(),m.attributes.pickId.pointer(b.UNSIGNED_BYTE),m.uniforms.pickOffset=f,this.pickOffset=n);var C=b.getParameter(b.BLEND),x=b.getParameter(b.DITHER);return C&&!this.blend&&b.disable(b.BLEND),x&&b.disable(b.DITHER),b.drawArrays(b.POINTS,0,this.pointCount),C&&!this.blend&&b.enable(b.BLEND),x&&b.enable(b.DITHER),n+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(T,f,n){var v=this.pickOffset,m=this.pointCount;if(n<v||n>=v+m)return null;var b=n-v,E=this.points;return{object:this,pointId:b,dataCoord:[E[2*b],E[2*b+1]]}};function h(T,f){var n=T.gl,v=s(n),m=s(n),b=t(n,c.pointVertex,c.pointFragment),E=t(n,c.pickVertex,c.pickFragment),p=new u(T,v,m,b,E);return p.update(f),T.addObject(p),p}},6093:function(d){d.exports=g;function g(r,t,s,a){var c=t[0],u=t[1],l=t[2],y=t[3],h=s[0],T=s[1],f=s[2],n=s[3],v,m,b,E,p;return m=c*h+u*T+l*f+y*n,m<0&&(m=-m,h=-h,T=-T,f=-f,n=-n),1-m>1e-6?(v=Math.acos(m),b=Math.sin(v),E=Math.sin((1-a)*v)/b,p=Math.sin(a*v)/b):(E=1-a,p=a),r[0]=E*c+p*h,r[1]=E*u+p*T,r[2]=E*l+p*f,r[3]=E*y+p*n,r}},8240:function(d){d.exports=function(g){return!g&&g!==0?"":g.toString()}},4123:function(d,g,r){var t=r(875);d.exports=a;var s={};function a(c,u,l){var y=s[u];if(y||(y=s[u]={}),c in y)return y[c];var h={textAlign:"center",textBaseline:"middle",lineHeight:1,font:u,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};h.triangles=!0;var T=t(c,h);h.triangles=!1;var f=t(c,h),n,v;if(l&&l!==1){for(n=0;n<T.positions.length;++n)for(v=0;v<T.positions[n].length;++v)T.positions[n][v]/=l;for(n=0;n<f.positions.length;++n)for(v=0;v<f.positions[n].length;++v)f.positions[n][v]/=l}var m=[[1/0,1/0],[-1/0,-1/0]],b=f.positions.length;for(n=0;n<b;++n){var E=f.positions[n];for(v=0;v<2;++v)m[0][v]=Math.min(m[0][v],E[v]),m[1][v]=Math.max(m[1][v],E[v])}return y[c]=[T,f,m]}},9282:function(d,g,r){var t=r(5158),s=r(6832),a=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;
uniform vec4 highlightId;
uniform float highlightScale;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];
varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0,0,0,0);
} else {
float scale = 1.0;
if(distance(highlightId, id) < 0.0001) {
scale = highlightScale;
}
vec4 worldPosition = model * vec4(position, 1);
vec4 viewPosition = view * worldPosition;
viewPosition = viewPosition / viewPosition.w;
vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));
gl_Position = clipPosition;
interpColor = color;
pickId = id;
dataCoordinate = position;
}
}`]),c=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float highlightScale, pixelRatio;
uniform vec4 highlightId;
varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0,0,0,0);
} else {
float scale = pixelRatio;
if(distance(highlightId.bgr, id.bgr) < 0.001) {
scale *= highlightScale;
}
vec4 worldPosition = model * vec4(position, 1.0);
vec4 viewPosition = view * worldPosition;
vec4 clipPosition = projection * viewPosition;
clipPosition /= clipPosition.w;
gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);
interpColor = color;
pickId = id;
dataCoordinate = position;
}
}`]),u=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;
uniform float highlightScale;
uniform vec4 highlightId;
uniform vec3 axes[2];
uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float scale, pixelRatio;
varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0,0,0,0);
} else {
float lscale = pixelRatio * scale;
if(distance(highlightId, id) < 0.0001) {
lscale *= highlightScale;
}
vec4 clipCenter = projection * view * model * vec4(position, 1);
vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;
vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);
gl_Position = clipPosition;
interpColor = color;
pickId = id;
dataCoordinate = dataPosition;
}
}
`]),l=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 fragClipBounds[2];
uniform float opacity;
varying vec4 interpColor;
varying vec3 dataCoordinate;
void main() {
if (
outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||
interpColor.a * opacity == 0.
) discard;
gl_FragColor = interpColor * opacity;
}
`]),y=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 fragClipBounds[2];
uniform float pickGroup;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;
gl_FragColor = vec4(pickGroup, pickId.bgr);
}`]),h=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],T={vertex:a,fragment:l,attributes:h},f={vertex:c,fragment:l,attributes:h},n={vertex:u,fragment:l,attributes:h},v={vertex:a,fragment:y,attributes:h},m={vertex:c,fragment:y,attributes:h},b={vertex:u,fragment:y,attributes:h};function E(p,S){var w=t(p,S),i=w.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,w}g.createPerspective=function(p){return E(p,T)},g.createOrtho=function(p){return E(p,f)},g.createProject=function(p){return E(p,n)},g.createPickPerspective=function(p){return E(p,v)},g.createPickOrtho=function(p){return E(p,m)},g.createPickProject=function(p){return E(p,b)}},2182:function(d,g,r){var t=r(3596),s=r(5827),a=r(2944),c=r(5306),u=r(104),l=r(9282),y=r(4123),h=r(8240),T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];d.exports=oe;function f(Z,G){var re=Z[0],H=Z[1],J=Z[2],ae=Z[3];return Z[0]=G[0]*re+G[4]*H+G[8]*J+G[12]*ae,Z[1]=G[1]*re+G[5]*H+G[9]*J+G[13]*ae,Z[2]=G[2]*re+G[6]*H+G[10]*J+G[14]*ae,Z[3]=G[3]*re+G[7]*H+G[11]*J+G[15]*ae,Z}function n(Z,G,re,H){return f(H,H),f(H,H),f(H,H)}function v(Z,G){this.index=Z,this.dataCoordinate=this.position=G}function m(Z){return Z===!0||Z>1?1:Z}function b(Z,G,re,H,J,ae,K,Y,ie,ne,le,de){this.gl=Z,this.pixelRatio=1,this.shader=G,this.orthoShader=re,this.projectShader=H,this.pointBuffer=J,this.colorBuffer=ae,this.glyphBuffer=K,this.idBuffer=Y,this.vao=ie,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=ne,this.pickOrthoShader=le,this.pickProjectShader=de,this.points=[],this._selectResult=new v(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}var E=b.prototype;E.pickSlots=1,E.setPickBase=function(Z){this.pickId=Z},E.isTransparent=function(){if(this.hasAlpha)return!0;for(var Z=0;Z<3;++Z)if(this.axesProject[Z]&&this.projectHasAlpha)return!0;return!1},E.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 p=[0,0],S=[0,0,0],w=[0,0,0],i=[0,0,0,1],C=[0,0,0,1],x=T.slice(),k=[0,0,0],I=[[0,0,0],[0,0,0]];function B(Z){return Z[0]=Z[1]=Z[2]=0,Z}function _(Z,G){return Z[0]=G[0],Z[1]=G[1],Z[2]=G[2],Z[3]=1,Z}function z(Z,G,re,H){return Z[0]=G[0],Z[1]=G[1],Z[2]=G[2],Z[re]=H,Z}function O(Z){for(var G=I,re=0;re<2;++re)for(var H=0;H<3;++H)G[re][H]=Math.max(Math.min(Z[re][H],1e8),-1e8);return G}function F(Z,G,re,H){var J=G.axesProject,ae=G.gl,K=Z.uniforms,Y=re.model||T,ie=re.view||T,ne=re.projection||T,le=G.axesBounds,de=O(G.clipBounds),we;G.axes&&G.axes.lastCubeProps?we=G.axes.lastCubeProps.axis:we=[1,1,1],p[0]=2/ae.drawingBufferWidth,p[1]=2/ae.drawingBufferHeight,Z.bind(),K.view=ie,K.projection=ne,K.screenSize=p,K.highlightId=G.highlightId,K.highlightScale=G.highlightScale,K.clipBounds=de,K.pickGroup=G.pickId/255,K.pixelRatio=H;for(var me=0;me<3;++me)if(J[me]){K.scale=G.projectScale[me],K.opacity=G.projectOpacity[me];for(var Le=x,ve=0;ve<16;++ve)Le[ve]=0;for(var ve=0;ve<4;++ve)Le[5*ve]=1;Le[5*me]=0,we[me]<0?Le[12+me]=le[0][me]:Le[12+me]=le[1][me],u(Le,Y,Le),K.model=Le;var Ae=(me+1)%3,ye=(me+2)%3,Se=B(S),_e=B(w);Se[Ae]=1,_e[ye]=1;var ze=n(ne,ie,Y,_(i,Se)),Ie=n(ne,ie,Y,_(C,_e));if(Math.abs(ze[1])>Math.abs(Ie[1])){var Ne=ze;ze=Ie,Ie=Ne,Ne=Se,Se=_e,_e=Ne;var et=Ae;Ae=ye,ye=et}ze[0]<0&&(Se[Ae]=-1),Ie[1]>0&&(_e[ye]=-1);for(var st=0,Ze=0,ve=0;ve<4;++ve)st+=Math.pow(Y[4*Ae+ve],2),Ze+=Math.pow(Y[4*ye+ve],2);Se[Ae]/=Math.sqrt(st),_e[ye]/=Math.sqrt(Ze),K.axes[0]=Se,K.axes[1]=_e,K.fragClipBounds[0]=z(k,de[0],me,-1e8),K.fragClipBounds[1]=z(k,de[1],me,1e8),G.vao.bind(),G.vao.draw(ae.TRIANGLES,G.vertexCount),G.lineWidth>0&&(ae.lineWidth(G.lineWidth*H),G.vao.draw(ae.LINES,G.lineVertexCount,G.vertexCount)),G.vao.unbind()}}var N=[-1e8,-1e8,-1e8],V=[1e8,1e8,1e8],j=[N,V];function $(Z,G,re,H,J,ae,K){var Y=re.gl;if((ae===re.projectHasAlpha||K)&&F(G,re,H,J),ae===re.hasAlpha||K){Z.bind();var ie=Z.uniforms;ie.model=H.model||T,ie.view=H.view||T,ie.projection=H.projection||T,p[0]=2/Y.drawingBufferWidth,p[1]=2/Y.drawingBufferHeight,ie.screenSize=p,ie.highlightId=re.highlightId,ie.highlightScale=re.highlightScale,ie.fragClipBounds=j,ie.clipBounds=re.axes.bounds,ie.opacity=re.opacity,ie.pickGroup=re.pickId/255,ie.pixelRatio=J,re.vao.bind(),re.vao.draw(Y.TRIANGLES,re.vertexCount),re.lineWidth>0&&(Y.lineWidth(re.lineWidth*J),re.vao.draw(Y.LINES,re.lineVertexCount,re.vertexCount)),re.vao.unbind()}}E.draw=function(Z){var G=this.useOrtho?this.orthoShader:this.shader;$(G,this.projectShader,this,Z,this.pixelRatio,!1,!1)},E.drawTransparent=function(Z){var G=this.useOrtho?this.orthoShader:this.shader;$(G,this.projectShader,this,Z,this.pixelRatio,!0,!1)},E.drawPick=function(Z){var G=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;$(G,this.pickProjectShader,this,Z,1,!0,!0)},E.pick=function(Z){if(!Z||Z.id!==this.pickId)return null;var G=Z.value[2]+(Z.value[1]<<8)+(Z.value[0]<<16);if(G>=this.pointCount||G<0)return null;var re=this.points[G],H=this._selectResult;H.index=G;for(var J=0;J<3;++J)H.position[J]=H.dataCoordinate[J]=re[J];return H},E.highlight=function(Z){if(!Z)this.highlightId=[1,1,1,1];else{var G=Z.index,re=G&255,H=G>>8&255,J=G>>16&255;this.highlightId=[re/255,H/255,J/255,0]}};function q(Z,G,re,H){var J;Array.isArray(Z)?G<Z.length?J=Z[G]:J=void 0:J=Z,J=h(J);var ae=!0;t(J)&&(J="▼",ae=!1);var K=y(J,re,H);return{mesh:K[0],lines:K[1],bounds:K[2],visible:ae}}E.update=function(Z){if(Z=Z||{},"perspective"in 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 G=!!Z.project;this.axesProject=[G,G,G]}if("projectScale"in Z)if(Array.isArray(Z.projectScale))this.projectScale=Z.projectScale.slice();else{var re=+Z.projectScale;this.projectScale=[re,re,re]}if(this.projectHasAlpha=!1,"projectOpacity"in Z){if(Array.isArray(Z.projectOpacity))this.projectOpacity=Z.projectOpacity.slice();else{var re=+Z.projectOpacity;this.projectOpacity=[re,re,re]}for(var H=0;H<3;++H)this.projectOpacity[H]=m(this.projectOpacity[H]),this.projectOpacity[H]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in Z&&(this.opacity=m(Z.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var J=Z.position,ae=Z.font||"normal",K=Z.alignment||[0,0],Y,ie;if(K.length===2)Y=K[0],ie=K[1];else{Y=[],ie=[];for(var H=0;H<K.length;++H)Y[H]=K[H][0],ie[H]=K[H][1]}var ne=[1/0,1/0,1/0],le=[-1/0,-1/0,-1/0],de=Z.glyph,we=Z.color,me=Z.size,Le=Z.angle,ve=Z.lineColor,Ae=-1,ye=0,Se=0,_e=0;if(J.length){_e=J.length;e:for(var H=0;H<_e;++H){for(var ze=J[H],Ie=0;Ie<3;++Ie)if(isNaN(ze[Ie])||!isFinite(ze[Ie]))continue e;var Ne=q(de,H,ae,this.pixelRatio),et=Ne.mesh,st=Ne.lines,Ze=Ne.bounds;ye+=et.cells.length*3,Se+=st.edges.length*2}}var Ke=ye+Se,nt=c.mallocFloat(3*Ke),it=c.mallocFloat(4*Ke),lt=c.mallocFloat(2*Ke),vt=c.mallocUint32(Ke);if(Ke>0){var xt=0,Je=ye,Pe=[0,0,0,1],Ue=[0,0,0,1],He=Array.isArray(we)&&Array.isArray(we[0]),Oe=Array.isArray(ve)&&Array.isArray(ve[0]);e:for(var H=0;H<_e;++H){Ae+=1;for(var ze=J[H],Ie=0;Ie<3;++Ie){if(isNaN(ze[Ie])||!isFinite(ze[Ie]))continue e;le[Ie]=Math.max(le[Ie],ze[Ie]),ne[Ie]=Math.min(ne[Ie],ze[Ie])}var Ne=q(de,H,ae,this.pixelRatio),et=Ne.mesh,st=Ne.lines,Ze=Ne.bounds,Ce=Ne.visible;if(!Ce)Pe=[1,1,1,0];else if(Array.isArray(we)){var ge;if(He?H<we.length?ge=we[H]:ge=[0,0,0,0]:ge=we,ge.length===3){for(var Ie=0;Ie<3;++Ie)Pe[Ie]=ge[Ie];Pe[3]=1}else if(ge.length===4){for(var Ie=0;Ie<4;++Ie)Pe[Ie]=ge[Ie];!this.hasAlpha&&ge[3]<1&&(this.hasAlpha=!0)}}else Pe[0]=Pe[1]=Pe[2]=0,Pe[3]=1;if(!Ce)Ue=[1,1,1,0];else if(Array.isArray(ve)){var ge;if(Oe?H<ve.length?ge=ve[H]:ge=[0,0,0,0]:ge=ve,ge.length===3){for(var Ie=0;Ie<3;++Ie)Ue[Ie]=ge[Ie];Ue[Ie]=1}else if(ge.length===4){for(var Ie=0;Ie<4;++Ie)Ue[Ie]=ge[Ie];!this.hasAlpha&&ge[3]<1&&(this.hasAlpha=!0)}}else Ue[0]=Ue[1]=Ue[2]=0,Ue[3]=1;var pe=.5;Ce?Array.isArray(me)?H<me.length?pe=+me[H]:pe=12:me?pe=+me:this.useOrtho&&(pe=12):pe=0;var Te=0;Array.isArray(Le)?H<Le.length?Te=+Le[H]:Te=0:Le&&(Te=+Le);for(var be=Math.cos(Te),ke=Math.sin(Te),ze=J[H],Ie=0;Ie<3;++Ie)le[Ie]=Math.max(le[Ie],ze[Ie]),ne[Ie]=Math.min(ne[Ie],ze[Ie]);var Ve=Y,je=ie,Ve=0;Array.isArray(Y)?H<Y.length?Ve=Y[H]:Ve=0:Y&&(Ve=Y);var je=0;Array.isArray(ie)?H<ie.length?je=ie[H]:je=0:ie&&(je=ie),Ve*=Ve>0?1-Ze[0][0]:Ve<0?1+Ze[1][0]:1,je*=je>0?1-Ze[0][1]:je<0?1+Ze[1][1]:1;for(var at=[Ve,je],Ct=et.cells||[],Yt=et.positions||[],Ie=0;Ie<Ct.length;++Ie)for(var ut=Ct[Ie],Nt=0;Nt<3;++Nt){for(var Vt=0;Vt<3;++Vt)nt[3*xt+Vt]=ze[Vt];for(var Vt=0;Vt<4;++Vt)it[4*xt+Vt]=Pe[Vt];vt[xt]=Ae;var gt=Yt[ut[Nt]];lt[2*xt]=pe*(be*gt[0]-ke*gt[1]+at[0]),lt[2*xt+1]=pe*(ke*gt[0]+be*gt[1]+at[1]),xt+=1}for(var Ct=st.edges,Yt=st.positions,Ie=0;Ie<Ct.length;++Ie)for(var ut=Ct[Ie],Nt=0;Nt<2;++Nt){for(var Vt=0;Vt<3;++Vt)nt[3*Je+Vt]=ze[Vt];for(var Vt=0;Vt<4;++Vt)it[4*Je+Vt]=Ue[Vt];vt[Je]=Ae;var gt=Yt[ut[Nt]];lt[2*Je]=pe*(be*gt[0]-ke*gt[1]+at[0]),lt[2*Je+1]=pe*(ke*gt[0]+be*gt[1]+at[1]),Je+=1}}}this.bounds=[ne,le],this.points=J,this.pointCount=J.length,this.vertexCount=ye,this.lineVertexCount=Se,this.pointBuffer.update(nt),this.colorBuffer.update(it),this.glyphBuffer.update(lt),this.idBuffer.update(vt),c.free(nt),c.free(it),c.free(lt),c.free(vt)},E.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()};function oe(Z){var G=Z.gl,re=l.createPerspective(G),H=l.createOrtho(G),J=l.createProject(G),ae=l.createPickPerspective(G),K=l.createPickOrtho(G),Y=l.createPickProject(G),ie=s(G),ne=s(G),le=s(G),de=s(G),we=a(G,[{buffer:ie,size:3,type:G.FLOAT},{buffer:ne,size:4,type:G.FLOAT},{buffer:le,size:2,type:G.FLOAT},{buffer:de,size:4,type:G.UNSIGNED_BYTE,normalized:!0}]),me=new b(G,re,H,J,ie,ne,le,de,we,ae,K,Y);return me.update(Z),me}},1884:function(d,g,r){var t=r(6832);g.boxVertex=t([`precision mediump float;
#define GLSLIFY 1
attribute vec2 vertex;
uniform vec2 cornerA, cornerB;
void main() {
gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);
}
`]),g.boxFragment=t([`precision mediump float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}
`])},6623:function(d,g,r){var t=r(5158),s=r(5827),a=r(1884);d.exports=l;function c(y,h,T){this.plot=y,this.boxBuffer=h,this.boxShader=T,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}var u=c.prototype;u.draw=function(){if(this.enabled){var y=this.plot,h=this.selectBox,T=this.borderWidth;this.innerFill;var f=this.innerColor;this.outerFill;var n=this.outerColor,v=this.borderColor,m=y.box,b=y.screenBox,E=y.dataBox,p=y.viewBox,S=y.pixelRatio,w=(h[0]-E[0])*(p[2]-p[0])/(E[2]-E[0])+p[0],i=(h[1]-E[1])*(p[3]-p[1])/(E[3]-E[1])+p[1],C=(h[2]-E[0])*(p[2]-p[0])/(E[2]-E[0])+p[0],x=(h[3]-E[1])*(p[3]-p[1])/(E[3]-E[1])+p[1];if(w=Math.max(w,p[0]),i=Math.max(i,p[1]),C=Math.min(C,p[2]),x=Math.min(x,p[3]),!(C<w||x<i)){m.bind();var k=b[2]-b[0],I=b[3]-b[1];if(this.outerFill&&(m.drawBox(0,0,k,i,n),m.drawBox(0,i,w,x,n),m.drawBox(0,x,k,I,n),m.drawBox(C,i,k,x,n)),this.innerFill&&m.drawBox(w,i,C,x,f),T>0){var B=T*S;m.drawBox(w-B,i-B,C+B,i+B,v),m.drawBox(w-B,x-B,C+B,x+B,v),m.drawBox(w-B,i-B,w+B,x+B,v),m.drawBox(C-B,i-B,C+B,x+B,v)}}}},u.update=function(y){y=y||{},this.innerFill=!!y.innerFill,this.outerFill=!!y.outerFill,this.innerColor=(y.innerColor||[0,0,0,.5]).slice(),this.outerColor=(y.outerColor||[0,0,0,.5]).slice(),this.borderColor=(y.borderColor||[0,0,0,1]).slice(),this.borderWidth=y.borderWidth||0,this.selectBox=(y.selectBox||this.selectBox).slice()},u.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function l(y,h){var T=y.gl,f=s(T,[0,0,0,1,1,0,1,1]),n=t(T,a.boxVertex,a.boxFragment),v=new c(y,f,n);return v.update(h),y.addOverlay(v),v}},2611:function(d,g,r){d.exports=T;var t=r(4234),s=r(5306),a=r(5050),c=r(2288).nextPow2,u=function(f,n,v){for(var m=1e8,b=-1,E=-1,p=f.shape[0],S=f.shape[1],w=0;w<p;w++)for(var i=0;i<S;i++){var C=f.get(w,i,0),x=f.get(w,i,1),k=f.get(w,i,2),I=f.get(w,i,3);if(C<255||x<255||k<255||I<255){var B=n-w,_=v-i,z=B*B+_*_;z<m&&(m=z,b=w,E=i)}}return[b,E,m]};function l(f,n,v,m,b){this.coord=[f,n],this.id=v,this.value=m,this.distance=b}function y(f,n,v){this.gl=f,this.fbo=n,this.buffer=v,this._readTimeout=null;var m=this;this._readCallback=function(){m.gl&&(n.bind(),f.readPixels(0,0,n.shape[0],n.shape[1],f.RGBA,f.UNSIGNED_BYTE,m.buffer),m._readTimeout=null)}}var h=y.prototype;Object.defineProperty(h,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(f){if(this.gl){this.fbo.shape=f;var n=this.fbo.shape[0],v=this.fbo.shape[1];if(v*n*4>this.buffer.length){s.free(this.buffer);for(var m=this.buffer=s.mallocUint8(c(v*n*4)),b=0;b<v*n*4;++b)m[b]=255}return f}}}),h.begin=function(){var f=this.gl;this.shape,f&&(this.fbo.bind(),f.clearColor(1,1,1,1),f.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT))},h.end=function(){var f=this.gl;f&&(f.bindFramebuffer(f.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},h.query=function(f,n,v){if(!this.gl)return null;var m=this.fbo.shape.slice();f=f|0,n=n|0,typeof v!="number"&&(v=1);var b=Math.min(Math.max(f-v,0),m[0])|0,E=Math.min(Math.max(f+v,0),m[0])|0,p=Math.min(Math.max(n-v,0),m[1])|0,S=Math.min(Math.max(n+v,0),m[1])|0;if(E<=b||S<=p)return null;var w=[E-b,S-p],i=a(this.buffer,[w[0],w[1],4],[4,m[0]*4,1],4*(b+m[0]*p)),C=u(i.hi(w[0],w[1],1),v,v),x=C[0],k=C[1];if(x<0||Math.pow(this.radius,2)<C[2])return null;var I=i.get(x,k,0),B=i.get(x,k,1),_=i.get(x,k,2),z=i.get(x,k,3);return new l(x+b|0,k+p|0,I,[B,_,z],Math.sqrt(C[2]))},h.dispose=function(){this.gl&&(this.fbo.dispose(),s.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function T(f,n){var v=n[0],m=n[1],b={},E=t(f,v,m,b),p=s.mallocUint8(v*m*4);return new y(f,E,p)}},5158:function(d,g,r){var t=r(9016),s=r(4280),a=r(3984),c=r(1628),u=r(2631),l=r(9068);function y(n){this.gl=n,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var h=y.prototype;h.bind=function(){this.program||this._relink();var n,v=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),m=this.gl.lastAttribCount;if(v>m)for(n=m;n<v;n++)this.gl.enableVertexAttribArray(n);else if(m>v)for(n=v;n<m;n++)this.gl.disableVertexAttribArray(n);this.gl.lastAttribCount=v,this.gl.useProgram(this.program)},h.dispose=function(){for(var n=this.gl.lastAttribCount,v=0;v<n;v++)this.gl.disableVertexAttribArray(v);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};function T(n,v){return n.name<v.name?-1:1}h.update=function(n,v,m,b){if(!v||arguments.length===1){var E=n;n=E.vertex,v=E.fragment,m=E.uniforms,b=E.attributes}var p=this,S=p.gl,w=p._vref;p._vref=c.shader(S,S.VERTEX_SHADER,n),w&&w.dispose(),p.vertShader=p._vref.shader;var i=this._fref;if(p._fref=c.shader(S,S.FRAGMENT_SHADER,v),i&&i.dispose(),p.fragShader=p._fref.shader,!m||!b){var C=S.createProgram();if(S.attachShader(C,p.fragShader),S.attachShader(C,p.vertShader),S.linkProgram(C),!S.getProgramParameter(C,S.LINK_STATUS)){var x=S.getProgramInfoLog(C);throw new l(x,"Error linking program:"+x)}m=m||u.uniforms(S,C),b=b||u.attributes(S,C),S.deleteProgram(C)}b=b.slice(),b.sort(T);var k=[],I=[],B=[],_;for(_=0;_<b.length;++_){var z=b[_];if(z.type.indexOf("mat")>=0){for(var O=z.type.charAt(z.type.length-1)|0,F=new Array(O),N=0;N<O;++N)F[N]=B.length,I.push(z.name+"["+N+"]"),typeof z.location=="number"?B.push(z.location+N):Array.isArray(z.location)&&z.location.length===O&&typeof z.location[N]=="number"?B.push(z.location[N]|0):B.push(-1);k.push({name:z.name,type:z.type,locations:F})}else k.push({name:z.name,type:z.type,locations:[B.length]}),I.push(z.name),typeof z.location=="number"?B.push(z.location|0):B.push(-1)}var V=0;for(_=0;_<B.length;++_)if(B[_]<0){for(;B.indexOf(V)>=0;)V+=1;B[_]=V}var j=new Array(m.length);function $(){p.program=c.program(S,p._vref,p._fref,I,B);for(var q=0;q<m.length;++q)j[q]=S.getUniformLocation(p.program,m[q].name)}$(),p._relink=$,p.types={uniforms:a(m),attributes:a(b)},p.attributes=s(S,p,k,B),Object.defineProperty(p,"uniforms",t(S,p,m,j))};function f(n,v,m,b,E){var p=new y(n);return p.update(v,m,b,E),p}d.exports=f},9068:function(d){function g(r,t,s){this.shortMessage=t||"",this.longMessage=s||"",this.rawError=r||"",this.message="gl-shader: "+(t||r||"")+(s?`
`+s:""),this.stack=new Error().stack}g.prototype=new Error,g.prototype.name="GLError",g.prototype.constructor=g,d.exports=g},4280:function(d,g,r){d.exports=y;var t=r(9068);function s(h,T,f,n,v,m){this._gl=h,this._wrapper=T,this._index=f,this._locations=n,this._dimension=v,this._constFunc=m}var a=s.prototype;a.pointer=function(T,f,n,v){var m=this,b=m._gl,E=m._locations[m._index];b.vertexAttribPointer(E,m._dimension,T||b.FLOAT,!!f,n||0,v||0),b.enableVertexAttribArray(E)},a.set=function(h,T,f,n){return this._constFunc(this._locations[this._index],h,T,f,n)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(h){return h!==this._locations[this._index]&&(this._locations[this._index]=h|0,this._wrapper.program=null),h|0}});var c=[function(h,T,f){return f.length===void 0?h.vertexAttrib1f(T,f):h.vertexAttrib1fv(T,f)},function(h,T,f,n){return f.length===void 0?h.vertexAttrib2f(T,f,n):h.vertexAttrib2fv(T,f)},function(h,T,f,n,v){return f.length===void 0?h.vertexAttrib3f(T,f,n,v):h.vertexAttrib3fv(T,f)},function(h,T,f,n,v,m){return f.length===void 0?h.vertexAttrib4f(T,f,n,v,m):h.vertexAttrib4fv(T,f)}];function u(h,T,f,n,v,m,b){var E=c[v],p=new s(h,T,f,n,v,E);Object.defineProperty(m,b,{set:function(S){return h.disableVertexAttribArray(n[f]),E(h,n[f],S),S},get:function(){return p},enumerable:!0})}function l(h,T,f,n,v,m,b){for(var E=new Array(v),p=new Array(v),S=0;S<v;++S)u(h,T,f[S],n,v,E,S),p[S]=E[S];Object.defineProperty(E,"location",{set:function(C){if(Array.isArray(C))for(var x=0;x<v;++x)p[x].location=C[x];else for(var x=0;x<v;++x)p[x].location=C+x;return C},get:function(){for(var C=new Array(v),x=0;x<v;++x)C[x]=n[f[x]];return C},enumerable:!0}),E.pointer=function(C,x,k,I){C=C||h.FLOAT,x=!!x,k=k||v*v,I=I||0;for(var B=0;B<v;++B){var _=n[f[B]];h.vertexAttribPointer(_,v,C,x,k,I+B*v),h.enableVertexAttribArray(_)}};var w=new Array(v),i=h["vertexAttrib"+v+"fv"];Object.defineProperty(m,b,{set:function(C){for(var x=0;x<v;++x){var k=n[f[x]];if(h.disableVertexAttribArray(k),Array.isArray(C[0]))i.call(h,k,C[x]);else{for(var I=0;I<v;++I)w[I]=C[v*x+I];i.call(h,k,w)}}return C},get:function(){return E},enumerable:!0})}function y(h,T,f,n){for(var v={},m=0,b=f.length;m<b;++m){var E=f[m],p=E.name,S=E.type,w=E.locations;switch(S){case"bool":case"int":case"float":u(h,T,w[0],n,1,v,p);break;default:if(S.indexOf("vec")>=0){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new t("","Invalid data type for attribute "+p+": "+S);u(h,T,w[0],n,i,v,p)}else if(S.indexOf("mat")>=0){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new t("","Invalid data type for attribute "+p+": "+S);l(h,T,w,n,i,v,p)}else throw new t("","Unknown data type for attribute "+p+": "+S);break}}return v}},9016:function(d,g,r){var t=r(3984),s=r(9068);d.exports=u;function a(l){return function(){return l}}function c(l,y){for(var h=new Array(l),T=0;T<l;++T)h[T]=y;return h}function u(l,y,h,T){function f(S){return function(w,i,C){return w.getUniform(i.program,C[S])}}function n(S){return function(i){for(var C=v("",S),x=0;x<C.length;++x){var k=C[x],I=k[0],B=k[1];if(T[B]){var _=i;if(typeof I=="string"&&(I.indexOf(".")===0||I.indexOf("[")===0)){var z=I;if(I.indexOf(".")===0&&(z=I.slice(1)),z.indexOf("]")===z.length-1){var O=z.indexOf("["),F=z.slice(0,O),N=z.slice(O+1,z.length-1);_=F?i[F][N]:i[N]}else _=i[z]}var V=h[B].type,j;switch(V){case"bool":case"int":case"sampler2D":case"samplerCube":l.uniform1i(T[B],_);break;case"float":l.uniform1f(T[B],_);break;default:var $=V.indexOf("vec");if(0<=$&&$<=1&&V.length===4+$){if(j=V.charCodeAt(V.length-1)-48,j<2||j>4)throw new s("","Invalid data type");switch(V.charAt(0)){case"b":case"i":l["uniform"+j+"iv"](T[B],_);break;case"v":l["uniform"+j+"fv"](T[B],_);break;default:throw new s("","Unrecognized data type for vector "+name+": "+V)}}else if(V.indexOf("mat")===0&&V.length===4){if(j=V.charCodeAt(V.length-1)-48,j<2||j>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+V);l["uniformMatrix"+j+"fv"](T[B],!1,_);break}else throw new s("","Unknown uniform data type for "+name+": "+V)}}}}}function v(S,w){if(typeof w!="object")return[[S,w]];var i=[];for(var C in w){var x=w[C],k=S;parseInt(C)+""===C?k+="["+C+"]":k+="."+C,typeof x=="object"?i.push.apply(i,v(k,x)):i.push([k,x])}return i}function m(S){switch(S){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var w=S.indexOf("vec");if(0<=w&&w<=1&&S.length===4+w){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");return S.charAt(0)==="b"?c(i,!1):c(i,0)}else if(S.indexOf("mat")===0&&S.length===4){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+S);return c(i*i,0)}else throw new s("","Unknown uniform data type for "+name+": "+S)}}function b(S,w,i){if(typeof i=="object"){var C=E(i);Object.defineProperty(S,w,{get:a(C),set:n(i),enumerable:!0,configurable:!1})}else T[i]?Object.defineProperty(S,w,{get:f(i),set:n(i),enumerable:!0,configurable:!1}):S[w]=m(h[i].type)}function E(S){var w;if(Array.isArray(S)){w=new Array(S.length);for(var i=0;i<S.length;++i)b(w,i,S[i])}else{w={};for(var C in S)b(w,C,S[C])}return w}var p=t(h,!0);return{get:a(E(p)),set:n(p),enumerable:!0,configurable:!0}}},3984:function(d){d.exports=g;function g(r,t){for(var s={},a=0;a<r.length;++a)for(var c=r[a].name,u=c.split("."),l=s,y=0;y<u.length;++y){var h=u[y].split("[");if(h.length>1){h[0]in l||(l[h[0]]=[]),l=l[h[0]];for(var T=1;T<h.length;++T){var f=parseInt(h[T]);T<h.length-1||y<u.length-1?(f in l||(T<h.length-1?l[f]=[]:l[f]={}),l=l[f]):t?l[f]=a:l[f]=r[a].type}}else y<u.length-1?(h[0]in l||(l[h[0]]={}),l=l[h[0]]):t?l[h[0]]=a:l[h[0]]=r[a].type}return s}},2631:function(d,g){g.uniforms=a,g.attributes=c;var r={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"},t=null;function s(u,l){if(!t){var y=Object.keys(r);t={};for(var h=0;h<y.length;++h){var T=y[h];t[u[T]]=r[T]}}return t[l]}function a(u,l){for(var y=u.getProgramParameter(l,u.ACTIVE_UNIFORMS),h=[],T=0;T<y;++T){var f=u.getActiveUniform(l,T);if(f){var n=s(u,f.type);if(f.size>1)for(var v=0;v<f.size;++v)h.push({name:f.name.replace("[0]","["+v+"]"),type:n});else h.push({name:f.name,type:n})}}return h}function c(u,l){for(var y=u.getProgramParameter(l,u.ACTIVE_ATTRIBUTES),h=[],T=0;T<y;++T){var f=u.getActiveAttrib(l,T);f&&h.push({name:f.name,type:s(u,f.type)})}return h}},1628:function(d,g,r){g.shader=v,g.program=m;var t=r(9068),s=r(3530),a=typeof WeakMap>"u"?r(4037):WeakMap,c=new a,u=0;function l(b,E,p,S,w,i,C){this.id=b,this.src=E,this.type=p,this.shader=S,this.count=i,this.programs=[],this.cache=C}l.prototype.dispose=function(){if(--this.count===0){for(var b=this.cache,E=b.gl,p=this.programs,S=0,w=p.length;S<w;++S){var i=b.programs[p[S]];i&&(delete b.programs[S],E.deleteProgram(i))}E.deleteShader(this.shader),delete b.shaders[this.type===E.FRAGMENT_SHADER|0][this.src]}};function y(b){this.gl=b,this.shaders=[{},{}],this.programs={}}var h=y.prototype;function T(b,E,p){var S=b.createShader(E);if(b.shaderSource(S,p),b.compileShader(S),!b.getShaderParameter(S,b.COMPILE_STATUS)){var w=b.getShaderInfoLog(S);try{var i=s(w,p,E)}catch(C){throw console.warn("Failed to format compiler error: "+C),new t(w,`Error compiling shader:
`+w)}throw new t(w,i.short,i.long)}return S}h.getShaderReference=function(b,E){var p=this.gl,S=this.shaders[b===p.FRAGMENT_SHADER|0],w=S[E];if(!w||!p.isShader(w.shader)){var i=T(p,b,E);w=S[E]=new l(u++,E,b,i,[],1,this)}else w.count+=1;return w};function f(b,E,p,S,w){var i=b.createProgram();b.attachShader(i,E),b.attachShader(i,p);for(var C=0;C<S.length;++C)b.bindAttribLocation(i,w[C],S[C]);if(b.linkProgram(i),!b.getProgramParameter(i,b.LINK_STATUS)){var x=b.getProgramInfoLog(i);throw new t(x,"Error linking program: "+x)}return i}h.getProgram=function(b,E,p,S){var w=[b.id,E.id,p.join(":"),S.join(":")].join("@"),i=this.programs[w];return(!i||!this.gl.isProgram(i))&&(this.programs[w]=i=f(this.gl,b.shader,E.shader,p,S),b.programs.push(w),E.programs.push(w)),i};function n(b){var E=c.get(b);return E||(E=new y(b),c.set(b,E)),E}function v(b,E,p){return n(b).getShaderReference(E,p)}function m(b,E,p,S,w){return n(b).getProgram(E,p,S,w)}},3050:function(d){d.exports=t;function g(s){this.plot=s,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]}var r=g.prototype;r.update=function(s){s=s||{},this.enable=(s.enable||[!0,!0,!1,!1]).slice(),this.width=(s.width||[1,1,1,1]).slice(),this.color=(s.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(a){return a.slice()}),this.center=(s.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},r.draw=function(){var s=this.enable,a=this.width,c=this.color,u=this.center,l=this.plot,y=l.line,h=l.dataBox,T=l.viewBox;if(y.bind(),h[0]<=u[0]&&u[0]<=h[2]&&h[1]<=u[1]&&u[1]<=h[3]){var f=T[0]+(u[0]-h[0])/(h[2]-h[0])*(T[2]-T[0]),n=T[1]+(u[1]-h[1])/(h[3]-h[1])*(T[3]-T[1]);s[0]&&y.drawLine(f,n,T[0],n,a[0],c[0]),s[1]&&y.drawLine(f,n,f,T[1],a[1],c[1]),s[2]&&y.drawLine(f,n,T[2],n,a[2],c[2]),s[3]&&y.drawLine(f,n,f,T[3],a[3],c[3])}},r.dispose=function(){this.plot.removeOverlay(this)};function t(s,a){var c=new g(s);return c.update(a),s.addOverlay(c),c}},3540:function(d,g,r){var t=r(6832),s=r(5158),a=t([`precision mediump float;
#define GLSLIFY 1
attribute vec3 position, color;
attribute float weight;
uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;
varying vec4 fragColor;
void main() {
vec3 vertexPosition = mix(coordinates[0],
mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));
vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);
vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;
vec2 delta = weight * clipOffset * screenShape;
vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;
gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]),c=t([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}`]);d.exports=function(u){return s(u,a,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},6496:function(d,g,r){var t=r(5827),s=r(2944),a=r(3540);d.exports=f;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(n,v,m,b){this.gl=n,this.buffer=v,this.vao=m,this.shader=b,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 l=u.prototype,y=[0,0,0],h=[0,0,0],T=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(n){},l.draw=function(n){var v=this.gl,m=this.vao,b=this.shader;m.bind(),b.bind();var E=n.model||c,p=n.view||c,S=n.projection||c,w;this.axes&&(w=this.axes.lastCubeProps.axis);for(var i=y,C=h,x=0;x<3;++x)w&&w[x]<0?(i[x]=this.bounds[0][x],C[x]=this.bounds[1][x]):(i[x]=this.bounds[1][x],C[x]=this.bounds[0][x]);T[0]=v.drawingBufferWidth,T[1]=v.drawingBufferHeight,b.uniforms.model=E,b.uniforms.view=p,b.uniforms.projection=S,b.uniforms.coordinates=[this.position,i,C],b.uniforms.colors=this.colors,b.uniforms.screenShape=T;for(var x=0;x<3;++x)b.uniforms.lineWidth=this.lineWidth[x]*this.pixelRatio,this.enabled[x]&&(m.draw(v.TRIANGLES,6,6*x),this.drawSides[x]&&m.draw(v.TRIANGLES,12,18+12*x));m.unbind()},l.update=function(n){n&&("bounds"in n&&(this.bounds=n.bounds),"position"in n&&(this.position=n.position),"lineWidth"in n&&(this.lineWidth=n.lineWidth),"colors"in n&&(this.colors=n.colors),"enabled"in n&&(this.enabled=n.enabled),"drawSides"in n&&(this.drawSides=n.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function f(n,v){var m=[];function b(i,C,x,k,I,B){var _=[i,C,x,0,0,0,1];_[k+3]=1,_[k]=I,m.push.apply(m,_),_[6]=-1,m.push.apply(m,_),_[k]=B,m.push.apply(m,_),m.push.apply(m,_),_[6]=1,m.push.apply(m,_),_[k]=I,m.push.apply(m,_)}b(0,0,0,0,0,1),b(0,0,0,1,0,1),b(0,0,0,2,0,1),b(1,0,0,1,-1,1),b(1,0,0,2,-1,1),b(0,1,0,0,-1,1),b(0,1,0,2,-1,1),b(0,0,1,0,-1,1),b(0,0,1,1,-1,1);var E=t(n,m),p=s(n,[{type:n.FLOAT,buffer:E,size:3,offset:0,stride:28},{type:n.FLOAT,buffer:E,size:3,offset:12,stride:28},{type:n.FLOAT,buffer:E,size:1,offset:24,stride:28}]),S=a(n);S.attributes.position.location=0,S.attributes.color.location=1,S.attributes.weight.location=2;var w=new u(n,E,p,S);return w.update(v),w}},9578:function(d,g,r){var t=r(6832),s=t([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// 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).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
float segmentCount = 8.0;
float angle = 2.0 * 3.14159 * (index / segmentCount);
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d);
vec3 y = v * sin(angle) * length(d);
vec3 v3 = x + y;
normal = normalize(v3);
return v3;
}
attribute vec4 vector;
attribute vec4 color, position;
attribute vec2 uv;
uniform float vectorScale, tubeScale;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
// Scale the vector magnitude to stay constant with
// model & view changes.
vec3 normal;
vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
//Lighting geometry parameters
vec4 cameraCoordinate = view * tubePosition;
cameraCoordinate.xyz /= cameraCoordinate.w;
f_lightDirection = lightPosition - cameraCoordinate.xyz;
f_eyeDirection = eyePosition - cameraCoordinate.xyz;
f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
// vec4 m_position = model * vec4(tubePosition, 1.0);
vec4 t_position = view * tubePosition;
gl_Position = projection * t_position;
f_color = color;
f_data = tubePosition.xyz;
f_position = position.xyz;
f_uv = uv;
}
`]),a=t([`#extension GL_OES_standard_derivatives : enable
precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float cookTorranceSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness,
float fresnel) {
float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
//Half angle vector
vec3 H = normalize(lightDirection + viewDirection);
//Geometric term
float NdotH = max(dot(surfaceNormal, H), 0.0);
float VdotH = max(dot(viewDirection, H), 0.000001);
float LdotH = max(dot(lightDirection, H), 0.000001);
float G1 = (2.0 * NdotH * VdotN) / VdotH;
float G2 = (2.0 * NdotH * LdotN) / LdotH;
float G = min(1.0, min(G1, G2));
//Distribution term
float D = beckmannDistribution(NdotH, roughness);
//Fresnel term
float F = pow(1.0 - VdotN, fresnel);
//Multiply terms and done
return G * F * D / max(3.14159265 * VdotN, 0.000001);
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
vec3 N = normalize(f_normal);
vec3 L = normalize(f_lightDirection);
vec3 V = normalize(f_eyeDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
vec4 surfaceColor = f_color * texture2D(texture, f_uv);
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = litColor * opacity;
}
`]),c=t([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// 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).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
float segmentCount = 8.0;
float angle = 2.0 * 3.14159 * (index / segmentCount);
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d);
vec3 y = v * sin(angle) * length(d);
vec3 v3 = x + y;
normal = normalize(v3);
return v3;
}
attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform float tubeScale;
varying vec3 f_position;
varying vec4 f_id;
void main() {
vec3 normal;
vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
gl_Position = projection * view * tubePosition;
f_id = id;
f_position = position.xyz;
}
`]),u=t([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float pickId;
varying vec3 f_position;
varying vec4 f_id;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
gl_FragColor = vec4(pickId, f_id.xyz);
}`]);g.meshShader={vertex:s,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},g.pickShader={vertex:c,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(d,g,r){var t=r(2858),s=r(4020),a=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(m,b,E,p){for(var S=m.points,w=m.velocities,i=m.divergences,C=[],x=[],k=[],I=[],B=[],_=[],z=0,O=0,F=s.create(),N=s.create(),V=8,j=0;j<S.length;j++){var $=S[j],q=w[j],oe=i[j];b===0&&(oe=E*.05),O=t.length(q)/p,F=s.create(),t.copy(F,q),F[3]=oe;for(var Z=0;Z<V;Z++)B[Z]=[$[0],$[1],$[2],Z];if(I.length>0)for(var Z=0;Z<V;Z++){var G=(Z+1)%V;C.push(I[Z],B[Z],B[G],B[G],I[G],I[Z]),k.push(N,F,F,F,N,N),_.push(z,O,O,O,z,z);var re=C.length;x.push([re-6,re-5,re-4],[re-3,re-2,re-1])}var H=I;I=B,B=H;var J=N;N=F,F=J;var ae=z;z=O,O=ae}return{positions:C,cells:x,vectors:k,vertexIntensity:_}},u=function(m,b,E,p){for(var S=0,w=0;w<m.length;w++)for(var i=m[w].velocities,C=0;C<i.length;C++)S=Math.max(S,t.length(i[C]));for(var x=m.map(function(j){return c(j,E,p,S)}),k=[],I=[],B=[],_=[],w=0;w<x.length;w++){var z=x[w],O=k.length;k=k.concat(z.positions),B=B.concat(z.vectors),_=_.concat(z.vertexIntensity);for(var C=0;C<z.cells.length;C++){var F=z.cells[C],N=[];I.push(N);for(var V=0;V<F.length;V++)N.push(F[V]+O)}}return{positions:k,cells:I,vectors:B,vertexIntensity:_,colormap:b}},l=function(m,b){var E=m.length,p;for(p=0;p<E;p++){var S=m[p];if(S===b)return p;if(S>b)return p-1}return p},y=function(m,b,E){return m<b?b:m>E?E:m},h=function(m,b,E){var p=b.vectors,S=b.meshgrid,w=m[0],i=m[1],C=m[2],x=S[0].length,k=S[1].length,I=S[2].length,B=l(S[0],w),_=l(S[1],i),z=l(S[2],C),O=B+1,F=_+1,N=z+1;if(B=y(B,0,x-1),O=y(O,0,x-1),_=y(_,0,k-1),F=y(F,0,k-1),z=y(z,0,I-1),N=y(N,0,I-1),B<0||_<0||z<0||O>x-1||F>k-1||N>I-1)return t.create();var V=S[0][B],j=S[0][O],$=S[1][_],q=S[1][F],oe=S[2][z],Z=S[2][N],G=(w-V)/(j-V),re=(i-$)/(q-$),H=(C-oe)/(Z-oe);isFinite(G)||(G=.5),isFinite(re)||(re=.5),isFinite(H)||(H=.5);var J,ae,K,Y,ie,ne;switch(E.reversedX&&(B=x-1-B,O=x-1-O),E.reversedY&&(_=k-1-_,F=k-1-F),E.reversedZ&&(z=I-1-z,N=I-1-N),E.filled){case 5:ie=z,ne=N,K=_*I,Y=F*I,J=B*I*k,ae=O*I*k;break;case 4:ie=z,ne=N,J=B*I,ae=O*I,K=_*I*x,Y=F*I*x;break;case 3:K=_,Y=F,ie=z*k,ne=N*k,J=B*k*I,ae=O*k*I;break;case 2:K=_,Y=F,J=B*k,ae=O*k,ie=z*k*x,ne=N*k*x;break;case 1:J=B,ae=O,ie=z*x,ne=N*x,K=_*x*I,Y=F*x*I;break;default:J=B,ae=O,K=_*x,Y=F*x,ie=z*x*k,ne=N*x*k;break}var le=p[J+K+ie],de=p[J+K+ne],we=p[J+Y+ie],me=p[J+Y+ne],Le=p[ae+K+ie],ve=p[ae+K+ne],Ae=p[ae+Y+ie],ye=p[ae+Y+ne],Se=t.create(),_e=t.create(),ze=t.create(),Ie=t.create();t.lerp(Se,le,Le,G),t.lerp(_e,de,ve,G),t.lerp(ze,we,Ae,G),t.lerp(Ie,me,ye,G);var Ne=t.create(),et=t.create();t.lerp(Ne,Se,ze,re),t.lerp(et,_e,Ie,re);var st=t.create();return t.lerp(st,Ne,et,H),st},T=function(m){var b=1/0;m.sort(function(w,i){return w-i});for(var E=m.length,p=1;p<E;p++){var S=Math.abs(m[p]-m[p-1]);S<b&&(b=S)}return b},f=function(m){for(var b=[],E=[],p=[],S={},w={},i={},C=m.length,x=0;x<C;x++){var k=m[x],I=k[0],B=k[1],_=k[2];S[I]||(b.push(I),S[I]=!0),w[B]||(E.push(B),w[B]=!0),i[_]||(p.push(_),i[_]=!0)}var z=T(b),O=T(E),F=T(p),N=Math.min(z,O,F);return isFinite(N)?N:1};d.exports=function(m,b){var E=m.startingPositions,p=m.maxLength||1e3,S=m.tubeSize||1,w=m.absoluteTubeSize,i=m.gridFill||"+x+y+z",C={};i.indexOf("-x")!==-1&&(C.reversedX=!0),i.indexOf("-y")!==-1&&(C.reversedY=!0),i.indexOf("-z")!==-1&&(C.reversedZ=!0),C.filled=a.indexOf(i.replace(/-/g,"").replace(/\+/g,""));var x=m.getVelocity||function(ve){return h(ve,m,C)},k=m.getDivergence||function(ve,Ae){var ye=t.create(),Se=1e-4;t.add(ye,ve,[Se,0,0]);var _e=x(ye);t.subtract(_e,_e,Ae),t.scale(_e,_e,1/Se),t.add(ye,ve,[0,Se,0]);var ze=x(ye);t.subtract(ze,ze,Ae),t.scale(ze,ze,1/Se),t.add(ye,ve,[0,0,Se]);var Ie=x(ye);return t.subtract(Ie,Ie,Ae),t.scale(Ie,Ie,1/Se),t.add(ye,_e,ze),t.add(ye,ye,Ie),ye},I=[],B=b[0][0],_=b[0][1],z=b[0][2],O=b[1][0],F=b[1][1],N=b[1][2],V=function(ve){var Ae=ve[0],ye=ve[1],Se=ve[2];return!(Ae<B||Ae>O||ye<_||ye>F||Se<z||Se>N)},j=t.distance(b[0],b[1]),$=10*j/p,q=$*$,oe=1,Z=0,G=E.length;G>1&&(oe=f(E));for(var re=0;re<G;re++){var H=t.create();t.copy(H,E[re]);var J=[H],ae=[],K=x(H),Y=H;ae.push(K);var ie=[],ne=k(H,K),le=t.length(ne);isFinite(le)&&le>Z&&(Z=le),ie.push(le),I.push({points:J,velocities:ae,divergences:ie});for(var de=0;de<p*100&&J.length<p&&V(H);){de++;var we=t.clone(K),me=t.squaredLength(we);if(me===0)break;if(me>q&&t.scale(we,we,$/Math.sqrt(me)),t.add(we,we,H),K=x(we),t.squaredDistance(Y,we)-q>-1e-4*q){J.push(we),Y=we,ae.push(K);var ne=k(we,K),le=t.length(ne);isFinite(le)&&le>Z&&(Z=le),ie.push(le)}H=we}}var Le=u(I,m.colormap,Z,oe);return w?Le.tubeScale=w:(Z===0&&(Z=1),Le.tubeScale=S*.5*oe/Z),Le};var n=r(9578),v=r(1140).createMesh;d.exports.createTubeMesh=function(m,b){return v(m,b,{shaders:n,traceType:"streamtube"})}},9054:function(d,g,r){var t=r(5158),s=r(6832),a=s([`precision highp float;
#define GLSLIFY 1
attribute vec4 uv;
attribute vec3 f;
attribute vec3 normal;
uniform vec3 objectOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 lightPosition, eyePosition;
uniform sampler2D colormap;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;
void main() {
vec3 localCoordinate = vec3(uv.zw, f.x);
worldCoordinate = objectOffset + localCoordinate;
vec4 worldPosition = model * vec4(worldCoordinate, 1.0);
vec4 clipPosition = projection * view * worldPosition;
gl_Position = clipPosition;
kill = f.y;
value = f.z;
planeCoordinate = uv.xy;
vColor = texture2D(colormap, vec2(value, value));
//Lighting geometry parameters
vec4 cameraCoordinate = view * worldPosition;
cameraCoordinate.xyz /= cameraCoordinate.w;
lightDirection = lightPosition - cameraCoordinate.xyz;
eyeDirection = eyePosition - cameraCoordinate.xyz;
surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);
}
`]),c=s([`precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float beckmannSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness) {
return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 lowerBound, upperBound;
uniform float contourTint;
uniform vec4 contourColor;
uniform sampler2D colormap;
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform float vertexColor;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;
void main() {
if (
kill > 0.0 ||
vColor.a == 0.0 ||
outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)
) discard;
vec3 N = normalize(surfaceNormal);
vec3 V = normalize(eyeDirection);
vec3 L = normalize(lightDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = max(beckmannSpecular(L, V, N, roughness), 0.);
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
//decide how to interpolate color — in vertex or in fragment
vec4 surfaceColor =
step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +
step(.5, vertexColor) * vColor;
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;
}
`]),u=s([`precision highp float;
#define GLSLIFY 1
attribute vec4 uv;
attribute float f;
uniform vec3 objectOffset;
uniform mat3 permutation;
uniform mat4 model, view, projection;
uniform float height, zOffset;
uniform sampler2D colormap;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;
void main() {
vec3 dataCoordinate = permutation * vec3(uv.xy, height);
worldCoordinate = objectOffset + dataCoordinate;
vec4 worldPosition = model * vec4(worldCoordinate, 1.0);
vec4 clipPosition = projection * view * worldPosition;
clipPosition.z += zOffset;
gl_Position = clipPosition;
value = f + objectOffset.z;
kill = -1.0;
planeCoordinate = uv.zw;
vColor = texture2D(colormap, vec2(value, value));
//Don't do lighting for contours
surfaceNormal = vec3(1,0,0);
eyeDirection = vec3(0,1,0);
lightDirection = vec3(0,0,1);
}
`]),l=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec2 shape;
uniform vec3 clipBounds[2];
uniform float pickId;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 surfaceNormal;
vec2 splitFloat(float v) {
float vh = 255.0 * v;
float upper = floor(vh);
float lower = fract(vh);
return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);
}
void main() {
if ((kill > 0.0) ||
(outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;
vec2 ux = splitFloat(planeCoordinate.x / shape.x);
vec2 uy = splitFloat(planeCoordinate.y / shape.y);
gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));
}
`]);g.createShader=function(y){var h=t(y,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},g.createPickShader=function(y){var h=t(y,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},g.createContourShader=function(y){var h=t(y,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},g.createPickContourShader=function(y){var h=t(y,u,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},3754:function(d,g,r){d.exports=ae;var t=r(2288),s=r(5827),a=r(2944),c=r(8931),u=r(5306),l=r(9156),y=r(7498),h=r(7382),T=r(5050),f=r(4162),n=r(104),v=r(7437),m=r(5070),b=r(9144),E=r(9054),p=E.createShader,S=E.createContourShader,w=E.createPickShader,i=E.createPickContourShader,C=4*10,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[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(){for(var K=0;K<3;++K){var Y=I[K],ie=(K+1)%3,ne=(K+2)%3;Y[ie+0]=1,Y[ne+3]=1,Y[K+6]=1}})();function B(K,Y,ie,ne,le){this.position=K,this.index=Y,this.uv=ie,this.level=ne,this.dataCoordinate=le}var _=256;function z(K,Y,ie,ne,le,de,we,me,Le,ve,Ae,ye,Se,_e,ze){this.gl=K,this.shape=Y,this.bounds=ie,this.objectOffset=ze,this.intensityBounds=[],this._shader=ne,this._pickShader=le,this._coordinateBuffer=de,this._vao=we,this._colorMap=me,this._contourShader=Le,this._contourPickShader=ve,this._contourBuffer=Ae,this._contourVAO=ye,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new B([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Se,this._dynamicVAO=_e,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=[T(u.mallocFloat(1024),[0,0]),T(u.mallocFloat(1024),[0,0]),T(u.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 O=z.prototype;O.genColormap=function(K,Y){var ie=!1,ne=h([l({colormap:K,nshades:_,format:"rgba"}).map(function(le,de){var we=Y?F(de/255,Y):le[3];return we<1&&(ie=!0),[le[0],le[1],le[2],255*we]})]);return y.divseq(ne,255),this.hasAlphaScale=ie,ne},O.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},O.isOpaque=function(){return!this.isTransparent()},O.pickSlots=1,O.setPickBase=function(K){this.pickId=K};function F(K,Y){if(!Y||!Y.length)return 1;for(var ie=0;ie<Y.length;++ie){if(Y.length<2)return 1;if(Y[ie][0]===K)return Y[ie][1];if(Y[ie][0]>K&&ie>0){var ne=(Y[ie][0]-K)/(Y[ie][0]-Y[ie-1][0]);return Y[ie][1]*(1-ne)+ne*Y[ie-1][1]}}return 1}var N=[0,0,0],V={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j(K,Y){var ie,ne,le,de=Y.axes&&Y.axes.lastCubeProps.axis||N,we=Y.showSurface,me=Y.showContour;for(ie=0;ie<3;++ie)for(we=we||Y.surfaceProject[ie],ne=0;ne<3;++ne)me=me||Y.contourProject[ie][ne];for(ie=0;ie<3;++ie){var Le=V.projections[ie];for(ne=0;ne<16;++ne)Le[ne]=0;for(ne=0;ne<4;++ne)Le[5*ne]=1;Le[5*ie]=0,Le[12+ie]=Y.axesBounds[+(de[ie]>0)][ie],n(Le,K.model,Le);var ve=V.clipBounds[ie];for(le=0;le<2;++le)for(ne=0;ne<3;++ne)ve[le][ne]=K.clipBounds[le][ne];ve[0][ie]=-1e8,ve[1][ie]=1e8}return V.showSurface=we,V.showContour=me,V}var $={model:x,view:x,projection:x,inverseModel:x.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},q=x.slice(),oe=[1,0,0,0,1,0,0,0,1];function Z(K,Y){K=K||{};var ie=this.gl;ie.disable(ie.CULL_FACE),this._colorMap.bind(0);var ne=$;ne.model=K.model||x,ne.view=K.view||x,ne.projection=K.projection||x,ne.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ne.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ne.objectOffset=this.objectOffset,ne.contourColor=this.contourColor[0],ne.inverseModel=v(ne.inverseModel,ne.model);for(var le=0;le<2;++le)for(var de=ne.clipBounds[le],we=0;we<3;++we)de[we]=Math.min(Math.max(this.clipBounds[le][we],-1e8),1e8);ne.kambient=this.ambientLight,ne.kdiffuse=this.diffuseLight,ne.kspecular=this.specularLight,ne.roughness=this.roughness,ne.fresnel=this.fresnel,ne.opacity=this.opacity,ne.height=0,ne.permutation=oe,ne.vertexColor=this.vertexColor;var me=q;for(n(me,ne.view,ne.model),n(me,ne.projection,me),v(me,me),le=0;le<3;++le)ne.eyePosition[le]=me[12+le]/me[15];var Le=me[15];for(le=0;le<3;++le)Le+=this.lightPosition[le]*me[4*le+3];for(le=0;le<3;++le){var ve=me[12+le];for(we=0;we<3;++we)ve+=me[4*we+le]*this.lightPosition[we];ne.lightPosition[le]=ve/Le}var Ae=j(ne,this);if(Ae.showSurface){for(this._shader.bind(),this._shader.uniforms=ne,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ie.TRIANGLES,this._vertexCount),le=0;le<3;++le)!this.surfaceProject[le]||!this.vertexCount||(this._shader.uniforms.model=Ae.projections[le],this._shader.uniforms.clipBounds=Ae.clipBounds[le],this._vao.draw(ie.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ae.showContour){var ye=this._contourShader;ne.kambient=1,ne.kdiffuse=0,ne.kspecular=0,ne.opacity=1,ye.bind(),ye.uniforms=ne;var Se=this._contourVAO;for(Se.bind(),le=0;le<3;++le)for(ye.uniforms.permutation=I[le],ie.lineWidth(this.contourWidth[le]*this.pixelRatio),we=0;we<this.contourLevels[le].length;++we)we===this.highlightLevel[le]?(ye.uniforms.contourColor=this.highlightColor[le],ye.uniforms.contourTint=this.highlightTint[le]):(we===0||we-1===this.highlightLevel[le])&&(ye.uniforms.contourColor=this.contourColor[le],ye.uniforms.contourTint=this.contourTint[le]),this._contourCounts[le][we]&&(ye.uniforms.height=this.contourLevels[le][we],Se.draw(ie.LINES,this._contourCounts[le][we],this._contourOffsets[le][we]));for(le=0;le<3;++le)for(ye.uniforms.model=Ae.projections[le],ye.uniforms.clipBounds=Ae.clipBounds[le],we=0;we<3;++we)if(this.contourProject[le][we]){ye.uniforms.permutation=I[we],ie.lineWidth(this.contourWidth[we]*this.pixelRatio);for(var _e=0;_e<this.contourLevels[we].length;++_e)_e===this.highlightLevel[we]?(ye.uniforms.contourColor=this.highlightColor[we],ye.uniforms.contourTint=this.highlightTint[we]):(_e===0||_e-1===this.highlightLevel[we])&&(ye.uniforms.contourColor=this.contourColor[we],ye.uniforms.contourTint=this.contourTint[we]),this._contourCounts[we][_e]&&(ye.uniforms.height=this.contourLevels[we][_e],Se.draw(ie.LINES,this._contourCounts[we][_e],this._contourOffsets[we][_e]))}for(Se.unbind(),Se=this._dynamicVAO,Se.bind(),le=0;le<3;++le)if(this._dynamicCounts[le]!==0)for(ye.uniforms.model=ne.model,ye.uniforms.clipBounds=ne.clipBounds,ye.uniforms.permutation=I[le],ie.lineWidth(this.dynamicWidth[le]*this.pixelRatio),ye.uniforms.contourColor=this.dynamicColor[le],ye.uniforms.contourTint=this.dynamicTint[le],ye.uniforms.height=this.dynamicLevel[le],Se.draw(ie.LINES,this._dynamicCounts[le],this._dynamicOffsets[le]),we=0;we<3;++we)this.contourProject[we][le]&&(ye.uniforms.model=Ae.projections[we],ye.uniforms.clipBounds=Ae.clipBounds[we],Se.draw(ie.LINES,this._dynamicCounts[le],this._dynamicOffsets[le]));Se.unbind()}}O.draw=function(K){return Z.call(this,K,!1)},O.drawTransparent=function(K){return Z.call(this,K,!0)};var G={model:x,view:x,projection:x,inverseModel:x,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]};O.drawPick=function(K){K=K||{};var Y=this.gl;Y.disable(Y.CULL_FACE);var ie=G;ie.model=K.model||x,ie.view=K.view||x,ie.projection=K.projection||x,ie.shape=this._field[2].shape,ie.pickId=this.pickId/255,ie.lowerBound=this.bounds[0],ie.upperBound=this.bounds[1],ie.objectOffset=this.objectOffset,ie.permutation=oe;for(var ne=0;ne<2;++ne)for(var le=ie.clipBounds[ne],de=0;de<3;++de)le[de]=Math.min(Math.max(this.clipBounds[ne][de],-1e8),1e8);var we=j(ie,this);if(we.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=ie,this._vao.bind(),this._vao.draw(Y.TRIANGLES,this._vertexCount),ne=0;ne<3;++ne)this.surfaceProject[ne]&&(this._pickShader.uniforms.model=we.projections[ne],this._pickShader.uniforms.clipBounds=we.clipBounds[ne],this._vao.draw(Y.TRIANGLES,this._vertexCount));this._vao.unbind()}if(we.showContour){var me=this._contourPickShader;me.bind(),me.uniforms=ie;var Le=this._contourVAO;for(Le.bind(),de=0;de<3;++de)for(Y.lineWidth(this.contourWidth[de]*this.pixelRatio),me.uniforms.permutation=I[de],ne=0;ne<this.contourLevels[de].length;++ne)this._contourCounts[de][ne]&&(me.uniforms.height=this.contourLevels[de][ne],Le.draw(Y.LINES,this._contourCounts[de][ne],this._contourOffsets[de][ne]));for(ne=0;ne<3;++ne)for(me.uniforms.model=we.projections[ne],me.uniforms.clipBounds=we.clipBounds[ne],de=0;de<3;++de)if(this.contourProject[ne][de]){me.uniforms.permutation=I[de],Y.lineWidth(this.contourWidth[de]*this.pixelRatio);for(var ve=0;ve<this.contourLevels[de].length;++ve)this._contourCounts[de][ve]&&(me.uniforms.height=this.contourLevels[de][ve],Le.draw(Y.LINES,this._contourCounts[de][ve],this._contourOffsets[de][ve]))}Le.unbind()}},O.pick=function(K){if(!K||K.id!==this.pickId)return null;var Y=this._field[2].shape,ie=this._pickResult,ne=Y[0]*(K.value[0]+(K.value[2]>>4)/16)/255,le=Math.floor(ne),de=ne-le,we=Y[1]*(K.value[1]+(K.value[2]&15)/16)/255,me=Math.floor(we),Le=we-me;le+=1,me+=1;var ve=ie.position;ve[0]=ve[1]=ve[2]=0;for(var Ae=0;Ae<2;++Ae)for(var ye=Ae?de:1-de,Se=0;Se<2;++Se)for(var _e=Se?Le:1-Le,ze=le+Ae,Ie=me+Se,Ne=ye*_e,et=0;et<3;++et)ve[et]+=this._field[et].get(ze,Ie)*Ne;for(var st=this._pickResult.level,Ze=0;Ze<3;++Ze)if(st[Ze]=m.le(this.contourLevels[Ze],ve[Ze]),st[Ze]<0)this.contourLevels[Ze].length>0&&(st[Ze]=0);else if(st[Ze]<this.contourLevels[Ze].length-1){var Ke=this.contourLevels[Ze][st[Ze]],nt=this.contourLevels[Ze][st[Ze]+1];Math.abs(Ke-ve[Ze])>Math.abs(nt-ve[Ze])&&(st[Ze]+=1)}for(ie.index[0]=de<.5?le:le+1,ie.index[1]=Le<.5?me:me+1,ie.uv[0]=ne/Y[0],ie.uv[1]=we/Y[1],et=0;et<3;++et)ie.dataCoordinate[et]=this._field[et].get(ie.index[0],ie.index[1]);return ie},O.padField=function(K,Y){var ie=Y.shape.slice(),ne=K.shape.slice();y.assign(K.lo(1,1).hi(ie[0],ie[1]),Y),y.assign(K.lo(1).hi(ie[0],1),Y.hi(ie[0],1)),y.assign(K.lo(1,ne[1]-1).hi(ie[0],1),Y.lo(0,ie[1]-1).hi(ie[0],1)),y.assign(K.lo(0,1).hi(1,ie[1]),Y.hi(1)),y.assign(K.lo(ne[0]-1,1).hi(1,ie[1]),Y.lo(ie[0]-1)),K.set(0,0,Y.get(0,0)),K.set(0,ne[1]-1,Y.get(0,ie[1]-1)),K.set(ne[0]-1,0,Y.get(ie[0]-1,0)),K.set(ne[0]-1,ne[1]-1,Y.get(ie[0]-1,ie[1]-1))};function re(K,Y){return Array.isArray(K)?[Y(K[0]),Y(K[1]),Y(K[2])]:[Y(K),Y(K),Y(K)]}function H(K){return Array.isArray(K)?K.length===3?[K[0],K[1],K[2],1]:[K[0],K[1],K[2],K[3]]:[0,0,0,1]}function J(K){if(Array.isArray(K)){if(Array.isArray(K))return[H(K[0]),H(K[1]),H(K[2])];var Y=H(K);return[Y.slice(),Y.slice(),Y.slice()]}}O.update=function(K){K=K||{},this.objectOffset=K.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in K&&(this.contourWidth=re(K.contourWidth,Number)),"showContour"in K&&(this.showContour=re(K.showContour,Boolean)),"showSurface"in K&&(this.showSurface=!!K.showSurface),"contourTint"in K&&(this.contourTint=re(K.contourTint,Boolean)),"contourColor"in K&&(this.contourColor=J(K.contourColor)),"contourProject"in K&&(this.contourProject=re(K.contourProject,function(Lt){return re(Lt,Boolean)})),"surfaceProject"in K&&(this.surfaceProject=K.surfaceProject),"dynamicColor"in K&&(this.dynamicColor=J(K.dynamicColor)),"dynamicTint"in K&&(this.dynamicTint=re(K.dynamicTint,Number)),"dynamicWidth"in K&&(this.dynamicWidth=re(K.dynamicWidth,Number)),"opacity"in K&&(this.opacity=K.opacity),"opacityscale"in K&&(this.opacityscale=K.opacityscale),"colorBounds"in K&&(this.colorBounds=K.colorBounds),"vertexColor"in K&&(this.vertexColor=K.vertexColor?1:0),"colormap"in K&&this._colorMap.setPixels(this.genColormap(K.colormap,this.opacityscale));var Y=K.field||K.coords&&K.coords[2]||null,ie=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in K||"coords"in K){var ne=(Y.shape[0]+2)*(Y.shape[1]+2);ne>this._field[2].data.length&&(u.freeFloat(this._field[2].data),this._field[2].data=u.mallocFloat(t.nextPow2(ne))),this._field[2]=T(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var le=this.shape,de=0;de<2;++de)this._field[2].size>this._field[de].data.length&&(u.freeFloat(this._field[de].data),this._field[de].data=u.mallocFloat(this._field[2].size)),this._field[de]=T(this._field[de].data,[le[0]+2,le[1]+2]);if(K.coords){var we=K.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(de=0;de<2;++de){var me=we[de];for(Se=0;Se<2;++Se)if(me.shape[Se]!==le[Se])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[de],me)}}else if(K.ticks){var Le=K.ticks;if(!Array.isArray(Le)||Le.length!==2)throw new Error("gl-surface: invalid ticks");for(de=0;de<2;++de){var ve=Le[de];if((Array.isArray(ve)||ve.length)&&(ve=T(ve)),ve.shape[0]!==le[de])throw new Error("gl-surface: invalid tick length");var Ae=T(ve.data,le);Ae.stride[de]=ve.stride[0],Ae.stride[de^1]=0,this.padField(this._field[de],Ae)}}else{for(de=0;de<2;++de){var ye=[0,0];ye[de]=1,this._field[de]=T(this._field[de].data,[le[0]+2,le[1]+2],ye,0)}this._field[0].set(0,0,0);for(var Se=0;Se<le[0];++Se)this._field[0].set(Se+1,0,Se);for(this._field[0].set(le[0]+1,0,le[0]-1),this._field[1].set(0,0,0),Se=0;Se<le[1];++Se)this._field[1].set(0,Se+1,Se);this._field[1].set(0,le[1]+1,le[1]-1)}var _e=this._field,ze=T(u.mallocFloat(_e[2].size*3*2),[3,le[0]+2,le[1]+2,2]);for(de=0;de<3;++de)b(ze.pick(de),_e[de],"mirror");var Ie=T(u.mallocFloat(_e[2].size*3),[le[0]+2,le[1]+2,3]);for(de=0;de<le[0]+2;++de)for(Se=0;Se<le[1]+2;++Se){var Ne=ze.get(0,de,Se,0),et=ze.get(0,de,Se,1),st=ze.get(1,de,Se,0),Ze=ze.get(1,de,Se,1),Ke=ze.get(2,de,Se,0),nt=ze.get(2,de,Se,1),it=st*nt-Ze*Ke,lt=Ke*et-nt*Ne,vt=Ne*Ze-et*st,xt=Math.sqrt(it*it+lt*lt+vt*vt);xt<1e-8?(xt=Math.max(Math.abs(it),Math.abs(lt),Math.abs(vt)),xt<1e-8?(vt=1,lt=it=0,xt=1):xt=1/xt):xt=1/Math.sqrt(xt),Ie.set(de,Se,0,it*xt),Ie.set(de,Se,1,lt*xt),Ie.set(de,Se,2,vt*xt)}u.free(ze.data);var Je=[1/0,1/0,1/0],Pe=[-1/0,-1/0,-1/0],Ue=1/0,He=-1/0,Oe=(le[0]-1)*(le[1]-1)*6,Ce=u.mallocFloat(t.nextPow2(10*Oe)),ge=0,pe=0;for(de=0;de<le[0]-1;++de)e:for(Se=0;Se<le[1]-1;++Se){for(var Te=0;Te<2;++Te)for(var be=0;be<2;++be)for(var ke=0;ke<3;++ke){var Ve=this._field[ke].get(1+de+Te,1+Se+be);if(isNaN(Ve)||!isFinite(Ve))continue e}for(ke=0;ke<6;++ke){var je=de+k[ke][0],at=Se+k[ke][1],ut=this._field[0].get(je+1,at+1),Nt=this._field[1].get(je+1,at+1);Ve=this._field[2].get(je+1,at+1),it=Ie.get(je+1,at+1,0),lt=Ie.get(je+1,at+1,1),vt=Ie.get(je+1,at+1,2),K.intensity&&(Vt=K.intensity.get(je,at));var Vt=K.intensity?K.intensity.get(je,at):Ve+this.objectOffset[2];Ce[ge++]=je,Ce[ge++]=at,Ce[ge++]=ut,Ce[ge++]=Nt,Ce[ge++]=Ve,Ce[ge++]=0,Ce[ge++]=Vt,Ce[ge++]=it,Ce[ge++]=lt,Ce[ge++]=vt,Je[0]=Math.min(Je[0],ut+this.objectOffset[0]),Je[1]=Math.min(Je[1],Nt+this.objectOffset[1]),Je[2]=Math.min(Je[2],Ve+this.objectOffset[2]),Ue=Math.min(Ue,Vt),Pe[0]=Math.max(Pe[0],ut+this.objectOffset[0]),Pe[1]=Math.max(Pe[1],Nt+this.objectOffset[1]),Pe[2]=Math.max(Pe[2],Ve+this.objectOffset[2]),He=Math.max(He,Vt),pe+=1}}for(K.intensityBounds&&(Ue=+K.intensityBounds[0],He=+K.intensityBounds[1]),de=6;de<ge;de+=10)Ce[de]=(Ce[de]-Ue)/(He-Ue);this._vertexCount=pe,this._coordinateBuffer.update(Ce.subarray(0,ge)),u.freeFloat(Ce),u.free(Ie.data),this.bounds=[Je,Pe],this.intensity=K.intensity||this._field[2],(this.intensityBounds[0]!==Ue||this.intensityBounds[1]!==He)&&(ie=!0),this.intensityBounds=[Ue,He]}if("levels"in K){var gt=K.levels;for(Array.isArray(gt[0])?gt=gt.slice():gt=[[],[],gt],de=0;de<3;++de)gt[de]=gt[de].slice(),gt[de].sort(function(Lt,Ut){return Lt-Ut});for(de=0;de<3;++de)for(Se=0;Se<gt[de].length;++Se)gt[de][Se]-=this.objectOffset[de];e:for(de=0;de<3;++de){if(gt[de].length!==this.contourLevels[de].length){ie=!0;break}for(Se=0;Se<gt[de].length;++Se)if(gt[de][Se]!==this.contourLevels[de][Se]){ie=!0;break e}}this.contourLevels=gt}if(ie){_e=this._field,le=this.shape;for(var Ct=[],Yt=0;Yt<3;++Yt){var gr=this.contourLevels[Yt],ht=[],Ht=[],Wt=[0,0,0];for(de=0;de<gr.length;++de){var cr=f(this._field[Yt],gr[de]);ht.push(Ct.length/5|0),pe=0;e:for(Se=0;Se<cr.cells.length;++Se){var er=cr.cells[Se];for(ke=0;ke<2;++ke){var ct=cr.positions[er[ke]],qe=ct[0],dt=Math.floor(qe)|0,bt=qe-dt,Et=ct[1],Mt=Math.floor(Et)|0,_t=Et-Mt,It=!1;t:for(var Gt=0;Gt<3;++Gt){Wt[Gt]=0;var nr=(Yt+Gt+1)%3;for(Te=0;Te<2;++Te){var ar=Te?bt:1-bt;for(je=Math.min(Math.max(dt+Te,0),le[0])|0,be=0;be<2;++be){var ir=be?_t:1-_t;if(at=Math.min(Math.max(Mt+be,0),le[1])|0,Gt<2?Ve=this._field[nr].get(je,at):Ve=(this.intensity.get(je,at)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Ve)||isNaN(Ve)){It=!0;break t}var Be=ar*ir;Wt[Gt]+=Be*Ve}}}if(!It)Ct.push(Wt[0],Wt[1],ct[0],ct[1],Wt[2]),pe+=1;else{if(ke>0){for(var Fe=0;Fe<5;++Fe)Ct.pop();pe-=1}continue e}}}Ht.push(pe)}this._contourOffsets[Yt]=ht,this._contourCounts[Yt]=Ht}var Rt=u.mallocFloat(Ct.length);for(de=0;de<Ct.length;++de)Rt[de]=Ct[de];this._contourBuffer.update(Rt),u.freeFloat(Rt)}},O.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 K=0;K<3;++K)u.freeFloat(this._field[K].data)},O.highlight=function(K){var Y;if(!K){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(Y=0;Y<3;++Y)this.enableHighlight[Y]?this.highlightLevel[Y]=K.level[Y]:this.highlightLevel[Y]=-1;var ie;for(this.snapToData?ie=K.dataCoordinate:ie=K.position,Y=0;Y<3;++Y)ie[Y]-=this.objectOffset[Y];if(!((!this.enableDynamic[0]||ie[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||ie[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||ie[2]===this.dynamicLevel[2]))){for(var ne=0,le=this.shape,de=u.mallocFloat(12*le[0]*le[1]),we=0;we<3;++we){if(!this.enableDynamic[we]){this.dynamicLevel[we]=NaN,this._dynamicCounts[we]=0;continue}this.dynamicLevel[we]=ie[we];var me=(we+1)%3,Le=(we+2)%3,ve=this._field[we],Ae=this._field[me],ye=this._field[Le],Se=f(ve,ie[we]),_e=Se.cells,ze=Se.positions;for(this._dynamicOffsets[we]=ne,Y=0;Y<_e.length;++Y)for(var Ie=_e[Y],Ne=0;Ne<2;++Ne){var et=ze[Ie[Ne]],st=+et[0],Ze=st|0,Ke=Math.min(Ze+1,le[0])|0,nt=st-Ze,it=1-nt,lt=+et[1],vt=lt|0,xt=Math.min(vt+1,le[1])|0,Je=lt-vt,Pe=1-Je,Ue=it*Pe,He=it*Je,Oe=nt*Pe,Ce=nt*Je,ge=Ue*Ae.get(Ze,vt)+He*Ae.get(Ze,xt)+Oe*Ae.get(Ke,vt)+Ce*Ae.get(Ke,xt),pe=Ue*ye.get(Ze,vt)+He*ye.get(Ze,xt)+Oe*ye.get(Ke,vt)+Ce*ye.get(Ke,xt);if(isNaN(ge)||isNaN(pe)){Ne&&(ne-=1);break}de[2*ne+0]=ge,de[2*ne+1]=pe,ne+=1}this._dynamicCounts[we]=ne-this._dynamicOffsets[we]}this._dynamicBuffer.update(de.subarray(0,2*ne)),u.freeFloat(de)}};function ae(K){var Y=K.gl,ie=p(Y),ne=w(Y),le=S(Y),de=i(Y),we=s(Y),me=a(Y,[{buffer:we,size:4,stride:C,offset:0},{buffer:we,size:3,stride:C,offset:16},{buffer:we,size:3,stride:C,offset:28}]),Le=s(Y),ve=a(Y,[{buffer:Le,size:4,stride:20,offset:0},{buffer:Le,size:1,stride:20,offset:16}]),Ae=s(Y),ye=a(Y,[{buffer:Ae,size:2,type:Y.FLOAT}]),Se=c(Y,1,_,Y.RGBA,Y.UNSIGNED_BYTE);Se.minFilter=Y.LINEAR,Se.magFilter=Y.LINEAR;var _e=new z(Y,[0,0],[[0,0,0],[0,0,0]],ie,ne,we,me,Se,le,de,Le,ve,Ae,ye,[0,0,0]),ze={levels:[[],[],[]]};for(var Ie in K)ze[Ie]=K[Ie];return ze.colormap=ze.colormap||"jet",_e.update(ze),_e}},8931:function(d,g,r){var t=r(5050),s=r(7498),a=r(5306);d.exports=i;var c=null,u=null,l=null;function y(C){c=[C.LINEAR,C.NEAREST_MIPMAP_LINEAR,C.LINEAR_MIPMAP_NEAREST,C.LINEAR_MIPMAP_NEAREST],u=[C.NEAREST,C.LINEAR,C.NEAREST_MIPMAP_NEAREST,C.NEAREST_MIPMAP_LINEAR,C.LINEAR_MIPMAP_NEAREST,C.LINEAR_MIPMAP_LINEAR],l=[C.REPEAT,C.CLAMP_TO_EDGE,C.MIRRORED_REPEAT]}function h(C){return typeof HTMLCanvasElement<"u"&&C instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&C instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&C instanceof HTMLVideoElement||typeof ImageData<"u"&&C instanceof ImageData}var T=function(C,x){s.muls(C,x,255)};function f(C,x,k){var I=C.gl,B=I.getParameter(I.MAX_TEXTURE_SIZE);if(x<0||x>B||k<0||k>B)throw new Error("gl-texture2d: Invalid texture size");return C._shape=[x,k],C.bind(),I.texImage2D(I.TEXTURE_2D,0,C.format,x,k,0,C.format,C.type,null),C._mipLevels=[0],C}function n(C,x,k,I,B,_){this.gl=C,this.handle=x,this.format=B,this.type=_,this._shape=[k,I],this._mipLevels=[0],this._magFilter=C.NEAREST,this._minFilter=C.NEAREST,this._wrapS=C.CLAMP_TO_EDGE,this._wrapT=C.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,O=[this._wrapS,this._wrapT];Object.defineProperties(O,[{get:function(){return z._wrapS},set:function(N){return z.wrapS=N}},{get:function(){return z._wrapT},set:function(N){return z.wrapT=N}}]),this._wrapVector=O;var F=[this._shape[0],this._shape[1]];Object.defineProperties(F,[{get:function(){return z._shape[0]},set:function(N){return z.width=N}},{get:function(){return z._shape[1]},set:function(N){return z.height=N}}]),this._shapeVector=F}var v=n.prototype;Object.defineProperties(v,{minFilter:{get:function(){return this._minFilter},set:function(C){this.bind();var x=this.gl;if(this.type===x.FLOAT&&c.indexOf(C)>=0&&(x.getExtension("OES_texture_float_linear")||(C=x.NEAREST)),u.indexOf(C)<0)throw new Error("gl-texture2d: Unknown filter mode "+C);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,C),this._minFilter=C}},magFilter:{get:function(){return this._magFilter},set:function(C){this.bind();var x=this.gl;if(this.type===x.FLOAT&&c.indexOf(C)>=0&&(x.getExtension("OES_texture_float_linear")||(C=x.NEAREST)),u.indexOf(C)<0)throw new Error("gl-texture2d: Unknown filter mode "+C);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,C),this._magFilter=C}},mipSamples:{get:function(){return this._anisoSamples},set:function(C){var x=this._anisoSamples;if(this._anisoSamples=Math.max(C,1)|0,x!==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(C){if(this.bind(),l.indexOf(C)<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,C),this._wrapS=C}},wrapT:{get:function(){return this._wrapT},set:function(C){if(this.bind(),l.indexOf(C)<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,C),this._wrapT=C}},wrap:{get:function(){return this._wrapVector},set:function(C){if(Array.isArray(C)||(C=[C,C]),C.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(l.indexOf(C[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);this._wrapS=C[0],this._wrapT=C[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),C}},shape:{get:function(){return this._shapeVector},set:function(C){if(!Array.isArray(C))C=[C|0,C|0];else if(C.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return f(this,C[0]|0,C[1]|0),[C[0]|0,C[1]|0]}},width:{get:function(){return this._shape[0]},set:function(C){return C=C|0,f(this,C,this._shape[1]),C}},height:{get:function(){return this._shape[1]},set:function(C){return C=C|0,f(this,this._shape[0],C),C}}}),v.bind=function(C){var x=this.gl;return C!==void 0&&x.activeTexture(x.TEXTURE0+(C|0)),x.bindTexture(x.TEXTURE_2D,this.handle),C!==void 0?C|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},v.dispose=function(){this.gl.deleteTexture(this.handle)},v.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var C=Math.min(this._shape[0],this._shape[1]),x=0;C>0;++x,C>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},v.setPixels=function(C,x,k,I){var B=this.gl;this.bind(),Array.isArray(x)?(I=k,k=x[1]|0,x=x[0]|0):(x=x||0,k=k||0),I=I||0;var _=h(C)?C:C.raw;if(_){var z=this._mipLevels.indexOf(I)<0;z?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,_),this._mipLevels.push(I)):B.texSubImage2D(B.TEXTURE_2D,I,x,k,this.format,this.type,_)}else if(C.shape&&C.stride&&C.data){if(C.shape.length<2||x+C.shape[1]>this._shape[1]>>>I||k+C.shape[0]>this._shape[0]>>>I||x<0||k<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");b(B,x,k,I,this.format,this.type,this._mipLevels,C)}else throw new Error("gl-texture2d: Unsupported data type")};function m(C,x){return C.length===3?x[2]===1&&x[1]===C[0]*C[2]&&x[0]===C[2]:x[0]===1&&x[1]===C[0]}function b(C,x,k,I,B,_,z,O){var F=O.dtype,N=O.shape.slice();if(N.length<2||N.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var V=0,j=0,$=m(N,O.stride.slice());if(F==="float32"?V=C.FLOAT:F==="float64"?(V=C.FLOAT,$=!1,F="float32"):F==="uint8"?V=C.UNSIGNED_BYTE:(V=C.UNSIGNED_BYTE,$=!1,F="uint8"),N.length===2)j=C.LUMINANCE,N=[N[0],N[1],1],O=t(O.data,N,[O.stride[0],O.stride[1],1],O.offset);else if(N.length===3){if(N[2]===1)j=C.ALPHA;else if(N[2]===2)j=C.LUMINANCE_ALPHA;else if(N[2]===3)j=C.RGB;else if(N[2]===4)j=C.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");N[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((j===C.LUMINANCE||j===C.ALPHA)&&(B===C.LUMINANCE||B===C.ALPHA)&&(j=B),j!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var q=O.size,oe=z.indexOf(I)<0;if(oe&&z.push(I),V===_&&$)O.offset===0&&O.data.length===q?oe?C.texImage2D(C.TEXTURE_2D,I,B,N[0],N[1],0,B,_,O.data):C.texSubImage2D(C.TEXTURE_2D,I,x,k,N[0],N[1],B,_,O.data):oe?C.texImage2D(C.TEXTURE_2D,I,B,N[0],N[1],0,B,_,O.data.subarray(O.offset,O.offset+q)):C.texSubImage2D(C.TEXTURE_2D,I,x,k,N[0],N[1],B,_,O.data.subarray(O.offset,O.offset+q));else{var Z;_===C.FLOAT?Z=a.mallocFloat32(q):Z=a.mallocUint8(q);var G=t(Z,N,[N[2],N[2]*N[0],1]);V===C.FLOAT&&_===C.UNSIGNED_BYTE?T(G,O):s.assign(G,O),oe?C.texImage2D(C.TEXTURE_2D,I,B,N[0],N[1],0,B,_,Z.subarray(0,q)):C.texSubImage2D(C.TEXTURE_2D,I,x,k,N[0],N[1],B,_,Z.subarray(0,q)),_===C.FLOAT?a.freeFloat32(Z):a.freeUint8(Z)}}function E(C){var x=C.createTexture();return C.bindTexture(C.TEXTURE_2D,x),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),x}function p(C,x,k,I,B){var _=C.getParameter(C.MAX_TEXTURE_SIZE);if(x<0||x>_||k<0||k>_)throw new Error("gl-texture2d: Invalid texture shape");if(B===C.FLOAT&&!C.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=E(C);return C.texImage2D(C.TEXTURE_2D,0,I,x,k,0,I,B,null),new n(C,z,x,k,I,B)}function S(C,x,k,I,B,_){var z=E(C);return C.texImage2D(C.TEXTURE_2D,0,B,B,_,x),new n(C,z,k,I,B,_)}function w(C,x){var k=x.dtype,I=x.shape.slice(),B=C.getParameter(C.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>B||I[1]<0||I[1]>B)throw new Error("gl-texture2d: Invalid texture size");var _=m(I,x.stride.slice()),z=0;k==="float32"?z=C.FLOAT:k==="float64"?(z=C.FLOAT,_=!1,k="float32"):k==="uint8"?z=C.UNSIGNED_BYTE:(z=C.UNSIGNED_BYTE,_=!1,k="uint8");var O=0;if(I.length===2)O=C.LUMINANCE,I=[I[0],I[1],1],x=t(x.data,I,[x.stride[0],x.stride[1],1],x.offset);else if(I.length===3)if(I[2]===1)O=C.ALPHA;else if(I[2]===2)O=C.LUMINANCE_ALPHA;else if(I[2]===3)O=C.RGB;else if(I[2]===4)O=C.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");z===C.FLOAT&&!C.getExtension("OES_texture_float")&&(z=C.UNSIGNED_BYTE,_=!1);var F,N,V=x.size;if(_)x.offset===0&&x.data.length===V?F=x.data:F=x.data.subarray(x.offset,x.offset+V);else{var j=[I[2],I[2]*I[0],1];N=a.malloc(V,k);var $=t(N,I,j,0);(k==="float32"||k==="float64")&&z===C.UNSIGNED_BYTE?T($,x):s.assign($,x),F=N.subarray(0,V)}var q=E(C);return C.texImage2D(C.TEXTURE_2D,0,O,I[0],I[1],0,O,z,F),_||a.free(N),new n(C,q,I[0],I[1],O,z)}function i(C){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||y(C),typeof arguments[1]=="number")return p(C,arguments[1],arguments[2],arguments[3]||C.RGBA,arguments[4]||C.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return p(C,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||C.RGBA,arguments[3]||C.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],k=h(x)?x:x.raw;if(k)return S(C,k,x.width|0,x.height|0,arguments[2]||C.RGBA,arguments[3]||C.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return w(C,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(d){function g(r,t,s){t?t.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var a=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(s){if(s.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c<s.length;++c){var u=s[c];if(u.buffer){var l=u.buffer,y=u.size||4,h=u.type||r.FLOAT,T=!!u.normalized,f=u.stride||0,n=u.offset||0;l.bind(),r.enableVertexAttribArray(c),r.vertexAttribPointer(c,y,h,T,f,n)}else{if(typeof u=="number")r.vertexAttrib1f(c,u);else if(u.length===1)r.vertexAttrib1f(c,u[0]);else if(u.length===2)r.vertexAttrib2f(c,u[0],u[1]);else if(u.length===3)r.vertexAttrib3f(c,u[0],u[1],u[2]);else if(u.length===4)r.vertexAttrib4f(c,u[0],u[1],u[2],u[3]);else throw new Error("gl-vao: Invalid vertex attribute");r.disableVertexAttribArray(c)}}for(;c<a;++c)r.disableVertexAttribArray(c)}else{r.bindBuffer(r.ARRAY_BUFFER,null);for(var c=0;c<a;++c)r.disableVertexAttribArray(c)}}d.exports=g},7220:function(d,g,r){var t=r(3056);function s(c){this.gl=c,this._elements=null,this._attributes=null,this._elementsType=c.UNSIGNED_SHORT}s.prototype.bind=function(){t(this.gl,this._elements,this._attributes)},s.prototype.update=function(c,u,l){this._elements=u,this._attributes=c,this._elementsType=l||this.gl.UNSIGNED_SHORT},s.prototype.dispose=function(){},s.prototype.unbind=function(){},s.prototype.draw=function(c,u,l){l=l||0;var y=this.gl;this._elements?y.drawElements(c,u,this._elementsType,l):y.drawArrays(c,l,u)};function a(c){return new s(c)}d.exports=a},3778:function(d,g,r){var t=r(3056);function s(u,l,y,h,T,f){this.location=u,this.dimension=l,this.a=y,this.b=h,this.c=T,this.d=f}s.prototype.bind=function(u){switch(this.dimension){case 1:u.vertexAttrib1f(this.location,this.a);break;case 2:u.vertexAttrib2f(this.location,this.a,this.b);break;case 3:u.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:u.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function a(u,l,y){this.gl=u,this._ext=l,this.handle=y,this._attribs=[],this._useElements=!1,this._elementsType=u.UNSIGNED_SHORT}a.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var u=0;u<this._attribs.length;++u)this._attribs[u].bind(this.gl)},a.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},a.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},a.prototype.update=function(u,l,y){if(this.bind(),t(this.gl,l,u),this.unbind(),this._attribs.length=0,u)for(var h=0;h<u.length;++h){var T=u[h];typeof T=="number"?this._attribs.push(new s(h,1,T)):Array.isArray(T)&&this._attribs.push(new s(h,T.length,T[0],T[1],T[2],T[3]))}this._useElements=!!l,this._elementsType=y||this.gl.UNSIGNED_SHORT},a.prototype.draw=function(u,l,y){y=y||0;var h=this.gl;this._useElements?h.drawElements(u,l,this._elementsType,y):h.drawArrays(u,y,l)};function c(u,l){return new a(u,l,l.createVertexArrayOES())}d.exports=c},2944:function(d,g,r){var t=r(3778),s=r(7220);function a(u){this.bindVertexArrayOES=u.bindVertexArray.bind(u),this.createVertexArrayOES=u.createVertexArray.bind(u),this.deleteVertexArrayOES=u.deleteVertexArray.bind(u)}function c(u,l,y,h){var T=u.createVertexArray?new a(u):u.getExtension("OES_vertex_array_object"),f;return T?f=t(u,T):f=s(u),f.update(l,y,h),f}d.exports=c},2598:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]+s[0],r[1]=t[1]+s[1],r[2]=t[2]+s[2],r}},5879:function(d,g,r){d.exports=c;var t=r(5415),s=r(899),a=r(9305);function c(u,l){var y=t(u[0],u[1],u[2]),h=t(l[0],l[1],l[2]);s(y,y),s(h,h);var T=a(y,h);return T>1?0:Math.acos(T)}},8827:function(d){d.exports=g;function g(r,t){return r[0]=Math.ceil(t[0]),r[1]=Math.ceil(t[1]),r[2]=Math.ceil(t[2]),r}},7622:function(d){d.exports=g;function g(r){var t=new Float32Array(3);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t}},8782:function(d){d.exports=g;function g(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}},8501:function(d){d.exports=g;function g(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[0],y=s[1],h=s[2];return r[0]=c*h-u*y,r[1]=u*l-a*h,r[2]=a*y-c*l,r}},5981:function(d,g,r){d.exports=r(8288)},8288:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2];return Math.sqrt(s*s+a*a+c*c)}},8629:function(d,g,r){d.exports=r(7979)},7979:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]/s[0],r[1]=t[1]/s[1],r[2]=t[2]/s[2],r}},9305:function(d){d.exports=g;function g(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}},154:function(d){d.exports=1e-6},4932:function(d,g,r){d.exports=s;var t=r(154);function s(a,c){var u=a[0],l=a[1],y=a[2],h=c[0],T=c[1],f=c[2];return Math.abs(u-h)<=t*Math.max(1,Math.abs(u),Math.abs(h))&&Math.abs(l-T)<=t*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(y-f)<=t*Math.max(1,Math.abs(y),Math.abs(f))}},5777:function(d){d.exports=g;function g(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}},3306:function(d){d.exports=g;function g(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r[2]=Math.floor(t[2]),r}},7447:function(d,g,r){d.exports=s;var t=r(8501)();function s(a,c,u,l,y,h){var T,f;for(c||(c=3),u||(u=0),l?f=Math.min(l*c+u,a.length):f=a.length,T=u;T<f;T+=c)t[0]=a[T],t[1]=a[T+1],t[2]=a[T+2],y(t,t,h),a[T]=t[0],a[T+1]=t[1],a[T+2]=t[2];return a}},5415:function(d){d.exports=g;function g(r,t,s){var a=new Float32Array(3);return a[0]=r,a[1]=t,a[2]=s,a}},2858:function(d,g,r){d.exports={EPSILON:r(154),create:r(8501),clone:r(7622),angle:r(5879),fromValues:r(5415),copy:r(8782),set:r(831),equals:r(4932),exactEquals:r(5777),add:r(2598),subtract:r(911),sub:r(8921),multiply:r(105),mul:r(5733),divide:r(7979),div:r(8629),min:r(3605),max:r(1716),floor:r(3306),ceil:r(8827),round:r(1624),scale:r(5685),scaleAndAdd:r(6722),distance:r(8288),dist:r(5981),squaredDistance:r(6403),sqrDist:r(5294),length:r(4693),len:r(1468),squaredLength:r(4337),sqrLen:r(3303),negate:r(435),inverse:r(2073),normalize:r(899),dot:r(9305),cross:r(903),lerp:r(1868),random:r(6660),transformMat4:r(3255),transformMat3:r(9908),transformQuat:r(6568),rotateX:r(392),rotateY:r(3222),rotateZ:r(3388),forEach:r(7447)}},2073:function(d){d.exports=g;function g(r,t){return r[0]=1/t[0],r[1]=1/t[1],r[2]=1/t[2],r}},1468:function(d,g,r){d.exports=r(4693)},4693:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2];return Math.sqrt(t*t+s*s+a*a)}},1868:function(d){d.exports=g;function g(r,t,s,a){var c=t[0],u=t[1],l=t[2];return r[0]=c+a*(s[0]-c),r[1]=u+a*(s[1]-u),r[2]=l+a*(s[2]-l),r}},1716:function(d){d.exports=g;function g(r,t,s){return r[0]=Math.max(t[0],s[0]),r[1]=Math.max(t[1],s[1]),r[2]=Math.max(t[2],s[2]),r}},3605:function(d){d.exports=g;function g(r,t,s){return r[0]=Math.min(t[0],s[0]),r[1]=Math.min(t[1],s[1]),r[2]=Math.min(t[2],s[2]),r}},5733:function(d,g,r){d.exports=r(105)},105:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]*s[0],r[1]=t[1]*s[1],r[2]=t[2]*s[2],r}},435:function(d){d.exports=g;function g(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r}},899:function(d){d.exports=g;function g(r,t){var s=t[0],a=t[1],c=t[2],u=s*s+a*a+c*c;return u>0&&(u=1/Math.sqrt(u),r[0]=t[0]*u,r[1]=t[1]*u,r[2]=t[2]*u),r}},6660:function(d){d.exports=g;function g(r,t){t=t||1;var s=Math.random()*2*Math.PI,a=Math.random()*2-1,c=Math.sqrt(1-a*a)*t;return r[0]=Math.cos(s)*c,r[1]=Math.sin(s)*c,r[2]=a*t,r}},392:function(d){d.exports=g;function g(r,t,s,a){var c=s[1],u=s[2],l=t[1]-c,y=t[2]-u,h=Math.sin(a),T=Math.cos(a);return r[0]=t[0],r[1]=c+l*T-y*h,r[2]=u+l*h+y*T,r}},3222:function(d){d.exports=g;function g(r,t,s,a){var c=s[0],u=s[2],l=t[0]-c,y=t[2]-u,h=Math.sin(a),T=Math.cos(a);return r[0]=c+y*h+l*T,r[1]=t[1],r[2]=u+y*T-l*h,r}},3388:function(d){d.exports=g;function g(r,t,s,a){var c=s[0],u=s[1],l=t[0]-c,y=t[1]-u,h=Math.sin(a),T=Math.cos(a);return r[0]=c+l*T-y*h,r[1]=u+l*h+y*T,r[2]=t[2],r}},1624:function(d){d.exports=g;function g(r,t){return r[0]=Math.round(t[0]),r[1]=Math.round(t[1]),r[2]=Math.round(t[2]),r}},5685:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]*s,r[1]=t[1]*s,r[2]=t[2]*s,r}},6722:function(d){d.exports=g;function g(r,t,s,a){return r[0]=t[0]+s[0]*a,r[1]=t[1]+s[1]*a,r[2]=t[2]+s[2]*a,r}},831:function(d){d.exports=g;function g(r,t,s,a){return r[0]=t,r[1]=s,r[2]=a,r}},5294:function(d,g,r){d.exports=r(6403)},3303:function(d,g,r){d.exports=r(4337)},6403:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2];return s*s+a*a+c*c}},4337:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2];return t*t+s*s+a*a}},8921:function(d,g,r){d.exports=r(911)},911:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]-s[0],r[1]=t[1]-s[1],r[2]=t[2]-s[2],r}},9908:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2];return r[0]=a*s[0]+c*s[3]+u*s[6],r[1]=a*s[1]+c*s[4]+u*s[7],r[2]=a*s[2]+c*s[5]+u*s[8],r}},3255:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[3]*a+s[7]*c+s[11]*u+s[15];return l=l||1,r[0]=(s[0]*a+s[4]*c+s[8]*u+s[12])/l,r[1]=(s[1]*a+s[5]*c+s[9]*u+s[13])/l,r[2]=(s[2]*a+s[6]*c+s[10]*u+s[14])/l,r}},6568:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[0],y=s[1],h=s[2],T=s[3],f=T*a+y*u-h*c,n=T*c+h*a-l*u,v=T*u+l*c-y*a,m=-l*a-y*c-h*u;return r[0]=f*T+m*-l+n*-h-v*-y,r[1]=n*T+m*-y+v*-l-f*-h,r[2]=v*T+m*-h+f*-y-n*-l,r}},3433:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]+s[0],r[1]=t[1]+s[1],r[2]=t[2]+s[2],r[3]=t[3]+s[3],r}},1413:function(d){d.exports=g;function g(r){var t=new Float32Array(4);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}},3470:function(d){d.exports=g;function g(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}},5313:function(d){d.exports=g;function g(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2],u=t[3]-r[3];return Math.sqrt(s*s+a*a+c*c+u*u)}},205:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]/s[0],r[1]=t[1]/s[1],r[2]=t[2]/s[2],r[3]=t[3]/s[3],r}},4242:function(d){d.exports=g;function g(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]*t[3]}},5680:function(d){d.exports=g;function g(r,t,s,a){var c=new Float32Array(4);return c[0]=r,c[1]=t,c[2]=s,c[3]=a,c}},4020:function(d,g,r){d.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(d){d.exports=g;function g(r,t){return r[0]=1/t[0],r[1]=1/t[1],r[2]=1/t[2],r[3]=1/t[3],r}},8177:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2],c=r[3];return Math.sqrt(t*t+s*s+a*a+c*c)}},8746:function(d){d.exports=g;function g(r,t,s,a){var c=t[0],u=t[1],l=t[2],y=t[3];return r[0]=c+a*(s[0]-c),r[1]=u+a*(s[1]-u),r[2]=l+a*(s[2]-l),r[3]=y+a*(s[3]-y),r}},3030:function(d){d.exports=g;function g(r,t,s){return r[0]=Math.max(t[0],s[0]),r[1]=Math.max(t[1],s[1]),r[2]=Math.max(t[2],s[2]),r[3]=Math.max(t[3],s[3]),r}},2170:function(d){d.exports=g;function g(r,t,s){return r[0]=Math.min(t[0],s[0]),r[1]=Math.min(t[1],s[1]),r[2]=Math.min(t[2],s[2]),r[3]=Math.min(t[3],s[3]),r}},746:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]*s[0],r[1]=t[1]*s[1],r[2]=t[2]*s[2],r[3]=t[3]*s[3],r}},6459:function(d){d.exports=g;function g(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r[3]=-t[3],r}},381:function(d){d.exports=g;function g(r,t){var s=t[0],a=t[1],c=t[2],u=t[3],l=s*s+a*a+c*c+u*u;return l>0&&(l=1/Math.sqrt(l),r[0]=s*l,r[1]=a*l,r[2]=c*l,r[3]=u*l),r}},3770:function(d,g,r){var t=r(381),s=r(5510);d.exports=a;function a(c,u){return u=u||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),t(c,c),s(c,c,u),c}},5510:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]*s,r[1]=t[1]*s,r[2]=t[2]*s,r[3]=t[3]*s,r}},4224:function(d){d.exports=g;function g(r,t,s,a){return r[0]=t[0]+s[0]*a,r[1]=t[1]+s[1]*a,r[2]=t[2]+s[2]*a,r[3]=t[3]+s[3]*a,r}},6453:function(d){d.exports=g;function g(r,t,s,a,c){return r[0]=t,r[1]=s,r[2]=a,r[3]=c,r}},1542:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2],u=t[3]-r[3];return s*s+a*a+c*c+u*u}},9037:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2],c=r[3];return t*t+s*s+a*a+c*c}},2705:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]-s[0],r[1]=t[1]-s[1],r[2]=t[2]-s[2],r[3]=t[3]-s[3],r}},6342:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=t[3];return r[0]=s[0]*a+s[4]*c+s[8]*u+s[12]*l,r[1]=s[1]*a+s[5]*c+s[9]*u+s[13]*l,r[2]=s[2]*a+s[6]*c+s[10]*u+s[14]*l,r[3]=s[3]*a+s[7]*c+s[11]*u+s[15]*l,r}},5022:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[0],y=s[1],h=s[2],T=s[3],f=T*a+y*u-h*c,n=T*c+h*a-l*u,v=T*u+l*c-y*a,m=-l*a-y*c-h*u;return r[0]=f*T+m*-l+n*-h-v*-y,r[1]=n*T+m*-y+v*-l-f*-h,r[2]=v*T+m*-h+f*-y-n*-l,r[3]=t[3],r}},9365:function(d,g,r){var t=r(8096),s=r(7896);d.exports=a;function a(c){for(var u=Array.isArray(c)?c:t(c),l=0;l<u.length;l++){var y=u[l];if(y.type==="preprocessor"){var h=y.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(h&&h[2]){var T=h[1],f=h[2];return(T?s(f):f).trim()}}}}},3193:function(d,g,r){d.exports=x;var t=r(399),s=r(9746),a=r(9525),c=r(9458),u=r(3585),l=999,y=9999,h=0,T=1,f=2,n=3,v=4,m=5,b=6,E=7,p=8,S=9,w=10,i=11,C=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function x(k){var I=0,B=0,_=l,z,O,F=[],N=[],V=1,j=0,$=0,q=!1,oe=!1,Z="",G;k=k||{};var re=a,H=t;k.version==="300 es"&&(re=u,H=c);for(var J={},ae={},I=0;I<re.length;I++)J[re[I]]=!0;for(var I=0;I<H.length;I++)ae[H[I]]=!0;return function(ze){return N=[],ze!==null?Y(ze):ie()};function K(ze){ze.length&&N.push({type:C[_],data:ze,position:$,line:V,column:j})}function Y(ze){I=0,ze.toString&&(ze=ze.toString()),Z+=ze.replace(/\r\n/g,`
`),G=Z.length;for(var Ie;z=Z[I],I<G;){switch(Ie=I,_){case h:I=me();break;case T:I=we();break;case f:I=de();break;case n:I=Le();break;case v:I=ye();break;case i:I=Ae();break;case m:I=Se();break;case y:I=_e();break;case S:I=le();break;case l:I=ne();break}if(Ie!==I)switch(Z[Ie]){case`
`:j=0,++V;break;default:++j;break}}return B+=I,Z=Z.slice(I),N}function ie(ze){return F.length&&K(F.join("")),_=w,K("(eof)"),N}function ne(){return F=F.length?[]:F,O==="/"&&z==="*"?($=B+I-1,_=h,O=z,I+1):O==="/"&&z==="/"?($=B+I-1,_=T,O=z,I+1):z==="#"?(_=f,$=B+I,I):/\s/.test(z)?(_=S,$=B+I,I):(q=/\d/.test(z),oe=/[^\w_]/.test(z),$=B+I,_=q?v:oe?n:y,I)}function le(){return/[^\s]/g.test(z)?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function de(){return(z==="\r"||z===`
`)&&O!=="\\"?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function we(){return de()}function me(){return z==="/"&&O==="*"?(F.push(z),K(F.join("")),_=l,I+1):(F.push(z),O=z,I+1)}function Le(){if(O==="."&&/\d/.test(z))return _=m,I;if(O==="/"&&z==="*")return _=h,I;if(O==="/"&&z==="/")return _=T,I;if(z==="."&&F.length){for(;ve(F););return _=m,I}if(z===";"||z===")"||z==="("){if(F.length)for(;ve(F););return K(z),_=l,I+1}var ze=F.length===2&&z!=="=";if(/[\w_\d\s]/.test(z)||ze){for(;ve(F););return _=l,I}return F.push(z),O=z,I+1}function ve(ze){var Ie=0,Ne,et;do{if(Ne=s.indexOf(ze.slice(0,ze.length+Ie).join("")),et=s[Ne],Ne===-1){if(Ie--+ze.length>0)continue;et=ze.slice(0,1).join("")}return K(et),$+=et.length,F=F.slice(et.length),F.length}while(!0)}function Ae(){return/[^a-fA-F0-9]/.test(z)?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function ye(){return z==="."||/[eE]/.test(z)?(F.push(z),_=m,O=z,I+1):z==="x"&&F.length===1&&F[0]==="0"?(_=i,F.push(z),O=z,I+1):/[^\d]/.test(z)?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function Se(){return z==="f"&&(F.push(z),O=z,I+=1),/[eE]/.test(z)||(z==="-"||z==="+")&&/[eE]/.test(O)?(F.push(z),O=z,I+1):/[^\d]/.test(z)?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function _e(){if(/[^\d\w_]/.test(z)){var ze=F.join("");return ae[ze]?_=p:J[ze]?_=E:_=b,K(F.join("")),_=l,I}return F.push(z),O=z,I+1}}},3585:function(d,g,r){var t=r(9525);t=t.slice().filter(function(s){return!/^(gl\_|texture)/.test(s)}),d.exports=t.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"])},9525:function(d){d.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"]},9458:function(d,g,r){var t=r(399);d.exports=t.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","subroutine","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"])},399:function(d){d.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"]},9746:function(d){d.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(d,g,r){var t=r(3193);d.exports=s;function s(a,c){var u=t(c),l=[];return l=l.concat(u(a)),l=l.concat(u(null)),l}},6832:function(d){d.exports=function(g){typeof g=="string"&&(g=[g]);for(var r=[].slice.call(arguments,1),t=[],s=0;s<g.length-1;s++)t.push(g[s],r[s]||"");return t.push(g[s]),t.join("")}},5233:function(d,g,r){var t=r(4846);function s(){var a=!1;try{var c=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,c),window.removeEventListener("test",null,c)}catch{a=!1}return a}d.exports=t&&s()},2183:function(d,g,r){d.exports=n;var t=r(417),s=r(8211).H;function a(v,m,b){this.vertices=v,this.adjacent=m,this.boundary=b,this.lastVisited=-1}a.prototype.flip=function(){var v=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=v;var m=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=m};function c(v,m,b){this.vertices=v,this.cell=m,this.index=b}function u(v,m){return s(v.vertices,m.vertices)}function l(v){return function(){var m=this.tuple;return v.apply(this,m)}}function y(v){var m=t[v+1];return m||(m=t),l(m)}var h=[];function T(v,m,b){this.dimension=v,this.vertices=m,this.simplices=b,this.interior=b.filter(function(S){return!S.boundary}),this.tuple=new Array(v+1);for(var E=0;E<=v;++E)this.tuple[E]=this.vertices[E];var p=h[v];p||(p=h[v]=y(v)),this.orient=p}var f=T.prototype;f.handleBoundaryDegeneracy=function(v,m){var b=this.dimension,E=this.vertices.length-1,p=this.tuple,S=this.vertices,w=[v];for(v.lastVisited=-E;w.length>0;){v=w.pop();for(var i=v.adjacent,C=0;C<=b;++C){var x=i[C];if(!(!x.boundary||x.lastVisited<=-E)){for(var k=x.vertices,I=0;I<=b;++I){var B=k[I];B<0?p[I]=m:p[I]=S[B]}var _=this.orient();if(_>0)return x;x.lastVisited=-E,_===0&&w.push(x)}}}return null},f.walk=function(v,m){var b=this.vertices.length-1,E=this.dimension,p=this.vertices,S=this.tuple,w=m?this.interior.length*Math.random()|0:this.interior.length-1,i=this.interior[w];e:for(;!i.boundary;){for(var C=i.vertices,x=i.adjacent,k=0;k<=E;++k)S[k]=p[C[k]];i.lastVisited=b;for(var k=0;k<=E;++k){var I=x[k];if(!(I.lastVisited>=b)){var B=S[k];S[k]=v;var _=this.orient();if(S[k]=B,_<0){i=I;continue e}else I.boundary?I.lastVisited=-b:I.lastVisited=b}}return}return i},f.addPeaks=function(v,m){var b=this.vertices.length-1,E=this.dimension,p=this.vertices,S=this.tuple,w=this.interior,i=this.simplices,C=[m];m.lastVisited=b,m.vertices[m.vertices.indexOf(-1)]=b,m.boundary=!1,w.push(m);for(var x=[];C.length>0;){var m=C.pop(),k=m.vertices,I=m.adjacent,B=k.indexOf(b);if(!(B<0)){for(var _=0;_<=E;++_)if(_!==B){var z=I[_];if(!(!z.boundary||z.lastVisited>=b)){var O=z.vertices;if(z.lastVisited!==-b){for(var F=0,N=0;N<=E;++N)O[N]<0?(F=N,S[N]=v):S[N]=p[O[N]];var V=this.orient();if(V>0){O[F]=b,z.boundary=!1,w.push(z),C.push(z),z.lastVisited=b;continue}else z.lastVisited=-b}var j=z.adjacent,$=k.slice(),q=I.slice(),oe=new a($,q,!0);i.push(oe);var Z=j.indexOf(m);if(!(Z<0)){j[Z]=oe,q[B]=z,$[_]=-1,q[_]=m,I[_]=oe,oe.flip();for(var N=0;N<=E;++N){var G=$[N];if(!(G<0||G===b)){for(var re=new Array(E-1),H=0,J=0;J<=E;++J){var ae=$[J];ae<0||J===N||(re[H++]=ae)}x.push(new c(re,oe,N))}}}}}}}x.sort(u);for(var _=0;_+1<x.length;_+=2){var K=x[_],Y=x[_+1],ie=K.index,ne=Y.index;ie<0||ne<0||(K.cell.adjacent[K.index]=Y.cell,Y.cell.adjacent[Y.index]=K.cell)}},f.insert=function(v,m){var b=this.vertices;b.push(v);var E=this.walk(v,m);if(E){for(var p=this.dimension,S=this.tuple,w=0;w<=p;++w){var i=E.vertices[w];i<0?S[w]=v:S[w]=b[i]}var C=this.orient(S);C<0||C===0&&(E=this.handleBoundaryDegeneracy(E,v),!E)||this.addPeaks(v,E)}},f.boundary=function(){for(var v=this.dimension,m=[],b=this.simplices,E=b.length,p=0;p<E;++p){var S=b[p];if(S.boundary){for(var w=new Array(v),i=S.vertices,C=0,x=0,k=0;k<=v;++k)i[k]>=0?w[C++]=i[k]:x=k&1;if(x===(v&1)){var I=w[0];w[0]=w[1],w[1]=I}m.push(w)}}return m};function n(v,m){var b=v.length;if(b===0)throw new Error("Must have at least d+1 points");var E=v[0].length;if(b<=E)throw new Error("Must input at least d+1 points");var p=v.slice(0,E+1),S=t.apply(void 0,p);if(S===0)throw new Error("Input not in general position");for(var w=new Array(E+1),i=0;i<=E;++i)w[i]=i;S<0&&(w[0]=1,w[1]=0);for(var C=new a(w,new Array(E+1),!1),x=C.adjacent,k=new Array(E+2),i=0;i<=E;++i){for(var I=w.slice(),B=0;B<=E;++B)B===i&&(I[B]=-1);var _=I[0];I[0]=I[1],I[1]=_;var z=new a(I,new Array(E+1),!0);x[i]=z,k[i]=z}k[E+1]=C;for(var i=0;i<=E;++i)for(var I=x[i].vertices,O=x[i].adjacent,B=0;B<=E;++B){var F=I[B];if(F<0){O[B]=C;continue}for(var N=0;N<=E;++N)x[N].vertices.indexOf(F)<0&&(O[B]=x[N])}for(var V=new T(E,p,k),j=!!m,i=E+1;i<b;++i)V.insert(v[i],j);return V.boundary()}},9014:function(d,g,r){var t=r(5070),s=0,a=1,c=2;d.exports=C;function u(x,k,I,B,_){this.mid=x,this.left=k,this.right=I,this.leftPoints=B,this.rightPoints=_,this.count=(k?k.count:0)+(I?I.count:0)+B.length}var l=u.prototype;function y(x,k){x.mid=k.mid,x.left=k.left,x.right=k.right,x.leftPoints=k.leftPoints,x.rightPoints=k.rightPoints,x.count=k.count}function h(x,k){var I=S(k);x.mid=I.mid,x.left=I.left,x.right=I.right,x.leftPoints=I.leftPoints,x.rightPoints=I.rightPoints,x.count=I.count}function T(x,k){var I=x.intervals([]);I.push(k),h(x,I)}function f(x,k){var I=x.intervals([]),B=I.indexOf(k);return B<0?s:(I.splice(B,1),h(x,I),a)}l.intervals=function(x){return x.push.apply(x,this.leftPoints),this.left&&this.left.intervals(x),this.right&&this.right.intervals(x),x},l.insert=function(x){var k=this.count-this.leftPoints.length;if(this.count+=1,x[1]<this.mid)this.left?4*(this.left.count+1)>3*(k+1)?T(this,x):this.left.insert(x):this.left=S([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(k+1)?T(this,x):this.right.insert(x):this.right=S([x]);else{var I=t.ge(this.leftPoints,x,E),B=t.ge(this.rightPoints,x,p);this.leftPoints.splice(I,0,x),this.rightPoints.splice(B,0,x)}},l.remove=function(x){var k=this.count-this.leftPoints;if(x[1]<this.mid){if(!this.left)return s;var I=this.right?this.right.count:0;if(4*I>3*(k-1))return f(this,x);var B=this.left.remove(x);return B===c?(this.left=null,this.count-=1,a):(B===a&&(this.count-=1),B)}else if(x[0]>this.mid){if(!this.right)return s;var _=this.left?this.left.count:0;if(4*_>3*(k-1))return f(this,x);var B=this.right.remove(x);return B===c?(this.right=null,this.count-=1,a):(B===a&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===x?c:s;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var z=this,O=this.left;O.right;)z=O,O=O.right;if(z===this)O.right=this.right;else{var F=this.left,B=this.right;z.count-=O.count,z.right=O.left,O.left=F,O.right=B}y(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?y(this,this.left):y(this,this.right);return a}for(var F=t.ge(this.leftPoints,x,E);F<this.leftPoints.length&&this.leftPoints[F][0]===x[0];++F)if(this.leftPoints[F]===x){this.count-=1,this.leftPoints.splice(F,1);for(var B=t.ge(this.rightPoints,x,p);B<this.rightPoints.length&&this.rightPoints[B][1]===x[1];++B)if(this.rightPoints[B]===x)return this.rightPoints.splice(B,1),a}return s}};function n(x,k,I){for(var B=0;B<x.length&&x[B][0]<=k;++B){var _=I(x[B]);if(_)return _}}function v(x,k,I){for(var B=x.length-1;B>=0&&x[B][1]>=k;--B){var _=I(x[B]);if(_)return _}}function m(x,k){for(var I=0;I<x.length;++I){var B=k(x[I]);if(B)return B}}l.queryPoint=function(x,k){if(x<this.mid){if(this.left){var I=this.left.queryPoint(x,k);if(I)return I}return n(this.leftPoints,x,k)}else if(x>this.mid){if(this.right){var I=this.right.queryPoint(x,k);if(I)return I}return v(this.rightPoints,x,k)}else return m(this.leftPoints,k)},l.queryInterval=function(x,k,I){if(x<this.mid&&this.left){var B=this.left.queryInterval(x,k,I);if(B)return B}if(k>this.mid&&this.right){var B=this.right.queryInterval(x,k,I);if(B)return B}return k<this.mid?n(this.leftPoints,k,I):x>this.mid?v(this.rightPoints,x,I):m(this.leftPoints,I)};function b(x,k){return x-k}function E(x,k){var I=x[0]-k[0];return I||x[1]-k[1]}function p(x,k){var I=x[1]-k[1];return I||x[0]-k[0]}function S(x){if(x.length===0)return null;for(var k=[],I=0;I<x.length;++I)k.push(x[I][0],x[I][1]);k.sort(b);for(var B=k[k.length>>1],_=[],z=[],O=[],I=0;I<x.length;++I){var F=x[I];F[1]<B?_.push(F):B<F[0]?z.push(F):O.push(F)}var N=O,V=O.slice();return N.sort(E),V.sort(p),new u(B,S(_),S(z),N,V)}function w(x){this.root=x}var i=w.prototype;i.insert=function(x){this.root?this.root.insert(x):this.root=new u(x[0],null,null,[x],[x])},i.remove=function(x){if(this.root){var k=this.root.remove(x);return k===c&&(this.root=null),k!==s}return!1},i.queryPoint=function(x,k){if(this.root)return this.root.queryPoint(x,k)},i.queryInterval=function(x,k,I){if(x<=k&&this.root)return this.root.queryInterval(x,k,I)},Object.defineProperty(i,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(i,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function C(x){return!x||x.length===0?new w(null):new w(S(x))}},9560:function(d){function g(r){for(var t=new Array(r),s=0;s<r;++s)t[s]=s;return t}d.exports=g},4846:function(d){d.exports=!0},4780:function(d){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/d.exports=function(t){return t!=null&&(g(t)||r(t)||!!t._isBuffer)};function g(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function r(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&g(t.slice(0,0))}},3596:function(d){d.exports=function(g){for(var r=g.length,t,s=0;s<r;s++)if(t=g.charCodeAt(s),(t<9||t>13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}},3578:function(d){function g(r,t,s){return r*(1-s)+t*s}d.exports=g},7191:function(d,g,r){var t=r(4690),s=r(9823),a=r(7332),c=r(7787),u=r(7437),l=r(2142),y={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},h=s(),T=s(),f=[0,0,0,0],n=[[0,0,0],[0,0,0],[0,0,0]],v=[0,0,0];d.exports=function(S,w,i,C,x,k){if(w||(w=[0,0,0]),i||(i=[0,0,0]),C||(C=[0,0,0]),x||(x=[0,0,0,1]),k||(k=[0,0,0,1]),!t(h,S)||(a(T,h),T[3]=0,T[7]=0,T[11]=0,T[15]=1,Math.abs(c(T)<1e-8)))return!1;var I=h[3],B=h[7],_=h[11],z=h[12],O=h[13],F=h[14],N=h[15];if(I!==0||B!==0||_!==0){f[0]=I,f[1]=B,f[2]=_,f[3]=N;var V=u(T,T);if(!V)return!1;l(T,T),m(x,f,T)}else x[0]=x[1]=x[2]=0,x[3]=1;if(w[0]=z,w[1]=O,w[2]=F,b(n,h),i[0]=y.length(n[0]),y.normalize(n[0],n[0]),C[0]=y.dot(n[0],n[1]),E(n[1],n[1],n[0],1,-C[0]),i[1]=y.length(n[1]),y.normalize(n[1],n[1]),C[0]/=i[1],C[1]=y.dot(n[0],n[2]),E(n[2],n[2],n[0],1,-C[1]),C[2]=y.dot(n[1],n[2]),E(n[2],n[2],n[1],1,-C[2]),i[2]=y.length(n[2]),y.normalize(n[2],n[2]),C[1]/=i[2],C[2]/=i[2],y.cross(v,n[1],n[2]),y.dot(n[0],v)<0)for(var j=0;j<3;j++)i[j]*=-1,n[j][0]*=-1,n[j][1]*=-1,n[j][2]*=-1;return k[0]=.5*Math.sqrt(Math.max(1+n[0][0]-n[1][1]-n[2][2],0)),k[1]=.5*Math.sqrt(Math.max(1-n[0][0]+n[1][1]-n[2][2],0)),k[2]=.5*Math.sqrt(Math.max(1-n[0][0]-n[1][1]+n[2][2],0)),k[3]=.5*Math.sqrt(Math.max(1+n[0][0]+n[1][1]+n[2][2],0)),n[2][1]>n[1][2]&&(k[0]=-k[0]),n[0][2]>n[2][0]&&(k[1]=-k[1]),n[1][0]>n[0][1]&&(k[2]=-k[2]),!0};function m(p,S,w){var i=S[0],C=S[1],x=S[2],k=S[3];return p[0]=w[0]*i+w[4]*C+w[8]*x+w[12]*k,p[1]=w[1]*i+w[5]*C+w[9]*x+w[13]*k,p[2]=w[2]*i+w[6]*C+w[10]*x+w[14]*k,p[3]=w[3]*i+w[7]*C+w[11]*x+w[15]*k,p}function b(p,S){p[0][0]=S[0],p[0][1]=S[1],p[0][2]=S[2],p[1][0]=S[4],p[1][1]=S[5],p[1][2]=S[6],p[2][0]=S[8],p[2][1]=S[9],p[2][2]=S[10]}function E(p,S,w,i,C){p[0]=S[0]*i+w[0]*C,p[1]=S[1]*i+w[1]*C,p[2]=S[2]*i+w[2]*C}},4690:function(d){d.exports=function(r,t){var s=t[15];if(s===0)return!1;for(var a=1/s,c=0;c<16;c++)r[c]=t[c]*a;return!0}},7649:function(d,g,r){var t=r(1868),s=r(1102),a=r(7191),c=r(7787),u=r(1116),l=f(),y=f(),h=f();d.exports=T;function T(m,b,E,p){if(c(b)===0||c(E)===0)return!1;var S=a(b,l.translate,l.scale,l.skew,l.perspective,l.quaternion),w=a(E,y.translate,y.scale,y.skew,y.perspective,y.quaternion);return!S||!w?!1:(t(h.translate,l.translate,y.translate,p),t(h.skew,l.skew,y.skew,p),t(h.scale,l.scale,y.scale,p),t(h.perspective,l.perspective,y.perspective,p),u(h.quaternion,l.quaternion,y.quaternion,p),s(m,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function f(){return{translate:n(),scale:n(1),skew:n(),perspective:v(),quaternion:v()}}function n(m){return[m||0,m||0,m||0]}function v(){return[0,0,0,1]}},1102:function(d,g,r){var t={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};t.create();var s=t.create();d.exports=function(c,u,l,y,h,T){return t.identity(c),t.fromRotationTranslation(c,T,u),c[3]=h[0],c[7]=h[1],c[11]=h[2],c[15]=h[3],t.identity(s),y[2]!==0&&(s[9]=y[2],t.multiply(c,c,s)),y[1]!==0&&(s[9]=0,s[8]=y[1],t.multiply(c,c,s)),y[0]!==0&&(s[8]=0,s[4]=y[0],t.multiply(c,c,s)),t.scale(c,c,l),c}},9298:function(d,g,r){var t=r(5070),s=r(7649),a=r(7437),c=r(6109),u=r(7115),l=r(5240),y=r(3012),h=r(998);r(3668);var T=r(899),f=[0,0,0];d.exports=b;function n(E){this._components=E.slice(),this._time=[0],this.prevMatrix=E.slice(),this.nextMatrix=E.slice(),this.computedMatrix=E.slice(),this.computedInverse=E.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]}var v=n.prototype;v.recalcMatrix=function(E){var p=this._time,S=t.le(p,E),w=this.computedMatrix;if(!(S<0)){var i=this._components;if(S===p.length-1)for(var C=16*S,x=0;x<16;++x)w[x]=i[C++];else{for(var k=p[S+1]-p[S],C=16*S,I=this.prevMatrix,B=!0,x=0;x<16;++x)I[x]=i[C++];for(var _=this.nextMatrix,x=0;x<16;++x)_[x]=i[C++],B=B&&I[x]===_[x];if(k<1e-6||B)for(var x=0;x<16;++x)w[x]=I[x];else s(w,I,_,(E-p[S])/k)}var z=this.computedUp;z[0]=w[1],z[1]=w[5],z[2]=w[9],T(z,z);var O=this.computedInverse;a(O,w);var F=this.computedEye,N=O[15];F[0]=O[12]/N,F[1]=O[13]/N,F[2]=O[14]/N;for(var V=this.computedCenter,j=Math.exp(this.computedRadius[0]),x=0;x<3;++x)V[x]=F[x]-w[2+4*x]*j}},v.idle=function(E){if(!(E<this.lastT())){for(var p=this._components,S=p.length-16,w=0;w<16;++w)p.push(p[S++]);this._time.push(E)}},v.flush=function(E){var p=t.gt(this._time,E)-2;p<0||(this._time.splice(0,p),this._components.splice(0,16*p))},v.lastT=function(){return this._time[this._time.length-1]},v.lookAt=function(E,p,S,w){this.recalcMatrix(E),p=p||this.computedEye,S=S||f,w=w||this.computedUp,this.setMatrix(E,y(this.computedMatrix,p,S,w));for(var i=0,C=0;C<3;++C)i+=Math.pow(S[C]-p[C],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},v.rotate=function(E,p,S,w){this.recalcMatrix(E);var i=this.computedInverse;p&&u(i,i,p),S&&c(i,i,S),w&&l(i,i,w),this.setMatrix(E,a(this.computedMatrix,i))};var m=[0,0,0];v.pan=function(E,p,S,w){m[0]=-(p||0),m[1]=-(S||0),m[2]=-(w||0),this.recalcMatrix(E);var i=this.computedInverse;h(i,i,m),this.setMatrix(E,a(i,i))},v.translate=function(E,p,S,w){m[0]=p||0,m[1]=S||0,m[2]=w||0,this.recalcMatrix(E);var i=this.computedMatrix;h(i,i,m),this.setMatrix(E,i)},v.setMatrix=function(E,p){if(!(E<this.lastT())){this._time.push(E);for(var S=0;S<16;++S)this._components.push(p[S])}},v.setDistance=function(E,p){this.computedRadius[0]=p},v.setDistanceLimits=function(E,p){var S=this._limits;S[0]=E,S[1]=p},v.getDistanceLimits=function(E){var p=this._limits;return E?(E[0]=p[0],E[1]=p[1],E):p};function b(E){E=E||{};var p=E.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new n(p)}},3266:function(d,g,r){d.exports=s;var t=r(417)[3];function s(a){var c=a.length;if(c<3){for(var v=new Array(c),u=0;u<c;++u)v[u]=u;return c===2&&a[0][0]===a[1][0]&&a[0][1]===a[1][1]?[0]:v}for(var l=new Array(c),u=0;u<c;++u)l[u]=u;l.sort(function(p,S){var w=a[p][0]-a[S][0];return w||a[p][1]-a[S][1]});for(var y=[l[0],l[1]],h=[l[0],l[1]],u=2;u<c;++u){for(var T=l[u],f=a[T],n=y.length;n>1&&t(a[y[n-2]],a[y[n-1]],f)<=0;)n-=1,y.pop();for(y.push(T),n=h.length;n>1&&t(a[h[n-2]],a[h[n-1]],f)>=0;)n-=1,h.pop();h.push(T)}for(var v=new Array(h.length+y.length-2),m=0,u=0,b=y.length;u<b;++u)v[m++]=y[u];for(var E=h.length-2;E>0;--E)v[m++]=h[E];return v}},6145:function(d,g,r){d.exports=s;var t=r(4110);function s(a,c){c||(c=a,a=window);var u=0,l=0,y=0,h={shift:!1,alt:!1,control:!1,meta:!1},T=!1;function f(x){var k=!1;return"altKey"in x&&(k=k||x.altKey!==h.alt,h.alt=!!x.altKey),"shiftKey"in x&&(k=k||x.shiftKey!==h.shift,h.shift=!!x.shiftKey),"ctrlKey"in x&&(k=k||x.ctrlKey!==h.control,h.control=!!x.ctrlKey),"metaKey"in x&&(k=k||x.metaKey!==h.meta,h.meta=!!x.metaKey),k}function n(x,k){var I=t.x(k),B=t.y(k);"buttons"in k&&(x=k.buttons|0),(x!==u||I!==l||B!==y||f(k))&&(u=x|0,l=I||0,y=B||0,c&&c(u,l,y,h))}function v(x){n(0,x)}function m(){(u||l||y||h.shift||h.alt||h.meta||h.control)&&(l=y=0,u=0,h.shift=h.alt=h.control=h.meta=!1,c&&c(0,0,0,h))}function b(x){f(x)&&c&&c(u,l,y,h)}function E(x){t.buttons(x)===0?n(0,x):n(u,x)}function p(x){n(u|t.buttons(x),x)}function S(x){n(u&~t.buttons(x),x)}function w(){T||(T=!0,a.addEventListener("mousemove",E),a.addEventListener("mousedown",p),a.addEventListener("mouseup",S),a.addEventListener("mouseleave",v),a.addEventListener("mouseenter",v),a.addEventListener("mouseout",v),a.addEventListener("mouseover",v),a.addEventListener("blur",m),a.addEventListener("keyup",b),a.addEventListener("keydown",b),a.addEventListener("keypress",b),a!==window&&(window.addEventListener("blur",m),window.addEventListener("keyup",b),window.addEventListener("keydown",b),window.addEventListener("keypress",b)))}function i(){T&&(T=!1,a.removeEventListener("mousemove",E),a.removeEventListener("mousedown",p),a.removeEventListener("mouseup",S),a.removeEventListener("mouseleave",v),a.removeEventListener("mouseenter",v),a.removeEventListener("mouseout",v),a.removeEventListener("mouseover",v),a.removeEventListener("blur",m),a.removeEventListener("keyup",b),a.removeEventListener("keydown",b),a.removeEventListener("keypress",b),a!==window&&(window.removeEventListener("blur",m),window.removeEventListener("keyup",b),window.removeEventListener("keydown",b),window.removeEventListener("keypress",b)))}w();var C={element:a};return Object.defineProperties(C,{enabled:{get:function(){return T},set:function(x){x?w():i()},enumerable:!0},buttons:{get:function(){return u},enumerable:!0},x:{get:function(){return l},enumerable:!0},y:{get:function(){return y},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),C}},2565:function(d){var g={left:0,top:0};d.exports=r;function r(s,a,c){a=a||s.currentTarget||s.srcElement,Array.isArray(c)||(c=[0,0]);var u=s.clientX||0,l=s.clientY||0,y=t(a);return c[0]=u-y.left,c[1]=l-y.top,c}function t(s){return s===window||s===document||s===document.body?g:s.getBoundingClientRect()}},4110:function(d,g){function r(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var u=c.which;if(u===2)return 4;if(u===3)return 2;if(u>0)return 1<<u-1}else if("button"in c){var u=c.button;if(u===1)return 4;if(u===2)return 2;if(u>=0)return 1<<u}}return 0}g.buttons=r;function t(c){return c.target||c.srcElement||window}g.element=t;function s(c){if(typeof c=="object"){if("offsetX"in c)return c.offsetX;var u=t(c),l=u.getBoundingClientRect();return c.clientX-l.left}return 0}g.x=s;function a(c){if(typeof c=="object"){if("offsetY"in c)return c.offsetY;var u=t(c),l=u.getBoundingClientRect();return c.clientY-l.top}return 0}g.y=a},6475:function(d,g,r){var t=r(14);d.exports=s;function s(a,c,u){typeof a=="function"&&(u=!!c,c=a,a=window);var l=t("ex",a),y=function(h){u&&h.preventDefault();var T=h.deltaX||0,f=h.deltaY||0,n=h.deltaZ||0,v=h.deltaMode,m=1;switch(v){case 1:m=l;break;case 2:m=window.innerHeight;break}if(T*=m,f*=m,n*=m,T||f||n)return c(T,f,n,h)};return a.addEventListener("wheel",y),y}},9284:function(d,g,r){var t=r(5306);d.exports=c;var s={"false,0,1":function(l,y,h,T,f){return function(v,m,b,E){var p=v.shape[0]|0,S=v.shape[1]|0,w=v.data,i=v.offset|0,C=v.stride[0]|0,x=v.stride[1]|0,k=i,I,B=-C|0,_=0,z=-x|0,O=0,F=-C-x|0,N=0,V=C|0,j=x-C*p|0,$=0,q=0,oe=0,Z=2*p|0,G=T(Z),re=T(Z),H=0,J=0,ae=-1,K=-1,Y=0,ie=-p|0,ne=p|0,le=0,de=-p-1|0,we=p-1|0,me=0,Le=0,ve=0;for($=0;$<p;++$)G[H++]=h(w[k],m,b,E),k+=V;if(k+=j,S>0){if(q=1,G[H++]=h(w[k],m,b,E),k+=V,p>0)for($=1,I=w[k],J=G[H]=h(I,m,b,E),Y=G[H+ae],le=G[H+ie],me=G[H+de],(J!==Y||J!==le||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,Y,le,me,m,b,E),Le=re[H]=oe++),H+=1,k+=V,$=2;$<p;++$)I=w[k],J=G[H]=h(I,m,b,E),Y=G[H+ae],le=G[H+ie],me=G[H+de],(J!==Y||J!==le||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,Y,le,me,m,b,E),Le=re[H]=oe++,me!==Y&&y(re[H+ae],Le,N,_,me,Y,m,b,E)),H+=1,k+=V;for(k+=j,H=0,ve=ae,ae=K,K=ve,ve=ie,ie=ne,ne=ve,ve=de,de=we,we=ve,q=2;q<S;++q){if(G[H++]=h(w[k],m,b,E),k+=V,p>0)for($=1,I=w[k],J=G[H]=h(I,m,b,E),Y=G[H+ae],le=G[H+ie],me=G[H+de],(J!==Y||J!==le||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,Y,le,me,m,b,E),Le=re[H]=oe++,me!==le&&y(re[H+ie],Le,O,N,le,me,m,b,E)),H+=1,k+=V,$=2;$<p;++$)I=w[k],J=G[H]=h(I,m,b,E),Y=G[H+ae],le=G[H+ie],me=G[H+de],(J!==Y||J!==le||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,Y,le,me,m,b,E),Le=re[H]=oe++,me!==le&&y(re[H+ie],Le,O,N,le,me,m,b,E),me!==Y&&y(re[H+ae],Le,N,_,me,Y,m,b,E)),H+=1,k+=V;q&1&&(H=0),ve=ae,ae=K,K=ve,ve=ie,ie=ne,ne=ve,ve=de,de=we,we=ve,k+=j}}f(re),f(G)}},"false,1,0":function(l,y,h,T,f){return function(v,m,b,E){var p=v.shape[0]|0,S=v.shape[1]|0,w=v.data,i=v.offset|0,C=v.stride[0]|0,x=v.stride[1]|0,k=i,I,B=-C|0,_=0,z=-x|0,O=0,F=-C-x|0,N=0,V=x|0,j=C-x*S|0,$=0,q=0,oe=0,Z=2*S|0,G=T(Z),re=T(Z),H=0,J=0,ae=-1,K=-1,Y=0,ie=-S|0,ne=S|0,le=0,de=-S-1|0,we=S-1|0,me=0,Le=0,ve=0;for(q=0;q<S;++q)G[H++]=h(w[k],m,b,E),k+=V;if(k+=j,p>0){if($=1,G[H++]=h(w[k],m,b,E),k+=V,S>0)for(q=1,I=w[k],J=G[H]=h(I,m,b,E),le=G[H+ie],Y=G[H+ae],me=G[H+de],(J!==le||J!==Y||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,le,Y,me,m,b,E),Le=re[H]=oe++),H+=1,k+=V,q=2;q<S;++q)I=w[k],J=G[H]=h(I,m,b,E),le=G[H+ie],Y=G[H+ae],me=G[H+de],(J!==le||J!==Y||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,le,Y,me,m,b,E),Le=re[H]=oe++,me!==Y&&y(re[H+ae],Le,O,N,Y,me,m,b,E)),H+=1,k+=V;for(k+=j,H=0,ve=ie,ie=ne,ne=ve,ve=ae,ae=K,K=ve,ve=de,de=we,we=ve,$=2;$<p;++$){if(G[H++]=h(w[k],m,b,E),k+=V,S>0)for(q=1,I=w[k],J=G[H]=h(I,m,b,E),le=G[H+ie],Y=G[H+ae],me=G[H+de],(J!==le||J!==Y||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,le,Y,me,m,b,E),Le=re[H]=oe++,me!==le&&y(re[H+ie],Le,N,_,me,le,m,b,E)),H+=1,k+=V,q=2;q<S;++q)I=w[k],J=G[H]=h(I,m,b,E),le=G[H+ie],Y=G[H+ae],me=G[H+de],(J!==le||J!==Y||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,le,Y,me,m,b,E),Le=re[H]=oe++,me!==Y&&y(re[H+ae],Le,O,N,Y,me,m,b,E),me!==le&&y(re[H+ie],Le,N,_,me,le,m,b,E)),H+=1,k+=V;$&1&&(H=0),ve=ie,ie=ne,ne=ve,ve=ae,ae=K,K=ve,ve=de,de=we,we=ve,k+=j}}f(re),f(G)}}};function a(u,l,y,h,T,f){var n=[f,T].join(","),v=s[n];return v(u,l,y,t.mallocUint32,t.freeUint32)}function c(u){function l(m){throw new Error("ndarray-extract-contour: "+m)}typeof u!="object"&&l("Must specify arguments");var y=u.order;Array.isArray(y)||l("Must specify order");var h=u.arrayArguments||1;h<1&&l("Must have at least one array argument");var T=u.scalarArguments||0;T<0&&l("Scalar arg count must be > 0"),typeof u.vertex!="function"&&l("Must specify vertex creation function"),typeof u.cell!="function"&&l("Must specify cell creation function"),typeof u.phase!="function"&&l("Must specify phase function");for(var f=u.getters||[],n=new Array(h),v=0;v<h;++v)f.indexOf(v)>=0?n[v]=!0:n[v]=!1;return a(u.vertex,u.cell,u.phase,T,y,n)}},9144:function(d,g,r){var t=r(3094),s={zero:function(b,E,p,S){var w=b[0],i=p[0];S|=0;var C=0,x=i;for(C=0;C<w;++C)E[S]=0,S+=x},fdTemplate1:function(b,E,p,S,w,i,C){var x=b[0],k=p[0],I=i[0],B=-1*k,_=k;S|=0,C|=0;var z=0,O=k,F=I;for(z=0;z<x;++z)w[C]=.5*(E[S+B]-E[S+_]),S+=O,C+=F},fdTemplate2:function(b,E,p,S,w,i,C,x,k,I){var B=b[0],_=b[1],z=p[0],O=p[1],F=i[0],N=i[1],V=k[0],j=k[1],$=-1*z,q=z,oe=-1*O,Z=O;S|=0,C|=0,I|=0;var G=0,re=0,H=O,J=z-_*O,ae=N,K=F-_*N,Y=j,ie=V-_*j;for(re=0;re<B;++re){for(G=0;G<_;++G)w[C]=.5*(E[S+$]-E[S+q]),x[I]=.5*(E[S+oe]-E[S+Z]),S+=H,C+=ae,I+=Y;S+=J,C+=K,I+=ie}}},a={cdiff:function(b){var E={};return function(S,w,i){var C=S.dtype,x=S.order,k=w.dtype,I=w.order,B=i.dtype,_=i.order,z=[C,x.join(),k,I.join(),B,_.join()].join(),O=E[z];return O||(E[z]=O=b([C,x,k,I,B,_])),O(S.shape.slice(0),S.data,S.stride,S.offset|0,w.data,w.stride,w.offset|0,i.data,i.stride,i.offset|0)}},zero:function(b){var E={};return function(S){var w=S.dtype,i=S.order,C=[w,i.join()].join(),x=E[C];return x||(E[C]=x=b([w,i])),x(S.shape.slice(0),S.data,S.stride,S.offset|0)}},fdTemplate1:function(b){var E={};return function(S,w){var i=S.dtype,C=S.order,x=w.dtype,k=w.order,I=[i,C.join(),x,k.join()].join(),B=E[I];return B||(E[I]=B=b([i,C,x,k])),B(S.shape.slice(0),S.data,S.stride,S.offset|0,w.data,w.stride,w.offset|0)}},fdTemplate2:function(b){var E={};return function(S,w,i){var C=S.dtype,x=S.order,k=w.dtype,I=w.order,B=i.dtype,_=i.order,z=[C,x.join(),k,I.join(),B,_.join()].join(),O=E[z];return O||(E[z]=O=b([C,x,k,I,B,_])),O(S.shape.slice(0),S.data,S.stride,S.offset|0,w.data,w.stride,w.offset|0,i.data,i.stride,i.offset|0)}}};function c(b){var E=a[b.funcName];return E(u.bind(void 0,b))}function u(b){return s[b.funcName]}function l(b){return c({funcName:b.funcName})}var y={},h={},T=l({funcName:"cdiff"}),f=l({funcName:"zero"});function n(b){return b in y?y[b]:y[b]=l({funcName:"fdTemplate"+b})}function v(b,E,p,S){return function(w,i){var C=i.shape.slice();return C[0]>2&&C[1]>2&&S(i.pick(-1,-1).lo(1,1).hi(C[0]-2,C[1]-2),w.pick(-1,-1,0).lo(1,1).hi(C[0]-2,C[1]-2),w.pick(-1,-1,1).lo(1,1).hi(C[0]-2,C[1]-2)),C[1]>2&&(p(i.pick(0,-1).lo(1).hi(C[1]-2),w.pick(0,-1,1).lo(1).hi(C[1]-2)),E(w.pick(0,-1,0).lo(1).hi(C[1]-2))),C[1]>2&&(p(i.pick(C[0]-1,-1).lo(1).hi(C[1]-2),w.pick(C[0]-1,-1,1).lo(1).hi(C[1]-2)),E(w.pick(C[0]-1,-1,0).lo(1).hi(C[1]-2))),C[0]>2&&(p(i.pick(-1,0).lo(1).hi(C[0]-2),w.pick(-1,0,0).lo(1).hi(C[0]-2)),E(w.pick(-1,0,1).lo(1).hi(C[0]-2))),C[0]>2&&(p(i.pick(-1,C[1]-1).lo(1).hi(C[0]-2),w.pick(-1,C[1]-1,0).lo(1).hi(C[0]-2)),E(w.pick(-1,C[1]-1,1).lo(1).hi(C[0]-2))),w.set(0,0,0,0),w.set(0,0,1,0),w.set(C[0]-1,0,0,0),w.set(C[0]-1,0,1,0),w.set(0,C[1]-1,0,0),w.set(0,C[1]-1,1,0),w.set(C[0]-1,C[1]-1,0,0),w.set(C[0]-1,C[1]-1,1,0),w}}function m(b){var E=b.join(),C=h[E];if(C)return C;for(var p=b.length,S=[T,f],w=1;w<=p;++w)S.push(n(w));var i=v,C=i.apply(void 0,S);return h[E]=C,C}d.exports=function(E,p,S){if(Array.isArray(S)||(typeof S=="string"?S=t(p.dimension,S):S=t(p.dimension,"clamp")),p.size===0)return E;if(p.dimension===0)return E.set(0),E;var w=m(S);return w(E,p)}},3581:function(d){function g(c,u){var l=Math.floor(u),y=u-l,h=0<=l&&l<c.shape[0],T=0<=l+1&&l+1<c.shape[0],f=h?+c.get(l):0,n=T?+c.get(l+1):0;return(1-y)*f+y*n}function r(c,u,l){var y=Math.floor(u),h=u-y,T=0<=y&&y<c.shape[0],f=0<=y+1&&y+1<c.shape[0],n=Math.floor(l),v=l-n,m=0<=n&&n<c.shape[1],b=0<=n+1&&n+1<c.shape[1],E=T&&m?c.get(y,n):0,p=T&&b?c.get(y,n+1):0,S=f&&m?c.get(y+1,n):0,w=f&&b?c.get(y+1,n+1):0;return(1-v)*((1-h)*E+h*S)+v*((1-h)*p+h*w)}function t(c,u,l,y){var h=Math.floor(u),T=u-h,f=0<=h&&h<c.shape[0],n=0<=h+1&&h+1<c.shape[0],v=Math.floor(l),m=l-v,b=0<=v&&v<c.shape[1],E=0<=v+1&&v+1<c.shape[1],p=Math.floor(y),S=y-p,w=0<=p&&p<c.shape[2],i=0<=p+1&&p+1<c.shape[2],C=f&&b&&w?c.get(h,v,p):0,x=f&&E&&w?c.get(h,v+1,p):0,k=n&&b&&w?c.get(h+1,v,p):0,I=n&&E&&w?c.get(h+1,v+1,p):0,B=f&&b&&i?c.get(h,v,p+1):0,_=f&&E&&i?c.get(h,v+1,p+1):0,z=n&&b&&i?c.get(h+1,v,p+1):0,O=n&&E&&i?c.get(h+1,v+1,p+1):0;return(1-S)*((1-m)*((1-T)*C+T*k)+m*((1-T)*x+T*I))+S*((1-m)*((1-T)*B+T*z)+m*((1-T)*_+T*O))}function s(c){var u=c.shape.length|0,l=new Array(u),y=new Array(u),h=new Array(u),T=new Array(u),f,n;for(f=0;f<u;++f)n=+arguments[f+1],l[f]=Math.floor(n),y[f]=n-l[f],h[f]=0<=l[f]&&l[f]<c.shape[f],T[f]=0<=l[f]+1&&l[f]+1<c.shape[f];var v=0,m,b,E;e:for(f=0;f<1<<u;++f){for(b=1,E=c.offset,m=0;m<u;++m)if(f&1<<m){if(!T[m])continue e;b*=y[m],E+=c.stride[m]*(l[m]+1)}else{if(!h[m])continue e;b*=1-y[m],E+=c.stride[m]*l[m]}v+=b*c.data[E]}return v}function a(c,u,l,y){switch(c.shape.length){case 0:return 0;case 1:return g(c,u);case 2:return r(c,u,l);case 3:return t(c,u,l,y);default:return s.apply(void 0,arguments)}}d.exports=a,d.exports.d1=g,d.exports.d2=r,d.exports.d3=t},7498:function(d,g){var r={"float64,2,1,0":function(){return function(h,T,f,n,v){var m=h[0],b=h[1],E=h[2],p=f[0],S=f[1],w=f[2];n|=0;var i=0,C=0,x=0,k=w,I=S-E*w,B=p-b*S;for(x=0;x<m;++x){for(C=0;C<b;++C){for(i=0;i<E;++i)T[n]/=v,n+=k;n+=I}n+=B}}},"uint8,2,0,1,float64,2,1,0":function(){return function(h,T,f,n,v,m,b,E){var p=h[0],S=h[1],w=h[2],i=f[0],C=f[1],x=f[2],k=m[0],I=m[1],B=m[2];n|=0,b|=0;for(var _=n,z=b,O=h[0]|0;O>0;){O<64?(p=O,O=0):(p=64,O-=64);for(var F=h[1]|0;F>0;){F<64?(S=F,F=0):(S=64,F-=64),n=_+O*i+F*C,b=z+O*k+F*I;var N=0,V=0,j=0,$=x,q=i-w*x,oe=C-p*i,Z=B,G=k-w*B,re=I-p*k;for(j=0;j<S;++j){for(V=0;V<p;++V){for(N=0;N<w;++N)T[n]=v[b]*E,n+=$,b+=Z;n+=q,b+=G}n+=oe,b+=re}}}}},"float32,1,0,float32,1,0":function(){return function(h,T,f,n,v,m,b){var E=h[0],p=h[1],S=f[0],w=f[1],i=m[0],C=m[1];n|=0,b|=0;var x=0,k=0,I=w,B=S-p*w,_=C,z=i-p*C;for(k=0;k<E;++k){for(x=0;x<p;++x)T[n]=v[b],n+=I,b+=_;n+=B,b+=z}}},"float32,1,0,float32,0,1":function(){return function(h,T,f,n,v,m,b){var E=h[0],p=h[1],S=f[0],w=f[1],i=m[0],C=m[1];n|=0,b|=0;for(var x=n,k=b,I=h[1]|0;I>0;){I<64?(p=I,I=0):(p=64,I-=64);for(var B=h[0]|0;B>0;){B<64?(E=B,B=0):(E=64,B-=64),n=x+I*w+B*S,b=k+I*C+B*i;var _=0,z=0,O=w,F=S-p*w,N=C,V=i-p*C;for(z=0;z<E;++z){for(_=0;_<p;++_)T[n]=v[b],n+=O,b+=N;n+=F,b+=V}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(h,T,f,n,v,m,b){var E=h[0],p=h[1],S=h[2],w=f[0],i=f[1],C=f[2],x=m[0],k=m[1],I=m[2];n|=0,b|=0;for(var B=n,_=b,z=h[2]|0;z>0;){z<64?(S=z,z=0):(S=64,z-=64);for(var O=h[0]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64);for(var F=h[1]|0;F>0;){F<64?(p=F,F=0):(p=64,F-=64),n=B+z*C+O*w+F*i,b=_+z*I+O*x+F*k;var N=0,V=0,j=0,$=C,q=w-S*C,oe=i-E*w,Z=I,G=x-S*I,re=k-E*x;for(j=0;j<p;++j){for(V=0;V<E;++V){for(N=0;N<S;++N)T[n]=v[b],n+=$,b+=Z;n+=q,b+=G}n+=oe,b+=re}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(h,T,f,n,v,m,b){var E=h[0],p=h[1],S=h[2],w=f[0],i=f[1],C=f[2],x=m[0],k=m[1],I=m[2];n|=0,b|=0;var B=0,_=0,z=0,O=C,F=w-S*C,N=i-E*w,V=I,j=x-S*I,$=k-E*x;for(z=0;z<p;++z){for(_=0;_<E;++_){for(B=0;B<S;++B)T[n]=v[b],n+=O,b+=V;n+=F,b+=j}n+=N,b+=$}}}};function t(y,h){var T=h.join(","),f=r[T];return f()}var s=t,a={mul:function(y){var h={};return function(f,n,v){var m=f.dtype,b=f.order,E=n.dtype,p=n.order,S=v.dtype,w=v.order,i=[m,b.join(),E,p.join(),S,w.join()].join(),C=h[i];return C||(h[i]=C=y([m,b,E,p,S,w])),C(f.shape.slice(0),f.data,f.stride,f.offset|0,n.data,n.stride,n.offset|0,v.data,v.stride,v.offset|0)}},muls:function(y){var h={};return function(f,n,v){var m=f.dtype,b=f.order,E=n.dtype,p=n.order,S=[m,b.join(),E,p.join()].join(),w=h[S];return w||(h[S]=w=y([m,b,E,p])),w(f.shape.slice(0),f.data,f.stride,f.offset|0,n.data,n.stride,n.offset|0,v)}},mulseq:function(y){var h={};return function(f,n){var v=f.dtype,m=f.order,b=[v,m.join()].join(),E=h[b];return E||(h[b]=E=y([v,m])),E(f.shape.slice(0),f.data,f.stride,f.offset|0,n)}},div:function(y){var h={};return function(f,n,v){var m=f.dtype,b=f.order,E=n.dtype,p=n.order,S=v.dtype,w=v.order,i=[m,b.join(),E,p.join(),S,w.join()].join(),C=h[i];return C||(h[i]=C=y([m,b,E,p,S,w])),C(f.shape.slice(0),f.data,f.stride,f.offset|0,n.data,n.stride,n.offset|0,v.data,v.stride,v.offset|0)}},divs:function(y){var h={};return function(f,n,v){var m=f.dtype,b=f.order,E=n.dtype,p=n.order,S=[m,b.join(),E,p.join()].join(),w=h[S];return w||(h[S]=w=y([m,b,E,p])),w(f.shape.slice(0),f.data,f.stride,f.offset|0,n.data,n.stride,n.offset|0,v)}},divseq:function(y){var h={};return function(f,n){var v=f.dtype,m=f.order,b=[v,m.join()].join(),E=h[b];return E||(h[b]=E=y([v,m])),E(f.shape.slice(0),f.data,f.stride,f.offset|0,n)}},assign:function(y){var h={};return function(f,n){var v=f.dtype,m=f.order,b=n.dtype,E=n.order,p=[v,m.join(),b,E.join()].join(),S=h[p];return S||(h[p]=S=y([v,m,b,E])),S(f.shape.slice(0),f.data,f.stride,f.offset|0,n.data,n.stride,n.offset|0)}}};function c(y){var h=a[y.funcName];return h(s.bind(void 0,y))}function u(y){return c({funcName:y.funcName})}var l={mul:"*",div:"/"};(function(){for(var y in l)g[y]=u({funcName:y}),g[y+"s"]=u({funcName:y+"s"}),g[y+"seq"]=u({funcName:y+"seq"})})(),g.assign=u({funcName:"assign"})},7382:function(d,g,r){var t=r(5050),s=r(9262);d.exports=function(c,u){for(var l=[],y=c,h=1;Array.isArray(y);)l.push(y.length),h*=y.length,y=y[0];return l.length===0?t():(u||(u=t(new Float64Array(h),l)),s(u,c),u)}},9262:function(d){function g(){return function(u,l,y,h,T){var f=u[0],n=u[1],v=u[2],m=y[0],b=y[1],E=y[2],p=[0,0,0];h|=0;var S=0,w=0,i=0,C=E,x=b-v*E,k=m-n*b;for(i=0;i<f;++i){for(w=0;w<n;++w){for(S=0;S<v;++S){{var I=T,B;for(B=0;B<p.length-1;++B)I=I[p[B]];l[h]=I[p[p.length-1]]}h+=C,++p[2]}h+=x,p[2]-=v,++p[1]}h+=k,p[1]-=n,++p[0]}}}function r(){return g()}var t=r;function s(u){var l={};return function(h,T){var f=h.dtype,n=h.order,v=[f,n.join()].join(),m=l[v];return m||(l[v]=m=u([f,n])),m(h.shape.slice(0),h.data,h.stride,h.offset|0,T)}}function a(u){return s(t.bind(void 0,u))}function c(u){return a({funcName:u.funcName})}d.exports=c({funcName:"convert"})},8139:function(d,g,r){var t=r(5306);function s(T){switch(T){case"uint32":return[t.mallocUint32,t.freeUint32];default:return null}}var a={"uint32,1,0":function(T,f){return function(v,m,b,E,p,S,w,i,C,x,k){var I,B,_,z=v*p+E,O,F=T(i),N,V,j,$;for(I=v+1;I<=m;++I){for(B=I,z+=p,_=z,N=0,V=z,O=0;O<i;++O)F[N++]=b[V],V+=C;e:for(;B-- >v;){N=0,V=_-p;t:for(O=0;O<i;++O){if(j=b[V],$=F[N],j<$)break e;if(j>$)break t;V+=x,N+=k}for(N=_,V=_-p,O=0;O<i;++O)b[N]=b[V],N+=C,V+=C;_-=p}for(N=_,V=0,O=0;O<i;++O)b[N]=F[V++],N+=C}f(F)}}};function c(T,f){var n=s(f),v=[f,T].join(","),m=a[v];return n?m(n[0],n[1]):m()}var u={"uint32,1,0":function(T,f,n){return function v(m,b,E,p,S,w,i,C,x,k,I){var B=(b-m+1)/6|0,_=m+B,z=b-B,O=m+b>>1,F=O-B,N=O+B,V=_,j=F,$=O,q=N,oe=z,Z=m+1,G=b-1,re=!0,H,J,ae,K,Y,ie,ne,le,de,we=0,me=0,Le=0,ve,Ae,ye,Se,_e,ze,Ie,Ne,et,st,Ze,Ke,nt,it,lt,vt,xt=C,Je=f(xt),Pe=f(xt);Ae=S*V,ye=S*j,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=V,V=j,j=J;break e}if(Le<0)break e;vt+=k}Ae=S*q,ye=S*oe,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=q,q=oe,oe=J;break e}if(Le<0)break e;vt+=k}Ae=S*V,ye=S*$,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=V,V=$,$=J;break e}if(Le<0)break e;vt+=k}Ae=S*j,ye=S*$,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=j,j=$,$=J;break e}if(Le<0)break e;vt+=k}Ae=S*V,ye=S*q,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=V,V=q,q=J;break e}if(Le<0)break e;vt+=k}Ae=S*$,ye=S*q,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=$,$=q,q=J;break e}if(Le<0)break e;vt+=k}Ae=S*j,ye=S*oe,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=j,j=oe,oe=J;break e}if(Le<0)break e;vt+=k}Ae=S*j,ye=S*$,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=j,j=$,$=J;break e}if(Le<0)break e;vt+=k}Ae=S*q,ye=S*oe,vt=p;e:for(ve=0;ve<C;++ve){if(ne=Ae+vt,le=ye+vt,Le=E[ne]-E[le],Le>0){J=q,q=oe,oe=J;break e}if(Le<0)break e;vt+=k}for(Ae=S*V,ye=S*j,Se=S*$,_e=S*q,ze=S*oe,Ie=S*_,Ne=S*O,et=S*z,lt=0,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,de=Se+vt,st=_e+vt,Ze=ze+vt,Ke=Ie+vt,nt=Ne+vt,it=et+vt,Je[lt]=E[le],Pe[lt]=E[st],re=re&&Je[lt]===Pe[lt],ae=E[ne],K=E[de],Y=E[Ze],E[Ke]=ae,E[nt]=K,E[it]=Y,++lt,vt+=x;for(Ae=S*F,ye=S*m,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,E[ne]=E[le],vt+=x;for(Ae=S*N,ye=S*b,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,E[ne]=E[le],vt+=x;if(re)for(ie=Z;ie<=G;++ie){ne=p+ie*S,lt=0;e:for(ve=0;ve<C;++ve){if(Le=E[ne]-Je[lt],Le!==0)break e;lt+=I,ne+=k}if(Le!==0)if(Le<0){if(ie!==Z)for(Ae=S*ie,ye=S*Z,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,H=E[ne],E[ne]=E[le],E[le]=H,vt+=x;++Z}else for(;;){ne=p+G*S,lt=0;e:for(ve=0;ve<C;++ve){if(Le=E[ne]-Je[lt],Le!==0)break e;lt+=I,ne+=k}if(Le>0)G--;else if(Le<0){for(Ae=S*ie,ye=S*Z,Se=S*G,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,de=Se+vt,H=E[ne],E[ne]=E[le],E[le]=E[de],E[de]=H,vt+=x;++Z,--G;break}else{for(Ae=S*ie,ye=S*G,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,H=E[ne],E[ne]=E[le],E[le]=H,vt+=x;--G;break}}}else for(ie=Z;ie<=G;++ie){ne=p+ie*S,lt=0;e:for(ve=0;ve<C;++ve){if(we=E[ne]-Je[lt],we!==0)break e;lt+=I,ne+=k}if(we<0){if(ie!==Z)for(Ae=S*ie,ye=S*Z,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,H=E[ne],E[ne]=E[le],E[le]=H,vt+=x;++Z}else{ne=p+ie*S,lt=0;e:for(ve=0;ve<C;++ve){if(me=E[ne]-Pe[lt],me!==0)break e;lt+=I,ne+=k}if(me>0)for(;;){ne=p+G*S,lt=0;e:for(ve=0;ve<C;++ve){if(Le=E[ne]-Pe[lt],Le!==0)break e;lt+=I,ne+=k}if(Le>0){if(--G<ie)break;continue}else{ne=p+G*S,lt=0;e:for(ve=0;ve<C;++ve){if(Le=E[ne]-Je[lt],Le!==0)break e;lt+=I,ne+=k}if(Le<0){for(Ae=S*ie,ye=S*Z,Se=S*G,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,de=Se+vt,H=E[ne],E[ne]=E[le],E[le]=E[de],E[de]=H,vt+=x;++Z,--G}else{for(Ae=S*ie,ye=S*G,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,H=E[ne],E[ne]=E[le],E[le]=H,vt+=x;--G}break}}}}for(Ae=S*m,ye=S*(Z-1),lt=0,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,E[ne]=E[le],E[le]=Je[lt],++lt,vt+=x;for(Ae=S*b,ye=S*(G+1),lt=0,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,E[ne]=E[le],E[le]=Pe[lt],++lt,vt+=x;if(Z-2-m<=32?T(m,Z-2,E,p,S,w,i,C,x,k,I):v(m,Z-2,E,p,S,w,i,C,x,k,I),b-(G+2)<=32?T(G+2,b,E,p,S,w,i,C,x,k,I):v(G+2,b,E,p,S,w,i,C,x,k,I),re){n(Je),n(Pe);return}if(Z<_&&G>z){e:for(;;){for(ne=p+Z*S,lt=0,vt=p,ve=0;ve<C;++ve){if(E[ne]!==Je[lt])break e;++lt,ne+=x}++Z}e:for(;;){for(ne=p+G*S,lt=0,vt=p,ve=0;ve<C;++ve){if(E[ne]!==Pe[lt])break e;++lt,ne+=x}--G}for(ie=Z;ie<=G;++ie){ne=p+ie*S,lt=0;e:for(ve=0;ve<C;++ve){if(we=E[ne]-Je[lt],we!==0)break e;lt+=I,ne+=k}if(we===0){if(ie!==Z)for(Ae=S*ie,ye=S*Z,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,H=E[ne],E[ne]=E[le],E[le]=H,vt+=x;++Z}else{ne=p+ie*S,lt=0;e:for(ve=0;ve<C;++ve){if(me=E[ne]-Pe[lt],me!==0)break e;lt+=I,ne+=k}if(me===0)for(;;){ne=p+G*S,lt=0;e:for(ve=0;ve<C;++ve){if(Le=E[ne]-Pe[lt],Le!==0)break e;lt+=I,ne+=k}if(Le===0){if(--G<ie)break;continue}else{ne=p+G*S,lt=0;e:for(ve=0;ve<C;++ve){if(Le=E[ne]-Je[lt],Le!==0)break e;lt+=I,ne+=k}if(Le<0){for(Ae=S*ie,ye=S*Z,Se=S*G,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,de=Se+vt,H=E[ne],E[ne]=E[le],E[le]=E[de],E[de]=H,vt+=x;++Z,--G}else{for(Ae=S*ie,ye=S*G,vt=p,ve=0;ve<C;++ve)ne=Ae+vt,le=ye+vt,H=E[ne],E[ne]=E[le],E[le]=H,vt+=x;--G}break}}}}}n(Je),n(Pe),G-Z<=32?T(Z,G,E,p,S,w,i,C,x,k,I):v(Z,G,E,p,S,w,i,C,x,k,I)}}};function l(T,f,n){var v=s(f),m=[f,T].join(","),b=u[m];return T.length>1&&v?b(n,v[0],v[1]):b(n)}var y={"uint32,1,0":function(T,f){return function(n){var v=n.data,m=n.offset|0,b=n.shape,E=n.stride,p=E[0]|0,S=b[0]|0,w=E[1]|0,i=b[1]|0,C=w,x=w,k=1;S<=32?T(0,S-1,v,m,p,w,S,i,C,x,k):f(0,S-1,v,m,p,w,S,i,C,x,k)}}};function h(T,f){var n=[f,T].join(","),v=y[n],m=c(T,f),b=l(T,f,m);return v(m,b)}d.exports=h},8729:function(d,g,r){var t=r(8139),s={};function a(c){var u=c.order,l=c.dtype,y=[u,l],h=y.join(":"),T=s[h];return T||(s[h]=T=t(u,l)),T(c),c}d.exports=a},5050:function(d,g,r){var t=r(4780),s=typeof Float64Array<"u";function a(f,n){return f[0]-n[0]}function c(){var f=this.stride,n=new Array(f.length),v;for(v=0;v<n.length;++v)n[v]=[Math.abs(f[v]),v];n.sort(a);var m=new Array(n.length);for(v=0;v<m.length;++v)m[v]=n[v][1];return m}var u={T:function(f){function n(m){this.data=m}var v=n.prototype;return v.dtype=f,v.index=function(){return-1},v.size=0,v.dimension=-1,v.shape=v.stride=v.order=[],v.lo=v.hi=v.transpose=v.step=function(){return new n(this.data)},v.get=v.set=function(){},v.pick=function(){return null},function(b){return new n(b)}},0:function(f,n){function v(b,E){this.data=b,this.offset=E}var m=v.prototype;return m.dtype=f,m.index=function(){return this.offset},m.dimension=0,m.size=1,m.shape=m.stride=m.order=[],m.lo=m.hi=m.transpose=m.step=function(){return new v(this.data,this.offset)},m.pick=function(){return n(this.data)},m.valueOf=m.get=function(){return f==="generic"?this.data.get(this.offset):this.data[this.offset]},m.set=function(E){return f==="generic"?this.data.set(this.offset,E):this.data[this.offset]=E},function(E,p,S,w){return new v(E,w)}},1:function(f,n,v){function m(E,p,S,w){this.data=E,this.shape=[p],this.stride=[S],this.offset=w|0}var b=m.prototype;return b.dtype=f,b.dimension=1,Object.defineProperty(b,"size",{get:function(){return this.shape[0]}}),b.order=[0],b.set=function(p,S){return f==="generic"?this.data.set(this.offset+this.stride[0]*p,S):this.data[this.offset+this.stride[0]*p]=S},b.get=function(p){return f==="generic"?this.data.get(this.offset+this.stride[0]*p):this.data[this.offset+this.stride[0]*p]},b.index=function(p){return this.offset+this.stride[0]*p},b.hi=function(p){return new m(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,this.stride[0],this.offset)},b.lo=function(p){var S=this.offset,w=0,i=this.shape[0],C=this.stride[0];return typeof p=="number"&&p>=0&&(w=p|0,S+=C*w,i-=w),new m(this.data,i,C,S)},b.step=function(p){var S=this.shape[0],w=this.stride[0],i=this.offset,C=0,x=Math.ceil;return typeof p=="number"&&(C=p|0,C<0?(i+=w*(S-1),S=x(-S/C)):S=x(S/C),w*=C),new m(this.data,S,w,i)},b.transpose=function(p){p=p===void 0?0:p|0;var S=this.shape,w=this.stride;return new m(this.data,S[p],w[p],this.offset)},b.pick=function(p){var S=[],w=[],i=this.offset;typeof p=="number"&&p>=0?i=i+this.stride[0]*p|0:(S.push(this.shape[0]),w.push(this.stride[0]));var C=n[S.length+1];return C(this.data,S,w,i)},function(p,S,w,i){return new m(p,S[0],w[0],i)}},2:function(f,n,v){function m(E,p,S,w,i,C){this.data=E,this.shape=[p,S],this.stride=[w,i],this.offset=C|0}var b=m.prototype;return b.dtype=f,b.dimension=2,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(b,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),b.set=function(p,S,w){return f==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*S,w):this.data[this.offset+this.stride[0]*p+this.stride[1]*S]=w},b.get=function(p,S){return f==="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]},b.index=function(p,S){return this.offset+this.stride[0]*p+this.stride[1]*S},b.hi=function(p,S){return new m(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof S!="number"||S<0?this.shape[1]:S|0,this.stride[0],this.stride[1],this.offset)},b.lo=function(p,S){var w=this.offset,i=0,C=this.shape[0],x=this.shape[1],k=this.stride[0],I=this.stride[1];return typeof p=="number"&&p>=0&&(i=p|0,w+=k*i,C-=i),typeof S=="number"&&S>=0&&(i=S|0,w+=I*i,x-=i),new m(this.data,C,x,k,I,w)},b.step=function(p,S){var w=this.shape[0],i=this.shape[1],C=this.stride[0],x=this.stride[1],k=this.offset,I=0,B=Math.ceil;return typeof p=="number"&&(I=p|0,I<0?(k+=C*(w-1),w=B(-w/I)):w=B(w/I),C*=I),typeof S=="number"&&(I=S|0,I<0?(k+=x*(i-1),i=B(-i/I)):i=B(i/I),x*=I),new m(this.data,w,i,C,x,k)},b.transpose=function(p,S){p=p===void 0?0:p|0,S=S===void 0?1:S|0;var w=this.shape,i=this.stride;return new m(this.data,w[p],w[S],i[p],i[S],this.offset)},b.pick=function(p,S){var w=[],i=[],C=this.offset;typeof p=="number"&&p>=0?C=C+this.stride[0]*p|0:(w.push(this.shape[0]),i.push(this.stride[0])),typeof S=="number"&&S>=0?C=C+this.stride[1]*S|0:(w.push(this.shape[1]),i.push(this.stride[1]));var x=n[w.length+1];return x(this.data,w,i,C)},function(p,S,w,i){return new m(p,S[0],S[1],w[0],w[1],i)}},3:function(f,n,v){function m(E,p,S,w,i,C,x,k){this.data=E,this.shape=[p,S,w],this.stride=[i,C,x],this.offset=k|0}var b=m.prototype;return b.dtype=f,b.dimension=3,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(b,"order",{get:function(){var p=Math.abs(this.stride[0]),S=Math.abs(this.stride[1]),w=Math.abs(this.stride[2]);return p>S?S>w?[2,1,0]:p>w?[1,2,0]:[1,0,2]:p>w?[2,0,1]:w>S?[0,1,2]:[0,2,1]}}),b.set=function(p,S,w,i){return f==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w,i):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w]=i},b.get=function(p,S,w){return f==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w]},b.index=function(p,S,w){return this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w},b.hi=function(p,S,w){return new m(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof w!="number"||w<0?this.shape[2]:w|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},b.lo=function(p,S,w){var i=this.offset,C=0,x=this.shape[0],k=this.shape[1],I=this.shape[2],B=this.stride[0],_=this.stride[1],z=this.stride[2];return typeof p=="number"&&p>=0&&(C=p|0,i+=B*C,x-=C),typeof S=="number"&&S>=0&&(C=S|0,i+=_*C,k-=C),typeof w=="number"&&w>=0&&(C=w|0,i+=z*C,I-=C),new m(this.data,x,k,I,B,_,z,i)},b.step=function(p,S,w){var i=this.shape[0],C=this.shape[1],x=this.shape[2],k=this.stride[0],I=this.stride[1],B=this.stride[2],_=this.offset,z=0,O=Math.ceil;return typeof p=="number"&&(z=p|0,z<0?(_+=k*(i-1),i=O(-i/z)):i=O(i/z),k*=z),typeof S=="number"&&(z=S|0,z<0?(_+=I*(C-1),C=O(-C/z)):C=O(C/z),I*=z),typeof w=="number"&&(z=w|0,z<0?(_+=B*(x-1),x=O(-x/z)):x=O(x/z),B*=z),new m(this.data,i,C,x,k,I,B,_)},b.transpose=function(p,S,w){p=p===void 0?0:p|0,S=S===void 0?1:S|0,w=w===void 0?2:w|0;var i=this.shape,C=this.stride;return new m(this.data,i[p],i[S],i[w],C[p],C[S],C[w],this.offset)},b.pick=function(p,S,w){var i=[],C=[],x=this.offset;typeof p=="number"&&p>=0?x=x+this.stride[0]*p|0:(i.push(this.shape[0]),C.push(this.stride[0])),typeof S=="number"&&S>=0?x=x+this.stride[1]*S|0:(i.push(this.shape[1]),C.push(this.stride[1])),typeof w=="number"&&w>=0?x=x+this.stride[2]*w|0:(i.push(this.shape[2]),C.push(this.stride[2]));var k=n[i.length+1];return k(this.data,i,C,x)},function(p,S,w,i){return new m(p,S[0],S[1],S[2],w[0],w[1],w[2],i)}},4:function(f,n,v){function m(E,p,S,w,i,C,x,k,I,B){this.data=E,this.shape=[p,S,w,i],this.stride=[C,x,k,I],this.offset=B|0}var b=m.prototype;return b.dtype=f,b.dimension=4,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(b,"order",{get:v}),b.set=function(p,S,w,i,C){return f==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i,C):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i]=C},b.get=function(p,S,w,i){return f==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i]},b.index=function(p,S,w,i){return this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i},b.hi=function(p,S,w,i){return new m(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof w!="number"||w<0?this.shape[2]:w|0,typeof i!="number"||i<0?this.shape[3]:i|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},b.lo=function(p,S,w,i){var C=this.offset,x=0,k=this.shape[0],I=this.shape[1],B=this.shape[2],_=this.shape[3],z=this.stride[0],O=this.stride[1],F=this.stride[2],N=this.stride[3];return typeof p=="number"&&p>=0&&(x=p|0,C+=z*x,k-=x),typeof S=="number"&&S>=0&&(x=S|0,C+=O*x,I-=x),typeof w=="number"&&w>=0&&(x=w|0,C+=F*x,B-=x),typeof i=="number"&&i>=0&&(x=i|0,C+=N*x,_-=x),new m(this.data,k,I,B,_,z,O,F,N,C)},b.step=function(p,S,w,i){var C=this.shape[0],x=this.shape[1],k=this.shape[2],I=this.shape[3],B=this.stride[0],_=this.stride[1],z=this.stride[2],O=this.stride[3],F=this.offset,N=0,V=Math.ceil;return typeof p=="number"&&(N=p|0,N<0?(F+=B*(C-1),C=V(-C/N)):C=V(C/N),B*=N),typeof S=="number"&&(N=S|0,N<0?(F+=_*(x-1),x=V(-x/N)):x=V(x/N),_*=N),typeof w=="number"&&(N=w|0,N<0?(F+=z*(k-1),k=V(-k/N)):k=V(k/N),z*=N),typeof i=="number"&&(N=i|0,N<0?(F+=O*(I-1),I=V(-I/N)):I=V(I/N),O*=N),new m(this.data,C,x,k,I,B,_,z,O,F)},b.transpose=function(p,S,w,i){p=p===void 0?0:p|0,S=S===void 0?1:S|0,w=w===void 0?2:w|0,i=i===void 0?3:i|0;var C=this.shape,x=this.stride;return new m(this.data,C[p],C[S],C[w],C[i],x[p],x[S],x[w],x[i],this.offset)},b.pick=function(p,S,w,i){var C=[],x=[],k=this.offset;typeof p=="number"&&p>=0?k=k+this.stride[0]*p|0:(C.push(this.shape[0]),x.push(this.stride[0])),typeof S=="number"&&S>=0?k=k+this.stride[1]*S|0:(C.push(this.shape[1]),x.push(this.stride[1])),typeof w=="number"&&w>=0?k=k+this.stride[2]*w|0:(C.push(this.shape[2]),x.push(this.stride[2])),typeof i=="number"&&i>=0?k=k+this.stride[3]*i|0:(C.push(this.shape[3]),x.push(this.stride[3]));var I=n[C.length+1];return I(this.data,C,x,k)},function(p,S,w,i){return new m(p,S[0],S[1],S[2],S[3],w[0],w[1],w[2],w[3],i)}},5:function(n,v,m){function b(p,S,w,i,C,x,k,I,B,_,z,O){this.data=p,this.shape=[S,w,i,C,x],this.stride=[k,I,B,_,z],this.offset=O|0}var E=b.prototype;return E.dtype=n,E.dimension=5,Object.defineProperty(E,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(E,"order",{get:m}),E.set=function(S,w,i,C,x,k){return n==="generic"?this.data.set(this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x,k):this.data[this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x]=k},E.get=function(S,w,i,C,x){return n==="generic"?this.data.get(this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x):this.data[this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x]},E.index=function(S,w,i,C,x){return this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x},E.hi=function(S,w,i,C,x){return new b(this.data,typeof S!="number"||S<0?this.shape[0]:S|0,typeof w!="number"||w<0?this.shape[1]:w|0,typeof i!="number"||i<0?this.shape[2]:i|0,typeof C!="number"||C<0?this.shape[3]:C|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},E.lo=function(S,w,i,C,x){var k=this.offset,I=0,B=this.shape[0],_=this.shape[1],z=this.shape[2],O=this.shape[3],F=this.shape[4],N=this.stride[0],V=this.stride[1],j=this.stride[2],$=this.stride[3],q=this.stride[4];return typeof S=="number"&&S>=0&&(I=S|0,k+=N*I,B-=I),typeof w=="number"&&w>=0&&(I=w|0,k+=V*I,_-=I),typeof i=="number"&&i>=0&&(I=i|0,k+=j*I,z-=I),typeof C=="number"&&C>=0&&(I=C|0,k+=$*I,O-=I),typeof x=="number"&&x>=0&&(I=x|0,k+=q*I,F-=I),new b(this.data,B,_,z,O,F,N,V,j,$,q,k)},E.step=function(S,w,i,C,x){var k=this.shape[0],I=this.shape[1],B=this.shape[2],_=this.shape[3],z=this.shape[4],O=this.stride[0],F=this.stride[1],N=this.stride[2],V=this.stride[3],j=this.stride[4],$=this.offset,q=0,oe=Math.ceil;return typeof S=="number"&&(q=S|0,q<0?($+=O*(k-1),k=oe(-k/q)):k=oe(k/q),O*=q),typeof w=="number"&&(q=w|0,q<0?($+=F*(I-1),I=oe(-I/q)):I=oe(I/q),F*=q),typeof i=="number"&&(q=i|0,q<0?($+=N*(B-1),B=oe(-B/q)):B=oe(B/q),N*=q),typeof C=="number"&&(q=C|0,q<0?($+=V*(_-1),_=oe(-_/q)):_=oe(_/q),V*=q),typeof x=="number"&&(q=x|0,q<0?($+=j*(z-1),z=oe(-z/q)):z=oe(z/q),j*=q),new b(this.data,k,I,B,_,z,O,F,N,V,j,$)},E.transpose=function(S,w,i,C,x){S=S===void 0?0:S|0,w=w===void 0?1:w|0,i=i===void 0?2:i|0,C=C===void 0?3:C|0,x=x===void 0?4:x|0;var k=this.shape,I=this.stride;return new b(this.data,k[S],k[w],k[i],k[C],k[x],I[S],I[w],I[i],I[C],I[x],this.offset)},E.pick=function(S,w,i,C,x){var k=[],I=[],B=this.offset;typeof S=="number"&&S>=0?B=B+this.stride[0]*S|0:(k.push(this.shape[0]),I.push(this.stride[0])),typeof w=="number"&&w>=0?B=B+this.stride[1]*w|0:(k.push(this.shape[1]),I.push(this.stride[1])),typeof i=="number"&&i>=0?B=B+this.stride[2]*i|0:(k.push(this.shape[2]),I.push(this.stride[2])),typeof C=="number"&&C>=0?B=B+this.stride[3]*C|0:(k.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?B=B+this.stride[4]*x|0:(k.push(this.shape[4]),I.push(this.stride[4]));var _=v[k.length+1];return _(this.data,k,I,B)},function(S,w,i,C){return new b(S,w[0],w[1],w[2],w[3],w[4],i[0],i[1],i[2],i[3],i[4],C)}}};function l(f,n){var v=n===-1?"T":String(n),m=u[v];return n===-1?m(f):n===0?m(f,h[f][0]):m(f,h[f],c)}function y(f){if(t(f))return"buffer";if(s)switch(Object.prototype.toString.call(f)){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(f)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function T(f,n,v,m){if(f===void 0){var i=h.array[0];return i([])}else typeof f=="number"&&(f=[f]);n===void 0&&(n=[f.length]);var b=n.length;if(v===void 0){v=new Array(b);for(var E=b-1,p=1;E>=0;--E)v[E]=p,p*=n[E]}if(m===void 0){m=0;for(var E=0;E<b;++E)v[E]<0&&(m-=(n[E]-1)*v[E])}for(var S=y(f),w=h[S];w.length<=b+1;)w.push(l(S,w.length-1));var i=w[b+1];return i(f,n,v,m)}d.exports=T},8551:function(d,g,r){var t=r(8362),s=Math.pow(2,-1074),a=-1>>>0;d.exports=c;function c(u,l){if(isNaN(u)||isNaN(l))return NaN;if(u===l)return u;if(u===0)return l<0?-s:s;var y=t.hi(u),h=t.lo(u);return l>u==u>0?h===a?(y+=1,h=0):h+=1:h===0?(h=a,y-=1):h-=1,t.pack(h,y)}},115:function(d,g){var r=1e-6,t=1e-6;g.vertexNormals=function(s,a,c){for(var u=a.length,l=new Array(u),y=c===void 0?r:c,h=0;h<u;++h)l[h]=[0,0,0];for(var h=0;h<s.length;++h)for(var T=s[h],f=0,n=T[T.length-1],v=T[0],m=0;m<T.length;++m){f=n,n=v,v=T[(m+1)%T.length];for(var b=a[f],E=a[n],p=a[v],S=new Array(3),w=0,i=new Array(3),C=0,x=0;x<3;++x)S[x]=b[x]-E[x],w+=S[x]*S[x],i[x]=p[x]-E[x],C+=i[x]*i[x];if(w*C>y)for(var k=l[n],I=1/Math.sqrt(w*C),x=0;x<3;++x){var B=(x+1)%3,_=(x+2)%3;k[x]+=I*(i[B]*S[_]-i[_]*S[B])}}for(var h=0;h<u;++h){for(var k=l[h],z=0,x=0;x<3;++x)z+=k[x]*k[x];if(z>y)for(var I=1/Math.sqrt(z),x=0;x<3;++x)k[x]*=I;else for(var x=0;x<3;++x)k[x]=0}return l},g.faceNormals=function(s,a,c){for(var u=s.length,l=new Array(u),y=c===void 0?t:c,h=0;h<u;++h){for(var T=s[h],f=new Array(3),n=0;n<3;++n)f[n]=a[T[n]];for(var v=new Array(3),m=new Array(3),n=0;n<3;++n)v[n]=f[1][n]-f[0][n],m[n]=f[2][n]-f[0][n];for(var b=new Array(3),E=0,n=0;n<3;++n){var p=(n+1)%3,S=(n+2)%3;b[n]=v[p]*m[S]-v[S]*m[p],E+=b[n]*b[n]}E>y?E=1/Math.sqrt(E):E=0;for(var n=0;n<3;++n)b[n]*=E;l[h]=b}return l}},567:function(d){d.exports=g;function g(r,t,s,a,c,u,l,y,h,T){var f=t+u+T;if(n>0){var n=Math.sqrt(f+1);r[0]=.5*(l-h)/n,r[1]=.5*(y-a)/n,r[2]=.5*(s-u)/n,r[3]=.5*n}else{var v=Math.max(t,u,T),n=Math.sqrt(2*v-f+1);t>=v?(r[0]=.5*n,r[1]=.5*(c+s)/n,r[2]=.5*(y+a)/n,r[3]=.5*(l-h)/n):u>=v?(r[0]=.5*(s+c)/n,r[1]=.5*n,r[2]=.5*(h+l)/n,r[3]=.5*(y-a)/n):(r[0]=.5*(a+y)/n,r[1]=.5*(l+h)/n,r[2]=.5*n,r[3]=.5*(s-c)/n)}return r}},7774:function(d,g,r){d.exports=n;var t=r(8444),s=r(3012),a=r(5950),c=r(7437),u=r(567);function l(v,m,b){return Math.sqrt(Math.pow(v,2)+Math.pow(m,2)+Math.pow(b,2))}function y(v,m,b,E){return Math.sqrt(Math.pow(v,2)+Math.pow(m,2)+Math.pow(b,2)+Math.pow(E,2))}function h(v,m){var b=m[0],E=m[1],p=m[2],S=m[3],w=y(b,E,p,S);w>1e-6?(v[0]=b/w,v[1]=E/w,v[2]=p/w,v[3]=S/w):(v[0]=v[1]=v[2]=0,v[3]=1)}function T(v,m,b){this.radius=t([b]),this.center=t(m),this.rotation=t(v),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=T.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(v){this.radius.curve(v),this.center.curve(v),this.rotation.curve(v);var m=this.computedRotation;h(m,m);var b=this.computedMatrix;a(b,m);var E=this.computedCenter,p=this.computedEye,S=this.computedUp,w=Math.exp(this.computedRadius[0]);p[0]=E[0]+w*b[2],p[1]=E[1]+w*b[6],p[2]=E[2]+w*b[10],S[0]=b[1],S[1]=b[5],S[2]=b[9];for(var i=0;i<3;++i){for(var C=0,x=0;x<3;++x)C+=b[i+4*x]*p[x];b[12+i]=-C}},f.getMatrix=function(v,m){this.recalcMatrix(v);var b=this.computedMatrix;if(m){for(var E=0;E<16;++E)m[E]=b[E];return m}return b},f.idle=function(v){this.center.idle(v),this.radius.idle(v),this.rotation.idle(v)},f.flush=function(v){this.center.flush(v),this.radius.flush(v),this.rotation.flush(v)},f.pan=function(v,m,b,E){m=m||0,b=b||0,E=E||0,this.recalcMatrix(v);var p=this.computedMatrix,S=p[1],w=p[5],i=p[9],C=l(S,w,i);S/=C,w/=C,i/=C;var x=p[0],k=p[4],I=p[8],B=x*S+k*w+I*i;x-=S*B,k-=w*B,I-=i*B;var _=l(x,k,I);x/=_,k/=_,I/=_,p[2],p[6],p[10];var z=x*m+S*b,O=k*m+w*b,F=I*m+i*b;this.center.move(v,z,O,F);var N=Math.exp(this.computedRadius[0]);N=Math.max(1e-4,N+E),this.radius.set(v,Math.log(N))},f.rotate=function(v,m,b,E){this.recalcMatrix(v),m=m||0,b=b||0;var p=this.computedMatrix,S=p[0],w=p[4],i=p[8],C=p[1],x=p[5],k=p[9],I=p[2],B=p[6],_=p[10],z=m*S+b*C,O=m*w+b*x,F=m*i+b*k,N=-(B*F-_*O),V=-(_*z-I*F),j=-(I*O-B*z),$=Math.sqrt(Math.max(0,1-Math.pow(N,2)-Math.pow(V,2)-Math.pow(j,2))),q=y(N,V,j,$);q>1e-6?(N/=q,V/=q,j/=q,$/=q):(N=V=j=0,$=1);var oe=this.computedRotation,Z=oe[0],G=oe[1],re=oe[2],H=oe[3],J=Z*$+H*N+G*j-re*V,ae=G*$+H*V+re*N-Z*j,K=re*$+H*j+Z*V-G*N,Y=H*$-Z*N-G*V-re*j;if(E){N=I,V=B,j=_;var ie=Math.sin(E)/l(N,V,j);N*=ie,V*=ie,j*=ie,$=Math.cos(m),J=J*$+Y*N+ae*j-K*V,ae=ae*$+Y*V+K*N-J*j,K=K*$+Y*j+J*V-ae*N,Y=Y*$-J*N-ae*V-K*j}var ne=y(J,ae,K,Y);ne>1e-6?(J/=ne,ae/=ne,K/=ne,Y/=ne):(J=ae=K=0,Y=1),this.rotation.set(v,J,ae,K,Y)},f.lookAt=function(v,m,b,E){this.recalcMatrix(v),b=b||this.computedCenter,m=m||this.computedEye,E=E||this.computedUp;var p=this.computedMatrix;s(p,m,b,E);var S=this.computedRotation;u(S,p[0],p[1],p[2],p[4],p[5],p[6],p[8],p[9],p[10]),h(S,S),this.rotation.set(v,S[0],S[1],S[2],S[3]);for(var w=0,i=0;i<3;++i)w+=Math.pow(b[i]-m[i],2);this.radius.set(v,.5*Math.log(Math.max(w,1e-6))),this.center.set(v,b[0],b[1],b[2])},f.translate=function(v,m,b,E){this.center.move(v,m||0,b||0,E||0)},f.setMatrix=function(v,m){var b=this.computedRotation;u(b,m[0],m[1],m[2],m[4],m[5],m[6],m[8],m[9],m[10]),h(b,b),this.rotation.set(v,b[0],b[1],b[2],b[3]);var E=this.computedMatrix;c(E,m);var p=E[15];if(Math.abs(p)>1e-6){var S=E[12]/p,w=E[13]/p,i=E[14]/p;this.recalcMatrix(v);var C=Math.exp(this.computedRadius[0]);this.center.set(v,S-E[2]*C,w-E[6]*C,i-E[10]*C),this.radius.idle(v)}else this.center.idle(v),this.radius.idle(v)},f.setDistance=function(v,m){m>0&&this.radius.set(v,Math.log(m))},f.setDistanceLimits=function(v,m){v>0?v=Math.log(v):v=-1/0,m>0?m=Math.log(m):m=1/0,m=Math.max(m,v),this.radius.bounds[0][0]=v,this.radius.bounds[1][0]=m},f.getDistanceLimits=function(v){var m=this.radius.bounds;return v?(v[0]=Math.exp(m[0][0]),v[1]=Math.exp(m[1][0]),v):[Math.exp(m[0][0]),Math.exp(m[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(v){var m=this.lastT(),b=v.center;b&&this.center.set(m,b[0],b[1],b[2]);var E=v.rotation;E&&this.rotation.set(m,E[0],E[1],E[2],E[3]);var p=v.distance;p&&p>0&&this.radius.set(m,Math.log(p)),this.setDistanceLimits(v.zoomMin,v.zoomMax)};function n(v){v=v||{};var m=v.center||[0,0,0],b=v.rotation||[0,0,0,1],E=v.radius||1;m=[].slice.call(m,0,3),b=[].slice.call(b,0,4),h(b,b);var p=new T(b,m,Math.log(E));return p.setDistanceLimits(v.zoomMin,v.zoomMax),("eye"in v||"up"in v)&&p.lookAt(0,v.eye,v.center,v.up),p}},4930:function(d,g,r){/*!
* pad-left <https://github.com/jonschlinkert/pad-left>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT license.
*/var t=r(6184);d.exports=function(a,c,u){return u=typeof u<"u"?u+"":" ",t(u,c)+a}},4405:function(d){d.exports=function(r,t){t||(t=[0,""]),r=String(r);var s=parseFloat(r,10);return t[0]=s,t[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(d,g,r){d.exports=s;var t=r(9398);function s(a,c){for(var u=c.length|0,l=a.length,y=[new Array(u),new Array(u)],h=0;h<u;++h)y[0][h]=[],y[1][h]=[];for(var h=0;h<l;++h){var T=a[h];y[0][T[0]].push(T),y[1][T[1]].push(T)}for(var f=[],h=0;h<u;++h)y[0][h].length+y[1][h].length===0&&f.push([h]);function n(w,i){var C=y[i][w[i]];C.splice(C.indexOf(w),1)}function v(w,i,C){for(var x,k,I,B=0;B<2;++B)if(y[B][i].length>0){x=y[B][i][0],I=B;break}k=x[I^1];for(var _=0;_<2;++_)for(var z=y[_][i],O=0;O<z.length;++O){var F=z[O],N=F[_^1],V=t(c[w],c[i],c[k],c[N]);V>0&&(x=F,k=N,I=_)}return C||x&&n(x,I),k}function m(w,i){var C=y[i][w][0],x=[w];n(C,i);for(var k=C[i^1];;){for(;k!==w;)x.push(k),k=v(x[x.length-2],k,!1);if(y[0][w].length+y[1][w].length===0)break;var I=x[x.length-1],B=w,_=x[1],z=v(I,B,!0);if(t(c[I],c[B],c[_],c[z])<0)break;x.push(w),k=v(I,B)}return x}function b(w,i){return i[1]===i[i.length-1]}for(var h=0;h<u;++h)for(var E=0;E<2;++E){for(var p=[];y[E][h].length>0;){y[0][h].length;var S=m(h,E);b(p,S)?p.push.apply(p,S):(p.length>0&&f.push(p),p=S)}p.length>0&&f.push(p)}return f}},3959:function(d,g,r){d.exports=s;var t=r(8348);function s(a,c){for(var u=t(a,c.length),l=new Array(c.length),y=new Array(c.length),h=[],T=0;T<c.length;++T){var f=u[T].length;y[T]=f,l[T]=!0,f<=1&&h.push(T)}for(;h.length>0;){var n=h.pop();l[n]=!1;for(var v=u[n],T=0;T<v.length;++T){var m=v[T];--y[m]===0&&h.push(m)}}for(var b=new Array(c.length),E=[],T=0;T<c.length;++T)if(l[T]){var n=E.length;b[T]=n,E.push(c[T])}else b[T]=-1;for(var p=[],T=0;T<a.length;++T){var S=a[T];l[S[0]]&&l[S[1]]&&p.push([b[S[0]],b[S[1]]])}return[p,E]}},8040:function(d,g,r){d.exports=f;var t=r(8348),s=r(4166),a=r(211),c=r(9660),u=r(9662),l=r(1215),y=r(3959);function h(n,v){for(var m=new Array(n),b=0;b<n;++b)m[b]=v;return m}function T(n){for(var v=new Array(n),m=0;m<n;++m)v[m]=[];return v}function f(n,v){var Y=y(n,v);n=Y[0],v=Y[1];var m=v.length;n.length;for(var b=t(n,v.length),E=0;E<m;++E)if(b[E].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var p=s(n,v);function S(Le){for(var ve=Le.length,Ae=[0],ye=0;ye<ve;++ye){var Se=v[Le[ye]],_e=v[Le[(ye+1)%ve]],ze=c(-Se[0],Se[1]),Ie=c(-Se[0],_e[1]),Ne=c(_e[0],Se[1]),et=c(_e[0],_e[1]);Ae=u(Ae,u(u(ze,Ie),u(Ne,et)))}return Ae[Ae.length-1]>0}p=p.filter(S);for(var w=p.length,i=new Array(w),C=new Array(w),E=0;E<w;++E){i[E]=E;var x=new Array(w),k=p[E].map(function(ve){return v[ve]}),I=a([k]),B=0;e:for(var _=0;_<w;++_)if(x[_]=0,E!==_){for(var z=p[_],O=z.length,F=0;F<O;++F){var N=I(v[z[F]]);if(N!==0){N<0&&(x[_]=1,B+=1);continue e}}x[_]=1,B+=1}C[E]=[B,E,x]}C.sort(function(Le,ve){return ve[0]-Le[0]});for(var E=0;E<w;++E)for(var x=C[E],V=x[1],j=x[2],_=0;_<w;++_)j[_]&&(i[_]=V);for(var $=T(w),E=0;E<w;++E)$[E].push(i[E]),$[i[E]].push(E);for(var q={},oe=h(m,!1),E=0;E<w;++E)for(var z=p[E],O=z.length,_=0;_<O;++_){var Z=z[_],G=z[(_+1)%O],re=Math.min(Z,G)+":"+Math.max(Z,G);if(re in q){var H=q[re];$[H].push(E),$[E].push(H),oe[Z]=oe[G]=!0}else q[re]=E}function J(Le){for(var ve=Le.length,Ae=0;Ae<ve;++Ae)if(!oe[Le[Ae]])return!1;return!0}for(var ae=[],K=h(w,-1),E=0;E<w;++E)i[E]===E&&!J(p[E])?(ae.push(E),K[E]=0):K[E]=-1;for(var Y=[];ae.length>0;){var ie=ae.pop(),ne=$[ie];l(ne,function(Le,ve){return Le-ve});var le=ne.length,de=K[ie],we;if(de===0){var z=p[ie];we=[z]}for(var E=0;E<le;++E){var me=ne[E];if(!(K[me]>=0)&&(K[me]=de^1,ae.push(me),de===0)){var z=p[me];J(z)||(z.reverse(),we.push(z))}}de===0&&Y.push(we)}return Y}},211:function(d,g,r){d.exports=v;var t=r(417)[3],s=r(4385),a=r(9014),c=r(5070);function u(){return!0}function l(m){return function(b,E){var p=m[b];return p?!!p.queryPoint(E,u):!1}}function y(m){for(var b={},E=0;E<m.length;++E){var p=m[E],S=p[0][0],w=p[0][1],i=p[1][1],C=[Math.min(w,i),Math.max(w,i)];S in b?b[S].push(C):b[S]=[C]}for(var x={},k=Object.keys(b),E=0;E<k.length;++E){var I=b[k[E]];x[k[E]]=a(I)}return l(x)}function h(m,b){return function(E){var p=c.le(b,E[0]);if(p<0)return 1;var S=m[p];if(!S)if(p>0&&b[p]===E[0])S=m[p-1];else return 1;for(var w=1;S;){var i=S.key,C=t(E,i[0],i[1]);if(i[0][0]<i[1][0])if(C<0)S=S.left;else if(C>0)w=-1,S=S.right;else return 0;else if(C>0)S=S.left;else if(C<0)w=1,S=S.right;else return 0}return w}}function T(m){return 1}function f(m){return function(E){return m(E[0],E[1])?0:1}}function n(m,b){return function(p){return m(p[0],p[1])?0:b(p)}}function v(m){for(var b=m.length,E=[],p=[],S=0;S<b;++S)for(var w=m[S],i=w.length,C=i-1,x=0;x<i;C=x++){var k=w[C],I=w[x];k[0]===I[0]?p.push([k,I]):E.push([k,I])}if(E.length===0)return p.length===0?T:f(y(p));var B=s(E),_=h(B.slabs,B.coordinates);return p.length===0?_:n(y(p),_)}},7309:function(d){var g=new Float64Array(4),r=new Float64Array(4),t=new Float64Array(4);function s(a,c,u,l,y){g.length<l.length&&(g=new Float64Array(l.length),r=new Float64Array(l.length),t=new Float64Array(l.length));for(var h=0;h<l.length;++h)g[h]=a[h]-l[h],r[h]=c[h]-a[h],t[h]=u[h]-a[h];for(var T=0,f=0,n=0,v=0,m=0,b=0,h=0;h<l.length;++h){var E=r[h],p=t[h],S=g[h];T+=E*E,f+=E*p,n+=p*p,v+=S*E,m+=S*p,b+=S*S}var w=Math.abs(T*n-f*f),i=f*m-n*v,C=f*v-T*m,x;if(i+C<=w)if(i<0)C<0&&v<0?(C=0,-v>=T?(i=1,x=T+2*v+b):(i=-v/T,x=v*i+b)):(i=0,m>=0?(C=0,x=b):-m>=n?(C=1,x=n+2*m+b):(C=-m/n,x=m*C+b));else if(C<0)C=0,v>=0?(i=0,x=b):-v>=T?(i=1,x=T+2*v+b):(i=-v/T,x=v*i+b);else{var k=1/w;i*=k,C*=k,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b}else{var I,B,_,z;i<0?(I=f+v,B=n+m,B>I?(_=B-I,z=T-2*f+n,_>=z?(i=1,C=0,x=T+2*v+b):(i=_/z,C=1-i,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b)):(i=0,B<=0?(C=1,x=n+2*m+b):m>=0?(C=0,x=b):(C=-m/n,x=m*C+b))):C<0?(I=f+m,B=T+v,B>I?(_=B-I,z=T-2*f+n,_>=z?(C=1,i=0,x=n+2*m+b):(C=_/z,i=1-C,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b)):(C=0,B<=0?(i=1,x=T+2*v+b):v>=0?(i=0,x=b):(i=-v/T,x=v*i+b))):(_=n+m-f-v,_<=0?(i=0,C=1,x=n+2*m+b):(z=T-2*f+n,_>=z?(i=1,C=0,x=T+2*v+b):(i=_/z,C=1-i,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b)))}for(var O=1-i-C,h=0;h<l.length;++h)y[h]=O*a[h]+i*c[h]+C*u[h];return x<0?0:x}d.exports=s},1116:function(d,g,r){d.exports=r(6093)},7584:function(d,g,r){var t=r(1539);d.exports=s;function s(a,c){for(var u=a.length,l=new Array(u),y=0;y<u;++y)l[y]=t(a[y],c[y]);return l}},2826:function(d,g,r){d.exports=s;var t=r(5125);function s(a){for(var c=new Array(a.length),u=0;u<a.length;++u)c[u]=t(a[u]);return c}},4469:function(d,g,r){var t=r(5125),s=r(3962);d.exports=a;function a(c,u){for(var l=t(u),y=c.length,h=new Array(y),T=0;T<y;++T)h[T]=s(c[T],l);return h}},6695:function(d,g,r){var t=r(4354);d.exports=s;function s(a,c){for(var u=a.length,l=new Array(u),y=0;y<u;++y)l[y]=t(a[y],c[y]);return l}},7037:function(d,g,r){var t=r(9209),s=r(1284),a=r(9887);d.exports=c;function c(u){u.sort(s);for(var l=u.length,y=0,h=0;h<l;++h){var T=u[h],f=a(T);if(f!==0){if(y>0){var n=u[y-1];if(t(T,n)===0&&a(n)!==f){y-=1;continue}}u[y++]=T}}return u.length=y,u}},6184:function(d){/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/var g="",r;d.exports=t;function t(s,a){if(typeof s!="string")throw new TypeError("expected a string");if(a===1)return s;if(a===2)return s+s;var c=s.length*a;if(r!==s||typeof r>"u")r=s,g="";else if(g.length>=c)return g.substr(0,c);for(;c>g.length&&a>1;)a&1&&(g+=s),a>>=1,s+=s;return g+=s,g=g.substr(0,c),g}},8161:function(d,g,r){d.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(d){d.exports=g;function g(r){for(var t=r.length,s=r[r.length-1],a=t,c=t-2;c>=0;--c){var u=s,l=r[c];s=u+l;var y=s-u,h=l-y;h&&(r[--a]=s,s=h)}for(var T=0,c=a;c<t;++c){var u=r[c],l=s;s=u+l;var y=s-u,h=l-y;h&&(r[T++]=h)}return r[T++]=s,r.length=T,r}},8167:function(d,g,r){var t=r(9660),s=r(9662),a=r(8289),c=r(402),u=6;function l(b,E,p,S){return function(i){return S(b(p(i[0][0],i[1][1]),p(-i[0][1],i[1][0])))}}function y(b,E,p,S){return function(i){return S(b(E(b(p(i[1][1],i[2][2]),p(-i[1][2],i[2][1])),i[0][0]),b(E(b(p(i[1][0],i[2][2]),p(-i[1][2],i[2][0])),-i[0][1]),E(b(p(i[1][0],i[2][1]),p(-i[1][1],i[2][0])),i[0][2]))))}}function h(b,E,p,S){return function(i){return S(b(b(E(b(E(b(p(i[2][2],i[3][3]),p(-i[2][3],i[3][2])),i[1][1]),b(E(b(p(i[2][1],i[3][3]),p(-i[2][3],i[3][1])),-i[1][2]),E(b(p(i[2][1],i[3][2]),p(-i[2][2],i[3][1])),i[1][3]))),i[0][0]),E(b(E(b(p(i[2][2],i[3][3]),p(-i[2][3],i[3][2])),i[1][0]),b(E(b(p(i[2][0],i[3][3]),p(-i[2][3],i[3][0])),-i[1][2]),E(b(p(i[2][0],i[3][2]),p(-i[2][2],i[3][0])),i[1][3]))),-i[0][1])),b(E(b(E(b(p(i[2][1],i[3][3]),p(-i[2][3],i[3][1])),i[1][0]),b(E(b(p(i[2][0],i[3][3]),p(-i[2][3],i[3][0])),-i[1][1]),E(b(p(i[2][0],i[3][1]),p(-i[2][1],i[3][0])),i[1][3]))),i[0][2]),E(b(E(b(p(i[2][1],i[3][2]),p(-i[2][2],i[3][1])),i[1][0]),b(E(b(p(i[2][0],i[3][2]),p(-i[2][2],i[3][0])),-i[1][1]),E(b(p(i[2][0],i[3][1]),p(-i[2][1],i[3][0])),i[1][2]))),-i[0][3]))))}}function T(b,E,p,S){return function(i){return S(b(b(E(b(b(E(b(E(b(p(i[3][3],i[4][4]),p(-i[3][4],i[4][3])),i[2][2]),b(E(b(p(i[3][2],i[4][4]),p(-i[3][4],i[4][2])),-i[2][3]),E(b(p(i[3][2],i[4][3]),p(-i[3][3],i[4][2])),i[2][4]))),i[1][1]),E(b(E(b(p(i[3][3],i[4][4]),p(-i[3][4],i[4][3])),i[2][1]),b(E(b(p(i[3][1],i[4][4]),p(-i[3][4],i[4][1])),-i[2][3]),E(b(p(i[3][1],i[4][3]),p(-i[3][3],i[4][1])),i[2][4]))),-i[1][2])),b(E(b(E(b(p(i[3][2],i[4][4]),p(-i[3][4],i[4][2])),i[2][1]),b(E(b(p(i[3][1],i[4][4]),p(-i[3][4],i[4][1])),-i[2][2]),E(b(p(i[3][1],i[4][2]),p(-i[3][2],i[4][1])),i[2][4]))),i[1][3]),E(b(E(b(p(i[3][2],i[4][3]),p(-i[3][3],i[4][2])),i[2][1]),b(E(b(p(i[3][1],i[4][3]),p(-i[3][3],i[4][1])),-i[2][2]),E(b(p(i[3][1],i[4][2]),p(-i[3][2],i[4][1])),i[2][3]))),-i[1][4]))),i[0][0]),E(b(b(E(b(E(b(p(i[3][3],i[4][4]),p(-i[3][4],i[4][3])),i[2][2]),b(E(b(p(i[3][2],i[4][4]),p(-i[3][4],i[4][2])),-i[2][3]),E(b(p(i[3][2],i[4][3]),p(-i[3][3],i[4][2])),i[2][4]))),i[1][0]),E(b(E(b(p(i[3][3],i[4][4]),p(-i[3][4],i[4][3])),i[2][0]),b(E(b(p(i[3][0],i[4][4]),p(-i[3][4],i[4][0])),-i[2][3]),E(b(p(i[3][0],i[4][3]),p(-i[3][3],i[4][0])),i[2][4]))),-i[1][2])),b(E(b(E(b(p(i[3][2],i[4][4]),p(-i[3][4],i[4][2])),i[2][0]),b(E(b(p(i[3][0],i[4][4]),p(-i[3][4],i[4][0])),-i[2][2]),E(b(p(i[3][0],i[4][2]),p(-i[3][2],i[4][0])),i[2][4]))),i[1][3]),E(b(E(b(p(i[3][2],i[4][3]),p(-i[3][3],i[4][2])),i[2][0]),b(E(b(p(i[3][0],i[4][3]),p(-i[3][3],i[4][0])),-i[2][2]),E(b(p(i[3][0],i[4][2]),p(-i[3][2],i[4][0])),i[2][3]))),-i[1][4]))),-i[0][1])),b(E(b(b(E(b(E(b(p(i[3][3],i[4][4]),p(-i[3][4],i[4][3])),i[2][1]),b(E(b(p(i[3][1],i[4][4]),p(-i[3][4],i[4][1])),-i[2][3]),E(b(p(i[3][1],i[4][3]),p(-i[3][3],i[4][1])),i[2][4]))),i[1][0]),E(b(E(b(p(i[3][3],i[4][4]),p(-i[3][4],i[4][3])),i[2][0]),b(E(b(p(i[3][0],i[4][4]),p(-i[3][4],i[4][0])),-i[2][3]),E(b(p(i[3][0],i[4][3]),p(-i[3][3],i[4][0])),i[2][4]))),-i[1][1])),b(E(b(E(b(p(i[3][1],i[4][4]),p(-i[3][4],i[4][1])),i[2][0]),b(E(b(p(i[3][0],i[4][4]),p(-i[3][4],i[4][0])),-i[2][1]),E(b(p(i[3][0],i[4][1]),p(-i[3][1],i[4][0])),i[2][4]))),i[1][3]),E(b(E(b(p(i[3][1],i[4][3]),p(-i[3][3],i[4][1])),i[2][0]),b(E(b(p(i[3][0],i[4][3]),p(-i[3][3],i[4][0])),-i[2][1]),E(b(p(i[3][0],i[4][1]),p(-i[3][1],i[4][0])),i[2][3]))),-i[1][4]))),i[0][2]),b(E(b(b(E(b(E(b(p(i[3][2],i[4][4]),p(-i[3][4],i[4][2])),i[2][1]),b(E(b(p(i[3][1],i[4][4]),p(-i[3][4],i[4][1])),-i[2][2]),E(b(p(i[3][1],i[4][2]),p(-i[3][2],i[4][1])),i[2][4]))),i[1][0]),E(b(E(b(p(i[3][2],i[4][4]),p(-i[3][4],i[4][2])),i[2][0]),b(E(b(p(i[3][0],i[4][4]),p(-i[3][4],i[4][0])),-i[2][2]),E(b(p(i[3][0],i[4][2]),p(-i[3][2],i[4][0])),i[2][4]))),-i[1][1])),b(E(b(E(b(p(i[3][1],i[4][4]),p(-i[3][4],i[4][1])),i[2][0]),b(E(b(p(i[3][0],i[4][4]),p(-i[3][4],i[4][0])),-i[2][1]),E(b(p(i[3][0],i[4][1]),p(-i[3][1],i[4][0])),i[2][4]))),i[1][2]),E(b(E(b(p(i[3][1],i[4][2]),p(-i[3][2],i[4][1])),i[2][0]),b(E(b(p(i[3][0],i[4][2]),p(-i[3][2],i[4][0])),-i[2][1]),E(b(p(i[3][0],i[4][1]),p(-i[3][1],i[4][0])),i[2][2]))),-i[1][4]))),-i[0][3]),E(b(b(E(b(E(b(p(i[3][2],i[4][3]),p(-i[3][3],i[4][2])),i[2][1]),b(E(b(p(i[3][1],i[4][3]),p(-i[3][3],i[4][1])),-i[2][2]),E(b(p(i[3][1],i[4][2]),p(-i[3][2],i[4][1])),i[2][3]))),i[1][0]),E(b(E(b(p(i[3][2],i[4][3]),p(-i[3][3],i[4][2])),i[2][0]),b(E(b(p(i[3][0],i[4][3]),p(-i[3][3],i[4][0])),-i[2][2]),E(b(p(i[3][0],i[4][2]),p(-i[3][2],i[4][0])),i[2][3]))),-i[1][1])),b(E(b(E(b(p(i[3][1],i[4][3]),p(-i[3][3],i[4][1])),i[2][0]),b(E(b(p(i[3][0],i[4][3]),p(-i[3][3],i[4][0])),-i[2][1]),E(b(p(i[3][0],i[4][1]),p(-i[3][1],i[4][0])),i[2][3]))),i[1][2]),E(b(E(b(p(i[3][1],i[4][2]),p(-i[3][2],i[4][1])),i[2][0]),b(E(b(p(i[3][0],i[4][2]),p(-i[3][2],i[4][0])),-i[2][1]),E(b(p(i[3][0],i[4][1]),p(-i[3][1],i[4][0])),i[2][2]))),-i[1][3]))),i[0][4])))))}}function f(b){var E=b===2?l:b===3?y:b===4?h:b===5?T:void 0;return E(s,a,t,c)}var n=[function(){return[0]},function(E){return[E[0][0]]}];function v(b,E,p,S,w,i,C,x){return function(I){switch(I.length){case 0:return b(I);case 1:return E(I);case 2:return p(I);case 3:return S(I);case 4:return w(I);case 5:return i(I)}var B=C[I.length];return B||(B=C[I.length]=x(I.length)),B(I)}}function m(){for(;n.length<u;)n.push(f(n.length));d.exports=v.apply(void 0,n.concat([n,f]));for(var b=0;b<n.length;++b)d.exports[b]=n[b]}m()},9130:function(d,g,r){var t=r(9660),s=r(9662);d.exports=a;function a(c,u){for(var l=t(c[0],u[0]),y=1;y<c.length;++y)l=s(l,t(c[y],u[y]));return l}},2227:function(d,g,r){var t=r(9660),s=r(9662),a=r(4078),c=r(8289),u=6;function l(w){var i=w===3?f:w===4?n:w===5?v:m;return i(s,a,t,c)}function y(){return 0}function h(){return 0}function T(){return 0}function f(w,i,C,x){function k(I,B,_){var z=C(I[0],I[0]),O=x(z,B[0]),F=x(z,_[0]),N=C(B[0],B[0]),V=x(N,I[0]),j=x(N,_[0]),$=C(_[0],_[0]),q=x($,I[0]),oe=x($,B[0]),Z=w(i(oe,j),i(V,O)),G=i(q,F),re=i(Z,G);return re[re.length-1]}return k}function n(w,i,C,x){function k(I,B,_,z){var O=w(C(I[0],I[0]),C(I[1],I[1])),F=x(O,B[0]),N=x(O,_[0]),V=x(O,z[0]),j=w(C(B[0],B[0]),C(B[1],B[1])),$=x(j,I[0]),q=x(j,_[0]),oe=x(j,z[0]),Z=w(C(_[0],_[0]),C(_[1],_[1])),G=x(Z,I[0]),re=x(Z,B[0]),H=x(Z,z[0]),J=w(C(z[0],z[0]),C(z[1],z[1])),ae=x(J,I[0]),K=x(J,B[0]),Y=x(J,_[0]),ie=w(w(x(i(Y,H),B[1]),w(x(i(K,oe),-_[1]),x(i(re,q),z[1]))),w(x(i(K,oe),I[1]),w(x(i(ae,V),-B[1]),x(i($,F),z[1])))),ne=w(w(x(i(Y,H),I[1]),w(x(i(ae,V),-_[1]),x(i(G,N),z[1]))),w(x(i(re,q),I[1]),w(x(i(G,N),-B[1]),x(i($,F),_[1])))),le=i(ie,ne);return le[le.length-1]}return k}function v(w,i,C,x){function k(I,B,_,z,O){var F=w(C(I[0],I[0]),w(C(I[1],I[1]),C(I[2],I[2]))),N=x(F,B[0]),V=x(F,_[0]),j=x(F,z[0]),$=x(F,O[0]),q=w(C(B[0],B[0]),w(C(B[1],B[1]),C(B[2],B[2]))),oe=x(q,I[0]),Z=x(q,_[0]),G=x(q,z[0]),re=x(q,O[0]),H=w(C(_[0],_[0]),w(C(_[1],_[1]),C(_[2],_[2]))),J=x(H,I[0]),ae=x(H,B[0]),K=x(H,z[0]),Y=x(H,O[0]),ie=w(C(z[0],z[0]),w(C(z[1],z[1]),C(z[2],z[2]))),ne=x(ie,I[0]),le=x(ie,B[0]),de=x(ie,_[0]),we=x(ie,O[0]),me=w(C(O[0],O[0]),w(C(O[1],O[1]),C(O[2],O[2]))),Le=x(me,I[0]),ve=x(me,B[0]),Ae=x(me,_[0]),ye=x(me,z[0]),Se=w(w(w(x(w(x(i(ye,we),_[1]),w(x(i(Ae,Y),-z[1]),x(i(de,K),O[1]))),B[2]),w(x(w(x(i(ye,we),B[1]),w(x(i(ve,re),-z[1]),x(i(le,G),O[1]))),-_[2]),x(w(x(i(Ae,Y),B[1]),w(x(i(ve,re),-_[1]),x(i(ae,Z),O[1]))),z[2]))),w(x(w(x(i(de,K),B[1]),w(x(i(le,G),-_[1]),x(i(ae,Z),z[1]))),-O[2]),w(x(w(x(i(ye,we),B[1]),w(x(i(ve,re),-z[1]),x(i(le,G),O[1]))),I[2]),x(w(x(i(ye,we),I[1]),w(x(i(Le,$),-z[1]),x(i(ne,j),O[1]))),-B[2])))),w(w(x(w(x(i(ve,re),I[1]),w(x(i(Le,$),-B[1]),x(i(oe,N),O[1]))),z[2]),w(x(w(x(i(le,G),I[1]),w(x(i(ne,j),-B[1]),x(i(oe,N),z[1]))),-O[2]),x(w(x(i(de,K),B[1]),w(x(i(le,G),-_[1]),x(i(ae,Z),z[1]))),I[2]))),w(x(w(x(i(de,K),I[1]),w(x(i(ne,j),-_[1]),x(i(J,V),z[1]))),-B[2]),w(x(w(x(i(le,G),I[1]),w(x(i(ne,j),-B[1]),x(i(oe,N),z[1]))),_[2]),x(w(x(i(ae,Z),I[1]),w(x(i(J,V),-B[1]),x(i(oe,N),_[1]))),-z[2]))))),_e=w(w(w(x(w(x(i(ye,we),_[1]),w(x(i(Ae,Y),-z[1]),x(i(de,K),O[1]))),I[2]),x(w(x(i(ye,we),I[1]),w(x(i(Le,$),-z[1]),x(i(ne,j),O[1]))),-_[2])),w(x(w(x(i(Ae,Y),I[1]),w(x(i(Le,$),-_[1]),x(i(J,V),O[1]))),z[2]),x(w(x(i(de,K),I[1]),w(x(i(ne,j),-_[1]),x(i(J,V),z[1]))),-O[2]))),w(w(x(w(x(i(Ae,Y),B[1]),w(x(i(ve,re),-_[1]),x(i(ae,Z),O[1]))),I[2]),x(w(x(i(Ae,Y),I[1]),w(x(i(Le,$),-_[1]),x(i(J,V),O[1]))),-B[2])),w(x(w(x(i(ve,re),I[1]),w(x(i(Le,$),-B[1]),x(i(oe,N),O[1]))),_[2]),x(w(x(i(ae,Z),I[1]),w(x(i(J,V),-B[1]),x(i(oe,N),_[1]))),-O[2])))),ze=i(Se,_e);return ze[ze.length-1]}return k}function m(w,i,C,x){function k(I,B,_,z,O,F){var N=w(w(C(I[0],I[0]),C(I[1],I[1])),w(C(I[2],I[2]),C(I[3],I[3]))),V=x(N,B[0]),j=x(N,_[0]),$=x(N,z[0]),q=x(N,O[0]),oe=x(N,F[0]),Z=w(w(C(B[0],B[0]),C(B[1],B[1])),w(C(B[2],B[2]),C(B[3],B[3]))),G=x(Z,I[0]),re=x(Z,_[0]),H=x(Z,z[0]),J=x(Z,O[0]),ae=x(Z,F[0]),K=w(w(C(_[0],_[0]),C(_[1],_[1])),w(C(_[2],_[2]),C(_[3],_[3]))),Y=x(K,I[0]),ie=x(K,B[0]),ne=x(K,z[0]),le=x(K,O[0]),de=x(K,F[0]),we=w(w(C(z[0],z[0]),C(z[1],z[1])),w(C(z[2],z[2]),C(z[3],z[3]))),me=x(we,I[0]),Le=x(we,B[0]),ve=x(we,_[0]),Ae=x(we,O[0]),ye=x(we,F[0]),Se=w(w(C(O[0],O[0]),C(O[1],O[1])),w(C(O[2],O[2]),C(O[3],O[3]))),_e=x(Se,I[0]),ze=x(Se,B[0]),Ie=x(Se,_[0]),Ne=x(Se,z[0]),et=x(Se,F[0]),st=w(w(C(F[0],F[0]),C(F[1],F[1])),w(C(F[2],F[2]),C(F[3],F[3]))),Ze=x(st,I[0]),Ke=x(st,B[0]),nt=x(st,_[0]),it=x(st,z[0]),lt=x(st,O[0]),vt=w(w(w(x(w(w(x(w(x(i(lt,et),z[1]),w(x(i(it,ye),-O[1]),x(i(Ne,Ae),F[1]))),_[2]),x(w(x(i(lt,et),_[1]),w(x(i(nt,de),-O[1]),x(i(Ie,le),F[1]))),-z[2])),w(x(w(x(i(it,ye),_[1]),w(x(i(nt,de),-z[1]),x(i(ve,ne),F[1]))),O[2]),x(w(x(i(Ne,Ae),_[1]),w(x(i(Ie,le),-z[1]),x(i(ve,ne),O[1]))),-F[2]))),B[3]),w(x(w(w(x(w(x(i(lt,et),z[1]),w(x(i(it,ye),-O[1]),x(i(Ne,Ae),F[1]))),B[2]),x(w(x(i(lt,et),B[1]),w(x(i(Ke,ae),-O[1]),x(i(ze,J),F[1]))),-z[2])),w(x(w(x(i(it,ye),B[1]),w(x(i(Ke,ae),-z[1]),x(i(Le,H),F[1]))),O[2]),x(w(x(i(Ne,Ae),B[1]),w(x(i(ze,J),-z[1]),x(i(Le,H),O[1]))),-F[2]))),-_[3]),x(w(w(x(w(x(i(lt,et),_[1]),w(x(i(nt,de),-O[1]),x(i(Ie,le),F[1]))),B[2]),x(w(x(i(lt,et),B[1]),w(x(i(Ke,ae),-O[1]),x(i(ze,J),F[1]))),-_[2])),w(x(w(x(i(nt,de),B[1]),w(x(i(Ke,ae),-_[1]),x(i(ie,re),F[1]))),O[2]),x(w(x(i(Ie,le),B[1]),w(x(i(ze,J),-_[1]),x(i(ie,re),O[1]))),-F[2]))),z[3]))),w(w(x(w(w(x(w(x(i(it,ye),_[1]),w(x(i(nt,de),-z[1]),x(i(ve,ne),F[1]))),B[2]),x(w(x(i(it,ye),B[1]),w(x(i(Ke,ae),-z[1]),x(i(Le,H),F[1]))),-_[2])),w(x(w(x(i(nt,de),B[1]),w(x(i(Ke,ae),-_[1]),x(i(ie,re),F[1]))),z[2]),x(w(x(i(ve,ne),B[1]),w(x(i(Le,H),-_[1]),x(i(ie,re),z[1]))),-F[2]))),-O[3]),x(w(w(x(w(x(i(Ne,Ae),_[1]),w(x(i(Ie,le),-z[1]),x(i(ve,ne),O[1]))),B[2]),x(w(x(i(Ne,Ae),B[1]),w(x(i(ze,J),-z[1]),x(i(Le,H),O[1]))),-_[2])),w(x(w(x(i(Ie,le),B[1]),w(x(i(ze,J),-_[1]),x(i(ie,re),O[1]))),z[2]),x(w(x(i(ve,ne),B[1]),w(x(i(Le,H),-_[1]),x(i(ie,re),z[1]))),-O[2]))),F[3])),w(x(w(w(x(w(x(i(lt,et),z[1]),w(x(i(it,ye),-O[1]),x(i(Ne,Ae),F[1]))),B[2]),x(w(x(i(lt,et),B[1]),w(x(i(Ke,ae),-O[1]),x(i(ze,J),F[1]))),-z[2])),w(x(w(x(i(it,ye),B[1]),w(x(i(Ke,ae),-z[1]),x(i(Le,H),F[1]))),O[2]),x(w(x(i(Ne,Ae),B[1]),w(x(i(ze,J),-z[1]),x(i(Le,H),O[1]))),-F[2]))),I[3]),x(w(w(x(w(x(i(lt,et),z[1]),w(x(i(it,ye),-O[1]),x(i(Ne,Ae),F[1]))),I[2]),x(w(x(i(lt,et),I[1]),w(x(i(Ze,oe),-O[1]),x(i(_e,q),F[1]))),-z[2])),w(x(w(x(i(it,ye),I[1]),w(x(i(Ze,oe),-z[1]),x(i(me,$),F[1]))),O[2]),x(w(x(i(Ne,Ae),I[1]),w(x(i(_e,q),-z[1]),x(i(me,$),O[1]))),-F[2]))),-B[3])))),w(w(w(x(w(w(x(w(x(i(lt,et),B[1]),w(x(i(Ke,ae),-O[1]),x(i(ze,J),F[1]))),I[2]),x(w(x(i(lt,et),I[1]),w(x(i(Ze,oe),-O[1]),x(i(_e,q),F[1]))),-B[2])),w(x(w(x(i(Ke,ae),I[1]),w(x(i(Ze,oe),-B[1]),x(i(G,V),F[1]))),O[2]),x(w(x(i(ze,J),I[1]),w(x(i(_e,q),-B[1]),x(i(G,V),O[1]))),-F[2]))),z[3]),x(w(w(x(w(x(i(it,ye),B[1]),w(x(i(Ke,ae),-z[1]),x(i(Le,H),F[1]))),I[2]),x(w(x(i(it,ye),I[1]),w(x(i(Ze,oe),-z[1]),x(i(me,$),F[1]))),-B[2])),w(x(w(x(i(Ke,ae),I[1]),w(x(i(Ze,oe),-B[1]),x(i(G,V),F[1]))),z[2]),x(w(x(i(Le,H),I[1]),w(x(i(me,$),-B[1]),x(i(G,V),z[1]))),-F[2]))),-O[3])),w(x(w(w(x(w(x(i(Ne,Ae),B[1]),w(x(i(ze,J),-z[1]),x(i(Le,H),O[1]))),I[2]),x(w(x(i(Ne,Ae),I[1]),w(x(i(_e,q),-z[1]),x(i(me,$),O[1]))),-B[2])),w(x(w(x(i(ze,J),I[1]),w(x(i(_e,q),-B[1]),x(i(G,V),O[1]))),z[2]),x(w(x(i(Le,H),I[1]),w(x(i(me,$),-B[1]),x(i(G,V),z[1]))),-O[2]))),F[3]),x(w(w(x(w(x(i(it,ye),_[1]),w(x(i(nt,de),-z[1]),x(i(ve,ne),F[1]))),B[2]),x(w(x(i(it,ye),B[1]),w(x(i(Ke,ae),-z[1]),x(i(Le,H),F[1]))),-_[2])),w(x(w(x(i(nt,de),B[1]),w(x(i(Ke,ae),-_[1]),x(i(ie,re),F[1]))),z[2]),x(w(x(i(ve,ne),B[1]),w(x(i(Le,H),-_[1]),x(i(ie,re),z[1]))),-F[2]))),I[3]))),w(w(x(w(w(x(w(x(i(it,ye),_[1]),w(x(i(nt,de),-z[1]),x(i(ve,ne),F[1]))),I[2]),x(w(x(i(it,ye),I[1]),w(x(i(Ze,oe),-z[1]),x(i(me,$),F[1]))),-_[2])),w(x(w(x(i(nt,de),I[1]),w(x(i(Ze,oe),-_[1]),x(i(Y,j),F[1]))),z[2]),x(w(x(i(ve,ne),I[1]),w(x(i(me,$),-_[1]),x(i(Y,j),z[1]))),-F[2]))),-B[3]),x(w(w(x(w(x(i(it,ye),B[1]),w(x(i(Ke,ae),-z[1]),x(i(Le,H),F[1]))),I[2]),x(w(x(i(it,ye),I[1]),w(x(i(Ze,oe),-z[1]),x(i(me,$),F[1]))),-B[2])),w(x(w(x(i(Ke,ae),I[1]),w(x(i(Ze,oe),-B[1]),x(i(G,V),F[1]))),z[2]),x(w(x(i(Le,H),I[1]),w(x(i(me,$),-B[1]),x(i(G,V),z[1]))),-F[2]))),_[3])),w(x(w(w(x(w(x(i(nt,de),B[1]),w(x(i(Ke,ae),-_[1]),x(i(ie,re),F[1]))),I[2]),x(w(x(i(nt,de),I[1]),w(x(i(Ze,oe),-_[1]),x(i(Y,j),F[1]))),-B[2])),w(x(w(x(i(Ke,ae),I[1]),w(x(i(Ze,oe),-B[1]),x(i(G,V),F[1]))),_[2]),x(w(x(i(ie,re),I[1]),w(x(i(Y,j),-B[1]),x(i(G,V),_[1]))),-F[2]))),-z[3]),x(w(w(x(w(x(i(ve,ne),B[1]),w(x(i(Le,H),-_[1]),x(i(ie,re),z[1]))),I[2]),x(w(x(i(ve,ne),I[1]),w(x(i(me,$),-_[1]),x(i(Y,j),z[1]))),-B[2])),w(x(w(x(i(Le,H),I[1]),w(x(i(me,$),-B[1]),x(i(G,V),z[1]))),_[2]),x(w(x(i(ie,re),I[1]),w(x(i(Y,j),-B[1]),x(i(G,V),_[1]))),-z[2]))),F[3]))))),xt=w(w(w(x(w(w(x(w(x(i(lt,et),z[1]),w(x(i(it,ye),-O[1]),x(i(Ne,Ae),F[1]))),_[2]),x(w(x(i(lt,et),_[1]),w(x(i(nt,de),-O[1]),x(i(Ie,le),F[1]))),-z[2])),w(x(w(x(i(it,ye),_[1]),w(x(i(nt,de),-z[1]),x(i(ve,ne),F[1]))),O[2]),x(w(x(i(Ne,Ae),_[1]),w(x(i(Ie,le),-z[1]),x(i(ve,ne),O[1]))),-F[2]))),I[3]),w(x(w(w(x(w(x(i(lt,et),z[1]),w(x(i(it,ye),-O[1]),x(i(Ne,Ae),F[1]))),I[2]),x(w(x(i(lt,et),I[1]),w(x(i(Ze,oe),-O[1]),x(i(_e,q),F[1]))),-z[2])),w(x(w(x(i(it,ye),I[1]),w(x(i(Ze,oe),-z[1]),x(i(me,$),F[1]))),O[2]),x(w(x(i(Ne,Ae),I[1]),w(x(i(_e,q),-z[1]),x(i(me,$),O[1]))),-F[2]))),-_[3]),x(w(w(x(w(x(i(lt,et),_[1]),w(x(i(nt,de),-O[1]),x(i(Ie,le),F[1]))),I[2]),x(w(x(i(lt,et),I[1]),w(x(i(Ze,oe),-O[1]),x(i(_e,q),F[1]))),-_[2])),w(x(w(x(i(nt,de),I[1]),w(x(i(Ze,oe),-_[1]),x(i(Y,j),F[1]))),O[2]),x(w(x(i(Ie,le),I[1]),w(x(i(_e,q),-_[1]),x(i(Y,j),O[1]))),-F[2]))),z[3]))),w(w(x(w(w(x(w(x(i(it,ye),_[1]),w(x(i(nt,de),-z[1]),x(i(ve,ne),F[1]))),I[2]),x(w(x(i(it,ye),I[1]),w(x(i(Ze,oe),-z[1]),x(i(me,$),F[1]))),-_[2])),w(x(w(x(i(nt,de),I[1]),w(x(i(Ze,oe),-_[1]),x(i(Y,j),F[1]))),z[2]),x(w(x(i(ve,ne),I[1]),w(x(i(me,$),-_[1]),x(i(Y,j),z[1]))),-F[2]))),-O[3]),x(w(w(x(w(x(i(Ne,Ae),_[1]),w(x(i(Ie,le),-z[1]),x(i(ve,ne),O[1]))),I[2]),x(w(x(i(Ne,Ae),I[1]),w(x(i(_e,q),-z[1]),x(i(me,$),O[1]))),-_[2])),w(x(w(x(i(Ie,le),I[1]),w(x(i(_e,q),-_[1]),x(i(Y,j),O[1]))),z[2]),x(w(x(i(ve,ne),I[1]),w(x(i(me,$),-_[1]),x(i(Y,j),z[1]))),-O[2]))),F[3])),w(x(w(w(x(w(x(i(lt,et),_[1]),w(x(i(nt,de),-O[1]),x(i(Ie,le),F[1]))),B[2]),x(w(x(i(lt,et),B[1]),w(x(i(Ke,ae),-O[1]),x(i(ze,J),F[1]))),-_[2])),w(x(w(x(i(nt,de),B[1]),w(x(i(Ke,ae),-_[1]),x(i(ie,re),F[1]))),O[2]),x(w(x(i(Ie,le),B[1]),w(x(i(ze,J),-_[1]),x(i(ie,re),O[1]))),-F[2]))),I[3]),x(w(w(x(w(x(i(lt,et),_[1]),w(x(i(nt,de),-O[1]),x(i(Ie,le),F[1]))),I[2]),x(w(x(i(lt,et),I[1]),w(x(i(Ze,oe),-O[1]),x(i(_e,q),F[1]))),-_[2])),w(x(w(x(i(nt,de),I[1]),w(x(i(Ze,oe),-_[1]),x(i(Y,j),F[1]))),O[2]),x(w(x(i(Ie,le),I[1]),w(x(i(_e,q),-_[1]),x(i(Y,j),O[1]))),-F[2]))),-B[3])))),w(w(w(x(w(w(x(w(x(i(lt,et),B[1]),w(x(i(Ke,ae),-O[1]),x(i(ze,J),F[1]))),I[2]),x(w(x(i(lt,et),I[1]),w(x(i(Ze,oe),-O[1]),x(i(_e,q),F[1]))),-B[2])),w(x(w(x(i(Ke,ae),I[1]),w(x(i(Ze,oe),-B[1]),x(i(G,V),F[1]))),O[2]),x(w(x(i(ze,J),I[1]),w(x(i(_e,q),-B[1]),x(i(G,V),O[1]))),-F[2]))),_[3]),x(w(w(x(w(x(i(nt,de),B[1]),w(x(i(Ke,ae),-_[1]),x(i(ie,re),F[1]))),I[2]),x(w(x(i(nt,de),I[1]),w(x(i(Ze,oe),-_[1]),x(i(Y,j),F[1]))),-B[2])),w(x(w(x(i(Ke,ae),I[1]),w(x(i(Ze,oe),-B[1]),x(i(G,V),F[1]))),_[2]),x(w(x(i(ie,re),I[1]),w(x(i(Y,j),-B[1]),x(i(G,V),_[1]))),-F[2]))),-O[3])),w(x(w(w(x(w(x(i(Ie,le),B[1]),w(x(i(ze,J),-_[1]),x(i(ie,re),O[1]))),I[2]),x(w(x(i(Ie,le),I[1]),w(x(i(_e,q),-_[1]),x(i(Y,j),O[1]))),-B[2])),w(x(w(x(i(ze,J),I[1]),w(x(i(_e,q),-B[1]),x(i(G,V),O[1]))),_[2]),x(w(x(i(ie,re),I[1]),w(x(i(Y,j),-B[1]),x(i(G,V),_[1]))),-O[2]))),F[3]),x(w(w(x(w(x(i(Ne,Ae),_[1]),w(x(i(Ie,le),-z[1]),x(i(ve,ne),O[1]))),B[2]),x(w(x(i(Ne,Ae),B[1]),w(x(i(ze,J),-z[1]),x(i(Le,H),O[1]))),-_[2])),w(x(w(x(i(Ie,le),B[1]),w(x(i(ze,J),-_[1]),x(i(ie,re),O[1]))),z[2]),x(w(x(i(ve,ne),B[1]),w(x(i(Le,H),-_[1]),x(i(ie,re),z[1]))),-O[2]))),I[3]))),w(w(x(w(w(x(w(x(i(Ne,Ae),_[1]),w(x(i(Ie,le),-z[1]),x(i(ve,ne),O[1]))),I[2]),x(w(x(i(Ne,Ae),I[1]),w(x(i(_e,q),-z[1]),x(i(me,$),O[1]))),-_[2])),w(x(w(x(i(Ie,le),I[1]),w(x(i(_e,q),-_[1]),x(i(Y,j),O[1]))),z[2]),x(w(x(i(ve,ne),I[1]),w(x(i(me,$),-_[1]),x(i(Y,j),z[1]))),-O[2]))),-B[3]),x(w(w(x(w(x(i(Ne,Ae),B[1]),w(x(i(ze,J),-z[1]),x(i(Le,H),O[1]))),I[2]),x(w(x(i(Ne,Ae),I[1]),w(x(i(_e,q),-z[1]),x(i(me,$),O[1]))),-B[2])),w(x(w(x(i(ze,J),I[1]),w(x(i(_e,q),-B[1]),x(i(G,V),O[1]))),z[2]),x(w(x(i(Le,H),I[1]),w(x(i(me,$),-B[1]),x(i(G,V),z[1]))),-O[2]))),_[3])),w(x(w(w(x(w(x(i(Ie,le),B[1]),w(x(i(ze,J),-_[1]),x(i(ie,re),O[1]))),I[2]),x(w(x(i(Ie,le),I[1]),w(x(i(_e,q),-_[1]),x(i(Y,j),O[1]))),-B[2])),w(x(w(x(i(ze,J),I[1]),w(x(i(_e,q),-B[1]),x(i(G,V),O[1]))),_[2]),x(w(x(i(ie,re),I[1]),w(x(i(Y,j),-B[1]),x(i(G,V),_[1]))),-O[2]))),-z[3]),x(w(w(x(w(x(i(ve,ne),B[1]),w(x(i(Le,H),-_[1]),x(i(ie,re),z[1]))),I[2]),x(w(x(i(ve,ne),I[1]),w(x(i(me,$),-_[1]),x(i(Y,j),z[1]))),-B[2])),w(x(w(x(i(Le,H),I[1]),w(x(i(me,$),-B[1]),x(i(G,V),z[1]))),_[2]),x(w(x(i(ie,re),I[1]),w(x(i(Y,j),-B[1]),x(i(G,V),_[1]))),-z[2]))),O[3]))))),Je=i(vt,xt);return Je[Je.length-1]}return k}var b=[y,h,T];function E(w){var i=b[w.length];return i||(i=b[w.length]=l(w.length)),i.apply(void 0,w)}function p(w,i,C,x,k,I,B,_){function z(O,F,N,V,j,$){switch(arguments.length){case 0:case 1:return 0;case 2:return x(O,F);case 3:return k(O,F,N);case 4:return I(O,F,N,V);case 5:return B(O,F,N,V,j);case 6:return _(O,F,N,V,j,$)}for(var q=new Array(arguments.length),oe=0;oe<arguments.length;++oe)q[oe]=arguments[oe];return w(q)}return z}function S(){for(;b.length<=u;)b.push(l(b.length));d.exports=p.apply(void 0,[E].concat(b));for(var w=0;w<=u;++w)d.exports[w]=b[w]}S()},6606:function(d,g,r){var t=r(8167),s=6;function a(b){var E=b===2?l:b===3?y:b===4?h:b===5?T:f;return b<6?E(t[b]):E(t)}function c(){return[[0]]}function u(b,E){return[[E[0]],[b[0][0]]]}function l(b){return function(p,S){return[b([[+S[0],+p[0][1]],[+S[1],+p[1][1]]]),b([[+p[0][0],+S[0]],[+p[1][0],+S[1]]]),b(p)]}}function y(b){return function(p,S){return[b([[+S[0],+p[0][1],+p[0][2]],[+S[1],+p[1][1],+p[1][2]],[+S[2],+p[2][1],+p[2][2]]]),b([[+p[0][0],+S[0],+p[0][2]],[+p[1][0],+S[1],+p[1][2]],[+p[2][0],+S[2],+p[2][2]]]),b([[+p[0][0],+p[0][1],+S[0]],[+p[1][0],+p[1][1],+S[1]],[+p[2][0],+p[2][1],+S[2]]]),b(p)]}}function h(b){return function(p,S){return[b([[+S[0],+p[0][1],+p[0][2],+p[0][3]],[+S[1],+p[1][1],+p[1][2],+p[1][3]],[+S[2],+p[2][1],+p[2][2],+p[2][3]],[+S[3],+p[3][1],+p[3][2],+p[3][3]]]),b([[+p[0][0],+S[0],+p[0][2],+p[0][3]],[+p[1][0],+S[1],+p[1][2],+p[1][3]],[+p[2][0],+S[2],+p[2][2],+p[2][3]],[+p[3][0],+S[3],+p[3][2],+p[3][3]]]),b([[+p[0][0],+p[0][1],+S[0],+p[0][3]],[+p[1][0],+p[1][1],+S[1],+p[1][3]],[+p[2][0],+p[2][1],+S[2],+p[2][3]],[+p[3][0],+p[3][1],+S[3],+p[3][3]]]),b([[+p[0][0],+p[0][1],+p[0][2],+S[0]],[+p[1][0],+p[1][1],+p[1][2],+S[1]],[+p[2][0],+p[2][1],+p[2][2],+S[2]],[+p[3][0],+p[3][1],+p[3][2],+S[3]]]),b(p)]}}function T(b){return function(p,S){return[b([[+S[0],+p[0][1],+p[0][2],+p[0][3],+p[0][4]],[+S[1],+p[1][1],+p[1][2],+p[1][3],+p[1][4]],[+S[2],+p[2][1],+p[2][2],+p[2][3],+p[2][4]],[+S[3],+p[3][1],+p[3][2],+p[3][3],+p[3][4]],[+S[4],+p[4][1],+p[4][2],+p[4][3],+p[4][4]]]),b([[+p[0][0],+S[0],+p[0][2],+p[0][3],+p[0][4]],[+p[1][0],+S[1],+p[1][2],+p[1][3],+p[1][4]],[+p[2][0],+S[2],+p[2][2],+p[2][3],+p[2][4]],[+p[3][0],+S[3],+p[3][2],+p[3][3],+p[3][4]],[+p[4][0],+S[4],+p[4][2],+p[4][3],+p[4][4]]]),b([[+p[0][0],+p[0][1],+S[0],+p[0][3],+p[0][4]],[+p[1][0],+p[1][1],+S[1],+p[1][3],+p[1][4]],[+p[2][0],+p[2][1],+S[2],+p[2][3],+p[2][4]],[+p[3][0],+p[3][1],+S[3],+p[3][3],+p[3][4]],[+p[4][0],+p[4][1],+S[4],+p[4][3],+p[4][4]]]),b([[+p[0][0],+p[0][1],+p[0][2],+S[0],+p[0][4]],[+p[1][0],+p[1][1],+p[1][2],+S[1],+p[1][4]],[+p[2][0],+p[2][1],+p[2][2],+S[2],+p[2][4]],[+p[3][0],+p[3][1],+p[3][2],+S[3],+p[3][4]],[+p[4][0],+p[4][1],+p[4][2],+S[4],+p[4][4]]]),b([[+p[0][0],+p[0][1],+p[0][2],+p[0][3],+S[0]],[+p[1][0],+p[1][1],+p[1][2],+p[1][3],+S[1]],[+p[2][0],+p[2][1],+p[2][2],+p[2][3],+S[2]],[+p[3][0],+p[3][1],+p[3][2],+p[3][3],+S[3]],[+p[4][0],+p[4][1],+p[4][2],+p[4][3],+S[4]]]),b(p)]}}function f(b){return function(p,S){return[b([[+S[0],+p[0][1],+p[0][2],+p[0][3],+p[0][4],+p[0][5]],[+S[1],+p[1][1],+p[1][2],+p[1][3],+p[1][4],+p[1][5]],[+S[2],+p[2][1],+p[2][2],+p[2][3],+p[2][4],+p[2][5]],[+S[3],+p[3][1],+p[3][2],+p[3][3],+p[3][4],+p[3][5]],[+S[4],+p[4][1],+p[4][2],+p[4][3],+p[4][4],+p[4][5]],[+S[5],+p[5][1],+p[5][2],+p[5][3],+p[5][4],+p[5][5]]]),b([[+p[0][0],+S[0],+p[0][2],+p[0][3],+p[0][4],+p[0][5]],[+p[1][0],+S[1],+p[1][2],+p[1][3],+p[1][4],+p[1][5]],[+p[2][0],+S[2],+p[2][2],+p[2][3],+p[2][4],+p[2][5]],[+p[3][0],+S[3],+p[3][2],+p[3][3],+p[3][4],+p[3][5]],[+p[4][0],+S[4],+p[4][2],+p[4][3],+p[4][4],+p[4][5]],[+p[5][0],+S[5],+p[5][2],+p[5][3],+p[5][4],+p[5][5]]]),b([[+p[0][0],+p[0][1],+S[0],+p[0][3],+p[0][4],+p[0][5]],[+p[1][0],+p[1][1],+S[1],+p[1][3],+p[1][4],+p[1][5]],[+p[2][0],+p[2][1],+S[2],+p[2][3],+p[2][4],+p[2][5]],[+p[3][0],+p[3][1],+S[3],+p[3][3],+p[3][4],+p[3][5]],[+p[4][0],+p[4][1],+S[4],+p[4][3],+p[4][4],+p[4][5]],[+p[5][0],+p[5][1],+S[5],+p[5][3],+p[5][4],+p[5][5]]]),b([[+p[0][0],+p[0][1],+p[0][2],+S[0],+p[0][4],+p[0][5]],[+p[1][0],+p[1][1],+p[1][2],+S[1],+p[1][4],+p[1][5]],[+p[2][0],+p[2][1],+p[2][2],+S[2],+p[2][4],+p[2][5]],[+p[3][0],+p[3][1],+p[3][2],+S[3],+p[3][4],+p[3][5]],[+p[4][0],+p[4][1],+p[4][2],+S[4],+p[4][4],+p[4][5]],[+p[5][0],+p[5][1],+p[5][2],+S[5],+p[5][4],+p[5][5]]]),b([[+p[0][0],+p[0][1],+p[0][2],+p[0][3],+S[0],+p[0][5]],[+p[1][0],+p[1][1],+p[1][2],+p[1][3],+S[1],+p[1][5]],[+p[2][0],+p[2][1],+p[2][2],+p[2][3],+S[2],+p[2][5]],[+p[3][0],+p[3][1],+p[3][2],+p[3][3],+S[3],+p[3][5]],[+p[4][0],+p[4][1],+p[4][2],+p[4][3],+S[4],+p[4][5]],[+p[5][0],+p[5][1],+p[5][2],+p[5][3],+S[5],+p[5][5]]]),b([[+p[0][0],+p[0][1],+p[0][2],+p[0][3],+p[0][4],+S[0]],[+p[1][0],+p[1][1],+p[1][2],+p[1][3],+p[1][4],+S[1]],[+p[2][0],+p[2][1],+p[2][2],+p[2][3],+p[2][4],+S[2]],[+p[3][0],+p[3][1],+p[3][2],+p[3][3],+p[3][4],+S[3]],[+p[4][0],+p[4][1],+p[4][2],+p[4][3],+p[4][4],+S[4]],[+p[5][0],+p[5][1],+p[5][2],+p[5][3],+p[5][4],+S[5]]]),b(p)]}}var n=[c,u];function v(b,E,p,S,w,i,C,x){return function(I,B){switch(I.length){case 0:return b(I,B);case 1:return E(I,B);case 2:return p(I,B);case 3:return S(I,B);case 4:return w(I,B);case 5:return i(I,B)}var _=C[I.length];return _||(_=C[I.length]=x(I.length)),_(I,B)}}function m(){for(;n.length<s;)n.push(a(n.length));d.exports=v.apply(void 0,n.concat([n,a]));for(var b=0;b<s;++b)d.exports[b]=n[b]}m()},417:function(d,g,r){var t=r(9660),s=r(9662),a=r(8289),c=r(4078),u=5,l=11102230246251565e-32,y=(3+16*l)*l,h=(7+56*l)*l;function T(i,C,x,k){return function(B,_,z){var O=i(i(C(_[1],z[0]),C(-z[1],_[0])),i(C(B[1],_[0]),C(-_[1],B[0]))),F=i(C(B[1],z[0]),C(-z[1],B[0])),N=k(O,F);return N[N.length-1]}}function f(i,C,x,k){return function(B,_,z,O){var F=i(i(x(i(C(z[1],O[0]),C(-O[1],z[0])),_[2]),i(x(i(C(_[1],O[0]),C(-O[1],_[0])),-z[2]),x(i(C(_[1],z[0]),C(-z[1],_[0])),O[2]))),i(x(i(C(_[1],O[0]),C(-O[1],_[0])),B[2]),i(x(i(C(B[1],O[0]),C(-O[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),O[2])))),N=i(i(x(i(C(z[1],O[0]),C(-O[1],z[0])),B[2]),i(x(i(C(B[1],O[0]),C(-O[1],B[0])),-z[2]),x(i(C(B[1],z[0]),C(-z[1],B[0])),O[2]))),i(x(i(C(_[1],z[0]),C(-z[1],_[0])),B[2]),i(x(i(C(B[1],z[0]),C(-z[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),z[2])))),V=k(F,N);return V[V.length-1]}}function n(i,C,x,k){return function(B,_,z,O,F){var N=i(i(i(x(i(x(i(C(O[1],F[0]),C(-F[1],O[0])),z[2]),i(x(i(C(z[1],F[0]),C(-F[1],z[0])),-O[2]),x(i(C(z[1],O[0]),C(-O[1],z[0])),F[2]))),_[3]),i(x(i(x(i(C(O[1],F[0]),C(-F[1],O[0])),_[2]),i(x(i(C(_[1],F[0]),C(-F[1],_[0])),-O[2]),x(i(C(_[1],O[0]),C(-O[1],_[0])),F[2]))),-z[3]),x(i(x(i(C(z[1],F[0]),C(-F[1],z[0])),_[2]),i(x(i(C(_[1],F[0]),C(-F[1],_[0])),-z[2]),x(i(C(_[1],z[0]),C(-z[1],_[0])),F[2]))),O[3]))),i(x(i(x(i(C(z[1],O[0]),C(-O[1],z[0])),_[2]),i(x(i(C(_[1],O[0]),C(-O[1],_[0])),-z[2]),x(i(C(_[1],z[0]),C(-z[1],_[0])),O[2]))),-F[3]),i(x(i(x(i(C(O[1],F[0]),C(-F[1],O[0])),_[2]),i(x(i(C(_[1],F[0]),C(-F[1],_[0])),-O[2]),x(i(C(_[1],O[0]),C(-O[1],_[0])),F[2]))),B[3]),x(i(x(i(C(O[1],F[0]),C(-F[1],O[0])),B[2]),i(x(i(C(B[1],F[0]),C(-F[1],B[0])),-O[2]),x(i(C(B[1],O[0]),C(-O[1],B[0])),F[2]))),-_[3])))),i(i(x(i(x(i(C(_[1],F[0]),C(-F[1],_[0])),B[2]),i(x(i(C(B[1],F[0]),C(-F[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),F[2]))),O[3]),i(x(i(x(i(C(_[1],O[0]),C(-O[1],_[0])),B[2]),i(x(i(C(B[1],O[0]),C(-O[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),O[2]))),-F[3]),x(i(x(i(C(z[1],O[0]),C(-O[1],z[0])),_[2]),i(x(i(C(_[1],O[0]),C(-O[1],_[0])),-z[2]),x(i(C(_[1],z[0]),C(-z[1],_[0])),O[2]))),B[3]))),i(x(i(x(i(C(z[1],O[0]),C(-O[1],z[0])),B[2]),i(x(i(C(B[1],O[0]),C(-O[1],B[0])),-z[2]),x(i(C(B[1],z[0]),C(-z[1],B[0])),O[2]))),-_[3]),i(x(i(x(i(C(_[1],O[0]),C(-O[1],_[0])),B[2]),i(x(i(C(B[1],O[0]),C(-O[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),O[2]))),z[3]),x(i(x(i(C(_[1],z[0]),C(-z[1],_[0])),B[2]),i(x(i(C(B[1],z[0]),C(-z[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),z[2]))),-O[3]))))),V=i(i(i(x(i(x(i(C(O[1],F[0]),C(-F[1],O[0])),z[2]),i(x(i(C(z[1],F[0]),C(-F[1],z[0])),-O[2]),x(i(C(z[1],O[0]),C(-O[1],z[0])),F[2]))),B[3]),x(i(x(i(C(O[1],F[0]),C(-F[1],O[0])),B[2]),i(x(i(C(B[1],F[0]),C(-F[1],B[0])),-O[2]),x(i(C(B[1],O[0]),C(-O[1],B[0])),F[2]))),-z[3])),i(x(i(x(i(C(z[1],F[0]),C(-F[1],z[0])),B[2]),i(x(i(C(B[1],F[0]),C(-F[1],B[0])),-z[2]),x(i(C(B[1],z[0]),C(-z[1],B[0])),F[2]))),O[3]),x(i(x(i(C(z[1],O[0]),C(-O[1],z[0])),B[2]),i(x(i(C(B[1],O[0]),C(-O[1],B[0])),-z[2]),x(i(C(B[1],z[0]),C(-z[1],B[0])),O[2]))),-F[3]))),i(i(x(i(x(i(C(z[1],F[0]),C(-F[1],z[0])),_[2]),i(x(i(C(_[1],F[0]),C(-F[1],_[0])),-z[2]),x(i(C(_[1],z[0]),C(-z[1],_[0])),F[2]))),B[3]),x(i(x(i(C(z[1],F[0]),C(-F[1],z[0])),B[2]),i(x(i(C(B[1],F[0]),C(-F[1],B[0])),-z[2]),x(i(C(B[1],z[0]),C(-z[1],B[0])),F[2]))),-_[3])),i(x(i(x(i(C(_[1],F[0]),C(-F[1],_[0])),B[2]),i(x(i(C(B[1],F[0]),C(-F[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),F[2]))),z[3]),x(i(x(i(C(_[1],z[0]),C(-z[1],_[0])),B[2]),i(x(i(C(B[1],z[0]),C(-z[1],B[0])),-_[2]),x(i(C(B[1],_[0]),C(-_[1],B[0])),z[2]))),-F[3])))),j=k(N,V);return j[j.length-1]}}function v(i){var C=i===3?T:i===4?f:n;return C(s,t,a,c)}var m=v(3),b=v(4),E=[function(){return 0},function(){return 0},function(C,x){return x[0]-C[0]},function(C,x,k){var I=(C[1]-k[1])*(x[0]-k[0]),B=(C[0]-k[0])*(x[1]-k[1]),_=I-B,z;if(I>0){if(B<=0)return _;z=I+B}else if(I<0){if(B>=0)return _;z=-(I+B)}else return _;var O=y*z;return _>=O||_<=-O?_:m(C,x,k)},function(C,x,k,I){var B=C[0]-I[0],_=x[0]-I[0],z=k[0]-I[0],O=C[1]-I[1],F=x[1]-I[1],N=k[1]-I[1],V=C[2]-I[2],j=x[2]-I[2],$=k[2]-I[2],q=_*N,oe=z*F,Z=z*O,G=B*N,re=B*F,H=_*O,J=V*(q-oe)+j*(Z-G)+$*(re-H),ae=(Math.abs(q)+Math.abs(oe))*Math.abs(V)+(Math.abs(Z)+Math.abs(G))*Math.abs(j)+(Math.abs(re)+Math.abs(H))*Math.abs($),K=h*ae;return J>K||-J>K?J:b(C,x,k,I)}];function p(i){var C=E[i.length];return C||(C=E[i.length]=v(i.length)),C.apply(void 0,i)}function S(i,C,x,k,I,B,_){return function(O,F,N,V,j){switch(arguments.length){case 0:case 1:return 0;case 2:return k(O,F);case 3:return I(O,F,N);case 4:return B(O,F,N,V);case 5:return _(O,F,N,V,j)}for(var $=new Array(arguments.length),q=0;q<arguments.length;++q)$[q]=arguments[q];return i($)}}function w(){for(;E.length<=u;)E.push(v(E.length));d.exports=S.apply(void 0,[p].concat(E));for(var i=0;i<=u;++i)d.exports[i]=E[i]}w()},2019:function(d,g,r){var t=r(9662),s=r(8289);d.exports=a;function a(c,u){if(c.length===1)return s(u,c[0]);if(u.length===1)return s(c,u[0]);if(c.length===0||u.length===0)return[0];var l=[0];if(c.length<u.length)for(var y=0;y<c.length;++y)l=t(l,s(u,c[y]));else for(var y=0;y<u.length;++y)l=t(l,s(c,u[y]));return l}},8289:function(d,g,r){var t=r(9660),s=r(87);d.exports=a;function a(c,u){var l=c.length;if(l===1){var y=t(c[0],u);return y[0]?y:[y[1]]}var h=new Array(2*l),T=[.1,.1],f=[.1,.1],n=0;t(c[0],u,T),T[0]&&(h[n++]=T[0]);for(var v=1;v<l;++v){t(c[v],u,f);var m=T[1];s(m,f[0],T),T[0]&&(h[n++]=T[0]);var b=f[1],E=T[1],p=b+E,S=p-b,w=E-S;T[1]=p,w&&(h[n++]=w)}return T[1]&&(h[n++]=T[1]),n===0&&(h[n++]=0),h.length=n,h}},4434:function(d,g,r){d.exports=a;var t=r(417)[3];function s(c,u,l,y){for(var h=0;h<2;++h){var T=c[h],f=u[h],n=Math.min(T,f),v=Math.max(T,f),m=l[h],b=y[h],E=Math.min(m,b),p=Math.max(m,b);if(p<n||v<E)return!1}return!0}function a(c,u,l,y){var h=t(c,l,y),T=t(u,l,y);if(h>0&&T>0||h<0&&T<0)return!1;var f=t(l,c,u),n=t(y,c,u);return f>0&&n>0||f<0&&n<0?!1:h===0&&T===0&&f===0&&n===0?s(c,u,l,y):!0}},4078:function(d){d.exports=r;function g(t,s){var a=t+s,c=a-t,u=a-c,l=s-c,y=t-u,h=y+l;return h?[h,a]:[a]}function r(t,s){var a=t.length|0,c=s.length|0;if(a===1&&c===1)return g(t[0],-s[0]);var u=a+c,l=new Array(u),y=0,h=0,T=0,f=Math.abs,n=t[h],v=f(n),m=-s[T],b=f(m),E,p;v<b?(p=n,h+=1,h<a&&(n=t[h],v=f(n))):(p=m,T+=1,T<c&&(m=-s[T],b=f(m))),h<a&&v<b||T>=c?(E=n,h+=1,h<a&&(n=t[h],v=f(n))):(E=m,T+=1,T<c&&(m=-s[T],b=f(m)));for(var S=E+p,w=S-E,i=p-w,C=i,x=S,k,I,B,_,z;h<a&&T<c;)v<b?(E=n,h+=1,h<a&&(n=t[h],v=f(n))):(E=m,T+=1,T<c&&(m=-s[T],b=f(m))),p=C,S=E+p,w=S-E,i=p-w,i&&(l[y++]=i),k=x+S,I=k-x,B=k-I,_=S-I,z=x-B,C=z+_,x=k;for(;h<a;)E=n,p=C,S=E+p,w=S-E,i=p-w,i&&(l[y++]=i),k=x+S,I=k-x,B=k-I,_=S-I,z=x-B,C=z+_,x=k,h+=1,h<a&&(n=t[h]);for(;T<c;)E=m,p=C,S=E+p,w=S-E,i=p-w,i&&(l[y++]=i),k=x+S,I=k-x,B=k-I,_=S-I,z=x-B,C=z+_,x=k,T+=1,T<c&&(m=-s[T]);return C&&(l[y++]=C),x&&(l[y++]=x),y||(l[y++]=0),l.length=y,l}},9662:function(d){d.exports=r;function g(t,s){var a=t+s,c=a-t,u=a-c,l=s-c,y=t-u,h=y+l;return h?[h,a]:[a]}function r(t,s){var a=t.length|0,c=s.length|0;if(a===1&&c===1)return g(t[0],s[0]);var u=a+c,l=new Array(u),y=0,h=0,T=0,f=Math.abs,n=t[h],v=f(n),m=s[T],b=f(m),E,p;v<b?(p=n,h+=1,h<a&&(n=t[h],v=f(n))):(p=m,T+=1,T<c&&(m=s[T],b=f(m))),h<a&&v<b||T>=c?(E=n,h+=1,h<a&&(n=t[h],v=f(n))):(E=m,T+=1,T<c&&(m=s[T],b=f(m)));for(var S=E+p,w=S-E,i=p-w,C=i,x=S,k,I,B,_,z;h<a&&T<c;)v<b?(E=n,h+=1,h<a&&(n=t[h],v=f(n))):(E=m,T+=1,T<c&&(m=s[T],b=f(m))),p=C,S=E+p,w=S-E,i=p-w,i&&(l[y++]=i),k=x+S,I=k-x,B=k-I,_=S-I,z=x-B,C=z+_,x=k;for(;h<a;)E=n,p=C,S=E+p,w=S-E,i=p-w,i&&(l[y++]=i),k=x+S,I=k-x,B=k-I,_=S-I,z=x-B,C=z+_,x=k,h+=1,h<a&&(n=t[h]);for(;T<c;)E=m,p=C,S=E+p,w=S-E,i=p-w,i&&(l[y++]=i),k=x+S,I=k-x,B=k-I,_=S-I,z=x-B,C=z+_,x=k,T+=1,T<c&&(m=s[T]);return C&&(l[y++]=C),x&&(l[y++]=x),y||(l[y++]=0),l.length=y,l}},8691:function(d,g,r){d.exports=a;var t=r(2692),s=r(7037);function a(c){return s(t(c))}},7212:function(d,g,r){d.exports=n;var t=r(5050),s=r(5306),a=r(8729),c=r(1168);function u(v){for(var m=v.length,b=0,E=0;E<m;++E)b=Math.max(b,v[E].length)|0;return b-1}function l(v,m){for(var b=v.length,E=s.mallocUint8(b),p=0;p<b;++p)E[p]=v[p]<m|0;return E}function y(v,m){for(var b=v.length,E=m*(m+1)/2*b|0,p=s.mallocUint32(E*2),S=0,w=0;w<b;++w)for(var i=v[w],m=i.length,C=0;C<m;++C)for(var x=0;x<C;++x){var k=i[x],I=i[C];p[S++]=Math.min(k,I)|0,p[S++]=Math.max(k,I)|0}var B=S/2|0;a(t(p,[B,2]));for(var _=2,w=2;w<S;w+=2)p[w-2]===p[w]&&p[w-1]===p[w+1]||(p[_++]=p[w],p[_++]=p[w+1]);return t(p,[_/2|0,2])}function h(v,m,b,E){for(var p=v.data,S=v.shape[0],w=s.mallocDouble(S),i=0,C=0;C<S;++C){var x=p[2*C],k=p[2*C+1];if(b[x]!==b[k]){var I=m[x],B=m[k];p[2*i]=x,p[2*i+1]=k,w[i++]=(B-E)/(B-I)}}return v.shape[0]=i,t(w,[i])}function T(v,m){var b=s.mallocInt32(m*2),E=v.shape[0],p=v.data;b[0]=0;for(var S=0,w=0;w<E;++w){var i=p[2*w];if(i!==S){for(b[2*S+1]=w;++S<i;)b[2*S]=w,b[2*S+1]=w;b[2*S]=w}}for(b[2*S+1]=E;++S<m;)b[2*S]=b[2*S+1]=E;return b}function f(v){for(var m=v.shape[0]|0,b=v.data,E=new Array(m),p=0;p<m;++p)E[p]=[b[2*p],b[2*p+1]];return E}function n(v,m,b,E){b=b||0,typeof E>"u"&&(E=u(v));var p=v.length;if(p===0||E<1)return{cells:[],vertexIds:[],vertexWeights:[]};var S=l(m,+b),w=y(v,E),i=h(w,m,S,+b),C=T(w,m.length|0),x=c(E)(v,w.data,C,S),k=f(w),I=[].slice.call(i.data,0,i.shape[0]);return s.free(S),s.free(w.data),s.free(i.data),s.free(C),{cells:x,vertexIds:k,vertexWeights:I}}},1168:function(d){d.exports=r;var g=[function(){function s(a,c,u,l){for(var y=a.length,h=[],T=0;T<y;++T){var f=a[T];f.length}return h}return s},function(){function s(c,u,l,y){for(var h=Math.min(l,y)|0,T=Math.max(l,y)|0,f=c[2*h],n=c[2*h+1];f<n;){var v=f+n>>1,m=u[2*v+1];if(m===T)return v;T<m?n=v:f=v+1}return f}function a(c,u,l,y){for(var h=c.length,T=[],f=0;f<h;++f){var n=c[f],v=n.length;if(v===2){var m=(y[n[0]]<<0)+(y[n[1]]<<1);if(m===0||m===3)continue;switch(m){case 0:break;case 1:T.push([s(l,u,n[0],n[1])]);break;case 2:T.push([s(l,u,n[1],n[0])]);break}}}return T}return a},function(){function s(c,u,l,y){for(var h=Math.min(l,y)|0,T=Math.max(l,y)|0,f=c[2*h],n=c[2*h+1];f<n;){var v=f+n>>1,m=u[2*v+1];if(m===T)return v;T<m?n=v:f=v+1}return f}function a(c,u,l,y){for(var h=c.length,T=[],f=0;f<h;++f){var n=c[f],v=n.length;if(v===3){var m=(y[n[0]]<<0)+(y[n[1]]<<1)+(y[n[2]]<<2);if(m===0||m===7)continue;switch(m){case 0:break;case 1:T.push([s(l,u,n[0],n[2]),s(l,u,n[0],n[1])]);break;case 2:T.push([s(l,u,n[1],n[0]),s(l,u,n[1],n[2])]);break;case 3:T.push([s(l,u,n[0],n[2]),s(l,u,n[1],n[2])]);break;case 4:T.push([s(l,u,n[2],n[1]),s(l,u,n[2],n[0])]);break;case 5:T.push([s(l,u,n[2],n[1]),s(l,u,n[0],n[1])]);break;case 6:T.push([s(l,u,n[1],n[0]),s(l,u,n[2],n[0])]);break}}else if(v===2){var m=(y[n[0]]<<0)+(y[n[1]]<<1);if(m===0||m===3)continue;switch(m){case 0:break;case 1:T.push([s(l,u,n[0],n[1])]);break;case 2:T.push([s(l,u,n[1],n[0])]);break}}}return T}return a},function(){function s(c,u,l,y){for(var h=Math.min(l,y)|0,T=Math.max(l,y)|0,f=c[2*h],n=c[2*h+1];f<n;){var v=f+n>>1,m=u[2*v+1];if(m===T)return v;T<m?n=v:f=v+1}return f}function a(c,u,l,y){for(var h=c.length,T=[],f=0;f<h;++f){var n=c[f],v=n.length;if(v===4){var m=(y[n[0]]<<0)+(y[n[1]]<<1)+(y[n[2]]<<2)+(y[n[3]]<<3);if(m===0||m===15)continue;switch(m){case 0:break;case 1:T.push([s(l,u,n[0],n[1]),s(l,u,n[0],n[2]),s(l,u,n[0],n[3])]);break;case 2:T.push([s(l,u,n[1],n[2]),s(l,u,n[1],n[0]),s(l,u,n[1],n[3])]);break;case 3:T.push([s(l,u,n[1],n[2]),s(l,u,n[0],n[2]),s(l,u,n[0],n[3])],[s(l,u,n[1],n[3]),s(l,u,n[1],n[2]),s(l,u,n[0],n[3])]);break;case 4:T.push([s(l,u,n[2],n[0]),s(l,u,n[2],n[1]),s(l,u,n[2],n[3])]);break;case 5:T.push([s(l,u,n[0],n[1]),s(l,u,n[2],n[1]),s(l,u,n[0],n[3])],[s(l,u,n[2],n[1]),s(l,u,n[2],n[3]),s(l,u,n[0],n[3])]);break;case 6:T.push([s(l,u,n[2],n[0]),s(l,u,n[1],n[0]),s(l,u,n[1],n[3])],[s(l,u,n[2],n[3]),s(l,u,n[2],n[0]),s(l,u,n[1],n[3])]);break;case 7:T.push([s(l,u,n[0],n[3]),s(l,u,n[1],n[3]),s(l,u,n[2],n[3])]);break;case 8:T.push([s(l,u,n[3],n[1]),s(l,u,n[3],n[0]),s(l,u,n[3],n[2])]);break;case 9:T.push([s(l,u,n[3],n[1]),s(l,u,n[0],n[1]),s(l,u,n[0],n[2])],[s(l,u,n[3],n[2]),s(l,u,n[3],n[1]),s(l,u,n[0],n[2])]);break;case 10:T.push([s(l,u,n[1],n[0]),s(l,u,n[3],n[0]),s(l,u,n[1],n[2])],[s(l,u,n[3],n[0]),s(l,u,n[3],n[2]),s(l,u,n[1],n[2])]);break;case 11:T.push([s(l,u,n[1],n[2]),s(l,u,n[0],n[2]),s(l,u,n[3],n[2])]);break;case 12:T.push([s(l,u,n[3],n[0]),s(l,u,n[2],n[0]),s(l,u,n[2],n[1])],[s(l,u,n[3],n[1]),s(l,u,n[3],n[0]),s(l,u,n[2],n[1])]);break;case 13:T.push([s(l,u,n[0],n[1]),s(l,u,n[2],n[1]),s(l,u,n[3],n[1])]);break;case 14:T.push([s(l,u,n[2],n[0]),s(l,u,n[1],n[0]),s(l,u,n[3],n[0])]);break}}else if(v===3){var m=(y[n[0]]<<0)+(y[n[1]]<<1)+(y[n[2]]<<2);if(m===0||m===7)continue;switch(m){case 0:break;case 1:T.push([s(l,u,n[0],n[2]),s(l,u,n[0],n[1])]);break;case 2:T.push([s(l,u,n[1],n[0]),s(l,u,n[1],n[2])]);break;case 3:T.push([s(l,u,n[0],n[2]),s(l,u,n[1],n[2])]);break;case 4:T.push([s(l,u,n[2],n[1]),s(l,u,n[2],n[0])]);break;case 5:T.push([s(l,u,n[2],n[1]),s(l,u,n[0],n[1])]);break;case 6:T.push([s(l,u,n[1],n[0]),s(l,u,n[2],n[0])]);break}}else if(v===2){var m=(y[n[0]]<<0)+(y[n[1]]<<1);if(m===0||m===3)continue;switch(m){case 0:break;case 1:T.push([s(l,u,n[0],n[1])]);break;case 2:T.push([s(l,u,n[1],n[0])]);break}}}return T}return a}];function r(t){return g[t]()}},8211:function(d,g,r){r(2288),r(1731);function t(s,a){var c=s.length,u=s.length-a.length,l=Math.min;if(u)return u;switch(c){case 0:return 0;case 1:return s[0]-a[0];case 2:var n=s[0]+s[1]-a[0]-a[1];return n||l(s[0],s[1])-l(a[0],a[1]);case 3:var y=s[0]+s[1],h=a[0]+a[1];if(n=y+s[2]-(h+a[2]),n)return n;var T=l(s[0],s[1]),f=l(a[0],a[1]),n=l(T,s[2])-l(f,a[2]);return n||l(T+s[2],y)-l(f+a[2],h);default:var v=s.slice(0);v.sort();var m=a.slice(0);m.sort();for(var b=0;b<c;++b)if(u=v[b]-m[b],u)return u;return 0}}g.H=t},9392:function(d,g){"use restrict";var r=32;g.INT_BITS=r,g.INT_MAX=2147483647,g.INT_MIN=-1<<r-1,g.sign=function(a){return(a>0)-(a<0)},g.abs=function(a){var c=a>>r-1;return(a^c)-c},g.min=function(a,c){return c^(a^c)&-(a<c)},g.max=function(a,c){return a^(a^c)&-(a<c)},g.isPow2=function(a){return!(a&a-1)&&!!a},g.log2=function(a){var c,u;return c=(a>65535)<<4,a>>>=c,u=(a>255)<<3,a>>>=u,c|=u,u=(a>15)<<2,a>>>=u,c|=u,u=(a>3)<<1,a>>>=u,c|=u,c|a>>1},g.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},g.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function t(a){var c=32;return a&=-a,a&&c--,a&65535&&(c-=16),a&16711935&&(c-=8),a&252645135&&(c-=4),a&858993459&&(c-=2),a&1431655765&&(c-=1),c}g.countTrailingZeros=t,g.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},g.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},g.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var s=new Array(256);(function(a){for(var c=0;c<256;++c){var u=c,l=c,y=7;for(u>>>=1;u;u>>>=1)l<<=1,l|=u&1,--y;a[c]=l<<y&255}})(s),g.reverse=function(a){return s[a&255]<<24|s[a>>>8&255]<<16|s[a>>>16&255]<<8|s[a>>>24&255]},g.interleave2=function(a,c){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,a|c<<1},g.deinterleave2=function(a,c){return a=a>>>c&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},g.interleave3=function(a,c,u){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,a|=c<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,a|u<<2},g.deinterleave3=function(a,c){return a=a>>>c&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},g.nextCombination=function(a){var c=a|a-1;return c+1|(~c&-~c)-1>>>t(a)+1}},6656:function(d,g,r){"use restrict";var t=r(9392),s=r(9521);function a(i){for(var C=0,x=Math.max,k=0,I=i.length;k<I;++k)C=x(C,i[k].length);return C-1}g.dimension=a;function c(i){for(var C=-1,x=Math.max,k=0,I=i.length;k<I;++k)for(var B=i[k],_=0,z=B.length;_<z;++_)C=x(C,B[_]);return C+1}g.countVertices=c;function u(i){for(var C=new Array(i.length),x=0,k=i.length;x<k;++x)C[x]=i[x].slice(0);return C}g.cloneCells=u;function l(i,C){var x=i.length,k=i.length-C.length,I=Math.min;if(k)return k;switch(x){case 0:return 0;case 1:return i[0]-C[0];case 2:var F=i[0]+i[1]-C[0]-C[1];return F||I(i[0],i[1])-I(C[0],C[1]);case 3:var B=i[0]+i[1],_=C[0]+C[1];if(F=B+i[2]-(_+C[2]),F)return F;var z=I(i[0],i[1]),O=I(C[0],C[1]),F=I(z,i[2])-I(O,C[2]);return F||I(z+i[2],B)-I(O+C[2],_);default:var N=i.slice(0);N.sort();var V=C.slice(0);V.sort();for(var j=0;j<x;++j)if(k=N[j]-V[j],k)return k;return 0}}g.compareCells=l;function y(i,C){return l(i[0],C[0])}function h(i,C){if(C){for(var x=i.length,k=new Array(x),I=0;I<x;++I)k[I]=[i[I],C[I]];k.sort(y);for(var I=0;I<x;++I)i[I]=k[I][0],C[I]=k[I][1];return i}else return i.sort(l),i}g.normalize=h;function T(i){if(i.length===0)return[];for(var C=1,x=i.length,k=1;k<x;++k){var I=i[k];if(l(I,i[k-1])){if(k===C){C++;continue}i[C++]=I}}return i.length=C,i}g.unique=T;function f(i,C){for(var x=0,k=i.length-1,I=-1;x<=k;){var B=x+k>>1,_=l(i[B],C);_<=0?(_===0&&(I=B),x=B+1):_>0&&(k=B-1)}return I}g.findCell=f;function n(i,C){for(var x=new Array(i.length),k=0,I=x.length;k<I;++k)x[k]=[];for(var B=[],k=0,_=C.length;k<_;++k)for(var z=C[k],O=z.length,F=1,N=1<<O;F<N;++F){B.length=t.popCount(F);for(var V=0,j=0;j<O;++j)F&1<<j&&(B[V++]=z[j]);var $=f(i,B);if(!($<0))for(;x[$++].push(k),!($>=i.length||l(i[$],B)!==0););}return x}g.incidence=n;function v(i,C){if(!C)return n(T(b(i,0)),i);for(var x=new Array(C),k=0;k<C;++k)x[k]=[];for(var k=0,I=i.length;k<I;++k)for(var B=i[k],_=0,z=B.length;_<z;++_)x[B[_]].push(k);return x}g.dual=v;function m(i){for(var C=[],x=0,k=i.length;x<k;++x)for(var I=i[x],B=I.length|0,_=1,z=1<<B;_<z;++_){for(var O=[],F=0;F<B;++F)_>>>F&1&&O.push(I[F]);C.push(O)}return h(C)}g.explode=m;function b(i,C){if(C<0)return[];for(var x=[],k=(1<<C+1)-1,I=0;I<i.length;++I)for(var B=i[I],_=k;_<1<<B.length;_=t.nextCombination(_)){for(var z=new Array(C+1),O=0,F=0;F<B.length;++F)_&1<<F&&(z[O++]=B[F]);x.push(z)}return h(x)}g.skeleton=b;function E(i){for(var C=[],x=0,k=i.length;x<k;++x)for(var I=i[x],B=0,_=I.length;B<_;++B){for(var z=new Array(I.length-1),O=0,F=0;O<_;++O)O!==B&&(z[F++]=I[O]);C.push(z)}return h(C)}g.boundary=E;function p(i,C){for(var x=new s(C),k=0;k<i.length;++k)for(var I=i[k],B=0;B<I.length;++B)for(var _=B+1;_<I.length;++_)x.link(I[B],I[_]);for(var z=[],O=x.ranks,k=0;k<O.length;++k)O[k]=-1;for(var k=0;k<i.length;++k){var F=x.find(i[k][0]);O[F]<0?(O[F]=z.length,z.push([i[k].slice(0)])):z[O[F]].push(i[k].slice(0))}return z}function S(i){for(var C=T(h(b(i,0))),x=new s(C.length),k=0;k<i.length;++k)for(var I=i[k],B=0;B<I.length;++B)for(var _=f(C,[I[B]]),z=B+1;z<I.length;++z)x.link(_,f(C,[I[z]]));for(var O=[],F=x.ranks,k=0;k<F.length;++k)F[k]=-1;for(var k=0;k<i.length;++k){var N=x.find(f(C,[i[k][0]]));F[N]<0?(F[N]=O.length,O.push([i[k].slice(0)])):O[F[N]].push(i[k].slice(0))}return O}function w(i,C){return C?p(i,C):S(i)}g.connectedComponents=w},9521:function(d){"use restrict";d.exports=g;function g(r){this.roots=new Array(r),this.ranks=new Array(r);for(var t=0;t<r;++t)this.roots[t]=t,this.ranks[t]=0}g.prototype.length=function(){return this.roots.length},g.prototype.makeSet=function(){var r=this.roots.length;return this.roots.push(r),this.ranks.push(0),r},g.prototype.find=function(r){for(var t=this.roots;t[r]!==r;){var s=t[r];t[r]=t[s],r=s}return r},g.prototype.link=function(r,t){var s=this.find(r),a=this.find(t);if(s!==a){var c=this.ranks,u=this.roots,l=c[s],y=c[a];l<y?u[s]=a:y<l?u[a]=s:(u[a]=s,++c[s])}}},8243:function(d,g,r){d.exports=c;var t=r(417),s=r(6656);function a(u,l,y){var h=Math.abs(t(u,l,y)),T=Math.sqrt(Math.pow(l[0]-y[0],2)+Math.pow(l[1]-y[1],2));return h/T}function c(u,l,y){for(var h=l.length,T=u.length,f=new Array(h),n=new Array(h),v=new Array(h),m=new Array(h),b=0;b<h;++b)f[b]=n[b]=-1,v[b]=1/0,m[b]=!1;for(var b=0;b<T;++b){var E=u[b];if(E.length!==2)throw new Error("Input must be a graph");var p=E[1],S=E[0];n[S]!==-1?n[S]=-2:n[S]=p,f[p]!==-1?f[p]=-2:f[p]=S}function w(Z){if(m[Z])return 1/0;var G=f[Z],re=n[Z];return G<0||re<0?1/0:a(l[Z],l[G],l[re])}function i(Z,G){var re=O[Z],H=O[G];O[Z]=H,O[G]=re,F[re]=G,F[H]=Z}function C(Z){return v[O[Z]]}function x(Z){return Z&1?Z-1>>1:(Z>>1)-1}function k(Z){for(var G=C(Z);;){var re=G,H=2*Z+1,J=2*(Z+1),ae=Z;if(H<V){var K=C(H);K<re&&(ae=H,re=K)}if(J<V){var Y=C(J);Y<re&&(ae=J)}if(ae===Z)return Z;i(Z,ae),Z=ae}}function I(Z){for(var G=C(Z);Z>0;){var re=x(Z);if(re>=0){var H=C(re);if(G<H){i(Z,re),Z=re;continue}}return Z}}function B(){if(V>0){var Z=O[0];return i(0,V-1),V-=1,k(0),Z}return-1}function _(Z,G){var re=O[Z];return v[re]===G?Z:(v[re]=-1/0,I(Z),B(),v[re]=G,V+=1,I(V-1))}function z(Z){if(!m[Z]){m[Z]=!0;var G=f[Z],re=n[Z];f[re]>=0&&(f[re]=G),n[G]>=0&&(n[G]=re),F[G]>=0&&_(F[G],w(G)),F[re]>=0&&_(F[re],w(re))}}for(var O=[],F=new Array(h),b=0;b<h;++b){var N=v[b]=w(b);N<1/0?(F[b]=O.length,O.push(b)):F[b]=-1}for(var V=O.length,b=V>>1;b>=0;--b)k(b);for(;;){var j=B();if(j<0||v[j]>y)break;z(j)}for(var $=[],b=0;b<h;++b)m[b]||(F[b]=$.length,$.push(l[b].slice()));$.length;function q(Z,G){if(Z[G]<0)return G;var re=G,H=G;do{var J=Z[H];if(!m[H]||J<0||J===H||(H=J,J=Z[H],!m[H]||J<0||J===H))break;H=J,re=Z[re]}while(re!==H);for(var ae=G;ae!==H;ae=Z[ae])Z[ae]=H;return H}var oe=[];return u.forEach(function(Z){var G=q(f,Z[0]),re=q(n,Z[1]);if(G>=0&&re>=0&&G!==re){var H=F[G],J=F[re];H!==J&&oe.push([H,J])}}),s.unique(s.normalize(oe)),{positions:$,edges:oe}}},6638:function(d,g,r){d.exports=a;var t=r(417);function s(c,u){var l,y;if(u[0][0]<u[1][0])l=u[0],y=u[1];else if(u[0][0]>u[1][0])l=u[1],y=u[0];else{var h=Math.min(c[0][1],c[1][1]),T=Math.max(c[0][1],c[1][1]),f=Math.min(u[0][1],u[1][1]),n=Math.max(u[0][1],u[1][1]);return T<f?T-f:h>n?h-n:T-n}var v,m;c[0][1]<c[1][1]?(v=c[0],m=c[1]):(v=c[1],m=c[0]);var b=t(y,l,v);return b||(b=t(y,l,m),b)?b:m-y}function a(c,u){var l,y;if(u[0][0]<u[1][0])l=u[0],y=u[1];else if(u[0][0]>u[1][0])l=u[1],y=u[0];else return s(u,c);var h,T;if(c[0][0]<c[1][0])h=c[0],T=c[1];else if(c[0][0]>c[1][0])h=c[1],T=c[0];else return-s(c,u);var f=t(l,y,T),n=t(l,y,h);if(f<0){if(n<=0)return f}else if(f>0){if(n>=0)return f}else if(n)return n;if(f=t(T,h,y),n=t(T,h,l),f<0){if(n<=0)return f}else if(f>0){if(n>=0)return f}else if(n)return n;return y[0]-T[0]}},4385:function(d,g,r){d.exports=n;var t=r(5070),s=r(7080),a=r(417),c=r(6638);function u(v,m,b){this.slabs=v,this.coordinates=m,this.horizontal=b}var l=u.prototype;function y(v,m){return v.y-m}function h(v,m){for(var b=null;v;){var E=v.key,p,S;E[0][0]<E[1][0]?(p=E[0],S=E[1]):(p=E[1],S=E[0]);var w=a(p,S,m);if(w<0)v=v.left;else if(w>0)if(m[0]!==E[1][0])b=v,v=v.right;else{var i=h(v.right,m);if(i)return i;v=v.left}else{if(m[0]!==E[1][0])return v;var i=h(v.right,m);if(i)return i;v=v.left}}return b}l.castUp=function(v){var m=t.le(this.coordinates,v[0]);if(m<0)return-1;this.slabs[m];var b=h(this.slabs[m],v),E=-1;if(b&&(E=b.value),this.coordinates[m]===v[0]){var p=null;if(b&&(p=b.key),m>0){var S=h(this.slabs[m-1],v);S&&(p?c(S.key,p)>0&&(p=S.key,E=S.value):(E=S.value,p=S.key))}var w=this.horizontal[m];if(w.length>0){var i=t.ge(w,v[1],y);if(i<w.length){var C=w[i];if(v[1]===C.y){if(C.closed)return C.index;for(;i<w.length-1&&w[i+1].y===v[1];)if(i=i+1,C=w[i],C.closed)return C.index;if(C.y===v[1]&&!C.start){if(i=i+1,i>=w.length)return E;C=w[i]}}if(C.start)if(p){var x=a(p[0],p[1],[v[0],C.y]);p[0][0]>p[1][0]&&(x=-x),x>0&&(E=C.index)}else E=C.index;else C.y!==v[1]&&(E=C.index)}}}return E};function T(v,m,b,E){this.y=v,this.index=m,this.start=b,this.closed=E}function f(v,m,b,E){this.x=v,this.segment=m,this.create=b,this.index=E}function n(v){for(var m=v.length,b=2*m,E=new Array(b),p=0;p<m;++p){var S=v[p],w=S[0][0]<S[1][0];E[2*p]=new f(S[0][0],S,w,p),E[2*p+1]=new f(S[1][0],S,!w,p)}E.sort(function(z,O){var F=z.x-O.x;return F||(F=z.create-O.create,F)?F:Math.min(z.segment[0][1],z.segment[1][1])-Math.min(O.segment[0][1],O.segment[1][1])});for(var i=s(c),C=[],x=[],k=[],p=0;p<b;){for(var I=E[p].x,B=[];p<b;){var _=E[p];if(_.x!==I)break;p+=1,_.segment[0][0]===_.x&&_.segment[1][0]===_.x?_.create&&(_.segment[0][1]<_.segment[1][1]?(B.push(new T(_.segment[0][1],_.index,!0,!0)),B.push(new T(_.segment[1][1],_.index,!1,!1))):(B.push(new T(_.segment[1][1],_.index,!0,!1)),B.push(new T(_.segment[0][1],_.index,!1,!0)))):_.create?i=i.insert(_.segment,_.index):i=i.remove(_.segment)}C.push(i.root),x.push(I),k.push(B)}return new u(C,x,k)}},4670:function(d,g,r){var t=r(9130),s=r(9662);d.exports=u,d.exports.positive=l,d.exports.negative=y;function a(h,T){var f=s(t(h,T),[T[T.length-1]]);return f[f.length-1]}function c(h,T,f,n){var v=n-T,m=-T/v;m<0?m=0:m>1&&(m=1);for(var b=1-m,E=h.length,p=new Array(E),S=0;S<E;++S)p[S]=m*h[S]+b*f[S];return p}function u(h,T){for(var f=[],n=[],v=a(h[h.length-1],T),m=h[h.length-1],b=h[0],E=0;E<h.length;++E,m=b){b=h[E];var p=a(b,T);if(v<0&&p>0||v>0&&p<0){var S=c(m,p,b,v);f.push(S),n.push(S.slice())}p<0?n.push(b.slice()):p>0?f.push(b.slice()):(f.push(b.slice()),n.push(b.slice())),v=p}return{positive:f,negative:n}}function l(h,T){for(var f=[],n=a(h[h.length-1],T),v=h[h.length-1],m=h[0],b=0;b<h.length;++b,v=m){m=h[b];var E=a(m,T);(n<0&&E>0||n>0&&E<0)&&f.push(c(v,E,m,n)),E>=0&&f.push(m.slice()),n=E}return f}function y(h,T){for(var f=[],n=a(h[h.length-1],T),v=h[h.length-1],m=h[0],b=0;b<h.length;++b,v=m){m=h[b];var E=a(m,T);(n<0&&E>0||n>0&&E<0)&&f.push(c(v,E,m,n)),E<=0&&f.push(m.slice()),n=E}return f}},8974:function(d,g,r){var t;(function(){var s={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 a(h){return u(y(h),arguments)}function c(h,T){return a.apply(null,[h].concat(T||[]))}function u(h,T){var f=1,n=h.length,v,m="",b,E,p,S,w,i,C,x;for(b=0;b<n;b++)if(typeof h[b]=="string")m+=h[b];else if(typeof h[b]=="object"){if(p=h[b],p.keys)for(v=T[f],E=0;E<p.keys.length;E++){if(v==null)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',p.keys[E],p.keys[E-1]));v=v[p.keys[E]]}else p.param_no?v=T[p.param_no]:v=T[f++];if(s.not_type.test(p.type)&&s.not_primitive.test(p.type)&&v instanceof Function&&(v=v()),s.numeric_arg.test(p.type)&&typeof v!="number"&&isNaN(v))throw new TypeError(a("[sprintf] expecting number but found %T",v));switch(s.number.test(p.type)&&(C=v>=0),p.type){case"b":v=parseInt(v,10).toString(2);break;case"c":v=String.fromCharCode(parseInt(v,10));break;case"d":case"i":v=parseInt(v,10);break;case"j":v=JSON.stringify(v,null,p.width?parseInt(p.width):0);break;case"e":v=p.precision?parseFloat(v).toExponential(p.precision):parseFloat(v).toExponential();break;case"f":v=p.precision?parseFloat(v).toFixed(p.precision):parseFloat(v);break;case"g":v=p.precision?String(Number(v.toPrecision(p.precision))):parseFloat(v);break;case"o":v=(parseInt(v,10)>>>0).toString(8);break;case"s":v=String(v),v=p.precision?v.substring(0,p.precision):v;break;case"t":v=String(!!v),v=p.precision?v.substring(0,p.precision):v;break;case"T":v=Object.prototype.toString.call(v).slice(8,-1).toLowerCase(),v=p.precision?v.substring(0,p.precision):v;break;case"u":v=parseInt(v,10)>>>0;break;case"v":v=v.valueOf(),v=p.precision?v.substring(0,p.precision):v;break;case"x":v=(parseInt(v,10)>>>0).toString(16);break;case"X":v=(parseInt(v,10)>>>0).toString(16).toUpperCase();break}s.json.test(p.type)?m+=v:(s.number.test(p.type)&&(!C||p.sign)?(x=C?"+":"-",v=v.toString().replace(s.sign,"")):x="",w=p.pad_char?p.pad_char==="0"?"0":p.pad_char.charAt(1):" ",i=p.width-(x+v).length,S=p.width&&i>0?w.repeat(i):"",m+=p.align?x+v+S:w==="0"?x+S+v:S+x+v)}return m}var l=Object.create(null);function y(h){if(l[h])return l[h];for(var T=h,f,n=[],v=0;T;){if((f=s.text.exec(T))!==null)n.push(f[0]);else if((f=s.modulo.exec(T))!==null)n.push("%");else if((f=s.placeholder.exec(T))!==null){if(f[2]){v|=1;var m=[],b=f[2],E=[];if((E=s.key.exec(b))!==null)for(m.push(E[1]);(b=b.substring(E[0].length))!=="";)if((E=s.key_access.exec(b))!==null)m.push(E[1]);else if((E=s.index_access.exec(b))!==null)m.push(E[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=m}else v|=2;if(v===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");T=T.substring(f[0].length)}return l[h]=n}g.sprintf=a,g.vsprintf=c,typeof window<"u"&&(window.sprintf=a,window.vsprintf=c,t=(function(){return{sprintf:a,vsprintf:c}}).call(g,r,g,d),t!==void 0&&(d.exports=t))})()},4162:function(d,g,r){d.exports=y;var t=r(9284),s=r(9584),a={"2d":function(h,T,f){var n=h({order:T,scalarArguments:3,getters:f==="generic"?[0]:void 0,phase:function(m,b,E,p){return m>p|0},vertex:function(m,b,E,p,S,w,i,C,x,k,I,B,_){var z=(i<<0)+(C<<1)+(x<<2)+(k<<3)|0;if(!(z===0||z===15))switch(z){case 0:I.push([m-.5,b-.5]);break;case 1:I.push([m-.25-.25*(p+E-2*_)/(E-p),b-.25-.25*(S+E-2*_)/(E-S)]);break;case 2:I.push([m-.75-.25*(-p-E+2*_)/(p-E),b-.25-.25*(w+p-2*_)/(p-w)]);break;case 3:I.push([m-.5,b-.5-.5*(S+E+w+p-4*_)/(E-S+p-w)]);break;case 4:I.push([m-.25-.25*(w+S-2*_)/(S-w),b-.75-.25*(-S-E+2*_)/(S-E)]);break;case 5:I.push([m-.5-.5*(p+E+w+S-4*_)/(E-p+S-w),b-.5]);break;case 6:I.push([m-.5-.25*(-p-E+w+S)/(p-E+S-w),b-.5-.25*(-S-E+w+p)/(S-E+p-w)]);break;case 7:I.push([m-.75-.25*(w+S-2*_)/(S-w),b-.75-.25*(w+p-2*_)/(p-w)]);break;case 8:I.push([m-.75-.25*(-w-S+2*_)/(w-S),b-.75-.25*(-w-p+2*_)/(w-p)]);break;case 9:I.push([m-.5-.25*(p+E+-w-S)/(E-p+w-S),b-.5-.25*(S+E+-w-p)/(E-S+w-p)]);break;case 10:I.push([m-.5-.5*(-p-E+-w-S+4*_)/(p-E+w-S),b-.5]);break;case 11:I.push([m-.25-.25*(-w-S+2*_)/(w-S),b-.75-.25*(S+E-2*_)/(E-S)]);break;case 12:I.push([m-.5,b-.5-.5*(-S-E+-w-p+4*_)/(S-E+w-p)]);break;case 13:I.push([m-.75-.25*(p+E-2*_)/(E-p),b-.25-.25*(-w-p+2*_)/(w-p)]);break;case 14:I.push([m-.25-.25*(-p-E+2*_)/(p-E),b-.25-.25*(-S-E+2*_)/(S-E)]);break;case 15:I.push([m-.5,b-.5]);break}},cell:function(m,b,E,p,S,w,i,C,x){S?C.push([m,b]):C.push([b,m])}});return function(v,m){var b=[],E=[];return n(v,b,E,m),{positions:b,cells:E}}}};function c(h,T){var f=h.length+"d",n=a[f];if(n)return n(t,h,T)}function u(h,T){for(var f=s(h,T),n=f.length,v=new Array(n),m=new Array(n),b=0;b<n;++b)v[b]=[f[b]],m[b]=[b];return{positions:v,cells:m}}var l={};function y(h,v){if(h.dimension<=0)return{positions:[],cells:[]};if(h.dimension===1)return u(h,v);var f=h.order.join()+"-"+h.dtype,n=l[f],v=+v||0;return n||(n=l[f]=c(h.order,h.dtype)),n(h,v)}},6946:function(d,g,r){d.exports=u;var t=r(875),s=window||A.global||{},a=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(l){for(var y=l.cells,h=l.positions,T=new Float32Array(y.length*6),f=0,n=0,v=0;v<y.length;++v)for(var m=y[v],b=0;b<3;++b){var E=h[m[b]];T[f++]=E[0],T[f++]=E[1]+1.4,n=Math.max(E[0],n)}return{data:T,shape:n}}function u(l,y,T){var T=T||{},f=a[l];f||(f=a[l]={" ":{data:new Float32Array(0),shape:.2}});var n=f[y];if(!n)if(y.length<=1||!/\d/.test(y))n=f[y]=c(t(y,{triangles:!0,font:l,textAlign:T.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var v=y.split(/(\d|\s)/),m=new Array(v.length),b=0,E=0,p=0;p<v.length;++p)m[p]=u(l,v[p]),b+=m[p].data.length,E+=m[p].shape,p>0&&(E+=.02);for(var S=new Float32Array(b),w=0,i=-.5*E,p=0;p<m.length;++p){for(var C=m[p].data,x=0;x<C.length;x+=2)S[w++]=C[x]+i,S[w++]=C[x+1];i+=m[p].shape+.02}n=f[y]={data:S,shape:E}}return n}},14:function(d,g,r){var t=r(4405);d.exports=u;var s=96;function a(l,y){var h=t(getComputedStyle(l).getPropertyValue(y));return h[0]*u(h[1],l)}function c(l,y){var h=document.createElement("div");h.style["font-size"]="128"+l,y.appendChild(h);var T=a(h,"font-size")/128;return y.removeChild(h),T}function u(l,y){switch(y=y||document.body,l=(l||"px").trim().toLowerCase(),(y===window||y===document)&&(y=document.body),l){case"%":return y.clientHeight/100;case"ch":case"ex":return c(l,y);case"em":return a(y,"font-size");case"rem":return a(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 s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}},3440:function(d,g,r){d.exports=m;var t=r(8444),s=r(7437),a=r(4422),c=r(903),u=r(899),l=r(9305);function y(b,E,p){return Math.sqrt(Math.pow(b,2)+Math.pow(E,2)+Math.pow(p,2))}function h(b){return Math.min(1,Math.max(-1,b))}function T(b){var E=Math.abs(b[0]),p=Math.abs(b[1]),S=Math.abs(b[2]),w=[0,0,0];E>Math.max(p,S)?w[2]=1:p>Math.max(E,S)?w[0]=1:w[1]=1;for(var i=0,C=0,x=0;x<3;++x)i+=b[x]*b[x],C+=w[x]*b[x];for(var x=0;x<3;++x)w[x]-=C/i*b[x];return u(w,w),w}function f(b,E,p,S,w,i,C,x){this.center=t(p),this.up=t(S),this.right=t(w),this.radius=t([i]),this.angle=t([C,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(b,E),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var k=0;k<16;++k)this.computedMatrix[k]=.5;this.recalcMatrix(0)}var n=f.prototype;n.setDistanceLimits=function(b,E){b>0?b=Math.log(b):b=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=E},n.getDistanceLimits=function(b){var E=this.radius.bounds[0];return b?(b[0]=Math.exp(E[0][0]),b[1]=Math.exp(E[1][0]),b):[Math.exp(E[0][0]),Math.exp(E[1][0])]},n.recalcMatrix=function(b){this.center.curve(b),this.up.curve(b),this.right.curve(b),this.radius.curve(b),this.angle.curve(b);for(var E=this.computedUp,p=this.computedRight,S=0,w=0,i=0;i<3;++i)w+=E[i]*p[i],S+=E[i]*E[i];for(var C=Math.sqrt(S),x=0,i=0;i<3;++i)p[i]-=E[i]*w/S,x+=p[i]*p[i],E[i]/=C;for(var k=Math.sqrt(x),i=0;i<3;++i)p[i]/=k;var I=this.computedToward;c(I,E,p),u(I,I);for(var B=Math.exp(this.computedRadius[0]),_=this.computedAngle[0],z=this.computedAngle[1],O=Math.cos(_),F=Math.sin(_),N=Math.cos(z),V=Math.sin(z),j=this.computedCenter,$=O*N,q=F*N,oe=V,Z=-O*V,G=-F*V,re=N,H=this.computedEye,J=this.computedMatrix,i=0;i<3;++i){var ae=$*p[i]+q*I[i]+oe*E[i];J[4*i+1]=Z*p[i]+G*I[i]+re*E[i],J[4*i+2]=ae,J[4*i+3]=0}var K=J[1],Y=J[5],ie=J[9],ne=J[2],le=J[6],de=J[10],we=Y*de-ie*le,me=ie*ne-K*de,Le=K*le-Y*ne,ve=y(we,me,Le);we/=ve,me/=ve,Le/=ve,J[0]=we,J[4]=me,J[8]=Le;for(var i=0;i<3;++i)H[i]=j[i]+J[2+4*i]*B;for(var i=0;i<3;++i){for(var x=0,Ae=0;Ae<3;++Ae)x+=J[i+4*Ae]*H[Ae];J[12+i]=-x}J[15]=1},n.getMatrix=function(b,E){this.recalcMatrix(b);var p=this.computedMatrix;if(E){for(var S=0;S<16;++S)E[S]=p[S];return E}return p};var v=[0,0,0];n.rotate=function(b,E,p,S){if(this.angle.move(b,E,p),S){this.recalcMatrix(b);var w=this.computedMatrix;v[0]=w[2],v[1]=w[6],v[2]=w[10];for(var i=this.computedUp,C=this.computedRight,x=this.computedToward,k=0;k<3;++k)w[4*k]=i[k],w[4*k+1]=C[k],w[4*k+2]=x[k];a(w,w,S,v);for(var k=0;k<3;++k)i[k]=w[4*k],C[k]=w[4*k+1];this.up.set(b,i[0],i[1],i[2]),this.right.set(b,C[0],C[1],C[2])}},n.pan=function(b,E,p,S){E=E||0,p=p||0,S=S||0,this.recalcMatrix(b);var w=this.computedMatrix;Math.exp(this.computedRadius[0]);var i=w[1],C=w[5],x=w[9],k=y(i,C,x);i/=k,C/=k,x/=k;var I=w[0],B=w[4],_=w[8],z=I*i+B*C+_*x;I-=i*z,B-=C*z,_-=x*z;var O=y(I,B,_);I/=O,B/=O,_/=O;var F=I*E+i*p,N=B*E+C*p,V=_*E+x*p;this.center.move(b,F,N,V);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+S),this.radius.set(b,Math.log(j))},n.translate=function(b,E,p,S){this.center.move(b,E||0,p||0,S||0)},n.setMatrix=function(b,E,p,S){var w=1;typeof p=="number"&&(w=p|0),(w<0||w>3)&&(w=1);var i=(w+2)%3;E||(this.recalcMatrix(b),E=this.computedMatrix);var C=E[w],x=E[w+4],k=E[w+8];if(S){var B=Math.abs(C),_=Math.abs(x),z=Math.abs(k),O=Math.max(B,_,z);B===O?(C=C<0?-1:1,x=k=0):z===O?(k=k<0?-1:1,C=x=0):(x=x<0?-1:1,C=k=0)}else{var I=y(C,x,k);C/=I,x/=I,k/=I}var F=E[i],N=E[i+4],V=E[i+8],j=F*C+N*x+V*k;F-=C*j,N-=x*j,V-=k*j;var $=y(F,N,V);F/=$,N/=$,V/=$;var q=x*V-k*N,oe=k*F-C*V,Z=C*N-x*F,G=y(q,oe,Z);q/=G,oe/=G,Z/=G,this.center.jump(b,ze,Ie,Ne),this.radius.idle(b),this.up.jump(b,C,x,k),this.right.jump(b,F,N,V);var re,H;if(w===2){var J=E[1],ae=E[5],K=E[9],Y=J*F+ae*N+K*V,ie=J*q+ae*oe+K*Z;we<0?re=-Math.PI/2:re=Math.PI/2,H=Math.atan2(ie,Y)}else{var ne=E[2],le=E[6],de=E[10],we=ne*C+le*x+de*k,me=ne*F+le*N+de*V,Le=ne*q+le*oe+de*Z;re=Math.asin(h(we)),H=Math.atan2(Le,me)}this.angle.jump(b,H,re),this.recalcMatrix(b);var ve=E[2],Ae=E[6],ye=E[10],Se=this.computedMatrix;s(Se,E);var _e=Se[15],ze=Se[12]/_e,Ie=Se[13]/_e,Ne=Se[14]/_e,et=Math.exp(this.computedRadius[0]);this.center.jump(b,ze-ve*et,Ie-Ae*et,Ne-ye*et)},n.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},n.idle=function(b){this.center.idle(b),this.up.idle(b),this.right.idle(b),this.radius.idle(b),this.angle.idle(b)},n.flush=function(b){this.center.flush(b),this.up.flush(b),this.right.flush(b),this.radius.flush(b),this.angle.flush(b)},n.setDistance=function(b,E){E>0&&this.radius.set(b,Math.log(E))},n.lookAt=function(b,E,p,S){this.recalcMatrix(b),E=E||this.computedEye,p=p||this.computedCenter,S=S||this.computedUp;var w=S[0],i=S[1],C=S[2],x=y(w,i,C);if(!(x<1e-6)){w/=x,i/=x,C/=x;var k=E[0]-p[0],I=E[1]-p[1],B=E[2]-p[2],_=y(k,I,B);if(!(_<1e-6)){k/=_,I/=_,B/=_;var z=this.computedRight,O=z[0],F=z[1],N=z[2],V=w*O+i*F+C*N;O-=V*w,F-=V*i,N-=V*C;var j=y(O,F,N);if(!(j<.01&&(O=i*B-C*I,F=C*k-w*B,N=w*I-i*k,j=y(O,F,N),j<1e-6))){O/=j,F/=j,N/=j,this.up.set(b,w,i,C),this.right.set(b,O,F,N),this.center.set(b,p[0],p[1],p[2]),this.radius.set(b,Math.log(_));var $=i*N-C*F,q=C*O-w*N,oe=w*F-i*O,Z=y($,q,oe);$/=Z,q/=Z,oe/=Z;var G=w*k+i*I+C*B,re=O*k+F*I+N*B,H=$*k+q*I+oe*B,J=Math.asin(h(G)),ae=Math.atan2(H,re),K=this.angle._state,Y=K[K.length-1],ie=K[K.length-2];Y=Y%(2*Math.PI);var ne=Math.abs(Y+2*Math.PI-ae),le=Math.abs(Y-ae),de=Math.abs(Y-2*Math.PI-ae);ne<le&&(Y+=2*Math.PI),de<le&&(Y-=2*Math.PI),this.angle.jump(this.angle.lastT(),Y,ie),this.angle.set(b,ae,J)}}}};function m(b){b=b||{};var E=b.center||[0,0,0],p=b.up||[0,1,0],S=b.right||T(p),w=b.radius||1,i=b.theta||0,C=b.phi||0;if(E=[].slice.call(E,0,3),p=[].slice.call(p,0,3),u(p,p),S=[].slice.call(S,0,3),u(S,S),"eye"in b){var x=b.eye,k=[x[0]-E[0],x[1]-E[1],x[2]-E[2]];c(S,k,p),y(S[0],S[1],S[2])<1e-6?S=T(p):u(S,S),w=y(k[0],k[1],k[2]);var I=l(p,k)/w,B=l(S,k)/w;C=Math.acos(I),i=Math.acos(B)}return w=Math.log(w),new f(b.zoomMin,b.zoomMax,E,p,S,w,i,C)}},9660:function(d){d.exports=r;var g=+(Math.pow(2,27)+1);function r(t,s,a){var c=t*s,u=g*t,l=u-t,y=u-l,h=t-y,T=g*s,f=T-s,n=T-f,v=s-n,m=c-y*n,b=m-h*n,E=b-y*v,p=h*v-E;return a?(a[0]=p,a[1]=c,a):[p,c]}},87:function(d){d.exports=g;function g(r,t,s){var a=r+t,c=a-r,u=a-c,l=t-c,y=r-u;return s?(s[0]=y+l,s[1]=a,s):[y+l,a]}},5306:function(d,g,r){var t=r(2288),s=r(3094),a=r(2146).lW;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:s([32,0]),UINT16:s([32,0]),UINT32:s([32,0]),BIGUINT64:s([32,0]),INT8:s([32,0]),INT16:s([32,0]),INT32:s([32,0]),BIGINT64:s([32,0]),FLOAT:s([32,0]),DOUBLE:s([32,0]),DATA:s([32,0]),UINT8C:s([32,0]),BUFFER:s([32,0])});var c=typeof Uint8ClampedArray<"u",u=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",y=r.g.__TYPEDARRAY_POOL;y.UINT8C||(y.UINT8C=s([32,0])),y.BIGUINT64||(y.BIGUINT64=s([32,0])),y.BIGINT64||(y.BIGINT64=s([32,0])),y.BUFFER||(y.BUFFER=s([32,0]));var h=y.DATA,T=y.BUFFER;g.free=function(O){if(a.isBuffer(O))T[t.log2(O.length)].push(O);else{if(Object.prototype.toString.call(O)!=="[object ArrayBuffer]"&&(O=O.buffer),!O)return;var F=O.length||O.byteLength,N=t.log2(F)|0;h[N].push(O)}};function f(z){if(z){var O=z.length||z.byteLength,F=t.log2(O);h[F].push(z)}}function n(z){f(z.buffer)}g.freeUint8=g.freeUint16=g.freeUint32=g.freeBigUint64=g.freeInt8=g.freeInt16=g.freeInt32=g.freeBigInt64=g.freeFloat32=g.freeFloat=g.freeFloat64=g.freeDouble=g.freeUint8Clamped=g.freeDataView=n,g.freeArrayBuffer=f,g.freeBuffer=function(O){T[t.log2(O.length)].push(O)},g.malloc=function(O,F){if(F===void 0||F==="arraybuffer")return v(O);switch(F){case"uint8":return m(O);case"uint16":return b(O);case"uint32":return E(O);case"int8":return p(O);case"int16":return S(O);case"int32":return w(O);case"float":case"float32":return i(O);case"double":case"float64":return C(O);case"uint8_clamped":return x(O);case"bigint64":return I(O);case"biguint64":return k(O);case"buffer":return _(O);case"data":case"dataview":return B(O);default:return null}return null};function v(O){var O=t.nextPow2(O),F=t.log2(O),N=h[F];return N.length>0?N.pop():new ArrayBuffer(O)}g.mallocArrayBuffer=v;function m(z){return new Uint8Array(v(z),0,z)}g.mallocUint8=m;function b(z){return new Uint16Array(v(2*z),0,z)}g.mallocUint16=b;function E(z){return new Uint32Array(v(4*z),0,z)}g.mallocUint32=E;function p(z){return new Int8Array(v(z),0,z)}g.mallocInt8=p;function S(z){return new Int16Array(v(2*z),0,z)}g.mallocInt16=S;function w(z){return new Int32Array(v(4*z),0,z)}g.mallocInt32=w;function i(z){return new Float32Array(v(4*z),0,z)}g.mallocFloat32=g.mallocFloat=i;function C(z){return new Float64Array(v(8*z),0,z)}g.mallocFloat64=g.mallocDouble=C;function x(z){return c?new Uint8ClampedArray(v(z),0,z):m(z)}g.mallocUint8Clamped=x;function k(z){return u?new BigUint64Array(v(8*z),0,z):null}g.mallocBigUint64=k;function I(z){return l?new BigInt64Array(v(8*z),0,z):null}g.mallocBigInt64=I;function B(z){return new DataView(v(z),0,z)}g.mallocDataView=B;function _(z){z=t.nextPow2(z);var O=t.log2(z),F=T[O];return F.length>0?F.pop():new a(z)}g.mallocBuffer=_,g.clearCache=function(){for(var O=0;O<32;++O)y.UINT8[O].length=0,y.UINT16[O].length=0,y.UINT32[O].length=0,y.INT8[O].length=0,y.INT16[O].length=0,y.INT32[O].length=0,y.FLOAT[O].length=0,y.DOUBLE[O].length=0,y.BIGUINT64[O].length=0,y.BIGINT64[O].length=0,y.UINT8C[O].length=0,h[O].length=0,T[O].length=0}},1731:function(d){"use restrict";d.exports=g;function g(t){this.roots=new Array(t),this.ranks=new Array(t);for(var s=0;s<t;++s)this.roots[s]=s,this.ranks[s]=0}var r=g.prototype;Object.defineProperty(r,"length",{get:function(){return this.roots.length}}),r.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},r.find=function(t){for(var s=t,a=this.roots;a[t]!==t;)t=a[t];for(;a[s]!==t;){var c=a[s];a[s]=t,s=c}return t},r.link=function(t,s){var a=this.find(t),c=this.find(s);if(a!==c){var u=this.ranks,l=this.roots,y=u[a],h=u[c];y<h?l[a]=c:h<y?l[c]=a:(l[c]=a,++u[a])}}},1215:function(d){function g(s,a){for(var c=1,u=s.length,l=s[0],y=s[0],h=1;h<u;++h)if(y=l,l=s[h],a(l,y)){if(h===c){c++;continue}s[c++]=l}return s.length=c,s}function r(s){for(var a=1,c=s.length,u=s[0],l=s[0],y=1;y<c;++y,l=u)if(l=u,u=s[y],u!==l){if(y===a){a++;continue}s[a++]=u}return s.length=a,s}function t(s,a,c){return s.length===0?s:a?(c||s.sort(a),g(s,a)):(c||s.sort(),r(s))}d.exports=t},875:function(d,g,r){d.exports=c;var t=r(712),s=null,a=null;typeof document<"u"&&(s=document.createElement("canvas"),s.width=8192,s.height=1024,a=s.getContext("2d"));function c(u,l){return(typeof l!="object"||l===null)&&(l={}),t(u,l.canvas||s,l.context||a,l)}},712:function(d,g,r){d.exports=I,d.exports.processPixels=k;var t=r(4162),s=r(5050),a=r(8243),c=r(197),u=r(7761),l=r(8040),y="b",h="b|",T="i",f="i|",n="sup",v="+",m="+1",b="sub",E="-",p="-1";function S(B,_,z,O){for(var F="<"+B+">",N="</"+B+">",V=F.length,j=N.length,$=_[0]===v||_[0]===E,q=0,oe=-j;q>-1&&(q=z.indexOf(F,q),!(q===-1||(oe=z.indexOf(N,q+V),oe===-1)||oe<=q));){for(var Z=q;Z<oe+j;++Z)if(Z<q+V||Z>=oe)O[Z]=null,z=z.substr(0,Z)+" "+z.substr(Z+1);else if(O[Z]!==null){var G=O[Z].indexOf(_[0]);G===-1?O[Z]+=_:$&&(O[Z]=O[Z].substr(0,G+1)+(1+parseInt(O[Z][G+1]))+O[Z].substr(G+2))}var re=q+V,H=z.substr(re,oe-re),J=H.indexOf(F);J!==-1?q=J:q=oe+j}return O}function w(B,_,z){for(var O=_.textAlign||"start",F=_.textBaseline||"alphabetic",N=[1<<30,1<<30],V=[0,0],j=B.length,$=0;$<j;++$)for(var q=B[$],oe=0;oe<2;++oe)N[oe]=Math.min(N[oe],q[oe])|0,V[oe]=Math.max(V[oe],q[oe])|0;var Z=0;switch(O){case"center":Z=-.5*(N[0]+V[0]);break;case"right":case"end":Z=-V[0];break;case"left":case"start":Z=-N[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+O+"'")}var G=0;switch(F){case"hanging":case"top":G=-N[1];break;case"middle":G=-.5*(N[1]+V[1]);break;case"alphabetic":case"ideographic":G=-3*z;break;case"bottom":G=-V[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+F+"'")}var re=1/z;return"lineHeight"in _?re*=+_.lineHeight:"width"in _?re=_.width/(V[0]-N[0]):"height"in _&&(re=_.height/(V[1]-N[1])),B.map(function(H){return[re*(H[0]+Z),re*(H[1]+G)]})}function i(B,_,z,O,F,N){z=z.replace(/\n/g,""),N.breaklines===!0?z=z.replace(/\<br\>/g,`
`):z=z.replace(/\<br\>/g," ");var V="",j=[];for(Y=0;Y<z.length;++Y)j[Y]=V;N.bolds===!0&&(j=S(y,h,z,j)),N.italics===!0&&(j=S(T,f,z,j)),N.superscripts===!0&&(j=S(n,m,z,j)),N.subscripts===!0&&(j=S(b,p,z,j));var $=[],q="";for(Y=0;Y<z.length;++Y)j[Y]!==null&&(q+=z[Y],$.push(j[Y]));var oe=q.split(`
`),Z=oe.length,G=Math.round(F*O),re=O,H=O*2,J=0,ae=Z*G+H;B.height<ae&&(B.height=ae),_.fillStyle="#000",_.fillRect(0,0,B.width,B.height),_.fillStyle="#fff";var K,Y,ie,ne,le,de=0,we="";function me(){if(we!==""){var Ne=_.measureText(we).width;_.fillText(we,re+ie,H+ne),ie+=Ne}}function Le(){return""+Math.round(le)+"px "}function ve(Ne,et){var st=""+_.font;if(N.subscripts===!0){var Ze=Ne.indexOf(E),Ke=et.indexOf(E),nt=Ze>-1?parseInt(Ne[1+Ze]):0,it=Ke>-1?parseInt(et[1+Ke]):0;nt!==it&&(st=st.replace(Le(),"?px "),le*=Math.pow(.75,it-nt),st=st.replace("?px ",Le())),ne+=.25*G*(it-nt)}if(N.superscripts===!0){var lt=Ne.indexOf(v),vt=et.indexOf(v),xt=lt>-1?parseInt(Ne[1+lt]):0,Je=vt>-1?parseInt(et[1+vt]):0;xt!==Je&&(st=st.replace(Le(),"?px "),le*=Math.pow(.75,Je-xt),st=st.replace("?px ",Le())),ne-=.25*G*(Je-xt)}if(N.bolds===!0){var Pe=Ne.indexOf(h)>-1,Ue=et.indexOf(h)>-1;!Pe&&Ue&&(He?st=st.replace("italic ","italic bold "):st="bold "+st),Pe&&!Ue&&(st=st.replace("bold ",""))}if(N.italics===!0){var He=Ne.indexOf(f)>-1,Oe=et.indexOf(f)>-1;!He&&Oe&&(st="italic "+st),He&&!Oe&&(st=st.replace("italic ",""))}_.font=st}for(K=0;K<Z;++K){var Ae=oe[K]+`
`;for(ie=0,ne=K*G,le=O,we="",Y=0;Y<Ae.length;++Y){var ye=Y+de<$.length?$[Y+de]:$[$.length-1];V===ye?we+=Ae[Y]:(me(),we=Ae[Y],ye!==void 0&&(ve(V,ye),V=ye))}me(),de+=Ae.length;var Se=Math.round(ie+2*re)|0;J<Se&&(J=Se)}var _e=J,ze=H+G*Z,Ie=s(_.getImageData(0,0,_e,ze).data,[ze,_e,4]);return Ie.pick(-1,-1,0).transpose(1,0)}function C(B,_){var z=t(B,128);return _?a(z.cells,z.positions,.25):{edges:z.cells,positions:z.positions}}function x(B,_,z,O){var F=C(B,O),N=w(F.positions,_,z),V=F.edges,j=_.orientation==="ccw";if(c(N,V),_.polygons||_.polygon||_.polyline){for(var $=l(V,N),q=new Array($.length),oe=0;oe<$.length;++oe){for(var Z=$[oe],G=new Array(Z.length),re=0;re<Z.length;++re){for(var H=Z[re],J=new Array(H.length),ae=0;ae<H.length;++ae)J[ae]=N[H[ae]].slice();j&&J.reverse(),G[re]=J}q[oe]=G}return q}else return _.triangles||_.triangulate||_.triangle?{cells:u(N,V,{delaunay:!1,exterior:!1,interior:!0}),positions:N}:{edges:V,positions:N}}function k(B,_,z){try{return x(B,_,z,!0)}catch{}try{return x(B,_,z,!1)}catch{}return _.polygons||_.polyline||_.polygon?[]:_.triangles||_.triangulate||_.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function I(B,_,z,O){var F=64,N=1.25,V={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};O&&(O.size&&O.size>0&&(F=O.size),O.lineSpacing&&O.lineSpacing>0&&(N=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(V.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(V.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(V.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(V.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(V.superscripts=!!O.styletags.superscripts)),z.font=[O.fontStyle,O.fontVariant,O.fontWeight,F+"px",O.font].filter(function($){return $}).join(" "),z.textAlign="start",z.textBaseline="alphabetic",z.direction="ltr";var j=i(_,z,B,F,N,V);return k(j,O,F)}},5346:function(d){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(C){C.permitHostObjects___&&C.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var t=!1;if(typeof WeakMap=="function"){var s=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new s,c=Object.freeze({});if(a.set(c,1),a.get(c)!==1)t=!0;else{d.exports=WeakMap;return}}}var u=Object.getOwnPropertyNames,l=Object.defineProperty,y=Object.isExtensible,h="weakmap:",T=h+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var f=new ArrayBuffer(25),n=new Uint8Array(f);crypto.getRandomValues(n),T=h+"rand:"+Array.prototype.map.call(n,function(C){return(C%36).toString(36)}).join("")+"___"}function v(C){return!(C.substr(0,h.length)==h&&C.substr(C.length-3)==="___")}if(l(Object,"getOwnPropertyNames",{value:function(x){return u(x).filter(v)}}),"getPropertyNames"in Object){var m=Object.getPropertyNames;l(Object,"getPropertyNames",{value:function(x){return m(x).filter(v)}})}function b(C){if(C!==Object(C))throw new TypeError("Not an object: "+C);var x=C[T];if(x&&x.key===C)return x;if(y(C)){x={key:C};try{return l(C,T,{value:x,writable:!1,enumerable:!1,configurable:!1}),x}catch{return}}}(function(){var C=Object.freeze;l(Object,"freeze",{value:function(B){return b(B),C(B)}});var x=Object.seal;l(Object,"seal",{value:function(B){return b(B),x(B)}});var k=Object.preventExtensions;l(Object,"preventExtensions",{value:function(B){return b(B),k(B)}})})();function E(C){return C.prototype=null,Object.freeze(C)}var p=!1;function S(){!p&&typeof console<"u"&&(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var w=0,i=function(){this instanceof i||S();var C=[],x=[],k=w++;function I(O,F){var N,V=b(O);return V?k in V?V[k]:F:(N=C.indexOf(O),N>=0?x[N]:F)}function B(O){var F=b(O);return F?k in F:C.indexOf(O)>=0}function _(O,F){var N,V=b(O);return V?V[k]=F:(N=C.indexOf(O),N>=0?x[N]=F:(N=C.length,x[N]=F,C[N]=O)),this}function z(O){var F=b(O),N,V;return F?k in F&&delete F[k]:(N=C.indexOf(O),N<0?!1:(V=C.length-1,C[N]=void 0,x[N]=x[V],C[N]=C[V],C.length=V,x.length=V,!0))}return Object.create(i.prototype,{get___:{value:E(I)},has___:{value:E(B)},set___:{value:E(_)},delete___:{value:E(z)}})};i.prototype=Object.create(Object.prototype,{get:{value:function(x,k){return this.get___(x,k)},writable:!0,configurable:!0},has:{value:function(x){return this.has___(x)},writable:!0,configurable:!0},set:{value:function(x,k){return this.set___(x,k)},writable:!0,configurable:!0},delete:{value:function(x){return this.delete___(x)},writable:!0,configurable:!0}}),typeof s=="function"?function(){t&&typeof Proxy<"u"&&(Proxy=void 0);function C(){this instanceof i||S();var x=new s,k=void 0,I=!1;function B(F,N){return k?x.has(F)?x.get(F):k.get___(F,N):x.get(F,N)}function _(F){return x.has(F)||(k?k.has___(F):!1)}var z;t?z=function(F,N){return x.set(F,N),x.has(F)||(k||(k=new i),k.set(F,N)),this}:z=function(F,N){if(I)try{x.set(F,N)}catch{k||(k=new i),k.set___(F,N)}else x.set(F,N);return this};function O(F){var N=!!x.delete(F);return k&&k.delete___(F)||N}return Object.create(i.prototype,{get___:{value:E(B)},has___:{value:E(_)},set___:{value:E(z)},delete___:{value:E(O)},permitHostObjects___:{value:E(function(F){if(F===r)I=!0;else throw new Error("bogus call to permitHostObjects___")})}})}C.prototype=i.prototype,d.exports=C,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),d.exports=i)})()},9222:function(d,g,r){var t=r(7178);d.exports=s;function s(){var a={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var u=c.valueOf(a);return u&&u.identity===a?u:t(c,a)}}},7178:function(d){d.exports=g;function g(r,t){var s={identity:t},a=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(c){return c!==t?a.apply(this,arguments):s},writable:!0}),s}},4037:function(d,g,r){var t=r(9222);d.exports=s;function s(){var a=t();return{get:function(c,u){var l=a(c);return l.hasOwnProperty("value")?l.value:u},set:function(c,u){return a(c).value=u,this},has:function(c){return"value"in a(c)},delete:function(c){return delete a(c).value}}}},6183:function(d){function g(){return function(u,l,y,h,T,f){var n=u[0],v=y[0],m=[0],b=v;h|=0;var E=0,p=v;for(E=0;E<n;++E){{var S=l[h]-f,w=l[h+b]-f;S>=0!=w>=0&&T.push(m[0]+.5+.5*(S+w)/(S-w))}h+=p,++m[0]}}}function r(){return g()}var t=r;function s(u){var l={};return function(h,T,f){var n=h.dtype,v=h.order,m=[n,v.join()].join(),b=l[m];return b||(l[m]=b=u([n,v])),b(h.shape.slice(0),h.data,h.stride,h.offset|0,T,f)}}function a(u){return s(t.bind(void 0,u))}function c(u){return a({funcName:u.funcName})}d.exports=c({funcName:"zeroCrossings"})},9584:function(d,g,r){d.exports=s;var t=r(6183);function s(a,c){var u=[];return c=+c||0,t(a.hi(a.shape[0]-1),u,c),u}},6601:function(){}},o={};function L(d){var g=o[d];if(g!==void 0)return g.exports;var r=o[d]={id:d,loaded:!1,exports:{}};return P[d].call(r.exports,r,r.exports,L),r.loaded=!0,r.exports}(function(){L.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){L.nmd=function(d){return d.paths=[],d.children||(d.children=[]),d}}();var M=L(7386);return M}()})},33576:function(te,X,e){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/function A(Je,Pe){if(!(Je instanceof Pe))throw new TypeError("Cannot call a class as a function")}function P(Je,Pe){for(var Ue=0;Ue<Pe.length;Ue++){var He=Pe[Ue];He.enumerable=He.enumerable||!1,He.configurable=!0,"value"in He&&(He.writable=!0),Object.defineProperty(Je,L(He.key),He)}}function o(Je,Pe,Ue){return P(Je.prototype,Pe),Object.defineProperty(Je,"prototype",{writable:!1}),Je}function L(Je){var Pe=M(Je,"string");return c(Pe)==="symbol"?Pe:String(Pe)}function M(Je,Pe){if(c(Je)!=="object"||Je===null)return Je;var Ue=Je[Symbol.toPrimitive];if(Ue!==void 0){var He=Ue.call(Je,Pe);if(c(He)!=="object")return He;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Je)}function d(Je,Pe,Ue){function He(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{return!1}}return Pe=r(Pe),g(Je,He()?Reflect.construct(Pe,[],r(Je).constructor):Pe.apply(Je,Ue))}function g(Je,Pe){if(Pe&&(c(Pe)==="object"||typeof Pe=="function"))return Pe;if(Pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t(Je)}function r(Je){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ue){return Ue.__proto__||Object.getPrototypeOf(Ue)},r(Je)}function t(Je){if(Je===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Je}function s(Je,Pe){if(typeof Pe!="function"&&Pe!==null)throw new TypeError("Super expression must either be null or a function");Je.prototype=Object.create(Pe&&Pe.prototype,{constructor:{value:Je,writable:!0,configurable:!0}}),Object.defineProperty(Je,"prototype",{writable:!1}),Pe&&a(Je,Pe)}function a(Je,Pe){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(He,Oe){return He.__proto__=Oe,He},a(Je,Pe)}function c(Je){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},c(Je)}var u=e(59968),l=e(35984),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;X.Buffer=n,X.SlowBuffer=k,X.INSPECT_MAX_BYTES=50;var h=2147483647;X.kMaxLength=h,n.TYPED_ARRAY_SUPPORT=T(),!n.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.");function T(){try{var Je=new Uint8Array(1),Pe={foo:function(){return 42}};return Object.setPrototypeOf(Pe,Uint8Array.prototype),Object.setPrototypeOf(Je,Pe),Je.foo()===42}catch{return!1}}Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}});function f(Je){if(Je>h)throw new RangeError('The value "'+Je+'" is invalid for option "size"');var Pe=new Uint8Array(Je);return Object.setPrototypeOf(Pe,n.prototype),Pe}function n(Je,Pe,Ue){if(typeof Je=="number"){if(typeof Pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(Je)}return v(Je,Pe,Ue)}n.poolSize=8192;function v(Je,Pe,Ue){if(typeof Je=="string")return p(Je,Pe);if(ArrayBuffer.isView(Je))return w(Je);if(Je==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(Je));if(nt(Je,ArrayBuffer)||Je&&nt(Je.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nt(Je,SharedArrayBuffer)||Je&&nt(Je.buffer,SharedArrayBuffer)))return i(Je,Pe,Ue);if(typeof Je=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var He=Je.valueOf&&Je.valueOf();if(He!=null&&He!==Je)return n.from(He,Pe,Ue);var Oe=C(Je);if(Oe)return Oe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Je[Symbol.toPrimitive]=="function")return n.from(Je[Symbol.toPrimitive]("string"),Pe,Ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(Je))}n.from=function(Je,Pe,Ue){return v(Je,Pe,Ue)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array);function m(Je){if(typeof Je!="number")throw new TypeError('"size" argument must be of type number');if(Je<0)throw new RangeError('The value "'+Je+'" is invalid for option "size"')}function b(Je,Pe,Ue){return m(Je),Je<=0?f(Je):Pe!==void 0?typeof Ue=="string"?f(Je).fill(Pe,Ue):f(Je).fill(Pe):f(Je)}n.alloc=function(Je,Pe,Ue){return b(Je,Pe,Ue)};function E(Je){return m(Je),f(Je<0?0:x(Je)|0)}n.allocUnsafe=function(Je){return E(Je)},n.allocUnsafeSlow=function(Je){return E(Je)};function p(Je,Pe){if((typeof Pe!="string"||Pe==="")&&(Pe="utf8"),!n.isEncoding(Pe))throw new TypeError("Unknown encoding: "+Pe);var Ue=I(Je,Pe)|0,He=f(Ue),Oe=He.write(Je,Pe);return Oe!==Ue&&(He=He.slice(0,Oe)),He}function S(Je){for(var Pe=Je.length<0?0:x(Je.length)|0,Ue=f(Pe),He=0;He<Pe;He+=1)Ue[He]=Je[He]&255;return Ue}function w(Je){if(nt(Je,Uint8Array)){var Pe=new Uint8Array(Je);return i(Pe.buffer,Pe.byteOffset,Pe.byteLength)}return S(Je)}function i(Je,Pe,Ue){if(Pe<0||Je.byteLength<Pe)throw new RangeError('"offset" is outside of buffer bounds');if(Je.byteLength<Pe+(Ue||0))throw new RangeError('"length" is outside of buffer bounds');var He;return Pe===void 0&&Ue===void 0?He=new Uint8Array(Je):Ue===void 0?He=new Uint8Array(Je,Pe):He=new Uint8Array(Je,Pe,Ue),Object.setPrototypeOf(He,n.prototype),He}function C(Je){if(n.isBuffer(Je)){var Pe=x(Je.length)|0,Ue=f(Pe);return Ue.length===0||Je.copy(Ue,0,0,Pe),Ue}if(Je.length!==void 0)return typeof Je.length!="number"||it(Je.length)?f(0):S(Je);if(Je.type==="Buffer"&&Array.isArray(Je.data))return S(Je.data)}function x(Je){if(Je>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return Je|0}function k(Je){return+Je!=Je&&(Je=0),n.alloc(+Je)}n.isBuffer=function(Pe){return Pe!=null&&Pe._isBuffer===!0&&Pe!==n.prototype},n.compare=function(Pe,Ue){if(nt(Pe,Uint8Array)&&(Pe=n.from(Pe,Pe.offset,Pe.byteLength)),nt(Ue,Uint8Array)&&(Ue=n.from(Ue,Ue.offset,Ue.byteLength)),!n.isBuffer(Pe)||!n.isBuffer(Ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Pe===Ue)return 0;for(var He=Pe.length,Oe=Ue.length,Ce=0,ge=Math.min(He,Oe);Ce<ge;++Ce)if(Pe[Ce]!==Ue[Ce]){He=Pe[Ce],Oe=Ue[Ce];break}return He<Oe?-1:Oe<He?1:0},n.isEncoding=function(Pe){switch(String(Pe).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}},n.concat=function(Pe,Ue){if(!Array.isArray(Pe))throw new TypeError('"list" argument must be an Array of Buffers');if(Pe.length===0)return n.alloc(0);var He;if(Ue===void 0)for(Ue=0,He=0;He<Pe.length;++He)Ue+=Pe[He].length;var Oe=n.allocUnsafe(Ue),Ce=0;for(He=0;He<Pe.length;++He){var ge=Pe[He];if(nt(ge,Uint8Array))Ce+ge.length>Oe.length?(n.isBuffer(ge)||(ge=n.from(ge)),ge.copy(Oe,Ce)):Uint8Array.prototype.set.call(Oe,ge,Ce);else if(n.isBuffer(ge))ge.copy(Oe,Ce);else throw new TypeError('"list" argument must be an Array of Buffers');Ce+=ge.length}return Oe};function I(Je,Pe){if(n.isBuffer(Je))return Je.length;if(ArrayBuffer.isView(Je)||nt(Je,ArrayBuffer))return Je.byteLength;if(typeof Je!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+c(Je));var Ue=Je.length,He=arguments.length>2&&arguments[2]===!0;if(!He&&Ue===0)return 0;for(var Oe=!1;;)switch(Pe){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":return Ne(Je).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue*2;case"hex":return Ue>>>1;case"base64":return Ze(Je).length;default:if(Oe)return He?-1:Ne(Je).length;Pe=(""+Pe).toLowerCase(),Oe=!0}}n.byteLength=I;function B(Je,Pe,Ue){var He=!1;if((Pe===void 0||Pe<0)&&(Pe=0),Pe>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,Pe>>>=0,Ue<=Pe))return"";for(Je||(Je="utf8");;)switch(Je){case"hex":return J(this,Pe,Ue);case"utf8":case"utf-8":return oe(this,Pe,Ue);case"ascii":return re(this,Pe,Ue);case"latin1":case"binary":return H(this,Pe,Ue);case"base64":return q(this,Pe,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,Pe,Ue);default:if(He)throw new TypeError("Unknown encoding: "+Je);Je=(Je+"").toLowerCase(),He=!0}}n.prototype._isBuffer=!0;function _(Je,Pe,Ue){var He=Je[Pe];Je[Pe]=Je[Ue],Je[Ue]=He}n.prototype.swap16=function(){var Pe=this.length;if(Pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ue=0;Ue<Pe;Ue+=2)_(this,Ue,Ue+1);return this},n.prototype.swap32=function(){var Pe=this.length;if(Pe%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ue=0;Ue<Pe;Ue+=4)_(this,Ue,Ue+3),_(this,Ue+1,Ue+2);return this},n.prototype.swap64=function(){var Pe=this.length;if(Pe%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ue=0;Ue<Pe;Ue+=8)_(this,Ue,Ue+7),_(this,Ue+1,Ue+6),_(this,Ue+2,Ue+5),_(this,Ue+3,Ue+4);return this},n.prototype.toString=function(){var Pe=this.length;return Pe===0?"":arguments.length===0?oe(this,0,Pe):B.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(Pe){if(!n.isBuffer(Pe))throw new TypeError("Argument must be a Buffer");return this===Pe?!0:n.compare(this,Pe)===0},n.prototype.inspect=function(){var Pe="",Ue=X.INSPECT_MAX_BYTES;return Pe=this.toString("hex",0,Ue).replace(/(.{2})/g,"$1 ").trim(),this.length>Ue&&(Pe+=" ... "),"<Buffer "+Pe+">"},y&&(n.prototype[y]=n.prototype.inspect),n.prototype.compare=function(Pe,Ue,He,Oe,Ce){if(nt(Pe,Uint8Array)&&(Pe=n.from(Pe,Pe.offset,Pe.byteLength)),!n.isBuffer(Pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+c(Pe));if(Ue===void 0&&(Ue=0),He===void 0&&(He=Pe?Pe.length:0),Oe===void 0&&(Oe=0),Ce===void 0&&(Ce=this.length),Ue<0||He>Pe.length||Oe<0||Ce>this.length)throw new RangeError("out of range index");if(Oe>=Ce&&Ue>=He)return 0;if(Oe>=Ce)return-1;if(Ue>=He)return 1;if(Ue>>>=0,He>>>=0,Oe>>>=0,Ce>>>=0,this===Pe)return 0;for(var ge=Ce-Oe,pe=He-Ue,Te=Math.min(ge,pe),be=this.slice(Oe,Ce),ke=Pe.slice(Ue,He),Ve=0;Ve<Te;++Ve)if(be[Ve]!==ke[Ve]){ge=be[Ve],pe=ke[Ve];break}return ge<pe?-1:pe<ge?1:0};function z(Je,Pe,Ue,He,Oe){if(Je.length===0)return-1;if(typeof Ue=="string"?(He=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,it(Ue)&&(Ue=Oe?0:Je.length-1),Ue<0&&(Ue=Je.length+Ue),Ue>=Je.length){if(Oe)return-1;Ue=Je.length-1}else if(Ue<0)if(Oe)Ue=0;else return-1;if(typeof Pe=="string"&&(Pe=n.from(Pe,He)),n.isBuffer(Pe))return Pe.length===0?-1:O(Je,Pe,Ue,He,Oe);if(typeof Pe=="number")return Pe=Pe&255,typeof Uint8Array.prototype.indexOf=="function"?Oe?Uint8Array.prototype.indexOf.call(Je,Pe,Ue):Uint8Array.prototype.lastIndexOf.call(Je,Pe,Ue):O(Je,[Pe],Ue,He,Oe);throw new TypeError("val must be string, number or Buffer")}function O(Je,Pe,Ue,He,Oe){var Ce=1,ge=Je.length,pe=Pe.length;if(He!==void 0&&(He=String(He).toLowerCase(),He==="ucs2"||He==="ucs-2"||He==="utf16le"||He==="utf-16le")){if(Je.length<2||Pe.length<2)return-1;Ce=2,ge/=2,pe/=2,Ue/=2}function Te(at,ut){return Ce===1?at[ut]:at.readUInt16BE(ut*Ce)}var be;if(Oe){var ke=-1;for(be=Ue;be<ge;be++)if(Te(Je,be)===Te(Pe,ke===-1?0:be-ke)){if(ke===-1&&(ke=be),be-ke+1===pe)return ke*Ce}else ke!==-1&&(be-=be-ke),ke=-1}else for(Ue+pe>ge&&(Ue=ge-pe),be=Ue;be>=0;be--){for(var Ve=!0,je=0;je<pe;je++)if(Te(Je,be+je)!==Te(Pe,je)){Ve=!1;break}if(Ve)return be}return-1}n.prototype.includes=function(Pe,Ue,He){return this.indexOf(Pe,Ue,He)!==-1},n.prototype.indexOf=function(Pe,Ue,He){return z(this,Pe,Ue,He,!0)},n.prototype.lastIndexOf=function(Pe,Ue,He){return z(this,Pe,Ue,He,!1)};function F(Je,Pe,Ue,He){Ue=Number(Ue)||0;var Oe=Je.length-Ue;He?(He=Number(He),He>Oe&&(He=Oe)):He=Oe;var Ce=Pe.length;He>Ce/2&&(He=Ce/2);var ge;for(ge=0;ge<He;++ge){var pe=parseInt(Pe.substr(ge*2,2),16);if(it(pe))return ge;Je[Ue+ge]=pe}return ge}function N(Je,Pe,Ue,He){return Ke(Ne(Pe,Je.length-Ue),Je,Ue,He)}function V(Je,Pe,Ue,He){return Ke(et(Pe),Je,Ue,He)}function j(Je,Pe,Ue,He){return Ke(Ze(Pe),Je,Ue,He)}function $(Je,Pe,Ue,He){return Ke(st(Pe,Je.length-Ue),Je,Ue,He)}n.prototype.write=function(Pe,Ue,He,Oe){if(Ue===void 0)Oe="utf8",He=this.length,Ue=0;else if(He===void 0&&typeof Ue=="string")Oe=Ue,He=this.length,Ue=0;else if(isFinite(Ue))Ue=Ue>>>0,isFinite(He)?(He=He>>>0,Oe===void 0&&(Oe="utf8")):(Oe=He,He=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ce=this.length-Ue;if((He===void 0||He>Ce)&&(He=Ce),Pe.length>0&&(He<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Oe||(Oe="utf8");for(var ge=!1;;)switch(Oe){case"hex":return F(this,Pe,Ue,He);case"utf8":case"utf-8":return N(this,Pe,Ue,He);case"ascii":case"latin1":case"binary":return V(this,Pe,Ue,He);case"base64":return j(this,Pe,Ue,He);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,Pe,Ue,He);default:if(ge)throw new TypeError("Unknown encoding: "+Oe);Oe=(""+Oe).toLowerCase(),ge=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(Je,Pe,Ue){return Pe===0&&Ue===Je.length?u.fromByteArray(Je):u.fromByteArray(Je.slice(Pe,Ue))}function oe(Je,Pe,Ue){Ue=Math.min(Je.length,Ue);for(var He=[],Oe=Pe;Oe<Ue;){var Ce=Je[Oe],ge=null,pe=Ce>239?4:Ce>223?3:Ce>191?2:1;if(Oe+pe<=Ue){var Te=void 0,be=void 0,ke=void 0,Ve=void 0;switch(pe){case 1:Ce<128&&(ge=Ce);break;case 2:Te=Je[Oe+1],(Te&192)===128&&(Ve=(Ce&31)<<6|Te&63,Ve>127&&(ge=Ve));break;case 3:Te=Je[Oe+1],be=Je[Oe+2],(Te&192)===128&&(be&192)===128&&(Ve=(Ce&15)<<12|(Te&63)<<6|be&63,Ve>2047&&(Ve<55296||Ve>57343)&&(ge=Ve));break;case 4:Te=Je[Oe+1],be=Je[Oe+2],ke=Je[Oe+3],(Te&192)===128&&(be&192)===128&&(ke&192)===128&&(Ve=(Ce&15)<<18|(Te&63)<<12|(be&63)<<6|ke&63,Ve>65535&&Ve<1114112&&(ge=Ve))}}ge===null?(ge=65533,pe=1):ge>65535&&(ge-=65536,He.push(ge>>>10&1023|55296),ge=56320|ge&1023),He.push(ge),Oe+=pe}return G(He)}var Z=4096;function G(Je){var Pe=Je.length;if(Pe<=Z)return String.fromCharCode.apply(String,Je);for(var Ue="",He=0;He<Pe;)Ue+=String.fromCharCode.apply(String,Je.slice(He,He+=Z));return Ue}function re(Je,Pe,Ue){var He="";Ue=Math.min(Je.length,Ue);for(var Oe=Pe;Oe<Ue;++Oe)He+=String.fromCharCode(Je[Oe]&127);return He}function H(Je,Pe,Ue){var He="";Ue=Math.min(Je.length,Ue);for(var Oe=Pe;Oe<Ue;++Oe)He+=String.fromCharCode(Je[Oe]);return He}function J(Je,Pe,Ue){var He=Je.length;(!Pe||Pe<0)&&(Pe=0),(!Ue||Ue<0||Ue>He)&&(Ue=He);for(var Oe="",Ce=Pe;Ce<Ue;++Ce)Oe+=lt[Je[Ce]];return Oe}function ae(Je,Pe,Ue){for(var He=Je.slice(Pe,Ue),Oe="",Ce=0;Ce<He.length-1;Ce+=2)Oe+=String.fromCharCode(He[Ce]+He[Ce+1]*256);return Oe}n.prototype.slice=function(Pe,Ue){var He=this.length;Pe=~~Pe,Ue=Ue===void 0?He:~~Ue,Pe<0?(Pe+=He,Pe<0&&(Pe=0)):Pe>He&&(Pe=He),Ue<0?(Ue+=He,Ue<0&&(Ue=0)):Ue>He&&(Ue=He),Ue<Pe&&(Ue=Pe);var Oe=this.subarray(Pe,Ue);return Object.setPrototypeOf(Oe,n.prototype),Oe};function K(Je,Pe,Ue){if(Je%1!==0||Je<0)throw new RangeError("offset is not uint");if(Je+Pe>Ue)throw new RangeError("Trying to access beyond buffer length")}n.prototype.readUintLE=n.prototype.readUIntLE=function(Pe,Ue,He){Pe=Pe>>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=this[Pe],Ce=1,ge=0;++ge<Ue&&(Ce*=256);)Oe+=this[Pe+ge]*Ce;return Oe},n.prototype.readUintBE=n.prototype.readUIntBE=function(Pe,Ue,He){Pe=Pe>>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=this[Pe+--Ue],Ce=1;Ue>0&&(Ce*=256);)Oe+=this[Pe+--Ue]*Ce;return Oe},n.prototype.readUint8=n.prototype.readUInt8=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,1,this.length),this[Pe]},n.prototype.readUint16LE=n.prototype.readUInt16LE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,2,this.length),this[Pe]|this[Pe+1]<<8},n.prototype.readUint16BE=n.prototype.readUInt16BE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,2,this.length),this[Pe]<<8|this[Pe+1]},n.prototype.readUint32LE=n.prototype.readUInt32LE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),(this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16)+this[Pe+3]*16777216},n.prototype.readUint32BE=n.prototype.readUInt32BE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),this[Pe]*16777216+(this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3])},n.prototype.readBigUInt64LE=vt(function(Pe){Pe=Pe>>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=Ue+this[++Pe]*Math.pow(2,8)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,24),Ce=this[++Pe]+this[++Pe]*Math.pow(2,8)+this[++Pe]*Math.pow(2,16)+He*Math.pow(2,24);return BigInt(Oe)+(BigInt(Ce)<<BigInt(32))}),n.prototype.readBigUInt64BE=vt(function(Pe){Pe=Pe>>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=Ue*Math.pow(2,24)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,8)+this[++Pe],Ce=this[++Pe]*Math.pow(2,24)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,8)+He;return(BigInt(Oe)<<BigInt(32))+BigInt(Ce)}),n.prototype.readIntLE=function(Pe,Ue,He){Pe=Pe>>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=this[Pe],Ce=1,ge=0;++ge<Ue&&(Ce*=256);)Oe+=this[Pe+ge]*Ce;return Ce*=128,Oe>=Ce&&(Oe-=Math.pow(2,8*Ue)),Oe},n.prototype.readIntBE=function(Pe,Ue,He){Pe=Pe>>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=Ue,Ce=1,ge=this[Pe+--Oe];Oe>0&&(Ce*=256);)ge+=this[Pe+--Oe]*Ce;return Ce*=128,ge>=Ce&&(ge-=Math.pow(2,8*Ue)),ge},n.prototype.readInt8=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,1,this.length),this[Pe]&128?(255-this[Pe]+1)*-1:this[Pe]},n.prototype.readInt16LE=function(Pe,Ue){Pe=Pe>>>0,Ue||K(Pe,2,this.length);var He=this[Pe]|this[Pe+1]<<8;return He&32768?He|4294901760:He},n.prototype.readInt16BE=function(Pe,Ue){Pe=Pe>>>0,Ue||K(Pe,2,this.length);var He=this[Pe+1]|this[Pe]<<8;return He&32768?He|4294901760:He},n.prototype.readInt32LE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16|this[Pe+3]<<24},n.prototype.readInt32BE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),this[Pe]<<24|this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3]},n.prototype.readBigInt64LE=vt(function(Pe){Pe=Pe>>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=this[Pe+4]+this[Pe+5]*Math.pow(2,8)+this[Pe+6]*Math.pow(2,16)+(He<<24);return(BigInt(Oe)<<BigInt(32))+BigInt(Ue+this[++Pe]*Math.pow(2,8)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,24))}),n.prototype.readBigInt64BE=vt(function(Pe){Pe=Pe>>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=(Ue<<24)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,8)+this[++Pe];return(BigInt(Oe)<<BigInt(32))+BigInt(this[++Pe]*Math.pow(2,24)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,8)+He)}),n.prototype.readFloatLE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),l.read(this,Pe,!0,23,4)},n.prototype.readFloatBE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),l.read(this,Pe,!1,23,4)},n.prototype.readDoubleLE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,8,this.length),l.read(this,Pe,!0,52,8)},n.prototype.readDoubleBE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,8,this.length),l.read(this,Pe,!1,52,8)};function Y(Je,Pe,Ue,He,Oe,Ce){if(!n.isBuffer(Je))throw new TypeError('"buffer" argument must be a Buffer instance');if(Pe>Oe||Pe<Ce)throw new RangeError('"value" argument is out of bounds');if(Ue+He>Je.length)throw new RangeError("Index out of range")}n.prototype.writeUintLE=n.prototype.writeUIntLE=function(Pe,Ue,He,Oe){if(Pe=+Pe,Ue=Ue>>>0,He=He>>>0,!Oe){var Ce=Math.pow(2,8*He)-1;Y(this,Pe,Ue,He,Ce,0)}var ge=1,pe=0;for(this[Ue]=Pe&255;++pe<He&&(ge*=256);)this[Ue+pe]=Pe/ge&255;return Ue+He},n.prototype.writeUintBE=n.prototype.writeUIntBE=function(Pe,Ue,He,Oe){if(Pe=+Pe,Ue=Ue>>>0,He=He>>>0,!Oe){var Ce=Math.pow(2,8*He)-1;Y(this,Pe,Ue,He,Ce,0)}var ge=He-1,pe=1;for(this[Ue+ge]=Pe&255;--ge>=0&&(pe*=256);)this[Ue+ge]=Pe/pe&255;return Ue+He},n.prototype.writeUint8=n.prototype.writeUInt8=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,1,255,0),this[Ue]=Pe&255,Ue+1},n.prototype.writeUint16LE=n.prototype.writeUInt16LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,65535,0),this[Ue]=Pe&255,this[Ue+1]=Pe>>>8,Ue+2},n.prototype.writeUint16BE=n.prototype.writeUInt16BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,65535,0),this[Ue]=Pe>>>8,this[Ue+1]=Pe&255,Ue+2},n.prototype.writeUint32LE=n.prototype.writeUInt32LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,4294967295,0),this[Ue+3]=Pe>>>24,this[Ue+2]=Pe>>>16,this[Ue+1]=Pe>>>8,this[Ue]=Pe&255,Ue+4},n.prototype.writeUint32BE=n.prototype.writeUInt32BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,4294967295,0),this[Ue]=Pe>>>24,this[Ue+1]=Pe>>>16,this[Ue+2]=Pe>>>8,this[Ue+3]=Pe&255,Ue+4};function ie(Je,Pe,Ue,He,Oe){ye(Pe,He,Oe,Je,Ue,7);var Ce=Number(Pe&BigInt(4294967295));Je[Ue++]=Ce,Ce=Ce>>8,Je[Ue++]=Ce,Ce=Ce>>8,Je[Ue++]=Ce,Ce=Ce>>8,Je[Ue++]=Ce;var ge=Number(Pe>>BigInt(32)&BigInt(4294967295));return Je[Ue++]=ge,ge=ge>>8,Je[Ue++]=ge,ge=ge>>8,Je[Ue++]=ge,ge=ge>>8,Je[Ue++]=ge,Ue}function ne(Je,Pe,Ue,He,Oe){ye(Pe,He,Oe,Je,Ue,7);var Ce=Number(Pe&BigInt(4294967295));Je[Ue+7]=Ce,Ce=Ce>>8,Je[Ue+6]=Ce,Ce=Ce>>8,Je[Ue+5]=Ce,Ce=Ce>>8,Je[Ue+4]=Ce;var ge=Number(Pe>>BigInt(32)&BigInt(4294967295));return Je[Ue+3]=ge,ge=ge>>8,Je[Ue+2]=ge,ge=ge>>8,Je[Ue+1]=ge,ge=ge>>8,Je[Ue]=ge,Ue+8}n.prototype.writeBigUInt64LE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ie(this,Pe,Ue,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeBigUInt64BE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Pe,Ue,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeIntLE=function(Pe,Ue,He,Oe){if(Pe=+Pe,Ue=Ue>>>0,!Oe){var Ce=Math.pow(2,8*He-1);Y(this,Pe,Ue,He,Ce-1,-Ce)}var ge=0,pe=1,Te=0;for(this[Ue]=Pe&255;++ge<He&&(pe*=256);)Pe<0&&Te===0&&this[Ue+ge-1]!==0&&(Te=1),this[Ue+ge]=(Pe/pe>>0)-Te&255;return Ue+He},n.prototype.writeIntBE=function(Pe,Ue,He,Oe){if(Pe=+Pe,Ue=Ue>>>0,!Oe){var Ce=Math.pow(2,8*He-1);Y(this,Pe,Ue,He,Ce-1,-Ce)}var ge=He-1,pe=1,Te=0;for(this[Ue+ge]=Pe&255;--ge>=0&&(pe*=256);)Pe<0&&Te===0&&this[Ue+ge+1]!==0&&(Te=1),this[Ue+ge]=(Pe/pe>>0)-Te&255;return Ue+He},n.prototype.writeInt8=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,1,127,-128),Pe<0&&(Pe=255+Pe+1),this[Ue]=Pe&255,Ue+1},n.prototype.writeInt16LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,32767,-32768),this[Ue]=Pe&255,this[Ue+1]=Pe>>>8,Ue+2},n.prototype.writeInt16BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,32767,-32768),this[Ue]=Pe>>>8,this[Ue+1]=Pe&255,Ue+2},n.prototype.writeInt32LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,2147483647,-2147483648),this[Ue]=Pe&255,this[Ue+1]=Pe>>>8,this[Ue+2]=Pe>>>16,this[Ue+3]=Pe>>>24,Ue+4},n.prototype.writeInt32BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,2147483647,-2147483648),Pe<0&&(Pe=4294967295+Pe+1),this[Ue]=Pe>>>24,this[Ue+1]=Pe>>>16,this[Ue+2]=Pe>>>8,this[Ue+3]=Pe&255,Ue+4},n.prototype.writeBigInt64LE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ie(this,Pe,Ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),n.prototype.writeBigInt64BE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Pe,Ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(Je,Pe,Ue,He,Oe,Ce){if(Ue+He>Je.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function de(Je,Pe,Ue,He,Oe){return Pe=+Pe,Ue=Ue>>>0,Oe||le(Je,Pe,Ue,4),l.write(Je,Pe,Ue,He,23,4),Ue+4}n.prototype.writeFloatLE=function(Pe,Ue,He){return de(this,Pe,Ue,!0,He)},n.prototype.writeFloatBE=function(Pe,Ue,He){return de(this,Pe,Ue,!1,He)};function we(Je,Pe,Ue,He,Oe){return Pe=+Pe,Ue=Ue>>>0,Oe||le(Je,Pe,Ue,8),l.write(Je,Pe,Ue,He,52,8),Ue+8}n.prototype.writeDoubleLE=function(Pe,Ue,He){return we(this,Pe,Ue,!0,He)},n.prototype.writeDoubleBE=function(Pe,Ue,He){return we(this,Pe,Ue,!1,He)},n.prototype.copy=function(Pe,Ue,He,Oe){if(!n.isBuffer(Pe))throw new TypeError("argument should be a Buffer");if(He||(He=0),!Oe&&Oe!==0&&(Oe=this.length),Ue>=Pe.length&&(Ue=Pe.length),Ue||(Ue=0),Oe>0&&Oe<He&&(Oe=He),Oe===He||Pe.length===0||this.length===0)return 0;if(Ue<0)throw new RangeError("targetStart out of bounds");if(He<0||He>=this.length)throw new RangeError("Index out of range");if(Oe<0)throw new RangeError("sourceEnd out of bounds");Oe>this.length&&(Oe=this.length),Pe.length-Ue<Oe-He&&(Oe=Pe.length-Ue+He);var Ce=Oe-He;return this===Pe&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Ue,He,Oe):Uint8Array.prototype.set.call(Pe,this.subarray(He,Oe),Ue),Ce},n.prototype.fill=function(Pe,Ue,He,Oe){if(typeof Pe=="string"){if(typeof Ue=="string"?(Oe=Ue,Ue=0,He=this.length):typeof He=="string"&&(Oe=He,He=this.length),Oe!==void 0&&typeof Oe!="string")throw new TypeError("encoding must be a string");if(typeof Oe=="string"&&!n.isEncoding(Oe))throw new TypeError("Unknown encoding: "+Oe);if(Pe.length===1){var Ce=Pe.charCodeAt(0);(Oe==="utf8"&&Ce<128||Oe==="latin1")&&(Pe=Ce)}}else typeof Pe=="number"?Pe=Pe&255:typeof Pe=="boolean"&&(Pe=Number(Pe));if(Ue<0||this.length<Ue||this.length<He)throw new RangeError("Out of range index");if(He<=Ue)return this;Ue=Ue>>>0,He=He===void 0?this.length:He>>>0,Pe||(Pe=0);var ge;if(typeof Pe=="number")for(ge=Ue;ge<He;++ge)this[ge]=Pe;else{var pe=n.isBuffer(Pe)?Pe:n.from(Pe,Oe),Te=pe.length;if(Te===0)throw new TypeError('The value "'+Pe+'" is invalid for argument "value"');for(ge=0;ge<He-Ue;++ge)this[ge+Ue]=pe[ge%Te]}return this};var me={};function Le(Je,Pe,Ue){me[Je]=function(He){s(Oe,He);function Oe(){var Ce;return A(this,Oe),Ce=d(this,Oe),Object.defineProperty(t(Ce),"message",{value:Pe.apply(t(Ce),arguments),writable:!0,configurable:!0}),Ce.name="".concat(Ce.name," [").concat(Je,"]"),Ce.stack,delete Ce.name,Ce}return o(Oe,[{key:"code",get:function(){return Je},set:function(ge){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ge,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Je,"]: ").concat(this.message)}}]),Oe}(Ue)}Le("ERR_BUFFER_OUT_OF_BOUNDS",function(Je){return Je?"".concat(Je," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Le("ERR_INVALID_ARG_TYPE",function(Je,Pe){return'The "'.concat(Je,'" argument must be of type number. Received type ').concat(c(Pe))},TypeError),Le("ERR_OUT_OF_RANGE",function(Je,Pe,Ue){var He='The value of "'.concat(Je,'" is out of range.'),Oe=Ue;return Number.isInteger(Ue)&&Math.abs(Ue)>Math.pow(2,32)?Oe=ve(String(Ue)):typeof Ue=="bigint"&&(Oe=String(Ue),(Ue>Math.pow(BigInt(2),BigInt(32))||Ue<-Math.pow(BigInt(2),BigInt(32)))&&(Oe=ve(Oe)),Oe+="n"),He+=" It must be ".concat(Pe,". Received ").concat(Oe),He},RangeError);function ve(Je){for(var Pe="",Ue=Je.length,He=Je[0]==="-"?1:0;Ue>=He+4;Ue-=3)Pe="_".concat(Je.slice(Ue-3,Ue)).concat(Pe);return"".concat(Je.slice(0,Ue)).concat(Pe)}function Ae(Je,Pe,Ue){Se(Pe,"offset"),(Je[Pe]===void 0||Je[Pe+Ue]===void 0)&&_e(Pe,Je.length-(Ue+1))}function ye(Je,Pe,Ue,He,Oe,Ce){if(Je>Ue||Je<Pe){var ge=typeof Pe=="bigint"?"n":"",pe;throw Pe===0||Pe===BigInt(0)?pe=">= 0".concat(ge," and < 2").concat(ge," ** ").concat((Ce+1)*8).concat(ge):pe=">= -(2".concat(ge," ** ").concat((Ce+1)*8-1).concat(ge,") and < 2 ** ")+"".concat((Ce+1)*8-1).concat(ge),new me.ERR_OUT_OF_RANGE("value",pe,Je)}Ae(He,Oe,Ce)}function Se(Je,Pe){if(typeof Je!="number")throw new me.ERR_INVALID_ARG_TYPE(Pe,"number",Je)}function _e(Je,Pe,Ue){throw Math.floor(Je)!==Je?(Se(Je,Ue),new me.ERR_OUT_OF_RANGE("offset","an integer",Je)):Pe<0?new me.ERR_BUFFER_OUT_OF_BOUNDS:new me.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(Pe),Je)}var ze=/[^+/0-9A-Za-z-_]/g;function Ie(Je){if(Je=Je.split("=")[0],Je=Je.trim().replace(ze,""),Je.length<2)return"";for(;Je.length%4!==0;)Je=Je+"=";return Je}function Ne(Je,Pe){Pe=Pe||1/0;for(var Ue,He=Je.length,Oe=null,Ce=[],ge=0;ge<He;++ge){if(Ue=Je.charCodeAt(ge),Ue>55295&&Ue<57344){if(!Oe){if(Ue>56319){(Pe-=3)>-1&&Ce.push(239,191,189);continue}else if(ge+1===He){(Pe-=3)>-1&&Ce.push(239,191,189);continue}Oe=Ue;continue}if(Ue<56320){(Pe-=3)>-1&&Ce.push(239,191,189),Oe=Ue;continue}Ue=(Oe-55296<<10|Ue-56320)+65536}else Oe&&(Pe-=3)>-1&&Ce.push(239,191,189);if(Oe=null,Ue<128){if((Pe-=1)<0)break;Ce.push(Ue)}else if(Ue<2048){if((Pe-=2)<0)break;Ce.push(Ue>>6|192,Ue&63|128)}else if(Ue<65536){if((Pe-=3)<0)break;Ce.push(Ue>>12|224,Ue>>6&63|128,Ue&63|128)}else if(Ue<1114112){if((Pe-=4)<0)break;Ce.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,Ue&63|128)}else throw new Error("Invalid code point")}return Ce}function et(Je){for(var Pe=[],Ue=0;Ue<Je.length;++Ue)Pe.push(Je.charCodeAt(Ue)&255);return Pe}function st(Je,Pe){for(var Ue,He,Oe,Ce=[],ge=0;ge<Je.length&&!((Pe-=2)<0);++ge)Ue=Je.charCodeAt(ge),He=Ue>>8,Oe=Ue%256,Ce.push(Oe),Ce.push(He);return Ce}function Ze(Je){return u.toByteArray(Ie(Je))}function Ke(Je,Pe,Ue,He){var Oe;for(Oe=0;Oe<He&&!(Oe+Ue>=Pe.length||Oe>=Je.length);++Oe)Pe[Oe+Ue]=Je[Oe];return Oe}function nt(Je,Pe){return Je instanceof Pe||Je!=null&&Je.constructor!=null&&Je.constructor.name!=null&&Je.constructor.name===Pe.name}function it(Je){return Je!==Je}var lt=function(){for(var Je="0123456789abcdef",Pe=new Array(256),Ue=0;Ue<16;++Ue)for(var He=Ue*16,Oe=0;Oe<16;++Oe)Pe[He+Oe]=Je[Ue]+Je[Oe];return Pe}();function vt(Je){return typeof BigInt>"u"?xt:Je}function xt(){throw new Error("BigInt not supported")}},25928:function(te){te.exports=P,te.exports.isMobile=P,te.exports.default=P;var X=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,A=/android|ipad|playbook|silk/i;function P(o){o||(o={});var L=o.ua;if(!L&&typeof navigator<"u"&&(L=navigator.userAgent),L&&L.headers&&typeof L.headers["user-agent"]=="string"&&(L=L.headers["user-agent"]),typeof L!="string")return!1;var M=X.test(L)&&!e.test(L)||!!o.tablet&&A.test(L);return!M&&o.tablet&&o.featureDetect&&navigator&&navigator.maxTouchPoints>1&&L.indexOf("Macintosh")!==-1&&L.indexOf("Safari")!==-1&&(M=!0),M}},48932:function(te,X,e){e.r(X),e.d(X,{sankeyCenter:function(){return s},sankeyCircular:function(){return C},sankeyJustify:function(){return t},sankeyLeft:function(){return g},sankeyRight:function(){return r}});var A=e(84706),P=e(34712),o=e(10132),L=e(6688),M=e.n(L);function d(me){return me.target.depth}function g(me){return me.depth}function r(me,Le){return Le-1-me.height}function t(me,Le){return me.sourceLinks.length?me.depth:Le-1}function s(me){return me.targetLinks.length?me.depth:me.sourceLinks.length?(0,A.SY)(me.sourceLinks,d)-1:0}function a(me){return function(){return me}}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(me){return typeof me}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me};function u(me,Le){return y(me.source,Le.source)||me.index-Le.index}function l(me,Le){return y(me.target,Le.target)||me.index-Le.index}function y(me,Le){return me.partOfCycle===Le.partOfCycle?me.y0-Le.y0:me.circularLinkType==="top"||Le.circularLinkType==="bottom"?-1:1}function h(me){return me.value}function T(me){return(me.y0+me.y1)/2}function f(me){return T(me.source)}function n(me){return T(me.target)}function v(me){return me.index}function m(me){return me.nodes}function b(me){return me.links}function E(me,Le){var ve=me.get(Le);if(!ve)throw new Error("missing: "+Le);return ve}function p(me,Le){return Le(me)}var S=25,w=10,i=.3;function C(){var me=0,Le=0,ve=1,Ae=1,ye=24,Se,_e=v,ze=t,Ie=m,Ne=b,et=32,st=2,Ze,Ke=null;function nt(){var He={nodes:Ie.apply(null,arguments),links:Ne.apply(null,arguments)};it(He),x(He,_e,Ke),lt(He),Je(He),k(He,_e),Pe(He,et,_e),Ue(He);for(var Oe=4,Ce=0;Ce<Oe;Ce++)Y(He,Ae,_e),ie(He,Ae,_e),J(He,Le,Ae,_e),Y(He,Ae,_e),ie(He,Ae,_e);return we(He,Le,Ae),F(He,st,Ae,_e),He}nt.nodeId=function(He){return arguments.length?(_e=typeof He=="function"?He:a(He),nt):_e},nt.nodeAlign=function(He){return arguments.length?(ze=typeof He=="function"?He:a(He),nt):ze},nt.nodeWidth=function(He){return arguments.length?(ye=+He,nt):ye},nt.nodePadding=function(He){return arguments.length?(Se=+He,nt):Se},nt.nodes=function(He){return arguments.length?(Ie=typeof He=="function"?He:a(He),nt):Ie},nt.links=function(He){return arguments.length?(Ne=typeof He=="function"?He:a(He),nt):Ne},nt.size=function(He){return arguments.length?(me=Le=0,ve=+He[0],Ae=+He[1],nt):[ve-me,Ae-Le]},nt.extent=function(He){return arguments.length?(me=+He[0][0],ve=+He[1][0],Le=+He[0][1],Ae=+He[1][1],nt):[[me,Le],[ve,Ae]]},nt.iterations=function(He){return arguments.length?(et=+He,nt):et},nt.circularLinkGap=function(He){return arguments.length?(st=+He,nt):st},nt.nodePaddingRatio=function(He){return arguments.length?(Ze=+He,nt):Ze},nt.sortNodes=function(He){return arguments.length?(Ke=He,nt):Ke},nt.update=function(He){return k(He,_e),Ue(He),He.links.forEach(function(Oe){Oe.circular&&(Oe.circularLinkType=Oe.y0+Oe.y1<Ae?"top":"bottom",Oe.source.circularLinkType=Oe.circularLinkType,Oe.target.circularLinkType=Oe.circularLinkType)}),Y(He,Ae,_e,!1),ie(He,Ae,_e),F(He,st,Ae,_e),He};function it(He){He.nodes.forEach(function(Ce,ge){Ce.index=ge,Ce.sourceLinks=[],Ce.targetLinks=[]});var Oe=(0,P.kH)(He.nodes,_e);return He.links.forEach(function(Ce,ge){Ce.index=ge;var pe=Ce.source,Te=Ce.target;(typeof pe>"u"?"undefined":c(pe))!=="object"&&(pe=Ce.source=E(Oe,pe)),(typeof Te>"u"?"undefined":c(Te))!=="object"&&(Te=Ce.target=E(Oe,Te)),pe.sourceLinks.push(Ce),Te.targetLinks.push(Ce)}),He}function lt(He){He.nodes.forEach(function(Oe){Oe.partOfCycle=!1,Oe.value=Math.max((0,A.oh)(Oe.sourceLinks,h),(0,A.oh)(Oe.targetLinks,h)),Oe.sourceLinks.forEach(function(Ce){Ce.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Ce.circularLinkType)}),Oe.targetLinks.forEach(function(Ce){Ce.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Ce.circularLinkType)})})}function vt(He){var Oe=0,Ce=0,ge=0,pe=0,Te=(0,A.kv)(He.nodes,function(be){return be.column});return He.links.forEach(function(be){be.circular&&(be.circularLinkType=="top"?Oe=Oe+be.width:Ce=Ce+be.width,be.target.column==0&&(pe=pe+be.width),be.source.column==Te&&(ge=ge+be.width))}),Oe=Oe>0?Oe+S+w:Oe,Ce=Ce>0?Ce+S+w:Ce,ge=ge>0?ge+S+w:ge,pe=pe>0?pe+S+w:pe,{top:Oe,bottom:Ce,left:pe,right:ge}}function xt(He,Oe){var Ce=(0,A.kv)(He.nodes,function(je){return je.column}),ge=ve-me,pe=Ae-Le,Te=ge+Oe.right+Oe.left,be=pe+Oe.top+Oe.bottom,ke=ge/Te,Ve=pe/be;return me=me*ke+Oe.left,ve=Oe.right==0?ve:ve*ke,Le=Le*Ve+Oe.top,Ae=Ae*Ve,He.nodes.forEach(function(je){je.x0=me+je.column*((ve-me-ye)/Ce),je.x1=je.x0+ye}),Ve}function Je(He){var Oe,Ce,ge;for(Oe=He.nodes,Ce=[],ge=0;Oe.length;++ge,Oe=Ce,Ce=[])Oe.forEach(function(pe){pe.depth=ge,pe.sourceLinks.forEach(function(Te){Ce.indexOf(Te.target)<0&&!Te.circular&&Ce.push(Te.target)})});for(Oe=He.nodes,Ce=[],ge=0;Oe.length;++ge,Oe=Ce,Ce=[])Oe.forEach(function(pe){pe.height=ge,pe.targetLinks.forEach(function(Te){Ce.indexOf(Te.source)<0&&!Te.circular&&Ce.push(Te.source)})});He.nodes.forEach(function(pe){pe.column=Math.floor(ze.call(null,pe,ge))})}function Pe(He,Oe,Ce){var ge=(0,P.UJ)().key(function(je){return je.column}).sortKeys(A.XE).entries(He.nodes).map(function(je){return je.values});be(Ce),Ve();for(var pe=1,Te=Oe;Te>0;--Te)ke(pe*=.99,Ce),Ve();function be(je){if(Ze){var at=1/0;ge.forEach(function(gt){var Ct=Ae*Ze/(gt.length+1);at=Ct<at?Ct:at}),Se=at}var ut=(0,A.SY)(ge,function(gt){return(Ae-Le-(gt.length-1)*Se)/(0,A.oh)(gt,h)});ut=ut*i,He.links.forEach(function(gt){gt.width=gt.value*ut});var Nt=vt(He),Vt=xt(He,Nt);ut=ut*Vt,He.links.forEach(function(gt){gt.width=gt.value*ut}),ge.forEach(function(gt){var Ct=gt.length;gt.forEach(function(Yt,gr){Yt.depth==ge.length-1&&Ct==1||Yt.depth==0&&Ct==1?(Yt.y0=Ae/2-Yt.value*ut,Yt.y1=Yt.y0+Yt.value*ut):Yt.partOfCycle?_(Yt,je)==0?(Yt.y0=Ae/2+gr,Yt.y1=Yt.y0+Yt.value*ut):Yt.circularLinkType=="top"?(Yt.y0=Le+gr,Yt.y1=Yt.y0+Yt.value*ut):(Yt.y0=Ae-Yt.value*ut-gr,Yt.y1=Yt.y0+Yt.value*ut):Nt.top==0||Nt.bottom==0?(Yt.y0=(Ae-Le)/Ct*gr,Yt.y1=Yt.y0+Yt.value*ut):(Yt.y0=(Ae-Le)/2-Ct/2+gr,Yt.y1=Yt.y0+Yt.value*ut)})})}function ke(je,at){var ut=ge.length;ge.forEach(function(Nt){var Vt=Nt.length,gt=Nt[0].depth;Nt.forEach(function(Ct){var Yt;if((Ct.sourceLinks.length||Ct.targetLinks.length)&&!(Ct.partOfCycle&&_(Ct,at)>0))if(gt==0&&Vt==1)Yt=Ct.y1-Ct.y0,Ct.y0=Ae/2-Yt/2,Ct.y1=Ae/2+Yt/2;else if(gt==ut-1&&Vt==1)Yt=Ct.y1-Ct.y0,Ct.y0=Ae/2-Yt/2,Ct.y1=Ae/2+Yt/2;else{var gr=0,ht=(0,A.mo)(Ct.sourceLinks,n),Ht=(0,A.mo)(Ct.targetLinks,f);ht&&Ht?gr=(ht+Ht)/2:gr=ht||Ht;var Wt=(gr-T(Ct))*je;Ct.y0+=Wt,Ct.y1+=Wt}})})}function Ve(){ge.forEach(function(je){var at,ut,Nt=Le,Vt=je.length,gt;for(je.sort(y),gt=0;gt<Vt;++gt)at=je[gt],ut=Nt-at.y0,ut>0&&(at.y0+=ut,at.y1+=ut),Nt=at.y1+Se;if(ut=Nt-Se-Ae,ut>0)for(Nt=at.y0-=ut,at.y1-=ut,gt=Vt-2;gt>=0;--gt)at=je[gt],ut=at.y1+Se-Nt,ut>0&&(at.y0-=ut,at.y1-=ut),Nt=at.y0})}}function Ue(He){He.nodes.forEach(function(Oe){Oe.sourceLinks.sort(l),Oe.targetLinks.sort(u)}),He.nodes.forEach(function(Oe){var Ce=Oe.y0,ge=Ce,pe=Oe.y1,Te=pe;Oe.sourceLinks.forEach(function(be){be.circular?(be.y0=pe-be.width/2,pe=pe-be.width):(be.y0=Ce+be.width/2,Ce+=be.width)}),Oe.targetLinks.forEach(function(be){be.circular?(be.y1=Te-be.width/2,Te=Te-be.width):(be.y1=ge+be.width/2,ge+=be.width)})})}return nt}function x(me,Le,ve){var Ae=0;if(ve===null){for(var ye=[],Se=0;Se<me.links.length;Se++){var _e=me.links[Se],ze=_e.source.index,Ie=_e.target.index;ye[ze]||(ye[ze]=[]),ye[Ie]||(ye[Ie]=[]),ye[ze].indexOf(Ie)===-1&&ye[ze].push(Ie)}var Ne=M()(ye);Ne.sort(function(Ke,nt){return Ke.length-nt.length});var et={};for(Se=0;Se<Ne.length;Se++){var st=Ne[Se],Ze=st.slice(-2);et[Ze[0]]||(et[Ze[0]]={}),et[Ze[0]][Ze[1]]=!0}me.links.forEach(function(Ke){var nt=Ke.target.index,it=Ke.source.index;nt===it||et[it]&&et[it][nt]?(Ke.circular=!0,Ke.circularLinkID=Ae,Ae=Ae+1):Ke.circular=!1})}else me.links.forEach(function(Ke){Ke.source[ve]<Ke.target[ve]?Ke.circular=!1:(Ke.circular=!0,Ke.circularLinkID=Ae,Ae=Ae+1)})}function k(me,Le){var ve=0,Ae=0;me.links.forEach(function(ye){ye.circular&&(ye.source.circularLinkType||ye.target.circularLinkType?ye.circularLinkType=ye.source.circularLinkType?ye.source.circularLinkType:ye.target.circularLinkType:ye.circularLinkType=ve<Ae?"top":"bottom",ye.circularLinkType=="top"?ve=ve+1:Ae=Ae+1,me.nodes.forEach(function(Se){(p(Se,Le)==p(ye.source,Le)||p(Se,Le)==p(ye.target,Le))&&(Se.circularLinkType=ye.circularLinkType)}))}),me.links.forEach(function(ye){ye.circular&&(ye.source.circularLinkType==ye.target.circularLinkType&&(ye.circularLinkType=ye.source.circularLinkType),de(ye,Le)&&(ye.circularLinkType=ye.source.circularLinkType))})}function I(me){var Le=Math.abs(me.y1-me.y0),ve=Math.abs(me.target.x0-me.source.x1);return Math.atan(ve/Le)}function B(me,Le){return me.source.column<Le.target.column?!1:!(me.target.column>Le.source.column)}function _(me,Le){var ve=0;me.sourceLinks.forEach(function(ye){ve=ye.circular&&!de(ye,Le)?ve+1:ve});var Ae=0;return me.targetLinks.forEach(function(ye){Ae=ye.circular&&!de(ye,Le)?Ae+1:Ae}),ve+Ae}function z(me){var Le=me.source.sourceLinks,ve=0;Le.forEach(function(Se){ve=Se.circular?ve+1:ve});var Ae=me.target.targetLinks,ye=0;return Ae.forEach(function(Se){ye=Se.circular?ye+1:ye}),!(ve>1||ye>1)}function O(me,Le,ve){return me.sort(V),me.forEach(function(Ae,ye){var Se=0;if(de(Ae,ve)&&z(Ae))Ae.circularPathData.verticalBuffer=Se+Ae.width/2;else{var _e=0;for(_e;_e<ye;_e++)if(B(me[ye],me[_e])){var ze=me[_e].circularPathData.verticalBuffer+me[_e].width/2+Le;Se=ze>Se?ze:Se}Ae.circularPathData.verticalBuffer=Se+Ae.width/2}}),me}function F(me,Le,ve,Ae){var ye=5,Se=(0,A.SY)(me.links,function(Ie){return Ie.source.y0});me.links.forEach(function(Ie){Ie.circular&&(Ie.circularPathData={})});var _e=me.links.filter(function(Ie){return Ie.circularLinkType=="top"});O(_e,Le,Ae);var ze=me.links.filter(function(Ie){return Ie.circularLinkType=="bottom"});O(ze,Le,Ae),me.links.forEach(function(Ie){if(Ie.circular){if(Ie.circularPathData.arcRadius=Ie.width+w,Ie.circularPathData.leftNodeBuffer=ye,Ie.circularPathData.rightNodeBuffer=ye,Ie.circularPathData.sourceWidth=Ie.source.x1-Ie.source.x0,Ie.circularPathData.sourceX=Ie.source.x0+Ie.circularPathData.sourceWidth,Ie.circularPathData.targetX=Ie.target.x0,Ie.circularPathData.sourceY=Ie.y0,Ie.circularPathData.targetY=Ie.y1,de(Ie,Ae)&&z(Ie))Ie.circularPathData.leftSmallArcRadius=w+Ie.width/2,Ie.circularPathData.leftLargeArcRadius=w+Ie.width/2,Ie.circularPathData.rightSmallArcRadius=w+Ie.width/2,Ie.circularPathData.rightLargeArcRadius=w+Ie.width/2,Ie.circularLinkType=="bottom"?(Ie.circularPathData.verticalFullExtent=Ie.source.y1+S+Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.rightLargeArcRadius):(Ie.circularPathData.verticalFullExtent=Ie.source.y0-S-Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.rightLargeArcRadius);else{var Ne=Ie.source.column,et=Ie.circularLinkType,st=me.links.filter(function(nt){return nt.source.column==Ne&&nt.circularLinkType==et});Ie.circularLinkType=="bottom"?st.sort($):st.sort(j);var Ze=0;st.forEach(function(nt,it){nt.circularLinkID==Ie.circularLinkID&&(Ie.circularPathData.leftSmallArcRadius=w+Ie.width/2+Ze,Ie.circularPathData.leftLargeArcRadius=w+Ie.width/2+it*Le+Ze),Ze=Ze+nt.width}),Ne=Ie.target.column,st=me.links.filter(function(nt){return nt.target.column==Ne&&nt.circularLinkType==et}),Ie.circularLinkType=="bottom"?st.sort(oe):st.sort(q),Ze=0,st.forEach(function(nt,it){nt.circularLinkID==Ie.circularLinkID&&(Ie.circularPathData.rightSmallArcRadius=w+Ie.width/2+Ze,Ie.circularPathData.rightLargeArcRadius=w+Ie.width/2+it*Le+Ze),Ze=Ze+nt.width}),Ie.circularLinkType=="bottom"?(Ie.circularPathData.verticalFullExtent=Math.max(ve,Ie.source.y1,Ie.target.y1)+S+Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.rightLargeArcRadius):(Ie.circularPathData.verticalFullExtent=Se-S-Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.rightLargeArcRadius)}Ie.circularPathData.leftInnerExtent=Ie.circularPathData.sourceX+Ie.circularPathData.leftNodeBuffer,Ie.circularPathData.rightInnerExtent=Ie.circularPathData.targetX-Ie.circularPathData.rightNodeBuffer,Ie.circularPathData.leftFullExtent=Ie.circularPathData.sourceX+Ie.circularPathData.leftLargeArcRadius+Ie.circularPathData.leftNodeBuffer,Ie.circularPathData.rightFullExtent=Ie.circularPathData.targetX-Ie.circularPathData.rightLargeArcRadius-Ie.circularPathData.rightNodeBuffer}if(Ie.circular)Ie.path=N(Ie);else{var Ke=(0,o.ak)().source(function(nt){var it=nt.source.x0+(nt.source.x1-nt.source.x0),lt=nt.y0;return[it,lt]}).target(function(nt){var it=nt.target.x0,lt=nt.y1;return[it,lt]});Ie.path=Ke(Ie)}})}function N(me){var Le="";return me.circularLinkType=="top"?Le="M"+me.circularPathData.sourceX+" "+me.circularPathData.sourceY+" L"+me.circularPathData.leftInnerExtent+" "+me.circularPathData.sourceY+" A"+me.circularPathData.leftLargeArcRadius+" "+me.circularPathData.leftSmallArcRadius+" 0 0 0 "+me.circularPathData.leftFullExtent+" "+(me.circularPathData.sourceY-me.circularPathData.leftSmallArcRadius)+" L"+me.circularPathData.leftFullExtent+" "+me.circularPathData.verticalLeftInnerExtent+" A"+me.circularPathData.leftLargeArcRadius+" "+me.circularPathData.leftLargeArcRadius+" 0 0 0 "+me.circularPathData.leftInnerExtent+" "+me.circularPathData.verticalFullExtent+" L"+me.circularPathData.rightInnerExtent+" "+me.circularPathData.verticalFullExtent+" A"+me.circularPathData.rightLargeArcRadius+" "+me.circularPathData.rightLargeArcRadius+" 0 0 0 "+me.circularPathData.rightFullExtent+" "+me.circularPathData.verticalRightInnerExtent+" L"+me.circularPathData.rightFullExtent+" "+(me.circularPathData.targetY-me.circularPathData.rightSmallArcRadius)+" A"+me.circularPathData.rightLargeArcRadius+" "+me.circularPathData.rightSmallArcRadius+" 0 0 0 "+me.circularPathData.rightInnerExtent+" "+me.circularPathData.targetY+" L"+me.circularPathData.targetX+" "+me.circularPathData.targetY:Le="M"+me.circularPathData.sourceX+" "+me.circularPathData.sourceY+" L"+me.circularPathData.leftInnerExtent+" "+me.circularPathData.sourceY+" A"+me.circularPathData.leftLargeArcRadius+" "+me.circularPathData.leftSmallArcRadius+" 0 0 1 "+me.circularPathData.leftFullExtent+" "+(me.circularPathData.sourceY+me.circularPathData.leftSmallArcRadius)+" L"+me.circularPathData.leftFullExtent+" "+me.circularPathData.verticalLeftInnerExtent+" A"+me.circularPathData.leftLargeArcRadius+" "+me.circularPathData.leftLargeArcRadius+" 0 0 1 "+me.circularPathData.leftInnerExtent+" "+me.circularPathData.verticalFullExtent+" L"+me.circularPathData.rightInnerExtent+" "+me.circularPathData.verticalFullExtent+" A"+me.circularPathData.rightLargeArcRadius+" "+me.circularPathData.rightLargeArcRadius+" 0 0 1 "+me.circularPathData.rightFullExtent+" "+me.circularPathData.verticalRightInnerExtent+" L"+me.circularPathData.rightFullExtent+" "+(me.circularPathData.targetY+me.circularPathData.rightSmallArcRadius)+" A"+me.circularPathData.rightLargeArcRadius+" "+me.circularPathData.rightSmallArcRadius+" 0 0 1 "+me.circularPathData.rightInnerExtent+" "+me.circularPathData.targetY+" L"+me.circularPathData.targetX+" "+me.circularPathData.targetY,Le}function V(me,Le){return Z(me)==Z(Le)?me.circularLinkType=="bottom"?$(me,Le):j(me,Le):Z(Le)-Z(me)}function j(me,Le){return me.y0-Le.y0}function $(me,Le){return Le.y0-me.y0}function q(me,Le){return me.y1-Le.y1}function oe(me,Le){return Le.y1-me.y1}function Z(me){return me.target.column-me.source.column}function G(me){return me.target.x0-me.source.x1}function re(me,Le){var ve=I(me),Ae=G(Le)/Math.tan(ve),ye=le(me)=="up"?me.y1+Ae:me.y1-Ae;return ye}function H(me,Le){var ve=I(me),Ae=G(Le)/Math.tan(ve),ye=le(me)=="up"?me.y1-Ae:me.y1+Ae;return ye}function J(me,Le,ve,Ae){me.links.forEach(function(ye){if(!ye.circular&&ye.target.column-ye.source.column>1){var Se=ye.source.column+1,_e=ye.target.column-1,ze=1,Ie=_e-Se+1;for(ze=1;Se<=_e;Se++,ze++)me.nodes.forEach(function(Ne){if(Ne.column==Se){var et=ze/(Ie+1),st=Math.pow(1-et,3),Ze=3*et*Math.pow(1-et,2),Ke=3*Math.pow(et,2)*(1-et),nt=Math.pow(et,3),it=st*ye.y0+Ze*ye.y0+Ke*ye.y1+nt*ye.y1,lt=it-ye.width/2,vt=it+ye.width/2,xt;lt>Ne.y0&&lt<Ne.y1?(xt=Ne.y1-lt+10,xt=Ne.circularLinkType=="bottom"?xt:-xt,Ne=K(Ne,xt,Le,ve),me.nodes.forEach(function(Je){p(Je,Ae)==p(Ne,Ae)||Je.column!=Ne.column||ae(Ne,Je)&&K(Je,xt,Le,ve)})):vt>Ne.y0&&vt<Ne.y1?(xt=vt-Ne.y0+10,Ne=K(Ne,xt,Le,ve),me.nodes.forEach(function(Je){p(Je,Ae)==p(Ne,Ae)||Je.column!=Ne.column||Je.y0<Ne.y1&&Je.y1>Ne.y1&&K(Je,xt,Le,ve)})):lt<Ne.y0&&vt>Ne.y1&&(xt=vt-Ne.y0+10,Ne=K(Ne,xt,Le,ve),me.nodes.forEach(function(Je){p(Je,Ae)==p(Ne,Ae)||Je.column!=Ne.column||Je.y0<Ne.y1&&Je.y1>Ne.y1&&K(Je,xt,Le,ve)}))}})}})}function ae(me,Le){return me.y0>Le.y0&&me.y0<Le.y1||me.y1>Le.y0&&me.y1<Le.y1?!0:me.y0<Le.y0&&me.y1>Le.y1}function K(me,Le,ve,Ae){return me.y0+Le>=ve&&me.y1+Le<=Ae&&(me.y0=me.y0+Le,me.y1=me.y1+Le,me.targetLinks.forEach(function(ye){ye.y1=ye.y1+Le}),me.sourceLinks.forEach(function(ye){ye.y0=ye.y0+Le})),me}function Y(me,Le,ve,Ae){me.nodes.forEach(function(ye){Ae&&ye.y+(ye.y1-ye.y0)>Le&&(ye.y=ye.y-(ye.y+(ye.y1-ye.y0)-Le));var Se=me.links.filter(function(Ie){return p(Ie.source,ve)==p(ye,ve)}),_e=Se.length;_e>1&&Se.sort(function(Ie,Ne){if(!Ie.circular&&!Ne.circular){if(Ie.target.column==Ne.target.column)return Ie.y1-Ne.y1;if(ne(Ie,Ne)){if(Ie.target.column>Ne.target.column){var et=H(Ne,Ie);return Ie.y1-et}if(Ne.target.column>Ie.target.column){var st=H(Ie,Ne);return st-Ne.y1}}else return Ie.y1-Ne.y1}if(Ie.circular&&!Ne.circular)return Ie.circularLinkType=="top"?-1:1;if(Ne.circular&&!Ie.circular)return Ne.circularLinkType=="top"?1:-1;if(Ie.circular&&Ne.circular)return Ie.circularLinkType===Ne.circularLinkType&&Ie.circularLinkType=="top"?Ie.target.column===Ne.target.column?Ie.target.y1-Ne.target.y1:Ne.target.column-Ie.target.column:Ie.circularLinkType===Ne.circularLinkType&&Ie.circularLinkType=="bottom"?Ie.target.column===Ne.target.column?Ne.target.y1-Ie.target.y1:Ie.target.column-Ne.target.column:Ie.circularLinkType=="top"?-1:1});var ze=ye.y0;Se.forEach(function(Ie){Ie.y0=ze+Ie.width/2,ze=ze+Ie.width}),Se.forEach(function(Ie,Ne){if(Ie.circularLinkType=="bottom"){var et=Ne+1,st=0;for(et;et<_e;et++)st=st+Se[et].width;Ie.y0=ye.y1-st-Ie.width/2}})})}function ie(me,Le,ve){me.nodes.forEach(function(Ae){var ye=me.links.filter(function(ze){return p(ze.target,ve)==p(Ae,ve)}),Se=ye.length;Se>1&&ye.sort(function(ze,Ie){if(!ze.circular&&!Ie.circular){if(ze.source.column==Ie.source.column)return ze.y0-Ie.y0;if(ne(ze,Ie)){if(Ie.source.column<ze.source.column){var Ne=re(Ie,ze);return ze.y0-Ne}if(ze.source.column<Ie.source.column){var et=re(ze,Ie);return et-Ie.y0}}else return ze.y0-Ie.y0}if(ze.circular&&!Ie.circular)return ze.circularLinkType=="top"?-1:1;if(Ie.circular&&!ze.circular)return Ie.circularLinkType=="top"?1:-1;if(ze.circular&&Ie.circular)return ze.circularLinkType===Ie.circularLinkType&&ze.circularLinkType=="top"?ze.source.column===Ie.source.column?ze.source.y1-Ie.source.y1:ze.source.column-Ie.source.column:ze.circularLinkType===Ie.circularLinkType&&ze.circularLinkType=="bottom"?ze.source.column===Ie.source.column?ze.source.y1-Ie.source.y1:Ie.source.column-ze.source.column:ze.circularLinkType=="top"?-1:1});var _e=Ae.y0;ye.forEach(function(ze){ze.y1=_e+ze.width/2,_e=_e+ze.width}),ye.forEach(function(ze,Ie){if(ze.circularLinkType=="bottom"){var Ne=Ie+1,et=0;for(Ne;Ne<Se;Ne++)et=et+ye[Ne].width;ze.y1=Ae.y1-et-ze.width/2}})})}function ne(me,Le){return le(me)==le(Le)}function le(me){return me.y0-me.y1>0?"up":"down"}function de(me,Le){return p(me.source,Le)==p(me.target,Le)}function we(me,Le,ve){var Ae=me.nodes,ye=me.links,Se=!1,_e=!1;if(ye.forEach(function(Ze){Ze.circularLinkType=="top"?Se=!0:Ze.circularLinkType=="bottom"&&(_e=!0)}),Se==!1||_e==!1){var ze=(0,A.SY)(Ae,function(Ze){return Ze.y0}),Ie=(0,A.kv)(Ae,function(Ze){return Ze.y1}),Ne=Ie-ze,et=ve-Le,st=et/Ne;Ae.forEach(function(Ze){var Ke=(Ze.y1-Ze.y0)*st;Ze.y0=(Ze.y0-ze)*st,Ze.y1=Ze.y0+Ke}),ye.forEach(function(Ze){Ze.y0=(Ze.y0-ze)*st,Ze.y1=(Ze.y1-ze)*st,Ze.width=Ze.width*st})}}},26800:function(te,X,e){e.r(X),e.d(X,{sankey:function(){return v},sankeyCenter:function(){return g},sankeyJustify:function(){return d},sankeyLeft:function(){return L},sankeyLinkHorizontal:function(){return p},sankeyRight:function(){return M}});var A=e(84706),P=e(34712);function o(S){return S.target.depth}function L(S){return S.depth}function M(S,w){return w-1-S.height}function d(S,w){return S.sourceLinks.length?S.depth:w-1}function g(S){return S.targetLinks.length?S.depth:S.sourceLinks.length?(0,A.SY)(S.sourceLinks,o)-1:0}function r(S){return function(){return S}}function t(S,w){return a(S.source,w.source)||S.index-w.index}function s(S,w){return a(S.target,w.target)||S.index-w.index}function a(S,w){return S.y0-w.y0}function c(S){return S.value}function u(S){return(S.y0+S.y1)/2}function l(S){return u(S.source)*S.value}function y(S){return u(S.target)*S.value}function h(S){return S.index}function T(S){return S.nodes}function f(S){return S.links}function n(S,w){var i=S.get(w);if(!i)throw new Error("missing: "+w);return i}function v(){var S=0,w=0,i=1,C=1,x=24,k=8,I=h,B=d,_=T,z=f,O=32,F=2/3;function N(){var Z={nodes:_.apply(null,arguments),links:z.apply(null,arguments)};return V(Z),j(Z),$(Z),q(Z),oe(Z),Z}N.update=function(Z){return oe(Z),Z},N.nodeId=function(Z){return arguments.length?(I=typeof Z=="function"?Z:r(Z),N):I},N.nodeAlign=function(Z){return arguments.length?(B=typeof Z=="function"?Z:r(Z),N):B},N.nodeWidth=function(Z){return arguments.length?(x=+Z,N):x},N.nodePadding=function(Z){return arguments.length?(k=+Z,N):k},N.nodes=function(Z){return arguments.length?(_=typeof Z=="function"?Z:r(Z),N):_},N.links=function(Z){return arguments.length?(z=typeof Z=="function"?Z:r(Z),N):z},N.size=function(Z){return arguments.length?(S=w=0,i=+Z[0],C=+Z[1],N):[i-S,C-w]},N.extent=function(Z){return arguments.length?(S=+Z[0][0],i=+Z[1][0],w=+Z[0][1],C=+Z[1][1],N):[[S,w],[i,C]]},N.iterations=function(Z){return arguments.length?(O=+Z,N):O};function V(Z){Z.nodes.forEach(function(re,H){re.index=H,re.sourceLinks=[],re.targetLinks=[]});var G=(0,P.kH)(Z.nodes,I);Z.links.forEach(function(re,H){re.index=H;var J=re.source,ae=re.target;typeof J!="object"&&(J=re.source=n(G,J)),typeof ae!="object"&&(ae=re.target=n(G,ae)),J.sourceLinks.push(re),ae.targetLinks.push(re)})}function j(Z){Z.nodes.forEach(function(G){G.value=Math.max((0,A.oh)(G.sourceLinks,c),(0,A.oh)(G.targetLinks,c))})}function $(Z){var G,re,H;for(G=Z.nodes,re=[],H=0;G.length;++H,G=re,re=[])G.forEach(function(ae){ae.depth=H,ae.sourceLinks.forEach(function(K){re.indexOf(K.target)<0&&re.push(K.target)})});for(G=Z.nodes,re=[],H=0;G.length;++H,G=re,re=[])G.forEach(function(ae){ae.height=H,ae.targetLinks.forEach(function(K){re.indexOf(K.source)<0&&re.push(K.source)})});var J=(i-S-x)/(H-1);Z.nodes.forEach(function(ae){ae.x1=(ae.x0=S+Math.max(0,Math.min(H-1,Math.floor(B.call(null,ae,H))))*J)+x})}function q(Z){var G=(0,P.UJ)().key(function(ie){return ie.x0}).sortKeys(A.XE).entries(Z.nodes).map(function(ie){return ie.values});J(),Y();for(var re=1,H=O;H>0;--H)K(re*=.99),Y(),ae(re),Y();function J(){var ie=(0,A.kv)(G,function(de){return de.length}),ne=F*(C-w)/(ie-1);k>ne&&(k=ne);var le=(0,A.SY)(G,function(de){return(C-w-(de.length-1)*k)/(0,A.oh)(de,c)});G.forEach(function(de){de.forEach(function(we,me){we.y1=(we.y0=me)+we.value*le})}),Z.links.forEach(function(de){de.width=de.value*le})}function ae(ie){G.forEach(function(ne){ne.forEach(function(le){if(le.targetLinks.length){var de=((0,A.oh)(le.targetLinks,l)/(0,A.oh)(le.targetLinks,c)-u(le))*ie;le.y0+=de,le.y1+=de}})})}function K(ie){G.slice().reverse().forEach(function(ne){ne.forEach(function(le){if(le.sourceLinks.length){var de=((0,A.oh)(le.sourceLinks,y)/(0,A.oh)(le.sourceLinks,c)-u(le))*ie;le.y0+=de,le.y1+=de}})})}function Y(){G.forEach(function(ie){var ne,le,de=w,we=ie.length,me;for(ie.sort(a),me=0;me<we;++me)ne=ie[me],le=de-ne.y0,le>0&&(ne.y0+=le,ne.y1+=le),de=ne.y1+k;if(le=de-k-C,le>0)for(de=ne.y0-=le,ne.y1-=le,me=we-2;me>=0;--me)ne=ie[me],le=ne.y1+k-de,le>0&&(ne.y0-=le,ne.y1-=le),de=ne.y0})}}function oe(Z){Z.nodes.forEach(function(G){G.sourceLinks.sort(s),G.targetLinks.sort(t)}),Z.nodes.forEach(function(G){var re=G.y0,H=re;G.sourceLinks.forEach(function(J){J.y0=re+J.width/2,re+=J.width}),G.targetLinks.forEach(function(J){J.y1=H+J.width/2,H+=J.width})})}return N}var m=e(10132);function b(S){return[S.source.x1,S.y0]}function E(S){return[S.target.x0,S.y1]}function p(){return(0,m.ak)().source(b).target(E)}},33428:function(te,X,e){var A,P;(function(){var o={version:"3.8.0"},L=[].slice,M=function(se){return L.call(se)},d=self.document;function g(se){return se&&(se.ownerDocument||se.document||se).documentElement}function r(se){return se&&(se.ownerDocument&&se.ownerDocument.defaultView||se.document&&se||se.defaultView)}if(d)try{M(d.documentElement.childNodes)[0].nodeType}catch{M=function(Me){for(var De=Me.length,Xe=new Array(De);De--;)Xe[De]=Me[De];return Xe}}if(Date.now||(Date.now=function(){return+new Date}),d)try{d.createElement("DIV").style.setProperty("opacity",0,"")}catch{var t=this.Element.prototype,s=t.setAttribute,a=t.setAttributeNS,c=this.CSSStyleDeclaration.prototype,u=c.setProperty;t.setAttribute=function(Me,De){s.call(this,Me,De+"")},t.setAttributeNS=function(Me,De,Xe){a.call(this,Me,De,Xe+"")},c.setProperty=function(Me,De,Xe){u.call(this,Me,De+"",Xe)}}o.ascending=l;function l(se,Me){return se<Me?-1:se>Me?1:se>=Me?0:NaN}o.descending=function(se,Me){return Me<se?-1:Me>se?1:Me>=se?0:NaN},o.min=function(se,Me){var De=-1,Xe=se.length,Qe,rt;if(arguments.length===1){for(;++De<Xe;)if((rt=se[De])!=null&&rt>=rt){Qe=rt;break}for(;++De<Xe;)(rt=se[De])!=null&&Qe>rt&&(Qe=rt)}else{for(;++De<Xe;)if((rt=Me.call(se,se[De],De))!=null&&rt>=rt){Qe=rt;break}for(;++De<Xe;)(rt=Me.call(se,se[De],De))!=null&&Qe>rt&&(Qe=rt)}return Qe},o.max=function(se,Me){var De=-1,Xe=se.length,Qe,rt;if(arguments.length===1){for(;++De<Xe;)if((rt=se[De])!=null&&rt>=rt){Qe=rt;break}for(;++De<Xe;)(rt=se[De])!=null&&rt>Qe&&(Qe=rt)}else{for(;++De<Xe;)if((rt=Me.call(se,se[De],De))!=null&&rt>=rt){Qe=rt;break}for(;++De<Xe;)(rt=Me.call(se,se[De],De))!=null&&rt>Qe&&(Qe=rt)}return Qe},o.extent=function(se,Me){var De=-1,Xe=se.length,Qe,rt,Tt;if(arguments.length===1){for(;++De<Xe;)if((rt=se[De])!=null&&rt>=rt){Qe=Tt=rt;break}for(;++De<Xe;)(rt=se[De])!=null&&(Qe>rt&&(Qe=rt),Tt<rt&&(Tt=rt))}else{for(;++De<Xe;)if((rt=Me.call(se,se[De],De))!=null&&rt>=rt){Qe=Tt=rt;break}for(;++De<Xe;)(rt=Me.call(se,se[De],De))!=null&&(Qe>rt&&(Qe=rt),Tt<rt&&(Tt=rt))}return[Qe,Tt]};function y(se){return se===null?NaN:+se}function h(se){return!isNaN(se)}o.sum=function(se,Me){var De=0,Xe=se.length,Qe,rt=-1;if(arguments.length===1)for(;++rt<Xe;)h(Qe=+se[rt])&&(De+=Qe);else for(;++rt<Xe;)h(Qe=+Me.call(se,se[rt],rt))&&(De+=Qe);return De},o.mean=function(se,Me){var De=0,Xe=se.length,Qe,rt=-1,Tt=Xe;if(arguments.length===1)for(;++rt<Xe;)h(Qe=y(se[rt]))?De+=Qe:--Tt;else for(;++rt<Xe;)h(Qe=y(Me.call(se,se[rt],rt)))?De+=Qe:--Tt;if(Tt)return De/Tt},o.quantile=function(se,Me){var De=(se.length-1)*Me+1,Xe=Math.floor(De),Qe=+se[Xe-1],rt=De-Xe;return rt?Qe+rt*(se[Xe]-Qe):Qe},o.median=function(se,Me){var De=[],Xe=se.length,Qe,rt=-1;if(arguments.length===1)for(;++rt<Xe;)h(Qe=y(se[rt]))&&De.push(Qe);else for(;++rt<Xe;)h(Qe=y(Me.call(se,se[rt],rt)))&&De.push(Qe);if(De.length)return o.quantile(De.sort(l),.5)},o.variance=function(se,Me){var De=se.length,Xe=0,Qe,rt,Tt=0,yt=-1,Ft=0;if(arguments.length===1)for(;++yt<De;)h(Qe=y(se[yt]))&&(rt=Qe-Xe,Xe+=rt/++Ft,Tt+=rt*(Qe-Xe));else for(;++yt<De;)h(Qe=y(Me.call(se,se[yt],yt)))&&(rt=Qe-Xe,Xe+=rt/++Ft,Tt+=rt*(Qe-Xe));if(Ft>1)return Tt/(Ft-1)},o.deviation=function(){var se=o.variance.apply(this,arguments);return se&&Math.sqrt(se)};function T(se){return{left:function(Me,De,Xe,Qe){for(arguments.length<3&&(Xe=0),arguments.length<4&&(Qe=Me.length);Xe<Qe;){var rt=Xe+Qe>>>1;se(Me[rt],De)<0?Xe=rt+1:Qe=rt}return Xe},right:function(Me,De,Xe,Qe){for(arguments.length<3&&(Xe=0),arguments.length<4&&(Qe=Me.length);Xe<Qe;){var rt=Xe+Qe>>>1;se(Me[rt],De)>0?Qe=rt:Xe=rt+1}return Xe}}}var f=T(l);o.bisectLeft=f.left,o.bisect=o.bisectRight=f.right,o.bisector=function(se){return T(se.length===1?function(Me,De){return l(se(Me),De)}:se)},o.shuffle=function(se,Me,De){(Xe=arguments.length)<3&&(De=se.length,Xe<2&&(Me=0));for(var Xe=De-Me,Qe,rt;Xe;)rt=Math.random()*Xe--|0,Qe=se[Xe+Me],se[Xe+Me]=se[rt+Me],se[rt+Me]=Qe;return se},o.permute=function(se,Me){for(var De=Me.length,Xe=new Array(De);De--;)Xe[De]=se[Me[De]];return Xe},o.pairs=function(se){for(var Me=0,De=se.length-1,Xe=se[0],Qe=new Array(De<0?0:De);Me<De;)Qe[Me]=[Xe,Xe=se[++Me]];return Qe},o.transpose=function(se){if(!(rt=se.length))return[];for(var Me=-1,De=o.min(se,n),Xe=new Array(De);++Me<De;)for(var Qe=-1,rt,Tt=Xe[Me]=new Array(rt);++Qe<rt;)Tt[Qe]=se[Qe][Me];return Xe};function n(se){return se.length}o.zip=function(){return o.transpose(arguments)},o.keys=function(se){var Me=[];for(var De in se)Me.push(De);return Me},o.values=function(se){var Me=[];for(var De in se)Me.push(se[De]);return Me},o.entries=function(se){var Me=[];for(var De in se)Me.push({key:De,value:se[De]});return Me},o.merge=function(se){for(var Me=se.length,De,Xe=-1,Qe=0,rt,Tt;++Xe<Me;)Qe+=se[Xe].length;for(rt=new Array(Qe);--Me>=0;)for(Tt=se[Me],De=Tt.length;--De>=0;)rt[--Qe]=Tt[De];return rt};var v=Math.abs;o.range=function(se,Me,De){if(arguments.length<3&&(De=1,arguments.length<2&&(Me=se,se=0)),(Me-se)/De===1/0)throw new Error("infinite range");var Xe=[],Qe=m(v(De)),rt=-1,Tt;if(se*=Qe,Me*=Qe,De*=Qe,De<0)for(;(Tt=se+De*++rt)>Me;)Xe.push(Tt/Qe);else for(;(Tt=se+De*++rt)<Me;)Xe.push(Tt/Qe);return Xe};function m(se){for(var Me=1;se*Me%1;)Me*=10;return Me}function b(se,Me){for(var De in Me)Object.defineProperty(se.prototype,De,{value:Me[De],enumerable:!1})}o.map=function(se,Me){var De=new E;if(se instanceof E)se.forEach(function(yt,Ft){De.set(yt,Ft)});else if(Array.isArray(se)){var Xe=-1,Qe=se.length,rt;if(arguments.length===1)for(;++Xe<Qe;)De.set(Xe,se[Xe]);else for(;++Xe<Qe;)De.set(Me.call(se,rt=se[Xe],Xe),rt)}else for(var Tt in se)De.set(Tt,se[Tt]);return De};function E(){this._=Object.create(null)}var p="__proto__",S="\0";b(E,{has:C,get:function(se){return this._[w(se)]},set:function(se,Me){return this._[w(se)]=Me},remove:x,keys:k,values:function(){var se=[];for(var Me in this._)se.push(this._[Me]);return se},entries:function(){var se=[];for(var Me in this._)se.push({key:i(Me),value:this._[Me]});return se},size:I,empty:B,forEach:function(se){for(var Me in this._)se.call(this,i(Me),this._[Me])}});function w(se){return(se+="")===p||se[0]===S?S+se:se}function i(se){return(se+="")[0]===S?se.slice(1):se}function C(se){return w(se)in this._}function x(se){return(se=w(se))in this._&&delete this._[se]}function k(){var se=[];for(var Me in this._)se.push(i(Me));return se}function I(){var se=0;for(var Me in this._)++se;return se}function B(){for(var se in this._)return!1;return!0}o.nest=function(){var se={},Me=[],De=[],Xe,Qe;function rt(yt,Ft,Ot){if(Ot>=Me.length)return Qe?Qe.call(se,Ft):Xe?Ft.sort(Xe):Ft;for(var jt=-1,wr=Ft.length,Tr=Me[Ot++],Wr,qr,Mr,kr=new E,Hr;++jt<wr;)(Hr=kr.get(Wr=Tr(qr=Ft[jt])))?Hr.push(qr):kr.set(Wr,[qr]);return yt?(qr=yt(),Mr=function(rn,on){qr.set(rn,rt(yt,on,Ot))}):(qr={},Mr=function(rn,on){qr[rn]=rt(yt,on,Ot)}),kr.forEach(Mr),qr}function Tt(yt,Ft){if(Ft>=Me.length)return yt;var Ot=[],jt=De[Ft++];return yt.forEach(function(wr,Tr){Ot.push({key:wr,values:Tt(Tr,Ft)})}),jt?Ot.sort(function(wr,Tr){return jt(wr.key,Tr.key)}):Ot}return se.map=function(yt,Ft){return rt(Ft,yt,0)},se.entries=function(yt){return Tt(rt(o.map,yt,0),0)},se.key=function(yt){return Me.push(yt),se},se.sortKeys=function(yt){return De[Me.length-1]=yt,se},se.sortValues=function(yt){return Xe=yt,se},se.rollup=function(yt){return Qe=yt,se},se},o.set=function(se){var Me=new _;if(se)for(var De=0,Xe=se.length;De<Xe;++De)Me.add(se[De]);return Me};function _(){this._=Object.create(null)}b(_,{has:C,add:function(se){return this._[w(se+="")]=!0,se},remove:x,values:k,size:I,empty:B,forEach:function(se){for(var Me in this._)se.call(this,i(Me))}}),o.behavior={};function z(se){return se}o.rebind=function(se,Me){for(var De=1,Xe=arguments.length,Qe;++De<Xe;)se[Qe=arguments[De]]=O(se,Me,Me[Qe]);return se};function O(se,Me,De){return function(){var Xe=De.apply(Me,arguments);return Xe===Me?se:Xe}}function F(se,Me){if(Me in se)return Me;Me=Me.charAt(0).toUpperCase()+Me.slice(1);for(var De=0,Xe=N.length;De<Xe;++De){var Qe=N[De]+Me;if(Qe in se)return Qe}}var N=["webkit","ms","moz","Moz","o","O"];function V(){}o.dispatch=function(){for(var se=new j,Me=-1,De=arguments.length;++Me<De;)se[arguments[Me]]=$(se);return se};function j(){}j.prototype.on=function(se,Me){var De=se.indexOf("."),Xe="";if(De>=0&&(Xe=se.slice(De+1),se=se.slice(0,De)),se)return arguments.length<2?this[se].on(Xe):this[se].on(Xe,Me);if(arguments.length===2){if(Me==null)for(se in this)this.hasOwnProperty(se)&&this[se].on(Xe,null);return this}};function $(se){var Me=[],De=new E;function Xe(){for(var Qe=Me,rt=-1,Tt=Qe.length,yt;++rt<Tt;)(yt=Qe[rt].on)&&yt.apply(this,arguments);return se}return Xe.on=function(Qe,rt){var Tt=De.get(Qe),yt;return arguments.length<2?Tt&&Tt.on:(Tt&&(Tt.on=null,Me=Me.slice(0,yt=Me.indexOf(Tt)).concat(Me.slice(yt+1)),De.remove(Qe)),rt&&Me.push(De.set(Qe,{on:rt})),se)},Xe}o.event=null;function q(){o.event.preventDefault()}function oe(){for(var se=o.event,Me;Me=se.sourceEvent;)se=Me;return se}function Z(se){for(var Me=new j,De=0,Xe=arguments.length;++De<Xe;)Me[arguments[De]]=$(Me);return Me.of=function(Qe,rt){return function(Tt){try{var yt=Tt.sourceEvent=o.event;Tt.target=se,o.event=Tt,Me[Tt.type].apply(Qe,rt)}finally{o.event=yt}}},Me}o.requote=function(se){return se.replace(G,"\\$&")};var G=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,re={}.__proto__?function(se,Me){se.__proto__=Me}:function(se,Me){for(var De in Me)se[De]=Me[De]};function H(se){return re(se,Y),se}var J=function(se,Me){return Me.querySelector(se)},ae=function(se,Me){return Me.querySelectorAll(se)},K=function(se,Me){var De=se.matches||se[F(se,"matchesSelector")];return K=function(Xe,Qe){return De.call(Xe,Qe)},K(se,Me)};typeof Sizzle=="function"&&(J=function(se,Me){return Sizzle(se,Me)[0]||null},ae=Sizzle,K=Sizzle.matchesSelector),o.selection=function(){return o.select(d.documentElement)};var Y=o.selection.prototype=[];Y.select=function(se){var Me=[],De,Xe,Qe,rt;se=ie(se);for(var Tt=-1,yt=this.length;++Tt<yt;){Me.push(De=[]),De.parentNode=(Qe=this[Tt]).parentNode;for(var Ft=-1,Ot=Qe.length;++Ft<Ot;)(rt=Qe[Ft])?(De.push(Xe=se.call(rt,rt.__data__,Ft,Tt)),Xe&&"__data__"in rt&&(Xe.__data__=rt.__data__)):De.push(null)}return H(Me)};function ie(se){return typeof se=="function"?se:function(){return J(se,this)}}Y.selectAll=function(se){var Me=[],De,Xe;se=ne(se);for(var Qe=-1,rt=this.length;++Qe<rt;)for(var Tt=this[Qe],yt=-1,Ft=Tt.length;++yt<Ft;)(Xe=Tt[yt])&&(Me.push(De=M(se.call(Xe,Xe.__data__,yt,Qe))),De.parentNode=Xe);return H(Me)};function ne(se){return typeof se=="function"?se:function(){return ae(se,this)}}var le="http://www.w3.org/1999/xhtml",de={svg:"http://www.w3.org/2000/svg",xhtml:le,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};o.ns={prefix:de,qualify:function(se){var Me=se.indexOf(":"),De=se;return Me>=0&&(De=se.slice(0,Me))!=="xmlns"&&(se=se.slice(Me+1)),de.hasOwnProperty(De)?{space:de[De],local:se}:se}},Y.attr=function(se,Me){if(arguments.length<2){if(typeof se=="string"){var De=this.node();return se=o.ns.qualify(se),se.local?De.getAttributeNS(se.space,se.local):De.getAttribute(se)}for(Me in se)this.each(we(Me,se[Me]));return this}return this.each(we(se,Me))};function we(se,Me){se=o.ns.qualify(se);function De(){this.removeAttribute(se)}function Xe(){this.removeAttributeNS(se.space,se.local)}function Qe(){this.setAttribute(se,Me)}function rt(){this.setAttributeNS(se.space,se.local,Me)}function Tt(){var Ft=Me.apply(this,arguments);Ft==null?this.removeAttribute(se):this.setAttribute(se,Ft)}function yt(){var Ft=Me.apply(this,arguments);Ft==null?this.removeAttributeNS(se.space,se.local):this.setAttributeNS(se.space,se.local,Ft)}return Me==null?se.local?Xe:De:typeof Me=="function"?se.local?yt:Tt:se.local?rt:Qe}function me(se){return se.trim().replace(/\s+/g," ")}Y.classed=function(se,Me){if(arguments.length<2){if(typeof se=="string"){var De=this.node(),Xe=(se=ve(se)).length,Qe=-1;if(Me=De.classList){for(;++Qe<Xe;)if(!Me.contains(se[Qe]))return!1}else for(Me=De.getAttribute("class");++Qe<Xe;)if(!Le(se[Qe]).test(Me))return!1;return!0}for(Me in se)this.each(Ae(Me,se[Me]));return this}return this.each(Ae(se,Me))};function Le(se){return new RegExp("(?:^|\\s+)"+o.requote(se)+"(?:\\s+|$)","g")}function ve(se){return(se+"").trim().split(/^|\s+/)}function Ae(se,Me){se=ve(se).map(ye);var De=se.length;function Xe(){for(var rt=-1;++rt<De;)se[rt](this,Me)}function Qe(){for(var rt=-1,Tt=Me.apply(this,arguments);++rt<De;)se[rt](this,Tt)}return typeof Me=="function"?Qe:Xe}function ye(se){var Me=Le(se);return function(De,Xe){if(Qe=De.classList)return Xe?Qe.add(se):Qe.remove(se);var Qe=De.getAttribute("class")||"";Xe?(Me.lastIndex=0,Me.test(Qe)||De.setAttribute("class",me(Qe+" "+se))):De.setAttribute("class",me(Qe.replace(Me," ")))}}Y.style=function(se,Me,De){var Xe=arguments.length;if(Xe<3){if(typeof se!="string"){Xe<2&&(Me="");for(De in se)this.each(Se(De,se[De],Me));return this}if(Xe<2){var Qe=this.node();return r(Qe).getComputedStyle(Qe,null).getPropertyValue(se)}De=""}return this.each(Se(se,Me,De))};function Se(se,Me,De){function Xe(){this.style.removeProperty(se)}function Qe(){this.style.setProperty(se,Me,De)}function rt(){var Tt=Me.apply(this,arguments);Tt==null?this.style.removeProperty(se):this.style.setProperty(se,Tt,De)}return Me==null?Xe:typeof Me=="function"?rt:Qe}Y.property=function(se,Me){if(arguments.length<2){if(typeof se=="string")return this.node()[se];for(Me in se)this.each(_e(Me,se[Me]));return this}return this.each(_e(se,Me))};function _e(se,Me){function De(){delete this[se]}function Xe(){this[se]=Me}function Qe(){var rt=Me.apply(this,arguments);rt==null?delete this[se]:this[se]=rt}return Me==null?De:typeof Me=="function"?Qe:Xe}Y.text=function(se){return arguments.length?this.each(typeof se=="function"?function(){var Me=se.apply(this,arguments);this.textContent=Me??""}:se==null?function(){this.textContent=""}:function(){this.textContent=se}):this.node().textContent},Y.html=function(se){return arguments.length?this.each(typeof se=="function"?function(){var Me=se.apply(this,arguments);this.innerHTML=Me??""}:se==null?function(){this.innerHTML=""}:function(){this.innerHTML=se}):this.node().innerHTML},Y.append=function(se){return se=ze(se),this.select(function(){return this.appendChild(se.apply(this,arguments))})};function ze(se){function Me(){var Xe=this.ownerDocument,Qe=this.namespaceURI;return Qe===le&&Xe.documentElement.namespaceURI===le?Xe.createElement(se):Xe.createElementNS(Qe,se)}function De(){return this.ownerDocument.createElementNS(se.space,se.local)}return typeof se=="function"?se:(se=o.ns.qualify(se)).local?De:Me}Y.insert=function(se,Me){return se=ze(se),Me=ie(Me),this.select(function(){return this.insertBefore(se.apply(this,arguments),Me.apply(this,arguments)||null)})},Y.remove=function(){return this.each(Ie)};function Ie(){var se=this.parentNode;se&&se.removeChild(this)}Y.data=function(se,Me){var De=-1,Xe=this.length,Qe,rt;if(!arguments.length){for(se=new Array(Xe=(Qe=this[0]).length);++De<Xe;)(rt=Qe[De])&&(se[De]=rt.__data__);return se}function Tt(jt,wr){var Tr,Wr=jt.length,qr=wr.length,Mr=Math.min(Wr,qr),kr=new Array(qr),Hr=new Array(qr),rn=new Array(Wr),on,Zr;if(Me){var _n=new E,Xn=new Array(Wr),ta;for(Tr=-1;++Tr<Wr;)(on=jt[Tr])&&(_n.has(ta=Me.call(on,on.__data__,Tr))?rn[Tr]=on:_n.set(ta,on),Xn[Tr]=ta);for(Tr=-1;++Tr<qr;)(on=_n.get(ta=Me.call(wr,Zr=wr[Tr],Tr)))?on!==!0&&(kr[Tr]=on,on.__data__=Zr):Hr[Tr]=Ne(Zr),_n.set(ta,!0);for(Tr=-1;++Tr<Wr;)Tr in Xn&&_n.get(Xn[Tr])!==!0&&(rn[Tr]=jt[Tr])}else{for(Tr=-1;++Tr<Mr;)on=jt[Tr],Zr=wr[Tr],on?(on.__data__=Zr,kr[Tr]=on):Hr[Tr]=Ne(Zr);for(;Tr<qr;++Tr)Hr[Tr]=Ne(wr[Tr]);for(;Tr<Wr;++Tr)rn[Tr]=jt[Tr]}Hr.update=kr,Hr.parentNode=kr.parentNode=rn.parentNode=jt.parentNode,yt.push(Hr),Ft.push(kr),Ot.push(rn)}var yt=Ke([]),Ft=H([]),Ot=H([]);if(typeof se=="function")for(;++De<Xe;)Tt(Qe=this[De],se.call(Qe,Qe.parentNode.__data__,De));else for(;++De<Xe;)Tt(Qe=this[De],se);return Ft.enter=function(){return yt},Ft.exit=function(){return Ot},Ft};function Ne(se){return{__data__:se}}Y.datum=function(se){return arguments.length?this.property("__data__",se):this.property("__data__")},Y.filter=function(se){var Me=[],De,Xe,Qe;typeof se!="function"&&(se=et(se));for(var rt=0,Tt=this.length;rt<Tt;rt++){Me.push(De=[]),De.parentNode=(Xe=this[rt]).parentNode;for(var yt=0,Ft=Xe.length;yt<Ft;yt++)(Qe=Xe[yt])&&se.call(Qe,Qe.__data__,yt,rt)&&De.push(Qe)}return H(Me)};function et(se){return function(){return K(this,se)}}Y.order=function(){for(var se=-1,Me=this.length;++se<Me;)for(var De=this[se],Xe=De.length-1,Qe=De[Xe],rt;--Xe>=0;)(rt=De[Xe])&&(Qe&&Qe!==rt.nextSibling&&Qe.parentNode.insertBefore(rt,Qe),Qe=rt);return this},Y.sort=function(se){se=st.apply(this,arguments);for(var Me=-1,De=this.length;++Me<De;)this[Me].sort(se);return this.order()};function st(se){return arguments.length||(se=l),function(Me,De){return Me&&De?se(Me.__data__,De.__data__):!Me-!De}}Y.each=function(se){return Ze(this,function(Me,De,Xe){se.call(Me,Me.__data__,De,Xe)})};function Ze(se,Me){for(var De=0,Xe=se.length;De<Xe;De++)for(var Qe=se[De],rt=0,Tt=Qe.length,yt;rt<Tt;rt++)(yt=Qe[rt])&&Me(yt,rt,De);return se}Y.call=function(se){var Me=M(arguments);return se.apply(Me[0]=this,Me),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var se=0,Me=this.length;se<Me;se++)for(var De=this[se],Xe=0,Qe=De.length;Xe<Qe;Xe++){var rt=De[Xe];if(rt)return rt}return null},Y.size=function(){var se=0;return Ze(this,function(){++se}),se};function Ke(se){return re(se,nt),se}var nt=[];o.selection.enter=Ke,o.selection.enter.prototype=nt,nt.append=Y.append,nt.empty=Y.empty,nt.node=Y.node,nt.call=Y.call,nt.size=Y.size,nt.select=function(se){for(var Me=[],De,Xe,Qe,rt,Tt,yt=-1,Ft=this.length;++yt<Ft;){Qe=(rt=this[yt]).update,Me.push(De=[]),De.parentNode=rt.parentNode;for(var Ot=-1,jt=rt.length;++Ot<jt;)(Tt=rt[Ot])?(De.push(Qe[Ot]=Xe=se.call(rt.parentNode,Tt.__data__,Ot,yt)),Xe.__data__=Tt.__data__):De.push(null)}return H(Me)},nt.insert=function(se,Me){return arguments.length<2&&(Me=it(this)),Y.insert.call(this,se,Me)};function it(se){var Me,De;return function(Xe,Qe,rt){var Tt=se[rt].update,yt=Tt.length,Ft;for(rt!=De&&(De=rt,Me=0),Qe>=Me&&(Me=Qe+1);!(Ft=Tt[Me])&&++Me<yt;);return Ft}}o.select=function(se){var Me;return typeof se=="string"?(Me=[J(se,d)],Me.parentNode=d.documentElement):(Me=[se],Me.parentNode=g(se)),H([Me])},o.selectAll=function(se){var Me;return typeof se=="string"?(Me=M(ae(se,d)),Me.parentNode=d.documentElement):(Me=M(se),Me.parentNode=null),H([Me])},Y.on=function(se,Me,De){var Xe=arguments.length;if(Xe<3){if(typeof se!="string"){Xe<2&&(Me=!1);for(De in se)this.each(lt(De,se[De],Me));return this}if(Xe<2)return(Xe=this.node()["__on"+se])&&Xe._;De=!1}return this.each(lt(se,Me,De))};function lt(se,Me,De){var Xe="__on"+se,Qe=se.indexOf("."),rt=xt;Qe>0&&(se=se.slice(0,Qe));var Tt=vt.get(se);Tt&&(se=Tt,rt=Je);function yt(){var jt=this[Xe];jt&&(this.removeEventListener(se,jt,jt.$),delete this[Xe])}function Ft(){var jt=rt(Me,M(arguments));yt.call(this),this.addEventListener(se,this[Xe]=jt,jt.$=De),jt._=Me}function Ot(){var jt=new RegExp("^__on([^.]+)"+o.requote(se)+"$"),wr;for(var Tr in this)if(wr=Tr.match(jt)){var Wr=this[Tr];this.removeEventListener(wr[1],Wr,Wr.$),delete this[Tr]}}return Qe?Me?Ft:yt:Me?V:Ot}var vt=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});d&&vt.forEach(function(se){"on"+se in d&&vt.remove(se)});function xt(se,Me){return function(De){var Xe=o.event;o.event=De,Me[0]=this.__data__;try{se.apply(this,Me)}finally{o.event=Xe}}}function Je(se,Me){var De=xt(se,Me);return function(Xe){var Qe=this,rt=Xe.relatedTarget;(!rt||rt!==Qe&&!(rt.compareDocumentPosition(Qe)&8))&&De.call(Qe,Xe)}}var Pe,Ue=0;function He(se){var Me=".dragsuppress-"+ ++Ue,De="click"+Me,Xe=o.select(r(se)).on("touchmove"+Me,q).on("dragstart"+Me,q).on("selectstart"+Me,q);if(Pe==null&&(Pe="onselectstart"in se?!1:F(se.style,"userSelect")),Pe){var Qe=g(se).style,rt=Qe[Pe];Qe[Pe]="none"}return function(Tt){if(Xe.on(Me,null),Pe&&(Qe[Pe]=rt),Tt){var yt=function(){Xe.on(De,null)};Xe.on(De,function(){q(),yt()},!0),setTimeout(yt,0)}}}o.mouse=function(se){return Ce(se,oe())};var Oe=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ce(se,Me){Me.changedTouches&&(Me=Me.changedTouches[0]);var De=se.ownerSVGElement||se;if(De.createSVGPoint){var Xe=De.createSVGPoint();if(Oe<0){var Qe=r(se);if(Qe.scrollX||Qe.scrollY){De=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var rt=De[0][0].getScreenCTM();Oe=!(rt.f||rt.e),De.remove()}}return Oe?(Xe.x=Me.pageX,Xe.y=Me.pageY):(Xe.x=Me.clientX,Xe.y=Me.clientY),Xe=Xe.matrixTransform(se.getScreenCTM().inverse()),[Xe.x,Xe.y]}var Tt=se.getBoundingClientRect();return[Me.clientX-Tt.left-se.clientLeft,Me.clientY-Tt.top-se.clientTop]}o.touch=function(se,Me,De){if(arguments.length<3&&(De=Me,Me=oe().changedTouches),Me){for(var Xe=0,Qe=Me.length,rt;Xe<Qe;++Xe)if((rt=Me[Xe]).identifier===De)return Ce(se,rt)}},o.behavior.drag=function(){var se=Z(Qe,"drag","dragstart","dragend"),Me=null,De=rt(V,o.mouse,r,"mousemove","mouseup"),Xe=rt(ge,o.touch,z,"touchmove","touchend");function Qe(){this.on("mousedown.drag",De).on("touchstart.drag",Xe)}function rt(Tt,yt,Ft,Ot,jt){return function(){var wr=this,Tr=o.event.target.correspondingElement||o.event.target,Wr=wr.parentNode,qr=se.of(wr,arguments),Mr=0,kr=Tt(),Hr=".drag"+(kr==null?"":"-"+kr),rn,on=o.select(Ft(Tr)).on(Ot+Hr,Xn).on(jt+Hr,ta),Zr=He(Tr),_n=yt(Wr,kr);Me?(rn=Me.apply(wr,arguments),rn=[rn.x-_n[0],rn.y-_n[1]]):rn=[0,0],qr({type:"dragstart"});function Xn(){var Wn=yt(Wr,kr),Qn,ra;Wn&&(Qn=Wn[0]-_n[0],ra=Wn[1]-_n[1],Mr|=Qn|ra,_n=Wn,qr({type:"drag",x:Wn[0]+rn[0],y:Wn[1]+rn[1],dx:Qn,dy:ra}))}function ta(){yt(Wr,kr)&&(on.on(Ot+Hr,null).on(jt+Hr,null),Zr(Mr),qr({type:"dragend"}))}}}return Qe.origin=function(Tt){return arguments.length?(Me=Tt,Qe):Me},o.rebind(Qe,se,"on")};function ge(){return o.event.changedTouches[0].identifier}o.touches=function(se,Me){return arguments.length<2&&(Me=oe().touches),Me?M(Me).map(function(De){var Xe=Ce(se,De);return Xe.identifier=De.identifier,Xe}):[]};var pe=1e-6,Te=pe*pe,be=Math.PI,ke=2*be,Ve=ke-pe,je=be/2,at=be/180,ut=180/be;function Nt(se,Me,De){return(Me[0]-se[0])*(De[1]-se[1])-(Me[1]-se[1])*(De[0]-se[0])}function Vt(se){return se>1?je:se<-1?-je:Math.asin(se)}function gt(se){return((se=Math.exp(se))-1/se)/2}function Ct(se){return((se=Math.exp(se))+1/se)/2}function Yt(se){return((se=Math.exp(2*se))-1)/(se+1)}var gr=Math.SQRT2,ht=2,Ht=4;o.interpolateZoom=function(se,Me){var De=se[0],Xe=se[1],Qe=se[2],rt=Me[0],Tt=Me[1],yt=Me[2],Ft=rt-De,Ot=Tt-Xe,jt=Ft*Ft+Ot*Ot,wr,Tr;if(jt<Te)Tr=Math.log(yt/Qe)/gr,wr=function(rn){return[De+rn*Ft,Xe+rn*Ot,Qe*Math.exp(gr*rn*Tr)]};else{var Wr=Math.sqrt(jt),qr=(yt*yt-Qe*Qe+Ht*jt)/(2*Qe*ht*Wr),Mr=(yt*yt-Qe*Qe-Ht*jt)/(2*yt*ht*Wr),kr=Math.log(Math.sqrt(qr*qr+1)-qr),Hr=Math.log(Math.sqrt(Mr*Mr+1)-Mr);Tr=(Hr-kr)/gr,wr=function(rn){var on=rn*Tr,Zr=Ct(kr),_n=Qe/(ht*Wr)*(Zr*Yt(gr*on+kr)-gt(kr));return[De+_n*Ft,Xe+_n*Ot,Qe*Zr/Ct(gr*on+kr)]}}return wr.duration=Tr*1e3,wr},o.behavior.zoom=function(){var se={x:0,y:0,k:1},Me,De,Xe,Qe=[960,500],rt=Wt,Tt=250,yt=0,Ft="mousedown.zoom",Ot="mousemove.zoom",jt="mouseup.zoom",wr,Tr="touchstart.zoom",Wr,qr=Z(on,"zoomstart","zoom","zoomend"),Mr,kr,Hr,rn;er||(er="onwheel"in d?(cr=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in d?(cr=function(){return o.event.wheelDelta},"mousewheel"):(cr=function(){return-o.event.detail},"MozMousePixelScroll"));function on(Hn){Hn.on(Ft,Sa).on(er+".zoom",Ai).on("dblclick.zoom",qa).on(Tr,Za)}on.event=function(Hn){Hn.each(function(){var Da=qr.of(this,arguments),pa=se;Er?o.select(this).transition().each("start.zoom",function(){se=this.__chart__||{x:0,y:0,k:1},ra(Da)}).tween("zoom:zoom",function(){var Ba=Qe[0],li=Qe[1],ja=De?De[0]:Ba/2,zi=De?De[1]:li/2,Fi=o.interpolateZoom([(ja-se.x)/se.k,(zi-se.y)/se.k,Ba/se.k],[(ja-pa.x)/pa.k,(zi-pa.y)/pa.k,Ba/pa.k]);return function(Ui){var ui=Fi(Ui),Ki=Ba/ui[2];this.__chart__=se={x:ja-ui[0]*Ki,y:zi-ui[1]*Ki,k:Ki},Pa(Da)}}).each("interrupt.zoom",function(){ya(Da)}).each("end.zoom",function(){ya(Da)}):(this.__chart__=se,ra(Da),Pa(Da),ya(Da))})},on.translate=function(Hn){return arguments.length?(se={x:+Hn[0],y:+Hn[1],k:se.k},Qn(),on):[se.x,se.y]},on.scale=function(Hn){return arguments.length?(se={x:se.x,y:se.y,k:null},Xn(+Hn),Qn(),on):se.k},on.scaleExtent=function(Hn){return arguments.length?(rt=Hn==null?Wt:[+Hn[0],+Hn[1]],on):rt},on.center=function(Hn){return arguments.length?(Xe=Hn&&[+Hn[0],+Hn[1]],on):Xe},on.size=function(Hn){return arguments.length?(Qe=Hn&&[+Hn[0],+Hn[1]],on):Qe},on.duration=function(Hn){return arguments.length?(Tt=+Hn,on):Tt},on.x=function(Hn){return arguments.length?(kr=Hn,Mr=Hn.copy(),se={x:0,y:0,k:1},on):kr},on.y=function(Hn){return arguments.length?(rn=Hn,Hr=Hn.copy(),se={x:0,y:0,k:1},on):rn};function Zr(Hn){return[(Hn[0]-se.x)/se.k,(Hn[1]-se.y)/se.k]}function _n(Hn){return[Hn[0]*se.k+se.x,Hn[1]*se.k+se.y]}function Xn(Hn){se.k=Math.max(rt[0],Math.min(rt[1],Hn))}function ta(Hn,Da){Da=_n(Da),se.x+=Hn[0]-Da[0],se.y+=Hn[1]-Da[1]}function Wn(Hn,Da,pa,Ba){Hn.__chart__={x:se.x,y:se.y,k:se.k},Xn(Math.pow(2,Ba)),ta(De=Da,pa),Hn=o.select(Hn),Tt>0&&(Hn=Hn.transition().duration(Tt)),Hn.call(on.event)}function Qn(){kr&&kr.domain(Mr.range().map(function(Hn){return(Hn-se.x)/se.k}).map(Mr.invert)),rn&&rn.domain(Hr.range().map(function(Hn){return(Hn-se.y)/se.k}).map(Hr.invert))}function ra(Hn){yt++||Hn({type:"zoomstart"})}function Pa(Hn){Qn(),Hn({type:"zoom",scale:se.k,translate:[se.x,se.y]})}function ya(Hn){--yt||(Hn({type:"zoomend"}),De=null)}function Sa(){var Hn=this,Da=qr.of(Hn,arguments),pa=0,Ba=o.select(r(Hn)).on(Ot,zi).on(jt,Fi),li=Zr(o.mouse(Hn)),ja=He(Hn);kt.call(Hn),ra(Da);function zi(){pa=1,ta(o.mouse(Hn),li),Pa(Da)}function Fi(){Ba.on(Ot,null).on(jt,null),ja(pa),ya(Da)}}function Za(){var Hn=this,Da=qr.of(Hn,arguments),pa={},Ba=0,li,ja=".zoom-"+o.event.changedTouches[0].identifier,zi="touchmove"+ja,Fi="touchend"+ja,Ui=[],ui=o.select(Hn),Ki=He(Hn);xa(),ra(Da),ui.on(Ft,null).on(Tr,xa);function qn(){var Vi=o.touches(Hn);return li=se.k,Vi.forEach(function(ei){ei.identifier in pa&&(pa[ei.identifier]=Zr(ei))}),Vi}function xa(){var Vi=o.event.target;o.select(Vi).on(zi,so).on(Fi,ho),Ui.push(Vi);for(var ei=o.event.changedTouches,Pi=0,Mi=ei.length;Pi<Mi;++Pi)pa[ei[Pi].identifier]=null;var Bo=qn(),Qo=Date.now();if(Bo.length===1){if(Qo-Wr<500){var pi=Bo[0];Wn(Hn,pi,pa[pi.identifier],Math.floor(Math.log(se.k)/Math.LN2)+1),q()}Wr=Qo}else if(Bo.length>1){var pi=Bo[0],Zs=Bo[1],Na=pi[0]-Zs[0],gi=pi[1]-Zs[1];Ba=Na*Na+gi*gi}}function so(){var Vi=o.touches(Hn),ei,Pi,Mi,Bo;kt.call(Hn);for(var Qo=0,pi=Vi.length;Qo<pi;++Qo,Bo=null)if(Mi=Vi[Qo],Bo=pa[Mi.identifier]){if(Pi)break;ei=Mi,Pi=Bo}if(Bo){var Zs=(Zs=Mi[0]-ei[0])*Zs+(Zs=Mi[1]-ei[1])*Zs,Na=Ba&&Math.sqrt(Zs/Ba);ei=[(ei[0]+Mi[0])/2,(ei[1]+Mi[1])/2],Pi=[(Pi[0]+Bo[0])/2,(Pi[1]+Bo[1])/2],Xn(Na*li)}Wr=null,ta(ei,Pi),Pa(Da)}function ho(){if(o.event.touches.length){for(var Vi=o.event.changedTouches,ei=0,Pi=Vi.length;ei<Pi;++ei)delete pa[Vi[ei].identifier];for(var Mi in pa)return void qn()}o.selectAll(Ui).on(ja,null),ui.on(Ft,Sa).on(Tr,Za),Ki(),ya(Da)}}function Ai(){var Hn=qr.of(this,arguments);wr?clearTimeout(wr):(kt.call(this),Me=Zr(De=Xe||o.mouse(this)),ra(Hn)),wr=setTimeout(function(){wr=null,ya(Hn)},50),q(),Xn(Math.pow(2,cr()*.002)*se.k),ta(De,Me),Pa(Hn)}function qa(){var Hn=o.mouse(this),Da=Math.log(se.k)/Math.LN2;Wn(this,Hn,Zr(Hn),o.event.shiftKey?Math.ceil(Da)-1:Math.floor(Da)+1)}return o.rebind(on,qr,"on")};var Wt=[0,1/0],cr,er;o.color=ct;function ct(){}ct.prototype.toString=function(){return this.rgb()+""},o.hsl=qe;function qe(se,Me,De){return this instanceof qe?(this.h=+se,this.s=+Me,void(this.l=+De)):arguments.length<2?se instanceof qe?new qe(se.h,se.s,se.l):vr(""+se,lr,qe):new qe(se,Me,De)}var dt=qe.prototype=new ct;dt.brighter=function(se){return se=Math.pow(.7,arguments.length?se:1),new qe(this.h,this.s,this.l/se)},dt.darker=function(se){return se=Math.pow(.7,arguments.length?se:1),new qe(this.h,this.s,se*this.l)},dt.rgb=function(){return bt(this.h,this.s,this.l)};function bt(se,Me,De){var Xe,Qe;se=isNaN(se)?0:(se%=360)<0?se+360:se,Me=isNaN(Me)||Me<0?0:Me>1?1:Me,De=De<0?0:De>1?1:De,Qe=De<=.5?De*(1+Me):De+Me-De*Me,Xe=2*De-Qe;function rt(yt){return yt>360?yt-=360:yt<0&&(yt+=360),yt<60?Xe+(Qe-Xe)*yt/60:yt<180?Qe:yt<240?Xe+(Qe-Xe)*(240-yt)/60:Xe}function Tt(yt){return Math.round(rt(yt)*255)}return new rr(Tt(se+120),Tt(se),Tt(se-120))}o.hcl=Et;function Et(se,Me,De){return this instanceof Et?(this.h=+se,this.c=+Me,void(this.l=+De)):arguments.length<2?se instanceof Et?new Et(se.h,se.c,se.l):se instanceof It?Rt(se.l,se.a,se.b):Rt((se=Or((se=o.rgb(se)).r,se.g,se.b)).l,se.a,se.b):new Et(se,Me,De)}var Mt=Et.prototype=new ct;Mt.brighter=function(se){return new Et(this.h,this.c,Math.min(100,this.l+Gt*(arguments.length?se:1)))},Mt.darker=function(se){return new Et(this.h,this.c,Math.max(0,this.l-Gt*(arguments.length?se:1)))},Mt.rgb=function(){return _t(this.h,this.c,this.l).rgb()};function _t(se,Me,De){return isNaN(se)&&(se=0),isNaN(Me)&&(Me=0),new It(De,Math.cos(se*=at)*Me,Math.sin(se)*Me)}o.lab=It;function It(se,Me,De){return this instanceof It?(this.l=+se,this.a=+Me,void(this.b=+De)):arguments.length<2?se instanceof It?new It(se.l,se.a,se.b):se instanceof Et?_t(se.h,se.c,se.l):Or((se=rr(se)).r,se.g,se.b):new It(se,Me,De)}var Gt=18,nr=.95047,ar=1,ir=1.08883,Be=It.prototype=new ct;Be.brighter=function(se){return new It(Math.min(100,this.l+Gt*(arguments.length?se:1)),this.a,this.b)},Be.darker=function(se){return new It(Math.max(0,this.l-Gt*(arguments.length?se:1)),this.a,this.b)},Be.rgb=function(){return Fe(this.l,this.a,this.b)};function Fe(se,Me,De){var Xe=(se+16)/116,Qe=Xe+Me/500,rt=Xe-De/200;return Qe=Lt(Qe)*nr,Xe=Lt(Xe)*ar,rt=Lt(rt)*ir,new rr(Qt(3.2404542*Qe-1.5371385*Xe-.4985314*rt),Qt(-.969266*Qe+1.8760108*Xe+.041556*rt),Qt(.0556434*Qe-.2040259*Xe+1.0572252*rt))}function Rt(se,Me,De){return se>0?new Et(Math.atan2(De,Me)*ut,Math.sqrt(Me*Me+De*De),se):new Et(NaN,NaN,se)}function Lt(se){return se>.206893034?se*se*se:(se-.13793103448275862)/7.787037}function Ut(se){return se>.008856?Math.pow(se,.3333333333333333):7.787037*se+.13793103448275862}function Qt(se){return Math.round(255*(se<=.00304?12.92*se:1.055*Math.pow(se,.4166666666666667)-.055))}o.rgb=rr;function rr(se,Me,De){return this instanceof rr?(this.r=~~se,this.g=~~Me,void(this.b=~~De)):arguments.length<2?se instanceof rr?new rr(se.r,se.g,se.b):vr(""+se,rr,bt):new rr(se,Me,De)}function Kt(se){return new rr(se>>16,se>>8&255,se&255)}function Dt(se){return Kt(se)+""}var sr=rr.prototype=new ct;sr.brighter=function(se){se=Math.pow(.7,arguments.length?se:1);var Me=this.r,De=this.g,Xe=this.b,Qe=30;return!Me&&!De&&!Xe?new rr(Qe,Qe,Qe):(Me&&Me<Qe&&(Me=Qe),De&&De<Qe&&(De=Qe),Xe&&Xe<Qe&&(Xe=Qe),new rr(Math.min(255,Me/se),Math.min(255,De/se),Math.min(255,Xe/se)))},sr.darker=function(se){return se=Math.pow(.7,arguments.length?se:1),new rr(se*this.r,se*this.g,se*this.b)},sr.hsl=function(){return lr(this.r,this.g,this.b)},sr.toString=function(){return"#"+fr(this.r)+fr(this.g)+fr(this.b)};function fr(se){return se<16?"0"+Math.max(0,se).toString(16):Math.min(255,se).toString(16)}function vr(se,Me,De){var Xe=0,Qe=0,rt=0,Tt,yt,Ft;if(Tt=/([a-z]+)\((.*)\)/.exec(se=se.toLowerCase()),Tt)switch(yt=Tt[2].split(","),Tt[1]){case"hsl":return De(parseFloat(yt[0]),parseFloat(yt[1])/100,parseFloat(yt[2])/100);case"rgb":return Me(Ar(yt[0]),Ar(yt[1]),Ar(yt[2]))}return(Ft=sn.get(se))?Me(Ft.r,Ft.g,Ft.b):(se!=null&&se.charAt(0)==="#"&&!isNaN(Ft=parseInt(se.slice(1),16))&&(se.length===4?(Xe=(Ft&3840)>>4,Xe=Xe>>4|Xe,Qe=Ft&240,Qe=Qe>>4|Qe,rt=Ft&15,rt=rt<<4|rt):se.length===7&&(Xe=(Ft&16711680)>>16,Qe=(Ft&65280)>>8,rt=Ft&255)),Me(Xe,Qe,rt))}function lr(se,Me,De){var Xe=Math.min(se/=255,Me/=255,De/=255),Qe=Math.max(se,Me,De),rt=Qe-Xe,Tt,yt,Ft=(Qe+Xe)/2;return rt?(yt=Ft<.5?rt/(Qe+Xe):rt/(2-Qe-Xe),se==Qe?Tt=(Me-De)/rt+(Me<De?6:0):Me==Qe?Tt=(De-se)/rt+2:Tt=(se-Me)/rt+4,Tt*=60):(Tt=NaN,yt=Ft>0&&Ft<1?0:Tt),new qe(Tt,yt,Ft)}function Or(se,Me,De){se=Sr(se),Me=Sr(Me),De=Sr(De);var Xe=Ut((.4124564*se+.3575761*Me+.1804375*De)/nr),Qe=Ut((.2126729*se+.7151522*Me+.072175*De)/ar),rt=Ut((.0193339*se+.119192*Me+.9503041*De)/ir);return It(116*Qe-16,500*(Xe-Qe),200*(Qe-rt))}function Sr(se){return(se/=255)<=.04045?se/12.92:Math.pow((se+.055)/1.055,2.4)}function Ar(se){var Me=parseFloat(se);return se.charAt(se.length-1)==="%"?Math.round(Me*2.55):Me}var sn=o.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});sn.forEach(function(se,Me){sn.set(se,Kt(Me))});function Jr(se){return typeof se=="function"?se:function(){return se}}o.functor=Jr,o.xhr=bn(z);function bn(se){return function(Me,De,Xe){return arguments.length===2&&typeof De=="function"&&(Xe=De,De=null),xn(Me,De,se,Xe)}}function xn(se,Me,De,Xe){var Qe={},rt=o.dispatch("beforesend","progress","load","error"),Tt={},yt=new XMLHttpRequest,Ft=null;self.XDomainRequest&&!("withCredentials"in yt)&&/^(http(s)?:)?\/\//.test(se)&&(yt=new XDomainRequest),"onload"in yt?yt.onload=yt.onerror=Ot:yt.onreadystatechange=function(){yt.readyState>3&&Ot()};function Ot(){var jt=yt.status,wr;if(!jt&&Lr(yt)||jt>=200&&jt<300||jt===304){try{wr=De.call(Qe,yt)}catch(Tr){rt.error.call(Qe,Tr);return}rt.load.call(Qe,wr)}else rt.error.call(Qe,yt)}return yt.onprogress=function(jt){var wr=o.event;o.event=jt;try{rt.progress.call(Qe,yt)}finally{o.event=wr}},Qe.header=function(jt,wr){return jt=(jt+"").toLowerCase(),arguments.length<2?Tt[jt]:(wr==null?delete Tt[jt]:Tt[jt]=wr+"",Qe)},Qe.mimeType=function(jt){return arguments.length?(Me=jt==null?null:jt+"",Qe):Me},Qe.responseType=function(jt){return arguments.length?(Ft=jt,Qe):Ft},Qe.response=function(jt){return De=jt,Qe},["get","post"].forEach(function(jt){Qe[jt]=function(){return Qe.send.apply(Qe,[jt].concat(M(arguments)))}}),Qe.send=function(jt,wr,Tr){if(arguments.length===2&&typeof wr=="function"&&(Tr=wr,wr=null),yt.open(jt,se,!0),Me!=null&&!("accept"in Tt)&&(Tt.accept=Me+",*/*"),yt.setRequestHeader)for(var Wr in Tt)yt.setRequestHeader(Wr,Tt[Wr]);return Me!=null&&yt.overrideMimeType&&yt.overrideMimeType(Me),Ft!=null&&(yt.responseType=Ft),Tr!=null&&Qe.on("error",Tr).on("load",function(qr){Tr(null,qr)}),rt.beforesend.call(Qe,yt),yt.send(wr??null),Qe},Qe.abort=function(){return yt.abort(),Qe},o.rebind(Qe,rt,"on"),Xe==null?Qe:Qe.get(or(Xe))}function or(se){return se.length===1?function(Me,De){se(Me==null?De:null)}:se}function Lr(se){var Me=se.responseType;return Me&&Me!=="text"?se.response:se.responseText}o.dsv=function(se,Me){var De=new RegExp('["'+se+`
]`),Xe=se.charCodeAt(0);function Qe(Ot,jt,wr){arguments.length<3&&(wr=jt,jt=null);var Tr=xn(Ot,Me,jt==null?rt:Tt(jt),wr);return Tr.row=function(Wr){return arguments.length?Tr.response((jt=Wr)==null?rt:Tt(Wr)):jt},Tr}function rt(Ot){return Qe.parse(Ot.responseText)}function Tt(Ot){return function(jt){return Qe.parse(jt.responseText,Ot)}}Qe.parse=function(Ot,jt){var wr;return Qe.parseRows(Ot,function(Tr,Wr){if(wr)return wr(Tr,Wr-1);var qr=function(Mr){for(var kr={},Hr=Tr.length,rn=0;rn<Hr;++rn)kr[Tr[rn]]=Mr[rn];return kr};wr=jt?function(Mr,kr){return jt(qr(Mr),kr)}:qr})},Qe.parseRows=function(Ot,jt){var wr={},Tr={},Wr=[],qr=Ot.length,Mr=0,kr=0,Hr,rn;function on(){if(Mr>=qr)return Tr;if(rn)return rn=!1,wr;var _n=Mr;if(Ot.charCodeAt(_n)===34){for(var Xn=_n;Xn++<qr;)if(Ot.charCodeAt(Xn)===34){if(Ot.charCodeAt(Xn+1)!==34)break;++Xn}Mr=Xn+2;var ta=Ot.charCodeAt(Xn+1);return ta===13?(rn=!0,Ot.charCodeAt(Xn+2)===10&&++Mr):ta===10&&(rn=!0),Ot.slice(_n+1,Xn).replace(/""/g,'"')}for(;Mr<qr;){var ta=Ot.charCodeAt(Mr++),Wn=1;if(ta===10)rn=!0;else if(ta===13)rn=!0,Ot.charCodeAt(Mr)===10&&(++Mr,++Wn);else if(ta!==Xe)continue;return Ot.slice(_n,Mr-Wn)}return Ot.slice(_n)}for(;(Hr=on())!==Tr;){for(var Zr=[];Hr!==wr&&Hr!==Tr;)Zr.push(Hr),Hr=on();jt&&(Zr=jt(Zr,kr++))==null||Wr.push(Zr)}return Wr},Qe.format=function(Ot){if(Array.isArray(Ot[0]))return Qe.formatRows(Ot);var jt=new _,wr=[];return Ot.forEach(function(Tr){for(var Wr in Tr)jt.has(Wr)||wr.push(jt.add(Wr))}),[wr.map(Ft).join(se)].concat(Ot.map(function(Tr){return wr.map(function(Wr){return Ft(Tr[Wr])}).join(se)})).join(`
`)},Qe.formatRows=function(Ot){return Ot.map(yt).join(`
`)};function yt(Ot){return Ot.map(Ft).join(se)}function Ft(Ot){return De.test(Ot)?'"'+Ot.replace(/\"/g,'""')+'"':Ot}return Qe},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv(" ","text/tab-separated-values");var Br,_r,Qr,un,ln=this[F(this,"requestAnimationFrame")]||function(se){setTimeout(se,17)};o.timer=function(){Mn.apply(this,arguments)};function Mn(se,Me,De){var Xe=arguments.length;Xe<2&&(Me=0),Xe<3&&(De=Date.now());var Qe=De+Me,rt={c:se,t:Qe,n:null};return _r?_r.n=rt:Br=rt,_r=rt,Qr||(un=clearTimeout(un),Qr=1,ln(Dn)),rt}function Dn(){var se=Kn(),Me=sa()-se;Me>24?(isFinite(Me)&&(clearTimeout(un),un=setTimeout(Dn,Me)),Qr=0):(Qr=1,ln(Dn))}o.timer.flush=function(){Kn(),sa()};function Kn(){for(var se=Date.now(),Me=Br;Me;)se>=Me.t&&Me.c(se-Me.t)&&(Me.c=null),Me=Me.n;return se}function sa(){for(var se,Me=Br,De=1/0;Me;)Me.c?(Me.t<De&&(De=Me.t),Me=(se=Me).n):Me=se?se.n=Me.n:Br=Me.n;return _r=se,De}o.round=function(se,Me){return Me?Math.round(se*(Me=Math.pow(10,Me)))/Me:Math.round(se)},o.geom={};function na(se){return se[0]}function Jn(se){return se[1]}o.geom.hull=function(se){var Me=na,De=Jn;if(arguments.length)return Xe(se);function Xe(Qe){if(Qe.length<3)return[];var rt=Jr(Me),Tt=Jr(De),yt,Ft=Qe.length,Ot=[],jt=[];for(yt=0;yt<Ft;yt++)Ot.push([+rt.call(this,Qe[yt],yt),+Tt.call(this,Qe[yt],yt),yt]);for(Ot.sort(pr),yt=0;yt<Ft;yt++)jt.push([Ot[yt][0],-Ot[yt][1]]);var wr=aa(Ot),Tr=aa(jt),Wr=Tr[0]===wr[0],qr=Tr[Tr.length-1]===wr[wr.length-1],Mr=[];for(yt=wr.length-1;yt>=0;--yt)Mr.push(Qe[Ot[wr[yt]][2]]);for(yt=+Wr;yt<Tr.length-qr;++yt)Mr.push(Qe[Ot[Tr[yt]][2]]);return Mr}return Xe.x=function(Qe){return arguments.length?(Me=Qe,Xe):Me},Xe.y=function(Qe){return arguments.length?(De=Qe,Xe):De},Xe};function aa(se){for(var Me=se.length,De=[0,1],Xe=2,Qe=2;Qe<Me;Qe++){for(;Xe>1&&Nt(se[De[Xe-2]],se[De[Xe-1]],se[Qe])<=0;)--Xe;De[Xe++]=Qe}return De.slice(0,Xe)}function pr(se,Me){return se[0]-Me[0]||se[1]-Me[1]}o.geom.polygon=function(se){return re(se,$r),se};var $r=o.geom.polygon.prototype=[];$r.area=function(){for(var se=-1,Me=this.length,De,Xe=this[Me-1],Qe=0;++se<Me;)De=Xe,Xe=this[se],Qe+=De[1]*Xe[0]-De[0]*Xe[1];return Qe*.5},$r.centroid=function(se){var Me=-1,De=this.length,Xe=0,Qe=0,rt,Tt=this[De-1],yt;for(arguments.length||(se=-1/(6*this.area()));++Me<De;)rt=Tt,Tt=this[Me],yt=rt[0]*Tt[1]-Tt[0]*rt[1],Xe+=(rt[0]+Tt[0])*yt,Qe+=(rt[1]+Tt[1])*yt;return[Xe*se,Qe*se]},$r.clip=function(se){for(var Me,De=zn(se),Xe=-1,Qe=this.length-zn(this),rt,Tt,yt=this[Qe-1],Ft,Ot,jt;++Xe<Qe;){for(Me=se.slice(),se.length=0,Ft=this[Xe],Ot=Me[(Tt=Me.length-De)-1],rt=-1;++rt<Tt;)jt=Me[rt],Xr(jt,yt,Ft)?(Xr(Ot,yt,Ft)||se.push(fn(Ot,jt,yt,Ft)),se.push(jt)):Xr(Ot,yt,Ft)&&se.push(fn(Ot,jt,yt,Ft)),Ot=jt;De&&se.push(se[0]),yt=Ft}return se};function Xr(se,Me,De){return(De[0]-Me[0])*(se[1]-Me[1])<(De[1]-Me[1])*(se[0]-Me[0])}function fn(se,Me,De,Xe){var Qe=se[0],rt=De[0],Tt=Me[0]-Qe,yt=Xe[0]-rt,Ft=se[1],Ot=De[1],jt=Me[1]-Ft,wr=Xe[1]-Ot,Tr=(yt*(Ft-Ot)-wr*(Qe-rt))/(wr*Tt-yt*jt);return[Qe+Tr*Tt,Ft+Tr*jt]}function zn(se){var Me=se[0],De=se[se.length-1];return!(Me[0]-De[0]||Me[1]-De[1])}var pn,gn,In,Gn=[],ua,Ma,xr=[];function Rr(){uo(this),this.edge=this.site=this.circle=null}function yr(se){var Me=Gn.pop()||new Rr;return Me.site=se,Me}function Dr(se){wn(se),In.remove(se),Gn.push(se),uo(se)}function vn(se){var Me=se.circle,De=Me.x,Xe=Me.cy,Qe={x:De,y:Xe},rt=se.P,Tt=se.N,yt=[se];Dr(se);for(var Ft=rt;Ft.circle&&v(De-Ft.circle.x)<pe&&v(Xe-Ft.circle.cy)<pe;)rt=Ft.P,yt.unshift(Ft),Dr(Ft),Ft=rt;yt.unshift(Ft),wn(Ft);for(var Ot=Tt;Ot.circle&&v(De-Ot.circle.x)<pe&&v(Xe-Ot.circle.cy)<pe;)Tt=Ot.N,yt.push(Ot),Dr(Ot),Ot=Tt;yt.push(Ot),wn(Ot);var jt=yt.length,wr;for(wr=1;wr<jt;++wr)Ot=yt[wr],Ft=yt[wr-1],ba(Ot.edge,Ft.site,Ot.site,Qe);Ft=yt[0],Ot=yt[jt-1],Ot.edge=$n(Ft.site,Ot.site,null,Qe),dn(Ft),dn(Ot)}function En(se){for(var Me=se.x,De=se.y,Xe,Qe,rt,Tt,yt=In._;yt;)if(rt=an(yt,De)-Me,rt>pe)yt=yt.L;else if(Tt=Me-en(yt,De),Tt>pe){if(!yt.R){Xe=yt;break}yt=yt.R}else{rt>-1e-6?(Xe=yt.P,Qe=yt):Tt>-1e-6?(Xe=yt,Qe=yt.N):Xe=Qe=yt;break}var Ft=yr(se);if(In.insert(Xe,Ft),!(!Xe&&!Qe)){if(Xe===Qe){wn(Xe),Qe=yr(Xe.site),In.insert(Ft,Qe),Ft.edge=Qe.edge=$n(Xe.site,Ft.site),dn(Xe),dn(Qe);return}if(!Qe){Ft.edge=$n(Xe.site,Ft.site);return}wn(Xe),wn(Qe);var Ot=Xe.site,jt=Ot.x,wr=Ot.y,Tr=se.x-jt,Wr=se.y-wr,qr=Qe.site,Mr=qr.x-jt,kr=qr.y-wr,Hr=2*(Tr*kr-Wr*Mr),rn=Tr*Tr+Wr*Wr,on=Mr*Mr+kr*kr,Zr={x:(kr*rn-Wr*on)/Hr+jt,y:(Tr*on-Mr*rn)/Hr+wr};ba(Qe.edge,Ot,qr,Zr),Ft.edge=$n(Ot,se,null,Zr),Qe.edge=$n(se,qr,null,Zr),dn(Xe),dn(Qe)}}function an(se,Me){var De=se.site,Xe=De.x,Qe=De.y,rt=Qe-Me;if(!rt)return Xe;var Tt=se.P;if(!Tt)return-1/0;De=Tt.site;var yt=De.x,Ft=De.y,Ot=Ft-Me;if(!Ot)return yt;var jt=yt-Xe,wr=1/rt-1/Ot,Tr=jt/Ot;return wr?(-Tr+Math.sqrt(Tr*Tr-2*wr*(jt*jt/(-2*Ot)-Ft+Ot/2+Qe-rt/2)))/wr+Xe:(Xe+yt)/2}function en(se,Me){var De=se.N;if(De)return an(De,Me);var Xe=se.site;return Xe.y===Me?Xe.x:1/0}function br(se){this.site=se,this.edges=[]}br.prototype.prepare=function(){for(var se=this.edges,Me=se.length,De;Me--;)De=se[Me].edge,(!De.b||!De.a)&&se.splice(Me,1);return se.sort(zr),se.length};function Vr(se){for(var Me=se[0][0],De=se[1][0],Xe=se[0][1],Qe=se[1][1],rt,Tt,yt,Ft,Ot=gn,jt=Ot.length,wr,Tr,Wr,qr,Mr,kr;jt--;)if(wr=Ot[jt],!(!wr||!wr.prepare()))for(Wr=wr.edges,qr=Wr.length,Tr=0;Tr<qr;)kr=Wr[Tr].end(),yt=kr.x,Ft=kr.y,Mr=Wr[++Tr%qr].start(),rt=Mr.x,Tt=Mr.y,(v(yt-rt)>pe||v(Ft-Tt)>pe)&&(Wr.splice(Tr,0,new ni(la(wr.site,kr,v(yt-Me)<pe&&Qe-Ft>pe?{x:Me,y:v(rt-Me)<pe?Tt:Qe}:v(Ft-Qe)<pe&&De-yt>pe?{x:v(Tt-Qe)<pe?rt:De,y:Qe}:v(yt-De)<pe&&Ft-Xe>pe?{x:De,y:v(rt-De)<pe?Tt:Xe}:v(Ft-Xe)<pe&&yt-Me>pe?{x:v(Tt-Xe)<pe?rt:Me,y:Xe}:null),wr.site,null)),++qr)}function zr(se,Me){return Me.angle-se.angle}function Yr(){uo(this),this.x=this.y=this.arc=this.site=this.cy=null}function dn(se){var Me=se.P,De=se.N;if(!(!Me||!De)){var Xe=Me.site,Qe=se.site,rt=De.site;if(Xe!==rt){var Tt=Qe.x,yt=Qe.y,Ft=Xe.x-Tt,Ot=Xe.y-yt,jt=rt.x-Tt,kr=rt.y-yt,wr=2*(Ft*kr-Ot*jt);if(!(wr>=-1e-12)){var Tr=Ft*Ft+Ot*Ot,Wr=jt*jt+kr*kr,qr=(kr*Tr-Ot*Wr)/wr,Mr=(Ft*Wr-jt*Tr)/wr,kr=Mr+yt,Hr=xr.pop()||new Yr;Hr.arc=se,Hr.site=Qe,Hr.x=qr+Tt,Hr.y=kr+Math.sqrt(qr*qr+Mr*Mr),Hr.cy=kr,se.circle=Hr;for(var rn=null,on=Ma._;on;)if(Hr.y<on.y||Hr.y===on.y&&Hr.x<=on.x)if(on.L)on=on.L;else{rn=on.P;break}else if(on.R)on=on.R;else{rn=on;break}Ma.insert(rn,Hr),rn||(ua=Hr)}}}}function wn(se){var Me=se.circle;Me&&(Me.P||(ua=Me.N),Ma.remove(Me),xr.push(Me),uo(Me),se.circle=null)}function Tn(se,Me,De,Xe){return function(Qe){var rt=Qe.a,Tt=Qe.b,yt=rt.x,Ft=rt.y,Ot=Tt.x,jt=Tt.y,wr=0,Tr=1,Wr=Ot-yt,qr=jt-Ft,Mr;if(Mr=se-yt,!(!Wr&&Mr>0)){if(Mr/=Wr,Wr<0){if(Mr<wr)return;Mr<Tr&&(Tr=Mr)}else if(Wr>0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}if(Mr=De-yt,!(!Wr&&Mr<0)){if(Mr/=Wr,Wr<0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}else if(Wr>0){if(Mr<wr)return;Mr<Tr&&(Tr=Mr)}if(Mr=Me-Ft,!(!qr&&Mr>0)){if(Mr/=qr,qr<0){if(Mr<wr)return;Mr<Tr&&(Tr=Mr)}else if(qr>0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}if(Mr=Xe-Ft,!(!qr&&Mr<0)){if(Mr/=qr,qr<0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}else if(qr>0){if(Mr<wr)return;Mr<Tr&&(Tr=Mr)}return wr>0&&(Qe.a={x:yt+wr*Wr,y:Ft+wr*qr}),Tr<1&&(Qe.b={x:yt+Tr*Wr,y:Ft+Tr*qr}),Qe}}}}}}function kn(se){for(var Me=pn,De=Tn(se[0][0],se[0][1],se[1][0],se[1][1]),Xe=Me.length,Qe;Xe--;)Qe=Me[Xe],(!Pn(Qe,se)||!De(Qe)||v(Qe.a.x-Qe.b.x)<pe&&v(Qe.a.y-Qe.b.y)<pe)&&(Qe.a=Qe.b=null,Me.splice(Xe,1))}function Pn(se,Me){var De=se.b;if(De)return!0;var Xe=se.a,Qe=Me[0][0],rt=Me[1][0],Tt=Me[0][1],yt=Me[1][1],Ft=se.l,Ot=se.r,jt=Ft.x,wr=Ft.y,Tr=Ot.x,Wr=Ot.y,qr=(jt+Tr)/2,Mr=(wr+Wr)/2,kr,Hr;if(Wr===wr){if(qr<Qe||qr>=rt)return;if(jt>Tr){if(!Xe)Xe={x:qr,y:Tt};else if(Xe.y>=yt)return;De={x:qr,y:yt}}else{if(!Xe)Xe={x:qr,y:yt};else if(Xe.y<Tt)return;De={x:qr,y:Tt}}}else if(kr=(jt-Tr)/(Wr-wr),Hr=Mr-kr*qr,kr<-1||kr>1)if(jt>Tr){if(!Xe)Xe={x:(Tt-Hr)/kr,y:Tt};else if(Xe.y>=yt)return;De={x:(yt-Hr)/kr,y:yt}}else{if(!Xe)Xe={x:(yt-Hr)/kr,y:yt};else if(Xe.y<Tt)return;De={x:(Tt-Hr)/kr,y:Tt}}else if(wr<Wr){if(!Xe)Xe={x:Qe,y:kr*Qe+Hr};else if(Xe.x>=rt)return;De={x:rt,y:kr*rt+Hr}}else{if(!Xe)Xe={x:rt,y:kr*rt+Hr};else if(Xe.x<Qe)return;De={x:Qe,y:kr*Qe+Hr}}return se.a=Xe,se.b=De,!0}function fa(se,Me){this.l=se,this.r=Me,this.a=this.b=null}function $n(se,Me,De,Xe){var Qe=new fa(se,Me);return pn.push(Qe),De&&ba(Qe,se,Me,De),Xe&&ba(Qe,Me,se,Xe),gn[se.i].edges.push(new ni(Qe,se,Me)),gn[Me.i].edges.push(new ni(Qe,Me,se)),Qe}function la(se,Me,De){var Xe=new fa(se,null);return Xe.a=Me,Xe.b=De,pn.push(Xe),Xe}function ba(se,Me,De,Xe){!se.a&&!se.b?(se.a=Xe,se.l=Me,se.r=De):se.l===De?se.b=Xe:se.a=Xe}function ni(se,Me,De){var Xe=se.a,Qe=se.b;this.edge=se,this.site=Me,this.angle=De?Math.atan2(De.y-Me.y,De.x-Me.x):se.l===Me?Math.atan2(Qe.x-Xe.x,Xe.y-Qe.y):Math.atan2(Xe.x-Qe.x,Qe.y-Xe.y)}ni.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}};function Xa(){this._=null}function uo(se){se.U=se.C=se.L=se.R=se.P=se.N=null}Xa.prototype={insert:function(se,Me){var De,Xe,Qe;if(se){if(Me.P=se,Me.N=se.N,se.N&&(se.N.P=Me),se.N=Me,se.R){for(se=se.R;se.L;)se=se.L;se.L=Me}else se.R=Me;De=se}else this._?(se=Ls(this._),Me.P=null,Me.N=se,se.P=se.L=Me,De=se):(Me.P=Me.N=null,this._=Me,De=null);for(Me.L=Me.R=null,Me.U=De,Me.C=!0,se=Me;De&&De.C;)Xe=De.U,De===Xe.L?(Qe=Xe.R,Qe&&Qe.C?(De.C=Qe.C=!1,Xe.C=!0,se=Xe):(se===De.R&&(ao(this,De),se=De,De=se.U),De.C=!1,Xe.C=!0,Oi(this,Xe))):(Qe=Xe.L,Qe&&Qe.C?(De.C=Qe.C=!1,Xe.C=!0,se=Xe):(se===De.L&&(Oi(this,De),se=De,De=se.U),De.C=!1,Xe.C=!0,ao(this,Xe))),De=se.U;this._.C=!1},remove:function(se){se.N&&(se.N.P=se.P),se.P&&(se.P.N=se.N),se.N=se.P=null;var Me=se.U,De,Xe=se.L,Qe=se.R,rt,Tt;if(Xe?Qe?rt=Ls(Qe):rt=Xe:rt=Qe,Me?Me.L===se?Me.L=rt:Me.R=rt:this._=rt,Xe&&Qe?(Tt=rt.C,rt.C=se.C,rt.L=Xe,Xe.U=rt,rt!==Qe?(Me=rt.U,rt.U=se.U,se=rt.R,Me.L=se,rt.R=Qe,Qe.U=rt):(rt.U=Me,Me=rt,se=rt.R)):(Tt=se.C,se=rt),se&&(se.U=Me),!Tt){if(se&&se.C){se.C=!1;return}do{if(se===this._)break;if(se===Me.L){if(De=Me.R,De.C&&(De.C=!1,Me.C=!0,ao(this,Me),De=Me.R),De.L&&De.L.C||De.R&&De.R.C){(!De.R||!De.R.C)&&(De.L.C=!1,De.C=!0,Oi(this,De),De=Me.R),De.C=Me.C,Me.C=De.R.C=!1,ao(this,Me),se=this._;break}}else if(De=Me.L,De.C&&(De.C=!1,Me.C=!0,Oi(this,Me),De=Me.L),De.L&&De.L.C||De.R&&De.R.C){(!De.L||!De.L.C)&&(De.R.C=!1,De.C=!0,ao(this,De),De=Me.L),De.C=Me.C,Me.C=De.L.C=!1,Oi(this,Me),se=this._;break}De.C=!0,se=Me,Me=Me.U}while(!se.C);se&&(se.C=!1)}}};function ao(se,Me){var De=Me,Xe=Me.R,Qe=De.U;Qe?Qe.L===De?Qe.L=Xe:Qe.R=Xe:se._=Xe,Xe.U=Qe,De.U=Xe,De.R=Xe.L,De.R&&(De.R.U=De),Xe.L=De}function Oi(se,Me){var De=Me,Xe=Me.L,Qe=De.U;Qe?Qe.L===De?Qe.L=Xe:Qe.R=Xe:se._=Xe,Xe.U=Qe,De.U=Xe,De.L=Xe.R,De.L&&(De.L.U=De),Xe.R=De}function Ls(se){for(;se.L;)se=se.L;return se}function jl(se,Me){var De=se.sort(bu).pop(),Xe,Qe,rt;for(pn=[],gn=new Array(se.length),In=new Xa,Ma=new Xa;;)if(rt=ua,De&&(!rt||De.y<rt.y||De.y===rt.y&&De.x<rt.x))(De.x!==Xe||De.y!==Qe)&&(gn[De.i]=new br(De),En(De),Xe=De.x,Qe=De.y),De=se.pop();else if(rt)vn(rt.arc);else break;Me&&(kn(Me),Vr(Me));var Tt={cells:gn,edges:pn};return In=Ma=pn=gn=null,Tt}function bu(se,Me){return Me.y-se.y||Me.x-se.x}o.geom.voronoi=function(se){var Me=na,De=Jn,Xe=Me,Qe=De,rt=Ga;if(se)return Tt(se);function Tt(Ft){var Ot=new Array(Ft.length),jt=rt[0][0],wr=rt[0][1],Tr=rt[1][0],Wr=rt[1][1];return jl(yt(Ft),rt).cells.forEach(function(qr,Mr){var kr=qr.edges,Hr=qr.site,rn=Ot[Mr]=kr.length?kr.map(function(on){var Zr=on.start();return[Zr.x,Zr.y]}):Hr.x>=jt&&Hr.x<=Tr&&Hr.y>=wr&&Hr.y<=Wr?[[jt,Wr],[Tr,Wr],[Tr,wr],[jt,wr]]:[];rn.point=Ft[Mr]}),Ot}function yt(Ft){return Ft.map(function(Ot,jt){return{x:Math.round(Xe(Ot,jt)/pe)*pe,y:Math.round(Qe(Ot,jt)/pe)*pe,i:jt}})}return Tt.links=function(Ft){return jl(yt(Ft)).edges.filter(function(Ot){return Ot.l&&Ot.r}).map(function(Ot){return{source:Ft[Ot.l.i],target:Ft[Ot.r.i]}})},Tt.triangles=function(Ft){var Ot=[];return jl(yt(Ft)).cells.forEach(function(jt,wr){for(var Tr=jt.site,Wr=jt.edges.sort(zr),qr=-1,Mr=Wr.length,kr,Hr=Wr[Mr-1].edge,rn=Hr.l===Tr?Hr.r:Hr.l;++qr<Mr;)kr=rn,Hr=Wr[qr].edge,rn=Hr.l===Tr?Hr.r:Hr.l,wr<kr.i&&wr<rn.i&&qs(Tr,kr,rn)<0&&Ot.push([Ft[wr],Ft[kr.i],Ft[rn.i]])}),Ot},Tt.x=function(Ft){return arguments.length?(Xe=Jr(Me=Ft),Tt):Me},Tt.y=function(Ft){return arguments.length?(Qe=Jr(De=Ft),Tt):De},Tt.clipExtent=function(Ft){return arguments.length?(rt=Ft??Ga,Tt):rt===Ga?null:rt},Tt.size=function(Ft){return arguments.length?Tt.clipExtent(Ft&&[[0,0],Ft]):rt===Ga?null:rt&&rt[1]},Tt};var Ga=[[-1e6,-1e6],[1e6,1e6]];function qs(se,Me,De){return(se.x-De.x)*(Me.y-se.y)-(se.x-Me.x)*(De.y-se.y)}o.geom.delaunay=function(se){return o.geom.voronoi().triangles(se)},o.geom.quadtree=function(se,Me,De,Xe,Qe){var rt=na,Tt=Jn,yt;if(yt=arguments.length)return rt=Kl,Tt=Ii,yt===3&&(Qe=De,Xe=Me,De=Me=0),Ft(se);function Ft(Ot){var jt,wr=Jr(rt),Tr=Jr(Tt),Wr,qr,Mr,kr,Hr,rn,on,Zr;if(Me!=null)Hr=Me,rn=De,on=Xe,Zr=Qe;else if(on=Zr=-(Hr=rn=1/0),Wr=[],qr=[],kr=Ot.length,yt)for(Mr=0;Mr<kr;++Mr)jt=Ot[Mr],jt.x<Hr&&(Hr=jt.x),jt.y<rn&&(rn=jt.y),jt.x>on&&(on=jt.x),jt.y>Zr&&(Zr=jt.y),Wr.push(jt.x),qr.push(jt.y);else for(Mr=0;Mr<kr;++Mr){var _n=+wr(jt=Ot[Mr],Mr),Xn=+Tr(jt,Mr);_n<Hr&&(Hr=_n),Xn<rn&&(rn=Xn),_n>on&&(on=_n),Xn>Zr&&(Zr=Xn),Wr.push(_n),qr.push(Xn)}var ta=on-Hr,Wn=Zr-rn;ta>Wn?Zr=rn+ta:on=Hr+Wn;function Qn(ya,Sa,Za,Ai,qa,Hn,Da,pa){if(!(isNaN(Za)||isNaN(Ai)))if(ya.leaf){var Ba=ya.x,li=ya.y;if(Ba!=null)if(v(Ba-Za)+v(li-Ai)<.01)ra(ya,Sa,Za,Ai,qa,Hn,Da,pa);else{var ja=ya.point;ya.x=ya.y=ya.point=null,ra(ya,ja,Ba,li,qa,Hn,Da,pa),ra(ya,Sa,Za,Ai,qa,Hn,Da,pa)}else ya.x=Za,ya.y=Ai,ya.point=Sa}else ra(ya,Sa,Za,Ai,qa,Hn,Da,pa)}function ra(ya,Sa,Za,Ai,qa,Hn,Da,pa){var Ba=(qa+Da)*.5,li=(Hn+pa)*.5,ja=Za>=Ba,zi=Ai>=li,Fi=zi<<1|ja;ya.leaf=!1,ya=ya.nodes[Fi]||(ya.nodes[Fi]=$i()),ja?qa=Ba:Da=Ba,zi?Hn=li:pa=li,Qn(ya,Sa,Za,Ai,qa,Hn,Da,pa)}var Pa=$i();if(Pa.add=function(ya){Qn(Pa,ya,+wr(ya,++Mr),+Tr(ya,Mr),Hr,rn,on,Zr)},Pa.visit=function(ya){Ps(ya,Pa,Hr,rn,on,Zr)},Pa.find=function(ya){return Ll(Pa,ya[0],ya[1],Hr,rn,on,Zr)},Mr=-1,Me==null){for(;++Mr<kr;)Qn(Pa,Ot[Mr],Wr[Mr],qr[Mr],Hr,rn,on,Zr);--Mr}else Ot.forEach(Pa.add);return Wr=qr=Ot=jt=null,Pa}return Ft.x=function(Ot){return arguments.length?(rt=Ot,Ft):rt},Ft.y=function(Ot){return arguments.length?(Tt=Ot,Ft):Tt},Ft.extent=function(Ot){return arguments.length?(Ot==null?Me=De=Xe=Qe=null:(Me=+Ot[0][0],De=+Ot[0][1],Xe=+Ot[1][0],Qe=+Ot[1][1]),Ft):Me==null?null:[[Me,De],[Xe,Qe]]},Ft.size=function(Ot){return arguments.length?(Ot==null?Me=De=Xe=Qe=null:(Me=De=0,Xe=+Ot[0],Qe=+Ot[1]),Ft):Me==null?null:[Xe-Me,Qe-De]},Ft};function Kl(se){return se.x}function Ii(se){return se.y}function $i(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Ps(se,Me,De,Xe,Qe,rt){if(!se(Me,De,Xe,Qe,rt)){var Tt=(De+Qe)*.5,yt=(Xe+rt)*.5,Ft=Me.nodes;Ft[0]&&Ps(se,Ft[0],De,Xe,Tt,yt),Ft[1]&&Ps(se,Ft[1],Tt,Xe,Qe,yt),Ft[2]&&Ps(se,Ft[2],De,yt,Tt,rt),Ft[3]&&Ps(se,Ft[3],Tt,yt,Qe,rt)}}function Ll(se,Me,De,Xe,Qe,rt,Tt){var yt=1/0,Ft;return function Ot(jt,wr,Tr,Wr,qr){if(!(wr>rt||Tr>Tt||Wr<Xe||qr<Qe)){if(Mr=jt.point){var Mr,kr=Me-jt.x,Hr=De-jt.y,rn=kr*kr+Hr*Hr;if(rn<yt){var on=Math.sqrt(yt=rn);Xe=Me-on,Qe=De-on,rt=Me+on,Tt=De+on,Ft=Mr}}for(var Zr=jt.nodes,_n=(wr+Wr)*.5,Xn=(Tr+qr)*.5,ta=Me>=_n,Wn=De>=Xn,Qn=Wn<<1|ta,ra=Qn+4;Qn<ra;++Qn)if(jt=Zr[Qn&3])switch(Qn&3){case 0:Ot(jt,wr,Tr,_n,Xn);break;case 1:Ot(jt,_n,Tr,Wr,Xn);break;case 2:Ot(jt,wr,Xn,_n,qr);break;case 3:Ot(jt,_n,Xn,Wr,qr);break}}}(se,Xe,Qe,rt,Tt),Ft}o.interpolateRgb=xi;function xi(se,Me){se=o.rgb(se),Me=o.rgb(Me);var De=se.r,Xe=se.g,Qe=se.b,rt=Me.r-De,Tt=Me.g-Xe,yt=Me.b-Qe;return function(Ft){return"#"+fr(Math.round(De+rt*Ft))+fr(Math.round(Xe+Tt*Ft))+fr(Math.round(Qe+yt*Ft))}}o.interpolateObject=Rs;function Rs(se,Me){var De={},Xe={},Qe;for(Qe in se)Qe in Me?De[Qe]=Ni(se[Qe],Me[Qe]):Xe[Qe]=se[Qe];for(Qe in Me)Qe in se||(Xe[Qe]=Me[Qe]);return function(rt){for(Qe in De)Xe[Qe]=De[Qe](rt);return Xe}}o.interpolateNumber=Ti;function Ti(se,Me){return se=+se,Me=+Me,function(De){return se*(1-De)+Me*De}}o.interpolateString=Ci;function Ci(se,Me){var De=Ds.lastIndex=Bi.lastIndex=0,Xe,Qe,rt,Tt=-1,yt=[],Ft=[];for(se=se+"",Me=Me+"";(Xe=Ds.exec(se))&&(Qe=Bi.exec(Me));)(rt=Qe.index)>De&&(rt=Me.slice(De,rt),yt[Tt]?yt[Tt]+=rt:yt[++Tt]=rt),(Xe=Xe[0])===(Qe=Qe[0])?yt[Tt]?yt[Tt]+=Qe:yt[++Tt]=Qe:(yt[++Tt]=null,Ft.push({i:Tt,x:Ti(Xe,Qe)})),De=Bi.lastIndex;return De<Me.length&&(rt=Me.slice(De),yt[Tt]?yt[Tt]+=rt:yt[++Tt]=rt),yt.length<2?Ft[0]?(Me=Ft[0].x,function(Ot){return Me(Ot)+""}):function(){return Me}:(Me=Ft.length,function(Ot){for(var jt=0,wr;jt<Me;++jt)yt[(wr=Ft[jt]).i]=wr.x(Ot);return yt.join("")})}var Ds=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bi=new RegExp(Ds.source,"g");o.interpolate=Ni;function Ni(se,Me){for(var De=o.interpolators.length,Xe;--De>=0&&!(Xe=o.interpolators[De](se,Me)););return Xe}o.interpolators=[function(se,Me){var De=typeof Me;return(De==="string"?sn.has(Me.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Me)?xi:Ci:Me instanceof ct?xi:Array.isArray(Me)?fo:De==="object"&&isNaN(Me)?Rs:Ti)(se,Me)}],o.interpolateArray=fo;function fo(se,Me){var De=[],Xe=[],Qe=se.length,rt=Me.length,Tt=Math.min(se.length,Me.length),yt;for(yt=0;yt<Tt;++yt)De.push(Ni(se[yt],Me[yt]));for(;yt<Qe;++yt)Xe[yt]=se[yt];for(;yt<rt;++yt)Xe[yt]=Me[yt];return function(Ft){for(yt=0;yt<Tt;++yt)Xe[yt]=De[yt](Ft);return Xe}}var wu=function(){return z},io=o.map({linear:wu,poly:Tu,quad:function(){return es},cubic:function(){return zo},sin:function(){return af},exp:function(){return Pl},circle:function(){return of},elastic:sf,back:lf,bounce:function(){return $l}}),nf=o.map({in:z,out:ki,"in-out":Jl,"out-in":function(se){return Jl(ki(se))}});o.ease=function(se){var Me=se.indexOf("-"),De=Me>=0?se.slice(0,Me):se,Xe=Me>=0?se.slice(Me+1):"in";return De=io.get(De)||wu,Xe=nf.get(Xe)||z,_o(Xe(De.apply(null,L.call(arguments,1))))};function _o(se){return function(Me){return Me<=0?0:Me>=1?1:se(Me)}}function ki(se){return function(Me){return 1-se(1-Me)}}function Jl(se){return function(Me){return .5*(Me<.5?se(2*Me):2-se(2-2*Me))}}function es(se){return se*se}function zo(se){return se*se*se}function Ql(se){if(se<=0)return 0;if(se>=1)return 1;var Me=se*se,De=Me*se;return 4*(se<.5?De:3*(se-Me)+De-.75)}function Tu(se){return function(Me){return Math.pow(Me,se)}}function af(se){return 1-Math.cos(se*je)}function Pl(se){return Math.pow(2,10*(se-1))}function of(se){return 1-Math.sqrt(1-se*se)}function sf(se,Me){var De;return arguments.length<2&&(Me=.45),arguments.length?De=Me/ke*Math.asin(1/se):(se=1,De=Me/4),function(Xe){return 1+se*Math.pow(2,-10*Xe)*Math.sin((Xe-De)*ke/Me)}}function lf(se){return se||(se=1.70158),function(Me){return Me*Me*((se+1)*Me-se)}}function $l(se){return se<.36363636363636365?7.5625*se*se:se<.7272727272727273?7.5625*(se-=.5454545454545454)*se+.75:se<.9090909090909091?7.5625*(se-=.8181818181818182)*se+.9375:7.5625*(se-=.9545454545454546)*se+.984375}o.interpolateHcl=uf;function uf(se,Me){se=o.hcl(se),Me=o.hcl(Me);var De=se.h,Xe=se.c,Qe=se.l,rt=Me.h-De,Tt=Me.c-Xe,yt=Me.l-Qe;return isNaN(Tt)&&(Tt=0,Xe=isNaN(Xe)?Me.c:Xe),isNaN(rt)?(rt=0,De=isNaN(De)?Me.h:De):rt>180?rt-=360:rt<-180&&(rt+=360),function(Ft){return _t(De+rt*Ft,Xe+Tt*Ft,Qe+yt*Ft)+""}}o.interpolateHsl=ff;function ff(se,Me){se=o.hsl(se),Me=o.hsl(Me);var De=se.h,Xe=se.s,Qe=se.l,rt=Me.h-De,Tt=Me.s-Xe,yt=Me.l-Qe;return isNaN(Tt)&&(Tt=0,Xe=isNaN(Xe)?Me.s:Xe),isNaN(rt)?(rt=0,De=isNaN(De)?Me.h:De):rt>180?rt-=360:rt<-180&&(rt+=360),function(Ft){return bt(De+rt*Ft,Xe+Tt*Ft,Qe+yt*Ft)+""}}o.interpolateLab=Au;function Au(se,Me){se=o.lab(se),Me=o.lab(Me);var De=se.l,Xe=se.a,Qe=se.b,rt=Me.l-De,Tt=Me.a-Xe,yt=Me.b-Qe;return function(Ft){return Fe(De+rt*Ft,Xe+Tt*Ft,Qe+yt*Ft)+""}}o.interpolateRound=Mu;function Mu(se,Me){return Me-=se,function(De){return Math.round(se+Me*De)}}o.transform=function(se){var Me=d.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(De){if(De!=null){Me.setAttribute("transform",De);var Xe=Me.transform.baseVal.consolidate()}return new ds(Xe?Xe.matrix:Su)})(se)};function ds(se){var Me=[se.a,se.b],De=[se.c,se.d],Xe=el(Me),Qe=Is(Me,De),rt=el(tl(De,Me,-Qe))||0;Me[0]*De[1]<De[0]*Me[1]&&(Me[0]*=-1,Me[1]*=-1,Xe*=-1,Qe*=-1),this.rotate=(Xe?Math.atan2(Me[1],Me[0]):Math.atan2(-De[0],De[1]))*ut,this.translate=[se.e,se.f],this.scale=[Xe,rt],this.skew=rt?Math.atan2(Qe,rt)*ut:0}ds.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Is(se,Me){return se[0]*Me[0]+se[1]*Me[1]}function el(se){var Me=Math.sqrt(Is(se,se));return Me&&(se[0]/=Me,se[1]/=Me),Me}function tl(se,Me,De){return se[0]+=De*Me[0],se[1]+=De*Me[1],se}var Su={a:1,b:0,c:0,d:1,e:0,f:0};o.interpolateTransform=Dl;function Wo(se){return se.length?se.pop()+",":""}function cf(se,Me,De,Xe){if(se[0]!==Me[0]||se[1]!==Me[1]){var Qe=De.push("translate(",null,",",null,")");Xe.push({i:Qe-4,x:Ti(se[0],Me[0])},{i:Qe-2,x:Ti(se[1],Me[1])})}else(Me[0]||Me[1])&&De.push("translate("+Me+")")}function Rl(se,Me,De,Xe){se!==Me?(se-Me>180?Me+=360:Me-se>180&&(se+=360),Xe.push({i:De.push(Wo(De)+"rotate(",null,")")-2,x:Ti(se,Me)})):Me&&De.push(Wo(De)+"rotate("+Me+")")}function Eu(se,Me,De,Xe){se!==Me?Xe.push({i:De.push(Wo(De)+"skewX(",null,")")-2,x:Ti(se,Me)}):Me&&De.push(Wo(De)+"skewX("+Me+")")}function Cu(se,Me,De,Xe){if(se[0]!==Me[0]||se[1]!==Me[1]){var Qe=De.push(Wo(De)+"scale(",null,",",null,")");Xe.push({i:Qe-4,x:Ti(se[0],Me[0])},{i:Qe-2,x:Ti(se[1],Me[1])})}else(Me[0]!==1||Me[1]!==1)&&De.push(Wo(De)+"scale("+Me+")")}function Dl(se,Me){var De=[],Xe=[];return se=o.transform(se),Me=o.transform(Me),cf(se.translate,Me.translate,De,Xe),Rl(se.rotate,Me.rotate,De,Xe),Eu(se.skew,Me.skew,De,Xe),Cu(se.scale,Me.scale,De,Xe),se=Me=null,function(Qe){for(var rt=-1,Tt=Xe.length,yt;++rt<Tt;)De[(yt=Xe[rt]).i]=yt.x(Qe);return De.join("")}}function bo(se,Me){return Me=(Me-=se=+se)||1/Me,function(De){return(De-se)/Me}}function ks(se,Me){return Me=(Me-=se=+se)||1/Me,function(De){return Math.max(0,Math.min(1,(De-se)/Me))}}o.layout={},o.layout.bundle=function(){return function(se){for(var Me=[],De=-1,Xe=se.length;++De<Xe;)Me.push(ps(se[De]));return Me}};function ps(se){for(var Me=se.source,De=se.target,Xe=ts(Me,De),Qe=[Me];Me!==Xe;)Me=Me.parent,Qe.push(Me);for(var rt=Qe.length;De!==Xe;)Qe.splice(rt,0,De),De=De.parent;return Qe}function rl(se){for(var Me=[],De=se.parent;De!=null;)Me.push(se),se=De,De=De.parent;return Me.push(se),Me}function ts(se,Me){if(se===Me)return se;for(var De=rl(se),Xe=rl(Me),Qe=De.pop(),rt=Xe.pop(),Tt=null;Qe===rt;)Tt=Qe,Qe=De.pop(),rt=Xe.pop();return Tt}o.layout.chord=function(){var se={},Me,De,Xe,Qe,rt=0,Tt,yt,Ft;function Ot(){var wr={},Tr=[],Wr=o.range(Qe),qr=[],Mr,kr,Hr,rn,on;for(Me=[],De=[],Mr=0,rn=-1;++rn<Qe;){for(kr=0,on=-1;++on<Qe;)kr+=Xe[rn][on];Tr.push(kr),qr.push(o.range(Qe)),Mr+=kr}for(Tt&&Wr.sort(function(Pa,ya){return Tt(Tr[Pa],Tr[ya])}),yt&&qr.forEach(function(Pa,ya){Pa.sort(function(Sa,Za){return yt(Xe[ya][Sa],Xe[ya][Za])})}),Mr=(ke-rt*Qe)/Mr,kr=0,rn=-1;++rn<Qe;){for(Hr=kr,on=-1;++on<Qe;){var Zr=Wr[rn],_n=qr[Zr][on],Xn=Xe[Zr][_n],ta=kr,Wn=kr+=Xn*Mr;wr[Zr+"-"+_n]={index:Zr,subindex:_n,startAngle:ta,endAngle:Wn,value:Xn}}De[Zr]={index:Zr,startAngle:Hr,endAngle:kr,value:Tr[Zr]},kr+=rt}for(rn=-1;++rn<Qe;)for(on=rn-1;++on<Qe;){var Qn=wr[rn+"-"+on],ra=wr[on+"-"+rn];(Qn.value||ra.value)&&Me.push(Qn.value<ra.value?{source:ra,target:Qn}:{source:Qn,target:ra})}Ft&&jt()}function jt(){Me.sort(function(wr,Tr){return Ft((wr.source.value+wr.target.value)/2,(Tr.source.value+Tr.target.value)/2)})}return se.matrix=function(wr){return arguments.length?(Qe=(Xe=wr)&&Xe.length,Me=De=null,se):Xe},se.padding=function(wr){return arguments.length?(rt=wr,Me=De=null,se):rt},se.sortGroups=function(wr){return arguments.length?(Tt=wr,Me=De=null,se):Tt},se.sortSubgroups=function(wr){return arguments.length?(yt=wr,Me=null,se):yt},se.sortChords=function(wr){return arguments.length?(Ft=wr,Me&&jt(),se):Ft},se.chords=function(){return Me||Ot(),Me},se.groups=function(){return De||Ot(),De},se},o.layout.force=function(){var se={},Me=o.dispatch("start","tick","end"),De,Xe=[1,1],Qe,rt,Tt=.9,yt=eu,Ft=hf,Ot=-30,jt=Il,wr=.1,Tr=.64,Wr=[],qr=[],Mr,kr,Hr;function rn(Zr){return function(_n,Xn,ta,Wn){if(_n.point!==Zr){var Qn=_n.cx-Zr.x,ra=_n.cy-Zr.y,Pa=Wn-Xn,ya=Qn*Qn+ra*ra;if(Pa*Pa/Tr<ya){if(ya<jt){var Sa=_n.charge/ya;Zr.px-=Qn*Sa,Zr.py-=ra*Sa}return!0}if(_n.point&&ya&&ya<jt){var Sa=_n.pointCharge/ya;Zr.px-=Qn*Sa,Zr.py-=ra*Sa}}return!_n.charge}}se.tick=function(){if((rt*=.99)<.005)return De=null,Me.end({type:"end",alpha:rt=0}),!0;var Zr=Wr.length,_n=qr.length,Xn,ta,Wn,Qn,ra,Pa,ya,Sa,Za;for(ta=0;ta<_n;++ta)Wn=qr[ta],Qn=Wn.source,ra=Wn.target,Sa=ra.x-Qn.x,Za=ra.y-Qn.y,(Pa=Sa*Sa+Za*Za)&&(Pa=rt*kr[ta]*((Pa=Math.sqrt(Pa))-Mr[ta])/Pa,Sa*=Pa,Za*=Pa,ra.x-=Sa*(ya=Qn.weight+ra.weight?Qn.weight/(Qn.weight+ra.weight):.5),ra.y-=Za*ya,Qn.x+=Sa*(ya=1-ya),Qn.y+=Za*ya);if((ya=rt*wr)&&(Sa=Xe[0]/2,Za=Xe[1]/2,ta=-1,ya))for(;++ta<Zr;)Wn=Wr[ta],Wn.x+=(Sa-Wn.x)*ya,Wn.y+=(Za-Wn.y)*ya;if(Ot)for(yi(Xn=o.geom.quadtree(Wr),rt,Hr),ta=-1;++ta<Zr;)(Wn=Wr[ta]).fixed||Xn.visit(rn(Wn));for(ta=-1;++ta<Zr;)Wn=Wr[ta],Wn.fixed?(Wn.x=Wn.px,Wn.y=Wn.py):(Wn.x-=(Wn.px-(Wn.px=Wn.x))*Tt,Wn.y-=(Wn.py-(Wn.py=Wn.y))*Tt);Me.tick({type:"tick",alpha:rt})},se.nodes=function(Zr){return arguments.length?(Wr=Zr,se):Wr},se.links=function(Zr){return arguments.length?(qr=Zr,se):qr},se.size=function(Zr){return arguments.length?(Xe=Zr,se):Xe},se.linkDistance=function(Zr){return arguments.length?(yt=typeof Zr=="function"?Zr:+Zr,se):yt},se.distance=se.linkDistance,se.linkStrength=function(Zr){return arguments.length?(Ft=typeof Zr=="function"?Zr:+Zr,se):Ft},se.friction=function(Zr){return arguments.length?(Tt=+Zr,se):Tt},se.charge=function(Zr){return arguments.length?(Ot=typeof Zr=="function"?Zr:+Zr,se):Ot},se.chargeDistance=function(Zr){return arguments.length?(jt=Zr*Zr,se):Math.sqrt(jt)},se.gravity=function(Zr){return arguments.length?(wr=+Zr,se):wr},se.theta=function(Zr){return arguments.length?(Tr=Zr*Zr,se):Math.sqrt(Tr)},se.alpha=function(Zr){return arguments.length?(Zr=+Zr,rt?Zr>0?rt=Zr:(De.c=null,De.t=NaN,De=null,Me.end({type:"end",alpha:rt=0})):Zr>0&&(Me.start({type:"start",alpha:rt=Zr}),De=Mn(se.tick)),se):rt},se.start=function(){var Zr,_n=Wr.length,Xn=qr.length,ta=Xe[0],Wn=Xe[1],Qn,ra;for(Zr=0;Zr<_n;++Zr)(ra=Wr[Zr]).index=Zr,ra.weight=0;for(Zr=0;Zr<Xn;++Zr)ra=qr[Zr],typeof ra.source=="number"&&(ra.source=Wr[ra.source]),typeof ra.target=="number"&&(ra.target=Wr[ra.target]),++ra.source.weight,++ra.target.weight;for(Zr=0;Zr<_n;++Zr)ra=Wr[Zr],isNaN(ra.x)&&(ra.x=Pa("x",ta)),isNaN(ra.y)&&(ra.y=Pa("y",Wn)),isNaN(ra.px)&&(ra.px=ra.x),isNaN(ra.py)&&(ra.py=ra.y);if(Mr=[],typeof yt=="function")for(Zr=0;Zr<Xn;++Zr)Mr[Zr]=+yt.call(this,qr[Zr],Zr);else for(Zr=0;Zr<Xn;++Zr)Mr[Zr]=yt;if(kr=[],typeof Ft=="function")for(Zr=0;Zr<Xn;++Zr)kr[Zr]=+Ft.call(this,qr[Zr],Zr);else for(Zr=0;Zr<Xn;++Zr)kr[Zr]=Ft;if(Hr=[],typeof Ot=="function")for(Zr=0;Zr<_n;++Zr)Hr[Zr]=+Ot.call(this,Wr[Zr],Zr);else for(Zr=0;Zr<_n;++Zr)Hr[Zr]=Ot;function Pa(ya,Sa){if(!Qn){for(Qn=new Array(_n),qa=0;qa<_n;++qa)Qn[qa]=[];for(qa=0;qa<Xn;++qa){var Za=qr[qa];Qn[Za.source.index].push(Za.target),Qn[Za.target.index].push(Za.source)}}for(var Ai=Qn[Zr],qa=-1,Hn=Ai.length,Da;++qa<Hn;)if(!isNaN(Da=Ai[qa][ya]))return Da;return Math.random()*Sa}return se.resume()},se.resume=function(){return se.alpha(.1)},se.stop=function(){return se.alpha(0)},se.drag=function(){if(Qe||(Qe=o.behavior.drag().origin(z).on("dragstart.force",Fo).on("drag.force",on).on("dragend.force",ql)),!arguments.length)return Qe;this.on("mouseover.force",_s).on("mouseout.force",wo).call(Qe)};function on(Zr){Zr.px=o.event.x,Zr.py=o.event.y,se.resume()}return o.rebind(se,Me,"on")};function Fo(se){se.fixed|=2}function ql(se){se.fixed&=-7}function _s(se){se.fixed|=4,se.px=se.x,se.py=se.y}function wo(se){se.fixed&=-5}function yi(se,Me,De){var Xe=0,Qe=0;if(se.charge=0,!se.leaf)for(var rt=se.nodes,Tt=rt.length,yt=-1,Ft;++yt<Tt;)Ft=rt[yt],Ft!=null&&(yi(Ft,Me,De),se.charge+=Ft.charge,Xe+=Ft.charge*Ft.cx,Qe+=Ft.charge*Ft.cy);if(se.point){se.leaf||(se.point.x+=Math.random()-.5,se.point.y+=Math.random()-.5);var Ot=Me*De[se.point.index];se.charge+=se.pointCharge=Ot,Xe+=Ot*se.point.x,Qe+=Ot*se.point.y}se.cx=Xe/se.charge,se.cy=Qe/se.charge}var eu=20,hf=1,Il=1/0;o.layout.hierarchy=function(){var se=_l,Me=kl,De=Os;function Xe(Qe){var rt=[Qe],Tt=[],yt;for(Qe.depth=0;(yt=rt.pop())!=null;)if(Tt.push(yt),(Ot=Me.call(Xe,yt,yt.depth))&&(Ft=Ot.length)){for(var Ft,Ot,jt;--Ft>=0;)rt.push(jt=Ot[Ft]),jt.parent=yt,jt.depth=yt.depth+1;De&&(yt.value=0),yt.children=Ot}else De&&(yt.value=+De.call(Xe,yt,yt.depth)||0),delete yt.children;return vo(Qe,function(wr){var Tr,Wr;se&&(Tr=wr.children)&&Tr.sort(se),De&&(Wr=wr.parent)&&(Wr.value+=wr.value)}),Tt}return Xe.sort=function(Qe){return arguments.length?(se=Qe,Xe):se},Xe.children=function(Qe){return arguments.length?(Me=Qe,Xe):Me},Xe.value=function(Qe){return arguments.length?(De=Qe,Xe):De},Xe.revalue=function(Qe){return De&&(Fs(Qe,function(rt){rt.children&&(rt.value=0)}),vo(Qe,function(rt){var Tt;rt.children||(rt.value=+De.call(Xe,rt,rt.depth)||0),(Tt=rt.parent)&&(Tt.value+=rt.value)})),Qe},Xe};function zs(se,Me){return o.rebind(se,Me,"sort","children","value"),se.nodes=se,se.links=vf,se}function Fs(se,Me){for(var De=[se];(se=De.pop())!=null;)if(Me(se),(Qe=se.children)&&(Xe=Qe.length))for(var Xe,Qe;--Xe>=0;)De.push(Qe[Xe])}function vo(se,Me){for(var De=[se],Xe=[];(se=De.pop())!=null;)if(Xe.push(se),(Tt=se.children)&&(rt=Tt.length))for(var Qe=-1,rt,Tt;++Qe<rt;)De.push(Tt[Qe]);for(;(se=Xe.pop())!=null;)Me(se)}function kl(se){return se.children}function Os(se){return se.value}function _l(se,Me){return Me.value-se.value}function vf(se){return o.merge(se.map(function(Me){return(Me.children||[]).map(function(De){return{source:Me,target:De}})}))}o.layout.partition=function(){var se=o.layout.hierarchy(),Me=[1,1];function De(rt,Tt,yt,Ft){var Ot=rt.children;if(rt.x=Tt,rt.y=rt.depth*Ft,rt.dx=yt,rt.dy=Ft,Ot&&(wr=Ot.length)){var jt=-1,wr,Tr,Wr;for(yt=rt.value?yt/rt.value:0;++jt<wr;)De(Tr=Ot[jt],Tt,Wr=Tr.value*yt,Ft),Tt+=Wr}}function Xe(rt){var Tt=rt.children,yt=0;if(Tt&&(Ot=Tt.length))for(var Ft=-1,Ot;++Ft<Ot;)yt=Math.max(yt,Xe(Tt[Ft]));return 1+yt}function Qe(rt,Tt){var yt=se.call(this,rt,Tt);return De(yt[0],0,Me[0],Me[1]/Xe(yt[0])),yt}return Qe.size=function(rt){return arguments.length?(Me=rt,Qe):Me},zs(Qe,se)},o.layout.pie=function(){var se=Number,Me=Lu,De=0,Xe=ke,Qe=0;function rt(Tt){var yt=Tt.length,Ft=Tt.map(function(rn,on){return+se.call(rt,rn,on)}),Ot=+(typeof De=="function"?De.apply(this,arguments):De),jt=(typeof Xe=="function"?Xe.apply(this,arguments):Xe)-Ot,wr=Math.min(Math.abs(jt)/yt,+(typeof Qe=="function"?Qe.apply(this,arguments):Qe)),Tr=wr*(jt<0?-1:1),Wr=o.sum(Ft),qr=Wr?(jt-yt*Tr)/Wr:0,Mr=o.range(yt),kr=[],Hr;return Me!=null&&Mr.sort(Me===Lu?function(rn,on){return Ft[on]-Ft[rn]}:function(rn,on){return Me(Tt[rn],Tt[on])}),Mr.forEach(function(rn){kr[rn]={data:Tt[rn],value:Hr=Ft[rn],startAngle:Ot,endAngle:Ot+=Hr*qr+Tr,padAngle:wr}}),kr}return rt.value=function(Tt){return arguments.length?(se=Tt,rt):se},rt.sort=function(Tt){return arguments.length?(Me=Tt,rt):Me},rt.startAngle=function(Tt){return arguments.length?(De=Tt,rt):De},rt.endAngle=function(Tt){return arguments.length?(Xe=Tt,rt):Xe},rt.padAngle=function(Tt){return arguments.length?(Qe=Tt,rt):Qe},rt};var Lu={};o.layout.stack=function(){var se=z,Me=nl,De=Fl,Xe=nu,Qe=tu,rt=ru;function Tt(yt,Ft){if(!(qr=yt.length))return yt;var Ot=yt.map(function(rn,on){return se.call(Tt,rn,on)}),jt=Ot.map(function(rn){return rn.map(function(on,Zr){return[Qe.call(Tt,on,Zr),rt.call(Tt,on,Zr)]})}),wr=Me.call(Tt,jt,Ft);Ot=o.permute(Ot,wr),jt=o.permute(jt,wr);var Tr=De.call(Tt,jt,Ft),Wr=Ot[0].length,qr,Mr,kr,Hr;for(kr=0;kr<Wr;++kr)for(Xe.call(Tt,Ot[0][kr],Hr=Tr[kr],jt[0][kr][1]),Mr=1;Mr<qr;++Mr)Xe.call(Tt,Ot[Mr][kr],Hr+=jt[Mr-1][kr][1],jt[Mr][kr][1]);return yt}return Tt.values=function(yt){return arguments.length?(se=yt,Tt):se},Tt.order=function(yt){return arguments.length?(Me=typeof yt=="function"?yt:Bs.get(yt)||nl,Tt):Me},Tt.offset=function(yt){return arguments.length?(De=typeof yt=="function"?yt:zl.get(yt)||Fl,Tt):De},Tt.x=function(yt){return arguments.length?(Qe=yt,Tt):Qe},Tt.y=function(yt){return arguments.length?(rt=yt,Tt):rt},Tt.out=function(yt){return arguments.length?(Xe=yt,Tt):Xe},Tt};function tu(se){return se.x}function ru(se){return se.y}function nu(se,Me,De){se.y0=Me,se.y=De}var Bs=o.map({"inside-out":function(se){var Me=se.length,De,Xe,Qe=se.map(ai),rt=se.map(Pu),Tt=o.range(Me).sort(function(wr,Tr){return Qe[wr]-Qe[Tr]}),yt=0,Ft=0,Ot=[],jt=[];for(De=0;De<Me;++De)Xe=Tt[De],yt<Ft?(yt+=rt[Xe],Ot.push(Xe)):(Ft+=rt[Xe],jt.push(Xe));return jt.reverse().concat(Ot)},reverse:function(se){return o.range(se.length).reverse()},default:nl}),zl=o.map({silhouette:function(se){var Me=se.length,De=se[0].length,Xe=[],Qe=0,rt,Tt,yt,Ft=[];for(Tt=0;Tt<De;++Tt){for(rt=0,yt=0;rt<Me;rt++)yt+=se[rt][Tt][1];yt>Qe&&(Qe=yt),Xe.push(yt)}for(Tt=0;Tt<De;++Tt)Ft[Tt]=(Qe-Xe[Tt])/2;return Ft},wiggle:function(se){var Me=se.length,De=se[0],Xe=De.length,Qe,rt,Tt,yt,Ft,Ot,jt,wr,Tr,Wr=[];for(Wr[0]=wr=Tr=0,rt=1;rt<Xe;++rt){for(Qe=0,yt=0;Qe<Me;++Qe)yt+=se[Qe][rt][1];for(Qe=0,Ft=0,jt=De[rt][0]-De[rt-1][0];Qe<Me;++Qe){for(Tt=0,Ot=(se[Qe][rt][1]-se[Qe][rt-1][1])/(2*jt);Tt<Qe;++Tt)Ot+=(se[Tt][rt][1]-se[Tt][rt-1][1])/jt;Ft+=Ot*se[Qe][rt][1]}Wr[rt]=wr-=yt?Ft/yt*jt:0,wr<Tr&&(Tr=wr)}for(rt=0;rt<Xe;++rt)Wr[rt]-=Tr;return Wr},expand:function(se){var Me=se.length,De=se[0].length,Xe=1/Me,Qe,rt,Tt,yt=[];for(rt=0;rt<De;++rt){for(Qe=0,Tt=0;Qe<Me;Qe++)Tt+=se[Qe][rt][1];if(Tt)for(Qe=0;Qe<Me;Qe++)se[Qe][rt][1]/=Tt;else for(Qe=0;Qe<Me;Qe++)se[Qe][rt][1]=Xe}for(rt=0;rt<De;++rt)yt[rt]=0;return yt},zero:Fl});function nl(se){return o.range(se.length)}function Fl(se){for(var Me=-1,De=se[0].length,Xe=[];++Me<De;)Xe[Me]=0;return Xe}function ai(se){for(var Me=1,De=0,Xe=se[0][1],Qe,rt=se.length;Me<rt;++Me)(Qe=se[Me][1])>Xe&&(De=Me,Xe=Qe);return De}function Pu(se){return se.reduce(To,0)}function To(se,Me){return se+Me[1]}o.layout.histogram=function(){var se=!0,Me=Number,De=gs,Xe=Ru;function Qe(rt,Tr){for(var yt=[],Ft=rt.map(Me,this),Ot=De.call(this,Ft,Tr),jt=Xe.call(this,Ot,Ft,Tr),wr,Tr=-1,Wr=Ft.length,qr=jt.length-1,Mr=se?1:1/Wr,kr;++Tr<qr;)wr=yt[Tr]=[],wr.dx=jt[Tr+1]-(wr.x=jt[Tr]),wr.y=0;if(qr>0)for(Tr=-1;++Tr<Wr;)kr=Ft[Tr],kr>=Ot[0]&&kr<=Ot[1]&&(wr=yt[o.bisect(jt,kr,1,qr)-1],wr.y+=Mr,wr.push(rt[Tr]));return yt}return Qe.value=function(rt){return arguments.length?(Me=rt,Qe):Me},Qe.range=function(rt){return arguments.length?(De=Jr(rt),Qe):De},Qe.bins=function(rt){return arguments.length?(Xe=typeof rt=="number"?function(Tt){return au(Tt,rt)}:Jr(rt),Qe):Xe},Qe.frequency=function(rt){return arguments.length?(se=!!rt,Qe):se},Qe};function Ru(se,Me){return au(se,Math.ceil(Math.log(Me.length)/Math.LN2+1))}function au(se,Me){for(var De=-1,Xe=+se[0],Qe=(se[1]-Xe)/Me,rt=[];++De<=Me;)rt[De]=Qe*De+Xe;return rt}function gs(se){return[o.min(se),o.max(se)]}o.layout.pack=function(){var se=o.layout.hierarchy().sort(rs),Me=0,De=[1,1],Xe;function Qe(rt,Tt){var yt=se.call(this,rt,Tt),Ft=yt[0],Ot=De[0],jt=De[1],wr=Xe==null?Math.sqrt:typeof Xe=="function"?Xe:function(){return Xe};if(Ft.x=Ft.y=0,vo(Ft,function(Wr){Wr.r=+wr(Wr.value)}),vo(Ft,Ao),Me){var Tr=Me*(Xe?1:Math.max(2*Ft.r/Ot,2*Ft.r/jt))/2;vo(Ft,function(Wr){Wr.r+=Tr}),vo(Ft,Ao),vo(Ft,function(Wr){Wr.r-=Tr})}return ns(Ft,Ot/2,jt/2,Xe?1:1/Math.max(2*Ft.r/Ot,2*Ft.r/jt)),yt}return Qe.size=function(rt){return arguments.length?(De=rt,Qe):De},Qe.radius=function(rt){return arguments.length?(Xe=rt==null||typeof rt=="function"?rt:+rt,Qe):Xe},Qe.padding=function(rt){return arguments.length?(Me=+rt,Qe):Me},zs(Qe,se)};function rs(se,Me){return se.value-Me.value}function Ol(se,Me){var De=se._pack_next;se._pack_next=Me,Me._pack_prev=se,Me._pack_next=De,De._pack_prev=Me}function bi(se,Me){se._pack_next=Me,Me._pack_prev=se}function al(se,Me){var De=Me.x-se.x,Xe=Me.y-se.y,Qe=se.r+Me.r;return .999*Qe*Qe>De*De+Xe*Xe}function Ao(se){if(!(Me=se.children)||!(Tr=Me.length))return;var Me,De=1/0,Xe=-1/0,Qe=1/0,rt=-1/0,Tt,yt,Ft,Ot,jt,wr,Tr;function Wr(Zr){De=Math.min(Zr.x-Zr.r,De),Xe=Math.max(Zr.x+Zr.r,Xe),Qe=Math.min(Zr.y-Zr.r,Qe),rt=Math.max(Zr.y+Zr.r,rt)}if(Me.forEach(Yo),Tt=Me[0],Tt.x=-Tt.r,Tt.y=0,Wr(Tt),Tr>1&&(yt=Me[1],yt.x=yt.r,yt.y=0,Wr(yt),Tr>2))for(Ft=Me[2],Mo(Tt,yt,Ft),Wr(Ft),Ol(Tt,Ft),Tt._pack_prev=Ft,Ol(Ft,yt),yt=Tt._pack_next,Ot=3;Ot<Tr;Ot++){Mo(Tt,yt,Ft=Me[Ot]);var qr=0,Mr=1,kr=1;for(jt=yt._pack_next;jt!==yt;jt=jt._pack_next,Mr++)if(al(jt,Ft)){qr=1;break}if(qr==1)for(wr=Tt._pack_prev;wr!==jt._pack_prev&&!al(wr,Ft);wr=wr._pack_prev,kr++);qr?(Mr<kr||Mr==kr&&yt.r<Tt.r?bi(Tt,yt=jt):bi(Tt=wr,yt),Ot--):(Ol(Tt,Ft),yt=Ft,Wr(Ft))}var Hr=(De+Xe)/2,rn=(Qe+rt)/2,on=0;for(Ot=0;Ot<Tr;Ot++)Ft=Me[Ot],Ft.x-=Hr,Ft.y-=rn,on=Math.max(on,Ft.r+Math.sqrt(Ft.x*Ft.x+Ft.y*Ft.y));se.r=on,Me.forEach(ys)}function Yo(se){se._pack_next=se._pack_prev=se}function ys(se){delete se._pack_next,delete se._pack_prev}function ns(se,Me,De,Xe){var Qe=se.children;if(se.x=Me+=Xe*se.x,se.y=De+=Xe*se.y,se.r*=Xe,Qe)for(var rt=-1,Tt=Qe.length;++rt<Tt;)ns(Qe[rt],Me,De,Xe)}function Mo(se,Me,De){var Xe=se.r+De.r,Qe=Me.x-se.x,rt=Me.y-se.y;if(Xe&&(Qe||rt)){var Tt=Me.r+De.r,yt=Qe*Qe+rt*rt;Tt*=Tt,Xe*=Xe;var Ft=.5+(Xe-Tt)/(2*yt),Ot=Math.sqrt(Math.max(0,2*Tt*(Xe+yt)-(Xe-=yt)*Xe-Tt*Tt))/(2*yt);De.x=se.x+Ft*Qe+Ot*rt,De.y=se.y+Ft*rt-Ot*Qe}else De.x=se.x+Xe,De.y=se.y}o.layout.tree=function(){var se=o.layout.hierarchy().sort(null).value(null),Me=Xo,De=[1,1],Xe=null;function Qe(jt,wr){var Tr=se.call(this,jt,wr),Wr=Tr[0],qr=rt(Wr);if(vo(qr,Tt),qr.parent.m=-qr.z,Fs(qr,yt),Xe)Fs(Wr,Ot);else{var Mr=Wr,kr=Wr,Hr=Wr;Fs(Wr,function(_n){_n.x<Mr.x&&(Mr=_n),_n.x>kr.x&&(kr=_n),_n.depth>Hr.depth&&(Hr=_n)});var rn=Me(Mr,kr)/2-Mr.x,on=De[0]/(kr.x+Me(kr,Mr)/2+rn),Zr=De[1]/(Hr.depth||1);Fs(Wr,function(_n){_n.x=(_n.x+rn)*on,_n.y=_n.depth*Zr})}return Tr}function rt(jt){for(var wr={A:null,children:[jt]},Tr=[wr],Wr;(Wr=Tr.pop())!=null;)for(var qr=Wr.children,Mr,kr=0,Hr=qr.length;kr<Hr;++kr)Tr.push((qr[kr]=Mr={_:qr[kr],parent:Wr,children:(Mr=qr[kr].children)&&Mr.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:kr}).a=Mr);return wr.children[0]}function Tt(jt){var wr=jt.children,Tr=jt.parent.children,Wr=jt.i?Tr[jt.i-1]:null;if(wr.length){df(jt);var qr=(wr[0].z+wr[wr.length-1].z)/2;Wr?(jt.z=Wr.z+Me(jt._,Wr._),jt.m=jt.z-qr):jt.z=qr}else Wr&&(jt.z=Wr.z+Me(jt._,Wr._));jt.parent.A=Ft(jt,Wr,jt.parent.A||Tr[0])}function yt(jt){jt._.x=jt.z+jt.parent.m,jt.m+=jt.parent.m}function Ft(jt,wr,Tr){if(wr){for(var Wr=jt,qr=jt,Mr=wr,kr=Wr.parent.children[0],Hr=Wr.m,rn=qr.m,on=Mr.m,Zr=kr.m,_n;Mr=po(Mr),Wr=So(Wr),Mr&&Wr;)kr=So(kr),qr=po(qr),qr.a=jt,_n=Mr.z+on-Wr.z-Hr+Me(Mr._,Wr._),_n>0&&(il(pf(Mr,jt,Tr),jt,_n),Hr+=_n,rn+=_n),on+=Mr.m,Hr+=Wr.m,Zr+=kr.m,rn+=qr.m;Mr&&!po(qr)&&(qr.t=Mr,qr.m+=on-rn),Wr&&!So(kr)&&(kr.t=Wr,kr.m+=Hr-Zr,Tr=jt)}return Tr}function Ot(jt){jt.x*=De[0],jt.y=jt.depth*De[1]}return Qe.separation=function(jt){return arguments.length?(Me=jt,Qe):Me},Qe.size=function(jt){return arguments.length?(Xe=(De=jt)==null?Ot:null,Qe):Xe?null:De},Qe.nodeSize=function(jt){return arguments.length?(Xe=(De=jt)==null?null:Ot,Qe):Xe?De:null},zs(Qe,se)};function Xo(se,Me){return se.parent==Me.parent?1:2}function So(se){var Me=se.children;return Me.length?Me[0]:se.t}function po(se){var Me=se.children,De;return(De=Me.length)?Me[De-1]:se.t}function il(se,Me,De){var Xe=De/(Me.i-se.i);Me.c-=Xe,Me.s+=De,se.c+=Xe,Me.z+=De,Me.m+=De}function df(se){for(var Me=0,De=0,Xe=se.children,Qe=Xe.length,rt;--Qe>=0;)rt=Xe[Qe],rt.z+=Me,rt.m+=Me,Me+=rt.s+(De+=rt.c)}function pf(se,Me,De){return se.a.parent===Me.parent?se.a:De}o.layout.cluster=function(){var se=o.layout.hierarchy().sort(null).value(null),Me=Xo,De=[1,1],Xe=!1;function Qe(rt,Tt){var yt=se.call(this,rt,Tt),Ft=yt[0],Ot,jt=0;vo(Ft,function(Mr){var kr=Mr.children;kr&&kr.length?(Mr.x=yf(kr),Mr.y=gf(kr)):(Mr.x=Ot?jt+=Me(Mr,Ot):0,Mr.y=0,Ot=Mr)});var wr=iu(Ft),Tr=Du(Ft),Wr=wr.x-Me(wr,Tr)/2,qr=Tr.x+Me(Tr,wr)/2;return vo(Ft,Xe?function(Mr){Mr.x=(Mr.x-Ft.x)*De[0],Mr.y=(Ft.y-Mr.y)*De[1]}:function(Mr){Mr.x=(Mr.x-Wr)/(qr-Wr)*De[0],Mr.y=(1-(Ft.y?Mr.y/Ft.y:1))*De[1]}),yt}return Qe.separation=function(rt){return arguments.length?(Me=rt,Qe):Me},Qe.size=function(rt){return arguments.length?(Xe=(De=rt)==null,Qe):Xe?null:De},Qe.nodeSize=function(rt){return arguments.length?(Xe=(De=rt)!=null,Qe):Xe?De:null},zs(Qe,se)};function gf(se){return 1+o.max(se,function(Me){return Me.y})}function yf(se){return se.reduce(function(Me,De){return Me+De.x},0)/se.length}function iu(se){var Me=se.children;return Me&&Me.length?iu(Me[0]):se}function Du(se){var Me=se.children,De;return Me&&(De=Me.length)?Du(Me[De-1]):se}o.layout.treemap=function(){var se=o.layout.hierarchy(),Me=Math.round,De=[1,1],Xe=null,Qe=Ns,rt=!1,Tt,yt="squarify",Ft=.5*(1+Math.sqrt(5));function Ot(Mr,kr){for(var Hr=-1,rn=Mr.length,on,Zr;++Hr<rn;)Zr=(on=Mr[Hr]).value*(kr<0?0:kr),on.area=isNaN(Zr)||Zr<=0?0:Zr}function jt(Mr){var kr=Mr.children;if(kr&&kr.length){var Hr=Qe(Mr),rn=[],on=kr.slice(),Zr,_n=1/0,Xn,ta=yt==="slice"?Hr.dx:yt==="dice"?Hr.dy:yt==="slice-dice"?Mr.depth&1?Hr.dy:Hr.dx:Math.min(Hr.dx,Hr.dy),Wn;for(Ot(on,Hr.dx*Hr.dy/Mr.value),rn.area=0;(Wn=on.length)>0;)rn.push(Zr=on[Wn-1]),rn.area+=Zr.area,yt!=="squarify"||(Xn=Tr(rn,ta))<=_n?(on.pop(),_n=Xn):(rn.area-=rn.pop().area,Wr(rn,ta,Hr,!1),ta=Math.min(Hr.dx,Hr.dy),rn.length=rn.area=0,_n=1/0);rn.length&&(Wr(rn,ta,Hr,!0),rn.length=rn.area=0),kr.forEach(jt)}}function wr(Mr){var kr=Mr.children;if(kr&&kr.length){var Hr=Qe(Mr),rn=kr.slice(),on,Zr=[];for(Ot(rn,Hr.dx*Hr.dy/Mr.value),Zr.area=0;on=rn.pop();)Zr.push(on),Zr.area+=on.area,on.z!=null&&(Wr(Zr,on.z?Hr.dx:Hr.dy,Hr,!rn.length),Zr.length=Zr.area=0);kr.forEach(wr)}}function Tr(Mr,kr){for(var Hr=Mr.area,rn,on=0,Zr=1/0,_n=-1,Xn=Mr.length;++_n<Xn;)(rn=Mr[_n].area)&&(rn<Zr&&(Zr=rn),rn>on&&(on=rn));return Hr*=Hr,kr*=kr,Hr?Math.max(kr*on*Ft/Hr,Hr/(kr*Zr*Ft)):1/0}function Wr(Mr,kr,Hr,rn){var on=-1,Zr=Mr.length,_n=Hr.x,Xn=Hr.y,ta=kr?Me(Mr.area/kr):0,Wn;if(kr==Hr.dx){for((rn||ta>Hr.dy)&&(ta=Hr.dy);++on<Zr;)Wn=Mr[on],Wn.x=_n,Wn.y=Xn,Wn.dy=ta,_n+=Wn.dx=Math.min(Hr.x+Hr.dx-_n,ta?Me(Wn.area/ta):0);Wn.z=!0,Wn.dx+=Hr.x+Hr.dx-_n,Hr.y+=ta,Hr.dy-=ta}else{for((rn||ta>Hr.dx)&&(ta=Hr.dx);++on<Zr;)Wn=Mr[on],Wn.x=_n,Wn.y=Xn,Wn.dx=ta,Xn+=Wn.dy=Math.min(Hr.y+Hr.dy-Xn,ta?Me(Wn.area/ta):0);Wn.z=!1,Wn.dy+=Hr.y+Hr.dy-Xn,Hr.x+=ta,Hr.dx-=ta}}function qr(Mr){var kr=Tt||se(Mr),Hr=kr[0];return Hr.x=Hr.y=0,Hr.value?(Hr.dx=De[0],Hr.dy=De[1]):Hr.dx=Hr.dy=0,Tt&&se.revalue(Hr),Ot([Hr],Hr.dx*Hr.dy/Hr.value),(Tt?wr:jt)(Hr),rt&&(Tt=kr),kr}return qr.size=function(Mr){return arguments.length?(De=Mr,qr):De},qr.padding=function(Mr){if(!arguments.length)return Xe;function kr(on){var Zr=Mr.call(qr,on,on.depth);return Zr==null?Ns(on):_i(on,typeof Zr=="number"?[Zr,Zr,Zr,Zr]:Zr)}function Hr(on){return _i(on,Mr)}var rn;return Qe=(Xe=Mr)==null?Ns:(rn=typeof Mr)=="function"?kr:(rn==="number"&&(Mr=[Mr,Mr,Mr,Mr]),Hr),qr},qr.round=function(Mr){return arguments.length?(Me=Mr?Math.round:Number,qr):Me!=Number},qr.sticky=function(Mr){return arguments.length?(rt=Mr,Tt=null,qr):rt},qr.ratio=function(Mr){return arguments.length?(Ft=Mr,qr):Ft},qr.mode=function(Mr){return arguments.length?(yt=Mr+"",qr):yt},zs(qr,se)};function Ns(se){return{x:se.x,y:se.y,dx:se.dx,dy:se.dy}}function _i(se,Me){var De=se.x+Me[3],Xe=se.y+Me[0],Qe=se.dx-Me[1]-Me[3],rt=se.dy-Me[0]-Me[2];return Qe<0&&(De+=Qe/2,Qe=0),rt<0&&(Xe+=rt/2,rt=0),{x:De,y:Xe,dx:Qe,dy:rt}}o.random={normal:function(se,Me){var De=arguments.length;return De<2&&(Me=1),De<1&&(se=0),function(){var Xe,Qe,rt;do Xe=Math.random()*2-1,Qe=Math.random()*2-1,rt=Xe*Xe+Qe*Qe;while(!rt||rt>1);return se+Me*Xe*Math.sqrt(-2*Math.log(rt)/rt)}},logNormal:function(){var se=o.random.normal.apply(o,arguments);return function(){return Math.exp(se())}},bates:function(se){var Me=o.random.irwinHall(se);return function(){return Me()/se}},irwinHall:function(se){return function(){for(var Me=0,De=0;De<se;De++)Me+=Math.random();return Me}}},o.scale={};function co(se){var Me=se[0],De=se[se.length-1];return Me<De?[Me,De]:[De,Me]}function Us(se){return se.rangeExtent?se.rangeExtent():co(se.range())}function Iu(se,Me,De,Xe){var Qe=De(se[0],se[1]),rt=Xe(Me[0],Me[1]);return function(Tt){return rt(Qe(Tt))}}function ol(se,Me){var De=0,Xe=se.length-1,Qe=se[De],rt=se[Xe],Tt;return rt<Qe&&(Tt=De,De=Xe,Xe=Tt,Tt=Qe,Qe=rt,rt=Tt),se[De]=Me.floor(Qe),se[Xe]=Me.ceil(rt),se}function Zo(se){return se?{floor:function(Me){return Math.floor(Me/se)*se},ceil:function(Me){return Math.ceil(Me/se)*se}}:mf}var mf={floor:z,ceil:z};function ku(se,Me,De,Xe){var Qe=[],rt=[],Tt=0,yt=Math.min(se.length,Me.length)-1;for(se[yt]<se[0]&&(se=se.slice().reverse(),Me=Me.slice().reverse());++Tt<=yt;)Qe.push(De(se[Tt-1],se[Tt])),rt.push(Xe(Me[Tt-1],Me[Tt]));return function(Ft){var Ot=o.bisect(se,Ft,1,yt)-1;return rt[Ot](Qe[Ot](Ft))}}o.scale.linear=function(){return _u([0,1],[0,1],Ni,!1)};function _u(se,Me,De,Xe){var Qe,rt;function Tt(){var Ft=Math.min(se.length,Me.length)>2?ku:Iu,Ot=Xe?ks:bo;return Qe=Ft(se,Me,Ot,De),rt=Ft(Me,se,Ot,Ni),yt}function yt(Ft){return Qe(Ft)}return yt.invert=function(Ft){return rt(Ft)},yt.domain=function(Ft){return arguments.length?(se=Ft.map(Number),Tt()):se},yt.range=function(Ft){return arguments.length?(Me=Ft,Tt()):Me},yt.rangeRound=function(Ft){return yt.range(Ft).interpolate(Mu)},yt.clamp=function(Ft){return arguments.length?(Xe=Ft,Tt()):Xe},yt.interpolate=function(Ft){return arguments.length?(De=Ft,Tt()):De},yt.ticks=function(Ft){return Eo(se,Ft)},yt.tickFormat=function(Ft,Ot){return d3_scale_linearTickFormat(se,Ft,Ot)},yt.nice=function(Ft){return zu(se,Ft),Tt()},yt.copy=function(){return _u(se,Me,De,Xe)},Tt()}function ou(se,Me){return o.rebind(se,Me,"range","rangeRound","interpolate","clamp")}function zu(se,Me){return ol(se,Zo(qi(se,Me)[2])),ol(se,Zo(qi(se,Me)[2])),se}function qi(se,Me){Me==null&&(Me=10);var De=co(se),Xe=De[1]-De[0],Qe=Math.pow(10,Math.floor(Math.log(Xe/Me)/Math.LN10)),rt=Me/Xe*Qe;return rt<=.15?Qe*=10:rt<=.35?Qe*=5:rt<=.75&&(Qe*=2),De[0]=Math.ceil(De[0]/Qe)*Qe,De[1]=Math.floor(De[1]/Qe)*Qe+Qe*.5,De[2]=Qe,De}function Eo(se,Me){return o.range.apply(o,qi(se,Me))}o.scale.log=function(){return as(o.scale.linear().domain([0,1]),10,!0,[1,10])};function as(se,Me,De,Xe){function Qe(yt){return(De?Math.log(yt<0?0:yt):-Math.log(yt>0?0:-yt))/Math.log(Me)}function rt(yt){return De?Math.pow(Me,yt):-Math.pow(Me,-yt)}function Tt(yt){return se(Qe(yt))}return Tt.invert=function(yt){return rt(se.invert(yt))},Tt.domain=function(yt){return arguments.length?(De=yt[0]>=0,se.domain((Xe=yt.map(Number)).map(Qe)),Tt):Xe},Tt.base=function(yt){return arguments.length?(Me=+yt,se.domain(Xe.map(Qe)),Tt):Me},Tt.nice=function(){var yt=ol(Xe.map(Qe),De?Math:Vs);return se.domain(yt),Xe=yt.map(rt),Tt},Tt.ticks=function(){var yt=co(Xe),Ft=[],Ot=yt[0],jt=yt[1],wr=Math.floor(Qe(Ot)),Tr=Math.ceil(Qe(jt)),Wr=Me%1?2:Me;if(isFinite(Tr-wr)){if(De){for(;wr<Tr;wr++)for(var qr=1;qr<Wr;qr++)Ft.push(rt(wr)*qr);Ft.push(rt(wr))}else for(Ft.push(rt(wr));wr++<Tr;)for(var qr=Wr-1;qr>0;qr--)Ft.push(rt(wr)*qr);for(wr=0;Ft[wr]<Ot;wr++);for(Tr=Ft.length;Ft[Tr-1]>jt;Tr--);Ft=Ft.slice(wr,Tr)}return Ft},Tt.copy=function(){return as(se.copy(),Me,De,Xe)},ou(Tt,se)}var Vs={floor:function(se){return-Math.ceil(-se)},ceil:function(se){return-Math.floor(-se)}};o.scale.pow=function(){return Bl(o.scale.linear(),1,[0,1])};function Bl(se,Me,De){var Xe=ms(Me),Qe=ms(1/Me);function rt(Tt){return se(Xe(Tt))}return rt.invert=function(Tt){return Qe(se.invert(Tt))},rt.domain=function(Tt){return arguments.length?(se.domain((De=Tt.map(Number)).map(Xe)),rt):De},rt.ticks=function(Tt){return Eo(De,Tt)},rt.tickFormat=function(Tt,yt){return d3_scale_linearTickFormat(De,Tt,yt)},rt.nice=function(Tt){return rt.domain(zu(De,Tt))},rt.exponent=function(Tt){return arguments.length?(Xe=ms(Me=Tt),Qe=ms(1/Me),se.domain(De.map(Xe)),rt):Me},rt.copy=function(){return Bl(se.copy(),Me,De)},ou(rt,se)}function ms(se){return function(Me){return Me<0?-Math.pow(-Me,se):Math.pow(Me,se)}}o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return xs([],{t:"range",a:[[]]})};function xs(se,Me){var De,Xe,Qe;function rt(yt){return Xe[((De.get(yt)||(Me.t==="range"?De.set(yt,se.push(yt)):NaN))-1)%Xe.length]}function Tt(yt,Ft){return o.range(se.length).map(function(Ot){return yt+Ft*Ot})}return rt.domain=function(yt){if(!arguments.length)return se;se=[],De=new E;for(var Ft=-1,Ot=yt.length,jt;++Ft<Ot;)De.has(jt=yt[Ft])||De.set(jt,se.push(jt));return rt[Me.t].apply(rt,Me.a)},rt.range=function(yt){return arguments.length?(Xe=yt,Qe=0,Me={t:"range",a:arguments},rt):Xe},rt.rangePoints=function(yt,Ft){arguments.length<2&&(Ft=0);var Ot=yt[0],jt=yt[1],wr=se.length<2?(Ot=(Ot+jt)/2,0):(jt-Ot)/(se.length-1+Ft);return Xe=Tt(Ot+wr*Ft/2,wr),Qe=0,Me={t:"rangePoints",a:arguments},rt},rt.rangeRoundPoints=function(yt,Ft){arguments.length<2&&(Ft=0);var Ot=yt[0],jt=yt[1],wr=se.length<2?(Ot=jt=Math.round((Ot+jt)/2),0):(jt-Ot)/(se.length-1+Ft)|0;return Xe=Tt(Ot+Math.round(wr*Ft/2+(jt-Ot-(se.length-1+Ft)*wr)/2),wr),Qe=0,Me={t:"rangeRoundPoints",a:arguments},rt},rt.rangeBands=function(yt,Ft,Ot){arguments.length<2&&(Ft=0),arguments.length<3&&(Ot=Ft);var jt=yt[1]<yt[0],wr=yt[jt-0],Tr=yt[1-jt],Wr=(Tr-wr)/(se.length-Ft+2*Ot);return Xe=Tt(wr+Wr*Ot,Wr),jt&&Xe.reverse(),Qe=Wr*(1-Ft),Me={t:"rangeBands",a:arguments},rt},rt.rangeRoundBands=function(yt,Ft,Ot){arguments.length<2&&(Ft=0),arguments.length<3&&(Ot=Ft);var jt=yt[1]<yt[0],wr=yt[jt-0],Tr=yt[1-jt],Wr=Math.floor((Tr-wr)/(se.length-Ft+2*Ot));return Xe=Tt(wr+Math.round((Tr-wr-(se.length-Ft)*Wr)/2),Wr),jt&&Xe.reverse(),Qe=Math.round(Wr*(1-Ft)),Me={t:"rangeRoundBands",a:arguments},rt},rt.rangeBand=function(){return Qe},rt.rangeExtent=function(){return co(Me.a[0])},rt.copy=function(){return xs(se,Me)},rt.domain(se)}o.scale.category10=function(){return o.scale.ordinal().range(Fu)},o.scale.category20=function(){return o.scale.ordinal().range(jo)},o.scale.category20b=function(){return o.scale.ordinal().range(Hs)},o.scale.category20c=function(){return o.scale.ordinal().range(is)};var Fu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Dt),jo=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Dt),Hs=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Dt),is=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Dt);o.scale.quantile=function(){return Ko([],[])};function Ko(se,Me){var De;function Xe(){var rt=0,Tt=Me.length;for(De=[];++rt<Tt;)De[rt-1]=o.quantile(se,rt/Tt);return Qe}function Qe(rt){if(!isNaN(rt=+rt))return Me[o.bisect(De,rt)]}return Qe.domain=function(rt){return arguments.length?(se=rt.map(y).filter(h).sort(l),Xe()):se},Qe.range=function(rt){return arguments.length?(Me=rt,Xe()):Me},Qe.quantiles=function(){return De},Qe.invertExtent=function(rt){return rt=Me.indexOf(rt),rt<0?[NaN,NaN]:[rt>0?De[rt-1]:se[0],rt<De.length?De[rt]:se[se.length-1]]},Qe.copy=function(){return Ko(se,Me)},Xe()}o.scale.quantize=function(){return sl(0,1,[0,1])};function sl(se,Me,De){var Xe,Qe;function rt(yt){return De[Math.max(0,Math.min(Qe,Math.floor(Xe*(yt-se))))]}function Tt(){return Xe=De.length/(Me-se),Qe=De.length-1,rt}return rt.domain=function(yt){return arguments.length?(se=+yt[0],Me=+yt[yt.length-1],Tt()):[se,Me]},rt.range=function(yt){return arguments.length?(De=yt,Tt()):De},rt.invertExtent=function(yt){return yt=De.indexOf(yt),yt=yt<0?NaN:yt/Xe+se,[yt,yt+1/Xe]},rt.copy=function(){return sl(se,Me,De)},Tt()}o.scale.threshold=function(){return Gs([.5],[0,1])};function Gs(se,Me){function De(Xe){if(Xe<=Xe)return Me[o.bisect(se,Xe)]}return De.domain=function(Xe){return arguments.length?(se=Xe,De):se},De.range=function(Xe){return arguments.length?(Me=Xe,De):Me},De.invertExtent=function(Xe){return Xe=Me.indexOf(Xe),[se[Xe-1],se[Xe]]},De.copy=function(){return Gs(se,Me)},De}o.scale.identity=function(){return ti([0,1])};function ti(se){function Me(De){return+De}return Me.invert=Me,Me.domain=Me.range=function(De){return arguments.length?(se=De.map(Me),Me):se},Me.ticks=function(De){return Eo(se,De)},Me.tickFormat=function(De,Xe){return d3_scale_linearTickFormat(se,De,Xe)},Me.copy=function(){return ti(se)},Me}o.svg={};function Ws(){return 0}o.svg.arc=function(){var se=Ou,Me=Ys,De=Ws,Xe=Nl,Qe=ll,rt=Ul,Tt=su;function yt(){var Ot=Math.max(0,+se.apply(this,arguments)),jt=Math.max(0,+Me.apply(this,arguments)),wr=Qe.apply(this,arguments)-je,Tr=rt.apply(this,arguments)-je,Wr=Math.abs(Tr-wr),qr=wr>Tr?0:1;if(jt<Ot&&(Mr=jt,jt=Ot,Ot=Mr),Wr>=Ve)return Ft(jt,qr)+(Ot?Ft(Ot,1-qr):"")+"Z";var Mr,kr,Hr,rn,on=0,Zr=0,_n,Xn,ta,Wn,Qn,ra,Pa,ya,Sa=[];if((rn=(+Tt.apply(this,arguments)||0)/2)&&(Hr=Xe===Nl?Math.sqrt(Ot*Ot+jt*jt):+Xe.apply(this,arguments),qr||(Zr*=-1),jt&&(Zr=Vt(Hr/jt*Math.sin(rn))),Ot&&(on=Vt(Hr/Ot*Math.sin(rn)))),jt){_n=jt*Math.cos(wr+Zr),Xn=jt*Math.sin(wr+Zr),ta=jt*Math.cos(Tr-Zr),Wn=jt*Math.sin(Tr-Zr);var Za=Math.abs(Tr-wr-2*Zr)<=be?0:1;if(Zr&&ul(_n,Xn,ta,Wn)===qr^Za){var Ai=(wr+Tr)/2;_n=jt*Math.cos(Ai),Xn=jt*Math.sin(Ai),ta=Wn=null}}else _n=Xn=0;if(Ot){Qn=Ot*Math.cos(Tr-on),ra=Ot*Math.sin(Tr-on),Pa=Ot*Math.cos(wr+on),ya=Ot*Math.sin(wr+on);var qa=Math.abs(wr-Tr+2*on)<=be?0:1;if(on&&ul(Qn,ra,Pa,ya)===1-qr^qa){var Hn=(wr+Tr)/2;Qn=Ot*Math.cos(Hn),ra=Ot*Math.sin(Hn),Pa=ya=null}}else Qn=ra=0;if(Wr>pe&&(Mr=Math.min(Math.abs(jt-Ot)/2,+De.apply(this,arguments)))>.001){kr=Ot<jt^qr?0:1;var Da=Mr,pa=Mr;if(Wr<be){var Ba=Pa==null?[Qn,ra]:ta==null?[_n,Xn]:fn([_n,Xn],[Pa,ya],[ta,Wn],[Qn,ra]),li=_n-Ba[0],ja=Xn-Ba[1],zi=ta-Ba[0],Fi=Wn-Ba[1],Ui=1/Math.sin(Math.acos((li*zi+ja*Fi)/(Math.sqrt(li*li+ja*ja)*Math.sqrt(zi*zi+Fi*Fi)))/2),ui=Math.sqrt(Ba[0]*Ba[0]+Ba[1]*Ba[1]);pa=Math.min(Mr,(Ot-ui)/(Ui-1)),Da=Math.min(Mr,(jt-ui)/(Ui+1))}if(ta!=null){var Ki=fl(Pa==null?[Qn,ra]:[Pa,ya],[_n,Xn],jt,Da,qr),qn=fl([ta,Wn],[Qn,ra],jt,Da,qr);Mr===Da?Sa.push("M",Ki[0],"A",Da,",",Da," 0 0,",kr," ",Ki[1],"A",jt,",",jt," 0 ",1-qr^ul(Ki[1][0],Ki[1][1],qn[1][0],qn[1][1]),",",qr," ",qn[1],"A",Da,",",Da," 0 0,",kr," ",qn[0]):Sa.push("M",Ki[0],"A",Da,",",Da," 0 1,",kr," ",qn[0])}else Sa.push("M",_n,",",Xn);if(Pa!=null){var xa=fl([_n,Xn],[Pa,ya],Ot,-pa,qr),so=fl([Qn,ra],ta==null?[_n,Xn]:[ta,Wn],Ot,-pa,qr);Mr===pa?Sa.push("L",so[0],"A",pa,",",pa," 0 0,",kr," ",so[1],"A",Ot,",",Ot," 0 ",qr^ul(so[1][0],so[1][1],xa[1][0],xa[1][1]),",",1-qr," ",xa[1],"A",pa,",",pa," 0 0,",kr," ",xa[0]):Sa.push("L",so[0],"A",pa,",",pa," 0 0,",kr," ",xa[0])}else Sa.push("L",Qn,",",ra)}else Sa.push("M",_n,",",Xn),ta!=null&&Sa.push("A",jt,",",jt," 0 ",Za,",",qr," ",ta,",",Wn),Sa.push("L",Qn,",",ra),Pa!=null&&Sa.push("A",Ot,",",Ot," 0 ",qa,",",1-qr," ",Pa,",",ya);return Sa.push("Z"),Sa.join("")}function Ft(Ot,jt){return"M0,"+Ot+"A"+Ot+","+Ot+" 0 1,"+jt+" 0,"+-Ot+"A"+Ot+","+Ot+" 0 1,"+jt+" 0,"+Ot}return yt.innerRadius=function(Ot){return arguments.length?(se=Jr(Ot),yt):se},yt.outerRadius=function(Ot){return arguments.length?(Me=Jr(Ot),yt):Me},yt.cornerRadius=function(Ot){return arguments.length?(De=Jr(Ot),yt):De},yt.padRadius=function(Ot){return arguments.length?(Xe=Ot==Nl?Nl:Jr(Ot),yt):Xe},yt.startAngle=function(Ot){return arguments.length?(Qe=Jr(Ot),yt):Qe},yt.endAngle=function(Ot){return arguments.length?(rt=Jr(Ot),yt):rt},yt.padAngle=function(Ot){return arguments.length?(Tt=Jr(Ot),yt):Tt},yt.centroid=function(){var Ot=(+se.apply(this,arguments)+ +Me.apply(this,arguments))/2,jt=(+Qe.apply(this,arguments)+ +rt.apply(this,arguments))/2-je;return[Math.cos(jt)*Ot,Math.sin(jt)*Ot]},yt};var Nl="auto";function Ou(se){return se.innerRadius}function Ys(se){return se.outerRadius}function ll(se){return se.startAngle}function Ul(se){return se.endAngle}function su(se){return se&&se.padAngle}function ul(se,Me,De,Xe){return(se-De)*Me-(Me-Xe)*se>0?0:1}function fl(se,Me,De,Xe,Qe){var rt=se[0]-Me[0],Tt=se[1]-Me[1],yt=(Qe?Xe:-Xe)/Math.sqrt(rt*rt+Tt*Tt),Ft=yt*Tt,Ot=-yt*rt,jt=se[0]+Ft,wr=se[1]+Ot,Tr=Me[0]+Ft,Wr=Me[1]+Ot,qr=(jt+Tr)/2,Mr=(wr+Wr)/2,kr=Tr-jt,Hr=Wr-wr,rn=kr*kr+Hr*Hr,on=De-Xe,Zr=jt*Wr-Tr*wr,_n=(Hr<0?-1:1)*Math.sqrt(Math.max(0,on*on*rn-Zr*Zr)),Xn=(Zr*Hr-kr*_n)/rn,ta=(-Zr*kr-Hr*_n)/rn,Wn=(Zr*Hr+kr*_n)/rn,Qn=(-Zr*kr+Hr*_n)/rn,ra=Xn-qr,Pa=ta-Mr,ya=Wn-qr,Sa=Qn-Mr;return ra*ra+Pa*Pa>ya*ya+Sa*Sa&&(Xn=Wn,ta=Qn),[[Xn-Ft,ta-Ot],[Xn*De/on,ta*De/on]]}function os(){return!0}function cl(se){var Me=na,De=Jn,Xe=os,Qe=Li,rt=Qe.key,Tt=.7;function yt(Ft){var Ot=[],jt=[],wr=-1,Tr=Ft.length,Wr,qr=Jr(Me),Mr=Jr(De);function kr(){Ot.push("M",Qe(se(jt),Tt))}for(;++wr<Tr;)Xe.call(this,Wr=Ft[wr],wr)?jt.push([+qr.call(this,Wr,wr),+Mr.call(this,Wr,wr)]):jt.length&&(kr(),jt=[]);return jt.length&&kr(),Ot.length?Ot.join(""):null}return yt.x=function(Ft){return arguments.length?(Me=Ft,yt):Me},yt.y=function(Ft){return arguments.length?(De=Ft,yt):De},yt.defined=function(Ft){return arguments.length?(Xe=Ft,yt):Xe},yt.interpolate=function(Ft){return arguments.length?(typeof Ft=="function"?rt=Qe=Ft:rt=(Qe=ss.get(Ft)||Li).key,yt):rt},yt.tension=function(Ft){return arguments.length?(Tt=Ft,yt):Tt},yt}o.svg.line=function(){return cl(z)};var ss=o.map({linear:Li,"linear-closed":Oo,step:lu,"step-before":bs,"step-after":Vl,basis:Xs,"basis-open":Nu,"basis-closed":ls,bundle:bf,cardinal:Bu,"cardinal-open":hl,"cardinal-closed":xf,monotone:Gl});ss.forEach(function(se,Me){Me.key=se,Me.closed=/-closed$/.test(se)});function Li(se){return se.length>1?se.join("L"):se+"Z"}function Oo(se){return se.join("L")+"Z"}function lu(se){for(var Me=0,De=se.length,Xe=se[0],Qe=[Xe[0],",",Xe[1]];++Me<De;)Qe.push("H",(Xe[0]+(Xe=se[Me])[0])/2,"V",Xe[1]);return De>1&&Qe.push("H",Xe[0]),Qe.join("")}function bs(se){for(var Me=0,De=se.length,Xe=se[0],Qe=[Xe[0],",",Xe[1]];++Me<De;)Qe.push("V",(Xe=se[Me])[1],"H",Xe[0]);return Qe.join("")}function Vl(se){for(var Me=0,De=se.length,Xe=se[0],Qe=[Xe[0],",",Xe[1]];++Me<De;)Qe.push("H",(Xe=se[Me])[0],"V",Xe[1]);return Qe.join("")}function hl(se,Me){return se.length<4?Li(se):se[1]+ji(se.slice(1,-1),vl(se,Me))}function xf(se,Me){return se.length<3?Oo(se):se[0]+ji((se.push(se[0]),se),vl([se[se.length-2]].concat(se,[se[1]]),Me))}function Bu(se,Me){return se.length<3?Li(se):se[0]+ji(se,vl(se,Me))}function ji(se,Me){if(Me.length<1||se.length!=Me.length&&se.length!=Me.length+2)return Li(se);var De=se.length!=Me.length,Xe="",Qe=se[0],rt=se[1],Tt=Me[0],yt=Tt,Ft=1;if(De&&(Xe+="Q"+(rt[0]-Tt[0]*2/3)+","+(rt[1]-Tt[1]*2/3)+","+rt[0]+","+rt[1],Qe=se[1],Ft=2),Me.length>1){yt=Me[1],rt=se[Ft],Ft++,Xe+="C"+(Qe[0]+Tt[0])+","+(Qe[1]+Tt[1])+","+(rt[0]-yt[0])+","+(rt[1]-yt[1])+","+rt[0]+","+rt[1];for(var Ot=2;Ot<Me.length;Ot++,Ft++)rt=se[Ft],yt=Me[Ot],Xe+="S"+(rt[0]-yt[0])+","+(rt[1]-yt[1])+","+rt[0]+","+rt[1]}if(De){var jt=se[Ft];Xe+="Q"+(rt[0]+yt[0]*2/3)+","+(rt[1]+yt[1]*2/3)+","+jt[0]+","+jt[1]}return Xe}function vl(se,Me){for(var De=[],Xe=(1-Me)/2,Qe,rt=se[0],Tt=se[1],yt=1,Ft=se.length;++yt<Ft;)Qe=rt,rt=Tt,Tt=se[yt],De.push([Xe*(Tt[0]-Qe[0]),Xe*(Tt[1]-Qe[1])]);return De}function Xs(se){if(se.length<3)return Li(se);var Me=1,De=se.length,Xe=se[0],Qe=Xe[0],rt=Xe[1],Tt=[Qe,Qe,Qe,(Xe=se[1])[0]],yt=[rt,rt,rt,Xe[1]],Ft=[Qe,",",rt,"L",oo(Jo,Tt),",",oo(Jo,yt)];for(se.push(se[De-1]);++Me<=De;)Xe=se[Me],Tt.shift(),Tt.push(Xe[0]),yt.shift(),yt.push(Xe[1]),us(Ft,Tt,yt);return se.pop(),Ft.push("L",Xe),Ft.join("")}function Nu(se){if(se.length<4)return Li(se);for(var Me=[],De=-1,Xe=se.length,Qe,rt=[0],Tt=[0];++De<3;)Qe=se[De],rt.push(Qe[0]),Tt.push(Qe[1]);for(Me.push(oo(Jo,rt)+","+oo(Jo,Tt)),--De;++De<Xe;)Qe=se[De],rt.shift(),rt.push(Qe[0]),Tt.shift(),Tt.push(Qe[1]),us(Me,rt,Tt);return Me.join("")}function ls(se){for(var Me,De=-1,Xe=se.length,Qe=Xe+4,rt,Tt=[],yt=[];++De<4;)rt=se[De%Xe],Tt.push(rt[0]),yt.push(rt[1]);for(Me=[oo(Jo,Tt),",",oo(Jo,yt)],--De;++De<Qe;)rt=se[De%Xe],Tt.shift(),Tt.push(rt[0]),yt.shift(),yt.push(rt[1]),us(Me,Tt,yt);return Me.join("")}function bf(se,Me){var De=se.length-1;if(De)for(var Xe=se[0][0],Qe=se[0][1],rt=se[De][0]-Xe,Tt=se[De][1]-Qe,yt=-1,Ft,Ot;++yt<=De;)Ft=se[yt],Ot=yt/De,Ft[0]=Me*Ft[0]+(1-Me)*(Xe+Ot*rt),Ft[1]=Me*Ft[1]+(1-Me)*(Qe+Ot*Tt);return Xs(se)}function oo(se,Me){return se[0]*Me[0]+se[1]*Me[1]+se[2]*Me[2]+se[3]*Me[3]}var dl=[0,2/3,1/3,0],Hl=[0,1/3,2/3,0],Jo=[0,1/6,2/3,1/6];function us(se,Me,De){se.push("C",oo(dl,Me),",",oo(dl,De),",",oo(Hl,Me),",",oo(Hl,De),",",oo(Jo,Me),",",oo(Jo,De))}function uu(se,Me){return(Me[1]-se[1])/(Me[0]-se[0])}function pl(se){for(var Me=0,De=se.length-1,Xe=[],Qe=se[0],rt=se[1],Tt=Xe[0]=uu(Qe,rt);++Me<De;)Xe[Me]=(Tt+(Tt=uu(Qe=rt,rt=se[Me+1])))/2;return Xe[Me]=Tt,Xe}function yl(se){for(var Me=[],De,Xe,Qe,rt,Tt=pl(se),yt=-1,Ft=se.length-1;++yt<Ft;)De=uu(se[yt],se[yt+1]),v(De)<pe?Tt[yt]=Tt[yt+1]=0:(Xe=Tt[yt]/De,Qe=Tt[yt+1]/De,rt=Xe*Xe+Qe*Qe,rt>9&&(rt=De*3/Math.sqrt(rt),Tt[yt]=rt*Xe,Tt[yt+1]=rt*Qe));for(yt=-1;++yt<=Ft;)rt=(se[Math.min(Ft,yt+1)][0]-se[Math.max(0,yt-1)][0])/(6*(1+Tt[yt]*Tt[yt])),Me.push([rt||0,Tt[yt]*rt||0]);return Me}function Gl(se){return se.length<3?Li(se):se[0]+ji(se,yl(se))}o.svg.line.radial=function(){var se=cl(Uu);return se.radius=se.x,delete se.x,se.angle=se.y,delete se.y,se};function Uu(se){for(var Me,De=-1,Xe=se.length,Qe,rt;++De<Xe;)Me=se[De],Qe=Me[0],rt=Me[1]-je,Me[0]=Qe*Math.cos(rt),Me[1]=Qe*Math.sin(rt);return se}function ml(se){var Me=na,De=na,Xe=0,Qe=Jn,rt=os,Tt=Li,yt=Tt.key,Ft=Tt,Ot="L",jt=.7;function wr(Tr){var Wr=[],qr=[],Mr=[],kr=-1,Hr=Tr.length,rn,on=Jr(Me),Zr=Jr(Xe),_n=Me===De?function(){return ta}:Jr(De),Xn=Xe===Qe?function(){return Wn}:Jr(Qe),ta,Wn;function Qn(){Wr.push("M",Tt(se(Mr),jt),Ot,Ft(se(qr.reverse()),jt),"Z")}for(;++kr<Hr;)rt.call(this,rn=Tr[kr],kr)?(qr.push([ta=+on.call(this,rn,kr),Wn=+Zr.call(this,rn,kr)]),Mr.push([+_n.call(this,rn,kr),+Xn.call(this,rn,kr)])):qr.length&&(Qn(),qr=[],Mr=[]);return qr.length&&Qn(),Wr.length?Wr.join(""):null}return wr.x=function(Tr){return arguments.length?(Me=De=Tr,wr):De},wr.x0=function(Tr){return arguments.length?(Me=Tr,wr):Me},wr.x1=function(Tr){return arguments.length?(De=Tr,wr):De},wr.y=function(Tr){return arguments.length?(Xe=Qe=Tr,wr):Qe},wr.y0=function(Tr){return arguments.length?(Xe=Tr,wr):Xe},wr.y1=function(Tr){return arguments.length?(Qe=Tr,wr):Qe},wr.defined=function(Tr){return arguments.length?(rt=Tr,wr):rt},wr.interpolate=function(Tr){return arguments.length?(typeof Tr=="function"?yt=Tt=Tr:yt=(Tt=ss.get(Tr)||Li).key,Ft=Tt.reverse||Tt,Ot=Tt.closed?"M":"L",wr):yt},wr.tension=function(Tr){return arguments.length?(jt=Tr,wr):jt},wr}bs.reverse=Vl,Vl.reverse=bs,o.svg.area=function(){return ml(z)},o.svg.area.radial=function(){var se=ml(Uu);return se.radius=se.x,delete se.x,se.innerRadius=se.x0,delete se.x0,se.outerRadius=se.x1,delete se.x1,se.angle=se.y,delete se.y,se.startAngle=se.y0,delete se.y0,se.endAngle=se.y1,delete se.y1,se};function fu(se){return se.source}function ws(se){return se.target}o.svg.chord=function(){var se=fu,Me=ws,De=cu,Xe=ll,Qe=Ul;function rt(jt,wr){var Tr=Tt(this,se,jt,wr),Wr=Tt(this,Me,jt,wr);return"M"+Tr.p0+Ft(Tr.r,Tr.p1,Tr.a1-Tr.a0)+(yt(Tr,Wr)?Ot(Tr.r,Tr.p1,Tr.r,Tr.p0):Ot(Tr.r,Tr.p1,Wr.r,Wr.p0)+Ft(Wr.r,Wr.p1,Wr.a1-Wr.a0)+Ot(Wr.r,Wr.p1,Tr.r,Tr.p0))+"Z"}function Tt(jt,wr,Tr,Wr){var qr=wr.call(jt,Tr,Wr),Mr=De.call(jt,qr,Wr),kr=Xe.call(jt,qr,Wr)-je,Hr=Qe.call(jt,qr,Wr)-je;return{r:Mr,a0:kr,a1:Hr,p0:[Mr*Math.cos(kr),Mr*Math.sin(kr)],p1:[Mr*Math.cos(Hr),Mr*Math.sin(Hr)]}}function yt(jt,wr){return jt.a0==wr.a0&&jt.a1==wr.a1}function Ft(jt,wr,Tr){return"A"+jt+","+jt+" 0 "+ +(Tr>be)+",1 "+wr}function Ot(jt,wr,Tr,Wr){return"Q 0,0 "+Wr}return rt.radius=function(jt){return arguments.length?(De=Jr(jt),rt):De},rt.source=function(jt){return arguments.length?(se=Jr(jt),rt):se},rt.target=function(jt){return arguments.length?(Me=Jr(jt),rt):Me},rt.startAngle=function(jt){return arguments.length?(Xe=Jr(jt),rt):Xe},rt.endAngle=function(jt){return arguments.length?(Qe=Jr(jt),rt):Qe},rt};function cu(se){return se.radius}o.svg.diagonal=function(){var se=fu,Me=ws,De=xl;function Xe(Qe,rt){var Tt=se.call(this,Qe,rt),yt=Me.call(this,Qe,rt),Ft=(Tt.y+yt.y)/2,Ot=[Tt,{x:Tt.x,y:Ft},{x:yt.x,y:Ft},yt];return Ot=Ot.map(De),"M"+Ot[0]+"C"+Ot[1]+" "+Ot[2]+" "+Ot[3]}return Xe.source=function(Qe){return arguments.length?(se=Jr(Qe),Xe):se},Xe.target=function(Qe){return arguments.length?(Me=Jr(Qe),Xe):Me},Xe.projection=function(Qe){return arguments.length?(De=Qe,Xe):De},Xe};function xl(se){return[se.x,se.y]}o.svg.diagonal.radial=function(){var se=o.svg.diagonal(),Me=xl,De=se.projection;return se.projection=function(Xe){return arguments.length?De(Vu(Me=Xe)):Me},se};function Vu(se){return function(){var Me=se.apply(this,arguments),De=Me[0],Xe=Me[1]-je;return[De*Math.cos(Xe),De*Math.sin(Xe)]}}o.svg.symbol=function(){var se=$e,Me=We;function De(Xe,Qe){return(pt.get(se.call(this,Xe,Qe))||ft)(Me.call(this,Xe,Qe))}return De.type=function(Xe){return arguments.length?(se=Jr(Xe),De):se},De.size=function(Xe){return arguments.length?(Me=Jr(Xe),De):Me},De};function We(){return 64}function $e(){return"circle"}function ft(se){var Me=Math.sqrt(se/be);return"M0,"+Me+"A"+Me+","+Me+" 0 1,1 0,"+-Me+"A"+Me+","+Me+" 0 1,1 0,"+Me+"Z"}var pt=o.map({circle:ft,cross:function(se){var Me=Math.sqrt(se/5)/2;return"M"+-3*Me+","+-Me+"H"+-Me+"V"+-3*Me+"H"+Me+"V"+-Me+"H"+3*Me+"V"+Me+"H"+Me+"V"+3*Me+"H"+-Me+"V"+Me+"H"+-3*Me+"Z"},diamond:function(se){var Me=Math.sqrt(se/(2*St)),De=Me*St;return"M0,"+-Me+"L"+De+",0 0,"+Me+" "+-De+",0Z"},square:function(se){var Me=Math.sqrt(se)/2;return"M"+-Me+","+-Me+"L"+Me+","+-Me+" "+Me+","+Me+" "+-Me+","+Me+"Z"},"triangle-down":function(se){var Me=Math.sqrt(se/Pt),De=Me*Pt/2;return"M0,"+De+"L"+Me+","+-De+" "+-Me+","+-De+"Z"},"triangle-up":function(se){var Me=Math.sqrt(se/Pt),De=Me*Pt/2;return"M0,"+-De+"L"+Me+","+De+" "+-Me+","+De+"Z"}});o.svg.symbolTypes=pt.keys();var Pt=Math.sqrt(3),St=Math.tan(30*at);Y.transition=function(se){for(var Me=Er||++mr,De=An(se),Xe=[],Qe,rt,Tt=Ir||{time:Date.now(),ease:Ql,delay:0,duration:250},yt=-1,Ft=this.length;++yt<Ft;){Xe.push(Qe=[]);for(var Ot=this[yt],jt=-1,wr=Ot.length;++jt<wr;)(rt=Ot[jt])&&Sn(rt,jt,De,Me,Tt),Qe.push(rt)}return dr(Xe,De,Me)},Y.interrupt=function(se){return this.each(se==null?kt:ur(An(se)))};var kt=ur(An());function ur(se){return function(){var Me,De,Xe;(Me=this[se])&&(Xe=Me[De=Me.active])&&(Xe.timer.c=null,Xe.timer.t=NaN,--Me.count?delete Me[De]:delete this[se],Me.active+=.5,Xe.event&&Xe.event.interrupt.call(this,this.__data__,Xe.index))}}function dr(se,Me,De){return re(se,$t),se.namespace=Me,se.id=De,se}var $t=[],mr=0,Er,Ir;$t.call=Y.call,$t.empty=Y.empty,$t.node=Y.node,$t.size=Y.size,o.transition=function(se,Me){return se&&se.transition?Er?se.transition(Me):se:o.selection().transition(se)},o.transition.prototype=$t,$t.select=function(se){var Me=this.id,De=this.namespace,Xe=[],Qe,rt,Tt;se=ie(se);for(var yt=-1,Ft=this.length;++yt<Ft;){Xe.push(Qe=[]);for(var Ot=this[yt],jt=-1,wr=Ot.length;++jt<wr;)(Tt=Ot[jt])&&(rt=se.call(Tt,Tt.__data__,jt,yt))?("__data__"in Tt&&(rt.__data__=Tt.__data__),Sn(rt,jt,De,Me,Tt[De][Me]),Qe.push(rt)):Qe.push(null)}return dr(Xe,De,Me)},$t.selectAll=function(se){var Me=this.id,De=this.namespace,Xe=[],Qe,rt,Tt,yt,Ft;se=ne(se);for(var Ot=-1,jt=this.length;++Ot<jt;)for(var wr=this[Ot],Tr=-1,Wr=wr.length;++Tr<Wr;)if(Tt=wr[Tr]){Ft=Tt[De][Me],rt=se.call(Tt,Tt.__data__,Tr,Ot),Xe.push(Qe=[]);for(var qr=-1,Mr=rt.length;++qr<Mr;)(yt=rt[qr])&&Sn(yt,qr,De,Me,Ft),Qe.push(yt)}return dr(Xe,De,Me)},$t.filter=function(se){var Me=[],De,Xe,Qe;typeof se!="function"&&(se=et(se));for(var rt=0,Tt=this.length;rt<Tt;rt++){Me.push(De=[]);for(var Xe=this[rt],yt=0,Ft=Xe.length;yt<Ft;yt++)(Qe=Xe[yt])&&se.call(Qe,Qe.__data__,yt,rt)&&De.push(Qe)}return dr(Me,this.namespace,this.id)},$t.tween=function(se,Me){var De=this.id,Xe=this.namespace;return arguments.length<2?this.node()[Xe][De].tween.get(se):Ze(this,Me==null?function(Qe){Qe[Xe][De].tween.remove(se)}:function(Qe){Qe[Xe][De].tween.set(se,Me)})};function Kr(se,Me,De,Xe){var Qe=se.id,rt=se.namespace;return Ze(se,typeof De=="function"?function(Tt,yt,Ft){Tt[rt][Qe].tween.set(Me,Xe(De.call(Tt,Tt.__data__,yt,Ft)))}:(De=Xe(De),function(Tt){Tt[rt][Qe].tween.set(Me,De)}))}$t.attr=function(se,Me){if(arguments.length<2){for(Me in se)this.attr(Me,se[Me]);return this}var De=se=="transform"?Dl:Ni,Xe=o.ns.qualify(se);function Qe(){this.removeAttribute(Xe)}function rt(){this.removeAttributeNS(Xe.space,Xe.local)}function Tt(Ft){return Ft==null?Qe:(Ft+="",function(){var Ot=this.getAttribute(Xe),jt;return Ot!==Ft&&(jt=De(Ot,Ft),function(wr){this.setAttribute(Xe,jt(wr))})})}function yt(Ft){return Ft==null?rt:(Ft+="",function(){var Ot=this.getAttributeNS(Xe.space,Xe.local),jt;return Ot!==Ft&&(jt=De(Ot,Ft),function(wr){this.setAttributeNS(Xe.space,Xe.local,jt(wr))})})}return Kr(this,"attr."+se,Me,Xe.local?yt:Tt)},$t.attrTween=function(se,Me){var De=o.ns.qualify(se);function Xe(rt,Tt){var yt=Me.call(this,rt,Tt,this.getAttribute(De));return yt&&function(Ft){this.setAttribute(De,yt(Ft))}}function Qe(rt,Tt){var yt=Me.call(this,rt,Tt,this.getAttributeNS(De.space,De.local));return yt&&function(Ft){this.setAttributeNS(De.space,De.local,yt(Ft))}}return this.tween("attr."+se,De.local?Qe:Xe)},$t.style=function(se,Me,De){var Xe=arguments.length;if(Xe<3){if(typeof se!="string"){Xe<2&&(Me="");for(De in se)this.style(De,se[De],Me);return this}De=""}function Qe(){this.style.removeProperty(se)}function rt(Tt){return Tt==null?Qe:(Tt+="",function(){var yt=r(this).getComputedStyle(this,null).getPropertyValue(se),Ft;return yt!==Tt&&(Ft=Ni(yt,Tt),function(Ot){this.style.setProperty(se,Ft(Ot),De)})})}return Kr(this,"style."+se,Me,rt)},$t.styleTween=function(se,Me,De){arguments.length<3&&(De="");function Xe(Qe,rt){var Tt=Me.call(this,Qe,rt,r(this).getComputedStyle(this,null).getPropertyValue(se));return Tt&&function(yt){this.style.setProperty(se,Tt(yt),De)}}return this.tween("style."+se,Xe)},$t.text=function(se){return Kr(this,"text",se,hn)};function hn(se){return se==null&&(se=""),function(){this.textContent=se}}$t.remove=function(){var se=this.namespace;return this.each("end.transition",function(){var Me;this[se].count<2&&(Me=this.parentNode)&&Me.removeChild(this)})},$t.ease=function(se){var Me=this.id,De=this.namespace;return arguments.length<1?this.node()[De][Me].ease:(typeof se!="function"&&(se=o.ease.apply(o,arguments)),Ze(this,function(Xe){Xe[De][Me].ease=se}))},$t.delay=function(se){var Me=this.id,De=this.namespace;return arguments.length<1?this.node()[De][Me].delay:Ze(this,typeof se=="function"?function(Xe,Qe,rt){Xe[De][Me].delay=+se.call(Xe,Xe.__data__,Qe,rt)}:(se=+se,function(Xe){Xe[De][Me].delay=se}))},$t.duration=function(se){var Me=this.id,De=this.namespace;return arguments.length<1?this.node()[De][Me].duration:Ze(this,typeof se=="function"?function(Xe,Qe,rt){Xe[De][Me].duration=Math.max(1,se.call(Xe,Xe.__data__,Qe,rt))}:(se=Math.max(1,se),function(Xe){Xe[De][Me].duration=se}))},$t.each=function(se,Me){var De=this.id,Xe=this.namespace;if(arguments.length<2){var Qe=Ir,rt=Er;try{Er=De,Ze(this,function(Tt,yt,Ft){Ir=Tt[Xe][De],se.call(Tt,Tt.__data__,yt,Ft)})}finally{Ir=Qe,Er=rt}}else Ze(this,function(Tt){var yt=Tt[Xe][De];(yt.event||(yt.event=o.dispatch("start","end","interrupt"))).on(se,Me)});return this},$t.transition=function(){for(var se=this.id,Me=++mr,De=this.namespace,Xe=[],Qe,rt,Tt,yt,Ft=0,Ot=this.length;Ft<Ot;Ft++){Xe.push(Qe=[]);for(var rt=this[Ft],jt=0,wr=rt.length;jt<wr;jt++)(Tt=rt[jt])&&(yt=Tt[De][se],Sn(Tt,jt,De,Me,{time:yt.time,ease:yt.ease,delay:yt.delay+yt.duration,duration:yt.duration})),Qe.push(Tt)}return dr(Xe,De,Me)};function An(se){return se==null?"__transition__":"__transition_"+se+"__"}function Sn(se,Me,De,Xe,Qe){var rt=se[De]||(se[De]={active:0,count:0}),Tt=rt[Xe],yt,Ft,Ot,jt,wr;function Tr(Mr){var kr=Tt.delay;if(Ft.t=kr+yt,kr<=Mr)return Wr(Mr-kr);Ft.c=Wr}function Wr(Mr){var kr=rt.active,Hr=rt[kr];Hr&&(Hr.timer.c=null,Hr.timer.t=NaN,--rt.count,delete rt[kr],Hr.event&&Hr.event.interrupt.call(se,se.__data__,Hr.index));for(var rn in rt)if(+rn<Xe){var on=rt[rn];on.timer.c=null,on.timer.t=NaN,--rt.count,delete rt[rn]}Ft.c=qr,Mn(function(){return Ft.c&&qr(Mr||1)&&(Ft.c=null,Ft.t=NaN),1},0,yt),rt.active=Xe,Tt.event&&Tt.event.start.call(se,se.__data__,Me),wr=[],Tt.tween.forEach(function(Zr,_n){(_n=_n.call(se,se.__data__,Me))&&wr.push(_n)}),jt=Tt.ease,Ot=Tt.duration}function qr(Mr){for(var kr=Mr/Ot,Hr=jt(kr),rn=wr.length;rn>0;)wr[--rn].call(se,Hr);if(kr>=1)return Tt.event&&Tt.event.end.call(se,se.__data__,Me),--rt.count?delete rt[Xe]:delete se[De],1}Tt||(yt=Qe.time,Ft=Mn(Tr,0,yt),Tt=rt[Xe]={tween:new E,time:yt,timer:Ft,delay:Qe.delay,duration:Qe.duration,ease:Qe.ease,index:Me},Qe=null,++rt.count)}o.svg.axis=function(){var se=o.scale.linear(),Me=Un,De=6,Xe=6,Qe=3,rt=[10],Tt=null,yt;function Ft(Ot){Ot.each(function(){var jt=o.select(this),wr=this.__chart__||se,Tr=this.__chart__=se.copy(),Wr=Tt??(Tr.ticks?Tr.ticks.apply(Tr,rt):Tr.domain()),qr=yt??(Tr.tickFormat?Tr.tickFormat.apply(Tr,rt):z),Mr=jt.selectAll(".tick").data(Wr,Tr),kr=Mr.enter().insert("g",".domain").attr("class","tick").style("opacity",pe),Hr=o.transition(Mr.exit()).style("opacity",pe).remove(),rn=o.transition(Mr.order()).style("opacity",1),on=Math.max(De,0)+Qe,Zr,_n=Us(Tr),Xn=jt.selectAll(".domain").data([0]),ta=(Xn.enter().append("path").attr("class","domain"),o.transition(Xn));kr.append("line"),kr.append("text");var Wn=kr.select("line"),Qn=rn.select("line"),ra=Mr.select("text").text(qr),Pa=kr.select("text"),ya=rn.select("text"),Sa=Me==="top"||Me==="left"?-1:1,Za,Ai,qa,Hn;if(Me==="bottom"||Me==="top"?(Zr=Ta,Za="x",qa="y",Ai="x2",Hn="y2",ra.attr("dy",Sa<0?"0em":".71em").style("text-anchor","middle"),ta.attr("d","M"+_n[0]+","+Sa*Xe+"V0H"+_n[1]+"V"+Sa*Xe)):(Zr=Aa,Za="y",qa="x",Ai="y2",Hn="x2",ra.attr("dy",".32em").style("text-anchor",Sa<0?"end":"start"),ta.attr("d","M"+Sa*Xe+","+_n[0]+"H0V"+_n[1]+"H"+Sa*Xe)),Wn.attr(Hn,Sa*De),Pa.attr(qa,Sa*on),Qn.attr(Ai,0).attr(Hn,Sa*De),ya.attr(Za,0).attr(qa,Sa*on),Tr.rangeBand){var Da=Tr,pa=Da.rangeBand()/2;wr=Tr=function(Ba){return Da(Ba)+pa}}else wr.rangeBand?wr=Tr:Hr.call(Zr,Tr,wr);kr.call(Zr,wr,Tr),rn.call(Zr,Tr,Tr)})}return Ft.scale=function(Ot){return arguments.length?(se=Ot,Ft):se},Ft.orient=function(Ot){return arguments.length?(Me=Ot in wa?Ot+"":Un,Ft):Me},Ft.ticks=function(){return arguments.length?(rt=M(arguments),Ft):rt},Ft.tickValues=function(Ot){return arguments.length?(Tt=Ot,Ft):Tt},Ft.tickFormat=function(Ot){return arguments.length?(yt=Ot,Ft):yt},Ft.tickSize=function(Ot){var jt=arguments.length;return jt?(De=+Ot,Xe=+arguments[jt-1],Ft):De},Ft.innerTickSize=function(Ot){return arguments.length?(De=+Ot,Ft):De},Ft.outerTickSize=function(Ot){return arguments.length?(Xe=+Ot,Ft):Xe},Ft.tickPadding=function(Ot){return arguments.length?(Qe=+Ot,Ft):Qe},Ft.tickSubdivide=function(){return arguments.length&&Ft},Ft};var Un="bottom",wa={top:1,right:1,bottom:1,left:1};function Ta(se,Me,De){se.attr("transform",function(Xe){var Qe=Me(Xe);return"translate("+(isFinite(Qe)?Qe:De(Xe))+",0)"})}function Aa(se,Me,De){se.attr("transform",function(Xe){var Qe=Me(Xe);return"translate(0,"+(isFinite(Qe)?Qe:De(Xe))+")"})}o.svg.brush=function(){var se=Z(jt,"brushstart","brush","brushend"),Me=null,De=null,Xe=[0,0],Qe=[0,0],rt,Tt,yt=!0,Ft=!0,Ot=Oa[0];function jt(Mr){Mr.each(function(){var kr=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",qr).on("touchstart.brush",qr),Hr=kr.selectAll(".background").data([0]);Hr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),kr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var rn=kr.selectAll(".resize").data(Ot,z);rn.exit().remove(),rn.enter().append("g").attr("class",function(Xn){return"resize "+Xn}).style("cursor",function(Xn){return Ca[Xn]}).append("rect").attr("x",function(Xn){return/[ew]$/.test(Xn)?-3:null}).attr("y",function(Xn){return/^[ns]/.test(Xn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),rn.style("display",jt.empty()?"none":null);var on=o.transition(kr),Zr=o.transition(Hr),_n;Me&&(_n=Us(Me),Zr.attr("x",_n[0]).attr("width",_n[1]-_n[0]),Tr(on)),De&&(_n=Us(De),Zr.attr("y",_n[0]).attr("height",_n[1]-_n[0]),Wr(on)),wr(on)})}jt.event=function(Mr){Mr.each(function(){var kr=se.of(this,arguments),Hr={x:Xe,y:Qe,i:rt,j:Tt},rn=this.__chart__||Hr;this.__chart__=Hr,Er?o.select(this).transition().each("start.brush",function(){rt=rn.i,Tt=rn.j,Xe=rn.x,Qe=rn.y,kr({type:"brushstart"})}).tween("brush:brush",function(){var on=fo(Xe,Hr.x),Zr=fo(Qe,Hr.y);return rt=Tt=null,function(_n){Xe=Hr.x=on(_n),Qe=Hr.y=Zr(_n),kr({type:"brush",mode:"resize"})}}).each("end.brush",function(){rt=Hr.i,Tt=Hr.j,kr({type:"brush",mode:"resize"}),kr({type:"brushend"})}):(kr({type:"brushstart"}),kr({type:"brush",mode:"resize"}),kr({type:"brushend"}))})};function wr(Mr){Mr.selectAll(".resize").attr("transform",function(kr){return"translate("+Xe[+/e$/.test(kr)]+","+Qe[+/^s/.test(kr)]+")"})}function Tr(Mr){Mr.select(".extent").attr("x",Xe[0]),Mr.selectAll(".extent,.n>rect,.s>rect").attr("width",Xe[1]-Xe[0])}function Wr(Mr){Mr.select(".extent").attr("y",Qe[0]),Mr.selectAll(".extent,.e>rect,.w>rect").attr("height",Qe[1]-Qe[0])}function qr(){var Mr=this,kr=o.select(o.event.target),Hr=se.of(Mr,arguments),rn=o.select(Mr),on=kr.datum(),Zr=!/^(n|s)$/.test(on)&&Me,_n=!/^(e|w)$/.test(on)&&De,Xn=kr.classed("extent"),ta=He(Mr),Wn,Qn=o.mouse(Mr),ra,Pa=o.select(r(Mr)).on("keydown.brush",Za).on("keyup.brush",Ai);if(o.event.changedTouches?Pa.on("touchmove.brush",qa).on("touchend.brush",Da):Pa.on("mousemove.brush",qa).on("mouseup.brush",Da),rn.interrupt().selectAll("*").interrupt(),Xn)Qn[0]=Xe[0]-Qn[0],Qn[1]=Qe[0]-Qn[1];else if(on){var ya=+/w$/.test(on),Sa=+/^n/.test(on);ra=[Xe[1-ya]-Qn[0],Qe[1-Sa]-Qn[1]],Qn[0]=Xe[ya],Qn[1]=Qe[Sa]}else o.event.altKey&&(Wn=Qn.slice());rn.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",kr.style("cursor")),Hr({type:"brushstart"}),qa();function Za(){o.event.keyCode==32&&(Xn||(Wn=null,Qn[0]-=Xe[1],Qn[1]-=Qe[1],Xn=2),q())}function Ai(){o.event.keyCode==32&&Xn==2&&(Qn[0]+=Xe[1],Qn[1]+=Qe[1],Xn=0,q())}function qa(){var pa=o.mouse(Mr),Ba=!1;ra&&(pa[0]+=ra[0],pa[1]+=ra[1]),Xn||(o.event.altKey?(Wn||(Wn=[(Xe[0]+Xe[1])/2,(Qe[0]+Qe[1])/2]),Qn[0]=Xe[+(pa[0]<Wn[0])],Qn[1]=Qe[+(pa[1]<Wn[1])]):Wn=null),Zr&&Hn(pa,Me,0)&&(Tr(rn),Ba=!0),_n&&Hn(pa,De,1)&&(Wr(rn),Ba=!0),Ba&&(wr(rn),Hr({type:"brush",mode:Xn?"move":"resize"}))}function Hn(pa,Ba,li){var ja=Us(Ba),zi=ja[0],Fi=ja[1],Ui=Qn[li],ui=li?Qe:Xe,Ki=ui[1]-ui[0],qn,xa;if(Xn&&(zi-=Ui,Fi-=Ki+Ui),qn=(li?Ft:yt)?Math.max(zi,Math.min(Fi,pa[li])):pa[li],Xn?xa=(qn+=Ui)+Ki:(Wn&&(Ui=Math.max(zi,Math.min(Fi,2*Wn[li]-qn))),Ui<qn?(xa=qn,qn=Ui):xa=Ui),ui[0]!=qn||ui[1]!=xa)return li?Tt=null:rt=null,ui[0]=qn,ui[1]=xa,!0}function Da(){qa(),rn.style("pointer-events","all").selectAll(".resize").style("display",jt.empty()?"none":null),o.select("body").style("cursor",null),Pa.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),ta(),Hr({type:"brushend"})}}return jt.x=function(Mr){return arguments.length?(Me=Mr,Ot=Oa[!Me<<1|!De],jt):Me},jt.y=function(Mr){return arguments.length?(De=Mr,Ot=Oa[!Me<<1|!De],jt):De},jt.clamp=function(Mr){return arguments.length?(Me&&De?(yt=!!Mr[0],Ft=!!Mr[1]):Me?yt=!!Mr:De&&(Ft=!!Mr),jt):Me&&De?[yt,Ft]:Me?yt:De?Ft:null},jt.extent=function(Mr){var kr,Hr,rn,on,Zr;return arguments.length?(Me&&(kr=Mr[0],Hr=Mr[1],De&&(kr=kr[0],Hr=Hr[0]),rt=[kr,Hr],Me.invert&&(kr=Me(kr),Hr=Me(Hr)),Hr<kr&&(Zr=kr,kr=Hr,Hr=Zr),(kr!=Xe[0]||Hr!=Xe[1])&&(Xe=[kr,Hr])),De&&(rn=Mr[0],on=Mr[1],Me&&(rn=rn[1],on=on[1]),Tt=[rn,on],De.invert&&(rn=De(rn),on=De(on)),on<rn&&(Zr=rn,rn=on,on=Zr),(rn!=Qe[0]||on!=Qe[1])&&(Qe=[rn,on])),jt):(Me&&(rt?(kr=rt[0],Hr=rt[1]):(kr=Xe[0],Hr=Xe[1],Me.invert&&(kr=Me.invert(kr),Hr=Me.invert(Hr)),Hr<kr&&(Zr=kr,kr=Hr,Hr=Zr))),De&&(Tt?(rn=Tt[0],on=Tt[1]):(rn=Qe[0],on=Qe[1],De.invert&&(rn=De.invert(rn),on=De.invert(on)),on<rn&&(Zr=rn,rn=on,on=Zr))),Me&&De?[[kr,rn],[Hr,on]]:Me?[kr,Hr]:De&&[rn,on])},jt.clear=function(){return jt.empty()||(Xe=[0,0],Qe=[0,0],rt=Tt=null),jt},jt.empty=function(){return!!Me&&Xe[0]==Xe[1]||!!De&&Qe[0]==Qe[1]},o.rebind(jt,se,"on")};var Ca={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Oa=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];o.text=bn(function(se){return se.responseText}),o.json=function(se,Me){return xn(se,"application/json",ri,Me)};function ri(se){return JSON.parse(se.responseText)}o.html=function(se,Me){return xn(se,"text/html",wi,Me)};function wi(se){var Me=d.createRange();return Me.selectNode(d.body),Me.createContextualFragment(se.responseText)}o.xml=bn(function(se){return se.responseXML}),A=o,P=typeof A=="function"?A.call(X,e,X,te):A,P!==void 0&&(te.exports=P)}).apply(self)},3480:function(te){(function(X,e){te.exports=e()})(this,function(){var X,e,A;function P(o,L){if(!X)X=L;else if(!e)e=L;else{var M="var sharedChunk = {}; ("+X+")(sharedChunk); ("+e+")(sharedChunk);",d={};X(d),A=L(d),typeof window<"u"&&(A.workerUrl=window.URL.createObjectURL(new Blob([M],{type:"text/javascript"})))}}return P(["exports"],function(o){function L(D,R){return R={exports:{}},D(R,R.exports),R.exports}var M="1.13.4",d=g;function g(D,R,U,ee){this.cx=3*D,this.bx=3*(U-D)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*R,this.by=3*(ee-R)-this.cy,this.ay=1-this.cy-this.by,this.p1x=D,this.p1y=ee,this.p2x=U,this.p2y=ee}g.prototype.sampleCurveX=function(D){return((this.ax*D+this.bx)*D+this.cx)*D},g.prototype.sampleCurveY=function(D){return((this.ay*D+this.by)*D+this.cy)*D},g.prototype.sampleCurveDerivativeX=function(D){return(3*this.ax*D+2*this.bx)*D+this.cx},g.prototype.solveCurveX=function(D,R){typeof R>"u"&&(R=1e-6);var U,ee,ue,xe,Ee;for(ue=D,Ee=0;Ee<8;Ee++){if(xe=this.sampleCurveX(ue)-D,Math.abs(xe)<R)return ue;var Ye=this.sampleCurveDerivativeX(ue);if(Math.abs(Ye)<1e-6)break;ue=ue-xe/Ye}if(U=0,ee=1,ue=D,ue<U)return U;if(ue>ee)return ee;for(;U<ee;){if(xe=this.sampleCurveX(ue),Math.abs(xe-D)<R)return ue;D>xe?U=ue:ee=ue,ue=(ee-U)*.5+U}return ue},g.prototype.solve=function(D,R){return this.sampleCurveY(this.solveCurveX(D,R))};var r=t;function t(D,R){this.x=D,this.y=R}t.prototype={clone:function(){return new t(this.x,this.y)},add:function(D){return this.clone()._add(D)},sub:function(D){return this.clone()._sub(D)},multByPoint:function(D){return this.clone()._multByPoint(D)},divByPoint:function(D){return this.clone()._divByPoint(D)},mult:function(D){return this.clone()._mult(D)},div:function(D){return this.clone()._div(D)},rotate:function(D){return this.clone()._rotate(D)},rotateAround:function(D,R){return this.clone()._rotateAround(D,R)},matMult:function(D){return this.clone()._matMult(D)},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(D){return this.x===D.x&&this.y===D.y},dist:function(D){return Math.sqrt(this.distSqr(D))},distSqr:function(D){var R=D.x-this.x,U=D.y-this.y;return R*R+U*U},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(D){return Math.atan2(this.y-D.y,this.x-D.x)},angleWith:function(D){return this.angleWithSep(D.x,D.y)},angleWithSep:function(D,R){return Math.atan2(this.x*R-this.y*D,this.x*D+this.y*R)},_matMult:function(D){var R=D[0]*this.x+D[1]*this.y,U=D[2]*this.x+D[3]*this.y;return this.x=R,this.y=U,this},_add:function(D){return this.x+=D.x,this.y+=D.y,this},_sub:function(D){return this.x-=D.x,this.y-=D.y,this},_mult:function(D){return this.x*=D,this.y*=D,this},_div:function(D){return this.x/=D,this.y/=D,this},_multByPoint:function(D){return this.x*=D.x,this.y*=D.y,this},_divByPoint:function(D){return this.x/=D.x,this.y/=D.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var D=this.y;return this.y=this.x,this.x=-D,this},_rotate:function(D){var R=Math.cos(D),U=Math.sin(D),ee=R*this.x-U*this.y,ue=U*this.x+R*this.y;return this.x=ee,this.y=ue,this},_rotateAround:function(D,R){var U=Math.cos(D),ee=Math.sin(D),ue=R.x+U*(this.x-R.x)-ee*(this.y-R.y),xe=R.y+ee*(this.x-R.x)+U*(this.y-R.y);return this.x=ue,this.y=xe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},t.convert=function(D){return D instanceof t?D:Array.isArray(D)?new t(D[0],D[1]):D};var s=typeof self<"u"?self:{};function a(D,R){if(Array.isArray(D)){if(!Array.isArray(R)||D.length!==R.length)return!1;for(var U=0;U<D.length;U++)if(!a(D[U],R[U]))return!1;return!0}if(typeof D=="object"&&D!==null&&R!==null){if(typeof R!="object")return!1;var ee=Object.keys(D);if(ee.length!==Object.keys(R).length)return!1;for(var ue in D)if(!a(D[ue],R[ue]))return!1;return!0}return D===R}var c=Math.pow(2,53)-1;function u(D){if(D<=0)return 0;if(D>=1)return 1;var R=D*D,U=R*D;return 4*(D<.5?U:3*(D-R)+U-.75)}function l(D,R,U,ee){var ue=new d(D,R,U,ee);return function(xe){return ue.solve(xe)}}var y=l(.25,.1,.25,1);function h(D,R,U){return Math.min(U,Math.max(R,D))}function T(D,R,U){var ee=U-R,ue=((D-R)%ee+ee)%ee+R;return ue===R?U:ue}function f(D,R,U){if(!D.length)return U(null,[]);var ee=D.length,ue=new Array(D.length),xe=null;D.forEach(function(Ee,Ye){R(Ee,function(ot,mt){ot&&(xe=ot),ue[Ye]=mt,--ee===0&&U(xe,ue)})})}function n(D){var R=[];for(var U in D)R.push(D[U]);return R}function v(D,R){var U=[];for(var ee in D)ee in R||U.push(ee);return U}function m(D){for(var R=[],U=arguments.length-1;U-- >0;)R[U]=arguments[U+1];for(var ee=0,ue=R;ee<ue.length;ee+=1){var xe=ue[ee];for(var Ee in xe)D[Ee]=xe[Ee]}return D}function b(D,R){for(var U={},ee=0;ee<R.length;ee++){var ue=R[ee];ue in D&&(U[ue]=D[ue])}return U}var E=1;function p(){return E++}function S(){function D(R){return R?(R^Math.random()*16>>R/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,D)}return D()}function w(D){return D<=1?1:Math.pow(2,Math.ceil(Math.log(D)/Math.LN2))}function i(D){return D?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(D):!1}function C(D,R){D.forEach(function(U){R[U]&&(R[U]=R[U].bind(R))})}function x(D,R){return D.indexOf(R,D.length-R.length)!==-1}function k(D,R,U){var ee={};for(var ue in D)ee[ue]=R.call(U||this,D[ue],ue,D);return ee}function I(D,R,U){var ee={};for(var ue in D)R.call(U||this,D[ue],ue,D)&&(ee[ue]=D[ue]);return ee}function B(D){return Array.isArray(D)?D.map(B):typeof D=="object"&&D?k(D,B):D}function _(D,R){for(var U=0;U<D.length;U++)if(R.indexOf(D[U])>=0)return!0;return!1}var z={};function O(D){z[D]||(typeof console<"u"&&console.warn(D),z[D]=!0)}function F(D,R,U){return(U.y-D.y)*(R.x-D.x)>(R.y-D.y)*(U.x-D.x)}function N(D){for(var R=0,U=0,ee=D.length,ue=ee-1,xe=void 0,Ee=void 0;U<ee;ue=U++)xe=D[U],Ee=D[ue],R+=(Ee.x-xe.x)*(xe.y+Ee.y);return R}function V(D){var R=D[0],U=D[1],ee=D[2];return U+=90,U*=Math.PI/180,ee*=Math.PI/180,{x:R*Math.cos(U)*Math.sin(ee),y:R*Math.sin(U)*Math.sin(ee),z:R*Math.cos(ee)}}function j(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function $(D){var R=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,U={};if(D.replace(R,function(ue,xe,Ee,Ye){var ot=Ee||Ye;return U[xe]=ot?ot.toLowerCase():!0,""}),U["max-age"]){var ee=parseInt(U["max-age"],10);isNaN(ee)?delete U["max-age"]:U["max-age"]=ee}return U}var q=null;function oe(D){if(q==null){var R=D.navigator?D.navigator.userAgent:null;q=!!D.safari||!!(R&&(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return q}function Z(D){try{var R=s[D];return R.setItem("_mapbox_test_",1),R.removeItem("_mapbox_test_"),!0}catch{return!1}}function G(D){return s.btoa(encodeURIComponent(D).replace(/%([0-9A-F]{2})/g,function(R,U){return String.fromCharCode(+("0x"+U))}))}function re(D){return decodeURIComponent(s.atob(D).split("").map(function(R){return"%"+("00"+R.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var H=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),J=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,ae=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,K,Y,ie={now:H,frame:function(R){var U=J(R);return{cancel:function(){return ae(U)}}},getImageData:function(R,U){U===void 0&&(U=0);var ee=s.document.createElement("canvas"),ue=ee.getContext("2d");if(!ue)throw new Error("failed to create canvas 2d context");return ee.width=R.width,ee.height=R.height,ue.drawImage(R,0,0,R.width,R.height),ue.getImageData(-U,-U,R.width+2*U,R.height+2*U)},resolveURL:function(R){return K||(K=s.document.createElement("a")),K.href=R,K.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(Y==null&&(Y=s.matchMedia("(prefers-reduced-motion: reduce)")),Y.matches):!1}},ne={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},le={supported:!1,testSupport:ve},de,we=!1,me,Le=!1;s.document&&(me=s.document.createElement("img"),me.onload=function(){de&&Ae(de),de=null,Le=!0},me.onerror=function(){we=!0,de=null},me.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function ve(D){we||!me||(Le?Ae(D):de=D)}function Ae(D){var R=D.createTexture();D.bindTexture(D.TEXTURE_2D,R);try{if(D.texImage2D(D.TEXTURE_2D,0,D.RGBA,D.RGBA,D.UNSIGNED_BYTE,me),D.isContextLost())return;le.supported=!0}catch{}D.deleteTexture(R),we=!0}var ye="01";function Se(){for(var D="1",R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",U="",ee=0;ee<10;ee++)U+=R[Math.floor(Math.random()*62)];var ue=12*60*60*1e3,xe=[D,ye,U].join(""),Ee=Date.now()+ue;return{token:xe,tokenExpiresAt:Ee}}var _e=function(R,U){this._transformRequestFn=R,this._customAccessToken=U,this._createSkuToken()};_e.prototype._createSkuToken=function(){var R=Se();this._skuToken=R.token,this._skuTokenExpiresAt=R.tokenExpiresAt},_e.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},_e.prototype.transformRequest=function(R,U){return this._transformRequestFn?this._transformRequestFn(R,U)||{url:R}:{url:R}},_e.prototype.normalizeStyleURL=function(R,U){if(!ze(R))return R;var ee=Ke(R);return ee.path="/styles/v1"+ee.path,this._makeAPIURL(ee,this._customAccessToken||U)},_e.prototype.normalizeGlyphsURL=function(R,U){if(!ze(R))return R;var ee=Ke(R);return ee.path="/fonts/v1"+ee.path,this._makeAPIURL(ee,this._customAccessToken||U)},_e.prototype.normalizeSourceURL=function(R,U){if(!ze(R))return R;var ee=Ke(R);return ee.path="/v4/"+ee.authority+".json",ee.params.push("secure"),this._makeAPIURL(ee,this._customAccessToken||U)},_e.prototype.normalizeSpriteURL=function(R,U,ee,ue){var xe=Ke(R);return ze(R)?(xe.path="/styles/v1"+xe.path+"/sprite"+U+ee,this._makeAPIURL(xe,this._customAccessToken||ue)):(xe.path+=""+U+ee,nt(xe))},_e.prototype.normalizeTileURL=function(R,U){if(this._isSkuTokenExpired()&&this._createSkuToken(),R&&!ze(R))return R;var ee=Ke(R),ue=/(\.(png|jpg)\d*)(?=$)/,xe=/^.+\/v4\//,Ee=ie.devicePixelRatio>=2||U===512?"@2x":"",Ye=le.supported?".webp":"$1";ee.path=ee.path.replace(ue,""+Ee+Ye),ee.path=ee.path.replace(xe,"/"),ee.path="/v4"+ee.path;var ot=this._customAccessToken||st(ee.params)||ne.ACCESS_TOKEN;return ne.REQUIRE_ACCESS_TOKEN&&ot&&this._skuToken&&ee.params.push("sku="+this._skuToken),this._makeAPIURL(ee,ot)},_e.prototype.canonicalizeTileURL=function(R,U){var ee="/v4/",ue=/\.[\w]+$/,xe=Ke(R);if(!xe.path.match(/(^\/v4\/)/)||!xe.path.match(ue))return R;var Ee="mapbox://tiles/";Ee+=xe.path.replace(ee,"");var Ye=xe.params;return U&&(Ye=Ye.filter(function(ot){return!ot.match(/^access_token=/)})),Ye.length&&(Ee+="?"+Ye.join("&")),Ee},_e.prototype.canonicalizeTileset=function(R,U){for(var ee=U?ze(U):!1,ue=[],xe=0,Ee=R.tiles||[];xe<Ee.length;xe+=1){var Ye=Ee[xe];Ne(Ye)?ue.push(this.canonicalizeTileURL(Ye,ee)):ue.push(Ye)}return ue},_e.prototype._makeAPIURL=function(R,U){var ee="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",ue=Ke(ne.API_URL);if(R.protocol=ue.protocol,R.authority=ue.authority,R.protocol==="http"){var xe=R.params.indexOf("secure");xe>=0&&R.params.splice(xe,1)}if(ue.path!=="/"&&(R.path=""+ue.path+R.path),!ne.REQUIRE_ACCESS_TOKEN)return nt(R);if(U=U||ne.ACCESS_TOKEN,!U)throw new Error("An API access token is required to use Mapbox GL. "+ee);if(U[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+ee);return R.params=R.params.filter(function(Ee){return Ee.indexOf("access_token")===-1}),R.params.push("access_token="+U),nt(R)};function ze(D){return D.indexOf("mapbox:")===0}var Ie=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ne(D){return Ie.test(D)}function et(D){return D.indexOf("sku=")>0&&Ne(D)}function st(D){for(var R=0,U=D;R<U.length;R+=1){var ee=U[R],ue=ee.match(/^access_token=(.*)$/);if(ue)return ue[1]}return null}var Ze=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ke(D){var R=D.match(Ze);if(!R)throw new Error("Unable to parse URL object");return{protocol:R[1],authority:R[2],path:R[3]||"/",params:R[4]?R[4].split("&"):[]}}function nt(D){var R=D.params.length?"?"+D.params.join("&"):"";return D.protocol+"://"+D.authority+D.path+R}var it="mapbox.eventData";function lt(D){if(!D)return null;var R=D.split(".");if(!R||R.length!==3)return null;try{var U=JSON.parse(re(R[1]));return U}catch{return null}}var vt=function(R){this.type=R,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};vt.prototype.getStorageKey=function(R){var U=lt(ne.ACCESS_TOKEN),ee="";return U&&U.u?ee=G(U.u):ee=ne.ACCESS_TOKEN||"",R?it+"."+R+":"+ee:it+":"+ee},vt.prototype.fetchEventData=function(){var R=Z("localStorage"),U=this.getStorageKey(),ee=this.getStorageKey("uuid");if(R)try{var ue=s.localStorage.getItem(U);ue&&(this.eventData=JSON.parse(ue));var xe=s.localStorage.getItem(ee);xe&&(this.anonId=xe)}catch{O("Unable to read from LocalStorage")}},vt.prototype.saveEventData=function(){var R=Z("localStorage"),U=this.getStorageKey(),ee=this.getStorageKey("uuid");if(R)try{s.localStorage.setItem(ee,this.anonId),Object.keys(this.eventData).length>=1&&s.localStorage.setItem(U,JSON.stringify(this.eventData))}catch{O("Unable to write to LocalStorage")}},vt.prototype.processRequests=function(R){},vt.prototype.postEvent=function(R,U,ee,ue){var xe=this;if(ne.EVENTS_URL){var Ee=Ke(ne.EVENTS_URL);Ee.params.push("access_token="+(ue||ne.ACCESS_TOKEN||""));var Ye={event:this.type,created:new Date(R).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:M,skuId:ye,userId:this.anonId},ot=U?m(Ye,U):Ye,mt={url:nt(Ee),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ot])};this.pendingRequest=It(mt,function(At){xe.pendingRequest=null,ee(At),xe.saveEventData(),xe.processRequests(ue)})}},vt.prototype.queueRequest=function(R,U){this.queue.push(R),this.processRequests(U)};var xt=function(D){function R(){D.call(this,"map.load"),this.success={},this.skuToken=""}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.postMapLoadEvent=function(ee,ue,xe,Ee){this.skuToken=xe,(ne.EVENTS_URL&&Ee||ne.ACCESS_TOKEN&&Array.isArray(ee)&&ee.some(function(Ye){return ze(Ye)||Ne(Ye)}))&&this.queueRequest({id:ue,timestamp:Date.now()},Ee)},R.prototype.processRequests=function(ee){var ue=this;if(!(this.pendingRequest||this.queue.length===0)){var xe=this.queue.shift(),Ee=xe.id,Ye=xe.timestamp;Ee&&this.success[Ee]||(this.anonId||this.fetchEventData(),i(this.anonId)||(this.anonId=S()),this.postEvent(Ye,{skuToken:this.skuToken},function(ot){ot||Ee&&(ue.success[Ee]=!0)},ee))}},R}(vt),Je=function(D){function R(U){D.call(this,"appUserTurnstile"),this._customAccessToken=U}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.postTurnstileEvent=function(ee,ue){ne.EVENTS_URL&&ne.ACCESS_TOKEN&&Array.isArray(ee)&&ee.some(function(xe){return ze(xe)||Ne(xe)})&&this.queueRequest(Date.now(),ue)},R.prototype.processRequests=function(ee){var ue=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var xe=lt(ne.ACCESS_TOKEN),Ee=xe?xe.u:ne.ACCESS_TOKEN,Ye=Ee!==this.eventData.tokenU;i(this.anonId)||(this.anonId=S(),Ye=!0);var ot=this.queue.shift();if(this.eventData.lastSuccess){var mt=new Date(this.eventData.lastSuccess),At=new Date(ot),Bt=(ot-this.eventData.lastSuccess)/(24*60*60*1e3);Ye=Ye||Bt>=1||Bt<-1||mt.getDate()!==At.getDate()}else Ye=!0;if(!Ye)return this.processRequests();this.postEvent(ot,{"enabled.telemetry":!1},function(Jt){Jt||(ue.eventData.lastSuccess=ot,ue.eventData.tokenU=Ee)},ee)}},R}(vt),Pe=new Je,Ue=Pe.postTurnstileEvent.bind(Pe),He=new xt,Oe=He.postMapLoadEvent.bind(He),Ce="mapbox-tiles",ge=500,pe=50,Te=1e3*60*7,be;function ke(){s.caches&&!be&&(be=s.caches.open(Ce))}var Ve;function je(D,R){if(Ve===void 0)try{new Response(new ReadableStream),Ve=!0}catch{Ve=!1}Ve?R(D.body):D.blob().then(R)}function at(D,R,U){if(ke(),!!be){var ee={status:R.status,statusText:R.statusText,headers:new s.Headers};R.headers.forEach(function(Ee,Ye){return ee.headers.set(Ye,Ee)});var ue=$(R.headers.get("Cache-Control")||"");if(!ue["no-store"]){ue["max-age"]&&ee.headers.set("Expires",new Date(U+ue["max-age"]*1e3).toUTCString());var xe=new Date(ee.headers.get("Expires")).getTime()-U;xe<Te||je(R,function(Ee){var Ye=new s.Response(Ee,ee);ke(),be&&be.then(function(ot){return ot.put(ut(D.url),Ye)}).catch(function(ot){return O(ot.message)})})}}}function ut(D){var R=D.indexOf("?");return R<0?D:D.slice(0,R)}function Nt(D,R){if(ke(),!be)return R(null);var U=ut(D.url);be.then(function(ee){ee.match(U).then(function(ue){var xe=Vt(ue);ee.delete(U),xe&&ee.put(U,ue.clone()),R(null,ue,xe)}).catch(R)}).catch(R)}function Vt(D){if(!D)return!1;var R=new Date(D.headers.get("Expires")||0),U=$(D.headers.get("Cache-Control")||"");return R>Date.now()&&!U["no-cache"]}var gt=1/0;function Ct(D){gt++,gt>pe&&(D.getActor().send("enforceCacheSizeLimit",ge),gt=0)}function Yt(D){ke(),be&&be.then(function(R){R.keys().then(function(U){for(var ee=0;ee<U.length-D;ee++)R.delete(U[ee])})})}function gr(D){var R=s.caches.delete(Ce);D&&R.catch(D).then(function(){return D()})}function ht(D,R){ge=D,pe=R}var Ht;function Wt(){return Ht==null&&(Ht=s.OffscreenCanvas&&new s.OffscreenCanvas(1,1).getContext("2d")&&typeof s.createImageBitmap=="function"),Ht}var cr={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(cr);var er=function(D){function R(U,ee,ue){ee===401&&Ne(ue)&&(U+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),D.call(this,U),this.status=ee,this.url=ue,this.name=this.constructor.name,this.message=U}return D&&(R.__proto__=D),R.prototype=Object.create(D&&D.prototype),R.prototype.constructor=R,R.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},R}(Error),ct=j()?function(){return self.worker&&self.worker.referrer}:function(){return(s.location.protocol==="blob:"?s.parent:s).location.href},qe=function(D){return/^file:/.test(D)||/^file:/.test(ct())&&!/^\w+:/.test(D)};function dt(D,R){var U=new s.AbortController,ee=new s.Request(D.url,{method:D.method||"GET",body:D.body,credentials:D.credentials,headers:D.headers,referrer:ct(),signal:U.signal}),ue=!1,xe=!1,Ee=et(ee.url);D.type==="json"&&ee.headers.set("Accept","application/json");var Ye=function(mt,At,Bt){if(!xe){if(mt&&mt.message!=="SecurityError"&&O(mt),At&&Bt)return ot(At);var Jt=Date.now();s.fetch(ee).then(function(Zt){if(Zt.ok){var hr=Ee?Zt.clone():null;return ot(Zt,hr,Jt)}else return R(new er(Zt.statusText,Zt.status,D.url))}).catch(function(Zt){Zt.code!==20&&R(new Error(Zt.message))})}},ot=function(mt,At,Bt){(D.type==="arrayBuffer"?mt.arrayBuffer():D.type==="json"?mt.json():mt.text()).then(function(Jt){xe||(At&&Bt&&at(ee,At,Bt),ue=!0,R(null,Jt,mt.headers.get("Cache-Control"),mt.headers.get("Expires")))}).catch(function(Jt){xe||R(new Error(Jt.message))})};return Ee?Nt(ee,Ye):Ye(null,null),{cancel:function(){xe=!0,ue||U.abort()}}}function bt(D,R){var U=new s.XMLHttpRequest;U.open(D.method||"GET",D.url,!0),D.type==="arrayBuffer"&&(U.responseType="arraybuffer");for(var ee in D.headers)U.setRequestHeader(ee,D.headers[ee]);return D.type==="json"&&(U.responseType="text",U.setRequestHeader("Accept","application/json")),U.withCredentials=D.credentials==="include",U.onerror=function(){R(new Error(U.statusText))},U.onload=function(){if((U.status>=200&&U.status<300||U.status===0)&&U.response!==null){var ue=U.response;if(D.type==="json")try{ue=JSON.parse(U.response)}catch(xe){return R(xe)}R(null,ue,U.getResponseHeader("Cache-Control"),U.getResponseHeader("Expires"))}else R(new er(U.statusText,U.status,D.url))},U.send(D.body),{cancel:function(){return U.abort()}}}var Et=function(D,R){if(!qe(D.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return dt(D,R);if(j()&&self.worker&&self.worker.actor){var U=!0;return self.worker.actor.send("getResource",D,R,void 0,U)}}return bt(D,R)},Mt=function(D,R){return Et(m(D,{type:"json"}),R)},_t=function(D,R){return Et(m(D,{type:"arrayBuffer"}),R)},It=function(D,R){return Et(m(D,{method:"POST"}),R)};function Gt(D){var R=s.document.createElement("a");return R.href=D,R.protocol===s.document.location.protocol&&R.host===s.document.location.host}var nr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ar(D,R,U,ee){var ue=new s.Image,xe=s.URL;ue.onload=function(){R(null,ue),xe.revokeObjectURL(ue.src),ue.onload=null,s.requestAnimationFrame(function(){ue.src=nr})},ue.onerror=function(){return R(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 Ee=new s.Blob([new Uint8Array(D)],{type:"image/png"});ue.cacheControl=U,ue.expires=ee,ue.src=D.byteLength?xe.createObjectURL(Ee):nr}function ir(D,R){var U=new s.Blob([new Uint8Array(D)],{type:"image/png"});s.createImageBitmap(U).then(function(ee){R(null,ee)}).catch(function(ee){R(new Error("Could not load image because of "+ee.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Be,Fe,Rt=function(){Be=[],Fe=0};Rt();var Lt=function(D,R){if(le.supported&&(D.headers||(D.headers={}),D.headers.accept="image/webp,*/*"),Fe>=ne.MAX_PARALLEL_IMAGE_REQUESTS){var U={requestParameters:D,callback:R,cancelled:!1,cancel:function(){this.cancelled=!0}};return Be.push(U),U}Fe++;var ee=!1,ue=function(){if(!ee)for(ee=!0,Fe--;Be.length&&Fe<ne.MAX_PARALLEL_IMAGE_REQUESTS;){var Ee=Be.shift(),Ye=Ee.requestParameters,ot=Ee.callback,mt=Ee.cancelled;mt||(Ee.cancel=Lt(Ye,ot).cancel)}},xe=_t(D,function(Ee,Ye,ot,mt){ue(),Ee?R(Ee):Ye&&(Wt()?ir(Ye,R):ar(Ye,R,ot,mt))});return{cancel:function(){xe.cancel(),ue()}}},Ut=function(D,R){var U=s.document.createElement("video");U.muted=!0,U.onloadstart=function(){R(null,U)};for(var ee=0;ee<D.length;ee++){var ue=s.document.createElement("source");Gt(D[ee])||(U.crossOrigin="Anonymous"),ue.src=D[ee],U.appendChild(ue)}return{cancel:function(){}}};function Qt(D,R,U){var ee=U[D]&&U[D].indexOf(R)!==-1;ee||(U[D]=U[D]||[],U[D].push(R))}function rr(D,R,U){if(U&&U[D]){var ee=U[D].indexOf(R);ee!==-1&&U[D].splice(ee,1)}}var Kt=function(R,U){U===void 0&&(U={}),m(this,U),this.type=R},Dt=function(D){function R(U,ee){ee===void 0&&(ee={}),D.call(this,"error",m({error:U},ee))}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R}(Kt),sr=function(){};sr.prototype.on=function(R,U){return this._listeners=this._listeners||{},Qt(R,U,this._listeners),this},sr.prototype.off=function(R,U){return rr(R,U,this._listeners),rr(R,U,this._oneTimeListeners),this},sr.prototype.once=function(R,U){return this._oneTimeListeners=this._oneTimeListeners||{},Qt(R,U,this._oneTimeListeners),this},sr.prototype.fire=function(R,U){typeof R=="string"&&(R=new Kt(R,U||{}));var ee=R.type;if(this.listens(ee)){R.target=this;for(var ue=this._listeners&&this._listeners[ee]?this._listeners[ee].slice():[],xe=0,Ee=ue;xe<Ee.length;xe+=1){var Ye=Ee[xe];Ye.call(this,R)}for(var ot=this._oneTimeListeners&&this._oneTimeListeners[ee]?this._oneTimeListeners[ee].slice():[],mt=0,At=ot;mt<At.length;mt+=1){var Bt=At[mt];rr(ee,Bt,this._oneTimeListeners),Bt.call(this,R)}var Jt=this._eventedParent;Jt&&(m(R,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Jt.fire(R))}else R instanceof Dt&&console.error(R.error);return this},sr.prototype.listens=function(R){return this._listeners&&this._listeners[R]&&this._listeners[R].length>0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)},sr.prototype.setEventedParent=function(R,U){return this._eventedParent=R,this._eventedParentData=U,this};var fr=8,vr={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"}},lr={"*":{type:"source"}},Or=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Sr={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"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Ar={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"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},sn={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"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Jr={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},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},bn={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"}}},xn={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"}}},or={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"}},Lr=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Br={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_r={"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"}},Qr={"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"}},un={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ln={"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"}},Mn={"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"}},Dn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},sa={type:"array",value:"*"},na={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Jn={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},aa={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},pr={type:"array",value:"*",minimum:1},$r={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}},Xr=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],fn={"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"}},zn={"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"}},pn={"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"}},gn={"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"}},In={"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"}},Gn={"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"}},ua={"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"}},Ma={"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"}},xr={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Rr={"*":{type:"string"}},yr={$version:fr,$root:vr,sources:lr,source:Or,source_vector:Sr,source_raster:Ar,source_raster_dem:sn,source_geojson:Jr,source_video:bn,source_image:xn,layer:or,layout:Lr,layout_background:Br,layout_fill:_r,layout_circle:Qr,layout_heatmap:un,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:ln,layout_symbol:Mn,layout_raster:Dn,layout_hillshade:Kn,filter:sa,filter_operator:na,geometry_type:Jn,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:aa,expression:pr,light:$r,paint:Xr,paint_fill:fn,"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:zn,paint_circle:pn,paint_heatmap:gn,paint_symbol:In,paint_raster:Gn,paint_hillshade:ua,paint_background:Ma,transition:xr,"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:Rr},Dr=function(R,U,ee,ue){this.message=(R?R+": ":"")+ee,ue&&(this.identifier=ue),U!=null&&U.__line__&&(this.line=U.__line__)};function vn(D){var R=D.key,U=D.value;return U?[new Dr(R,U,"constants have been deprecated as of v8")]:[]}function En(D){for(var R=[],U=arguments.length-1;U-- >0;)R[U]=arguments[U+1];for(var ee=0,ue=R;ee<ue.length;ee+=1){var xe=ue[ee];for(var Ee in xe)D[Ee]=xe[Ee]}return D}function an(D){return D instanceof Number||D instanceof String||D instanceof Boolean?D.valueOf():D}function en(D){if(Array.isArray(D))return D.map(en);if(D instanceof Object&&!(D instanceof Number||D instanceof String||D instanceof Boolean)){var R={};for(var U in D)R[U]=en(D[U]);return R}return an(D)}var br=function(D){function R(U,ee){D.call(this,ee),this.message=ee,this.key=U}return D&&(R.__proto__=D),R.prototype=Object.create(D&&D.prototype),R.prototype.constructor=R,R}(Error),Vr=function(R,U){U===void 0&&(U=[]),this.parent=R,this.bindings={};for(var ee=0,ue=U;ee<ue.length;ee+=1){var xe=ue[ee],Ee=xe[0],Ye=xe[1];this.bindings[Ee]=Ye}};Vr.prototype.concat=function(R){return new Vr(this,R)},Vr.prototype.get=function(R){if(this.bindings[R])return this.bindings[R];if(this.parent)return this.parent.get(R);throw new Error(R+" not found in scope.")},Vr.prototype.has=function(R){return this.bindings[R]?!0:this.parent?this.parent.has(R):!1};var zr={kind:"null"},Yr={kind:"number"},dn={kind:"string"},wn={kind:"boolean"},Tn={kind:"color"},kn={kind:"object"},Pn={kind:"value"},fa={kind:"error"},$n={kind:"collator"},la={kind:"formatted"},ba={kind:"resolvedImage"};function ni(D,R){return{kind:"array",itemType:D,N:R}}function Xa(D){if(D.kind==="array"){var R=Xa(D.itemType);return typeof D.N=="number"?"array<"+R+", "+D.N+">":D.itemType.kind==="value"?"array":"array<"+R+">"}else return D.kind}var uo=[zr,Yr,dn,wn,Tn,la,kn,ni(Pn),ba];function ao(D,R){if(R.kind==="error")return null;if(D.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!ao(D.itemType,R.itemType))&&(typeof D.N!="number"||D.N===R.N))return null}else{if(D.kind===R.kind)return null;if(D.kind==="value")for(var U=0,ee=uo;U<ee.length;U+=1){var ue=ee[U];if(!ao(ue,R))return null}}return"Expected "+Xa(D)+" but found "+Xa(R)+" instead."}function Oi(D,R){return R.some(function(U){return U.kind===D.kind})}function Ls(D,R){return R.some(function(U){return U==="null"?D===null:U==="array"?Array.isArray(D):U==="object"?D&&!Array.isArray(D)&&typeof D=="object":U===typeof D})}var jl=L(function(D,R){var U={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 ee(mt){return mt=Math.round(mt),mt<0?0:mt>255?255:mt}function ue(mt){return mt<0?0:mt>1?1:mt}function xe(mt){return mt[mt.length-1]==="%"?ee(parseFloat(mt)/100*255):ee(parseInt(mt))}function Ee(mt){return mt[mt.length-1]==="%"?ue(parseFloat(mt)/100):ue(parseFloat(mt))}function Ye(mt,At,Bt){return Bt<0?Bt+=1:Bt>1&&(Bt-=1),Bt*6<1?mt+(At-mt)*Bt*6:Bt*2<1?At:Bt*3<2?mt+(At-mt)*(2/3-Bt)*6:mt}function ot(mt){var At=mt.replace(/ /g,"").toLowerCase();if(At in U)return U[At].slice();if(At[0]==="#"){if(At.length===4){var Bt=parseInt(At.substr(1),16);return Bt>=0&&Bt<=4095?[(Bt&3840)>>4|(Bt&3840)>>8,Bt&240|(Bt&240)>>4,Bt&15|(Bt&15)<<4,1]:null}else if(At.length===7){var Bt=parseInt(At.substr(1),16);return Bt>=0&&Bt<=16777215?[(Bt&16711680)>>16,(Bt&65280)>>8,Bt&255,1]:null}return null}var Jt=At.indexOf("("),Zt=At.indexOf(")");if(Jt!==-1&&Zt+1===At.length){var hr=At.substr(0,Jt),Pr=At.substr(Jt+1,Zt-(Jt+1)).split(","),tn=1;switch(hr){case"rgba":if(Pr.length!==4)return null;tn=Ee(Pr.pop());case"rgb":return Pr.length!==3?null:[xe(Pr[0]),xe(Pr[1]),xe(Pr[2]),tn];case"hsla":if(Pr.length!==4)return null;tn=Ee(Pr.pop());case"hsl":if(Pr.length!==3)return null;var jr=(parseFloat(Pr[0])%360+360)%360/360,mn=Ee(Pr[1]),cn=Ee(Pr[2]),yn=cn<=.5?cn*(mn+1):cn+mn-cn*mn,Ln=cn*2-yn;return[ee(Ye(Ln,yn,jr+1/3)*255),ee(Ye(Ln,yn,jr)*255),ee(Ye(Ln,yn,jr-1/3)*255),tn];default:return null}}return null}try{R.parseCSSColor=ot}catch{}}),bu=jl.parseCSSColor,Ga=function(R,U,ee,ue){ue===void 0&&(ue=1),this.r=R,this.g=U,this.b=ee,this.a=ue};Ga.parse=function(R){if(R){if(R instanceof Ga)return R;if(typeof R=="string"){var U=bu(R);if(U)return new Ga(U[0]/255*U[3],U[1]/255*U[3],U[2]/255*U[3],U[3])}}},Ga.prototype.toString=function(){var R=this.toArray(),U=R[0],ee=R[1],ue=R[2],xe=R[3];return"rgba("+Math.round(U)+","+Math.round(ee)+","+Math.round(ue)+","+xe+")"},Ga.prototype.toArray=function(){var R=this,U=R.r,ee=R.g,ue=R.b,xe=R.a;return xe===0?[0,0,0,0]:[U*255/xe,ee*255/xe,ue*255/xe,xe]},Ga.black=new Ga(0,0,0,1),Ga.white=new Ga(1,1,1,1),Ga.transparent=new Ga(0,0,0,0),Ga.red=new Ga(1,0,0,1);var qs=function(R,U,ee){R?this.sensitivity=U?"variant":"case":this.sensitivity=U?"accent":"base",this.locale=ee,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};qs.prototype.compare=function(R,U){return this.collator.compare(R,U)},qs.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Kl=function(R,U,ee,ue,xe){this.text=R,this.image=U,this.scale=ee,this.fontStack=ue,this.textColor=xe},Ii=function(R){this.sections=R};Ii.fromString=function(R){return new Ii([new Kl(R,null,null,null,null)])},Ii.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(R){return R.text.length!==0||R.image&&R.image.name.length!==0})},Ii.factory=function(R){return R instanceof Ii?R:Ii.fromString(R)},Ii.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(R){return R.text}).join("")},Ii.prototype.serialize=function(){for(var R=["format"],U=0,ee=this.sections;U<ee.length;U+=1){var ue=ee[U];if(ue.image){R.push(["image",ue.image.name]);continue}R.push(ue.text);var xe={};ue.fontStack&&(xe["text-font"]=["literal",ue.fontStack.split(",")]),ue.scale&&(xe["font-scale"]=ue.scale),ue.textColor&&(xe["text-color"]=["rgba"].concat(ue.textColor.toArray())),R.push(xe)}return R};var $i=function(R){this.name=R.name,this.available=R.available};$i.prototype.toString=function(){return this.name},$i.fromString=function(R){return R?new $i({name:R,available:!1}):null},$i.prototype.serialize=function(){return["image",this.name]};function Ps(D,R,U,ee){if(!(typeof D=="number"&&D>=0&&D<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof U=="number"&&U>=0&&U<=255)){var ue=typeof ee=="number"?[D,R,U,ee]:[D,R,U];return"Invalid rgba value ["+ue.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ee>"u"||typeof ee=="number"&&ee>=0&&ee<=1?null:"Invalid rgba value ["+[D,R,U,ee].join(", ")+"]: 'a' must be between 0 and 1."}function Ll(D){if(D===null)return!0;if(typeof D=="string")return!0;if(typeof D=="boolean")return!0;if(typeof D=="number")return!0;if(D instanceof Ga)return!0;if(D instanceof qs)return!0;if(D instanceof Ii)return!0;if(D instanceof $i)return!0;if(Array.isArray(D)){for(var R=0,U=D;R<U.length;R+=1){var ee=U[R];if(!Ll(ee))return!1}return!0}else if(typeof D=="object"){for(var ue in D)if(!Ll(D[ue]))return!1;return!0}else return!1}function xi(D){if(D===null)return zr;if(typeof D=="string")return dn;if(typeof D=="boolean")return wn;if(typeof D=="number")return Yr;if(D instanceof Ga)return Tn;if(D instanceof qs)return $n;if(D instanceof Ii)return la;if(D instanceof $i)return ba;if(Array.isArray(D)){for(var R=D.length,U,ee=0,ue=D;ee<ue.length;ee+=1){var xe=ue[ee],Ee=xi(xe);if(!U)U=Ee;else{if(U===Ee)continue;U=Pn;break}}return ni(U||Pn,R)}else return kn}function Rs(D){var R=typeof D;return D===null?"":R==="string"||R==="number"||R==="boolean"?String(D):D instanceof Ga||D instanceof Ii||D instanceof $i?D.toString():JSON.stringify(D)}var Ti=function(R,U){this.type=R,this.value=U};Ti.parse=function(R,U){if(R.length!==2)return U.error("'literal' expression requires exactly one argument, but found "+(R.length-1)+" instead.");if(!Ll(R[1]))return U.error("invalid value");var ee=R[1],ue=xi(ee),xe=U.expectedType;return ue.kind==="array"&&ue.N===0&&xe&&xe.kind==="array"&&(typeof xe.N!="number"||xe.N===0)&&(ue=xe),new Ti(ue,ee)},Ti.prototype.evaluate=function(){return this.value},Ti.prototype.eachChild=function(){},Ti.prototype.outputDefined=function(){return!0},Ti.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Ga?["rgba"].concat(this.value.toArray()):this.value instanceof Ii?this.value.serialize():this.value};var Ci=function(R){this.name="ExpressionEvaluationError",this.message=R};Ci.prototype.toJSON=function(){return this.message};var Ds={string:dn,number:Yr,boolean:wn,object:kn},Bi=function(R,U){this.type=R,this.args=U};Bi.parse=function(R,U){if(R.length<2)return U.error("Expected at least one argument.");var ee=1,ue,xe=R[0];if(xe==="array"){var Ee;if(R.length>2){var Ye=R[1];if(typeof Ye!="string"||!(Ye in Ds)||Ye==="object")return U.error('The item type argument of "array" must be one of string, number, boolean',1);Ee=Ds[Ye],ee++}else Ee=Pn;var ot;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return U.error('The length argument to "array" must be a positive integer literal',2);ot=R[2],ee++}ue=ni(Ee,ot)}else ue=Ds[xe];for(var mt=[];ee<R.length;ee++){var At=U.parse(R[ee],ee,Pn);if(!At)return null;mt.push(At)}return new Bi(ue,mt)},Bi.prototype.evaluate=function(R){for(var U=0;U<this.args.length;U++){var ee=this.args[U].evaluate(R),ue=ao(this.type,xi(ee));if(ue){if(U===this.args.length-1)throw new Ci("Expected value to be of type "+Xa(this.type)+", but found "+Xa(xi(ee))+" instead.")}else return ee}return null},Bi.prototype.eachChild=function(R){this.args.forEach(R)},Bi.prototype.outputDefined=function(){return this.args.every(function(R){return R.outputDefined()})},Bi.prototype.serialize=function(){var R=this.type,U=[R.kind];if(R.kind==="array"){var ee=R.itemType;if(ee.kind==="string"||ee.kind==="number"||ee.kind==="boolean"){U.push(ee.kind);var ue=R.N;(typeof ue=="number"||this.args.length>1)&&U.push(ue)}}return U.concat(this.args.map(function(xe){return xe.serialize()}))};var Ni=function(R){this.type=la,this.sections=R};Ni.parse=function(R,U){if(R.length<2)return U.error("Expected at least one argument.");var ee=R[1];if(!Array.isArray(ee)&&typeof ee=="object")return U.error("First argument must be an image or text section.");for(var ue=[],xe=!1,Ee=1;Ee<=R.length-1;++Ee){var Ye=R[Ee];if(xe&&typeof Ye=="object"&&!Array.isArray(Ye)){xe=!1;var ot=null;if(Ye["font-scale"]&&(ot=U.parse(Ye["font-scale"],1,Yr),!ot))return null;var mt=null;if(Ye["text-font"]&&(mt=U.parse(Ye["text-font"],1,ni(dn)),!mt))return null;var At=null;if(Ye["text-color"]&&(At=U.parse(Ye["text-color"],1,Tn),!At))return null;var Bt=ue[ue.length-1];Bt.scale=ot,Bt.font=mt,Bt.textColor=At}else{var Jt=U.parse(R[Ee],1,Pn);if(!Jt)return null;var Zt=Jt.type.kind;if(Zt!=="string"&&Zt!=="value"&&Zt!=="null"&&Zt!=="resolvedImage")return U.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");xe=!0,ue.push({content:Jt,scale:null,font:null,textColor:null})}}return new Ni(ue)},Ni.prototype.evaluate=function(R){var U=function(ee){var ue=ee.content.evaluate(R);return xi(ue)===ba?new Kl("",ue,null,null,null):new Kl(Rs(ue),null,ee.scale?ee.scale.evaluate(R):null,ee.font?ee.font.evaluate(R).join(","):null,ee.textColor?ee.textColor.evaluate(R):null)};return new Ii(this.sections.map(U))},Ni.prototype.eachChild=function(R){for(var U=0,ee=this.sections;U<ee.length;U+=1){var ue=ee[U];R(ue.content),ue.scale&&R(ue.scale),ue.font&&R(ue.font),ue.textColor&&R(ue.textColor)}},Ni.prototype.outputDefined=function(){return!1},Ni.prototype.serialize=function(){for(var R=["format"],U=0,ee=this.sections;U<ee.length;U+=1){var ue=ee[U];R.push(ue.content.serialize());var xe={};ue.scale&&(xe["font-scale"]=ue.scale.serialize()),ue.font&&(xe["text-font"]=ue.font.serialize()),ue.textColor&&(xe["text-color"]=ue.textColor.serialize()),R.push(xe)}return R};var fo=function(R){this.type=ba,this.input=R};fo.parse=function(R,U){if(R.length!==2)return U.error("Expected two arguments.");var ee=U.parse(R[1],1,dn);return ee?new fo(ee):U.error("No image name provided.")},fo.prototype.evaluate=function(R){var U=this.input.evaluate(R),ee=$i.fromString(U);return ee&&R.availableImages&&(ee.available=R.availableImages.indexOf(U)>-1),ee},fo.prototype.eachChild=function(R){R(this.input)},fo.prototype.outputDefined=function(){return!1},fo.prototype.serialize=function(){return["image",this.input.serialize()]};var wu={"to-boolean":wn,"to-color":Tn,"to-number":Yr,"to-string":dn},io=function(R,U){this.type=R,this.args=U};io.parse=function(R,U){if(R.length<2)return U.error("Expected at least one argument.");var ee=R[0];if((ee==="to-boolean"||ee==="to-string")&&R.length!==2)return U.error("Expected one argument.");for(var ue=wu[ee],xe=[],Ee=1;Ee<R.length;Ee++){var Ye=U.parse(R[Ee],Ee,Pn);if(!Ye)return null;xe.push(Ye)}return new io(ue,xe)},io.prototype.evaluate=function(R){if(this.type.kind==="boolean")return!!this.args[0].evaluate(R);if(this.type.kind==="color"){for(var U,ee,ue=0,xe=this.args;ue<xe.length;ue+=1){var Ee=xe[ue];if(U=Ee.evaluate(R),ee=null,U instanceof Ga)return U;if(typeof U=="string"){var Ye=R.parseColor(U);if(Ye)return Ye}else if(Array.isArray(U)&&(U.length<3||U.length>4?ee="Invalid rbga value "+JSON.stringify(U)+": expected an array containing either three or four numeric values.":ee=Ps(U[0],U[1],U[2],U[3]),!ee))return new Ga(U[0]/255,U[1]/255,U[2]/255,U[3])}throw new Ci(ee||"Could not parse color from value '"+(typeof U=="string"?U:String(JSON.stringify(U)))+"'")}else if(this.type.kind==="number"){for(var ot=null,mt=0,At=this.args;mt<At.length;mt+=1){var Bt=At[mt];if(ot=Bt.evaluate(R),ot===null)return 0;var Jt=Number(ot);if(!isNaN(Jt))return Jt}throw new Ci("Could not convert "+JSON.stringify(ot)+" to number.")}else return this.type.kind==="formatted"?Ii.fromString(Rs(this.args[0].evaluate(R))):this.type.kind==="resolvedImage"?$i.fromString(Rs(this.args[0].evaluate(R))):Rs(this.args[0].evaluate(R))},io.prototype.eachChild=function(R){this.args.forEach(R)},io.prototype.outputDefined=function(){return this.args.every(function(R){return R.outputDefined()})},io.prototype.serialize=function(){if(this.type.kind==="formatted")return new Ni([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new fo(this.args[0]).serialize();var R=["to-"+this.type.kind];return this.eachChild(function(U){R.push(U.serialize())}),R};var nf=["Unknown","Point","LineString","Polygon"],_o=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};_o.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},_o.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?nf[this.feature.type]:this.feature.type:null},_o.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},_o.prototype.canonicalID=function(){return this.canonical},_o.prototype.properties=function(){return this.feature&&this.feature.properties||{}},_o.prototype.parseColor=function(R){var U=this._parseColorCache[R];return U||(U=this._parseColorCache[R]=Ga.parse(R)),U};var ki=function(R,U,ee,ue){this.name=R,this.type=U,this._evaluate=ee,this.args=ue};ki.prototype.evaluate=function(R){return this._evaluate(R,this.args)},ki.prototype.eachChild=function(R){this.args.forEach(R)},ki.prototype.outputDefined=function(){return!1},ki.prototype.serialize=function(){return[this.name].concat(this.args.map(function(R){return R.serialize()}))},ki.parse=function(R,U){var ee,ue=R[0],xe=ki.definitions[ue];if(!xe)return U.error('Unknown expression "'+ue+'". If you wanted a literal array, use ["literal", [...]].',0);for(var Ee=Array.isArray(xe)?xe[0]:xe.type,Ye=Array.isArray(xe)?[[xe[1],xe[2]]]:xe.overloads,ot=Ye.filter(function(da){var ma=da[0];return!Array.isArray(ma)||ma.length===R.length-1}),mt=null,At=0,Bt=ot;At<Bt.length;At+=1){var Jt=Bt[At],Zt=Jt[0],hr=Jt[1];mt=new Fo(U.registry,U.path,null,U.scope);for(var Pr=[],tn=!1,jr=1;jr<R.length;jr++){var mn=R[jr],cn=Array.isArray(Zt)?Zt[jr-1]:Zt.type,yn=mt.parse(mn,1+Pr.length,cn);if(!yn){tn=!0;break}Pr.push(yn)}if(!tn){if(Array.isArray(Zt)&&Zt.length!==Pr.length){mt.error("Expected "+Zt.length+" arguments, but found "+Pr.length+" instead.");continue}for(var Ln=0;Ln<Pr.length;Ln++){var On=Array.isArray(Zt)?Zt[Ln]:Zt.type,jn=Pr[Ln];mt.concat(Ln+1).checkSubtype(On,jn.type)}if(mt.errors.length===0)return new ki(ue,Ee,hr,Pr)}}if(ot.length===1)(ee=U.errors).push.apply(ee,mt.errors);else{for(var Yn=ot.length?ot:Ye,va=Yn.map(function(da){var ma=da[0];return Jl(ma)}).join(" | "),oa=[],ha=1;ha<R.length;ha++){var Ra=U.parse(R[ha],1+oa.length);if(!Ra)return null;oa.push(Xa(Ra.type))}U.error("Expected arguments of type "+va+", but found ("+oa.join(", ")+") instead.")}return null},ki.register=function(R,U){ki.definitions=U;for(var ee in U)R[ee]=ki};function Jl(D){return Array.isArray(D)?"("+D.map(Xa).join(", ")+")":"("+Xa(D.type)+"...)"}var es=function(R,U,ee){this.type=$n,this.locale=ee,this.caseSensitive=R,this.diacriticSensitive=U};es.parse=function(R,U){if(R.length!==2)return U.error("Expected one argument.");var ee=R[1];if(typeof ee!="object"||Array.isArray(ee))return U.error("Collator options argument must be an object.");var ue=U.parse(ee["case-sensitive"]===void 0?!1:ee["case-sensitive"],1,wn);if(!ue)return null;var xe=U.parse(ee["diacritic-sensitive"]===void 0?!1:ee["diacritic-sensitive"],1,wn);if(!xe)return null;var Ee=null;return ee.locale&&(Ee=U.parse(ee.locale,1,dn),!Ee)?null:new es(ue,xe,Ee)},es.prototype.evaluate=function(R){return new qs(this.caseSensitive.evaluate(R),this.diacriticSensitive.evaluate(R),this.locale?this.locale.evaluate(R):null)},es.prototype.eachChild=function(R){R(this.caseSensitive),R(this.diacriticSensitive),this.locale&&R(this.locale)},es.prototype.outputDefined=function(){return!1},es.prototype.serialize=function(){var R={};return R["case-sensitive"]=this.caseSensitive.serialize(),R["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(R.locale=this.locale.serialize()),["collator",R]};var zo=8192;function Ql(D,R){D[0]=Math.min(D[0],R[0]),D[1]=Math.min(D[1],R[1]),D[2]=Math.max(D[2],R[0]),D[3]=Math.max(D[3],R[1])}function Tu(D){return(180+D)/360}function af(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function Pl(D,R){return!(D[0]<=R[0]||D[2]>=R[2]||D[1]<=R[1]||D[3]>=R[3])}function of(D,R){var U=Tu(D[0]),ee=af(D[1]),ue=Math.pow(2,R.z);return[Math.round(U*ue*zo),Math.round(ee*ue*zo)]}function sf(D,R,U){var ee=D[0]-R[0],ue=D[1]-R[1],xe=D[0]-U[0],Ee=D[1]-U[1];return ee*Ee-xe*ue===0&&ee*xe<=0&&ue*Ee<=0}function lf(D,R,U){return R[1]>D[1]!=U[1]>D[1]&&D[0]<(U[0]-R[0])*(D[1]-R[1])/(U[1]-R[1])+R[0]}function $l(D,R){for(var U=!1,ee=0,ue=R.length;ee<ue;ee++)for(var xe=R[ee],Ee=0,Ye=xe.length;Ee<Ye-1;Ee++){if(sf(D,xe[Ee],xe[Ee+1]))return!1;lf(D,xe[Ee],xe[Ee+1])&&(U=!U)}return U}function uf(D,R){for(var U=0;U<R.length;U++)if($l(D,R[U]))return!0;return!1}function ff(D,R){return D[0]*R[1]-D[1]*R[0]}function Au(D,R,U,ee){var ue=D[0]-U[0],xe=D[1]-U[1],Ee=R[0]-U[0],Ye=R[1]-U[1],ot=ee[0]-U[0],mt=ee[1]-U[1],At=ue*mt-ot*xe,Bt=Ee*mt-ot*Ye;return At>0&&Bt<0||At<0&&Bt>0}function Mu(D,R,U,ee){var ue=[R[0]-D[0],R[1]-D[1]],xe=[ee[0]-U[0],ee[1]-U[1]];return ff(xe,ue)===0?!1:!!(Au(D,R,U,ee)&&Au(U,ee,D,R))}function ds(D,R,U){for(var ee=0,ue=U;ee<ue.length;ee+=1)for(var xe=ue[ee],Ee=0;Ee<xe.length-1;++Ee)if(Mu(D,R,xe[Ee],xe[Ee+1]))return!0;return!1}function Is(D,R){for(var U=0;U<D.length;++U)if(!$l(D[U],R))return!1;for(var ee=0;ee<D.length-1;++ee)if(ds(D[ee],D[ee+1],R))return!1;return!0}function el(D,R){for(var U=0;U<R.length;U++)if(Is(D,R[U]))return!0;return!1}function tl(D,R,U){for(var ee=[],ue=0;ue<D.length;ue++){for(var xe=[],Ee=0;Ee<D[ue].length;Ee++){var Ye=of(D[ue][Ee],U);Ql(R,Ye),xe.push(Ye)}ee.push(xe)}return ee}function Su(D,R,U){for(var ee=[],ue=0;ue<D.length;ue++){var xe=tl(D[ue],R,U);ee.push(xe)}return ee}function Wo(D,R,U,ee){if(D[0]<U[0]||D[0]>U[2]){var ue=ee*.5,xe=D[0]-U[0]>ue?-ee:U[0]-D[0]>ue?ee:0;xe===0&&(xe=D[0]-U[2]>ue?-ee:U[2]-D[0]>ue?ee:0),D[0]+=xe}Ql(R,D)}function cf(D){D[0]=D[1]=1/0,D[2]=D[3]=-1/0}function Rl(D,R,U,ee){for(var ue=Math.pow(2,ee.z)*zo,xe=[ee.x*zo,ee.y*zo],Ee=[],Ye=0,ot=D;Ye<ot.length;Ye+=1)for(var mt=ot[Ye],At=0,Bt=mt;At<Bt.length;At+=1){var Jt=Bt[At],Zt=[Jt.x+xe[0],Jt.y+xe[1]];Wo(Zt,R,U,ue),Ee.push(Zt)}return Ee}function Eu(D,R,U,ee){for(var ue=Math.pow(2,ee.z)*zo,xe=[ee.x*zo,ee.y*zo],Ee=[],Ye=0,ot=D;Ye<ot.length;Ye+=1){for(var mt=ot[Ye],At=[],Bt=0,Jt=mt;Bt<Jt.length;Bt+=1){var Zt=Jt[Bt],hr=[Zt.x+xe[0],Zt.y+xe[1]];Ql(R,hr),At.push(hr)}Ee.push(At)}if(R[2]-R[0]<=ue/2){cf(R);for(var Pr=0,tn=Ee;Pr<tn.length;Pr+=1)for(var jr=tn[Pr],mn=0,cn=jr;mn<cn.length;mn+=1){var yn=cn[mn];Wo(yn,R,U,ue)}}return Ee}function Cu(D,R){var U=[1/0,1/0,-1/0,-1/0],ee=[1/0,1/0,-1/0,-1/0],ue=D.canonicalID();if(R.type==="Polygon"){var xe=tl(R.coordinates,ee,ue),Ee=Rl(D.geometry(),U,ee,ue);if(!Pl(U,ee))return!1;for(var Ye=0,ot=Ee;Ye<ot.length;Ye+=1){var mt=ot[Ye];if(!$l(mt,xe))return!1}}if(R.type==="MultiPolygon"){var At=Su(R.coordinates,ee,ue),Bt=Rl(D.geometry(),U,ee,ue);if(!Pl(U,ee))return!1;for(var Jt=0,Zt=Bt;Jt<Zt.length;Jt+=1){var hr=Zt[Jt];if(!uf(hr,At))return!1}}return!0}function Dl(D,R){var U=[1/0,1/0,-1/0,-1/0],ee=[1/0,1/0,-1/0,-1/0],ue=D.canonicalID();if(R.type==="Polygon"){var xe=tl(R.coordinates,ee,ue),Ee=Eu(D.geometry(),U,ee,ue);if(!Pl(U,ee))return!1;for(var Ye=0,ot=Ee;Ye<ot.length;Ye+=1){var mt=ot[Ye];if(!Is(mt,xe))return!1}}if(R.type==="MultiPolygon"){var At=Su(R.coordinates,ee,ue),Bt=Eu(D.geometry(),U,ee,ue);if(!Pl(U,ee))return!1;for(var Jt=0,Zt=Bt;Jt<Zt.length;Jt+=1){var hr=Zt[Jt];if(!el(hr,At))return!1}}return!0}var bo=function(R,U){this.type=wn,this.geojson=R,this.geometries=U};bo.parse=function(R,U){if(R.length!==2)return U.error("'within' expression requires exactly one argument, but found "+(R.length-1)+" instead.");if(Ll(R[1])){var ee=R[1];if(ee.type==="FeatureCollection")for(var ue=0;ue<ee.features.length;++ue){var xe=ee.features[ue].geometry.type;if(xe==="Polygon"||xe==="MultiPolygon")return new bo(ee,ee.features[ue].geometry)}else if(ee.type==="Feature"){var Ee=ee.geometry.type;if(Ee==="Polygon"||Ee==="MultiPolygon")return new bo(ee,ee.geometry)}else if(ee.type==="Polygon"||ee.type==="MultiPolygon")return new bo(ee,ee)}return U.error("'within' expression requires valid geojson object that contains polygon geometry type.")},bo.prototype.evaluate=function(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.geometryType()==="Point")return Cu(R,this.geometries);if(R.geometryType()==="LineString")return Dl(R,this.geometries)}return!1},bo.prototype.eachChild=function(){},bo.prototype.outputDefined=function(){return!0},bo.prototype.serialize=function(){return["within",this.geojson]};function ks(D){if(D instanceof ki){if(D.name==="get"&&D.args.length===1)return!1;if(D.name==="feature-state")return!1;if(D.name==="has"&&D.args.length===1)return!1;if(D.name==="properties"||D.name==="geometry-type"||D.name==="id")return!1;if(/^filter-/.test(D.name))return!1}if(D instanceof bo)return!1;var R=!0;return D.eachChild(function(U){R&&!ks(U)&&(R=!1)}),R}function ps(D){if(D instanceof ki&&D.name==="feature-state")return!1;var R=!0;return D.eachChild(function(U){R&&!ps(U)&&(R=!1)}),R}function rl(D,R){if(D instanceof ki&&R.indexOf(D.name)>=0)return!1;var U=!0;return D.eachChild(function(ee){U&&!rl(ee,R)&&(U=!1)}),U}var ts=function(R,U){this.type=U.type,this.name=R,this.boundExpression=U};ts.parse=function(R,U){if(R.length!==2||typeof R[1]!="string")return U.error("'var' expression requires exactly one string literal argument.");var ee=R[1];return U.scope.has(ee)?new ts(ee,U.scope.get(ee)):U.error('Unknown variable "'+ee+'". Make sure "'+ee+'" has been bound in an enclosing "let" expression before using it.',1)},ts.prototype.evaluate=function(R){return this.boundExpression.evaluate(R)},ts.prototype.eachChild=function(){},ts.prototype.outputDefined=function(){return!1},ts.prototype.serialize=function(){return["var",this.name]};var Fo=function(R,U,ee,ue,xe){U===void 0&&(U=[]),ue===void 0&&(ue=new Vr),xe===void 0&&(xe=[]),this.registry=R,this.path=U,this.key=U.map(function(Ee){return"["+Ee+"]"}).join(""),this.scope=ue,this.errors=xe,this.expectedType=ee};Fo.prototype.parse=function(R,U,ee,ue,xe){return xe===void 0&&(xe={}),U?this.concat(U,ee,ue)._parse(R,xe):this._parse(R,xe)},Fo.prototype._parse=function(R,U){(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number")&&(R=["literal",R]);function ee(At,Bt,Jt){return Jt==="assert"?new Bi(Bt,[At]):Jt==="coerce"?new io(Bt,[At]):At}if(Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ue=R[0];if(typeof ue!="string")return this.error("Expression name must be a string, but found "+typeof ue+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var xe=this.registry[ue];if(xe){var Ee=xe.parse(R,this);if(!Ee)return null;if(this.expectedType){var Ye=this.expectedType,ot=Ee.type;if((Ye.kind==="string"||Ye.kind==="number"||Ye.kind==="boolean"||Ye.kind==="object"||Ye.kind==="array")&&ot.kind==="value")Ee=ee(Ee,Ye,U.typeAnnotation||"assert");else if((Ye.kind==="color"||Ye.kind==="formatted"||Ye.kind==="resolvedImage")&&(ot.kind==="value"||ot.kind==="string"))Ee=ee(Ee,Ye,U.typeAnnotation||"coerce");else if(this.checkSubtype(Ye,ot))return null}if(!(Ee instanceof Ti)&&Ee.type.kind!=="resolvedImage"&&ql(Ee)){var mt=new _o;try{Ee=new Ti(Ee.type,Ee.evaluate(mt))}catch(At){return this.error(At.message),null}}return Ee}return this.error('Unknown expression "'+ue+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof R>"u"?this.error("'undefined' value invalid. Use null instead."):typeof R=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof R+" instead.")},Fo.prototype.concat=function(R,U,ee){var ue=typeof R=="number"?this.path.concat(R):this.path,xe=ee?this.scope.concat(ee):this.scope;return new Fo(this.registry,ue,U||null,xe,this.errors)},Fo.prototype.error=function(R){for(var U=[],ee=arguments.length-1;ee-- >0;)U[ee]=arguments[ee+1];var ue=""+this.key+U.map(function(xe){return"["+xe+"]"}).join("");this.errors.push(new br(ue,R))},Fo.prototype.checkSubtype=function(R,U){var ee=ao(R,U);return ee&&this.error(ee),ee};function ql(D){if(D instanceof ts)return ql(D.boundExpression);if(D instanceof ki&&D.name==="error")return!1;if(D instanceof es)return!1;if(D instanceof bo)return!1;var R=D instanceof io||D instanceof Bi,U=!0;return D.eachChild(function(ee){R?U=U&&ql(ee):U=U&&ee instanceof Ti}),U?ks(D)&&rl(D,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function _s(D,R){for(var U=D.length-1,ee=0,ue=U,xe=0,Ee,Ye;ee<=ue;)if(xe=Math.floor((ee+ue)/2),Ee=D[xe],Ye=D[xe+1],Ee<=R){if(xe===U||R<Ye)return xe;ee=xe+1}else if(Ee>R)ue=xe-1;else throw new Ci("Input is not a number.");return 0}var wo=function(R,U,ee){this.type=R,this.input=U,this.labels=[],this.outputs=[];for(var ue=0,xe=ee;ue<xe.length;ue+=1){var Ee=xe[ue],Ye=Ee[0],ot=Ee[1];this.labels.push(Ye),this.outputs.push(ot)}};wo.parse=function(R,U){if(R.length-1<4)return U.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if((R.length-1)%2!==0)return U.error("Expected an even number of arguments.");var ee=U.parse(R[1],1,Yr);if(!ee)return null;var ue=[],xe=null;U.expectedType&&U.expectedType.kind!=="value"&&(xe=U.expectedType);for(var Ee=1;Ee<R.length;Ee+=2){var Ye=Ee===1?-1/0:R[Ee],ot=R[Ee+1],mt=Ee,At=Ee+1;if(typeof Ye!="number")return U.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',mt);if(ue.length&&ue[ue.length-1][0]>=Ye)return U.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',mt);var Bt=U.parse(ot,At,xe);if(!Bt)return null;xe=xe||Bt.type,ue.push([Ye,Bt])}return new wo(xe,ee,ue)},wo.prototype.evaluate=function(R){var U=this.labels,ee=this.outputs;if(U.length===1)return ee[0].evaluate(R);var ue=this.input.evaluate(R);if(ue<=U[0])return ee[0].evaluate(R);var xe=U.length;if(ue>=U[xe-1])return ee[xe-1].evaluate(R);var Ee=_s(U,ue);return ee[Ee].evaluate(R)},wo.prototype.eachChild=function(R){R(this.input);for(var U=0,ee=this.outputs;U<ee.length;U+=1){var ue=ee[U];R(ue)}},wo.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})},wo.prototype.serialize=function(){for(var R=["step",this.input.serialize()],U=0;U<this.labels.length;U++)U>0&&R.push(this.labels[U]),R.push(this.outputs[U].serialize());return R};function yi(D,R,U){return D*(1-U)+R*U}function eu(D,R,U){return new Ga(yi(D.r,R.r,U),yi(D.g,R.g,U),yi(D.b,R.b,U),yi(D.a,R.a,U))}function hf(D,R,U){return D.map(function(ee,ue){return yi(ee,R[ue],U)})}var Il=Object.freeze({__proto__:null,number:yi,color:eu,array:hf}),zs=.95047,Fs=1,vo=1.08883,kl=4/29,Os=6/29,_l=3*Os*Os,vf=Os*Os*Os,Lu=Math.PI/180,tu=180/Math.PI;function ru(D){return D>vf?Math.pow(D,.3333333333333333):D/_l+kl}function nu(D){return D>Os?D*D*D:_l*(D-kl)}function Bs(D){return 255*(D<=.0031308?12.92*D:1.055*Math.pow(D,.4166666666666667)-.055)}function zl(D){return D/=255,D<=.04045?D/12.92:Math.pow((D+.055)/1.055,2.4)}function nl(D){var R=zl(D.r),U=zl(D.g),ee=zl(D.b),ue=ru((.4124564*R+.3575761*U+.1804375*ee)/zs),xe=ru((.2126729*R+.7151522*U+.072175*ee)/Fs),Ee=ru((.0193339*R+.119192*U+.9503041*ee)/vo);return{l:116*xe-16,a:500*(ue-xe),b:200*(xe-Ee),alpha:D.a}}function Fl(D){var R=(D.l+16)/116,U=isNaN(D.a)?R:R+D.a/500,ee=isNaN(D.b)?R:R-D.b/200;return R=Fs*nu(R),U=zs*nu(U),ee=vo*nu(ee),new Ga(Bs(3.2404542*U-1.5371385*R-.4985314*ee),Bs(-.969266*U+1.8760108*R+.041556*ee),Bs(.0556434*U-.2040259*R+1.0572252*ee),D.alpha)}function ai(D,R,U){return{l:yi(D.l,R.l,U),a:yi(D.a,R.a,U),b:yi(D.b,R.b,U),alpha:yi(D.alpha,R.alpha,U)}}function Pu(D){var R=nl(D),U=R.l,ee=R.a,ue=R.b,xe=Math.atan2(ue,ee)*tu;return{h:xe<0?xe+360:xe,c:Math.sqrt(ee*ee+ue*ue),l:U,alpha:D.a}}function To(D){var R=D.h*Lu,U=D.c,ee=D.l;return Fl({l:ee,a:Math.cos(R)*U,b:Math.sin(R)*U,alpha:D.alpha})}function Ru(D,R,U){var ee=R-D;return D+U*(ee>180||ee<-180?ee-360*Math.round(ee/360):ee)}function au(D,R,U){return{h:Ru(D.h,R.h,U),c:yi(D.c,R.c,U),l:yi(D.l,R.l,U),alpha:yi(D.alpha,R.alpha,U)}}var gs={forward:nl,reverse:Fl,interpolate:ai},rs={forward:Pu,reverse:To,interpolate:au},Ol=Object.freeze({__proto__:null,lab:gs,hcl:rs}),bi=function(R,U,ee,ue,xe){this.type=R,this.operator=U,this.interpolation=ee,this.input=ue,this.labels=[],this.outputs=[];for(var Ee=0,Ye=xe;Ee<Ye.length;Ee+=1){var ot=Ye[Ee],mt=ot[0],At=ot[1];this.labels.push(mt),this.outputs.push(At)}};bi.interpolationFactor=function(R,U,ee,ue){var xe=0;if(R.name==="exponential")xe=al(U,R.base,ee,ue);else if(R.name==="linear")xe=al(U,1,ee,ue);else if(R.name==="cubic-bezier"){var Ee=R.controlPoints,Ye=new d(Ee[0],Ee[1],Ee[2],Ee[3]);xe=Ye.solve(al(U,1,ee,ue))}return xe},bi.parse=function(R,U){var ee=R[0],ue=R[1],xe=R[2],Ee=R.slice(3);if(!Array.isArray(ue)||ue.length===0)return U.error("Expected an interpolation type expression.",1);if(ue[0]==="linear")ue={name:"linear"};else if(ue[0]==="exponential"){var Ye=ue[1];if(typeof Ye!="number")return U.error("Exponential interpolation requires a numeric base.",1,1);ue={name:"exponential",base:Ye}}else if(ue[0]==="cubic-bezier"){var ot=ue.slice(1);if(ot.length!==4||ot.some(function(jr){return typeof jr!="number"||jr<0||jr>1}))return U.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ue={name:"cubic-bezier",controlPoints:ot}}else return U.error("Unknown interpolation type "+String(ue[0]),1,0);if(R.length-1<4)return U.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if((R.length-1)%2!==0)return U.error("Expected an even number of arguments.");if(xe=U.parse(xe,2,Yr),!xe)return null;var mt=[],At=null;ee==="interpolate-hcl"||ee==="interpolate-lab"?At=Tn:U.expectedType&&U.expectedType.kind!=="value"&&(At=U.expectedType);for(var Bt=0;Bt<Ee.length;Bt+=2){var Jt=Ee[Bt],Zt=Ee[Bt+1],hr=Bt+3,Pr=Bt+4;if(typeof Jt!="number")return U.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',hr);if(mt.length&&mt[mt.length-1][0]>=Jt)return U.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',hr);var tn=U.parse(Zt,Pr,At);if(!tn)return null;At=At||tn.type,mt.push([Jt,tn])}return At.kind!=="number"&&At.kind!=="color"&&!(At.kind==="array"&&At.itemType.kind==="number"&&typeof At.N=="number")?U.error("Type "+Xa(At)+" is not interpolatable."):new bi(At,ee,ue,xe,mt)},bi.prototype.evaluate=function(R){var U=this.labels,ee=this.outputs;if(U.length===1)return ee[0].evaluate(R);var ue=this.input.evaluate(R);if(ue<=U[0])return ee[0].evaluate(R);var xe=U.length;if(ue>=U[xe-1])return ee[xe-1].evaluate(R);var Ee=_s(U,ue),Ye=U[Ee],ot=U[Ee+1],mt=bi.interpolationFactor(this.interpolation,ue,Ye,ot),At=ee[Ee].evaluate(R),Bt=ee[Ee+1].evaluate(R);return this.operator==="interpolate"?Il[this.type.kind.toLowerCase()](At,Bt,mt):this.operator==="interpolate-hcl"?rs.reverse(rs.interpolate(rs.forward(At),rs.forward(Bt),mt)):gs.reverse(gs.interpolate(gs.forward(At),gs.forward(Bt),mt))},bi.prototype.eachChild=function(R){R(this.input);for(var U=0,ee=this.outputs;U<ee.length;U+=1){var ue=ee[U];R(ue)}},bi.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})},bi.prototype.serialize=function(){var R;this.interpolation.name==="linear"?R=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?R=["linear"]:R=["exponential",this.interpolation.base]:R=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var U=[this.operator,R,this.input.serialize()],ee=0;ee<this.labels.length;ee++)U.push(this.labels[ee],this.outputs[ee].serialize());return U};function al(D,R,U,ee){var ue=ee-U,xe=D-U;return ue===0?0:R===1?xe/ue:(Math.pow(R,xe)-1)/(Math.pow(R,ue)-1)}var Ao=function(R,U){this.type=R,this.args=U};Ao.parse=function(R,U){if(R.length<2)return U.error("Expectected at least one argument.");var ee=null,ue=U.expectedType;ue&&ue.kind!=="value"&&(ee=ue);for(var xe=[],Ee=0,Ye=R.slice(1);Ee<Ye.length;Ee+=1){var ot=Ye[Ee],mt=U.parse(ot,1+xe.length,ee,void 0,{typeAnnotation:"omit"});if(!mt)return null;ee=ee||mt.type,xe.push(mt)}var At=ue&&xe.some(function(Bt){return ao(ue,Bt.type)});return At?new Ao(Pn,xe):new Ao(ee,xe)},Ao.prototype.evaluate=function(R){for(var U=null,ee=0,ue,xe=0,Ee=this.args;xe<Ee.length;xe+=1){var Ye=Ee[xe];if(ee++,U=Ye.evaluate(R),U&&U instanceof $i&&!U.available&&(ue||(ue=U.name),U=null,ee===this.args.length&&(U=ue)),U!==null)break}return U},Ao.prototype.eachChild=function(R){this.args.forEach(R)},Ao.prototype.outputDefined=function(){return this.args.every(function(R){return R.outputDefined()})},Ao.prototype.serialize=function(){var R=["coalesce"];return this.eachChild(function(U){R.push(U.serialize())}),R};var Yo=function(R,U){this.type=U.type,this.bindings=[].concat(R),this.result=U};Yo.prototype.evaluate=function(R){return this.result.evaluate(R)},Yo.prototype.eachChild=function(R){for(var U=0,ee=this.bindings;U<ee.length;U+=1){var ue=ee[U];R(ue[1])}R(this.result)},Yo.parse=function(R,U){if(R.length<4)return U.error("Expected at least 3 arguments, but found "+(R.length-1)+" instead.");for(var ee=[],ue=1;ue<R.length-1;ue+=2){var xe=R[ue];if(typeof xe!="string")return U.error("Expected string, but found "+typeof xe+" instead.",ue);if(/[^a-zA-Z0-9_]/.test(xe))return U.error("Variable names must contain only alphanumeric characters or '_'.",ue);var Ee=U.parse(R[ue+1],ue+1);if(!Ee)return null;ee.push([xe,Ee])}var Ye=U.parse(R[R.length-1],R.length-1,U.expectedType,ee);return Ye?new Yo(ee,Ye):null},Yo.prototype.outputDefined=function(){return this.result.outputDefined()},Yo.prototype.serialize=function(){for(var R=["let"],U=0,ee=this.bindings;U<ee.length;U+=1){var ue=ee[U],xe=ue[0],Ee=ue[1];R.push(xe,Ee.serialize())}return R.push(this.result.serialize()),R};var ys=function(R,U,ee){this.type=R,this.index=U,this.input=ee};ys.parse=function(R,U){if(R.length!==3)return U.error("Expected 2 arguments, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1,Yr),ue=U.parse(R[2],2,ni(U.expectedType||Pn));if(!ee||!ue)return null;var xe=ue.type;return new ys(xe.itemType,ee,ue)},ys.prototype.evaluate=function(R){var U=this.index.evaluate(R),ee=this.input.evaluate(R);if(U<0)throw new Ci("Array index out of bounds: "+U+" < 0.");if(U>=ee.length)throw new Ci("Array index out of bounds: "+U+" > "+(ee.length-1)+".");if(U!==Math.floor(U))throw new Ci("Array index must be an integer, but found "+U+" instead.");return ee[U]},ys.prototype.eachChild=function(R){R(this.index),R(this.input)},ys.prototype.outputDefined=function(){return!1},ys.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ns=function(R,U){this.type=wn,this.needle=R,this.haystack=U};ns.parse=function(R,U){if(R.length!==3)return U.error("Expected 2 arguments, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1,Pn),ue=U.parse(R[2],2,Pn);return!ee||!ue?null:Oi(ee.type,[wn,dn,Yr,zr,Pn])?new ns(ee,ue):U.error("Expected first argument to be of type boolean, string, number or null, but found "+Xa(ee.type)+" instead")},ns.prototype.evaluate=function(R){var U=this.needle.evaluate(R),ee=this.haystack.evaluate(R);if(!ee)return!1;if(!Ls(U,["boolean","string","number","null"]))throw new Ci("Expected first argument to be of type boolean, string, number or null, but found "+Xa(xi(U))+" instead.");if(!Ls(ee,["string","array"]))throw new Ci("Expected second argument to be of type array or string, but found "+Xa(xi(ee))+" instead.");return ee.indexOf(U)>=0},ns.prototype.eachChild=function(R){R(this.needle),R(this.haystack)},ns.prototype.outputDefined=function(){return!0},ns.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Mo=function(R,U,ee){this.type=Yr,this.needle=R,this.haystack=U,this.fromIndex=ee};Mo.parse=function(R,U){if(R.length<=2||R.length>=5)return U.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1,Pn),ue=U.parse(R[2],2,Pn);if(!ee||!ue)return null;if(!Oi(ee.type,[wn,dn,Yr,zr,Pn]))return U.error("Expected first argument to be of type boolean, string, number or null, but found "+Xa(ee.type)+" instead");if(R.length===4){var xe=U.parse(R[3],3,Yr);return xe?new Mo(ee,ue,xe):null}else return new Mo(ee,ue)},Mo.prototype.evaluate=function(R){var U=this.needle.evaluate(R),ee=this.haystack.evaluate(R);if(!Ls(U,["boolean","string","number","null"]))throw new Ci("Expected first argument to be of type boolean, string, number or null, but found "+Xa(xi(U))+" instead.");if(!Ls(ee,["string","array"]))throw new Ci("Expected second argument to be of type array or string, but found "+Xa(xi(ee))+" instead.");if(this.fromIndex){var ue=this.fromIndex.evaluate(R);return ee.indexOf(U,ue)}return ee.indexOf(U)},Mo.prototype.eachChild=function(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)},Mo.prototype.outputDefined=function(){return!1},Mo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var R=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),R]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Xo=function(R,U,ee,ue,xe,Ee){this.inputType=R,this.type=U,this.input=ee,this.cases=ue,this.outputs=xe,this.otherwise=Ee};Xo.parse=function(R,U){if(R.length<5)return U.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if(R.length%2!==1)return U.error("Expected an even number of arguments.");var ee,ue;U.expectedType&&U.expectedType.kind!=="value"&&(ue=U.expectedType);for(var xe={},Ee=[],Ye=2;Ye<R.length-1;Ye+=2){var ot=R[Ye],mt=R[Ye+1];Array.isArray(ot)||(ot=[ot]);var At=U.concat(Ye);if(ot.length===0)return At.error("Expected at least one branch label.");for(var Bt=0,Jt=ot;Bt<Jt.length;Bt+=1){var Zt=Jt[Bt];if(typeof Zt!="number"&&typeof Zt!="string")return At.error("Branch labels must be numbers or strings.");if(typeof Zt=="number"&&Math.abs(Zt)>Number.MAX_SAFE_INTEGER)return At.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Zt=="number"&&Math.floor(Zt)!==Zt)return At.error("Numeric branch labels must be integer values.");if(!ee)ee=xi(Zt);else if(At.checkSubtype(ee,xi(Zt)))return null;if(typeof xe[String(Zt)]<"u")return At.error("Branch labels must be unique.");xe[String(Zt)]=Ee.length}var hr=U.parse(mt,Ye,ue);if(!hr)return null;ue=ue||hr.type,Ee.push(hr)}var Pr=U.parse(R[1],1,Pn);if(!Pr)return null;var tn=U.parse(R[R.length-1],R.length-1,ue);return!tn||Pr.type.kind!=="value"&&U.concat(1).checkSubtype(ee,Pr.type)?null:new Xo(ee,ue,Pr,xe,Ee,tn)},Xo.prototype.evaluate=function(R){var U=this.input.evaluate(R),ee=xi(U)===this.inputType&&this.outputs[this.cases[U]]||this.otherwise;return ee.evaluate(R)},Xo.prototype.eachChild=function(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)},Xo.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})&&this.otherwise.outputDefined()},Xo.prototype.serialize=function(){for(var R=this,U=["match",this.input.serialize()],ee=Object.keys(this.cases).sort(),ue=[],xe={},Ee=0,Ye=ee;Ee<Ye.length;Ee+=1){var ot=Ye[Ee],mt=xe[this.cases[ot]];mt===void 0?(xe[this.cases[ot]]=ue.length,ue.push([this.cases[ot],[ot]])):ue[mt][1].push(ot)}for(var At=function(Pr){return R.inputType.kind==="number"?Number(Pr):Pr},Bt=0,Jt=ue;Bt<Jt.length;Bt+=1){var Zt=Jt[Bt],mt=Zt[0],hr=Zt[1];hr.length===1?U.push(At(hr[0])):U.push(hr.map(At)),U.push(this.outputs[outputIndex$1].serialize())}return U.push(this.otherwise.serialize()),U};var So=function(R,U,ee){this.type=R,this.branches=U,this.otherwise=ee};So.parse=function(R,U){if(R.length<4)return U.error("Expected at least 3 arguments, but found only "+(R.length-1)+".");if(R.length%2!==0)return U.error("Expected an odd number of arguments.");var ee;U.expectedType&&U.expectedType.kind!=="value"&&(ee=U.expectedType);for(var ue=[],xe=1;xe<R.length-1;xe+=2){var Ee=U.parse(R[xe],xe,wn);if(!Ee)return null;var Ye=U.parse(R[xe+1],xe+1,ee);if(!Ye)return null;ue.push([Ee,Ye]),ee=ee||Ye.type}var ot=U.parse(R[R.length-1],R.length-1,ee);return ot?new So(ee,ue,ot):null},So.prototype.evaluate=function(R){for(var U=0,ee=this.branches;U<ee.length;U+=1){var ue=ee[U],xe=ue[0],Ee=ue[1];if(xe.evaluate(R))return Ee.evaluate(R)}return this.otherwise.evaluate(R)},So.prototype.eachChild=function(R){for(var U=0,ee=this.branches;U<ee.length;U+=1){var ue=ee[U],xe=ue[0],Ee=ue[1];R(xe),R(Ee)}R(this.otherwise)},So.prototype.outputDefined=function(){return this.branches.every(function(R){R[0];var U=R[1];return U.outputDefined()})&&this.otherwise.outputDefined()},So.prototype.serialize=function(){var R=["case"];return this.eachChild(function(U){R.push(U.serialize())}),R};var po=function(R,U,ee,ue){this.type=R,this.input=U,this.beginIndex=ee,this.endIndex=ue};po.parse=function(R,U){if(R.length<=2||R.length>=5)return U.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1,Pn),ue=U.parse(R[2],2,Yr);if(!ee||!ue)return null;if(!Oi(ee.type,[ni(Pn),dn,Pn]))return U.error("Expected first argument to be of type array or string, but found "+Xa(ee.type)+" instead");if(R.length===4){var xe=U.parse(R[3],3,Yr);return xe?new po(ee.type,ee,ue,xe):null}else return new po(ee.type,ee,ue)},po.prototype.evaluate=function(R){var U=this.input.evaluate(R),ee=this.beginIndex.evaluate(R);if(!Ls(U,["string","array"]))throw new Ci("Expected first argument to be of type array or string, but found "+Xa(xi(U))+" instead.");if(this.endIndex){var ue=this.endIndex.evaluate(R);return U.slice(ee,ue)}return U.slice(ee)},po.prototype.eachChild=function(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)},po.prototype.outputDefined=function(){return!1},po.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var R=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),R]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function il(D,R){return D==="=="||D==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function df(D,R,U){return R===U}function pf(D,R,U){return R!==U}function gf(D,R,U){return R<U}function yf(D,R,U){return R>U}function iu(D,R,U){return R<=U}function Du(D,R,U){return R>=U}function Ns(D,R,U,ee){return ee.compare(R,U)===0}function _i(D,R,U,ee){return!Ns(D,R,U,ee)}function co(D,R,U,ee){return ee.compare(R,U)<0}function Us(D,R,U,ee){return ee.compare(R,U)>0}function Iu(D,R,U,ee){return ee.compare(R,U)<=0}function ol(D,R,U,ee){return ee.compare(R,U)>=0}function Zo(D,R,U){var ee=D!=="=="&&D!=="!=";return function(){function ue(xe,Ee,Ye){this.type=wn,this.lhs=xe,this.rhs=Ee,this.collator=Ye,this.hasUntypedArgument=xe.type.kind==="value"||Ee.type.kind==="value"}return ue.parse=function(Ee,Ye){if(Ee.length!==3&&Ee.length!==4)return Ye.error("Expected two or three arguments.");var ot=Ee[0],mt=Ye.parse(Ee[1],1,Pn);if(!mt)return null;if(!il(ot,mt.type))return Ye.concat(1).error('"'+ot+`" comparisons are not supported for type '`+Xa(mt.type)+"'.");var At=Ye.parse(Ee[2],2,Pn);if(!At)return null;if(!il(ot,At.type))return Ye.concat(2).error('"'+ot+`" comparisons are not supported for type '`+Xa(At.type)+"'.");if(mt.type.kind!==At.type.kind&&mt.type.kind!=="value"&&At.type.kind!=="value")return Ye.error("Cannot compare types '"+Xa(mt.type)+"' and '"+Xa(At.type)+"'.");ee&&(mt.type.kind==="value"&&At.type.kind!=="value"?mt=new Bi(At.type,[mt]):mt.type.kind!=="value"&&At.type.kind==="value"&&(At=new Bi(mt.type,[At])));var Bt=null;if(Ee.length===4){if(mt.type.kind!=="string"&&At.type.kind!=="string"&&mt.type.kind!=="value"&&At.type.kind!=="value")return Ye.error("Cannot use collator to compare non-string types.");if(Bt=Ye.parse(Ee[3],3,$n),!Bt)return null}return new ue(mt,At,Bt)},ue.prototype.evaluate=function(Ee){var Ye=this.lhs.evaluate(Ee),ot=this.rhs.evaluate(Ee);if(ee&&this.hasUntypedArgument){var mt=xi(Ye),At=xi(ot);if(mt.kind!==At.kind||!(mt.kind==="string"||mt.kind==="number"))throw new Ci('Expected arguments for "'+D+'" to be (string, string) or (number, number), but found ('+mt.kind+", "+At.kind+") instead.")}if(this.collator&&!ee&&this.hasUntypedArgument){var Bt=xi(Ye),Jt=xi(ot);if(Bt.kind!=="string"||Jt.kind!=="string")return R(Ee,Ye,ot)}return this.collator?U(Ee,Ye,ot,this.collator.evaluate(Ee)):R(Ee,Ye,ot)},ue.prototype.eachChild=function(Ee){Ee(this.lhs),Ee(this.rhs),this.collator&&Ee(this.collator)},ue.prototype.outputDefined=function(){return!0},ue.prototype.serialize=function(){var Ee=[D];return this.eachChild(function(Ye){Ee.push(Ye.serialize())}),Ee},ue}()}var mf=Zo("==",df,Ns),ku=Zo("!=",pf,_i),_u=Zo("<",gf,co),ou=Zo(">",yf,Us),zu=Zo("<=",iu,Iu),qi=Zo(">=",Du,ol),Eo=function(R,U,ee,ue,xe){this.type=dn,this.number=R,this.locale=U,this.currency=ee,this.minFractionDigits=ue,this.maxFractionDigits=xe};Eo.parse=function(R,U){if(R.length!==3)return U.error("Expected two arguments.");var ee=U.parse(R[1],1,Yr);if(!ee)return null;var ue=R[2];if(typeof ue!="object"||Array.isArray(ue))return U.error("NumberFormat options argument must be an object.");var xe=null;if(ue.locale&&(xe=U.parse(ue.locale,1,dn),!xe))return null;var Ee=null;if(ue.currency&&(Ee=U.parse(ue.currency,1,dn),!Ee))return null;var Ye=null;if(ue["min-fraction-digits"]&&(Ye=U.parse(ue["min-fraction-digits"],1,Yr),!Ye))return null;var ot=null;return ue["max-fraction-digits"]&&(ot=U.parse(ue["max-fraction-digits"],1,Yr),!ot)?null:new Eo(ee,xe,Ee,Ye,ot)},Eo.prototype.evaluate=function(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))},Eo.prototype.eachChild=function(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)},Eo.prototype.outputDefined=function(){return!1},Eo.prototype.serialize=function(){var R={};return this.locale&&(R.locale=this.locale.serialize()),this.currency&&(R.currency=this.currency.serialize()),this.minFractionDigits&&(R["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(R["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),R]};var as=function(R){this.type=Yr,this.input=R};as.parse=function(R,U){if(R.length!==2)return U.error("Expected 1 argument, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1);return ee?ee.type.kind!=="array"&&ee.type.kind!=="string"&&ee.type.kind!=="value"?U.error("Expected argument of type string or array, but found "+Xa(ee.type)+" instead."):new as(ee):null},as.prototype.evaluate=function(R){var U=this.input.evaluate(R);if(typeof U=="string")return U.length;if(Array.isArray(U))return U.length;throw new Ci("Expected value to be of type string or array, but found "+Xa(xi(U))+" instead.")},as.prototype.eachChild=function(R){R(this.input)},as.prototype.outputDefined=function(){return!1},as.prototype.serialize=function(){var R=["length"];return this.eachChild(function(U){R.push(U.serialize())}),R};var Vs={"==":mf,"!=":ku,">":ou,"<":_u,">=":qi,"<=":zu,array:Bi,at:ys,boolean:Bi,case:So,coalesce:Ao,collator:es,format:Ni,image:fo,in:ns,"index-of":Mo,interpolate:bi,"interpolate-hcl":bi,"interpolate-lab":bi,length:as,let:Yo,literal:Ti,match:Xo,number:Bi,"number-format":Eo,object:Bi,slice:po,step:wo,string:Bi,"to-boolean":io,"to-color":io,"to-number":io,"to-string":io,var:ts,within:bo};function Bl(D,R){var U=R[0],ee=R[1],ue=R[2],xe=R[3];U=U.evaluate(D),ee=ee.evaluate(D),ue=ue.evaluate(D);var Ee=xe?xe.evaluate(D):1,Ye=Ps(U,ee,ue,Ee);if(Ye)throw new Ci(Ye);return new Ga(U/255*Ee,ee/255*Ee,ue/255*Ee,Ee)}function ms(D,R){return D in R}function xs(D,R){var U=R[D];return typeof U>"u"?null:U}function Fu(D,R,U,ee){for(;U<=ee;){var ue=U+ee>>1;if(R[ue]===D)return!0;R[ue]>D?ee=ue-1:U=ue+1}return!1}function jo(D){return{type:D}}ki.register(Vs,{error:[fa,[dn],function(D,R){var U=R[0];throw new Ci(U.evaluate(D))}],typeof:[dn,[Pn],function(D,R){var U=R[0];return Xa(xi(U.evaluate(D)))}],"to-rgba":[ni(Yr,4),[Tn],function(D,R){var U=R[0];return U.evaluate(D).toArray()}],rgb:[Tn,[Yr,Yr,Yr],Bl],rgba:[Tn,[Yr,Yr,Yr,Yr],Bl],has:{type:wn,overloads:[[[dn],function(D,R){var U=R[0];return ms(U.evaluate(D),D.properties())}],[[dn,kn],function(D,R){var U=R[0],ee=R[1];return ms(U.evaluate(D),ee.evaluate(D))}]]},get:{type:Pn,overloads:[[[dn],function(D,R){var U=R[0];return xs(U.evaluate(D),D.properties())}],[[dn,kn],function(D,R){var U=R[0],ee=R[1];return xs(U.evaluate(D),ee.evaluate(D))}]]},"feature-state":[Pn,[dn],function(D,R){var U=R[0];return xs(U.evaluate(D),D.featureState||{})}],properties:[kn,[],function(D){return D.properties()}],"geometry-type":[dn,[],function(D){return D.geometryType()}],id:[Pn,[],function(D){return D.id()}],zoom:[Yr,[],function(D){return D.globals.zoom}],"heatmap-density":[Yr,[],function(D){return D.globals.heatmapDensity||0}],"line-progress":[Yr,[],function(D){return D.globals.lineProgress||0}],accumulated:[Pn,[],function(D){return D.globals.accumulated===void 0?null:D.globals.accumulated}],"+":[Yr,jo(Yr),function(D,R){for(var U=0,ee=0,ue=R;ee<ue.length;ee+=1){var xe=ue[ee];U+=xe.evaluate(D)}return U}],"*":[Yr,jo(Yr),function(D,R){for(var U=1,ee=0,ue=R;ee<ue.length;ee+=1){var xe=ue[ee];U*=xe.evaluate(D)}return U}],"-":{type:Yr,overloads:[[[Yr,Yr],function(D,R){var U=R[0],ee=R[1];return U.evaluate(D)-ee.evaluate(D)}],[[Yr],function(D,R){var U=R[0];return-U.evaluate(D)}]]},"/":[Yr,[Yr,Yr],function(D,R){var U=R[0],ee=R[1];return U.evaluate(D)/ee.evaluate(D)}],"%":[Yr,[Yr,Yr],function(D,R){var U=R[0],ee=R[1];return U.evaluate(D)%ee.evaluate(D)}],ln2:[Yr,[],function(){return Math.LN2}],pi:[Yr,[],function(){return Math.PI}],e:[Yr,[],function(){return Math.E}],"^":[Yr,[Yr,Yr],function(D,R){var U=R[0],ee=R[1];return Math.pow(U.evaluate(D),ee.evaluate(D))}],sqrt:[Yr,[Yr],function(D,R){var U=R[0];return Math.sqrt(U.evaluate(D))}],log10:[Yr,[Yr],function(D,R){var U=R[0];return Math.log(U.evaluate(D))/Math.LN10}],ln:[Yr,[Yr],function(D,R){var U=R[0];return Math.log(U.evaluate(D))}],log2:[Yr,[Yr],function(D,R){var U=R[0];return Math.log(U.evaluate(D))/Math.LN2}],sin:[Yr,[Yr],function(D,R){var U=R[0];return Math.sin(U.evaluate(D))}],cos:[Yr,[Yr],function(D,R){var U=R[0];return Math.cos(U.evaluate(D))}],tan:[Yr,[Yr],function(D,R){var U=R[0];return Math.tan(U.evaluate(D))}],asin:[Yr,[Yr],function(D,R){var U=R[0];return Math.asin(U.evaluate(D))}],acos:[Yr,[Yr],function(D,R){var U=R[0];return Math.acos(U.evaluate(D))}],atan:[Yr,[Yr],function(D,R){var U=R[0];return Math.atan(U.evaluate(D))}],min:[Yr,jo(Yr),function(D,R){return Math.min.apply(Math,R.map(function(U){return U.evaluate(D)}))}],max:[Yr,jo(Yr),function(D,R){return Math.max.apply(Math,R.map(function(U){return U.evaluate(D)}))}],abs:[Yr,[Yr],function(D,R){var U=R[0];return Math.abs(U.evaluate(D))}],round:[Yr,[Yr],function(D,R){var U=R[0],ee=U.evaluate(D);return ee<0?-Math.round(-ee):Math.round(ee)}],floor:[Yr,[Yr],function(D,R){var U=R[0];return Math.floor(U.evaluate(D))}],ceil:[Yr,[Yr],function(D,R){var U=R[0];return Math.ceil(U.evaluate(D))}],"filter-==":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1];return D.properties()[U.value]===ee.value}],"filter-id-==":[wn,[Pn],function(D,R){var U=R[0];return D.id()===U.value}],"filter-type-==":[wn,[dn],function(D,R){var U=R[0];return D.geometryType()===U.value}],"filter-<":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1],ue=D.properties()[U.value],xe=ee.value;return typeof ue==typeof xe&&ue<xe}],"filter-id-<":[wn,[Pn],function(D,R){var U=R[0],ee=D.id(),ue=U.value;return typeof ee==typeof ue&&ee<ue}],"filter->":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1],ue=D.properties()[U.value],xe=ee.value;return typeof ue==typeof xe&&ue>xe}],"filter-id->":[wn,[Pn],function(D,R){var U=R[0],ee=D.id(),ue=U.value;return typeof ee==typeof ue&&ee>ue}],"filter-<=":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1],ue=D.properties()[U.value],xe=ee.value;return typeof ue==typeof xe&&ue<=xe}],"filter-id-<=":[wn,[Pn],function(D,R){var U=R[0],ee=D.id(),ue=U.value;return typeof ee==typeof ue&&ee<=ue}],"filter->=":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1],ue=D.properties()[U.value],xe=ee.value;return typeof ue==typeof xe&&ue>=xe}],"filter-id->=":[wn,[Pn],function(D,R){var U=R[0],ee=D.id(),ue=U.value;return typeof ee==typeof ue&&ee>=ue}],"filter-has":[wn,[Pn],function(D,R){var U=R[0];return U.value in D.properties()}],"filter-has-id":[wn,[],function(D){return D.id()!==null&&D.id()!==void 0}],"filter-type-in":[wn,[ni(dn)],function(D,R){var U=R[0];return U.value.indexOf(D.geometryType())>=0}],"filter-id-in":[wn,[ni(Pn)],function(D,R){var U=R[0];return U.value.indexOf(D.id())>=0}],"filter-in-small":[wn,[dn,ni(Pn)],function(D,R){var U=R[0],ee=R[1];return ee.value.indexOf(D.properties()[U.value])>=0}],"filter-in-large":[wn,[dn,ni(Pn)],function(D,R){var U=R[0],ee=R[1];return Fu(D.properties()[U.value],ee.value,0,ee.value.length-1)}],all:{type:wn,overloads:[[[wn,wn],function(D,R){var U=R[0],ee=R[1];return U.evaluate(D)&&ee.evaluate(D)}],[jo(wn),function(D,R){for(var U=0,ee=R;U<ee.length;U+=1){var ue=ee[U];if(!ue.evaluate(D))return!1}return!0}]]},any:{type:wn,overloads:[[[wn,wn],function(D,R){var U=R[0],ee=R[1];return U.evaluate(D)||ee.evaluate(D)}],[jo(wn),function(D,R){for(var U=0,ee=R;U<ee.length;U+=1){var ue=ee[U];if(ue.evaluate(D))return!0}return!1}]]},"!":[wn,[wn],function(D,R){var U=R[0];return!U.evaluate(D)}],"is-supported-script":[wn,[dn],function(D,R){var U=R[0],ee=D.globals&&D.globals.isSupportedScript;return ee?ee(U.evaluate(D)):!0}],upcase:[dn,[dn],function(D,R){var U=R[0];return U.evaluate(D).toUpperCase()}],downcase:[dn,[dn],function(D,R){var U=R[0];return U.evaluate(D).toLowerCase()}],concat:[dn,jo(Pn),function(D,R){return R.map(function(U){return Rs(U.evaluate(D))}).join("")}],"resolved-locale":[dn,[$n],function(D,R){var U=R[0];return U.evaluate(D).resolvedLocale()}]});function Hs(D){return{result:"success",value:D}}function is(D){return{result:"error",value:D}}function Ko(D){return D["property-type"]==="data-driven"||D["property-type"]==="cross-faded-data-driven"}function sl(D){return!!D.expression&&D.expression.parameters.indexOf("zoom")>-1}function Gs(D){return!!D.expression&&D.expression.interpolated}function ti(D){return D instanceof Number?"number":D instanceof String?"string":D instanceof Boolean?"boolean":Array.isArray(D)?"array":D===null?"null":typeof D}function Ws(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)}function Nl(D){return D}function Ou(D,R){var U=R.type==="color",ee=D.stops&&typeof D.stops[0][0]=="object",ue=ee||D.property!==void 0,xe=ee||!ue,Ee=D.type||(Gs(R)?"exponential":"interval");if(U&&(D=En({},D),D.stops&&(D.stops=D.stops.map(function(Yn){return[Yn[0],Ga.parse(Yn[1])]})),D.default?D.default=Ga.parse(D.default):D.default=Ga.parse(R.default)),D.colorSpace&&D.colorSpace!=="rgb"&&!Ol[D.colorSpace])throw new Error("Unknown color space: "+D.colorSpace);var Ye,ot,mt;if(Ee==="exponential")Ye=su;else if(Ee==="interval")Ye=Ul;else if(Ee==="categorical"){Ye=ll,ot=Object.create(null);for(var At=0,Bt=D.stops;At<Bt.length;At+=1){var Jt=Bt[At];ot[Jt[0]]=Jt[1]}mt=typeof D.stops[0][0]}else if(Ee==="identity")Ye=ul;else throw new Error('Unknown function type "'+Ee+'"');if(ee){for(var Zt={},hr=[],Pr=0;Pr<D.stops.length;Pr++){var tn=D.stops[Pr],jr=tn[0].zoom;Zt[jr]===void 0&&(Zt[jr]={zoom:jr,type:D.type,property:D.property,default:D.default,stops:[]},hr.push(jr)),Zt[jr].stops.push([tn[0].value,tn[1]])}for(var mn=[],cn=0,yn=hr;cn<yn.length;cn+=1){var Ln=yn[cn];mn.push([Zt[Ln].zoom,Ou(Zt[Ln],R)])}var On={name:"linear"};return{kind:"composite",interpolationType:On,interpolationFactor:bi.interpolationFactor.bind(void 0,On),zoomStops:mn.map(function(Yn){return Yn[0]}),evaluate:function(va,oa){var ha=va.zoom;return su({stops:mn,base:D.base},R,ha).evaluate(ha,oa)}}}else if(xe){var jn=Ee==="exponential"?{name:"exponential",base:D.base!==void 0?D.base:1}:null;return{kind:"camera",interpolationType:jn,interpolationFactor:bi.interpolationFactor.bind(void 0,jn),zoomStops:D.stops.map(function(Yn){return Yn[0]}),evaluate:function(Yn){var va=Yn.zoom;return Ye(D,R,va,ot,mt)}}}else return{kind:"source",evaluate:function(va,oa){var ha=oa&&oa.properties?oa.properties[D.property]:void 0;return ha===void 0?Ys(D.default,R.default):Ye(D,R,ha,ot,mt)}}}function Ys(D,R,U){if(D!==void 0)return D;if(R!==void 0)return R;if(U!==void 0)return U}function ll(D,R,U,ee,ue){var xe=typeof U===ue?ee[U]:void 0;return Ys(xe,D.default,R.default)}function Ul(D,R,U){if(ti(U)!=="number")return Ys(D.default,R.default);var ee=D.stops.length;if(ee===1||U<=D.stops[0][0])return D.stops[0][1];if(U>=D.stops[ee-1][0])return D.stops[ee-1][1];var ue=_s(D.stops.map(function(xe){return xe[0]}),U);return D.stops[ue][1]}function su(D,R,U){var ee=D.base!==void 0?D.base:1;if(ti(U)!=="number")return Ys(D.default,R.default);var ue=D.stops.length;if(ue===1||U<=D.stops[0][0])return D.stops[0][1];if(U>=D.stops[ue-1][0])return D.stops[ue-1][1];var xe=_s(D.stops.map(function(Bt){return Bt[0]}),U),Ee=fl(U,ee,D.stops[xe][0],D.stops[xe+1][0]),Ye=D.stops[xe][1],ot=D.stops[xe+1][1],mt=Il[R.type]||Nl;if(D.colorSpace&&D.colorSpace!=="rgb"){var At=Ol[D.colorSpace];mt=function(Bt,Jt){return At.reverse(At.interpolate(At.forward(Bt),At.forward(Jt),Ee))}}return typeof Ye.evaluate=="function"?{evaluate:function(){for(var Jt=[],Zt=arguments.length;Zt--;)Jt[Zt]=arguments[Zt];var hr=Ye.evaluate.apply(void 0,Jt),Pr=ot.evaluate.apply(void 0,Jt);if(!(hr===void 0||Pr===void 0))return mt(hr,Pr,Ee)}}:mt(Ye,ot,Ee)}function ul(D,R,U){return R.type==="color"?U=Ga.parse(U):R.type==="formatted"?U=Ii.fromString(U.toString()):R.type==="resolvedImage"?U=$i.fromString(U.toString()):ti(U)!==R.type&&(R.type!=="enum"||!R.values[U])&&(U=void 0),Ys(U,D.default,R.default)}function fl(D,R,U,ee){var ue=ee-U,xe=D-U;return ue===0?0:R===1?xe/ue:(Math.pow(R,xe)-1)/(Math.pow(R,ue)-1)}var os=function(R,U){this.expression=R,this._warningHistory={},this._evaluator=new _o,this._defaultValue=U?Bu(U):null,this._enumValues=U&&U.type==="enum"?U.values:null};os.prototype.evaluateWithoutErrorHandling=function(R,U,ee,ue,xe,Ee){return this._evaluator.globals=R,this._evaluator.feature=U,this._evaluator.featureState=ee,this._evaluator.canonical=ue,this._evaluator.availableImages=xe||null,this._evaluator.formattedSection=Ee,this.expression.evaluate(this._evaluator)},os.prototype.evaluate=function(R,U,ee,ue,xe,Ee){this._evaluator.globals=R,this._evaluator.feature=U||null,this._evaluator.featureState=ee||null,this._evaluator.canonical=ue,this._evaluator.availableImages=xe||null,this._evaluator.formattedSection=Ee||null;try{var Ye=this.expression.evaluate(this._evaluator);if(Ye==null||typeof Ye=="number"&&Ye!==Ye)return this._defaultValue;if(this._enumValues&&!(Ye in this._enumValues))throw new Ci("Expected value to be one of "+Object.keys(this._enumValues).map(function(ot){return JSON.stringify(ot)}).join(", ")+", but found "+JSON.stringify(Ye)+" instead.");return Ye}catch(ot){return this._warningHistory[ot.message]||(this._warningHistory[ot.message]=!0,typeof console<"u"&&console.warn(ot.message)),this._defaultValue}};function cl(D){return Array.isArray(D)&&D.length>0&&typeof D[0]=="string"&&D[0]in Vs}function ss(D,R){var U=new Fo(Vs,[],R?xf(R):void 0),ee=U.parse(D,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return ee?Hs(new os(ee,R)):is(U.errors)}var Li=function(R,U){this.kind=R,this._styleExpression=U,this.isStateDependent=R!=="constant"&&!ps(U.expression)};Li.prototype.evaluateWithoutErrorHandling=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluateWithoutErrorHandling(R,U,ee,ue,xe,Ee)},Li.prototype.evaluate=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluate(R,U,ee,ue,xe,Ee)};var Oo=function(R,U,ee,ue){this.kind=R,this.zoomStops=ee,this._styleExpression=U,this.isStateDependent=R!=="camera"&&!ps(U.expression),this.interpolationType=ue};Oo.prototype.evaluateWithoutErrorHandling=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluateWithoutErrorHandling(R,U,ee,ue,xe,Ee)},Oo.prototype.evaluate=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluate(R,U,ee,ue,xe,Ee)},Oo.prototype.interpolationFactor=function(R,U,ee){return this.interpolationType?bi.interpolationFactor(this.interpolationType,R,U,ee):0};function lu(D,R){if(D=ss(D,R),D.result==="error")return D;var U=D.value.expression,ee=ks(U);if(!ee&&!Ko(R))return is([new br("","data expressions not supported")]);var ue=rl(U,["zoom"]);if(!ue&&!sl(R))return is([new br("","zoom expressions not supported")]);var xe=hl(U);if(!xe&&!ue)return is([new br("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(xe instanceof br)return is([xe]);if(xe instanceof bi&&!Gs(R))return is([new br("",'"interpolate" expressions cannot be used with this property')]);if(!xe)return Hs(ee?new Li("constant",D.value):new Li("source",D.value));var Ee=xe instanceof bi?xe.interpolation:void 0;return Hs(ee?new Oo("camera",D.value,xe.labels,Ee):new Oo("composite",D.value,xe.labels,Ee))}var bs=function(R,U){this._parameters=R,this._specification=U,En(this,Ou(this._parameters,this._specification))};bs.deserialize=function(R){return new bs(R._parameters,R._specification)},bs.serialize=function(R){return{_parameters:R._parameters,_specification:R._specification}};function Vl(D,R){if(Ws(D))return new bs(D,R);if(cl(D)){var U=lu(D,R);if(U.result==="error")throw new Error(U.value.map(function(ue){return ue.key+": "+ue.message}).join(", "));return U.value}else{var ee=D;return typeof D=="string"&&R.type==="color"&&(ee=Ga.parse(D)),{kind:"constant",evaluate:function(){return ee}}}}function hl(D){var R=null;if(D instanceof Yo)R=hl(D.result);else if(D instanceof Ao)for(var U=0,ee=D.args;U<ee.length;U+=1){var ue=ee[U];if(R=hl(ue),R)break}else(D instanceof wo||D instanceof bi)&&D.input instanceof ki&&D.input.name==="zoom"&&(R=D);return R instanceof br||D.eachChild(function(xe){var Ee=hl(xe);Ee instanceof br?R=Ee:!R&&Ee?R=new br("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):R&&Ee&&R!==Ee&&(R=new br("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),R}function xf(D){var R={color:Tn,string:dn,number:Yr,enum:dn,boolean:wn,formatted:la,resolvedImage:ba};return D.type==="array"?ni(R[D.value]||Pn,D.length):R[D.type]}function Bu(D){return D.type==="color"&&Ws(D.default)?new Ga(0,0,0,0):D.type==="color"?Ga.parse(D.default)||null:D.default===void 0?null:D.default}function ji(D){var R=D.key,U=D.value,ee=D.valueSpec||{},ue=D.objectElementValidators||{},xe=D.style,Ee=D.styleSpec,Ye=[],ot=ti(U);if(ot!=="object")return[new Dr(R,U,"object expected, "+ot+" found")];for(var mt in U){var At=mt.split(".")[0],Bt=ee[At]||ee["*"],Jt=void 0;if(ue[At])Jt=ue[At];else if(ee[At])Jt=Er;else if(ue["*"])Jt=ue["*"];else if(ee["*"])Jt=Er;else{Ye.push(new Dr(R,U[mt],'unknown property "'+mt+'"'));continue}Ye=Ye.concat(Jt({key:(R&&R+".")+mt,value:U[mt],valueSpec:Bt,style:xe,styleSpec:Ee,object:U,objectKey:mt},U))}for(var Zt in ee)ue[Zt]||ee[Zt].required&&ee[Zt].default===void 0&&U[Zt]===void 0&&Ye.push(new Dr(R,U,'missing required property "'+Zt+'"'));return Ye}function vl(D){var R=D.value,U=D.valueSpec,ee=D.style,ue=D.styleSpec,xe=D.key,Ee=D.arrayElementValidator||Er;if(ti(R)!=="array")return[new Dr(xe,R,"array expected, "+ti(R)+" found")];if(U.length&&R.length!==U.length)return[new Dr(xe,R,"array length "+U.length+" expected, length "+R.length+" found")];if(U["min-length"]&&R.length<U["min-length"])return[new Dr(xe,R,"array length at least "+U["min-length"]+" expected, length "+R.length+" found")];var Ye={type:U.value,values:U.values};ue.$version<7&&(Ye.function=U.function),ti(U.value)==="object"&&(Ye=U.value);for(var ot=[],mt=0;mt<R.length;mt++)ot=ot.concat(Ee({array:R,arrayIndex:mt,value:R[mt],valueSpec:Ye,style:ee,styleSpec:ue,key:xe+"["+mt+"]"}));return ot}function Xs(D){var R=D.key,U=D.value,ee=D.valueSpec,ue=ti(U);return ue==="number"&&U!==U&&(ue="NaN"),ue!=="number"?[new Dr(R,U,"number expected, "+ue+" found")]:"minimum"in ee&&U<ee.minimum?[new Dr(R,U,U+" is less than the minimum value "+ee.minimum)]:"maximum"in ee&&U>ee.maximum?[new Dr(R,U,U+" is greater than the maximum value "+ee.maximum)]:[]}function Nu(D){var R=D.valueSpec,U=an(D.value.type),ee,ue={},xe,Ee,Ye=U!=="categorical"&&D.value.property===void 0,ot=!Ye,mt=ti(D.value.stops)==="array"&&ti(D.value.stops[0])==="array"&&ti(D.value.stops[0][0])==="object",At=ji({key:D.key,value:D.value,valueSpec:D.styleSpec.function,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{stops:Bt,default:hr}});return U==="identity"&&Ye&&At.push(new Dr(D.key,D.value,'missing required property "property"')),U!=="identity"&&!D.value.stops&&At.push(new Dr(D.key,D.value,'missing required property "stops"')),U==="exponential"&&D.valueSpec.expression&&!Gs(D.valueSpec)&&At.push(new Dr(D.key,D.value,"exponential functions not supported")),D.styleSpec.$version>=8&&(ot&&!Ko(D.valueSpec)?At.push(new Dr(D.key,D.value,"property functions not supported")):Ye&&!sl(D.valueSpec)&&At.push(new Dr(D.key,D.value,"zoom functions not supported"))),(U==="categorical"||mt)&&D.value.property===void 0&&At.push(new Dr(D.key,D.value,'"property" property is required')),At;function Bt(Pr){if(U==="identity")return[new Dr(Pr.key,Pr.value,'identity function may not have a "stops" property')];var tn=[],jr=Pr.value;return tn=tn.concat(vl({key:Pr.key,value:jr,valueSpec:Pr.valueSpec,style:Pr.style,styleSpec:Pr.styleSpec,arrayElementValidator:Jt})),ti(jr)==="array"&&jr.length===0&&tn.push(new Dr(Pr.key,jr,"array must have at least one stop")),tn}function Jt(Pr){var tn=[],jr=Pr.value,mn=Pr.key;if(ti(jr)!=="array")return[new Dr(mn,jr,"array expected, "+ti(jr)+" found")];if(jr.length!==2)return[new Dr(mn,jr,"array length 2 expected, length "+jr.length+" found")];if(mt){if(ti(jr[0])!=="object")return[new Dr(mn,jr,"object expected, "+ti(jr[0])+" found")];if(jr[0].zoom===void 0)return[new Dr(mn,jr,"object stop key must have zoom")];if(jr[0].value===void 0)return[new Dr(mn,jr,"object stop key must have value")];if(Ee&&Ee>an(jr[0].zoom))return[new Dr(mn,jr[0].zoom,"stop zoom values must appear in ascending order")];an(jr[0].zoom)!==Ee&&(Ee=an(jr[0].zoom),xe=void 0,ue={}),tn=tn.concat(ji({key:mn+"[0]",value:jr[0],valueSpec:{zoom:{}},style:Pr.style,styleSpec:Pr.styleSpec,objectElementValidators:{zoom:Xs,value:Zt}}))}else tn=tn.concat(Zt({key:mn+"[0]",value:jr[0],valueSpec:{},style:Pr.style,styleSpec:Pr.styleSpec},jr));return cl(en(jr[1]))?tn.concat([new Dr(mn+"[1]",jr[1],"expressions are not allowed in function stops.")]):tn.concat(Er({key:mn+"[1]",value:jr[1],valueSpec:R,style:Pr.style,styleSpec:Pr.styleSpec}))}function Zt(Pr,tn){var jr=ti(Pr.value),mn=an(Pr.value),cn=Pr.value!==null?Pr.value:tn;if(!ee)ee=jr;else if(jr!==ee)return[new Dr(Pr.key,cn,jr+" stop domain type must match previous stop domain type "+ee)];if(jr!=="number"&&jr!=="string"&&jr!=="boolean")return[new Dr(Pr.key,cn,"stop domain value must be a number, string, or boolean")];if(jr!=="number"&&U!=="categorical"){var yn="number expected, "+jr+" found";return Ko(R)&&U===void 0&&(yn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Dr(Pr.key,cn,yn)]}return U==="categorical"&&jr==="number"&&(!isFinite(mn)||Math.floor(mn)!==mn)?[new Dr(Pr.key,cn,"integer expected, found "+mn)]:U!=="categorical"&&jr==="number"&&xe!==void 0&&mn<xe?[new Dr(Pr.key,cn,"stop domain values must appear in ascending order")]:(xe=mn,U==="categorical"&&mn in ue?[new Dr(Pr.key,cn,"stop domain values must be unique")]:(ue[mn]=!0,[]))}function hr(Pr){return Er({key:Pr.key,value:Pr.value,valueSpec:R,style:Pr.style,styleSpec:Pr.styleSpec})}}function ls(D){var R=(D.expressionContext==="property"?lu:ss)(en(D.value),D.valueSpec);if(R.result==="error")return R.value.map(function(ee){return new Dr(""+D.key+ee.key,D.value,ee.message)});var U=R.value.expression||R.value._styleExpression.expression;if(D.expressionContext==="property"&&D.propertyKey==="text-font"&&!U.outputDefined())return[new Dr(D.key,D.value,'Invalid data expression for "'+D.propertyKey+'". Output values must be contained as literals within the expression.')];if(D.expressionContext==="property"&&D.propertyType==="layout"&&!ps(U))return[new Dr(D.key,D.value,'"feature-state" data expressions are not supported with layout properties.')];if(D.expressionContext==="filter"&&!ps(U))return[new Dr(D.key,D.value,'"feature-state" data expressions are not supported with filters.')];if(D.expressionContext&&D.expressionContext.indexOf("cluster")===0){if(!rl(U,["zoom","feature-state"]))return[new Dr(D.key,D.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(D.expressionContext==="cluster-initial"&&!ks(U))return[new Dr(D.key,D.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function bf(D){var R=D.value,U=D.key,ee=ti(R);return ee!=="boolean"?[new Dr(U,R,"boolean expected, "+ee+" found")]:[]}function oo(D){var R=D.key,U=D.value,ee=ti(U);return ee!=="string"?[new Dr(R,U,"color expected, "+ee+" found")]:bu(U)===null?[new Dr(R,U,'color expected, "'+U+'" found')]:[]}function dl(D){var R=D.key,U=D.value,ee=D.valueSpec,ue=[];return Array.isArray(ee.values)?ee.values.indexOf(an(U))===-1&&ue.push(new Dr(R,U,"expected one of ["+ee.values.join(", ")+"], "+JSON.stringify(U)+" found")):Object.keys(ee.values).indexOf(an(U))===-1&&ue.push(new Dr(R,U,"expected one of ["+Object.keys(ee.values).join(", ")+"], "+JSON.stringify(U)+" found")),ue}function Hl(D){if(D===!0||D===!1)return!0;if(!Array.isArray(D)||D.length===0)return!1;switch(D[0]){case"has":return D.length>=2&&D[1]!=="$id"&&D[1]!=="$type";case"in":return D.length>=3&&(typeof D[1]!="string"||Array.isArray(D[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return D.length!==3||Array.isArray(D[1])||Array.isArray(D[2]);case"any":case"all":for(var R=0,U=D.slice(1);R<U.length;R+=1){var ee=U[R];if(!Hl(ee)&&typeof ee!="boolean")return!1}return!0;default:return!0}}var Jo={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function us(D){if(D==null)return{filter:function(){return!0},needGeometry:!1};Hl(D)||(D=yl(D));var R=ss(D,Jo);if(R.result==="error")throw new Error(R.value.map(function(ee){return ee.key+": "+ee.message}).join(", "));var U=pl(D);return{filter:function(ee,ue,xe){return R.value.evaluate(ee,ue,{},xe)},needGeometry:U}}function uu(D,R){return D<R?-1:D>R?1:0}function pl(D){if(!Array.isArray(D))return!1;if(D[0]==="within")return!0;for(var R=1;R<D.length;R++)if(pl(D[R]))return!0;return!1}function yl(D){if(!D)return!0;var R=D[0];if(D.length<=1)return R!=="any";var U=R==="=="?Gl(D[1],D[2],"=="):R==="!="?ws(Gl(D[1],D[2],"==")):R==="<"||R===">"||R==="<="||R===">="?Gl(D[1],D[2],R):R==="any"?Uu(D.slice(1)):R==="all"?["all"].concat(D.slice(1).map(yl)):R==="none"?["all"].concat(D.slice(1).map(yl).map(ws)):R==="in"?ml(D[1],D.slice(2)):R==="!in"?ws(ml(D[1],D.slice(2))):R==="has"?fu(D[1]):R==="!has"?ws(fu(D[1])):R==="within"?D:!0;return U}function Gl(D,R,U){switch(D){case"$type":return["filter-type-"+U,R];case"$id":return["filter-id-"+U,R];default:return["filter-"+U,D,R]}}function Uu(D){return["any"].concat(D.map(yl))}function ml(D,R){if(R.length===0)return!1;switch(D){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(function(U){return typeof U!=typeof R[0]})?["filter-in-large",D,["literal",R.sort(uu)]]:["filter-in-small",D,["literal",R]]}}function fu(D){switch(D){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",D]}}function ws(D){return["!",D]}function cu(D){return Hl(en(D.value))?ls(En({},D,{expressionContext:"filter",valueSpec:{value:"boolean"}})):xl(D)}function xl(D){var R=D.value,U=D.key;if(ti(R)!=="array")return[new Dr(U,R,"array expected, "+ti(R)+" found")];var ee=D.styleSpec,ue,xe=[];if(R.length<1)return[new Dr(U,R,"filter array must have at least 1 element")];switch(xe=xe.concat(dl({key:U+"[0]",value:R[0],valueSpec:ee.filter_operator,style:D.style,styleSpec:D.styleSpec})),an(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&an(R[1])==="$type"&&xe.push(new Dr(U,R,'"$type" cannot be use with operator "'+R[0]+'"'));case"==":case"!=":R.length!==3&&xe.push(new Dr(U,R,'filter array for operator "'+R[0]+'" must have 3 elements'));case"in":case"!in":R.length>=2&&(ue=ti(R[1]),ue!=="string"&&xe.push(new Dr(U+"[1]",R[1],"string expected, "+ue+" found")));for(var Ee=2;Ee<R.length;Ee++)ue=ti(R[Ee]),an(R[1])==="$type"?xe=xe.concat(dl({key:U+"["+Ee+"]",value:R[Ee],valueSpec:ee.geometry_type,style:D.style,styleSpec:D.styleSpec})):ue!=="string"&&ue!=="number"&&ue!=="boolean"&&xe.push(new Dr(U+"["+Ee+"]",R[Ee],"string, number, or boolean expected, "+ue+" found"));break;case"any":case"all":case"none":for(var Ye=1;Ye<R.length;Ye++)xe=xe.concat(xl({key:U+"["+Ye+"]",value:R[Ye],style:D.style,styleSpec:D.styleSpec}));break;case"has":case"!has":ue=ti(R[1]),R.length!==2?xe.push(new Dr(U,R,'filter array for "'+R[0]+'" operator must have 2 elements')):ue!=="string"&&xe.push(new Dr(U+"[1]",R[1],"string expected, "+ue+" found"));break;case"within":ue=ti(R[1]),R.length!==2?xe.push(new Dr(U,R,'filter array for "'+R[0]+'" operator must have 2 elements')):ue!=="object"&&xe.push(new Dr(U+"[1]",R[1],"object expected, "+ue+" found"));break}return xe}function Vu(D,R){var U=D.key,ee=D.style,ue=D.styleSpec,xe=D.value,Ee=D.objectKey,Ye=ue[R+"_"+D.layerType];if(!Ye)return[];var ot=Ee.match(/^(.*)-transition$/);if(R==="paint"&&ot&&Ye[ot[1]]&&Ye[ot[1]].transition)return Er({key:U,value:xe,valueSpec:ue.transition,style:ee,styleSpec:ue});var mt=D.valueSpec||Ye[Ee];if(!mt)return[new Dr(U,xe,'unknown property "'+Ee+'"')];var At;if(ti(xe)==="string"&&Ko(mt)&&!mt.tokens&&(At=/^{([^}]+)}$/.exec(xe)))return[new Dr(U,xe,'"'+Ee+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(At[1])+" }`.")];var Bt=[];return D.layerType==="symbol"&&(Ee==="text-field"&&ee&&!ee.glyphs&&Bt.push(new Dr(U,xe,'use of "text-field" requires a style "glyphs" property')),Ee==="text-font"&&Ws(en(xe))&&an(xe.type)==="identity"&&Bt.push(new Dr(U,xe,'"text-font" does not support identity functions'))),Bt.concat(Er({key:D.key,value:xe,valueSpec:mt,style:ee,styleSpec:ue,expressionContext:"property",propertyType:R,propertyKey:Ee}))}function We(D){return Vu(D,"paint")}function $e(D){return Vu(D,"layout")}function ft(D){var R=[],U=D.value,ee=D.key,ue=D.style,xe=D.styleSpec;!U.type&&!U.ref&&R.push(new Dr(ee,U,'either "type" or "ref" is required'));var Ee=an(U.type),Ye=an(U.ref);if(U.id)for(var ot=an(U.id),mt=0;mt<D.arrayIndex;mt++){var At=ue.layers[mt];an(At.id)===ot&&R.push(new Dr(ee,U.id,'duplicate layer id "'+U.id+'", previously used at line '+At.id.__line__))}if("ref"in U){["type","source","source-layer","filter","layout"].forEach(function(hr){hr in U&&R.push(new Dr(ee,U[hr],'"'+hr+'" is prohibited for ref layers'))});var Bt;ue.layers.forEach(function(hr){an(hr.id)===Ye&&(Bt=hr)}),Bt?Bt.ref?R.push(new Dr(ee,U.ref,"ref cannot reference another ref layer")):Ee=an(Bt.type):R.push(new Dr(ee,U.ref,'ref layer "'+Ye+'" not found'))}else if(Ee!=="background")if(!U.source)R.push(new Dr(ee,U,'missing required property "source"'));else{var Jt=ue.sources&&ue.sources[U.source],Zt=Jt&&an(Jt.type);Jt?Zt==="vector"&&Ee==="raster"?R.push(new Dr(ee,U.source,'layer "'+U.id+'" requires a raster source')):Zt==="raster"&&Ee!=="raster"?R.push(new Dr(ee,U.source,'layer "'+U.id+'" requires a vector source')):Zt==="vector"&&!U["source-layer"]?R.push(new Dr(ee,U,'layer "'+U.id+'" must specify a "source-layer"')):Zt==="raster-dem"&&Ee!=="hillshade"?R.push(new Dr(ee,U.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ee==="line"&&U.paint&&U.paint["line-gradient"]&&(Zt!=="geojson"||!Jt.lineMetrics)&&R.push(new Dr(ee,U,'layer "'+U.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):R.push(new Dr(ee,U.source,'source "'+U.source+'" not found'))}return R=R.concat(ji({key:ee,value:U,valueSpec:xe.layer,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Er({key:ee+".type",value:U.type,valueSpec:xe.layer.type,style:D.style,styleSpec:D.styleSpec,object:U,objectKey:"type"})},filter:cu,layout:function(Pr){return ji({layer:U,key:Pr.key,value:Pr.value,style:Pr.style,styleSpec:Pr.styleSpec,objectElementValidators:{"*":function(jr){return $e(En({layerType:Ee},jr))}}})},paint:function(Pr){return ji({layer:U,key:Pr.key,value:Pr.value,style:Pr.style,styleSpec:Pr.styleSpec,objectElementValidators:{"*":function(jr){return We(En({layerType:Ee},jr))}}})}}})),R}function pt(D){var R=D.value,U=D.key,ee=ti(R);return ee!=="string"?[new Dr(U,R,"string expected, "+ee+" found")]:[]}var Pt={promoteId:kt};function St(D){var R=D.value,U=D.key,ee=D.styleSpec,ue=D.style;if(!R.type)return[new Dr(U,R,'"type" is required')];var xe=an(R.type),Ee;switch(xe){case"vector":case"raster":case"raster-dem":return Ee=ji({key:U,value:R,valueSpec:ee["source_"+xe.replace("-","_")],style:D.style,styleSpec:ee,objectElementValidators:Pt}),Ee;case"geojson":if(Ee=ji({key:U,value:R,valueSpec:ee.source_geojson,style:ue,styleSpec:ee,objectElementValidators:Pt}),R.cluster)for(var Ye in R.clusterProperties){var ot=R.clusterProperties[Ye],mt=ot[0],At=ot[1],Bt=typeof mt=="string"?[mt,["accumulated"],["get",Ye]]:mt;Ee.push.apply(Ee,ls({key:U+"."+Ye+".map",value:At,expressionContext:"cluster-map"})),Ee.push.apply(Ee,ls({key:U+"."+Ye+".reduce",value:Bt,expressionContext:"cluster-reduce"}))}return Ee;case"video":return ji({key:U,value:R,valueSpec:ee.source_video,style:ue,styleSpec:ee});case"image":return ji({key:U,value:R,valueSpec:ee.source_image,style:ue,styleSpec:ee});case"canvas":return[new Dr(U,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return dl({key:U+".type",value:R.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ue,styleSpec:ee})}}function kt(D){var R=D.key,U=D.value;if(ti(U)==="string")return pt({key:R,value:U});var ee=[];for(var ue in U)ee.push.apply(ee,pt({key:R+"."+ue,value:U[ue]}));return ee}function ur(D){var R=D.value,U=D.styleSpec,ee=U.light,ue=D.style,xe=[],Ee=ti(R);if(R===void 0)return xe;if(Ee!=="object")return xe=xe.concat([new Dr("light",R,"object expected, "+Ee+" found")]),xe;for(var Ye in R){var ot=Ye.match(/^(.*)-transition$/);ot&&ee[ot[1]]&&ee[ot[1]].transition?xe=xe.concat(Er({key:Ye,value:R[Ye],valueSpec:U.transition,style:ue,styleSpec:U})):ee[Ye]?xe=xe.concat(Er({key:Ye,value:R[Ye],valueSpec:ee[Ye],style:ue,styleSpec:U})):xe=xe.concat([new Dr(Ye,R[Ye],'unknown property "'+Ye+'"')])}return xe}function dr(D){return pt(D).length===0?[]:ls(D)}function $t(D){return pt(D).length===0?[]:ls(D)}var mr={"*":function(){return[]},array:vl,boolean:bf,number:Xs,color:oo,constants:vn,enum:dl,filter:cu,function:Nu,layer:ft,object:ji,source:St,light:ur,string:pt,formatted:dr,resolvedImage:$t};function Er(D){var R=D.value,U=D.valueSpec,ee=D.styleSpec;if(U.expression&&Ws(an(R)))return Nu(D);if(U.expression&&cl(en(R)))return ls(D);if(U.type&&mr[U.type])return mr[U.type](D);var ue=ji(En({},D,{valueSpec:U.type?ee[U.type]:U}));return ue}function Ir(D){var R=D.value,U=D.key,ee=pt(D);return ee.length||(R.indexOf("{fontstack}")===-1&&ee.push(new Dr(U,R,'"glyphs" url must include a "{fontstack}" token')),R.indexOf("{range}")===-1&&ee.push(new Dr(U,R,'"glyphs" url must include a "{range}" token'))),ee}function Kr(D,R){R===void 0&&(R=yr);var U=[];return U=U.concat(Er({key:"",value:D,valueSpec:R.$root,styleSpec:R,style:D,objectElementValidators:{glyphs:Ir,"*":function(){return[]}}})),D.constants&&(U=U.concat(vn({key:"constants",value:D.constants,style:D,styleSpec:R}))),hn(U)}Kr.source=An(St),Kr.light=An(ur),Kr.layer=An(ft),Kr.filter=An(cu),Kr.paintProperty=An(We),Kr.layoutProperty=An($e);function hn(D){return[].concat(D).sort(function(R,U){return R.line-U.line})}function An(D){return function(){for(var R=[],U=arguments.length;U--;)R[U]=arguments[U];return hn(D.apply(this,R))}}var Sn=Kr,Un=Sn.light,wa=Sn.paintProperty,Ta=Sn.layoutProperty;function Aa(D,R){var U=!1;if(R&&R.length)for(var ee=0,ue=R;ee<ue.length;ee+=1){var xe=ue[ee];D.fire(new Dt(new Error(xe.message))),U=!0}return U}var Ca=ri,Oa=3;function ri(D,R,U){var ee=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;var ue=new Int32Array(this.arrayBuffer);D=ue[0],R=ue[1],U=ue[2],this.d=R+2*U;for(var xe=0;xe<this.d*this.d;xe++){var Ee=ue[Oa+xe],Ye=ue[Oa+xe+1];ee.push(Ee===Ye?null:ue.subarray(Ee,Ye))}var ot=ue[Oa+ee.length],mt=ue[Oa+ee.length+1];this.keys=ue.subarray(ot,mt),this.bboxes=ue.subarray(mt),this.insert=this._insertReadonly}else{this.d=R+2*U;for(var At=0;At<this.d*this.d;At++)ee.push([]);this.keys=[],this.bboxes=[]}this.n=R,this.extent=D,this.padding=U,this.scale=R/D,this.uid=0;var Bt=U/R*D;this.min=-Bt,this.max=D+Bt}ri.prototype.insert=function(D,R,U,ee,ue){this._forEachCell(R,U,ee,ue,this._insertCell,this.uid++),this.keys.push(D),this.bboxes.push(R),this.bboxes.push(U),this.bboxes.push(ee),this.bboxes.push(ue)},ri.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ri.prototype._insertCell=function(D,R,U,ee,ue,xe){this.cells[ue].push(xe)},ri.prototype.query=function(D,R,U,ee,ue){var xe=this.min,Ee=this.max;if(D<=xe&&R<=xe&&Ee<=U&&Ee<=ee&&!ue)return Array.prototype.slice.call(this.keys);var Ye=[],ot={};return this._forEachCell(D,R,U,ee,this._queryCell,Ye,ot,ue),Ye},ri.prototype._queryCell=function(D,R,U,ee,ue,xe,Ee,Ye){var ot=this.cells[ue];if(ot!==null)for(var mt=this.keys,At=this.bboxes,Bt=0;Bt<ot.length;Bt++){var Jt=ot[Bt];if(Ee[Jt]===void 0){var Zt=Jt*4;(Ye?Ye(At[Zt+0],At[Zt+1],At[Zt+2],At[Zt+3]):D<=At[Zt+2]&&R<=At[Zt+3]&&U>=At[Zt+0]&&ee>=At[Zt+1])?(Ee[Jt]=!0,xe.push(mt[Jt])):Ee[Jt]=!1}}},ri.prototype._forEachCell=function(D,R,U,ee,ue,xe,Ee,Ye){for(var ot=this._convertToCellCoord(D),mt=this._convertToCellCoord(R),At=this._convertToCellCoord(U),Bt=this._convertToCellCoord(ee),Jt=ot;Jt<=At;Jt++)for(var Zt=mt;Zt<=Bt;Zt++){var hr=this.d*Zt+Jt;if(!(Ye&&!Ye(this._convertFromCellCoord(Jt),this._convertFromCellCoord(Zt),this._convertFromCellCoord(Jt+1),this._convertFromCellCoord(Zt+1)))&&ue.call(this,D,R,U,ee,hr,xe,Ee,Ye))return}},ri.prototype._convertFromCellCoord=function(D){return(D-this.padding)/this.scale},ri.prototype._convertToCellCoord=function(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))},ri.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var D=this.cells,R=Oa+this.cells.length+1+1,U=0,ee=0;ee<this.cells.length;ee++)U+=this.cells[ee].length;var ue=new Int32Array(R+U+this.keys.length+this.bboxes.length);ue[0]=this.extent,ue[1]=this.n,ue[2]=this.padding;for(var xe=R,Ee=0;Ee<D.length;Ee++){var Ye=D[Ee];ue[Oa+Ee]=xe,ue.set(Ye,xe),xe+=Ye.length}return ue[Oa+D.length]=xe,ue.set(this.keys,xe),xe+=this.keys.length,ue[Oa+D.length+1]=xe,ue.set(this.bboxes,xe),xe+=this.bboxes.length,ue.buffer};var wi=s.ImageData,se=s.ImageBitmap,Me={};function De(D,R,U){U===void 0&&(U={}),Object.defineProperty(R,"_classRegistryKey",{value:D,writeable:!1}),Me[D]={klass:R,omit:U.omit||[],shallow:U.shallow||[]}}De("Object",Object),Ca.serialize=function(R,U){var ee=R.toArrayBuffer();return U&&U.push(ee),{buffer:ee}},Ca.deserialize=function(R){return new Ca(R.buffer)},De("Grid",Ca),De("Color",Ga),De("Error",Error),De("ResolvedImage",$i),De("StylePropertyFunction",bs),De("StyleExpression",os,{omit:["_evaluator"]}),De("ZoomDependentExpression",Oo),De("ZoomConstantExpression",Li),De("CompoundExpression",ki,{omit:["_evaluate"]});for(var Xe in Vs)Vs[Xe]._classRegistryKey||De("Expression_"+Xe,Vs[Xe]);function Qe(D){return D&&typeof ArrayBuffer<"u"&&(D instanceof ArrayBuffer||D.constructor&&D.constructor.name==="ArrayBuffer")}function rt(D){return se&&D instanceof se}function Tt(D,R){if(D==null||typeof D=="boolean"||typeof D=="number"||typeof D=="string"||D instanceof Boolean||D instanceof Number||D instanceof String||D instanceof Date||D instanceof RegExp)return D;if(Qe(D)||rt(D))return R&&R.push(D),D;if(ArrayBuffer.isView(D)){var U=D;return R&&R.push(U.buffer),U}if(D instanceof wi)return R&&R.push(D.data.buffer),D;if(Array.isArray(D)){for(var ee=[],ue=0,xe=D;ue<xe.length;ue+=1){var Ee=xe[ue];ee.push(Tt(Ee,R))}return ee}if(typeof D=="object"){var Ye=D.constructor,ot=Ye._classRegistryKey;if(!ot)throw new Error("can't serialize object of unregistered class");var mt=Ye.serialize?Ye.serialize(D,R):{};if(!Ye.serialize){for(var At in D)if(D.hasOwnProperty(At)&&!(Me[ot].omit.indexOf(At)>=0)){var Bt=D[At];mt[At]=Me[ot].shallow.indexOf(At)>=0?Bt:Tt(Bt,R)}D instanceof Error&&(mt.message=D.message)}if(mt.$name)throw new Error("$name property is reserved for worker serialization logic.");return ot!=="Object"&&(mt.$name=ot),mt}throw new Error("can't serialize object of type "+typeof D)}function yt(D){if(D==null||typeof D=="boolean"||typeof D=="number"||typeof D=="string"||D instanceof Boolean||D instanceof Number||D instanceof String||D instanceof Date||D instanceof RegExp||Qe(D)||rt(D)||ArrayBuffer.isView(D)||D instanceof wi)return D;if(Array.isArray(D))return D.map(yt);if(typeof D=="object"){var R=D.$name||"Object",U=Me[R],ee=U.klass;if(!ee)throw new Error("can't deserialize unregistered class "+R);if(ee.deserialize)return ee.deserialize(D);for(var ue=Object.create(ee.prototype),xe=0,Ee=Object.keys(D);xe<Ee.length;xe+=1){var Ye=Ee[xe];if(Ye!=="$name"){var ot=D[Ye];ue[Ye]=Me[R].shallow.indexOf(Ye)>=0?ot:yt(ot)}}return ue}throw new Error("can't deserialize object of type "+typeof D)}var Ft=function(){this.first=!0};Ft.prototype.update=function(R,U){var ee=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=ee,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=ee,!0):(this.lastFloorZoom>ee?(this.lastIntegerZoom=ee+1,this.lastIntegerZoomTime=U):this.lastFloorZoom<ee&&(this.lastIntegerZoom=ee,this.lastIntegerZoomTime=U),R!==this.lastZoom?(this.lastZoom=R,this.lastFloorZoom=ee,!0):!1)};var Ot={"Latin-1 Supplement":function(D){return D>=128&&D<=255},Arabic:function(D){return D>=1536&&D<=1791},"Arabic Supplement":function(D){return D>=1872&&D<=1919},"Arabic Extended-A":function(D){return D>=2208&&D<=2303},"Hangul Jamo":function(D){return D>=4352&&D<=4607},"Unified Canadian Aboriginal Syllabics":function(D){return D>=5120&&D<=5759},Khmer:function(D){return D>=6016&&D<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(D){return D>=6320&&D<=6399},"General Punctuation":function(D){return D>=8192&&D<=8303},"Letterlike Symbols":function(D){return D>=8448&&D<=8527},"Number Forms":function(D){return D>=8528&&D<=8591},"Miscellaneous Technical":function(D){return D>=8960&&D<=9215},"Control Pictures":function(D){return D>=9216&&D<=9279},"Optical Character Recognition":function(D){return D>=9280&&D<=9311},"Enclosed Alphanumerics":function(D){return D>=9312&&D<=9471},"Geometric Shapes":function(D){return D>=9632&&D<=9727},"Miscellaneous Symbols":function(D){return D>=9728&&D<=9983},"Miscellaneous Symbols and Arrows":function(D){return D>=11008&&D<=11263},"CJK Radicals Supplement":function(D){return D>=11904&&D<=12031},"Kangxi Radicals":function(D){return D>=12032&&D<=12255},"Ideographic Description Characters":function(D){return D>=12272&&D<=12287},"CJK Symbols and Punctuation":function(D){return D>=12288&&D<=12351},Hiragana:function(D){return D>=12352&&D<=12447},Katakana:function(D){return D>=12448&&D<=12543},Bopomofo:function(D){return D>=12544&&D<=12591},"Hangul Compatibility Jamo":function(D){return D>=12592&&D<=12687},Kanbun:function(D){return D>=12688&&D<=12703},"Bopomofo Extended":function(D){return D>=12704&&D<=12735},"CJK Strokes":function(D){return D>=12736&&D<=12783},"Katakana Phonetic Extensions":function(D){return D>=12784&&D<=12799},"Enclosed CJK Letters and Months":function(D){return D>=12800&&D<=13055},"CJK Compatibility":function(D){return D>=13056&&D<=13311},"CJK Unified Ideographs Extension A":function(D){return D>=13312&&D<=19903},"Yijing Hexagram Symbols":function(D){return D>=19904&&D<=19967},"CJK Unified Ideographs":function(D){return D>=19968&&D<=40959},"Yi Syllables":function(D){return D>=40960&&D<=42127},"Yi Radicals":function(D){return D>=42128&&D<=42191},"Hangul Jamo Extended-A":function(D){return D>=43360&&D<=43391},"Hangul Syllables":function(D){return D>=44032&&D<=55215},"Hangul Jamo Extended-B":function(D){return D>=55216&&D<=55295},"Private Use Area":function(D){return D>=57344&&D<=63743},"CJK Compatibility Ideographs":function(D){return D>=63744&&D<=64255},"Arabic Presentation Forms-A":function(D){return D>=64336&&D<=65023},"Vertical Forms":function(D){return D>=65040&&D<=65055},"CJK Compatibility Forms":function(D){return D>=65072&&D<=65103},"Small Form Variants":function(D){return D>=65104&&D<=65135},"Arabic Presentation Forms-B":function(D){return D>=65136&&D<=65279},"Halfwidth and Fullwidth Forms":function(D){return D>=65280&&D<=65519}};function jt(D){for(var R=0,U=D;R<U.length;R+=1){var ee=U[R];if(qr(ee.charCodeAt(0)))return!0}return!1}function wr(D){for(var R=0,U=D;R<U.length;R+=1){var ee=U[R];if(!Tr(ee.charCodeAt(0)))return!1}return!0}function Tr(D){return!(Ot.Arabic(D)||Ot["Arabic Supplement"](D)||Ot["Arabic Extended-A"](D)||Ot["Arabic Presentation Forms-A"](D)||Ot["Arabic Presentation Forms-B"](D))}function Wr(D){return D<11904?!1:!!(Ot["Bopomofo Extended"](D)||Ot.Bopomofo(D)||Ot["CJK Compatibility Forms"](D)||Ot["CJK Compatibility Ideographs"](D)||Ot["CJK Compatibility"](D)||Ot["CJK Radicals Supplement"](D)||Ot["CJK Strokes"](D)||Ot["CJK Symbols and Punctuation"](D)||Ot["CJK Unified Ideographs Extension A"](D)||Ot["CJK Unified Ideographs"](D)||Ot["Enclosed CJK Letters and Months"](D)||Ot["Halfwidth and Fullwidth Forms"](D)||Ot.Hiragana(D)||Ot["Ideographic Description Characters"](D)||Ot["Kangxi Radicals"](D)||Ot["Katakana Phonetic Extensions"](D)||Ot.Katakana(D)||Ot["Vertical Forms"](D)||Ot["Yi Radicals"](D)||Ot["Yi Syllables"](D))}function qr(D){return D===746||D===747?!0:D<4352?!1:!!(Ot["Bopomofo Extended"](D)||Ot.Bopomofo(D)||Ot["CJK Compatibility Forms"](D)&&!(D>=65097&&D<=65103)||Ot["CJK Compatibility Ideographs"](D)||Ot["CJK Compatibility"](D)||Ot["CJK Radicals Supplement"](D)||Ot["CJK Strokes"](D)||Ot["CJK Symbols and Punctuation"](D)&&!(D>=12296&&D<=12305)&&!(D>=12308&&D<=12319)&&D!==12336||Ot["CJK Unified Ideographs Extension A"](D)||Ot["CJK Unified Ideographs"](D)||Ot["Enclosed CJK Letters and Months"](D)||Ot["Hangul Compatibility Jamo"](D)||Ot["Hangul Jamo Extended-A"](D)||Ot["Hangul Jamo Extended-B"](D)||Ot["Hangul Jamo"](D)||Ot["Hangul Syllables"](D)||Ot.Hiragana(D)||Ot["Ideographic Description Characters"](D)||Ot.Kanbun(D)||Ot["Kangxi Radicals"](D)||Ot["Katakana Phonetic Extensions"](D)||Ot.Katakana(D)&&D!==12540||Ot["Halfwidth and Fullwidth Forms"](D)&&D!==65288&&D!==65289&&D!==65293&&!(D>=65306&&D<=65310)&&D!==65339&&D!==65341&&D!==65343&&!(D>=65371&&D<=65503)&&D!==65507&&!(D>=65512&&D<=65519)||Ot["Small Form Variants"](D)&&!(D>=65112&&D<=65118)&&!(D>=65123&&D<=65126)||Ot["Unified Canadian Aboriginal Syllabics"](D)||Ot["Unified Canadian Aboriginal Syllabics Extended"](D)||Ot["Vertical Forms"](D)||Ot["Yijing Hexagram Symbols"](D)||Ot["Yi Syllables"](D)||Ot["Yi Radicals"](D))}function Mr(D){return!!(Ot["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||Ot["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||Ot["Letterlike Symbols"](D)||Ot["Number Forms"](D)||Ot["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||Ot["Control Pictures"](D)&&D!==9251||Ot["Optical Character Recognition"](D)||Ot["Enclosed Alphanumerics"](D)||Ot["Geometric Shapes"](D)||Ot["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||Ot["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||Ot["CJK Symbols and Punctuation"](D)||Ot.Katakana(D)||Ot["Private Use Area"](D)||Ot["CJK Compatibility Forms"](D)||Ot["Small Form Variants"](D)||Ot["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}function kr(D){return!(qr(D)||Mr(D))}function Hr(D){return Ot.Arabic(D)||Ot["Arabic Supplement"](D)||Ot["Arabic Extended-A"](D)||Ot["Arabic Presentation Forms-A"](D)||Ot["Arabic Presentation Forms-B"](D)}function rn(D){return D>=1424&&D<=2303||Ot["Arabic Presentation Forms-A"](D)||Ot["Arabic Presentation Forms-B"](D)}function on(D,R){return!(!R&&rn(D)||D>=2304&&D<=3583||D>=3840&&D<=4255||Ot.Khmer(D))}function Zr(D){for(var R=0,U=D;R<U.length;R+=1){var ee=U[R];if(rn(ee.charCodeAt(0)))return!0}return!1}function _n(D,R){for(var U=0,ee=D;U<ee.length;U+=1){var ue=ee[U];if(!on(ue.charCodeAt(0),R))return!1}return!0}var Xn={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},ta=null,Wn=Xn.unavailable,Qn=null,ra=function(D){D&&typeof D=="string"&&D.indexOf("NetworkError")>-1&&(Wn=Xn.error),ta&&ta(D)};function Pa(){ya.fire(new Kt("pluginStateChange",{pluginStatus:Wn,pluginURL:Qn}))}var ya=new sr,Sa=function(){return Wn},Za=function(D){return D({pluginStatus:Wn,pluginURL:Qn}),ya.on("pluginStateChange",D),D},Ai=function(D,R,U){if(U===void 0&&(U=!1),Wn===Xn.deferred||Wn===Xn.loading||Wn===Xn.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Qn=ie.resolveURL(D),Wn=Xn.deferred,ta=R,Pa(),U||qa()},qa=function(){if(Wn!==Xn.deferred||!Qn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Wn=Xn.loading,Pa(),Qn&&_t({url:Qn},function(D){D?ra(D):(Wn=Xn.loaded,Pa())})},Hn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Wn===Xn.loaded||Hn.applyArabicShaping!=null},isLoading:function(){return Wn===Xn.loading},setState:function(R){Wn=R.pluginStatus,Qn=R.pluginURL},isParsed:function(){return Hn.applyArabicShaping!=null&&Hn.processBidirectionalText!=null&&Hn.processStyledBidirectionalText!=null},getPluginURL:function(){return Qn}},Da=function(){!Hn.isLoading()&&!Hn.isLoaded()&&Sa()==="deferred"&&qa()},pa=function(R,U){this.zoom=R,U?(this.now=U.now,this.fadeDuration=U.fadeDuration,this.zoomHistory=U.zoomHistory,this.transition=U.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ft,this.transition={})};pa.prototype.isSupportedScript=function(R){return _n(R,Hn.isLoaded())},pa.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},pa.prototype.getCrossfadeParameters=function(){var R=this.zoom,U=R-Math.floor(R),ee=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:U+(1-U)*ee}:{fromScale:.5,toScale:1,t:1-(1-ee)*U}};var Ba=function(R,U){this.property=R,this.value=U,this.expression=Vl(U===void 0?R.specification.default:U,R.specification)};Ba.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ba.prototype.possiblyEvaluate=function(R,U,ee){return this.property.possiblyEvaluate(this,R,U,ee)};var li=function(R){this.property=R,this.value=new Ba(R,void 0)};li.prototype.transitioned=function(R,U){return new zi(this.property,this.value,U,m({},R.transition,this.transition),R.now)},li.prototype.untransitioned=function(){return new zi(this.property,this.value,null,{},0)};var ja=function(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)};ja.prototype.getValue=function(R){return B(this._values[R].value.value)},ja.prototype.setValue=function(R,U){this._values.hasOwnProperty(R)||(this._values[R]=new li(this._values[R].property)),this._values[R].value=new Ba(this._values[R].property,U===null?void 0:B(U))},ja.prototype.getTransition=function(R){return B(this._values[R].transition)},ja.prototype.setTransition=function(R,U){this._values.hasOwnProperty(R)||(this._values[R]=new li(this._values[R].property)),this._values[R].transition=B(U)||void 0},ja.prototype.serialize=function(){for(var R={},U=0,ee=Object.keys(this._values);U<ee.length;U+=1){var ue=ee[U],xe=this.getValue(ue);xe!==void 0&&(R[ue]=xe);var Ee=this.getTransition(ue);Ee!==void 0&&(R[ue+"-transition"]=Ee)}return R},ja.prototype.transitioned=function(R,U){for(var ee=new Fi(this._properties),ue=0,xe=Object.keys(this._values);ue<xe.length;ue+=1){var Ee=xe[ue];ee._values[Ee]=this._values[Ee].transitioned(R,U._values[Ee])}return ee},ja.prototype.untransitioned=function(){for(var R=new Fi(this._properties),U=0,ee=Object.keys(this._values);U<ee.length;U+=1){var ue=ee[U];R._values[ue]=this._values[ue].untransitioned()}return R};var zi=function(R,U,ee,ue,xe){this.property=R,this.value=U,this.begin=xe+ue.delay||0,this.end=this.begin+ue.duration||0,R.specification.transition&&(ue.delay||ue.duration)&&(this.prior=ee)};zi.prototype.possiblyEvaluate=function(R,U,ee){var ue=R.now||0,xe=this.value.possiblyEvaluate(R,U,ee),Ee=this.prior;if(Ee){if(ue>this.end)return this.prior=null,xe;if(this.value.isDataDriven())return this.prior=null,xe;if(ue<this.begin)return Ee.possiblyEvaluate(R,U,ee);var Ye=(ue-this.begin)/(this.end-this.begin);return this.property.interpolate(Ee.possiblyEvaluate(R,U,ee),xe,u(Ye))}else return xe};var Fi=function(R){this._properties=R,this._values=Object.create(R.defaultTransitioningPropertyValues)};Fi.prototype.possiblyEvaluate=function(R,U,ee){for(var ue=new Ki(this._properties),xe=0,Ee=Object.keys(this._values);xe<Ee.length;xe+=1){var Ye=Ee[xe];ue._values[Ye]=this._values[Ye].possiblyEvaluate(R,U,ee)}return ue},Fi.prototype.hasTransition=function(){for(var R=0,U=Object.keys(this._values);R<U.length;R+=1){var ee=U[R];if(this._values[ee].prior)return!0}return!1};var Ui=function(R){this._properties=R,this._values=Object.create(R.defaultPropertyValues)};Ui.prototype.getValue=function(R){return B(this._values[R].value)},Ui.prototype.setValue=function(R,U){this._values[R]=new Ba(this._values[R].property,U===null?void 0:B(U))},Ui.prototype.serialize=function(){for(var R={},U=0,ee=Object.keys(this._values);U<ee.length;U+=1){var ue=ee[U],xe=this.getValue(ue);xe!==void 0&&(R[ue]=xe)}return R},Ui.prototype.possiblyEvaluate=function(R,U,ee){for(var ue=new Ki(this._properties),xe=0,Ee=Object.keys(this._values);xe<Ee.length;xe+=1){var Ye=Ee[xe];ue._values[Ye]=this._values[Ye].possiblyEvaluate(R,U,ee)}return ue};var ui=function(R,U,ee){this.property=R,this.value=U,this.parameters=ee};ui.prototype.isConstant=function(){return this.value.kind==="constant"},ui.prototype.constantOr=function(R){return this.value.kind==="constant"?this.value.value:R},ui.prototype.evaluate=function(R,U,ee,ue){return this.property.evaluate(this.value,this.parameters,R,U,ee,ue)};var Ki=function(R){this._properties=R,this._values=Object.create(R.defaultPossiblyEvaluatedValues)};Ki.prototype.get=function(R){return this._values[R]};var qn=function(R){this.specification=R};qn.prototype.possiblyEvaluate=function(R,U){return R.expression.evaluate(U)},qn.prototype.interpolate=function(R,U,ee){var ue=Il[this.specification.type];return ue?ue(R,U,ee):R};var xa=function(R,U){this.specification=R,this.overrides=U};xa.prototype.possiblyEvaluate=function(R,U,ee,ue){return R.expression.kind==="constant"||R.expression.kind==="camera"?new ui(this,{kind:"constant",value:R.expression.evaluate(U,null,{},ee,ue)},U):new ui(this,R.expression,U)},xa.prototype.interpolate=function(R,U,ee){if(R.value.kind!=="constant"||U.value.kind!=="constant")return R;if(R.value.value===void 0||U.value.value===void 0)return new ui(this,{kind:"constant",value:void 0},R.parameters);var ue=Il[this.specification.type];return ue?new ui(this,{kind:"constant",value:ue(R.value.value,U.value.value,ee)},R.parameters):R},xa.prototype.evaluate=function(R,U,ee,ue,xe,Ee){return R.kind==="constant"?R.value:R.evaluate(U,ee,ue,xe,Ee)};var so=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.possiblyEvaluate=function(ee,ue,xe,Ee){if(ee.value===void 0)return new ui(this,{kind:"constant",value:void 0},ue);if(ee.expression.kind==="constant"){var Ye=ee.expression.evaluate(ue,null,{},xe,Ee),ot=ee.property.specification.type==="resolvedImage",mt=ot&&typeof Ye!="string"?Ye.name:Ye,At=this._calculate(mt,mt,mt,ue);return new ui(this,{kind:"constant",value:At},ue)}else if(ee.expression.kind==="camera"){var Bt=this._calculate(ee.expression.evaluate({zoom:ue.zoom-1}),ee.expression.evaluate({zoom:ue.zoom}),ee.expression.evaluate({zoom:ue.zoom+1}),ue);return new ui(this,{kind:"constant",value:Bt},ue)}else return new ui(this,ee.expression,ue)},R.prototype.evaluate=function(ee,ue,xe,Ee,Ye,ot){if(ee.kind==="source"){var mt=ee.evaluate(ue,xe,Ee,Ye,ot);return this._calculate(mt,mt,mt,ue)}else return ee.kind==="composite"?this._calculate(ee.evaluate({zoom:Math.floor(ue.zoom)-1},xe,Ee),ee.evaluate({zoom:Math.floor(ue.zoom)},xe,Ee),ee.evaluate({zoom:Math.floor(ue.zoom)+1},xe,Ee),ue):ee.value},R.prototype._calculate=function(ee,ue,xe,Ee){var Ye=Ee.zoom;return Ye>Ee.zoomHistory.lastIntegerZoom?{from:ee,to:ue}:{from:xe,to:ue}},R.prototype.interpolate=function(ee){return ee},R}(xa),ho=function(R){this.specification=R};ho.prototype.possiblyEvaluate=function(R,U,ee,ue){if(R.value!==void 0)if(R.expression.kind==="constant"){var xe=R.expression.evaluate(U,null,{},ee,ue);return this._calculate(xe,xe,xe,U)}else return this._calculate(R.expression.evaluate(new pa(Math.floor(U.zoom-1),U)),R.expression.evaluate(new pa(Math.floor(U.zoom),U)),R.expression.evaluate(new pa(Math.floor(U.zoom+1),U)),U)},ho.prototype._calculate=function(R,U,ee,ue){var xe=ue.zoom;return xe>ue.zoomHistory.lastIntegerZoom?{from:R,to:U}:{from:ee,to:U}},ho.prototype.interpolate=function(R){return R};var Vi=function(R){this.specification=R};Vi.prototype.possiblyEvaluate=function(R,U,ee,ue){return!!R.expression.evaluate(U,null,{},ee,ue)},Vi.prototype.interpolate=function(){return!1};var ei=function(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var U in R){var ee=R[U];ee.specification.overridable&&this.overridableProperties.push(U);var ue=this.defaultPropertyValues[U]=new Ba(ee,void 0),xe=this.defaultTransitionablePropertyValues[U]=new li(ee);this.defaultTransitioningPropertyValues[U]=xe.untransitioned(),this.defaultPossiblyEvaluatedValues[U]=ue.possiblyEvaluate({})}};De("DataDrivenProperty",xa),De("DataConstantProperty",qn),De("CrossFadedDataDrivenProperty",so),De("CrossFadedProperty",ho),De("ColorRampProperty",Vi);var Pi="-transition",Mi=function(D){function R(U,ee){if(D.call(this),this.id=U.id,this.type=U.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},U.type!=="custom"&&(U=U,this.metadata=U.metadata,this.minzoom=U.minzoom,this.maxzoom=U.maxzoom,U.type!=="background"&&(this.source=U.source,this.sourceLayer=U["source-layer"],this.filter=U.filter),ee.layout&&(this._unevaluatedLayout=new Ui(ee.layout)),ee.paint)){this._transitionablePaint=new ja(ee.paint);for(var ue in U.paint)this.setPaintProperty(ue,U.paint[ue],{validate:!1});for(var xe in U.layout)this.setLayoutProperty(xe,U.layout[xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ki(ee.paint)}}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},R.prototype.getLayoutProperty=function(ee){return ee==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ee)},R.prototype.setLayoutProperty=function(ee,ue,xe){if(xe===void 0&&(xe={}),ue!=null){var Ee="layers."+this.id+".layout."+ee;if(this._validate(Ta,Ee,ee,ue,xe))return}if(ee==="visibility"){this.visibility=ue;return}this._unevaluatedLayout.setValue(ee,ue)},R.prototype.getPaintProperty=function(ee){return x(ee,Pi)?this._transitionablePaint.getTransition(ee.slice(0,-Pi.length)):this._transitionablePaint.getValue(ee)},R.prototype.setPaintProperty=function(ee,ue,xe){if(xe===void 0&&(xe={}),ue!=null){var Ee="layers."+this.id+".paint."+ee;if(this._validate(wa,Ee,ee,ue,xe))return!1}if(x(ee,Pi))return this._transitionablePaint.setTransition(ee.slice(0,-Pi.length),ue||void 0),!1;var Ye=this._transitionablePaint._values[ee],ot=Ye.property.specification["property-type"]==="cross-faded-data-driven",mt=Ye.value.isDataDriven(),At=Ye.value;this._transitionablePaint.setValue(ee,ue),this._handleSpecialPaintPropertyUpdate(ee);var Bt=this._transitionablePaint._values[ee].value,Jt=Bt.isDataDriven();return Jt||mt||ot||this._handleOverridablePaintPropertyUpdate(ee,At,Bt)},R.prototype._handleSpecialPaintPropertyUpdate=function(ee){},R.prototype._handleOverridablePaintPropertyUpdate=function(ee,ue,xe){return!1},R.prototype.isHidden=function(ee){return this.minzoom&&ee<this.minzoom||this.maxzoom&&ee>=this.maxzoom?!0:this.visibility==="none"},R.prototype.updateTransitions=function(ee){this._transitioningPaint=this._transitionablePaint.transitioned(ee,this._transitioningPaint)},R.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},R.prototype.recalculate=function(ee,ue){ee.getCrossfadeParameters&&(this._crossfadeParameters=ee.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ee,void 0,ue)),this.paint=this._transitioningPaint.possiblyEvaluate(ee,void 0,ue)},R.prototype.serialize=function(){var ee={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&&(ee.layout=ee.layout||{},ee.layout.visibility=this.visibility),I(ee,function(ue,xe){return ue!==void 0&&!(xe==="layout"&&!Object.keys(ue).length)&&!(xe==="paint"&&!Object.keys(ue).length)})},R.prototype._validate=function(ee,ue,xe,Ee,Ye){return Ye===void 0&&(Ye={}),Ye&&Ye.validate===!1?!1:Aa(this,ee.call(Sn,{key:ue,layerType:this.type,objectKey:xe,value:Ee,styleSpec:yr,style:{glyphs:!0,sprite:!0}}))},R.prototype.is3D=function(){return!1},R.prototype.isTileClipped=function(){return!1},R.prototype.hasOffscreenPass=function(){return!1},R.prototype.resize=function(){},R.prototype.isStateDependent=function(){for(var ee in this.paint._values){var ue=this.paint.get(ee);if(!(!(ue instanceof ui)||!Ko(ue.property.specification))&&(ue.value.kind==="source"||ue.value.kind==="composite")&&ue.value.isStateDependent)return!0}return!1},R}(sr),Bo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Qo=function(R,U){this._structArray=R,this._pos1=U*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},pi=128,Zs=5,Na=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Na.serialize=function(R,U){return R._trim(),U&&(R.isTransferred=!0,U.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}},Na.deserialize=function(R){var U=Object.create(this.prototype);return U.arrayBuffer=R.arrayBuffer,U.length=R.length,U.capacity=R.arrayBuffer.byteLength/U.bytesPerElement,U._refreshViews(),U},Na.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Na.prototype.clear=function(){this.length=0},Na.prototype.resize=function(R){this.reserve(R),this.length=R},Na.prototype.reserve=function(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(this.capacity*Zs),pi),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var U=this.uint8;this._refreshViews(),U&&this.uint8.set(U)}},Na.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function gi(D,R){R===void 0&&(R=1);var U=0,ee=0,ue=D.map(function(Ee){var Ye=wf(Ee.type),ot=U=Sc(U,Math.max(R,Ye)),mt=Ee.components||1;return ee=Math.max(ee,Ye),U+=Ye*mt,{name:Ee.name,type:Ee.type,components:mt,offset:ot}}),xe=Sc(U,Math.max(ee,R));return{members:ue,size:xe,alignment:R}}function wf(D){return Bo[D].BYTES_PER_ELEMENT}function Sc(D,R){return Math.ceil(D/R)*R}var hu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ee,ue)},R.prototype.emplace=function(ee,ue,xe){var Ee=ee*2;return this.int16[Ee+0]=ue,this.int16[Ee+1]=xe,ee},R}(Na);hu.prototype.bytesPerElement=4,De("StructArrayLayout2i4",hu);var rc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee){var Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,ee,ue,xe,Ee)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye){var ot=ee*4;return this.int16[ot+0]=ue,this.int16[ot+1]=xe,this.int16[ot+2]=Ee,this.int16[ot+3]=Ye,ee},R}(Na);rc.prototype.bytesPerElement=8,De("StructArrayLayout4i8",rc);var Wl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot){var mt=this.length;return this.resize(mt+1),this.emplace(mt,ee,ue,xe,Ee,Ye,ot)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt){var At=ee*6;return this.int16[At+0]=ue,this.int16[At+1]=xe,this.int16[At+2]=Ee,this.int16[At+3]=Ye,this.int16[At+4]=ot,this.int16[At+5]=mt,ee},R}(Na);Wl.prototype.bytesPerElement=12,De("StructArrayLayout2i4i12",Wl);var Hu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot){var mt=this.length;return this.resize(mt+1),this.emplace(mt,ee,ue,xe,Ee,Ye,ot)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt){var At=ee*4,Bt=ee*8;return this.int16[At+0]=ue,this.int16[At+1]=xe,this.uint8[Bt+4]=Ee,this.uint8[Bt+5]=Ye,this.uint8[Bt+6]=ot,this.uint8[Bt+7]=mt,ee},R}(Na);Hu.prototype.bytesPerElement=8,De("StructArrayLayout2i4ub8",Hu);var Gu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ee,ue)},R.prototype.emplace=function(ee,ue,xe){var Ee=ee*2;return this.float32[Ee+0]=ue,this.float32[Ee+1]=xe,ee},R}(Na);Gu.prototype.bytesPerElement=8,De("StructArrayLayout2f8",Gu);var Co=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt){var hr=ee*10;return this.uint16[hr+0]=ue,this.uint16[hr+1]=xe,this.uint16[hr+2]=Ee,this.uint16[hr+3]=Ye,this.uint16[hr+4]=ot,this.uint16[hr+5]=mt,this.uint16[hr+6]=At,this.uint16[hr+7]=Bt,this.uint16[hr+8]=Jt,this.uint16[hr+9]=Zt,ee},R}(Na);Co.prototype.bytesPerElement=20,De("StructArrayLayout10ui20",Co);var Yl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr){var Pr=this.length;return this.resize(Pr+1),this.emplace(Pr,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr){var tn=ee*12;return this.int16[tn+0]=ue,this.int16[tn+1]=xe,this.int16[tn+2]=Ee,this.int16[tn+3]=Ye,this.uint16[tn+4]=ot,this.uint16[tn+5]=mt,this.uint16[tn+6]=At,this.uint16[tn+7]=Bt,this.int16[tn+8]=Jt,this.int16[tn+9]=Zt,this.int16[tn+10]=hr,this.int16[tn+11]=Pr,ee},R}(Na);Yl.prototype.bytesPerElement=24,De("StructArrayLayout4i4ui4i24",Yl);var nc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*3;return this.float32[Ye+0]=ue,this.float32[Ye+1]=xe,this.float32[Ye+2]=Ee,ee},R}(Na);nc.prototype.bytesPerElement=12,De("StructArrayLayout3f12",nc);var ac=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee){var ue=this.length;return this.resize(ue+1),this.emplace(ue,ee)},R.prototype.emplace=function(ee,ue){var xe=ee*1;return this.uint32[xe+0]=ue,ee},R}(Na);ac.prototype.bytesPerElement=4,De("StructArrayLayout1ul4",ac);var Tf=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.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)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt){var Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,ee,ue,xe,Ee,Ye,ot,mt,At,Bt)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt){var Zt=ee*10,hr=ee*5;return this.int16[Zt+0]=ue,this.int16[Zt+1]=xe,this.int16[Zt+2]=Ee,this.int16[Zt+3]=Ye,this.int16[Zt+4]=ot,this.int16[Zt+5]=mt,this.uint32[hr+3]=At,this.uint16[Zt+8]=Bt,this.uint16[Zt+9]=Jt,ee},R}(Na);Tf.prototype.bytesPerElement=20,De("StructArrayLayout6i1ul2ui20",Tf);var Df=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot){var mt=this.length;return this.resize(mt+1),this.emplace(mt,ee,ue,xe,Ee,Ye,ot)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt){var At=ee*6;return this.int16[At+0]=ue,this.int16[At+1]=xe,this.int16[At+2]=Ee,this.int16[At+3]=Ye,this.int16[At+4]=ot,this.int16[At+5]=mt,ee},R}(Na);Df.prototype.bytesPerElement=12,De("StructArrayLayout2i2i2i12",Df);var bl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye){var ot=this.length;return this.resize(ot+1),this.emplace(ot,ee,ue,xe,Ee,Ye)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot){var mt=ee*4,At=ee*8;return this.float32[mt+0]=ue,this.float32[mt+1]=xe,this.float32[mt+2]=Ee,this.int16[At+6]=Ye,this.int16[At+7]=ot,ee},R}(Na);bl.prototype.bytesPerElement=16,De("StructArrayLayout2f1f2i16",bl);var No=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee){var Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,ee,ue,xe,Ee)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye){var ot=ee*12,mt=ee*3;return this.uint8[ot+0]=ue,this.uint8[ot+1]=xe,this.float32[mt+1]=Ee,this.float32[mt+2]=Ye,ee},R}(Na);No.prototype.bytesPerElement=12,De("StructArrayLayout2ub2f12",No);var wl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*3;return this.uint16[Ye+0]=ue,this.uint16[Ye+1]=xe,this.uint16[Ye+2]=Ee,ee},R}(Na);wl.prototype.bytesPerElement=6,De("StructArrayLayout3ui6",wl);var Af=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.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)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn){var yn=this.length;return this.resize(yn+1),this.emplace(yn,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn){var Ln=ee*24,On=ee*12,jn=ee*48;return this.int16[Ln+0]=ue,this.int16[Ln+1]=xe,this.uint16[Ln+2]=Ee,this.uint16[Ln+3]=Ye,this.uint32[On+2]=ot,this.uint32[On+3]=mt,this.uint32[On+4]=At,this.uint16[Ln+10]=Bt,this.uint16[Ln+11]=Jt,this.uint16[Ln+12]=Zt,this.float32[On+7]=hr,this.float32[On+8]=Pr,this.uint8[jn+36]=tn,this.uint8[jn+37]=jr,this.uint8[jn+38]=mn,this.uint32[On+10]=cn,this.int16[Ln+22]=yn,ee},R}(Na);Af.prototype.bytesPerElement=48,De("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Af);var If=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.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)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn,Ln,On,jn,Yn,va,oa,ha,Ra,da,ma){var _a=this.length;return this.resize(_a+1),this.emplace(_a,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn,Ln,On,jn,Yn,va,oa,ha,Ra,da,ma)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn,Ln,On,jn,Yn,va,oa,ha,Ra,da,ma,_a){var La=ee*34,Ja=ee*17;return this.int16[La+0]=ue,this.int16[La+1]=xe,this.int16[La+2]=Ee,this.int16[La+3]=Ye,this.int16[La+4]=ot,this.int16[La+5]=mt,this.int16[La+6]=At,this.int16[La+7]=Bt,this.uint16[La+8]=Jt,this.uint16[La+9]=Zt,this.uint16[La+10]=hr,this.uint16[La+11]=Pr,this.uint16[La+12]=tn,this.uint16[La+13]=jr,this.uint16[La+14]=mn,this.uint16[La+15]=cn,this.uint16[La+16]=yn,this.uint16[La+17]=Ln,this.uint16[La+18]=On,this.uint16[La+19]=jn,this.uint16[La+20]=Yn,this.uint16[La+21]=va,this.uint16[La+22]=oa,this.uint32[Ja+12]=ha,this.float32[Ja+13]=Ra,this.float32[Ja+14]=da,this.float32[Ja+15]=ma,this.float32[Ja+16]=_a,ee},R}(Na);If.prototype.bytesPerElement=68,De("StructArrayLayout8i15ui1ul4f68",If);var Wu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee){var ue=this.length;return this.resize(ue+1),this.emplace(ue,ee)},R.prototype.emplace=function(ee,ue){var xe=ee*1;return this.float32[xe+0]=ue,ee},R}(Na);Wu.prototype.bytesPerElement=4,De("StructArrayLayout1f4",Wu);var ic=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*3;return this.int16[Ye+0]=ue,this.int16[Ye+1]=xe,this.int16[Ye+2]=Ee,ee},R}(Na);ic.prototype.bytesPerElement=6,De("StructArrayLayout3i6",ic);var Xl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*2,ot=ee*4;return this.uint32[Ye+0]=ue,this.uint16[ot+2]=xe,this.uint16[ot+3]=Ee,ee},R}(Na);Xl.prototype.bytesPerElement=8,De("StructArrayLayout1ul2ui8",Xl);var Mf=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ee,ue)},R.prototype.emplace=function(ee,ue,xe){var Ee=ee*2;return this.uint16[Ee+0]=ue,this.uint16[Ee+1]=xe,ee},R}(Na);Mf.prototype.bytesPerElement=4,De("StructArrayLayout2ui4",Mf);var Yu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee){var ue=this.length;return this.resize(ue+1),this.emplace(ue,ee)},R.prototype.emplace=function(ee,ue){var xe=ee*1;return this.uint16[xe+0]=ue,ee},R}(Na);Yu.prototype.bytesPerElement=2,De("StructArrayLayout1ui2",Yu);var vu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee){var Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,ee,ue,xe,Ee)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye){var ot=ee*4;return this.float32[ot+0]=ue,this.float32[ot+1]=xe,this.float32[ot+2]=Ee,this.float32[ot+3]=Ye,ee},R}(Na);vu.prototype.bytesPerElement=16,De("StructArrayLayout4f16",vu);var Ec=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={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 U.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},U.x1.get=function(){return this._structArray.int16[this._pos2+2]},U.y1.get=function(){return this._structArray.int16[this._pos2+3]},U.x2.get=function(){return this._structArray.int16[this._pos2+4]},U.y2.get=function(){return this._structArray.int16[this._pos2+5]},U.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},U.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},U.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},U.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(R.prototype,U),R}(Qo);Ec.prototype.size=20;var oc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new Ec(this,ee)},R}(Tf);De("CollisionBoxArray",oc);var du=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={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 U.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},U.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},U.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},U.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},U.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},U.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},U.segment.get=function(){return this._structArray.uint16[this._pos2+10]},U.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},U.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},U.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},U.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},U.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},U.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},U.placedOrientation.set=function(ee){this._structArray.uint8[this._pos1+37]=ee},U.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},U.hidden.set=function(ee){this._structArray.uint8[this._pos1+38]=ee},U.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},U.crossTileID.set=function(ee){this._structArray.uint32[this._pos4+10]=ee},U.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(R.prototype,U),R}(Qo);du.prototype.size=48;var sc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new du(this,ee)},R}(Af);De("PlacedSymbolArray",sc);var Xu=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={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 U.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},U.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},U.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},U.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},U.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},U.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},U.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},U.key.get=function(){return this._structArray.uint16[this._pos2+8]},U.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},U.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},U.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},U.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},U.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},U.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},U.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},U.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},U.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},U.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},U.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},U.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},U.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},U.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},U.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},U.crossTileID.set=function(ee){this._structArray.uint32[this._pos4+12]=ee},U.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},U.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},U.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},U.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(R.prototype,U),R}(Qo);Xu.prototype.size=68;var Cc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new Xu(this,ee)},R}(If);De("SymbolInstanceArray",Cc);var Lc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.getoffsetX=function(ee){return this.float32[ee*1+0]},R}(Wu);De("GlyphOffsetArray",Lc);var Ts=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.getx=function(ee){return this.int16[ee*3+0]},R.prototype.gety=function(ee){return this.int16[ee*3+1]},R.prototype.gettileUnitDistanceFromAnchor=function(ee){return this.int16[ee*3+2]},R}(ic);De("SymbolLineVertexArray",Ts);var Pc=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return U.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},U.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},U.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(R.prototype,U),R}(Qo);Pc.prototype.size=8;var Rc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new Pc(this,ee)},R}(Xl);De("FeatureIndexArray",Rc);var qc=gi([{name:"a_pos",components:2,type:"Int16"}],4),Dc=qc.members,Hi=function(R){R===void 0&&(R=[]),this.segments=R};Hi.prototype.prepareSegment=function(R,U,ee,ue){var xe=this.segments[this.segments.length-1];return R>Hi.MAX_VERTEX_ARRAY_LENGTH&&O("Max vertices per segment is "+Hi.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+R),(!xe||xe.vertexLength+R>Hi.MAX_VERTEX_ARRAY_LENGTH||xe.sortKey!==ue)&&(xe={vertexOffset:U.length,primitiveOffset:ee.length,vertexLength:0,primitiveLength:0},ue!==void 0&&(xe.sortKey=ue),this.segments.push(xe)),xe},Hi.prototype.get=function(){return this.segments},Hi.prototype.destroy=function(){for(var R=0,U=this.segments;R<U.length;R+=1){var ee=U[R];for(var ue in ee.vaos)ee.vaos[ue].destroy()}},Hi.simpleSegment=function(R,U,ee,ue){return new Hi([{vertexOffset:R,primitiveOffset:U,vertexLength:ee,primitiveLength:ue,vaos:{},sortKey:0}])},Hi.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,De("SegmentVector",Hi);function ce(D,R){return D=h(Math.floor(D),0,255),R=h(Math.floor(R),0,255),256*D+R}var W=gi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),fe=L(function(D){function R(U,ee){var ue,xe,Ee,Ye,ot,mt,At,Bt;for(ue=U.length&3,xe=U.length-ue,Ee=ee,ot=3432918353,mt=461845907,Bt=0;Bt<xe;)At=U.charCodeAt(Bt)&255|(U.charCodeAt(++Bt)&255)<<8|(U.charCodeAt(++Bt)&255)<<16|(U.charCodeAt(++Bt)&255)<<24,++Bt,At=(At&65535)*ot+(((At>>>16)*ot&65535)<<16)&4294967295,At=At<<15|At>>>17,At=(At&65535)*mt+(((At>>>16)*mt&65535)<<16)&4294967295,Ee^=At,Ee=Ee<<13|Ee>>>19,Ye=(Ee&65535)*5+(((Ee>>>16)*5&65535)<<16)&4294967295,Ee=(Ye&65535)+27492+(((Ye>>>16)+58964&65535)<<16);switch(At=0,ue){case 3:At^=(U.charCodeAt(Bt+2)&255)<<16;case 2:At^=(U.charCodeAt(Bt+1)&255)<<8;case 1:At^=U.charCodeAt(Bt)&255,At=(At&65535)*ot+(((At>>>16)*ot&65535)<<16)&4294967295,At=At<<15|At>>>17,At=(At&65535)*mt+(((At>>>16)*mt&65535)<<16)&4294967295,Ee^=At}return Ee^=U.length,Ee^=Ee>>>16,Ee=(Ee&65535)*2246822507+(((Ee>>>16)*2246822507&65535)<<16)&4294967295,Ee^=Ee>>>13,Ee=(Ee&65535)*3266489909+(((Ee>>>16)*3266489909&65535)<<16)&4294967295,Ee^=Ee>>>16,Ee>>>0}D.exports=R}),Q=L(function(D){function R(U,ee){for(var ue=U.length,xe=ee^ue,Ee=0,Ye;ue>=4;)Ye=U.charCodeAt(Ee)&255|(U.charCodeAt(++Ee)&255)<<8|(U.charCodeAt(++Ee)&255)<<16|(U.charCodeAt(++Ee)&255)<<24,Ye=(Ye&65535)*1540483477+(((Ye>>>16)*1540483477&65535)<<16),Ye^=Ye>>>24,Ye=(Ye&65535)*1540483477+(((Ye>>>16)*1540483477&65535)<<16),xe=(xe&65535)*1540483477+(((xe>>>16)*1540483477&65535)<<16)^Ye,ue-=4,++Ee;switch(ue){case 3:xe^=(U.charCodeAt(Ee+2)&255)<<16;case 2:xe^=(U.charCodeAt(Ee+1)&255)<<8;case 1:xe^=U.charCodeAt(Ee)&255,xe=(xe&65535)*1540483477+(((xe>>>16)*1540483477&65535)<<16)}return xe^=xe>>>13,xe=(xe&65535)*1540483477+(((xe>>>16)*1540483477&65535)<<16),xe^=xe>>>15,xe>>>0}D.exports=R}),he=fe,Re=fe,Ge=Q;he.murmur3=Re,he.murmur2=Ge;var tt=function(){this.ids=[],this.positions=[],this.indexed=!1};tt.prototype.add=function(R,U,ee,ue){this.ids.push(zt(R)),this.positions.push(U,ee,ue)},tt.prototype.getPositions=function(R){for(var U=zt(R),ee=0,ue=this.ids.length-1;ee<ue;){var xe=ee+ue>>1;this.ids[xe]>=U?ue=xe:ee=xe+1}for(var Ee=[];this.ids[ee]===U;){var Ye=this.positions[3*ee],ot=this.positions[3*ee+1],mt=this.positions[3*ee+2];Ee.push({index:Ye,start:ot,end:mt}),ee++}return Ee},tt.serialize=function(R,U){var ee=new Float64Array(R.ids),ue=new Uint32Array(R.positions);return Xt(ee,ue,0,ee.length-1),U&&U.push(ee.buffer,ue.buffer),{ids:ee,positions:ue}},tt.deserialize=function(R){var U=new tt;return U.ids=R.ids,U.positions=R.positions,U.indexed=!0,U};var wt=Math.pow(2,53)-1;function zt(D){var R=+D;return!isNaN(R)&&R<=wt?R:he(String(D))}function Xt(D,R,U,ee){for(;U<ee;){for(var ue=D[U+ee>>1],xe=U-1,Ee=ee+1;;){do xe++;while(D[xe]<ue);do Ee--;while(D[Ee]>ue);if(xe>=Ee)break;tr(D,xe,Ee),tr(R,3*xe,3*Ee),tr(R,3*xe+1,3*Ee+1),tr(R,3*xe+2,3*Ee+2)}Ee-U<ee-Ee?(Xt(D,R,U,Ee),U=Ee+1):(Xt(D,R,Ee+1,ee),ee=Ee)}}function tr(D,R,U){var ee=D[R];D[R]=D[U],D[U]=ee}De("FeaturePositionMap",tt);var qt=function(R,U){this.gl=R.gl,this.location=U},Cr=function(D){function R(U,ee){D.call(this,U,ee),this.current=0}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.set=function(ee){this.current!==ee&&(this.current=ee,this.gl.uniform1i(this.location,ee))},R}(qt),Ur=function(D){function R(U,ee){D.call(this,U,ee),this.current=0}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.set=function(ee){this.current!==ee&&(this.current=ee,this.gl.uniform1f(this.location,ee))},R}(qt),Nr=function(D){function R(U,ee){D.call(this,U,ee),this.current=[0,0]}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.set=function(ee){(ee[0]!==this.current[0]||ee[1]!==this.current[1])&&(this.current=ee,this.gl.uniform2f(this.location,ee[0],ee[1]))},R}(qt),Fr=function(D){function R(U,ee){D.call(this,U,ee),this.current=[0,0,0]}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.set=function(ee){(ee[0]!==this.current[0]||ee[1]!==this.current[1]||ee[2]!==this.current[2])&&(this.current=ee,this.gl.uniform3f(this.location,ee[0],ee[1],ee[2]))},R}(qt),Gr=function(D){function R(U,ee){D.call(this,U,ee),this.current=[0,0,0,0]}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.set=function(ee){(ee[0]!==this.current[0]||ee[1]!==this.current[1]||ee[2]!==this.current[2]||ee[3]!==this.current[3])&&(this.current=ee,this.gl.uniform4f(this.location,ee[0],ee[1],ee[2],ee[3]))},R}(qt),nn=function(D){function R(U,ee){D.call(this,U,ee),this.current=Ga.transparent}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.set=function(ee){(ee.r!==this.current.r||ee.g!==this.current.g||ee.b!==this.current.b||ee.a!==this.current.a)&&(this.current=ee,this.gl.uniform4f(this.location,ee.r,ee.g,ee.b,ee.a))},R}(qt),Cn=new Float32Array(16),Rn=function(D){function R(U,ee){D.call(this,U,ee),this.current=Cn}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.set=function(ee){if(ee[12]!==this.current[12]||ee[0]!==this.current[0]){this.current=ee,this.gl.uniformMatrix4fv(this.location,!1,ee);return}for(var ue=1;ue<16;ue++)if(ee[ue]!==this.current[ue]){this.current=ee,this.gl.uniformMatrix4fv(this.location,!1,ee);break}},R}(qt);function Bn(D){return[ce(255*D.r,255*D.g),ce(255*D.b,255*D.a)]}var Nn=function(R,U,ee){this.value=R,this.uniformNames=U.map(function(ue){return"u_"+ue}),this.type=ee};Nn.prototype.setUniform=function(R,U,ee){R.set(ee.constantOr(this.value))},Nn.prototype.getBinding=function(R,U,ee){return this.type==="color"?new nn(R,U):new Ur(R,U)};var Fn=function(R,U){this.uniformNames=U.map(function(ee){return"u_"+ee}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Fn.prototype.setConstantPatternPositions=function(R,U){this.pixelRatioFrom=U.pixelRatio,this.pixelRatioTo=R.pixelRatio,this.patternFrom=U.tlbr,this.patternTo=R.tlbr},Fn.prototype.setUniform=function(R,U,ee,ue){var xe=ue==="u_pattern_to"?this.patternTo:ue==="u_pattern_from"?this.patternFrom:ue==="u_pixel_ratio_to"?this.pixelRatioTo:ue==="u_pixel_ratio_from"?this.pixelRatioFrom:null;xe&&R.set(xe)},Fn.prototype.getBinding=function(R,U,ee){return ee.substr(0,9)==="u_pattern"?new Gr(R,U):new Ur(R,U)};var Vn=function(R,U,ee,ue){this.expression=R,this.type=ee,this.maxValue=0,this.paintVertexAttributes=U.map(function(xe){return{name:"a_"+xe,type:"Float32",components:ee==="color"?2:1,offset:0}}),this.paintVertexArray=new ue};Vn.prototype.populatePaintArray=function(R,U,ee,ue,xe){var Ee=this.paintVertexArray.length,Ye=this.expression.evaluate(new pa(0),U,{},ue,[],xe);this.paintVertexArray.resize(R),this._setPaintValue(Ee,R,Ye)},Vn.prototype.updatePaintArray=function(R,U,ee,ue){var xe=this.expression.evaluate({zoom:0},ee,ue);this._setPaintValue(R,U,xe)},Vn.prototype._setPaintValue=function(R,U,ee){if(this.type==="color")for(var ue=Bn(ee),xe=R;xe<U;xe++)this.paintVertexArray.emplace(xe,ue[0],ue[1]);else{for(var Ee=R;Ee<U;Ee++)this.paintVertexArray.emplace(Ee,ee);this.maxValue=Math.max(this.maxValue,Math.abs(ee))}},Vn.prototype.upload=function(R){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=R.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Vn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Zn=function(R,U,ee,ue,xe,Ee){this.expression=R,this.uniformNames=U.map(function(Ye){return"u_"+Ye+"_t"}),this.type=ee,this.useIntegerZoom=ue,this.zoom=xe,this.maxValue=0,this.paintVertexAttributes=U.map(function(Ye){return{name:"a_"+Ye,type:"Float32",components:ee==="color"?4:2,offset:0}}),this.paintVertexArray=new Ee};Zn.prototype.populatePaintArray=function(R,U,ee,ue,xe){var Ee=this.expression.evaluate(new pa(this.zoom),U,{},ue,[],xe),Ye=this.expression.evaluate(new pa(this.zoom+1),U,{},ue,[],xe),ot=this.paintVertexArray.length;this.paintVertexArray.resize(R),this._setPaintValue(ot,R,Ee,Ye)},Zn.prototype.updatePaintArray=function(R,U,ee,ue){var xe=this.expression.evaluate({zoom:this.zoom},ee,ue),Ee=this.expression.evaluate({zoom:this.zoom+1},ee,ue);this._setPaintValue(R,U,xe,Ee)},Zn.prototype._setPaintValue=function(R,U,ee,ue){if(this.type==="color")for(var xe=Bn(ee),Ee=Bn(ue),Ye=R;Ye<U;Ye++)this.paintVertexArray.emplace(Ye,xe[0],xe[1],Ee[0],Ee[1]);else{for(var ot=R;ot<U;ot++)this.paintVertexArray.emplace(ot,ee,ue);this.maxValue=Math.max(this.maxValue,Math.abs(ee),Math.abs(ue))}},Zn.prototype.upload=function(R){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=R.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Zn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Zn.prototype.setUniform=function(R,U){var ee=this.useIntegerZoom?Math.floor(U.zoom):U.zoom,ue=h(this.expression.interpolationFactor(ee,this.zoom,this.zoom+1),0,1);R.set(ue)},Zn.prototype.getBinding=function(R,U,ee){return new Ur(R,U)};var ea=function(R,U,ee,ue,xe,Ee){this.expression=R,this.type=U,this.useIntegerZoom=ee,this.zoom=ue,this.layerId=Ee,this.zoomInPaintVertexArray=new xe,this.zoomOutPaintVertexArray=new xe};ea.prototype.populatePaintArray=function(R,U,ee){var ue=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(R),this.zoomOutPaintVertexArray.resize(R),this._setPaintValues(ue,R,U.patterns&&U.patterns[this.layerId],ee)},ea.prototype.updatePaintArray=function(R,U,ee,ue,xe){this._setPaintValues(R,U,ee.patterns&&ee.patterns[this.layerId],xe)},ea.prototype._setPaintValues=function(R,U,ee,ue){if(!(!ue||!ee)){var xe=ee.min,Ee=ee.mid,Ye=ee.max,ot=ue[xe],mt=ue[Ee],At=ue[Ye];if(!(!ot||!mt||!At))for(var Bt=R;Bt<U;Bt++)this.zoomInPaintVertexArray.emplace(Bt,mt.tl[0],mt.tl[1],mt.br[0],mt.br[1],ot.tl[0],ot.tl[1],ot.br[0],ot.br[1],mt.pixelRatio,ot.pixelRatio),this.zoomOutPaintVertexArray.emplace(Bt,mt.tl[0],mt.tl[1],mt.br[0],mt.br[1],At.tl[0],At.tl[1],At.br[0],At.br[1],mt.pixelRatio,At.pixelRatio)}},ea.prototype.upload=function(R){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=R.createVertexBuffer(this.zoomInPaintVertexArray,W.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=R.createVertexBuffer(this.zoomOutPaintVertexArray,W.members,this.expression.isStateDependent))},ea.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var ca=function(R,U,ee){this.binders={},this._buffers=[];var ue=[];for(var xe in R.paint._values)if(ee(xe)){var Ee=R.paint.get(xe);if(!(!(Ee instanceof ui)||!Ko(Ee.property.specification))){var Ye=Ea(xe,R.type),ot=Ee.value,mt=Ee.property.specification.type,At=Ee.property.useIntegerZoom,Bt=Ee.property.specification["property-type"],Jt=Bt==="cross-faded"||Bt==="cross-faded-data-driven";if(ot.kind==="constant")this.binders[xe]=Jt?new Fn(ot.value,Ye):new Nn(ot.value,Ye,mt),ue.push("/u_"+xe);else if(ot.kind==="source"||Jt){var Zt=za(xe,mt,"source");this.binders[xe]=Jt?new ea(ot,mt,At,U,Zt,R.id):new Vn(ot,Ye,mt,Zt),ue.push("/a_"+xe)}else{var hr=za(xe,mt,"composite");this.binders[xe]=new Zn(ot,Ye,mt,At,U,hr),ue.push("/z_"+xe)}}}this.cacheKey=ue.sort().join("")};ca.prototype.getMaxValue=function(R){var U=this.binders[R];return U instanceof Vn||U instanceof Zn?U.maxValue:0},ca.prototype.populatePaintArrays=function(R,U,ee,ue,xe){for(var Ee in this.binders){var Ye=this.binders[Ee];(Ye instanceof Vn||Ye instanceof Zn||Ye instanceof ea)&&Ye.populatePaintArray(R,U,ee,ue,xe)}},ca.prototype.setConstantPatternPositions=function(R,U){for(var ee in this.binders){var ue=this.binders[ee];ue instanceof Fn&&ue.setConstantPatternPositions(R,U)}},ca.prototype.updatePaintArrays=function(R,U,ee,ue,xe){var Ee=!1;for(var Ye in R)for(var ot=U.getPositions(Ye),mt=0,At=ot;mt<At.length;mt+=1){var Bt=At[mt],Jt=ee.feature(Bt.index);for(var Zt in this.binders){var hr=this.binders[Zt];if((hr instanceof Vn||hr instanceof Zn||hr instanceof ea)&&hr.expression.isStateDependent===!0){var Pr=ue.paint.get(Zt);hr.expression=Pr.value,hr.updatePaintArray(Bt.start,Bt.end,Jt,R[Ye],xe),Ee=!0}}}return Ee},ca.prototype.defines=function(){var R=[];for(var U in this.binders){var ee=this.binders[U];(ee instanceof Nn||ee instanceof Fn)&&R.push.apply(R,ee.uniformNames.map(function(ue){return"#define HAS_UNIFORM_"+ue}))}return R},ca.prototype.getBinderAttributes=function(){var R=[];for(var U in this.binders){var ee=this.binders[U];if(ee instanceof Vn||ee instanceof Zn)for(var ue=0;ue<ee.paintVertexAttributes.length;ue++)R.push(ee.paintVertexAttributes[ue].name);else if(ee instanceof ea)for(var xe=0;xe<W.members.length;xe++)R.push(W.members[xe].name)}return R},ca.prototype.getBinderUniforms=function(){var R=[];for(var U in this.binders){var ee=this.binders[U];if(ee instanceof Nn||ee instanceof Fn||ee instanceof Zn)for(var ue=0,xe=ee.uniformNames;ue<xe.length;ue+=1){var Ee=xe[ue];R.push(Ee)}}return R},ca.prototype.getPaintVertexBuffers=function(){return this._buffers},ca.prototype.getUniforms=function(R,U){var ee=[];for(var ue in this.binders){var xe=this.binders[ue];if(xe instanceof Nn||xe instanceof Fn||xe instanceof Zn)for(var Ee=0,Ye=xe.uniformNames;Ee<Ye.length;Ee+=1){var ot=Ye[Ee];if(U[ot]){var mt=xe.getBinding(R,U[ot],ot);ee.push({name:ot,property:ue,binding:mt})}}}return ee},ca.prototype.setUniforms=function(R,U,ee,ue){for(var xe=0,Ee=U;xe<Ee.length;xe+=1){var Ye=Ee[xe],ot=Ye.name,mt=Ye.property,At=Ye.binding;this.binders[mt].setUniform(At,ue,ee.get(mt),ot)}},ca.prototype.updatePaintBuffers=function(R){this._buffers=[];for(var U in this.binders){var ee=this.binders[U];if(R&&ee instanceof ea){var ue=R.fromScale===2?ee.zoomInPaintVertexBuffer:ee.zoomOutPaintVertexBuffer;ue&&this._buffers.push(ue)}else(ee instanceof Vn||ee instanceof Zn)&&ee.paintVertexBuffer&&this._buffers.push(ee.paintVertexBuffer)}},ca.prototype.upload=function(R){for(var U in this.binders){var ee=this.binders[U];(ee instanceof Vn||ee instanceof Zn||ee instanceof ea)&&ee.upload(R)}this.updatePaintBuffers()},ca.prototype.destroy=function(){for(var R in this.binders){var U=this.binders[R];(U instanceof Vn||U instanceof Zn||U instanceof ea)&&U.destroy()}};var ia=function(R,U,ee){ee===void 0&&(ee=function(){return!0}),this.programConfigurations={};for(var ue=0,xe=R;ue<xe.length;ue+=1){var Ee=xe[ue];this.programConfigurations[Ee.id]=new ca(Ee,U,ee)}this.needsUpload=!1,this._featureMap=new tt,this._bufferOffset=0};ia.prototype.populatePaintArrays=function(R,U,ee,ue,xe,Ee){for(var Ye in this.programConfigurations)this.programConfigurations[Ye].populatePaintArrays(R,U,ue,xe,Ee);U.id!==void 0&&this._featureMap.add(U.id,ee,this._bufferOffset,R),this._bufferOffset=R,this.needsUpload=!0},ia.prototype.updatePaintArrays=function(R,U,ee,ue){for(var xe=0,Ee=ee;xe<Ee.length;xe+=1){var Ye=Ee[xe];this.needsUpload=this.programConfigurations[Ye.id].updatePaintArrays(R,this._featureMap,U,Ye,ue)||this.needsUpload}},ia.prototype.get=function(R){return this.programConfigurations[R]},ia.prototype.upload=function(R){if(this.needsUpload){for(var U in this.programConfigurations)this.programConfigurations[U].upload(R);this.needsUpload=!1}},ia.prototype.destroy=function(){for(var R in this.programConfigurations)this.programConfigurations[R].destroy()};function Ea(D,R){var U={"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"]};return U[D]||[D.replace(R+"-","").replace(/-/g,"_")]}function Va(D){var R={"line-pattern":{source:Co,composite:Co},"fill-pattern":{source:Co,composite:Co},"fill-extrusion-pattern":{source:Co,composite:Co}};return R[D]}function za(D,R,U){var ee={color:{source:Gu,composite:vu},number:{source:Wu,composite:Gu}},ue=Va(D);return ue&&ue[U]||ee[R][U]}De("ConstantBinder",Nn),De("CrossFadedConstantBinder",Fn),De("SourceExpressionBinder",Vn),De("CrossFadedCompositeBinder",ea),De("CompositeExpressionBinder",Zn),De("ProgramConfiguration",ca,{omit:["_buffers"]}),De("ProgramConfigurationSet",ia);var ga=8192,Fa=15,Ia=Math.pow(2,Fa-1)-1,Ka=-Ia-1;function Wa(D){for(var R=ga/D.extent,U=D.loadGeometry(),ee=0;ee<U.length;ee++)for(var ue=U[ee],xe=0;xe<ue.length;xe++){var Ee=ue[xe],Ye=Math.round(Ee.x*R),ot=Math.round(Ee.y*R);Ee.x=h(Ye,Ka,Ia),Ee.y=h(ot,Ka,Ia),(Ye<Ee.x||Ye>Ee.x+1||ot<Ee.y||ot>Ee.y+1)&&O("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return U}function fi(D,R){return{type:D.type,id:D.id,properties:D.properties,geometry:R?Wa(D):[]}}function Ua(D,R,U,ee,ue){D.emplaceBack(R*2+(ee+1)/2,U*2+(ue+1)/2)}var ii=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new hu,this.indexArray=new wl,this.segments=new Hi,this.programConfigurations=new ia(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};ii.prototype.populate=function(R,U,ee){var ue=this.layers[0],xe=[],Ee=null;ue.type==="circle"&&(Ee=ue.layout.get("circle-sort-key"));for(var Ye=0,ot=R;Ye<ot.length;Ye+=1){var mt=ot[Ye],At=mt.feature,Bt=mt.id,Jt=mt.index,Zt=mt.sourceLayerIndex,hr=this.layers[0]._featureFilter.needGeometry,Pr=fi(At,hr);if(this.layers[0]._featureFilter.filter(new pa(this.zoom),Pr,ee)){var tn=Ee?Ee.evaluate(Pr,{},ee):void 0,jr={id:Bt,properties:At.properties,type:At.type,sourceLayerIndex:Zt,index:Jt,geometry:hr?Pr.geometry:Wa(At),patterns:{},sortKey:tn};xe.push(jr)}}Ee&&xe.sort(function(oa,ha){return oa.sortKey-ha.sortKey});for(var mn=0,cn=xe;mn<cn.length;mn+=1){var yn=cn[mn],Ln=yn,On=Ln.geometry,jn=Ln.index,Yn=Ln.sourceLayerIndex,va=R[jn].feature;this.addFeature(yn,On,jn,ee),U.featureIndex.insert(va,On,jn,Yn,this.index)}},ii.prototype.update=function(R,U,ee){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,U,this.stateDependentLayers,ee)},ii.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},ii.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ii.prototype.upload=function(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Dc),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0},ii.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ii.prototype.addFeature=function(R,U,ee,ue){for(var xe=0,Ee=U;xe<Ee.length;xe+=1)for(var Ye=Ee[xe],ot=0,mt=Ye;ot<mt.length;ot+=1){var At=mt[ot],Bt=At.x,Jt=At.y;if(!(Bt<0||Bt>=ga||Jt<0||Jt>=ga)){var Zt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),hr=Zt.vertexLength;Ua(this.layoutVertexArray,Bt,Jt,-1,-1),Ua(this.layoutVertexArray,Bt,Jt,1,-1),Ua(this.layoutVertexArray,Bt,Jt,1,1),Ua(this.layoutVertexArray,Bt,Jt,-1,1),this.indexArray.emplaceBack(hr,hr+1,hr+2),this.indexArray.emplaceBack(hr,hr+3,hr+2),Zt.vertexLength+=4,Zt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ee,{},ue)},De("CircleBucket",ii,{omit:["layers"]});function ka(D,R){for(var U=0;U<D.length;U++)if(Lo(R,D[U]))return!0;for(var ee=0;ee<R.length;ee++)if(Lo(D,R[ee]))return!0;return!!cs(D,R)}function Ha(D,R,U){return!!(Lo(D,R)||js(R,D,U))}function Si(D,R){if(D.length===1)return Ks(R,D[0]);for(var U=0;U<R.length;U++)for(var ee=R[U],ue=0;ue<ee.length;ue++)if(Lo(D,ee[ue]))return!0;for(var xe=0;xe<D.length;xe++)if(Ks(R,D[xe]))return!0;for(var Ee=0;Ee<R.length;Ee++)if(cs(D,R[Ee]))return!0;return!1}function Ji(D,R,U){for(var ee=0;ee<R.length;ee++){var ue=R[ee];if(D.length>=3){for(var xe=0;xe<ue.length;xe++)if(Lo(D,ue[xe]))return!0}if(fs(D,ue,U))return!0}return!1}function fs(D,R,U){if(D.length>1){if(cs(D,R))return!0;for(var ee=0;ee<R.length;ee++)if(js(R[ee],D,U))return!0}for(var ue=0;ue<D.length;ue++)if(js(D[ue],R,U))return!0;return!1}function cs(D,R){if(D.length===0||R.length===0)return!1;for(var U=0;U<D.length-1;U++)for(var ee=D[U],ue=D[U+1],xe=0;xe<R.length-1;xe++){var Ee=R[xe],Ye=R[xe+1];if(As(ee,ue,Ee,Ye))return!0}return!1}function As(D,R,U,ee){return F(D,U,ee)!==F(R,U,ee)&&F(D,R,U)!==F(D,R,ee)}function js(D,R,U){var ee=U*U;if(R.length===1)return D.distSqr(R[0])<ee;for(var ue=1;ue<R.length;ue++){var xe=R[ue-1],Ee=R[ue];if(pu(D,xe,Ee)<ee)return!0}return!1}function pu(D,R,U){var ee=R.distSqr(U);if(ee===0)return D.distSqr(R);var ue=((D.x-R.x)*(U.x-R.x)+(D.y-R.y)*(U.y-R.y))/ee;return ue<0?D.distSqr(R):ue>1?D.distSqr(U):D.distSqr(U.sub(R)._mult(ue)._add(R))}function Ks(D,R){for(var U=!1,ee,ue,xe,Ee=0;Ee<D.length;Ee++){ee=D[Ee];for(var Ye=0,ot=ee.length-1;Ye<ee.length;ot=Ye++)ue=ee[Ye],xe=ee[ot],ue.y>R.y!=xe.y>R.y&&R.x<(xe.x-ue.x)*(R.y-ue.y)/(xe.y-ue.y)+ue.x&&(U=!U)}return U}function Lo(D,R){for(var U=!1,ee=0,ue=D.length-1;ee<D.length;ue=ee++){var xe=D[ee],Ee=D[ue];xe.y>R.y!=Ee.y>R.y&&R.x<(Ee.x-xe.x)*(R.y-xe.y)/(Ee.y-xe.y)+xe.x&&(U=!U)}return U}function Js(D,R,U,ee,ue){for(var xe=0,Ee=D;xe<Ee.length;xe+=1){var Ye=Ee[xe];if(R<=Ye.x&&U<=Ye.y&&ee>=Ye.x&&ue>=Ye.y)return!0}var ot=[new r(R,U),new r(R,ue),new r(ee,ue),new r(ee,U)];if(D.length>2)for(var mt=0,At=ot;mt<At.length;mt+=1){var Bt=At[mt];if(Lo(D,Bt))return!0}for(var Jt=0;Jt<D.length-1;Jt++){var Zt=D[Jt],hr=D[Jt+1];if(Uo(Zt,hr,ot))return!0}return!1}function Uo(D,R,U){var ee=U[0],ue=U[2];if(D.x<ee.x&&R.x<ee.x||D.x>ue.x&&R.x>ue.x||D.y<ee.y&&R.y<ee.y||D.y>ue.y&&R.y>ue.y)return!1;var xe=F(D,R,U[0]);return xe!==F(D,R,U[1])||xe!==F(D,R,U[2])||xe!==F(D,R,U[3])}function Po(D,R,U){var ee=R.paint.get(D).value;return ee.kind==="constant"?ee.value:U.programConfigurations.get(R.id).getMaxValue(D)}function Ms(D){return Math.sqrt(D[0]*D[0]+D[1]*D[1])}function Tl(D,R,U,ee,ue){if(!R[0]&&!R[1])return D;var xe=r.convert(R)._mult(ue);U==="viewport"&&xe._rotate(-ee);for(var Ee=[],Ye=0;Ye<D.length;Ye++){var ot=D[Ye];Ee.push(ot.sub(xe))}return Ee}var Ss=new ei({"circle-sort-key":new xa(yr.layout_circle["circle-sort-key"])}),kf=new ei({"circle-radius":new xa(yr.paint_circle["circle-radius"]),"circle-color":new xa(yr.paint_circle["circle-color"]),"circle-blur":new xa(yr.paint_circle["circle-blur"]),"circle-opacity":new xa(yr.paint_circle["circle-opacity"]),"circle-translate":new qn(yr.paint_circle["circle-translate"]),"circle-translate-anchor":new qn(yr.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new qn(yr.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new qn(yr.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new xa(yr.paint_circle["circle-stroke-width"]),"circle-stroke-color":new xa(yr.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new xa(yr.paint_circle["circle-stroke-opacity"])}),Zu={paint:kf,layout:Ss},eo=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var D=arguments,R=0,U=arguments.length;U--;)R+=D[U]*D[U];return Math.sqrt(R)});function _f(){var D=new eo(4);return eo!=Float32Array&&(D[1]=0,D[2]=0),D[0]=1,D[3]=1,D}function Sf(D,R,U){var ee=R[0],ue=R[1],xe=R[2],Ee=R[3],Ye=Math.sin(U),ot=Math.cos(U);return D[0]=ee*ot+xe*Ye,D[1]=ue*ot+Ee*Ye,D[2]=ee*-Ye+xe*ot,D[3]=ue*-Ye+Ee*ot,D}function go(){var D=new eo(9);return eo!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[5]=0,D[6]=0,D[7]=0),D[0]=1,D[4]=1,D[8]=1,D}function ju(D,R){var U=Math.sin(R),ee=Math.cos(R);return D[0]=ee,D[1]=U,D[2]=0,D[3]=-U,D[4]=ee,D[5]=0,D[6]=0,D[7]=0,D[8]=1,D}function zf(){var D=new eo(16);return eo!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[11]=0,D[12]=0,D[13]=0,D[14]=0),D[0]=1,D[5]=1,D[10]=1,D[15]=1,D}function Ff(D){var R=new eo(16);return R[0]=D[0],R[1]=D[1],R[2]=D[2],R[3]=D[3],R[4]=D[4],R[5]=D[5],R[6]=D[6],R[7]=D[7],R[8]=D[8],R[9]=D[9],R[10]=D[10],R[11]=D[11],R[12]=D[12],R[13]=D[13],R[14]=D[14],R[15]=D[15],R}function Of(D){return D[0]=1,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=1,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=1,D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D}function Ku(D,R){var U=R[0],ee=R[1],ue=R[2],xe=R[3],Ee=R[4],Ye=R[5],ot=R[6],mt=R[7],At=R[8],Bt=R[9],Jt=R[10],Zt=R[11],hr=R[12],Pr=R[13],tn=R[14],jr=R[15],mn=U*Ye-ee*Ee,cn=U*ot-ue*Ee,yn=U*mt-xe*Ee,Ln=ee*ot-ue*Ye,On=ee*mt-xe*Ye,jn=ue*mt-xe*ot,Yn=At*Pr-Bt*hr,va=At*tn-Jt*hr,oa=At*jr-Zt*hr,ha=Bt*tn-Jt*Pr,Ra=Bt*jr-Zt*Pr,da=Jt*jr-Zt*tn,ma=mn*da-cn*Ra+yn*ha+Ln*oa-On*va+jn*Yn;return ma?(ma=1/ma,D[0]=(Ye*da-ot*Ra+mt*ha)*ma,D[1]=(ue*Ra-ee*da-xe*ha)*ma,D[2]=(Pr*jn-tn*On+jr*Ln)*ma,D[3]=(Jt*On-Bt*jn-Zt*Ln)*ma,D[4]=(ot*oa-Ee*da-mt*va)*ma,D[5]=(U*da-ue*oa+xe*va)*ma,D[6]=(tn*yn-hr*jn-jr*cn)*ma,D[7]=(At*jn-Jt*yn+Zt*cn)*ma,D[8]=(Ee*Ra-Ye*oa+mt*Yn)*ma,D[9]=(ee*oa-U*Ra-xe*Yn)*ma,D[10]=(hr*On-Pr*yn+jr*mn)*ma,D[11]=(Bt*yn-At*On-Zt*mn)*ma,D[12]=(Ye*va-Ee*ha-ot*Yn)*ma,D[13]=(U*ha-ee*va+ue*Yn)*ma,D[14]=(Pr*cn-hr*Ln-tn*mn)*ma,D[15]=(At*Ln-Bt*cn+Jt*mn)*ma,D):null}function Ju(D,R,U){var ee=R[0],ue=R[1],xe=R[2],Ee=R[3],Ye=R[4],ot=R[5],mt=R[6],At=R[7],Bt=R[8],Jt=R[9],Zt=R[10],hr=R[11],Pr=R[12],tn=R[13],jr=R[14],mn=R[15],cn=U[0],yn=U[1],Ln=U[2],On=U[3];return D[0]=cn*ee+yn*Ye+Ln*Bt+On*Pr,D[1]=cn*ue+yn*ot+Ln*Jt+On*tn,D[2]=cn*xe+yn*mt+Ln*Zt+On*jr,D[3]=cn*Ee+yn*At+Ln*hr+On*mn,cn=U[4],yn=U[5],Ln=U[6],On=U[7],D[4]=cn*ee+yn*Ye+Ln*Bt+On*Pr,D[5]=cn*ue+yn*ot+Ln*Jt+On*tn,D[6]=cn*xe+yn*mt+Ln*Zt+On*jr,D[7]=cn*Ee+yn*At+Ln*hr+On*mn,cn=U[8],yn=U[9],Ln=U[10],On=U[11],D[8]=cn*ee+yn*Ye+Ln*Bt+On*Pr,D[9]=cn*ue+yn*ot+Ln*Jt+On*tn,D[10]=cn*xe+yn*mt+Ln*Zt+On*jr,D[11]=cn*Ee+yn*At+Ln*hr+On*mn,cn=U[12],yn=U[13],Ln=U[14],On=U[15],D[12]=cn*ee+yn*Ye+Ln*Bt+On*Pr,D[13]=cn*ue+yn*ot+Ln*Jt+On*tn,D[14]=cn*xe+yn*mt+Ln*Zt+On*jr,D[15]=cn*Ee+yn*At+Ln*hr+On*mn,D}function Ri(D,R,U){var ee=U[0],ue=U[1],xe=U[2],Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr;return R===D?(D[12]=R[0]*ee+R[4]*ue+R[8]*xe+R[12],D[13]=R[1]*ee+R[5]*ue+R[9]*xe+R[13],D[14]=R[2]*ee+R[6]*ue+R[10]*xe+R[14],D[15]=R[3]*ee+R[7]*ue+R[11]*xe+R[15]):(Ee=R[0],Ye=R[1],ot=R[2],mt=R[3],At=R[4],Bt=R[5],Jt=R[6],Zt=R[7],hr=R[8],Pr=R[9],tn=R[10],jr=R[11],D[0]=Ee,D[1]=Ye,D[2]=ot,D[3]=mt,D[4]=At,D[5]=Bt,D[6]=Jt,D[7]=Zt,D[8]=hr,D[9]=Pr,D[10]=tn,D[11]=jr,D[12]=Ee*ee+At*ue+hr*xe+R[12],D[13]=Ye*ee+Bt*ue+Pr*xe+R[13],D[14]=ot*ee+Jt*ue+tn*xe+R[14],D[15]=mt*ee+Zt*ue+jr*xe+R[15]),D}function Vo(D,R,U){var ee=U[0],ue=U[1],xe=U[2];return D[0]=R[0]*ee,D[1]=R[1]*ee,D[2]=R[2]*ee,D[3]=R[3]*ee,D[4]=R[4]*ue,D[5]=R[5]*ue,D[6]=R[6]*ue,D[7]=R[7]*ue,D[8]=R[8]*xe,D[9]=R[9]*xe,D[10]=R[10]*xe,D[11]=R[11]*xe,D[12]=R[12],D[13]=R[13],D[14]=R[14],D[15]=R[15],D}function Ho(D,R,U){var ee=Math.sin(U),ue=Math.cos(U),xe=R[4],Ee=R[5],Ye=R[6],ot=R[7],mt=R[8],At=R[9],Bt=R[10],Jt=R[11];return R!==D&&(D[0]=R[0],D[1]=R[1],D[2]=R[2],D[3]=R[3],D[12]=R[12],D[13]=R[13],D[14]=R[14],D[15]=R[15]),D[4]=xe*ue+mt*ee,D[5]=Ee*ue+At*ee,D[6]=Ye*ue+Bt*ee,D[7]=ot*ue+Jt*ee,D[8]=mt*ue-xe*ee,D[9]=At*ue-Ee*ee,D[10]=Bt*ue-Ye*ee,D[11]=Jt*ue-ot*ee,D}function Bf(D,R,U){var ee=Math.sin(U),ue=Math.cos(U),xe=R[0],Ee=R[1],Ye=R[2],ot=R[3],mt=R[4],At=R[5],Bt=R[6],Jt=R[7];return R!==D&&(D[8]=R[8],D[9]=R[9],D[10]=R[10],D[11]=R[11],D[12]=R[12],D[13]=R[13],D[14]=R[14],D[15]=R[15]),D[0]=xe*ue+mt*ee,D[1]=Ee*ue+At*ee,D[2]=Ye*ue+Bt*ee,D[3]=ot*ue+Jt*ee,D[4]=mt*ue-xe*ee,D[5]=At*ue-Ee*ee,D[6]=Bt*ue-Ye*ee,D[7]=Jt*ue-ot*ee,D}function lc(D,R,U,ee,ue){var xe=1/Math.tan(R/2),Ee;return D[0]=xe/U,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=xe,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[11]=-1,D[12]=0,D[13]=0,D[15]=0,ue!=null&&ue!==1/0?(Ee=1/(ee-ue),D[10]=(ue+ee)*Ee,D[14]=2*ue*ee*Ee):(D[10]=-1,D[14]=-2*ee),D}function eh(D,R,U,ee,ue,xe,Ee){var Ye=1/(R-U),ot=1/(ee-ue),mt=1/(xe-Ee);return D[0]=-2*Ye,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=-2*ot,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=2*mt,D[11]=0,D[12]=(R+U)*Ye,D[13]=(ue+ee)*ot,D[14]=(Ee+xe)*mt,D[15]=1,D}var th=Ju;function Ef(){var D=new eo(3);return eo!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0),D}function rh(D){var R=new eo(3);return R[0]=D[0],R[1]=D[1],R[2]=D[2],R}function Nf(D,R,U){return D[0]=R[0]+U[0],D[1]=R[1]+U[1],D[2]=R[2]+U[2],D}function nh(D,R,U){return D[0]=R[0]-U[0],D[1]=R[1]-U[1],D[2]=R[2]-U[2],D}function ah(D,R,U){return D[0]=R[0]*U,D[1]=R[1]*U,D[2]=R[2]*U,D}function uc(D,R){var U=R[0],ee=R[1],ue=R[2],xe=U*U+ee*ee+ue*ue;return xe>0&&(xe=1/Math.sqrt(xe)),D[0]=R[0]*xe,D[1]=R[1]*xe,D[2]=R[2]*xe,D}function Nv(D,R){return D[0]*R[0]+D[1]*R[1]+D[2]*R[2]}function Uv(D,R,U){var ee=R[0],ue=R[1],xe=R[2],Ee=U[0],Ye=U[1],ot=U[2];return D[0]=ue*ot-xe*Ye,D[1]=xe*Ee-ee*ot,D[2]=ee*Ye-ue*Ee,D}function Vv(D,R,U){var ee=R[0],ue=R[1],xe=R[2];return D[0]=ee*U[0]+ue*U[3]+xe*U[6],D[1]=ee*U[1]+ue*U[4]+xe*U[7],D[2]=ee*U[2]+ue*U[5]+xe*U[8],D}var Hv=nh;(function(){var D=Ef();return function(R,U,ee,ue,xe,Ee){var Ye,ot;for(U||(U=3),ee||(ee=0),ue?ot=Math.min(ue*U+ee,R.length):ot=R.length,Ye=ee;Ye<ot;Ye+=U)D[0]=R[Ye],D[1]=R[Ye+1],D[2]=R[Ye+2],xe(D,D,Ee),R[Ye]=D[0],R[Ye+1]=D[1],R[Ye+2]=D[2];return R}})();function Gv(){var D=new eo(4);return eo!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0,D[3]=0),D}function Wv(D,R,U){return D[0]=R[0]*U,D[1]=R[1]*U,D[2]=R[2]*U,D[3]=R[3]*U,D}function Yv(D,R){return D[0]*R[0]+D[1]*R[1]+D[2]*R[2]+D[3]*R[3]}function Ic(D,R,U){var ee=R[0],ue=R[1],xe=R[2],Ee=R[3];return D[0]=U[0]*ee+U[4]*ue+U[8]*xe+U[12]*Ee,D[1]=U[1]*ee+U[5]*ue+U[9]*xe+U[13]*Ee,D[2]=U[2]*ee+U[6]*ue+U[10]*xe+U[14]*Ee,D[3]=U[3]*ee+U[7]*ue+U[11]*xe+U[15]*Ee,D}(function(){var D=Gv();return function(R,U,ee,ue,xe,Ee){var Ye,ot;for(U||(U=4),ee||(ee=0),ue?ot=Math.min(ue*U+ee,R.length):ot=R.length,Ye=ee;Ye<ot;Ye+=U)D[0]=R[Ye],D[1]=R[Ye+1],D[2]=R[Ye+2],D[3]=R[Ye+3],xe(D,D,Ee),R[Ye]=D[0],R[Ye+1]=D[1],R[Ye+2]=D[2],R[Ye+3]=D[3];return R}})();function Xv(){var D=new eo(2);return eo!=Float32Array&&(D[0]=0,D[1]=0),D}function Zv(D){var R=D[0],U=D[1];return R*R+U*U}var jv=Zv;(function(){var D=Xv();return function(R,U,ee,ue,xe,Ee){var Ye,ot;for(U||(U=2),ee||(ee=0),ue?ot=Math.min(ue*U+ee,R.length):ot=R.length,Ye=ee;Ye<ot;Ye+=U)D[0]=R[Ye],D[1]=R[Ye+1],xe(D,D,Ee),R[Ye]=D[0],R[Ye+1]=D[1];return R}})();var Kv=function(D){function R(U){D.call(this,U,Zu)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(ee){return new ii(ee)},R.prototype.queryRadius=function(ee){var ue=ee;return Po("circle-radius",this,ue)+Po("circle-stroke-width",this,ue)+Ms(this.paint.get("circle-translate"))},R.prototype.queryIntersectsFeature=function(ee,ue,xe,Ee,Ye,ot,mt,At){for(var Bt=Tl(ee,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),ot.angle,mt),Jt=this.paint.get("circle-radius").evaluate(ue,xe),Zt=this.paint.get("circle-stroke-width").evaluate(ue,xe),hr=Jt+Zt,Pr=this.paint.get("circle-pitch-alignment")==="map",tn=Pr?Bt:Jv(Bt,At),jr=Pr?hr*mt:hr,mn=0,cn=Ee;mn<cn.length;mn+=1)for(var yn=cn[mn],Ln=0,On=yn;Ln<On.length;Ln+=1){var jn=On[Ln],Yn=Pr?jn:Rh(jn,At),va=jr,oa=Ic([],[jn.x,jn.y,0,1],At);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?va*=oa[3]/ot.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(va*=ot.cameraToCenterDistance/oa[3]),Ha(tn,Yn,va))return!0}return!1},R}(Mi);function Rh(D,R){var U=Ic([],[D.x,D.y,0,1],R);return new r(U[0]/U[3],U[1]/U[3])}function Jv(D,R){return D.map(function(U){return Rh(U,R)})}var Dh=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R}(ii);De("HeatmapBucket",Dh,{omit:["layers"]});function ih(D,R,U,ee){var ue=R.width,xe=R.height;if(!ee)ee=new Uint8Array(ue*xe*U);else if(ee instanceof Uint8ClampedArray)ee=new Uint8Array(ee.buffer);else if(ee.length!==ue*xe*U)throw new RangeError("mismatched image size");return D.width=ue,D.height=xe,D.data=ee,D}function Ih(D,R,U){var ee=R.width,ue=R.height;if(!(ee===D.width&&ue===D.height)){var xe=ih({},{width:ee,height:ue},U);oh(D,xe,{x:0,y:0},{x:0,y:0},{width:Math.min(D.width,ee),height:Math.min(D.height,ue)},U),D.width=ee,D.height=ue,D.data=xe.data}}function oh(D,R,U,ee,ue,xe){if(ue.width===0||ue.height===0)return R;if(ue.width>D.width||ue.height>D.height||U.x>D.width-ue.width||U.y>D.height-ue.height)throw new RangeError("out of range source coordinates for image copy");if(ue.width>R.width||ue.height>R.height||ee.x>R.width-ue.width||ee.y>R.height-ue.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ee=D.data,Ye=R.data,ot=0;ot<ue.height;ot++)for(var mt=((U.y+ot)*D.width+U.x)*xe,At=((ee.y+ot)*R.width+ee.x)*xe,Bt=0;Bt<ue.width*xe;Bt++)Ye[At+Bt]=Ee[mt+Bt];return R}var Cf=function(R,U){ih(this,R,1,U)};Cf.prototype.resize=function(R){Ih(this,R,1)},Cf.prototype.clone=function(){return new Cf({width:this.width,height:this.height},new Uint8Array(this.data))},Cf.copy=function(R,U,ee,ue,xe){oh(R,U,ee,ue,xe,1)};var Go=function(R,U){ih(this,R,4,U)};Go.prototype.resize=function(R){Ih(this,R,4)},Go.prototype.replace=function(R,U){U?this.data.set(R):R instanceof Uint8ClampedArray?this.data=new Uint8Array(R.buffer):this.data=R},Go.prototype.clone=function(){return new Go({width:this.width,height:this.height},new Uint8Array(this.data))},Go.copy=function(R,U,ee,ue,xe){oh(R,U,ee,ue,xe,4)},De("AlphaImage",Cf),De("RGBAImage",Go);var Qv=new ei({"heatmap-radius":new xa(yr.paint_heatmap["heatmap-radius"]),"heatmap-weight":new xa(yr.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new qn(yr.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Vi(yr.paint_heatmap["heatmap-color"]),"heatmap-opacity":new qn(yr.paint_heatmap["heatmap-opacity"])}),$v={paint:Qv};function kh(D){var R={},U=D.resolution||256,ee=D.clips?D.clips.length:1,ue=D.image||new Go({width:U,height:ee}),xe=function(mn,cn,yn){R[D.evaluationKey]=yn;var Ln=D.expression.evaluate(R);ue.data[mn+cn+0]=Math.floor(Ln.r*255/Ln.a),ue.data[mn+cn+1]=Math.floor(Ln.g*255/Ln.a),ue.data[mn+cn+2]=Math.floor(Ln.b*255/Ln.a),ue.data[mn+cn+3]=Math.floor(Ln.a*255)};if(D.clips)for(var mt=0,At=0;mt<ee;++mt,At+=U*4)for(var Bt=0,Jt=0;Bt<U;Bt++,Jt+=4){var Zt=Bt/(U-1),hr=D.clips[mt],Pr=hr.start,tn=hr.end,jr=Pr*(1-Zt)+tn*Zt;xe(At,Jt,jr)}else for(var Ee=0,Ye=0;Ee<U;Ee++,Ye+=4){var ot=Ee/(U-1);xe(0,Ye,ot)}return ue}var qv=function(D){function R(U){D.call(this,U,$v),this._updateColorRamp()}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(ee){return new Dh(ee)},R.prototype._handleSpecialPaintPropertyUpdate=function(ee){ee==="heatmap-color"&&this._updateColorRamp()},R.prototype._updateColorRamp=function(){var ee=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=kh({expression:ee,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},R.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},R.prototype.queryRadius=function(){return 0},R.prototype.queryIntersectsFeature=function(){return!1},R.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},R}(Mi),ed=new ei({"hillshade-illumination-direction":new qn(yr.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new qn(yr.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new qn(yr.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new qn(yr.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new qn(yr.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new qn(yr.paint_hillshade["hillshade-accent-color"])}),td={paint:ed},rd=function(D){function R(U){D.call(this,U,td)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},R}(Mi),nd=gi([{name:"a_pos",components:2,type:"Int16"}],4),ad=nd.members,sh=kc,id=kc;function kc(D,R,U){U=U||2;var ee=R&&R.length,ue=ee?R[0]*U:D.length,xe=_h(D,0,ue,U,!0),Ee=[];if(!xe||xe.next===xe.prev)return Ee;var Ye,ot,mt,At,Bt,Jt,Zt;if(ee&&(xe=fd(D,R,xe,U)),D.length>80*U){Ye=mt=D[0],ot=At=D[1];for(var hr=U;hr<ue;hr+=U)Bt=D[hr],Jt=D[hr+1],Bt<Ye&&(Ye=Bt),Jt<ot&&(ot=Jt),Bt>mt&&(mt=Bt),Jt>At&&(At=Jt);Zt=Math.max(mt-Ye,At-ot),Zt=Zt!==0?1/Zt:0}return fc(xe,Ee,U,Ye,ot,Zt),Ee}function _h(D,R,U,ee,ue){var xe,Ee;if(ue===fh(D,R,U,ee)>0)for(xe=R;xe<U;xe+=ee)Ee=Oh(xe,D[xe],D[xe+1],Ee);else for(xe=U-ee;xe>=R;xe-=ee)Ee=Oh(xe,D[xe],D[xe+1],Ee);return Ee&&_c(Ee,Ee.next)&&(hc(Ee),Ee=Ee.next),Ee}function Qu(D,R){if(!D)return D;R||(R=D);var U=D,ee;do if(ee=!1,!U.steiner&&(_c(U,U.next)||Gi(U.prev,U,U.next)===0)){if(hc(U),U=R=U.prev,U===U.next)break;ee=!0}else U=U.next;while(ee||U!==R);return R}function fc(D,R,U,ee,ue,xe,Ee){if(D){!Ee&&xe&&pd(D,ee,ue,xe);for(var Ye=D,ot,mt;D.prev!==D.next;){if(ot=D.prev,mt=D.next,xe?sd(D,ee,ue,xe):od(D)){R.push(ot.i/U),R.push(D.i/U),R.push(mt.i/U),hc(D),D=mt.next,Ye=mt.next;continue}if(D=mt,D===Ye){Ee?Ee===1?(D=ld(Qu(D),R,U),fc(D,R,U,ee,ue,xe,2)):Ee===2&&ud(D,R,U,ee,ue,xe):fc(Qu(D),R,U,ee,ue,xe,1);break}}}}function od(D){var R=D.prev,U=D,ee=D.next;if(Gi(R,U,ee)>=0)return!1;for(var ue=D.next.next;ue!==D.prev;){if(Uf(R.x,R.y,U.x,U.y,ee.x,ee.y,ue.x,ue.y)&&Gi(ue.prev,ue,ue.next)>=0)return!1;ue=ue.next}return!0}function sd(D,R,U,ee){var ue=D.prev,xe=D,Ee=D.next;if(Gi(ue,xe,Ee)>=0)return!1;for(var Ye=ue.x<xe.x?ue.x<Ee.x?ue.x:Ee.x:xe.x<Ee.x?xe.x:Ee.x,ot=ue.y<xe.y?ue.y<Ee.y?ue.y:Ee.y:xe.y<Ee.y?xe.y:Ee.y,mt=ue.x>xe.x?ue.x>Ee.x?ue.x:Ee.x:xe.x>Ee.x?xe.x:Ee.x,At=ue.y>xe.y?ue.y>Ee.y?ue.y:Ee.y:xe.y>Ee.y?xe.y:Ee.y,Bt=lh(Ye,ot,R,U,ee),Jt=lh(mt,At,R,U,ee),Zt=D.prevZ,hr=D.nextZ;Zt&&Zt.z>=Bt&&hr&&hr.z<=Jt;){if(Zt!==D.prev&&Zt!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,Zt.x,Zt.y)&&Gi(Zt.prev,Zt,Zt.next)>=0||(Zt=Zt.prevZ,hr!==D.prev&&hr!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,hr.x,hr.y)&&Gi(hr.prev,hr,hr.next)>=0))return!1;hr=hr.nextZ}for(;Zt&&Zt.z>=Bt;){if(Zt!==D.prev&&Zt!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,Zt.x,Zt.y)&&Gi(Zt.prev,Zt,Zt.next)>=0)return!1;Zt=Zt.prevZ}for(;hr&&hr.z<=Jt;){if(hr!==D.prev&&hr!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,hr.x,hr.y)&&Gi(hr.prev,hr,hr.next)>=0)return!1;hr=hr.nextZ}return!0}function ld(D,R,U){var ee=D;do{var ue=ee.prev,xe=ee.next.next;!_c(ue,xe)&&zh(ue,ee,ee.next,xe)&&cc(ue,xe)&&cc(xe,ue)&&(R.push(ue.i/U),R.push(ee.i/U),R.push(xe.i/U),hc(ee),hc(ee.next),ee=D=xe),ee=ee.next}while(ee!==D);return Qu(ee)}function ud(D,R,U,ee,ue,xe){var Ee=D;do{for(var Ye=Ee.next.next;Ye!==Ee.prev;){if(Ee.i!==Ye.i&&md(Ee,Ye)){var ot=Fh(Ee,Ye);Ee=Qu(Ee,Ee.next),ot=Qu(ot,ot.next),fc(Ee,R,U,ee,ue,xe),fc(ot,R,U,ee,ue,xe);return}Ye=Ye.next}Ee=Ee.next}while(Ee!==D)}function fd(D,R,U,ee){var ue=[],xe,Ee,Ye,ot,mt;for(xe=0,Ee=R.length;xe<Ee;xe++)Ye=R[xe]*ee,ot=xe<Ee-1?R[xe+1]*ee:D.length,mt=_h(D,Ye,ot,ee,!1),mt===mt.next&&(mt.steiner=!0),ue.push(yd(mt));for(ue.sort(cd),xe=0;xe<ue.length;xe++)hd(ue[xe],U),U=Qu(U,U.next);return U}function cd(D,R){return D.x-R.x}function hd(D,R){if(R=vd(D,R),R){var U=Fh(R,D);Qu(R,R.next),Qu(U,U.next)}}function vd(D,R){var U=R,ee=D.x,ue=D.y,xe=-1/0,Ee;do{if(ue<=U.y&&ue>=U.next.y&&U.next.y!==U.y){var Ye=U.x+(ue-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(Ye<=ee&&Ye>xe){if(xe=Ye,Ye===ee){if(ue===U.y)return U;if(ue===U.next.y)return U.next}Ee=U.x<U.next.x?U:U.next}}U=U.next}while(U!==R);if(!Ee)return null;if(ee===xe)return Ee;var ot=Ee,mt=Ee.x,At=Ee.y,Bt=1/0,Jt;U=Ee;do ee>=U.x&&U.x>=mt&&ee!==U.x&&Uf(ue<At?ee:xe,ue,mt,At,ue<At?xe:ee,ue,U.x,U.y)&&(Jt=Math.abs(ue-U.y)/(ee-U.x),cc(U,D)&&(Jt<Bt||Jt===Bt&&(U.x>Ee.x||U.x===Ee.x&&dd(Ee,U)))&&(Ee=U,Bt=Jt)),U=U.next;while(U!==ot);return Ee}function dd(D,R){return Gi(D.prev,D,R.prev)<0&&Gi(R.next,D,D.next)<0}function pd(D,R,U,ee){var ue=D;do ue.z===null&&(ue.z=lh(ue.x,ue.y,R,U,ee)),ue.prevZ=ue.prev,ue.nextZ=ue.next,ue=ue.next;while(ue!==D);ue.prevZ.nextZ=null,ue.prevZ=null,gd(ue)}function gd(D){var R,U,ee,ue,xe,Ee,Ye,ot,mt=1;do{for(U=D,D=null,xe=null,Ee=0;U;){for(Ee++,ee=U,Ye=0,R=0;R<mt&&(Ye++,ee=ee.nextZ,!!ee);R++);for(ot=mt;Ye>0||ot>0&&ee;)Ye!==0&&(ot===0||!ee||U.z<=ee.z)?(ue=U,U=U.nextZ,Ye--):(ue=ee,ee=ee.nextZ,ot--),xe?xe.nextZ=ue:D=ue,ue.prevZ=xe,xe=ue;U=ee}xe.nextZ=null,mt*=2}while(Ee>1);return D}function lh(D,R,U,ee,ue){return D=32767*(D-U)*ue,R=32767*(R-ee)*ue,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,D|R<<1}function yd(D){var R=D,U=D;do(R.x<U.x||R.x===U.x&&R.y<U.y)&&(U=R),R=R.next;while(R!==D);return U}function Uf(D,R,U,ee,ue,xe,Ee,Ye){return(ue-Ee)*(R-Ye)-(D-Ee)*(xe-Ye)>=0&&(D-Ee)*(ee-Ye)-(U-Ee)*(R-Ye)>=0&&(U-Ee)*(xe-Ye)-(ue-Ee)*(ee-Ye)>=0}function md(D,R){return D.next.i!==R.i&&D.prev.i!==R.i&&!xd(D,R)&&(cc(D,R)&&cc(R,D)&&bd(D,R)&&(Gi(D.prev,D,R.prev)||Gi(D,R.prev,R))||_c(D,R)&&Gi(D.prev,D,D.next)>0&&Gi(R.prev,R,R.next)>0)}function Gi(D,R,U){return(R.y-D.y)*(U.x-R.x)-(R.x-D.x)*(U.y-R.y)}function _c(D,R){return D.x===R.x&&D.y===R.y}function zh(D,R,U,ee){var ue=Fc(Gi(D,R,U)),xe=Fc(Gi(D,R,ee)),Ee=Fc(Gi(U,ee,D)),Ye=Fc(Gi(U,ee,R));return!!(ue!==xe&&Ee!==Ye||ue===0&&zc(D,U,R)||xe===0&&zc(D,ee,R)||Ee===0&&zc(U,D,ee)||Ye===0&&zc(U,R,ee))}function zc(D,R,U){return R.x<=Math.max(D.x,U.x)&&R.x>=Math.min(D.x,U.x)&&R.y<=Math.max(D.y,U.y)&&R.y>=Math.min(D.y,U.y)}function Fc(D){return D>0?1:D<0?-1:0}function xd(D,R){var U=D;do{if(U.i!==D.i&&U.next.i!==D.i&&U.i!==R.i&&U.next.i!==R.i&&zh(U,U.next,D,R))return!0;U=U.next}while(U!==D);return!1}function cc(D,R){return Gi(D.prev,D,D.next)<0?Gi(D,R,D.next)>=0&&Gi(D,D.prev,R)>=0:Gi(D,R,D.prev)<0||Gi(D,D.next,R)<0}function bd(D,R){var U=D,ee=!1,ue=(D.x+R.x)/2,xe=(D.y+R.y)/2;do U.y>xe!=U.next.y>xe&&U.next.y!==U.y&&ue<(U.next.x-U.x)*(xe-U.y)/(U.next.y-U.y)+U.x&&(ee=!ee),U=U.next;while(U!==D);return ee}function Fh(D,R){var U=new uh(D.i,D.x,D.y),ee=new uh(R.i,R.x,R.y),ue=D.next,xe=R.prev;return D.next=R,R.prev=D,U.next=ue,ue.prev=U,ee.next=U,U.prev=ee,xe.next=ee,ee.prev=xe,ee}function Oh(D,R,U,ee){var ue=new uh(D,R,U);return ee?(ue.next=ee.next,ue.prev=ee,ee.next.prev=ue,ee.next=ue):(ue.prev=ue,ue.next=ue),ue}function hc(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function uh(D,R,U){this.i=D,this.x=R,this.y=U,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}kc.deviation=function(D,R,U,ee){var ue=R&&R.length,xe=ue?R[0]*U:D.length,Ee=Math.abs(fh(D,0,xe,U));if(ue)for(var Ye=0,ot=R.length;Ye<ot;Ye++){var mt=R[Ye]*U,At=Ye<ot-1?R[Ye+1]*U:D.length;Ee-=Math.abs(fh(D,mt,At,U))}var Bt=0;for(Ye=0;Ye<ee.length;Ye+=3){var Jt=ee[Ye]*U,Zt=ee[Ye+1]*U,hr=ee[Ye+2]*U;Bt+=Math.abs((D[Jt]-D[hr])*(D[Zt+1]-D[Jt+1])-(D[Jt]-D[Zt])*(D[hr+1]-D[Jt+1]))}return Ee===0&&Bt===0?0:Math.abs((Bt-Ee)/Ee)};function fh(D,R,U,ee){for(var ue=0,xe=R,Ee=U-ee;xe<U;xe+=ee)ue+=(D[Ee]-D[xe])*(D[xe+1]+D[Ee+1]),Ee=xe;return ue}kc.flatten=function(D){for(var R=D[0][0].length,U={vertices:[],holes:[],dimensions:R},ee=0,ue=0;ue<D.length;ue++){for(var xe=0;xe<D[ue].length;xe++)for(var Ee=0;Ee<R;Ee++)U.vertices.push(D[ue][xe][Ee]);ue>0&&(ee+=D[ue-1].length,U.holes.push(ee))}return U},sh.default=id;function wd(D,R,U,ee,ue){Bh(D,R,U,ee||D.length-1,ue)}function Bh(D,R,U,ee,ue){for(;ee>U;){if(ee-U>600){var xe=ee-U+1,Ee=R-U+1,Ye=Math.log(xe),ot=.5*Math.exp(2*Ye/3),mt=.5*Math.sqrt(Ye*ot*(xe-ot)/xe)*(Ee-xe/2<0?-1:1),At=Math.max(U,Math.floor(R-Ee*ot/xe+mt)),Bt=Math.min(ee,Math.floor(R+(xe-Ee)*ot/xe+mt));Bh(D,R,At,Bt,ue)}var Jt=D[R],Zt=U,hr=ee;for(vc(D,U,R),ue(D[ee],Jt)>0&&vc(D,U,ee);Zt<hr;){for(vc(D,Zt,hr),Zt++,hr--;ue(D[Zt],Jt)<0;)Zt++;for(;ue(D[hr],Jt)>0;)hr--}ue(D[U],Jt)===0?vc(D,U,hr):(hr++,vc(D,hr,ee)),hr<=R&&(U=hr+1),R<=hr&&(ee=hr-1)}}function vc(D,R,U){var ee=D[R];D[R]=D[U],D[U]=ee}function ch(D,R){var U=D.length;if(U<=1)return[D];for(var ee=[],ue,xe,Ee=0;Ee<U;Ee++){var Ye=N(D[Ee]);Ye!==0&&(D[Ee].area=Math.abs(Ye),xe===void 0&&(xe=Ye<0),xe===Ye<0?(ue&&ee.push(ue),ue=[D[Ee]]):ue.push(D[Ee]))}if(ue&&ee.push(ue),R>1)for(var ot=0;ot<ee.length;ot++)ee[ot].length<=R||(wd(ee[ot],R,1,ee[ot].length-1,Td),ee[ot]=ee[ot].slice(0,R));return ee}function Td(D,R){return R.area-D.area}function hh(D,R,U){for(var ee=U.patternDependencies,ue=!1,xe=0,Ee=R;xe<Ee.length;xe+=1){var Ye=Ee[xe],ot=Ye.paint.get(D+"-pattern");ot.isConstant()||(ue=!0);var mt=ot.constantOr(null);mt&&(ue=!0,ee[mt.to]=!0,ee[mt.from]=!0)}return ue}function vh(D,R,U,ee,ue){for(var xe=ue.patternDependencies,Ee=0,Ye=R;Ee<Ye.length;Ee+=1){var ot=Ye[Ee],mt=ot.paint.get(D+"-pattern"),At=mt.value;if(At.kind!=="constant"){var Bt=At.evaluate({zoom:ee-1},U,{},ue.availableImages),Jt=At.evaluate({zoom:ee},U,{},ue.availableImages),Zt=At.evaluate({zoom:ee+1},U,{},ue.availableImages);Bt=Bt&&Bt.name?Bt.name:Bt,Jt=Jt&&Jt.name?Jt.name:Jt,Zt=Zt&&Zt.name?Zt.name:Zt,xe[Bt]=!0,xe[Jt]=!0,xe[Zt]=!0,U.patterns[ot.id]={min:Bt,mid:Jt,max:Zt}}}return U}var Ad=500,Al=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new hu,this.indexArray=new wl,this.indexArray2=new Mf,this.programConfigurations=new ia(R.layers,R.zoom),this.segments=new Hi,this.segments2=new Hi,this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};Al.prototype.populate=function(R,U,ee){this.hasPattern=hh("fill",this.layers,U);for(var ue=this.layers[0].layout.get("fill-sort-key"),xe=[],Ee=0,Ye=R;Ee<Ye.length;Ee+=1){var ot=Ye[Ee],mt=ot.feature,At=ot.id,Bt=ot.index,Jt=ot.sourceLayerIndex,Zt=this.layers[0]._featureFilter.needGeometry,hr=fi(mt,Zt);if(this.layers[0]._featureFilter.filter(new pa(this.zoom),hr,ee)){var Pr=ue?ue.evaluate(hr,{},ee,U.availableImages):void 0,tn={id:At,properties:mt.properties,type:mt.type,sourceLayerIndex:Jt,index:Bt,geometry:Zt?hr.geometry:Wa(mt),patterns:{},sortKey:Pr};xe.push(tn)}}ue&&xe.sort(function(oa,ha){return oa.sortKey-ha.sortKey});for(var jr=0,mn=xe;jr<mn.length;jr+=1){var cn=mn[jr],yn=cn,Ln=yn.geometry,On=yn.index,jn=yn.sourceLayerIndex;if(this.hasPattern){var Yn=vh("fill",this.layers,cn,this.zoom,U);this.patternFeatures.push(Yn)}else this.addFeature(cn,Ln,On,ee,{});var va=R[On].feature;U.featureIndex.insert(va,Ln,On,jn,this.index)}},Al.prototype.update=function(R,U,ee){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,U,this.stateDependentLayers,ee)},Al.prototype.addFeatures=function(R,U,ee){for(var ue=0,xe=this.patternFeatures;ue<xe.length;ue+=1){var Ee=xe[ue];this.addFeature(Ee,Ee.geometry,Ee.index,U,ee)}},Al.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Al.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Al.prototype.upload=function(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,ad),this.indexBuffer=R.createIndexBuffer(this.indexArray),this.indexBuffer2=R.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(R),this.uploaded=!0},Al.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Al.prototype.addFeature=function(R,U,ee,ue,xe){for(var Ee=0,Ye=ch(U,Ad);Ee<Ye.length;Ee+=1){for(var ot=Ye[Ee],mt=0,At=0,Bt=ot;At<Bt.length;At+=1){var Jt=Bt[At];mt+=Jt.length}for(var Zt=this.segments.prepareSegment(mt,this.layoutVertexArray,this.indexArray),hr=Zt.vertexLength,Pr=[],tn=[],jr=0,mn=ot;jr<mn.length;jr+=1){var cn=mn[jr];if(cn.length!==0){cn!==ot[0]&&tn.push(Pr.length/2);var yn=this.segments2.prepareSegment(cn.length,this.layoutVertexArray,this.indexArray2),Ln=yn.vertexLength;this.layoutVertexArray.emplaceBack(cn[0].x,cn[0].y),this.indexArray2.emplaceBack(Ln+cn.length-1,Ln),Pr.push(cn[0].x),Pr.push(cn[0].y);for(var On=1;On<cn.length;On++)this.layoutVertexArray.emplaceBack(cn[On].x,cn[On].y),this.indexArray2.emplaceBack(Ln+On-1,Ln+On),Pr.push(cn[On].x),Pr.push(cn[On].y);yn.vertexLength+=cn.length,yn.primitiveLength+=cn.length}}for(var jn=sh(Pr,tn),Yn=0;Yn<jn.length;Yn+=3)this.indexArray.emplaceBack(hr+jn[Yn],hr+jn[Yn+1],hr+jn[Yn+2]);Zt.vertexLength+=mt,Zt.primitiveLength+=jn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ee,xe,ue)},De("FillBucket",Al,{omit:["layers","patternFeatures"]});var Md=new ei({"fill-sort-key":new xa(yr.layout_fill["fill-sort-key"])}),Sd=new ei({"fill-antialias":new qn(yr.paint_fill["fill-antialias"]),"fill-opacity":new xa(yr.paint_fill["fill-opacity"]),"fill-color":new xa(yr.paint_fill["fill-color"]),"fill-outline-color":new xa(yr.paint_fill["fill-outline-color"]),"fill-translate":new qn(yr.paint_fill["fill-translate"]),"fill-translate-anchor":new qn(yr.paint_fill["fill-translate-anchor"]),"fill-pattern":new so(yr.paint_fill["fill-pattern"])}),Ed={paint:Sd,layout:Md},Cd=function(D){function R(U){D.call(this,U,Ed)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.recalculate=function(ee,ue){D.prototype.recalculate.call(this,ee,ue);var xe=this.paint._values["fill-outline-color"];xe.value.kind==="constant"&&xe.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},R.prototype.createBucket=function(ee){return new Al(ee)},R.prototype.queryRadius=function(){return Ms(this.paint.get("fill-translate"))},R.prototype.queryIntersectsFeature=function(ee,ue,xe,Ee,Ye,ot,mt){var At=Tl(ee,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),ot.angle,mt);return Si(At,Ee)},R.prototype.isTileClipped=function(){return!0},R}(Mi),Ld=gi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Pd=Ld.members,Nh=Vf;function Vf(D,R,U,ee,ue){this.properties={},this.extent=U,this.type=0,this._pbf=D,this._geometry=-1,this._keys=ee,this._values=ue,D.readFields(Rd,this,R)}function Rd(D,R,U){D==1?R.id=U.readVarint():D==2?Dd(U,R):D==3?R.type=U.readVarint():D==4&&(R._geometry=U.pos)}function Dd(D,R){for(var U=D.readVarint()+D.pos;D.pos<U;){var ee=R._keys[D.readVarint()],ue=R._values[D.readVarint()];R.properties[ee]=ue}}Vf.types=["Unknown","Point","LineString","Polygon"],Vf.prototype.loadGeometry=function(){var D=this._pbf;D.pos=this._geometry;for(var R=D.readVarint()+D.pos,U=1,ee=0,ue=0,xe=0,Ee=[],Ye;D.pos<R;){if(ee<=0){var ot=D.readVarint();U=ot&7,ee=ot>>3}if(ee--,U===1||U===2)ue+=D.readSVarint(),xe+=D.readSVarint(),U===1&&(Ye&&Ee.push(Ye),Ye=[]),Ye.push(new r(ue,xe));else if(U===7)Ye&&Ye.push(Ye[0].clone());else throw new Error("unknown command "+U)}return Ye&&Ee.push(Ye),Ee},Vf.prototype.bbox=function(){var D=this._pbf;D.pos=this._geometry;for(var R=D.readVarint()+D.pos,U=1,ee=0,ue=0,xe=0,Ee=1/0,Ye=-1/0,ot=1/0,mt=-1/0;D.pos<R;){if(ee<=0){var At=D.readVarint();U=At&7,ee=At>>3}if(ee--,U===1||U===2)ue+=D.readSVarint(),xe+=D.readSVarint(),ue<Ee&&(Ee=ue),ue>Ye&&(Ye=ue),xe<ot&&(ot=xe),xe>mt&&(mt=xe);else if(U!==7)throw new Error("unknown command "+U)}return[Ee,ot,Ye,mt]},Vf.prototype.toGeoJSON=function(D,R,U){var ee=this.extent*Math.pow(2,U),ue=this.extent*D,xe=this.extent*R,Ee=this.loadGeometry(),Ye=Vf.types[this.type],ot,mt;function At(Zt){for(var hr=0;hr<Zt.length;hr++){var Pr=Zt[hr],tn=180-(Pr.y+xe)*360/ee;Zt[hr]=[(Pr.x+ue)*360/ee-180,360/Math.PI*Math.atan(Math.exp(tn*Math.PI/180))-90]}}switch(this.type){case 1:var Bt=[];for(ot=0;ot<Ee.length;ot++)Bt[ot]=Ee[ot][0];Ee=Bt,At(Ee);break;case 2:for(ot=0;ot<Ee.length;ot++)At(Ee[ot]);break;case 3:for(Ee=Id(Ee),ot=0;ot<Ee.length;ot++)for(mt=0;mt<Ee[ot].length;mt++)At(Ee[ot][mt]);break}Ee.length===1?Ee=Ee[0]:Ye="Multi"+Ye;var Jt={type:"Feature",geometry:{type:Ye,coordinates:Ee},properties:this.properties};return"id"in this&&(Jt.id=this.id),Jt};function Id(D){var R=D.length;if(R<=1)return[D];for(var U=[],ee,ue,xe=0;xe<R;xe++){var Ee=kd(D[xe]);Ee!==0&&(ue===void 0&&(ue=Ee<0),ue===Ee<0?(ee&&U.push(ee),ee=[D[xe]]):ee.push(D[xe]))}return ee&&U.push(ee),U}function kd(D){for(var R=0,U=0,ee=D.length,ue=ee-1,xe,Ee;U<ee;ue=U++)xe=D[U],Ee=D[ue],R+=(Ee.x-xe.x)*(xe.y+Ee.y);return R}var Uh=Vh;function Vh(D,R){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=D,this._keys=[],this._values=[],this._features=[],D.readFields(_d,this,R),this.length=this._features.length}function _d(D,R,U){D===15?R.version=U.readVarint():D===1?R.name=U.readString():D===5?R.extent=U.readVarint():D===2?R._features.push(U.pos):D===3?R._keys.push(U.readString()):D===4&&R._values.push(zd(U))}function zd(D){for(var R=null,U=D.readVarint()+D.pos;D.pos<U;){var ee=D.readVarint()>>3;R=ee===1?D.readString():ee===2?D.readFloat():ee===3?D.readDouble():ee===4?D.readVarint64():ee===5?D.readVarint():ee===6?D.readSVarint():ee===7?D.readBoolean():null}return R}Vh.prototype.feature=function(D){if(D<0||D>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[D];var R=this._pbf.readVarint()+this._pbf.pos;return new Nh(this._pbf,R,this.extent,this._keys,this._values)};var Fd=Od;function Od(D,R){this.layers=D.readFields(Bd,{},R)}function Bd(D,R,U){if(D===3){var ee=new Uh(U,U.readVarint()+U.pos);ee.length&&(R[ee.name]=ee)}}var Nd=Fd,Ud=Nh,Vd=Uh,Hf={VectorTile:Nd,VectorTileFeature:Ud,VectorTileLayer:Vd},Hd=Hf.VectorTileFeature.types,Gd=500,dh=Math.pow(2,13);function dc(D,R,U,ee,ue,xe,Ee,Ye){D.emplaceBack(R,U,Math.floor(ee*dh)*2+Ee,ue*dh*2,xe*dh*2,Math.round(Ye))}var Ml=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new Wl,this.indexArray=new wl,this.programConfigurations=new ia(R.layers,R.zoom),this.segments=new Hi,this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};Ml.prototype.populate=function(R,U,ee){this.features=[],this.hasPattern=hh("fill-extrusion",this.layers,U);for(var ue=0,xe=R;ue<xe.length;ue+=1){var Ee=xe[ue],Ye=Ee.feature,ot=Ee.id,mt=Ee.index,At=Ee.sourceLayerIndex,Bt=this.layers[0]._featureFilter.needGeometry,Jt=fi(Ye,Bt);if(this.layers[0]._featureFilter.filter(new pa(this.zoom),Jt,ee)){var Zt={id:ot,sourceLayerIndex:At,index:mt,geometry:Bt?Jt.geometry:Wa(Ye),properties:Ye.properties,type:Ye.type,patterns:{}};this.hasPattern?this.features.push(vh("fill-extrusion",this.layers,Zt,this.zoom,U)):this.addFeature(Zt,Zt.geometry,mt,ee,{}),U.featureIndex.insert(Ye,Zt.geometry,mt,At,this.index,!0)}}},Ml.prototype.addFeatures=function(R,U,ee){for(var ue=0,xe=this.features;ue<xe.length;ue+=1){var Ee=xe[ue],Ye=Ee.geometry;this.addFeature(Ee,Ye,Ee.index,U,ee)}},Ml.prototype.update=function(R,U,ee){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,U,this.stateDependentLayers,ee)},Ml.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ml.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ml.prototype.upload=function(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Pd),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0},Ml.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ml.prototype.addFeature=function(R,U,ee,ue,xe){for(var Ee=0,Ye=ch(U,Gd);Ee<Ye.length;Ee+=1){for(var ot=Ye[Ee],mt=0,At=0,Bt=ot;At<Bt.length;At+=1){var Jt=Bt[At];mt+=Jt.length}for(var Zt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),hr=0,Pr=ot;hr<Pr.length;hr+=1){var tn=Pr[hr];if(tn.length!==0&&!Yd(tn))for(var jr=0,mn=0;mn<tn.length;mn++){var cn=tn[mn];if(mn>=1){var yn=tn[mn-1];if(!Wd(cn,yn)){Zt.vertexLength+4>Hi.MAX_VERTEX_ARRAY_LENGTH&&(Zt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Ln=cn.sub(yn)._perp()._unit(),On=yn.dist(cn);jr+On>32768&&(jr=0),dc(this.layoutVertexArray,cn.x,cn.y,Ln.x,Ln.y,0,0,jr),dc(this.layoutVertexArray,cn.x,cn.y,Ln.x,Ln.y,0,1,jr),jr+=On,dc(this.layoutVertexArray,yn.x,yn.y,Ln.x,Ln.y,0,0,jr),dc(this.layoutVertexArray,yn.x,yn.y,Ln.x,Ln.y,0,1,jr);var jn=Zt.vertexLength;this.indexArray.emplaceBack(jn,jn+2,jn+1),this.indexArray.emplaceBack(jn+1,jn+2,jn+3),Zt.vertexLength+=4,Zt.primitiveLength+=2}}}}if(Zt.vertexLength+mt>Hi.MAX_VERTEX_ARRAY_LENGTH&&(Zt=this.segments.prepareSegment(mt,this.layoutVertexArray,this.indexArray)),Hd[R.type]==="Polygon"){for(var Yn=[],va=[],oa=Zt.vertexLength,ha=0,Ra=ot;ha<Ra.length;ha+=1){var da=Ra[ha];if(da.length!==0){da!==ot[0]&&va.push(Yn.length/2);for(var ma=0;ma<da.length;ma++){var _a=da[ma];dc(this.layoutVertexArray,_a.x,_a.y,0,0,1,1,0),Yn.push(_a.x),Yn.push(_a.y)}}}for(var La=sh(Yn,va),Ja=0;Ja<La.length;Ja+=3)this.indexArray.emplaceBack(oa+La[Ja],oa+La[Ja+2],oa+La[Ja+1]);Zt.primitiveLength+=La.length/3,Zt.vertexLength+=mt}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ee,xe,ue)},De("FillExtrusionBucket",Ml,{omit:["layers","features"]});function Wd(D,R){return D.x===R.x&&(D.x<0||D.x>ga)||D.y===R.y&&(D.y<0||D.y>ga)}function Yd(D){return D.every(function(R){return R.x<0})||D.every(function(R){return R.x>ga})||D.every(function(R){return R.y<0})||D.every(function(R){return R.y>ga})}var Xd=new ei({"fill-extrusion-opacity":new qn(yr["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new xa(yr["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new qn(yr["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new qn(yr["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new so(yr["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new xa(yr["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new xa(yr["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new qn(yr["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Zd={paint:Xd},jd=function(D){function R(U){D.call(this,U,Zd)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(ee){return new Ml(ee)},R.prototype.queryRadius=function(){return Ms(this.paint.get("fill-extrusion-translate"))},R.prototype.is3D=function(){return!0},R.prototype.queryIntersectsFeature=function(ee,ue,xe,Ee,Ye,ot,mt,At){var Bt=Tl(ee,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ot.angle,mt),Jt=this.paint.get("fill-extrusion-height").evaluate(ue,xe),Zt=this.paint.get("fill-extrusion-base").evaluate(ue,xe),hr=Qd(Bt,At,ot,0),Pr=Jd(Ee,Zt,Jt,At),tn=Pr[0],jr=Pr[1];return Kd(tn,jr,hr)},R}(Mi);function pc(D,R){return D.x*R.x+D.y*R.y}function Hh(D,R){if(D.length===1){for(var U=0,ee=R[U++],ue;!ue||ee.equals(ue);)if(ue=R[U++],!ue)return 1/0;for(;U<R.length;U++){var xe=R[U],Ee=D[0],Ye=ue.sub(ee),ot=xe.sub(ee),mt=Ee.sub(ee),At=pc(Ye,Ye),Bt=pc(Ye,ot),Jt=pc(ot,ot),Zt=pc(mt,Ye),hr=pc(mt,ot),Pr=At*Jt-Bt*Bt,tn=(Jt*Zt-Bt*hr)/Pr,jr=(At*hr-Bt*Zt)/Pr,mn=1-tn-jr,cn=ee.z*mn+ue.z*tn+xe.z*jr;if(isFinite(cn))return cn}return 1/0}else{for(var yn=1/0,Ln=0,On=R;Ln<On.length;Ln+=1){var jn=On[Ln];yn=Math.min(yn,jn.z)}return yn}}function Kd(D,R,U){var ee=1/0;Si(U,R)&&(ee=Hh(U,R[0]));for(var ue=0;ue<R.length;ue++)for(var xe=R[ue],Ee=D[ue],Ye=0;Ye<xe.length-1;Ye++){var ot=xe[Ye],mt=xe[Ye+1],At=Ee[Ye],Bt=Ee[Ye+1],Jt=[ot,mt,Bt,At,ot];ka(U,Jt)&&(ee=Math.min(ee,Hh(U,Jt)))}return ee===1/0?!1:ee}function Jd(D,R,U,ee){for(var ue=[],xe=[],Ee=ee[8]*R,Ye=ee[9]*R,ot=ee[10]*R,mt=ee[11]*R,At=ee[8]*U,Bt=ee[9]*U,Jt=ee[10]*U,Zt=ee[11]*U,hr=0,Pr=D;hr<Pr.length;hr+=1){for(var tn=Pr[hr],jr=[],mn=[],cn=0,yn=tn;cn<yn.length;cn+=1){var Ln=yn[cn],On=Ln.x,jn=Ln.y,Yn=ee[0]*On+ee[4]*jn+ee[12],va=ee[1]*On+ee[5]*jn+ee[13],oa=ee[2]*On+ee[6]*jn+ee[14],ha=ee[3]*On+ee[7]*jn+ee[15],Ra=Yn+Ee,da=va+Ye,ma=oa+ot,_a=ha+mt,La=Yn+At,Ja=va+Bt,si=oa+Jt,Qa=ha+Zt,$a=new r(Ra/_a,da/_a);$a.z=ma/_a,jr.push($a);var Ya=new r(La/Qa,Ja/Qa);Ya.z=si/Qa,mn.push(Ya)}ue.push(jr),xe.push(mn)}return[ue,xe]}function Qd(D,R,U,ee){for(var ue=[],xe=0,Ee=D;xe<Ee.length;xe+=1){var Ye=Ee[xe],ot=[Ye.x,Ye.y,ee,1];Ic(ot,ot,R),ue.push(new r(ot[0]/ot[3],ot[1]/ot[3]))}return ue}var $d=gi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),qd=$d.members,ep=gi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),tp=ep.members,rp=Hf.VectorTileFeature.types,Gh=63,np=Math.cos(75/2*(Math.PI/180)),ap=15,ip=20,op=15,Wh=1/2,Yh=Math.pow(2,op-1)/Wh,Ro=function(R){var U=this;this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(ee){return ee.id}),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(ee){U.gradients[ee.id]={}}),this.layoutVertexArray=new Hu,this.layoutVertexArray2=new Gu,this.indexArray=new wl,this.programConfigurations=new ia(R.layers,R.zoom),this.segments=new Hi,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(ee){return ee.isStateDependent()}).map(function(ee){return ee.id})};Ro.prototype.populate=function(R,U,ee){this.hasPattern=hh("line",this.layers,U);for(var ue=this.layers[0].layout.get("line-sort-key"),xe=[],Ee=0,Ye=R;Ee<Ye.length;Ee+=1){var ot=Ye[Ee],mt=ot.feature,At=ot.id,Bt=ot.index,Jt=ot.sourceLayerIndex,Zt=this.layers[0]._featureFilter.needGeometry,hr=fi(mt,Zt);if(this.layers[0]._featureFilter.filter(new pa(this.zoom),hr,ee)){var Pr=ue?ue.evaluate(hr,{},ee):void 0,tn={id:At,properties:mt.properties,type:mt.type,sourceLayerIndex:Jt,index:Bt,geometry:Zt?hr.geometry:Wa(mt),patterns:{},sortKey:Pr};xe.push(tn)}}ue&&xe.sort(function(oa,ha){return oa.sortKey-ha.sortKey});for(var jr=0,mn=xe;jr<mn.length;jr+=1){var cn=mn[jr],yn=cn,Ln=yn.geometry,On=yn.index,jn=yn.sourceLayerIndex;if(this.hasPattern){var Yn=vh("line",this.layers,cn,this.zoom,U);this.patternFeatures.push(Yn)}else this.addFeature(cn,Ln,On,ee,{});var va=R[On].feature;U.featureIndex.insert(va,Ln,On,jn,this.index)}},Ro.prototype.update=function(R,U,ee){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,U,this.stateDependentLayers,ee)},Ro.prototype.addFeatures=function(R,U,ee){for(var ue=0,xe=this.patternFeatures;ue<xe.length;ue+=1){var Ee=xe[ue];this.addFeature(Ee,Ee.geometry,Ee.index,U,ee)}},Ro.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ro.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ro.prototype.upload=function(R){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=R.createVertexBuffer(this.layoutVertexArray2,tp)),this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,qd),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0},Ro.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ro.prototype.lineFeatureClips=function(R){if(R.properties&&R.properties.hasOwnProperty("mapbox_clip_start")&&R.properties.hasOwnProperty("mapbox_clip_end")){var U=+R.properties.mapbox_clip_start,ee=+R.properties.mapbox_clip_end;return{start:U,end:ee}}},Ro.prototype.addFeature=function(R,U,ee,ue,xe){var Ee=this.layers[0].layout,Ye=Ee.get("line-join").evaluate(R,{}),ot=Ee.get("line-cap"),mt=Ee.get("line-miter-limit"),At=Ee.get("line-round-limit");this.lineClips=this.lineFeatureClips(R);for(var Bt=0,Jt=U;Bt<Jt.length;Bt+=1){var Zt=Jt[Bt];this.addLine(Zt,R,Ye,ot,mt,At)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ee,xe,ue)},Ro.prototype.addLine=function(R,U,ee,ue,xe,Ee){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var Ye=0;Ye<R.length-1;Ye++)this.totalDistance+=R[Ye].dist(R[Ye+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var ot=rp[U.type]==="Polygon",mt=R.length;mt>=2&&R[mt-1].equals(R[mt-2]);)mt--;for(var At=0;At<mt-1&&R[At].equals(R[At+1]);)At++;if(!(mt<(ot?3:2))){ee==="bevel"&&(xe=1.05);var Bt=this.overscaling<=16?ap*ga/(512*this.overscaling):0,Jt=this.segments.prepareSegment(mt*10,this.layoutVertexArray,this.indexArray),Zt,hr=void 0,Pr=void 0,tn=void 0,jr=void 0;this.e1=this.e2=-1,ot&&(Zt=R[mt-2],jr=R[At].sub(Zt)._unit()._perp());for(var mn=At;mn<mt;mn++)if(Pr=mn===mt-1?ot?R[At+1]:void 0:R[mn+1],!(Pr&&R[mn].equals(Pr))){jr&&(tn=jr),Zt&&(hr=Zt),Zt=R[mn],jr=Pr?Pr.sub(Zt)._unit()._perp():tn,tn=tn||jr;var cn=tn.add(jr);(cn.x!==0||cn.y!==0)&&cn._unit();var yn=tn.x*jr.x+tn.y*jr.y,Ln=cn.x*jr.x+cn.y*jr.y,On=Ln!==0?1/Ln:1/0,jn=2*Math.sqrt(2-2*Ln),Yn=Ln<np&&hr&&Pr,va=tn.x*jr.y-tn.y*jr.x>0;if(Yn&&mn>At){var oa=Zt.dist(hr);if(oa>2*Bt){var ha=Zt.sub(Zt.sub(hr)._mult(Bt/oa)._round());this.updateDistance(hr,ha),this.addCurrentVertex(ha,tn,0,0,Jt),hr=ha}}var Ra=hr&&Pr,da=Ra?ee:ot?"butt":ue;if(Ra&&da==="round"&&(On<Ee?da="miter":On<=2&&(da="fakeround")),da==="miter"&&On>xe&&(da="bevel"),da==="bevel"&&(On>2&&(da="flipbevel"),On<xe&&(da="miter")),hr&&this.updateDistance(hr,Zt),da==="miter")cn._mult(On),this.addCurrentVertex(Zt,cn,0,0,Jt);else if(da==="flipbevel"){if(On>100)cn=jr.mult(-1);else{var ma=On*tn.add(jr).mag()/tn.sub(jr).mag();cn._perp()._mult(ma*(va?-1:1))}this.addCurrentVertex(Zt,cn,0,0,Jt),this.addCurrentVertex(Zt,cn.mult(-1),0,0,Jt)}else if(da==="bevel"||da==="fakeround"){var _a=-Math.sqrt(On*On-1),La=va?_a:0,Ja=va?0:_a;if(hr&&this.addCurrentVertex(Zt,tn,La,Ja,Jt),da==="fakeround")for(var si=Math.round(jn*180/Math.PI/ip),Qa=1;Qa<si;Qa++){var $a=Qa/si;if($a!==.5){var Ya=$a-.5,ci=1.0904+yn*(-3.2452+yn*(3.55645-yn*1.43519)),vi=.848013+yn*(-1.06021+yn*.215638);$a=$a+$a*Ya*($a-1)*(ci*Ya*Ya+vi)}var Ei=jr.sub(tn)._mult($a)._add(tn)._unit()._mult(va?-1:1);this.addHalfVertex(Zt,Ei.x,Ei.y,!1,va,0,Jt)}Pr&&this.addCurrentVertex(Zt,jr,-La,-Ja,Jt)}else if(da==="butt")this.addCurrentVertex(Zt,cn,0,0,Jt);else if(da==="square"){var Di=hr?1:-1;this.addCurrentVertex(Zt,cn,Di,Di,Jt)}else da==="round"&&(hr&&(this.addCurrentVertex(Zt,tn,0,0,Jt),this.addCurrentVertex(Zt,tn,1,1,Jt,!0)),Pr&&(this.addCurrentVertex(Zt,jr,-1,-1,Jt,!0),this.addCurrentVertex(Zt,jr,0,0,Jt)));if(Yn&&mn<mt-1){var ro=Zt.dist(Pr);if(ro>2*Bt){var Xi=Zt.add(Pr.sub(Zt)._mult(Bt/ro)._round());this.updateDistance(Zt,Xi),this.addCurrentVertex(Xi,jr,0,0,Jt),Zt=Xi}}}}},Ro.prototype.addCurrentVertex=function(R,U,ee,ue,xe,Ee){Ee===void 0&&(Ee=!1);var Ye=U.x+U.y*ee,ot=U.y-U.x*ee,mt=-U.x+U.y*ue,At=-U.y-U.x*ue;this.addHalfVertex(R,Ye,ot,Ee,!1,ee,xe),this.addHalfVertex(R,mt,At,Ee,!0,-ue,xe),this.distance>Yh/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(R,U,ee,ue,xe,Ee))},Ro.prototype.addHalfVertex=function(R,U,ee,ue,xe,Ee,Ye){var ot=R.x,mt=R.y,At=this.lineClips?this.scaledDistance*(Yh-1):this.scaledDistance,Bt=At*Wh;if(this.layoutVertexArray.emplaceBack((ot<<1)+(ue?1:0),(mt<<1)+(xe?1:0),Math.round(Gh*U)+128,Math.round(Gh*ee)+128,(Ee===0?0:Ee<0?-1:1)+1|(Bt&63)<<2,Bt>>6),this.lineClips){var Jt=this.scaledDistance-this.lineClips.start,Zt=this.lineClips.end-this.lineClips.start,hr=Jt/Zt;this.layoutVertexArray2.emplaceBack(hr,this.lineClipsArray.length)}var Pr=Ye.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Pr),Ye.primitiveLength++),xe?this.e2=Pr:this.e1=Pr},Ro.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ro.prototype.updateDistance=function(R,U){this.distance+=R.dist(U),this.updateScaledDistance()},De("LineBucket",Ro,{omit:["layers","patternFeatures"]});var sp=new ei({"line-cap":new qn(yr.layout_line["line-cap"]),"line-join":new xa(yr.layout_line["line-join"]),"line-miter-limit":new qn(yr.layout_line["line-miter-limit"]),"line-round-limit":new qn(yr.layout_line["line-round-limit"]),"line-sort-key":new xa(yr.layout_line["line-sort-key"])}),lp=new ei({"line-opacity":new xa(yr.paint_line["line-opacity"]),"line-color":new xa(yr.paint_line["line-color"]),"line-translate":new qn(yr.paint_line["line-translate"]),"line-translate-anchor":new qn(yr.paint_line["line-translate-anchor"]),"line-width":new xa(yr.paint_line["line-width"]),"line-gap-width":new xa(yr.paint_line["line-gap-width"]),"line-offset":new xa(yr.paint_line["line-offset"]),"line-blur":new xa(yr.paint_line["line-blur"]),"line-dasharray":new ho(yr.paint_line["line-dasharray"]),"line-pattern":new so(yr.paint_line["line-pattern"]),"line-gradient":new Vi(yr.paint_line["line-gradient"])}),Xh={paint:lp,layout:sp},up=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.possiblyEvaluate=function(ee,ue){return ue=new pa(Math.floor(ue.zoom),{now:ue.now,fadeDuration:ue.fadeDuration,zoomHistory:ue.zoomHistory,transition:ue.transition}),D.prototype.possiblyEvaluate.call(this,ee,ue)},R.prototype.evaluate=function(ee,ue,xe,Ee){return ue=m({},ue,{zoom:Math.floor(ue.zoom)}),D.prototype.evaluate.call(this,ee,ue,xe,Ee)},R}(xa),Zh=new up(Xh.paint.properties["line-width"].specification);Zh.useIntegerZoom=!0;var fp=function(D){function R(U){D.call(this,U,Xh),this.gradientVersion=0}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._handleSpecialPaintPropertyUpdate=function(ee){if(ee==="line-gradient"){var ue=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=ue._styleExpression.expression instanceof wo,this.gradientVersion=(this.gradientVersion+1)%c}},R.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},R.prototype.recalculate=function(ee,ue){D.prototype.recalculate.call(this,ee,ue),this.paint._values["line-floorwidth"]=Zh.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ee)},R.prototype.createBucket=function(ee){return new Ro(ee)},R.prototype.queryRadius=function(ee){var ue=ee,xe=jh(Po("line-width",this,ue),Po("line-gap-width",this,ue)),Ee=Po("line-offset",this,ue);return xe/2+Math.abs(Ee)+Ms(this.paint.get("line-translate"))},R.prototype.queryIntersectsFeature=function(ee,ue,xe,Ee,Ye,ot,mt){var At=Tl(ee,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ot.angle,mt),Bt=mt/2*jh(this.paint.get("line-width").evaluate(ue,xe),this.paint.get("line-gap-width").evaluate(ue,xe)),Jt=this.paint.get("line-offset").evaluate(ue,xe);return Jt&&(Ee=cp(Ee,Jt*mt)),Ji(At,Ee,Bt)},R.prototype.isTileClipped=function(){return!0},R}(Mi);function jh(D,R){return R>0?R+2*D:D}function cp(D,R){for(var U=[],ee=new r(0,0),ue=0;ue<D.length;ue++){for(var xe=D[ue],Ee=[],Ye=0;Ye<xe.length;Ye++){var ot=xe[Ye-1],mt=xe[Ye],At=xe[Ye+1],Bt=Ye===0?ee:mt.sub(ot)._unit()._perp(),Jt=Ye===xe.length-1?ee:At.sub(mt)._unit()._perp(),Zt=Bt._add(Jt)._unit(),hr=Zt.x*Jt.x+Zt.y*Jt.y;Zt._mult(1/hr),Ee.push(Zt._mult(R)._add(mt))}U.push(Ee)}return U}var hp=gi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),vp=gi([{name:"a_projected_pos",components:3,type:"Float32"}],4);gi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var dp=gi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);gi([{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"}]);var Kh=gi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),pp=gi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);gi([{name:"triangle",components:3,type:"Uint16"}]),gi([{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"}]),gi([{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"}]),gi([{type:"Float32",name:"offsetX"}]),gi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function gp(D,R,U){var ee=R.layout.get("text-transform").evaluate(U,{});return ee==="uppercase"?D=D.toLocaleUpperCase():ee==="lowercase"&&(D=D.toLocaleLowerCase()),Hn.applyArabicShaping&&(D=Hn.applyArabicShaping(D)),D}function yp(D,R,U){return D.sections.forEach(function(ee){ee.text=gp(ee.text,R,U)}),D}function mp(D){var R={},U={},ee=[],ue=0;function xe(jr){ee.push(D[jr]),ue++}function Ee(jr,mn,cn){var yn=U[jr];return delete U[jr],U[mn]=yn,ee[yn].geometry[0].pop(),ee[yn].geometry[0]=ee[yn].geometry[0].concat(cn[0]),yn}function Ye(jr,mn,cn){var yn=R[mn];return delete R[mn],R[jr]=yn,ee[yn].geometry[0].shift(),ee[yn].geometry[0]=cn[0].concat(ee[yn].geometry[0]),yn}function ot(jr,mn,cn){var yn=cn?mn[0][mn[0].length-1]:mn[0][0];return jr+":"+yn.x+":"+yn.y}for(var mt=0;mt<D.length;mt++){var At=D[mt],Bt=At.geometry,Jt=At.text?At.text.toString():null;if(!Jt){xe(mt);continue}var Zt=ot(Jt,Bt),hr=ot(Jt,Bt,!0);if(Zt in U&&hr in R&&U[Zt]!==R[hr]){var Pr=Ye(Zt,hr,Bt),tn=Ee(Zt,hr,ee[Pr].geometry);delete R[Zt],delete U[hr],U[ot(Jt,ee[tn].geometry,!0)]=tn,ee[Pr].geometry=null}else Zt in U?Ee(Zt,hr,Bt):hr in R?Ye(Zt,hr,Bt):(xe(mt),R[Zt]=ue-1,U[hr]=ue-1)}return ee.filter(function(jr){return jr.geometry})}var gc={"!":"︕","#":"",$:"","%":"","&":"","(":"︵",")":"︶","*":"","+":"",",":"︐","-":"︲",".":"・","/":"",":":"︓",";":"︔","<":"︿","=":"",">":"﹀","?":"︖","@":"","[":"﹇","\\":"","]":"﹈","^":"",_:"︳","`":"","{":"︷","|":"―","}":"︸","~":"","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","":"︲","—":"︱","":"﹃","":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","":"︹","":"︺","〖":"︗","〗":"︘","":"︕","":"︵","":"︶","":"︐","":"︲","":"・","":"︓","":"︔","":"︿","":"﹀","":"︖","":"﹇","":"﹈","_":"︳","":"︷","":"―","":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function xp(D){for(var R="",U=0;U<D.length;U++){var ee=D.charCodeAt(U+1)||null,ue=D.charCodeAt(U-1)||null,xe=(!ee||!kr(ee)||gc[D[U+1]])&&(!ue||!kr(ue)||gc[D[U-1]]);xe&&gc[D[U]]?R+=gc[D[U]]:R+=D[U]}return R}var lo=24,bp=function(D,R,U,ee,ue){var xe,Ee,Ye=ue*8-ee-1,ot=(1<<Ye)-1,mt=ot>>1,At=-7,Bt=U?ue-1:0,Jt=U?-1:1,Zt=D[R+Bt];for(Bt+=Jt,xe=Zt&(1<<-At)-1,Zt>>=-At,At+=Ye;At>0;xe=xe*256+D[R+Bt],Bt+=Jt,At-=8);for(Ee=xe&(1<<-At)-1,xe>>=-At,At+=ee;At>0;Ee=Ee*256+D[R+Bt],Bt+=Jt,At-=8);if(xe===0)xe=1-mt;else{if(xe===ot)return Ee?NaN:(Zt?-1:1)*(1/0);Ee=Ee+Math.pow(2,ee),xe=xe-mt}return(Zt?-1:1)*Ee*Math.pow(2,xe-ee)},wp=function(D,R,U,ee,ue,xe){var Ee,Ye,ot,mt=xe*8-ue-1,At=(1<<mt)-1,Bt=At>>1,Jt=ue===23?Math.pow(2,-24)-Math.pow(2,-77):0,Zt=ee?0:xe-1,hr=ee?1:-1,Pr=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(Ye=isNaN(R)?1:0,Ee=At):(Ee=Math.floor(Math.log(R)/Math.LN2),R*(ot=Math.pow(2,-Ee))<1&&(Ee--,ot*=2),Ee+Bt>=1?R+=Jt/ot:R+=Jt*Math.pow(2,1-Bt),R*ot>=2&&(Ee++,ot/=2),Ee+Bt>=At?(Ye=0,Ee=At):Ee+Bt>=1?(Ye=(R*ot-1)*Math.pow(2,ue),Ee=Ee+Bt):(Ye=R*Math.pow(2,Bt-1)*Math.pow(2,ue),Ee=0));ue>=8;D[U+Zt]=Ye&255,Zt+=hr,Ye/=256,ue-=8);for(Ee=Ee<<ue|Ye,mt+=ue;mt>0;D[U+Zt]=Ee&255,Zt+=hr,Ee/=256,mt-=8);D[U+Zt-hr]|=Pr*128},Oc={read:bp,write:wp},Bc=hi;function hi(D){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(D)?D:new Uint8Array(D||0),this.pos=0,this.type=0,this.length=this.buf.length}hi.Varint=0,hi.Fixed64=1,hi.Bytes=2,hi.Fixed32=5;var ph=65536*65536,Jh=1/ph,Tp=12,Qh=typeof TextDecoder>"u"?null:new TextDecoder("utf8");hi.prototype={destroy:function(){this.buf=null},readFields:function(D,R,U){for(U=U||this.length;this.pos<U;){var ee=this.readVarint(),ue=ee>>3,xe=this.pos;this.type=ee&7,D(ue,R,this),this.pos===xe&&this.skip(ee)}return R},readMessage:function(D,R){return this.readFields(D,R,this.readVarint()+this.pos)},readFixed32:function(){var D=Nc(this.buf,this.pos);return this.pos+=4,D},readSFixed32:function(){var D=qh(this.buf,this.pos);return this.pos+=4,D},readFixed64:function(){var D=Nc(this.buf,this.pos)+Nc(this.buf,this.pos+4)*ph;return this.pos+=8,D},readSFixed64:function(){var D=Nc(this.buf,this.pos)+qh(this.buf,this.pos+4)*ph;return this.pos+=8,D},readFloat:function(){var D=Oc.read(this.buf,this.pos,!0,23,4);return this.pos+=4,D},readDouble:function(){var D=Oc.read(this.buf,this.pos,!0,52,8);return this.pos+=8,D},readVarint:function(D){var R=this.buf,U,ee;return ee=R[this.pos++],U=ee&127,ee<128||(ee=R[this.pos++],U|=(ee&127)<<7,ee<128)||(ee=R[this.pos++],U|=(ee&127)<<14,ee<128)||(ee=R[this.pos++],U|=(ee&127)<<21,ee<128)?U:(ee=R[this.pos],U|=(ee&15)<<28,Ap(U,D,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var D=this.readVarint();return D%2===1?(D+1)/-2:D/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var D=this.readVarint()+this.pos,R=this.pos;return this.pos=D,D-R>=Tp&&Qh?Op(this.buf,R,D):Fp(this.buf,R,D)},readBytes:function(){var D=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,D);return this.pos=D,R},readPackedVarint:function(D,R){if(this.type!==hi.Bytes)return D.push(this.readVarint(R));var U=gu(this);for(D=D||[];this.pos<U;)D.push(this.readVarint(R));return D},readPackedSVarint:function(D){if(this.type!==hi.Bytes)return D.push(this.readSVarint());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readSVarint());return D},readPackedBoolean:function(D){if(this.type!==hi.Bytes)return D.push(this.readBoolean());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readBoolean());return D},readPackedFloat:function(D){if(this.type!==hi.Bytes)return D.push(this.readFloat());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readFloat());return D},readPackedDouble:function(D){if(this.type!==hi.Bytes)return D.push(this.readDouble());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readDouble());return D},readPackedFixed32:function(D){if(this.type!==hi.Bytes)return D.push(this.readFixed32());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readFixed32());return D},readPackedSFixed32:function(D){if(this.type!==hi.Bytes)return D.push(this.readSFixed32());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readSFixed32());return D},readPackedFixed64:function(D){if(this.type!==hi.Bytes)return D.push(this.readFixed64());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readFixed64());return D},readPackedSFixed64:function(D){if(this.type!==hi.Bytes)return D.push(this.readSFixed64());var R=gu(this);for(D=D||[];this.pos<R;)D.push(this.readSFixed64());return D},skip:function(D){var R=D&7;if(R===hi.Varint)for(;this.buf[this.pos++]>127;);else if(R===hi.Bytes)this.pos=this.readVarint()+this.pos;else if(R===hi.Fixed32)this.pos+=4;else if(R===hi.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+R)},writeTag:function(D,R){this.writeVarint(D<<3|R)},realloc:function(D){for(var R=this.length||16;R<this.pos+D;)R*=2;if(R!==this.length){var U=new Uint8Array(R);U.set(this.buf),this.buf=U,this.length=R}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(D){this.realloc(4),Wf(this.buf,D,this.pos),this.pos+=4},writeSFixed32:function(D){this.realloc(4),Wf(this.buf,D,this.pos),this.pos+=4},writeFixed64:function(D){this.realloc(8),Wf(this.buf,D&-1,this.pos),Wf(this.buf,Math.floor(D*Jh),this.pos+4),this.pos+=8},writeSFixed64:function(D){this.realloc(8),Wf(this.buf,D&-1,this.pos),Wf(this.buf,Math.floor(D*Jh),this.pos+4),this.pos+=8},writeVarint:function(D){if(D=+D||0,D>268435455||D<0){Mp(D,this);return}this.realloc(4),this.buf[this.pos++]=D&127|(D>127?128:0),!(D<=127)&&(this.buf[this.pos++]=(D>>>=7)&127|(D>127?128:0),!(D<=127)&&(this.buf[this.pos++]=(D>>>=7)&127|(D>127?128:0),!(D<=127)&&(this.buf[this.pos++]=D>>>7&127)))},writeSVarint:function(D){this.writeVarint(D<0?-D*2-1:D*2)},writeBoolean:function(D){this.writeVarint(!!D)},writeString:function(D){D=String(D),this.realloc(D.length*4),this.pos++;var R=this.pos;this.pos=Bp(this.buf,D,this.pos);var U=this.pos-R;U>=128&&$h(R,U,this),this.pos=R-1,this.writeVarint(U),this.pos+=U},writeFloat:function(D){this.realloc(4),Oc.write(this.buf,D,this.pos,!0,23,4),this.pos+=4},writeDouble:function(D){this.realloc(8),Oc.write(this.buf,D,this.pos,!0,52,8),this.pos+=8},writeBytes:function(D){var R=D.length;this.writeVarint(R),this.realloc(R);for(var U=0;U<R;U++)this.buf[this.pos++]=D[U]},writeRawMessage:function(D,R){this.pos++;var U=this.pos;D(R,this);var ee=this.pos-U;ee>=128&&$h(U,ee,this),this.pos=U-1,this.writeVarint(ee),this.pos+=ee},writeMessage:function(D,R,U){this.writeTag(D,hi.Bytes),this.writeRawMessage(R,U)},writePackedVarint:function(D,R){R.length&&this.writeMessage(D,Cp,R)},writePackedSVarint:function(D,R){R.length&&this.writeMessage(D,Lp,R)},writePackedBoolean:function(D,R){R.length&&this.writeMessage(D,Dp,R)},writePackedFloat:function(D,R){R.length&&this.writeMessage(D,Pp,R)},writePackedDouble:function(D,R){R.length&&this.writeMessage(D,Rp,R)},writePackedFixed32:function(D,R){R.length&&this.writeMessage(D,Ip,R)},writePackedSFixed32:function(D,R){R.length&&this.writeMessage(D,kp,R)},writePackedFixed64:function(D,R){R.length&&this.writeMessage(D,_p,R)},writePackedSFixed64:function(D,R){R.length&&this.writeMessage(D,zp,R)},writeBytesField:function(D,R){this.writeTag(D,hi.Bytes),this.writeBytes(R)},writeFixed32Field:function(D,R){this.writeTag(D,hi.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(D,R){this.writeTag(D,hi.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(D,R){this.writeTag(D,hi.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(D,R){this.writeTag(D,hi.Fixed64),this.writeSFixed64(R)},writeVarintField:function(D,R){this.writeTag(D,hi.Varint),this.writeVarint(R)},writeSVarintField:function(D,R){this.writeTag(D,hi.Varint),this.writeSVarint(R)},writeStringField:function(D,R){this.writeTag(D,hi.Bytes),this.writeString(R)},writeFloatField:function(D,R){this.writeTag(D,hi.Fixed32),this.writeFloat(R)},writeDoubleField:function(D,R){this.writeTag(D,hi.Fixed64),this.writeDouble(R)},writeBooleanField:function(D,R){this.writeVarintField(D,!!R)}};function Ap(D,R,U){var ee=U.buf,ue,xe;if(xe=ee[U.pos++],ue=(xe&112)>>4,xe<128||(xe=ee[U.pos++],ue|=(xe&127)<<3,xe<128)||(xe=ee[U.pos++],ue|=(xe&127)<<10,xe<128)||(xe=ee[U.pos++],ue|=(xe&127)<<17,xe<128)||(xe=ee[U.pos++],ue|=(xe&127)<<24,xe<128)||(xe=ee[U.pos++],ue|=(xe&1)<<31,xe<128))return Gf(D,ue,R);throw new Error("Expected varint not more than 10 bytes")}function gu(D){return D.type===hi.Bytes?D.readVarint()+D.pos:D.pos+1}function Gf(D,R,U){return U?R*4294967296+(D>>>0):(R>>>0)*4294967296+(D>>>0)}function Mp(D,R){var U,ee;if(D>=0?(U=D%4294967296|0,ee=D/4294967296|0):(U=~(-D%4294967296),ee=~(-D/4294967296),U^4294967295?U=U+1|0:(U=0,ee=ee+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),Sp(U,ee,R),Ep(ee,R)}function Sp(D,R,U){U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos]=D&127}function Ep(D,R){var U=(D&7)<<4;R.buf[R.pos++]|=U|((D>>>=3)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127)))))}function $h(D,R,U){var ee=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(Math.LN2*7));U.realloc(ee);for(var ue=U.pos-1;ue>=D;ue--)U.buf[ue+ee]=U.buf[ue]}function Cp(D,R){for(var U=0;U<D.length;U++)R.writeVarint(D[U])}function Lp(D,R){for(var U=0;U<D.length;U++)R.writeSVarint(D[U])}function Pp(D,R){for(var U=0;U<D.length;U++)R.writeFloat(D[U])}function Rp(D,R){for(var U=0;U<D.length;U++)R.writeDouble(D[U])}function Dp(D,R){for(var U=0;U<D.length;U++)R.writeBoolean(D[U])}function Ip(D,R){for(var U=0;U<D.length;U++)R.writeFixed32(D[U])}function kp(D,R){for(var U=0;U<D.length;U++)R.writeSFixed32(D[U])}function _p(D,R){for(var U=0;U<D.length;U++)R.writeFixed64(D[U])}function zp(D,R){for(var U=0;U<D.length;U++)R.writeSFixed64(D[U])}function Nc(D,R){return(D[R]|D[R+1]<<8|D[R+2]<<16)+D[R+3]*16777216}function Wf(D,R,U){D[U]=R,D[U+1]=R>>>8,D[U+2]=R>>>16,D[U+3]=R>>>24}function qh(D,R){return(D[R]|D[R+1]<<8|D[R+2]<<16)+(D[R+3]<<24)}function Fp(D,R,U){for(var ee="",ue=R;ue<U;){var xe=D[ue],Ee=null,Ye=xe>239?4:xe>223?3:xe>191?2:1;if(ue+Ye>U)break;var ot,mt,At;Ye===1?xe<128&&(Ee=xe):Ye===2?(ot=D[ue+1],(ot&192)===128&&(Ee=(xe&31)<<6|ot&63,Ee<=127&&(Ee=null))):Ye===3?(ot=D[ue+1],mt=D[ue+2],(ot&192)===128&&(mt&192)===128&&(Ee=(xe&15)<<12|(ot&63)<<6|mt&63,(Ee<=2047||Ee>=55296&&Ee<=57343)&&(Ee=null))):Ye===4&&(ot=D[ue+1],mt=D[ue+2],At=D[ue+3],(ot&192)===128&&(mt&192)===128&&(At&192)===128&&(Ee=(xe&15)<<18|(ot&63)<<12|(mt&63)<<6|At&63,(Ee<=65535||Ee>=1114112)&&(Ee=null))),Ee===null?(Ee=65533,Ye=1):Ee>65535&&(Ee-=65536,ee+=String.fromCharCode(Ee>>>10&1023|55296),Ee=56320|Ee&1023),ee+=String.fromCharCode(Ee),ue+=Ye}return ee}function Op(D,R,U){return Qh.decode(D.subarray(R,U))}function Bp(D,R,U){for(var ee=0,ue,xe;ee<R.length;ee++){if(ue=R.charCodeAt(ee),ue>55295&&ue<57344)if(xe)if(ue<56320){D[U++]=239,D[U++]=191,D[U++]=189,xe=ue;continue}else ue=xe-55296<<10|ue-56320|65536,xe=null;else{ue>56319||ee+1===R.length?(D[U++]=239,D[U++]=191,D[U++]=189):xe=ue;continue}else xe&&(D[U++]=239,D[U++]=191,D[U++]=189,xe=null);ue<128?D[U++]=ue:(ue<2048?D[U++]=ue>>6|192:(ue<65536?D[U++]=ue>>12|224:(D[U++]=ue>>18|240,D[U++]=ue>>12&63|128),D[U++]=ue>>6&63|128),D[U++]=ue&63|128)}return U}var gh=3;function Np(D,R,U){D===1&&U.readMessage(Up,R)}function Up(D,R,U){if(D===3){var ee=U.readMessage(Vp,{}),ue=ee.id,xe=ee.bitmap,Ee=ee.width,Ye=ee.height,ot=ee.left,mt=ee.top,At=ee.advance;R.push({id:ue,bitmap:new Cf({width:Ee+2*gh,height:Ye+2*gh},xe),metrics:{width:Ee,height:Ye,left:ot,top:mt,advance:At}})}}function Vp(D,R,U){D===1?R.id=U.readVarint():D===2?R.bitmap=U.readBytes():D===3?R.width=U.readVarint():D===4?R.height=U.readVarint():D===5?R.left=U.readSVarint():D===6?R.top=U.readSVarint():D===7&&(R.advance=U.readVarint())}function Hp(D){return new Bc(D).readFields(Np,[])}var Gp=gh;function ev(D){for(var R=0,U=0,ee=0,ue=D;ee<ue.length;ee+=1){var xe=ue[ee];R+=xe.w*xe.h,U=Math.max(U,xe.w)}D.sort(function(tn,jr){return jr.h-tn.h});for(var Ee=Math.max(Math.ceil(Math.sqrt(R/.95)),U),Ye=[{x:0,y:0,w:Ee,h:1/0}],ot=0,mt=0,At=0,Bt=D;At<Bt.length;At+=1)for(var Jt=Bt[At],Zt=Ye.length-1;Zt>=0;Zt--){var hr=Ye[Zt];if(!(Jt.w>hr.w||Jt.h>hr.h)){if(Jt.x=hr.x,Jt.y=hr.y,mt=Math.max(mt,Jt.y+Jt.h),ot=Math.max(ot,Jt.x+Jt.w),Jt.w===hr.w&&Jt.h===hr.h){var Pr=Ye.pop();Zt<Ye.length&&(Ye[Zt]=Pr)}else Jt.h===hr.h?(hr.x+=Jt.w,hr.w-=Jt.w):Jt.w===hr.w?(hr.y+=Jt.h,hr.h-=Jt.h):(Ye.push({x:hr.x+Jt.w,y:hr.y,w:hr.w-Jt.w,h:Jt.h}),hr.y+=Jt.h,hr.h-=Jt.h);break}}return{w:ot,h:mt,fill:R/(ot*mt)||0}}var $o=1,Uc=function(R,U){var ee=U.pixelRatio,ue=U.version,xe=U.stretchX,Ee=U.stretchY,Ye=U.content;this.paddedRect=R,this.pixelRatio=ee,this.stretchX=xe,this.stretchY=Ee,this.content=Ye,this.version=ue},yc={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};yc.tl.get=function(){return[this.paddedRect.x+$o,this.paddedRect.y+$o]},yc.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-$o,this.paddedRect.y+this.paddedRect.h-$o]},yc.tlbr.get=function(){return this.tl.concat(this.br)},yc.displaySize.get=function(){return[(this.paddedRect.w-$o*2)/this.pixelRatio,(this.paddedRect.h-$o*2)/this.pixelRatio]},Object.defineProperties(Uc.prototype,yc);var mc=function(R,U){var ee={},ue={};this.haveRenderCallbacks=[];var xe=[];this.addImages(R,ee,xe),this.addImages(U,ue,xe);var Ee=ev(xe),Ye=Ee.w,ot=Ee.h,mt=new Go({width:Ye||1,height:ot||1});for(var At in R){var Bt=R[At],Jt=ee[At].paddedRect;Go.copy(Bt.data,mt,{x:0,y:0},{x:Jt.x+$o,y:Jt.y+$o},Bt.data)}for(var Zt in U){var hr=U[Zt],Pr=ue[Zt].paddedRect,tn=Pr.x+$o,jr=Pr.y+$o,mn=hr.data.width,cn=hr.data.height;Go.copy(hr.data,mt,{x:0,y:0},{x:tn,y:jr},hr.data),Go.copy(hr.data,mt,{x:0,y:cn-1},{x:tn,y:jr-1},{width:mn,height:1}),Go.copy(hr.data,mt,{x:0,y:0},{x:tn,y:jr+cn},{width:mn,height:1}),Go.copy(hr.data,mt,{x:mn-1,y:0},{x:tn-1,y:jr},{width:1,height:cn}),Go.copy(hr.data,mt,{x:0,y:0},{x:tn+mn,y:jr},{width:1,height:cn})}this.image=mt,this.iconPositions=ee,this.patternPositions=ue};mc.prototype.addImages=function(R,U,ee){for(var ue in R){var xe=R[ue],Ee={x:0,y:0,w:xe.data.width+2*$o,h:xe.data.height+2*$o};ee.push(Ee),U[ue]=new Uc(Ee,xe),xe.hasRenderCallback&&this.haveRenderCallbacks.push(ue)}},mc.prototype.patchUpdatedImages=function(R,U){R.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var ee in R.updatedImages)this.patchUpdatedImage(this.iconPositions[ee],R.getImage(ee),U),this.patchUpdatedImage(this.patternPositions[ee],R.getImage(ee),U)},mc.prototype.patchUpdatedImage=function(R,U,ee){if(!(!R||!U)&&R.version!==U.version){R.version=U.version;var ue=R.tl,xe=ue[0],Ee=ue[1];ee.update(U.data,void 0,{x:xe,y:Ee})}},De("ImagePosition",Uc),De("ImageAtlas",mc);var hs={horizontal:1,vertical:2,horizontalOnly:3},xc=-17;function Wp(D){for(var R=0,U=D;R<U.length;R+=1){var ee=U[R];if(ee.positionedGlyphs.length!==0)return!1}return!0}var tv=57344,rv=63743,Yf=function(){this.scale=1,this.fontStack="",this.imageName=null};Yf.forText=function(R,U){var ee=new Yf;return ee.scale=R||1,ee.fontStack=U,ee},Yf.forImage=function(R){var U=new Yf;return U.imageName=R,U};var yo=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};yo.fromFeature=function(R,U){for(var ee=new yo,ue=0;ue<R.sections.length;ue++){var xe=R.sections[ue];xe.image?ee.addImageSection(xe):ee.addTextSection(xe,U)}return ee},yo.prototype.length=function(){return this.text.length},yo.prototype.getSection=function(R){return this.sections[this.sectionIndex[R]]},yo.prototype.getSectionIndex=function(R){return this.sectionIndex[R]},yo.prototype.getCharCode=function(R){return this.text.charCodeAt(R)},yo.prototype.verticalizePunctuation=function(){this.text=xp(this.text)},yo.prototype.trim=function(){for(var R=0,U=0;U<this.text.length&&Zl[this.text.charCodeAt(U)];U++)R++;for(var ee=this.text.length,ue=this.text.length-1;ue>=0&&ue>=R&&Zl[this.text.charCodeAt(ue)];ue--)ee--;this.text=this.text.substring(R,ee),this.sectionIndex=this.sectionIndex.slice(R,ee)},yo.prototype.substring=function(R,U){var ee=new yo;return ee.text=this.text.substring(R,U),ee.sectionIndex=this.sectionIndex.slice(R,U),ee.sections=this.sections,ee},yo.prototype.toString=function(){return this.text},yo.prototype.getMaxScale=function(){var R=this;return this.sectionIndex.reduce(function(U,ee){return Math.max(U,R.sections[ee].scale)},0)},yo.prototype.addTextSection=function(R,U){this.text+=R.text,this.sections.push(Yf.forText(R.scale,R.fontStack||U));for(var ee=this.sections.length-1,ue=0;ue<R.text.length;++ue)this.sectionIndex.push(ee)},yo.prototype.addImageSection=function(R){var U=R.image?R.image.name:"";if(U.length===0){O("Can't add FormattedSection with an empty image.");return}var ee=this.getNextImageSectionCharCode();if(!ee){O("Reached maximum number of images "+(rv-tv+2));return}this.text+=String.fromCharCode(ee),this.sections.push(Yf.forImage(U)),this.sectionIndex.push(this.sections.length-1)},yo.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=rv?null:++this.imageSectionID:(this.imageSectionID=tv,this.imageSectionID)};function Yp(D,R){for(var U=[],ee=D.text,ue=0,xe=0,Ee=R;xe<Ee.length;xe+=1){var Ye=Ee[xe];U.push(D.substring(ue,Ye)),ue=Ye}return ue<ee.length&&U.push(D.substring(ue,ee.length)),U}function Vc(D,R,U,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr){var tn=yo.fromFeature(D,ue);Bt===hs.vertical&&tn.verticalizePunctuation();var jr,mn=Hn.processBidirectionalText,cn=Hn.processStyledBidirectionalText;if(mn&&tn.sections.length===1){jr=[];for(var yn=mn(tn.toString(),yh(tn,mt,xe,R,ee,Zt,hr)),Ln=0,On=yn;Ln<On.length;Ln+=1){var jn=On[Ln],Yn=new yo;Yn.text=jn,Yn.sections=tn.sections;for(var va=0;va<jn.length;va++)Yn.sectionIndex.push(0);jr.push(Yn)}}else if(cn){jr=[];for(var oa=cn(tn.text,tn.sectionIndex,yh(tn,mt,xe,R,ee,Zt,hr)),ha=0,Ra=oa;ha<Ra.length;ha+=1){var da=Ra[ha],ma=new yo;ma.text=da[0],ma.sectionIndex=da[1],ma.sections=tn.sections,jr.push(ma)}}else jr=Yp(tn,yh(tn,mt,xe,R,ee,Zt,hr));var _a=[],La={positionedLines:_a,text:tn.toString(),top:At[1],bottom:At[1],left:At[0],right:At[0],writingMode:Bt,iconsInText:!1,verticalizable:!1};return jp(La,R,U,ee,jr,Ee,Ye,ot,Bt,mt,Jt,Pr),Wp(_a)?!1:La}var Zl={};Zl[9]=!0,Zl[10]=!0,Zl[11]=!0,Zl[12]=!0,Zl[13]=!0,Zl[32]=!0;var qo={};qo[10]=!0,qo[32]=!0,qo[38]=!0,qo[40]=!0,qo[41]=!0,qo[43]=!0,qo[45]=!0,qo[47]=!0,qo[173]=!0,qo[183]=!0,qo[8203]=!0,qo[8208]=!0,qo[8211]=!0,qo[8231]=!0;function nv(D,R,U,ee,ue,xe){if(R.imageName){var ot=ee[R.imageName];return ot?ot.displaySize[0]*R.scale*lo/xe+ue:0}else{var Ee=U[R.fontStack],Ye=Ee&&Ee[D];return Ye?Ye.metrics.advance*R.scale+ue:0}}function Xp(D,R,U,ee,ue,xe){for(var Ee=0,Ye=0;Ye<D.length();Ye++){var ot=D.getSection(Ye);Ee+=nv(D.getCharCode(Ye),ot,ee,ue,R,xe)}var mt=Math.max(1,Math.ceil(Ee/U));return Ee/mt}function av(D,R,U,ee){var ue=Math.pow(D-R,2);return ee?D<R?ue/2:ue*2:ue+Math.abs(U)*U}function Zp(D,R,U){var ee=0;return D===10&&(ee-=1e4),U&&(ee+=150),(D===40||D===65288)&&(ee+=50),(R===41||R===65289)&&(ee+=50),ee}function iv(D,R,U,ee,ue,xe){for(var Ee=null,Ye=av(R,U,ue,xe),ot=0,mt=ee;ot<mt.length;ot+=1){var At=mt[ot],Bt=R-At.x,Jt=av(Bt,U,ue,xe)+At.badness;Jt<=Ye&&(Ee=At,Ye=Jt)}return{index:D,x:R,priorBreak:Ee,badness:Ye}}function ov(D){return D?ov(D.priorBreak).concat(D.index):[]}function yh(D,R,U,ee,ue,xe,Ee){if(xe!=="point")return[];if(!D)return[];for(var Ye=[],ot=Xp(D,R,U,ee,ue,Ee),mt=D.text.indexOf("")>=0,At=0,Bt=0;Bt<D.length();Bt++){var Jt=D.getSection(Bt),Zt=D.getCharCode(Bt);if(Zl[Zt]||(At+=nv(Zt,Jt,ee,ue,R,Ee)),Bt<D.length()-1){var hr=Wr(Zt);(qo[Zt]||hr||Jt.imageName)&&Ye.push(iv(Bt+1,At,ot,Ye,Zp(Zt,D.getCharCode(Bt+1),hr&&mt),!1))}}return ov(iv(D.length(),At,ot,Ye,0,!0))}function mh(D){var R=.5,U=.5;switch(D){case"right":case"top-right":case"bottom-right":R=1;break;case"left":case"top-left":case"bottom-left":R=0;break}switch(D){case"bottom":case"bottom-right":case"bottom-left":U=1;break;case"top":case"top-right":case"top-left":U=0;break}return{horizontalAlign:R,verticalAlign:U}}function jp(D,R,U,ee,ue,xe,Ee,Ye,ot,mt,At,Bt){for(var Jt=0,Zt=xc,hr=0,Pr=0,tn=Ye==="right"?1:Ye==="left"?0:.5,jr=0,mn=0,cn=ue;mn<cn.length;mn+=1){var yn=cn[mn];yn.trim();var Ln=yn.getMaxScale(),On=(Ln-1)*lo,jn={positionedGlyphs:[],lineOffset:0};D.positionedLines[jr]=jn;var Yn=jn.positionedGlyphs,va=0;if(!yn.length()){Zt+=xe,++jr;continue}for(var oa=0;oa<yn.length();oa++){var ha=yn.getSection(oa),Ra=yn.getSectionIndex(oa),da=yn.getCharCode(oa),ma=0,_a=null,La=null,Ja=null,si=lo,Qa=!(ot===hs.horizontal||!At&&!qr(da)||At&&(Zl[da]||Hr(da)));if(ha.imageName){var Ei=ee[ha.imageName];if(!Ei)continue;Ja=ha.imageName,D.iconsInText=D.iconsInText||!0,La=Ei.paddedRect;var Di=Ei.displaySize;ha.scale=ha.scale*lo/Bt,_a={width:Di[0],height:Di[1],left:$o,top:-3,advance:Qa?Di[1]:Di[0]};var ro=lo-Di[1]*ha.scale;ma=On+ro,si=_a.advance;var Xi=Qa?Di[0]*ha.scale-lo*Ln:Di[1]*ha.scale-lo*Ln;Xi>0&&Xi>va&&(va=Xi)}else{var $a=U[ha.fontStack],Ya=$a&&$a[da];if(Ya&&Ya.rect)La=Ya.rect,_a=Ya.metrics;else{var ci=R[ha.fontStack],vi=ci&&ci[da];if(!vi)continue;_a=vi.metrics}ma=(Ln-ha.scale)*lo}Qa?(D.verticalizable=!0,Yn.push({glyph:da,imageName:Ja,x:Jt,y:Zt+ma,vertical:Qa,scale:ha.scale,fontStack:ha.fontStack,sectionIndex:Ra,metrics:_a,rect:La}),Jt+=si*ha.scale+mt):(Yn.push({glyph:da,imageName:Ja,x:Jt,y:Zt+ma,vertical:Qa,scale:ha.scale,fontStack:ha.fontStack,sectionIndex:Ra,metrics:_a,rect:La}),Jt+=_a.advance*ha.scale+mt)}if(Yn.length!==0){var mo=Jt-mt;hr=Math.max(mo,hr),Kp(Yn,0,Yn.length-1,tn,va)}Jt=0;var xo=xe*Ln+va;jn.lineOffset=Math.max(va,On),Zt+=xo,Pr=Math.max(xo,Pr),++jr}var no=Zt-xc,Do=mh(Ee),Io=Do.horizontalAlign,Qi=Do.verticalAlign;Jp(D.positionedLines,tn,Io,Qi,hr,Pr,xe,no,ue.length),D.top+=-Qi*no,D.bottom=D.top+no,D.left+=-Io*hr,D.right=D.left+hr}function Kp(D,R,U,ee,ue){if(!(!ee&&!ue))for(var xe=D[U],Ee=xe.metrics.advance*xe.scale,Ye=(D[U].x+Ee)*ee,ot=R;ot<=U;ot++)D[ot].x-=Ye,D[ot].y+=ue}function Jp(D,R,U,ee,ue,xe,Ee,Ye,ot){var mt=(R-U)*ue,At=0;xe!==Ee?At=-Ye*ee-xc:At=(-ee*ot+.5)*Ee;for(var Bt=0,Jt=D;Bt<Jt.length;Bt+=1)for(var Zt=Jt[Bt],hr=0,Pr=Zt.positionedGlyphs;hr<Pr.length;hr+=1){var tn=Pr[hr];tn.x+=mt,tn.y+=At}}function Qp(D,R,U){var ee=mh(U),ue=ee.horizontalAlign,xe=ee.verticalAlign,Ee=R[0],Ye=R[1],ot=Ee-D.displaySize[0]*ue,mt=ot+D.displaySize[0],At=Ye-D.displaySize[1]*xe,Bt=At+D.displaySize[1];return{image:D,top:At,bottom:Bt,left:ot,right:mt}}function sv(D,R,U,ee,ue,xe){var Ee=D.image,Ye;if(Ee.content){var ot=Ee.content,mt=Ee.pixelRatio||1;Ye=[ot[0]/mt,ot[1]/mt,Ee.displaySize[0]-ot[2]/mt,Ee.displaySize[1]-ot[3]/mt]}var At=R.left*xe,Bt=R.right*xe,Jt,Zt,hr,Pr;U==="width"||U==="both"?(Pr=ue[0]+At-ee[3],Zt=ue[0]+Bt+ee[1]):(Pr=ue[0]+(At+Bt-Ee.displaySize[0])/2,Zt=Pr+Ee.displaySize[0]);var tn=R.top*xe,jr=R.bottom*xe;return U==="height"||U==="both"?(Jt=ue[1]+tn-ee[0],hr=ue[1]+jr+ee[2]):(Jt=ue[1]+(tn+jr-Ee.displaySize[1])/2,hr=Jt+Ee.displaySize[1]),{image:Ee,top:Jt,right:Zt,bottom:hr,left:Pr,collisionPadding:Ye}}var Xf=function(D){function R(U,ee,ue,xe){D.call(this,U,ee),this.angle=ue,xe!==void 0&&(this.segment=xe)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.clone=function(){return new R(this.x,this.y,this.angle,this.segment)},R}(r);De("Anchor",Xf);var Sl=128;function xh(D,R){var U=R.expression;if(U.kind==="constant"){var ee=U.evaluate(new pa(D+1));return{kind:"constant",layoutSize:ee}}else{if(U.kind==="source")return{kind:"source"};for(var ue=U.zoomStops,xe=U.interpolationType,Ee=0;Ee<ue.length&&ue[Ee]<=D;)Ee++;Ee=Math.max(0,Ee-1);for(var Ye=Ee;Ye<ue.length&&ue[Ye]<D+1;)Ye++;Ye=Math.min(ue.length-1,Ye);var ot=ue[Ee],mt=ue[Ye];if(U.kind==="composite")return{kind:"composite",minZoom:ot,maxZoom:mt,interpolationType:xe};var At=U.evaluate(new pa(ot)),Bt=U.evaluate(new pa(mt));return{kind:"camera",minZoom:ot,maxZoom:mt,minSize:At,maxSize:Bt,interpolationType:xe}}}function lv(D,R,U){var ee=R.uSize,ue=R.uSizeT,xe=U.lowerSize,Ee=U.upperSize;return D.kind==="source"?xe/Sl:D.kind==="composite"?yi(xe/Sl,Ee/Sl,ue):ee}function uv(D,R){var U=0,ee=0;if(D.kind==="constant")ee=D.layoutSize;else if(D.kind!=="source"){var ue=D.interpolationType,xe=D.minZoom,Ee=D.maxZoom,Ye=ue?h(bi.interpolationFactor(ue,R,xe,Ee),0,1):0;D.kind==="camera"?ee=yi(D.minSize,D.maxSize,Ye):U=Ye}return{uSizeT:U,uSize:ee}}var $p=Object.freeze({__proto__:null,getSizeData:xh,evaluateSizeForFeature:lv,evaluateSizeForZoom:uv,SIZE_PACK_FACTOR:Sl});function fv(D,R,U,ee,ue){if(R.segment===void 0)return!0;for(var xe=R,Ee=R.segment+1,Ye=0;Ye>-U/2;){if(Ee--,Ee<0)return!1;Ye-=D[Ee].dist(xe),xe=D[Ee]}Ye+=D[Ee].dist(D[Ee+1]),Ee++;for(var ot=[],mt=0;Ye<U/2;){var At=D[Ee-1],Bt=D[Ee],Jt=D[Ee+1];if(!Jt)return!1;var Zt=At.angleTo(Bt)-Bt.angleTo(Jt);for(Zt=Math.abs((Zt+3*Math.PI)%(Math.PI*2)-Math.PI),ot.push({distance:Ye,angleDelta:Zt}),mt+=Zt;Ye-ot[0].distance>ee;)mt-=ot.shift().angleDelta;if(mt>ue)return!1;Ee++,Ye+=Bt.dist(Jt)}return!0}function cv(D){for(var R=0,U=0;U<D.length-1;U++)R+=D[U].dist(D[U+1]);return R}function hv(D,R,U){return D?.6*R*U:0}function vv(D,R){return Math.max(D?D.right-D.left:0,R?R.right-R.left:0)}function qp(D,R,U,ee,ue,xe){for(var Ee=hv(U,ue,xe),Ye=vv(U,ee)*xe,ot=0,mt=cv(D)/2,At=0;At<D.length-1;At++){var Bt=D[At],Jt=D[At+1],Zt=Bt.dist(Jt);if(ot+Zt>mt){var hr=(mt-ot)/Zt,Pr=yi(Bt.x,Jt.x,hr),tn=yi(Bt.y,Jt.y,hr),jr=new Xf(Pr,tn,Jt.angleTo(Bt),At);return jr._round(),!Ee||fv(D,jr,Ye,Ee,R)?jr:void 0}ot+=Zt}}function e0(D,R,U,ee,ue,xe,Ee,Ye,ot){var mt=hv(ee,xe,Ee),At=vv(ee,ue),Bt=At*Ee,Jt=D[0].x===0||D[0].x===ot||D[0].y===0||D[0].y===ot;R-Bt<R/4&&(R=Bt+R/4);var Zt=xe*2,hr=Jt?R/2*Ye%R:(At/2+Zt)*Ee*Ye%R;return dv(D,hr,R,mt,U,Bt,Jt,!1,ot)}function dv(D,R,U,ee,ue,xe,Ee,Ye,ot){for(var mt=xe/2,At=cv(D),Bt=0,Jt=R-U,Zt=[],hr=0;hr<D.length-1;hr++){for(var Pr=D[hr],tn=D[hr+1],jr=Pr.dist(tn),mn=tn.angleTo(Pr);Jt+U<Bt+jr;){Jt+=U;var cn=(Jt-Bt)/jr,yn=yi(Pr.x,tn.x,cn),Ln=yi(Pr.y,tn.y,cn);if(yn>=0&&yn<ot&&Ln>=0&&Ln<ot&&Jt-mt>=0&&Jt+mt<=At){var On=new Xf(yn,Ln,mn,hr);On._round(),(!ee||fv(D,On,xe,ee,ue))&&Zt.push(On)}}Bt+=jr}return!Ye&&!Zt.length&&!Ee&&(Zt=dv(D,Bt/2,U,ee,ue,xe,Ee,!0,ot)),Zt}function pv(D,R,U,ee,ue){for(var xe=[],Ee=0;Ee<D.length;Ee++)for(var Ye=D[Ee],ot=void 0,mt=0;mt<Ye.length-1;mt++){var At=Ye[mt],Bt=Ye[mt+1];At.x<R&&Bt.x<R||(At.x<R?At=new r(R,At.y+(Bt.y-At.y)*((R-At.x)/(Bt.x-At.x)))._round():Bt.x<R&&(Bt=new r(R,At.y+(Bt.y-At.y)*((R-At.x)/(Bt.x-At.x)))._round()),!(At.y<U&&Bt.y<U)&&(At.y<U?At=new r(At.x+(Bt.x-At.x)*((U-At.y)/(Bt.y-At.y)),U)._round():Bt.y<U&&(Bt=new r(At.x+(Bt.x-At.x)*((U-At.y)/(Bt.y-At.y)),U)._round()),!(At.x>=ee&&Bt.x>=ee)&&(At.x>=ee?At=new r(ee,At.y+(Bt.y-At.y)*((ee-At.x)/(Bt.x-At.x)))._round():Bt.x>=ee&&(Bt=new r(ee,At.y+(Bt.y-At.y)*((ee-At.x)/(Bt.x-At.x)))._round()),!(At.y>=ue&&Bt.y>=ue)&&(At.y>=ue?At=new r(At.x+(Bt.x-At.x)*((ue-At.y)/(Bt.y-At.y)),ue)._round():Bt.y>=ue&&(Bt=new r(At.x+(Bt.x-At.x)*((ue-At.y)/(Bt.y-At.y)),ue)._round()),(!ot||!At.equals(ot[ot.length-1]))&&(ot=[At],xe.push(ot)),ot.push(Bt)))))}return xe}var bc=$o;function gv(D,R,U,ee){var ue=[],xe=D.image,Ee=xe.pixelRatio,Ye=xe.paddedRect.w-2*bc,ot=xe.paddedRect.h-2*bc,mt=D.right-D.left,At=D.bottom-D.top,Bt=xe.stretchX||[[0,Ye]],Jt=xe.stretchY||[[0,ot]],Zt=function($a,Ya){return $a+Ya[1]-Ya[0]},hr=Bt.reduce(Zt,0),Pr=Jt.reduce(Zt,0),tn=Ye-hr,jr=ot-Pr,mn=0,cn=hr,yn=0,Ln=Pr,On=0,jn=tn,Yn=0,va=jr;if(xe.content&&ee){var oa=xe.content;mn=Hc(Bt,0,oa[0]),yn=Hc(Jt,0,oa[1]),cn=Hc(Bt,oa[0],oa[2]),Ln=Hc(Jt,oa[1],oa[3]),On=oa[0]-mn,Yn=oa[1]-yn,jn=oa[2]-oa[0]-cn,va=oa[3]-oa[1]-Ln}var ha=function($a,Ya,ci,vi){var Ei=Gc($a.stretch-mn,cn,mt,D.left),Di=Wc($a.fixed-On,jn,$a.stretch,hr),ro=Gc(Ya.stretch-yn,Ln,At,D.top),Xi=Wc(Ya.fixed-Yn,va,Ya.stretch,Pr),mo=Gc(ci.stretch-mn,cn,mt,D.left),xo=Wc(ci.fixed-On,jn,ci.stretch,hr),no=Gc(vi.stretch-yn,Ln,At,D.top),Do=Wc(vi.fixed-Yn,va,vi.stretch,Pr),Io=new r(Ei,ro),Qi=new r(mo,ro),ko=new r(mo,no),vs=new r(Ei,no),xu=new r(Di/Ee,Xi/Ee),ef=new r(xo/Ee,Do/Ee),tf=R*Math.PI/180;if(tf){var rf=Math.sin(tf),ec=Math.cos(tf),Qs=[ec,-rf,rf,ec];Io._matMult(Qs),Qi._matMult(Qs),vs._matMult(Qs),ko._matMult(Qs)}var Jc=$a.stretch+$a.fixed,Ch=ci.stretch+ci.fixed,Qc=Ya.stretch+Ya.fixed,Lh=vi.stretch+vi.fixed,Es={x:xe.paddedRect.x+bc+Jc,y:xe.paddedRect.y+bc+Qc,w:Ch-Jc,h:Lh-Qc},tc=jn/Ee/mt,$c=va/Ee/At;return{tl:Io,tr:Qi,bl:vs,br:ko,tex:Es,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:xu,pixelOffsetBR:ef,minFontScaleX:tc,minFontScaleY:$c,isSDF:U}};if(!ee||!xe.stretchX&&!xe.stretchY)ue.push(ha({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Ye+1},{fixed:0,stretch:ot+1}));else for(var Ra=yv(Bt,tn,hr),da=yv(Jt,jr,Pr),ma=0;ma<Ra.length-1;ma++)for(var _a=Ra[ma],La=Ra[ma+1],Ja=0;Ja<da.length-1;Ja++){var si=da[Ja],Qa=da[Ja+1];ue.push(ha(_a,si,La,Qa))}return ue}function Hc(D,R,U){for(var ee=0,ue=0,xe=D;ue<xe.length;ue+=1){var Ee=xe[ue];ee+=Math.max(R,Math.min(U,Ee[1]))-Math.max(R,Math.min(U,Ee[0]))}return ee}function yv(D,R,U){for(var ee=[{fixed:-1,stretch:0}],ue=0,xe=D;ue<xe.length;ue+=1){var Ee=xe[ue],Ye=Ee[0],ot=Ee[1],mt=ee[ee.length-1];ee.push({fixed:Ye-mt.stretch,stretch:mt.stretch}),ee.push({fixed:Ye-mt.stretch,stretch:mt.stretch+(ot-Ye)})}return ee.push({fixed:R+bc,stretch:U}),ee}function Gc(D,R,U,ee){return D/R*U+ee}function Wc(D,R,U,ee){return D-R*U/ee}function t0(D,R,U,ee,ue,xe,Ee,Ye){for(var ot=ee.layout.get("text-rotate").evaluate(xe,{})*Math.PI/180,mt=[],At=0,Bt=R.positionedLines;At<Bt.length;At+=1)for(var Jt=Bt[At],Zt=0,hr=Jt.positionedGlyphs;Zt<hr.length;Zt+=1){var Pr=hr[Zt];if(Pr.rect){var tn=Pr.rect||{},jr=1,mn=Gp+jr,cn=!0,yn=1,Ln=0,On=(ue||Ye)&&Pr.vertical,jn=Pr.metrics.advance*Pr.scale/2;if(Ye&&R.verticalizable){var Yn=(Pr.scale-1)*lo,va=(lo-Pr.metrics.width*Pr.scale)/2;Ln=Jt.lineOffset/2-(Pr.imageName?-va:Yn)}if(Pr.imageName){var oa=Ee[Pr.imageName];cn=oa.sdf,yn=oa.pixelRatio,mn=$o/yn}var ha=ue?[Pr.x+jn,Pr.y]:[0,0],Ra=ue?[0,0]:[Pr.x+jn+U[0],Pr.y+U[1]-Ln],da=[0,0];On&&(da=Ra,Ra=[0,0]);var ma=(Pr.metrics.left-mn)*Pr.scale-jn+Ra[0],_a=(-Pr.metrics.top-mn)*Pr.scale+Ra[1],La=ma+tn.w*Pr.scale/yn,Ja=_a+tn.h*Pr.scale/yn,si=new r(ma,_a),Qa=new r(La,_a),$a=new r(ma,Ja),Ya=new r(La,Ja);if(On){var ci=new r(-jn,jn-xc),vi=-Math.PI/2,Ei=lo/2-jn,Di=Pr.imageName?Ei:0,ro=new r(5-xc-Ei,-Di),Xi=new(Function.prototype.bind.apply(r,[null].concat(da)));si._rotateAround(vi,ci)._add(ro)._add(Xi),Qa._rotateAround(vi,ci)._add(ro)._add(Xi),$a._rotateAround(vi,ci)._add(ro)._add(Xi),Ya._rotateAround(vi,ci)._add(ro)._add(Xi)}if(ot){var mo=Math.sin(ot),xo=Math.cos(ot),no=[xo,-mo,mo,xo];si._matMult(no),Qa._matMult(no),$a._matMult(no),Ya._matMult(no)}var Do=new r(0,0),Io=new r(0,0),Qi=0,ko=0;mt.push({tl:si,tr:Qa,bl:$a,br:Ya,tex:tn,writingMode:R.writingMode,glyphOffset:ha,sectionIndex:Pr.sectionIndex,isSDF:cn,pixelOffsetTL:Do,pixelOffsetBR:Io,minFontScaleX:Qi,minFontScaleY:ko})}}return mt}var Yc=function(R,U,ee,ue,xe,Ee,Ye,ot,mt,At){if(this.boxStartIndex=R.length,mt){var Bt=Ee.top,Jt=Ee.bottom,Zt=Ee.collisionPadding;Zt&&(Bt-=Zt[1],Jt+=Zt[3]);var hr=Jt-Bt;hr>0&&(hr=Math.max(10,hr),this.circleDiameter=hr)}else{var Pr=Ee.top*Ye-ot,tn=Ee.bottom*Ye+ot,jr=Ee.left*Ye-ot,mn=Ee.right*Ye+ot,cn=Ee.collisionPadding;if(cn&&(jr-=cn[0]*Ye,Pr-=cn[1]*Ye,mn+=cn[2]*Ye,tn+=cn[3]*Ye),At){var yn=new r(jr,Pr),Ln=new r(mn,Pr),On=new r(jr,tn),jn=new r(mn,tn),Yn=At*Math.PI/180;yn._rotate(Yn),Ln._rotate(Yn),On._rotate(Yn),jn._rotate(Yn),jr=Math.min(yn.x,Ln.x,On.x,jn.x),mn=Math.max(yn.x,Ln.x,On.x,jn.x),Pr=Math.min(yn.y,Ln.y,On.y,jn.y),tn=Math.max(yn.y,Ln.y,On.y,jn.y)}R.emplaceBack(U.x,U.y,jr,Pr,mn,tn,ee,ue,xe)}this.boxEndIndex=R.length},Zf=function(R,U){if(R===void 0&&(R=[]),U===void 0&&(U=r0),this.data=R,this.length=this.data.length,this.compare=U,this.length>0)for(var ee=(this.length>>1)-1;ee>=0;ee--)this._down(ee)};Zf.prototype.push=function(R){this.data.push(R),this.length++,this._up(this.length-1)},Zf.prototype.pop=function(){if(this.length!==0){var R=this.data[0],U=this.data.pop();return this.length--,this.length>0&&(this.data[0]=U,this._down(0)),R}},Zf.prototype.peek=function(){return this.data[0]},Zf.prototype._up=function(R){for(var U=this,ee=U.data,ue=U.compare,xe=ee[R];R>0;){var Ee=R-1>>1,Ye=ee[Ee];if(ue(xe,Ye)>=0)break;ee[R]=Ye,R=Ee}ee[R]=xe},Zf.prototype._down=function(R){for(var U=this,ee=U.data,ue=U.compare,xe=this.length>>1,Ee=ee[R];R<xe;){var Ye=(R<<1)+1,ot=ee[Ye],mt=Ye+1;if(mt<this.length&&ue(ee[mt],ot)<0&&(Ye=mt,ot=ee[mt]),ue(ot,Ee)>=0)break;ee[R]=ot,R=Ye}ee[R]=Ee};function r0(D,R){return D<R?-1:D>R?1:0}function n0(D,R,U){U===void 0&&(U=!1);for(var ee=1/0,ue=1/0,xe=-1/0,Ee=-1/0,Ye=D[0],ot=0;ot<Ye.length;ot++){var mt=Ye[ot];(!ot||mt.x<ee)&&(ee=mt.x),(!ot||mt.y<ue)&&(ue=mt.y),(!ot||mt.x>xe)&&(xe=mt.x),(!ot||mt.y>Ee)&&(Ee=mt.y)}var At=xe-ee,Bt=Ee-ue,Jt=Math.min(At,Bt),Zt=Jt/2,hr=new Zf([],a0);if(Jt===0)return new r(ee,ue);for(var Pr=ee;Pr<xe;Pr+=Jt)for(var tn=ue;tn<Ee;tn+=Jt)hr.push(new jf(Pr+Zt,tn+Zt,Zt,D));for(var jr=o0(D),mn=hr.length;hr.length;){var cn=hr.pop();(cn.d>jr.d||!jr.d)&&(jr=cn,U&&console.log("found best %d after %d probes",Math.round(1e4*cn.d)/1e4,mn)),!(cn.max-jr.d<=R)&&(Zt=cn.h/2,hr.push(new jf(cn.p.x-Zt,cn.p.y-Zt,Zt,D)),hr.push(new jf(cn.p.x+Zt,cn.p.y-Zt,Zt,D)),hr.push(new jf(cn.p.x-Zt,cn.p.y+Zt,Zt,D)),hr.push(new jf(cn.p.x+Zt,cn.p.y+Zt,Zt,D)),mn+=4)}return U&&(console.log("num probes: "+mn),console.log("best distance: "+jr.d)),jr.p}function a0(D,R){return R.max-D.max}function jf(D,R,U,ee){this.p=new r(D,R),this.h=U,this.d=i0(this.p,ee),this.max=this.d+this.h*Math.SQRT2}function i0(D,R){for(var U=!1,ee=1/0,ue=0;ue<R.length;ue++)for(var xe=R[ue],Ee=0,Ye=xe.length,ot=Ye-1;Ee<Ye;ot=Ee++){var mt=xe[Ee],At=xe[ot];mt.y>D.y!=At.y>D.y&&D.x<(At.x-mt.x)*(D.y-mt.y)/(At.y-mt.y)+mt.x&&(U=!U),ee=Math.min(ee,pu(D,mt,At))}return(U?1:-1)*Math.sqrt(ee)}function o0(D){for(var R=0,U=0,ee=0,ue=D[0],xe=0,Ee=ue.length,Ye=Ee-1;xe<Ee;Ye=xe++){var ot=ue[xe],mt=ue[Ye],At=ot.x*mt.y-mt.x*ot.y;U+=(ot.x+mt.x)*At,ee+=(ot.y+mt.y)*At,R+=At*3}return new jf(U/R,ee/R,0,D)}var Kf=7,bh=Number.POSITIVE_INFINITY;function mv(D,R){function U(ue,xe){var Ee=0,Ye=0;xe<0&&(xe=0);var ot=xe/Math.sqrt(2);switch(ue){case"top-right":case"top-left":Ye=ot-Kf;break;case"bottom-right":case"bottom-left":Ye=-ot+Kf;break;case"bottom":Ye=-xe+Kf;break;case"top":Ye=xe-Kf;break}switch(ue){case"top-right":case"bottom-right":Ee=-ot;break;case"top-left":case"bottom-left":Ee=ot;break;case"left":Ee=xe;break;case"right":Ee=-xe;break}return[Ee,Ye]}function ee(ue,xe,Ee){var Ye=0,ot=0;switch(xe=Math.abs(xe),Ee=Math.abs(Ee),ue){case"top-right":case"top-left":case"top":ot=Ee-Kf;break;case"bottom-right":case"bottom-left":case"bottom":ot=-Ee+Kf;break}switch(ue){case"top-right":case"bottom-right":case"right":Ye=-xe;break;case"top-left":case"bottom-left":case"left":Ye=xe;break}return[Ye,ot]}return R[1]!==bh?ee(D,R[0],R[1]):U(D,R[0])}function s0(D,R,U,ee,ue,xe,Ee){D.createArrays();var Ye=512*D.overscaling;D.tilePixelRatio=ga/Ye,D.compareText={},D.iconsNeedLinear=!1;var ot=D.layers[0].layout,mt=D.layers[0]._unevaluatedLayout._values,At={};if(D.textSizeData.kind==="composite"){var Bt=D.textSizeData,Jt=Bt.minZoom,Zt=Bt.maxZoom;At.compositeTextSizes=[mt["text-size"].possiblyEvaluate(new pa(Jt),Ee),mt["text-size"].possiblyEvaluate(new pa(Zt),Ee)]}if(D.iconSizeData.kind==="composite"){var hr=D.iconSizeData,Pr=hr.minZoom,tn=hr.maxZoom;At.compositeIconSizes=[mt["icon-size"].possiblyEvaluate(new pa(Pr),Ee),mt["icon-size"].possiblyEvaluate(new pa(tn),Ee)]}At.layoutTextSize=mt["text-size"].possiblyEvaluate(new pa(D.zoom+1),Ee),At.layoutIconSize=mt["icon-size"].possiblyEvaluate(new pa(D.zoom+1),Ee),At.textMaxSize=mt["text-size"].possiblyEvaluate(new pa(18));for(var jr=ot.get("text-line-height")*lo,mn=ot.get("text-rotation-alignment")==="map"&&ot.get("symbol-placement")!=="point",cn=ot.get("text-keep-upright"),yn=ot.get("text-size"),Ln=function(){var Yn=jn[On],va=ot.get("text-font").evaluate(Yn,{},Ee).join(","),oa=yn.evaluate(Yn,{},Ee),ha=At.layoutTextSize.evaluate(Yn,{},Ee),Ra=At.layoutIconSize.evaluate(Yn,{},Ee),da={horizontal:{},vertical:void 0},ma=Yn.text,_a=[0,0];if(ma){var La=ma.toString(),Ja=ot.get("text-letter-spacing").evaluate(Yn,{},Ee)*lo,si=wr(La)?Ja:0,Qa=ot.get("text-anchor").evaluate(Yn,{},Ee),$a=ot.get("text-variable-anchor");if(!$a){var Ya=ot.get("text-radial-offset").evaluate(Yn,{},Ee);Ya?_a=mv(Qa,[Ya*lo,bh]):_a=ot.get("text-offset").evaluate(Yn,{},Ee).map(function(xu){return xu*lo})}var ci=mn?"center":ot.get("text-justify").evaluate(Yn,{},Ee),vi=ot.get("symbol-placement"),Ei=vi==="point"?ot.get("text-max-width").evaluate(Yn,{},Ee)*lo:0,Di=function(){D.allowVerticalPlacement&&jt(La)&&(da.vertical=Vc(ma,R,U,ue,va,Ei,jr,Qa,"left",si,_a,hs.vertical,!0,vi,ha,oa))};if(!mn&&$a){for(var ro=ci==="auto"?$a.map(function(xu){return wh(xu)}):[ci],Xi=!1,mo=0;mo<ro.length;mo++){var xo=ro[mo];if(!da.horizontal[xo])if(Xi)da.horizontal[xo]=da.horizontal[0];else{var no=Vc(ma,R,U,ue,va,Ei,jr,"center",xo,si,_a,hs.horizontal,!1,vi,ha,oa);no&&(da.horizontal[xo]=no,Xi=no.positionedLines.length===1)}}Di()}else{ci==="auto"&&(ci=wh(Qa));var Do=Vc(ma,R,U,ue,va,Ei,jr,Qa,ci,si,_a,hs.horizontal,!1,vi,ha,oa);Do&&(da.horizontal[ci]=Do),Di(),jt(La)&&mn&&cn&&(da.vertical=Vc(ma,R,U,ue,va,Ei,jr,Qa,ci,si,_a,hs.vertical,!1,vi,ha,oa))}}var Io=void 0,Qi=!1;if(Yn.icon&&Yn.icon.name){var ko=ee[Yn.icon.name];ko&&(Io=Qp(ue[Yn.icon.name],ot.get("icon-offset").evaluate(Yn,{},Ee),ot.get("icon-anchor").evaluate(Yn,{},Ee)),Qi=ko.sdf,D.sdfIcons===void 0?D.sdfIcons=ko.sdf:D.sdfIcons!==ko.sdf&&O("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(ko.pixelRatio!==D.pixelRatio||ot.get("icon-rotate").constantOr(1)!==0)&&(D.iconsNeedLinear=!0))}var vs=bv(da.horizontal)||da.vertical;D.iconsInText=vs?vs.iconsInText:!1,(vs||Io)&&l0(D,Yn,da,Io,ee,At,ha,Ra,_a,Qi,Ee)},On=0,jn=D.features;On<jn.length;On+=1)Ln();xe&&D.generateCollisionDebugBuffers()}function wh(D){switch(D){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function l0(D,R,U,ee,ue,xe,Ee,Ye,ot,mt,At){var Bt=xe.textMaxSize.evaluate(R,{});Bt===void 0&&(Bt=Ee);var Jt=D.layers[0].layout,Zt=Jt.get("icon-offset").evaluate(R,{},At),hr=bv(U.horizontal),Pr=24,tn=Ee/Pr,jr=D.tilePixelRatio*tn,mn=D.tilePixelRatio*Bt/Pr,cn=D.tilePixelRatio*Ye,yn=D.tilePixelRatio*Jt.get("symbol-spacing"),Ln=Jt.get("text-padding")*D.tilePixelRatio,On=Jt.get("icon-padding")*D.tilePixelRatio,jn=Jt.get("text-max-angle")/180*Math.PI,Yn=Jt.get("text-rotation-alignment")==="map"&&Jt.get("symbol-placement")!=="point",va=Jt.get("icon-rotation-alignment")==="map"&&Jt.get("symbol-placement")!=="point",oa=Jt.get("symbol-placement"),ha=yn/2,Ra=Jt.get("icon-text-fit"),da;ee&&Ra!=="none"&&(D.allowVerticalPlacement&&U.vertical&&(da=sv(ee,U.vertical,Ra,Jt.get("icon-text-fit-padding"),Zt,tn)),hr&&(ee=sv(ee,hr,Ra,Jt.get("icon-text-fit-padding"),Zt,tn)));var ma=function(ec,Qs){Qs.x<0||Qs.x>=ga||Qs.y<0||Qs.y>=ga||u0(D,Qs,ec,U,ee,ue,da,D.layers[0],D.collisionBoxArray,R.index,R.sourceLayerIndex,D.index,jr,Ln,Yn,ot,cn,On,va,Zt,R,xe,mt,At,Ee)};if(oa==="line")for(var _a=0,La=pv(R.geometry,0,0,ga,ga);_a<La.length;_a+=1)for(var Ja=La[_a],si=e0(Ja,yn,jn,U.vertical||hr,ee,Pr,mn,D.overscaling,ga),Qa=0,$a=si;Qa<$a.length;Qa+=1){var Ya=$a[Qa],ci=hr;(!ci||!f0(D,ci.text,ha,Ya))&&ma(Ja,Ya)}else if(oa==="line-center")for(var vi=0,Ei=R.geometry;vi<Ei.length;vi+=1){var Di=Ei[vi];if(Di.length>1){var ro=qp(Di,jn,U.vertical||hr,ee,Pr,mn);ro&&ma(Di,ro)}}else if(R.type==="Polygon")for(var Xi=0,mo=ch(R.geometry,0);Xi<mo.length;Xi+=1){var xo=mo[Xi],no=n0(xo,16);ma(xo[0],new Xf(no.x,no.y,0))}else if(R.type==="LineString")for(var Do=0,Io=R.geometry;Do<Io.length;Do+=1){var Qi=Io[Do];ma(Qi,new Xf(Qi[0].x,Qi[0].y,0))}else if(R.type==="Point")for(var ko=0,vs=R.geometry;ko<vs.length;ko+=1)for(var xu=vs[ko],ef=0,tf=xu;ef<tf.length;ef+=1){var rf=tf[ef];ma([rf],new Xf(rf.x,rf.y,0))}}var wc=255,$u=wc*Sl;function xv(D,R,U,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr){var Pr=t0(R,U,Ye,ue,xe,Ee,ee,D.allowVerticalPlacement),tn=D.textSizeData,jr=null;tn.kind==="source"?(jr=[Sl*ue.layout.get("text-size").evaluate(Ee,{})],jr[0]>$u&&O(D.layerIds[0]+': Value for "text-size" is >= '+wc+'. Reduce your "text-size".')):tn.kind==="composite"&&(jr=[Sl*Zt.compositeTextSizes[0].evaluate(Ee,{},hr),Sl*Zt.compositeTextSizes[1].evaluate(Ee,{},hr)],(jr[0]>$u||jr[1]>$u)&&O(D.layerIds[0]+': Value for "text-size" is >= '+wc+'. Reduce your "text-size".')),D.addSymbols(D.text,Pr,jr,Ye,xe,Ee,mt,R,ot.lineStartIndex,ot.lineLength,Jt,hr);for(var mn=0,cn=At;mn<cn.length;mn+=1){var yn=cn[mn];Bt[yn]=D.text.placedSymbolArray.length-1}return Pr.length*4}function bv(D){for(var R in D)return D[R];return null}function u0(D,R,U,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn,Ln,On,jn,Yn){var va,oa=D.addToLineVertexArray(R,U),ha,Ra,da,ma,_a=0,La=0,Ja=0,si=0,Qa=-1,$a=-1,Ya={},ci=he(""),vi=0,Ei=0;if(Ye._unevaluatedLayout.getValue("text-radial-offset")===void 0?(va=Ye.layout.get("text-offset").evaluate(yn,{},jn).map(function(Mc){return Mc*lo}),vi=va[0],Ei=va[1]):(vi=Ye.layout.get("text-radial-offset").evaluate(yn,{},jn)*lo,Ei=bh),D.allowVerticalPlacement&&ee.vertical){var Di=Ye.layout.get("text-rotate").evaluate(yn,{},jn),ro=Di+90,Xi=ee.vertical;da=new Yc(ot,R,mt,At,Bt,Xi,Jt,Zt,hr,ro),Ee&&(ma=new Yc(ot,R,mt,At,Bt,Ee,tn,jr,hr,ro))}if(ue){var mo=Ye.layout.get("icon-rotate").evaluate(yn,{}),xo=Ye.layout.get("icon-text-fit")!=="none",no=gv(ue,mo,On,xo),Do=Ee?gv(Ee,mo,On,xo):void 0;Ra=new Yc(ot,R,mt,At,Bt,ue,tn,jr,!1,mo),_a=no.length*4;var Io=D.iconSizeData,Qi=null;Io.kind==="source"?(Qi=[Sl*Ye.layout.get("icon-size").evaluate(yn,{})],Qi[0]>$u&&O(D.layerIds[0]+': Value for "icon-size" is >= '+wc+'. Reduce your "icon-size".')):Io.kind==="composite"&&(Qi=[Sl*Ln.compositeIconSizes[0].evaluate(yn,{},jn),Sl*Ln.compositeIconSizes[1].evaluate(yn,{},jn)],(Qi[0]>$u||Qi[1]>$u)&&O(D.layerIds[0]+': Value for "icon-size" is >= '+wc+'. Reduce your "icon-size".')),D.addSymbols(D.icon,no,Qi,cn,mn,yn,!1,R,oa.lineStartIndex,oa.lineLength,-1,jn),Qa=D.icon.placedSymbolArray.length-1,Do&&(La=Do.length*4,D.addSymbols(D.icon,Do,Qi,cn,mn,yn,hs.vertical,R,oa.lineStartIndex,oa.lineLength,-1,jn),$a=D.icon.placedSymbolArray.length-1)}for(var ko in ee.horizontal){var vs=ee.horizontal[ko];if(!ha){ci=he(vs.text);var xu=Ye.layout.get("text-rotate").evaluate(yn,{},jn);ha=new Yc(ot,R,mt,At,Bt,vs,Jt,Zt,hr,xu)}var ef=vs.positionedLines.length===1;if(Ja+=xv(D,R,vs,xe,Ye,hr,yn,Pr,oa,ee.vertical?hs.horizontal:hs.horizontalOnly,ef?Object.keys(ee.horizontal):[ko],Ya,Qa,Ln,jn),ef)break}ee.vertical&&(si+=xv(D,R,ee.vertical,xe,Ye,hr,yn,Pr,oa,hs.vertical,["vertical"],Ya,$a,Ln,jn));var tf=ha?ha.boxStartIndex:D.collisionBoxArray.length,rf=ha?ha.boxEndIndex:D.collisionBoxArray.length,ec=da?da.boxStartIndex:D.collisionBoxArray.length,Qs=da?da.boxEndIndex:D.collisionBoxArray.length,Jc=Ra?Ra.boxStartIndex:D.collisionBoxArray.length,Ch=Ra?Ra.boxEndIndex:D.collisionBoxArray.length,Qc=ma?ma.boxStartIndex:D.collisionBoxArray.length,Lh=ma?ma.boxEndIndex:D.collisionBoxArray.length,Es=-1,tc=function(Mc,Fv){return Mc&&Mc.circleDiameter?Math.max(Mc.circleDiameter,Fv):Fv};Es=tc(ha,Es),Es=tc(da,Es),Es=tc(Ra,Es),Es=tc(ma,Es);var $c=Es>-1?1:0;$c&&(Es*=Yn/lo),D.glyphOffsetArray.length>=oi.MAX_GLYPHS&&O("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),yn.sortKey!==void 0&&D.addToSortKeyRanges(D.symbolInstances.length,yn.sortKey),D.symbolInstances.emplaceBack(R.x,R.y,Ya.right>=0?Ya.right:-1,Ya.center>=0?Ya.center:-1,Ya.left>=0?Ya.left:-1,Ya.vertical||-1,Qa,$a,ci,tf,rf,ec,Qs,Jc,Ch,Qc,Lh,mt,Ja,si,_a,La,$c,0,Jt,vi,Ei,Es)}function f0(D,R,U,ee){var ue=D.compareText;if(!(R in ue))ue[R]=[];else for(var xe=ue[R],Ee=xe.length-1;Ee>=0;Ee--)if(ee.dist(xe[Ee])<U)return!0;return ue[R].push(ee),!1}var c0=Hf.VectorTileFeature.types,h0=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Xc(D,R,U,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt){var Zt=Ye?Math.min($u,Math.round(Ye[0])):0,hr=Ye?Math.min($u,Math.round(Ye[1])):0;D.emplaceBack(R,U,Math.round(ee*32),Math.round(ue*32),xe,Ee,(Zt<<1)+(ot?1:0),hr,mt*16,At*16,Bt*256,Jt*256)}function Th(D,R,U){D.emplaceBack(R.x,R.y,U),D.emplaceBack(R.x,R.y,U),D.emplaceBack(R.x,R.y,U),D.emplaceBack(R.x,R.y,U)}function v0(D){for(var R=0,U=D.sections;R<U.length;R+=1){var ee=U[R];if(Zr(ee.text))return!0}return!1}var Jf=function(R){this.layoutVertexArray=new Yl,this.indexArray=new wl,this.programConfigurations=R,this.segments=new Hi,this.dynamicLayoutVertexArray=new nc,this.opacityVertexArray=new ac,this.placedSymbolArray=new sc};Jf.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},Jf.prototype.upload=function(R,U,ee,ue){this.isEmpty()||(ee&&(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,hp.members),this.indexBuffer=R.createIndexBuffer(this.indexArray,U),this.dynamicLayoutVertexBuffer=R.createVertexBuffer(this.dynamicLayoutVertexArray,vp.members,!0),this.opacityVertexBuffer=R.createVertexBuffer(this.opacityVertexArray,h0,!0),this.opacityVertexBuffer.itemSize=1),(ee||ue)&&this.programConfigurations.upload(R))},Jf.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},De("SymbolBuffers",Jf);var Tc=function(R,U,ee){this.layoutVertexArray=new R,this.layoutAttributes=U,this.indexArray=new ee,this.segments=new Hi,this.collisionVertexArray=new No};Tc.prototype.upload=function(R){this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=R.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=R.createVertexBuffer(this.collisionVertexArray,dp.members,!0)},Tc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},De("CollisionBuffers",Tc);var oi=function(R){this.collisionBoxArray=R.collisionBoxArray,this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(ot){return ot.id}),this.index=R.index,this.pixelRatio=R.pixelRatio,this.sourceLayerIndex=R.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Of([]),this.placementViewportMatrix=Of([]);var U=this.layers[0],ee=U._unevaluatedLayout._values;this.textSizeData=xh(this.zoom,ee["text-size"]),this.iconSizeData=xh(this.zoom,ee["icon-size"]);var ue=this.layers[0].layout,xe=ue.get("symbol-sort-key"),Ee=ue.get("symbol-z-order");this.canOverlap=ue.get("text-allow-overlap")||ue.get("icon-allow-overlap")||ue.get("text-ignore-placement")||ue.get("icon-ignore-placement"),this.sortFeaturesByKey=Ee!=="viewport-y"&&xe.constantOr(1)!==void 0;var Ye=Ee==="viewport-y"||Ee==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=Ye&&this.canOverlap,ue.get("symbol-placement")==="point"&&(this.writingModes=ue.get("text-writing-mode").map(function(ot){return hs[ot]})),this.stateDependentLayerIds=this.layers.filter(function(ot){return ot.isStateDependent()}).map(function(ot){return ot.id}),this.sourceID=R.sourceID};oi.prototype.createArrays=function(){this.text=new Jf(new ia(this.layers,this.zoom,function(R){return/^text/.test(R)})),this.icon=new Jf(new ia(this.layers,this.zoom,function(R){return/^icon/.test(R)})),this.glyphOffsetArray=new Lc,this.lineVertexArray=new Ts,this.symbolInstances=new Cc},oi.prototype.calculateGlyphDependencies=function(R,U,ee,ue,xe){for(var Ee=0;Ee<R.length;Ee++)if(U[R.charCodeAt(Ee)]=!0,(ee||ue)&&xe){var Ye=gc[R.charAt(Ee)];Ye&&(U[Ye.charCodeAt(0)]=!0)}},oi.prototype.populate=function(R,U,ee){var ue=this.layers[0],xe=ue.layout,Ee=xe.get("text-font"),Ye=xe.get("text-field"),ot=xe.get("icon-image"),mt=(Ye.value.kind!=="constant"||Ye.value.value instanceof Ii&&!Ye.value.value.isEmpty()||Ye.value.value.toString().length>0)&&(Ee.value.kind!=="constant"||Ee.value.value.length>0),At=ot.value.kind!=="constant"||!!ot.value.value||Object.keys(ot.parameters).length>0,Bt=xe.get("symbol-sort-key");if(this.features=[],!(!mt&&!At)){for(var Jt=U.iconDependencies,Zt=U.glyphDependencies,hr=U.availableImages,Pr=new pa(this.zoom),tn=0,jr=R;tn<jr.length;tn+=1){var mn=jr[tn],cn=mn.feature,yn=mn.id,Ln=mn.index,On=mn.sourceLayerIndex,jn=ue._featureFilter.needGeometry,Yn=fi(cn,jn);if(ue._featureFilter.filter(Pr,Yn,ee)){jn||(Yn.geometry=Wa(cn));var va=void 0;if(mt){var oa=ue.getValueAndResolveTokens("text-field",Yn,ee,hr),ha=Ii.factory(oa);v0(ha)&&(this.hasRTLText=!0),(!this.hasRTLText||Sa()==="unavailable"||this.hasRTLText&&Hn.isParsed())&&(va=yp(ha,ue,Yn))}var Ra=void 0;if(At){var da=ue.getValueAndResolveTokens("icon-image",Yn,ee,hr);da instanceof $i?Ra=da:Ra=$i.fromString(da)}if(!(!va&&!Ra)){var ma=this.sortFeaturesByKey?Bt.evaluate(Yn,{},ee):void 0,_a={id:yn,text:va,icon:Ra,index:Ln,sourceLayerIndex:On,geometry:Yn.geometry,properties:cn.properties,type:c0[cn.type],sortKey:ma};if(this.features.push(_a),Ra&&(Jt[Ra.name]=!0),va){var La=Ee.evaluate(Yn,{},ee).join(","),Ja=xe.get("text-rotation-alignment")==="map"&&xe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(hs.vertical)>=0;for(var si=0,Qa=va.sections;si<Qa.length;si+=1){var $a=Qa[si];if($a.image)Jt[$a.image.name]=!0;else{var Ya=jt(va.toString()),ci=$a.fontStack||La,vi=Zt[ci]=Zt[ci]||{};this.calculateGlyphDependencies($a.text,vi,Ja,this.allowVerticalPlacement,Ya)}}}}}}xe.get("symbol-placement")==="line"&&(this.features=mp(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Ei,Di){return Ei.sortKey-Di.sortKey})}},oi.prototype.update=function(R,U,ee){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(R,U,this.layers,ee),this.icon.programConfigurations.updatePaintArrays(R,U,this.layers,ee))},oi.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},oi.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},oi.prototype.upload=function(R){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(R),this.iconCollisionBox.upload(R)),this.text.upload(R,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(R,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},oi.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},oi.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},oi.prototype.addToLineVertexArray=function(R,U){var ee=this.lineVertexArray.length;if(R.segment!==void 0){for(var ue=R.dist(U[R.segment+1]),xe=R.dist(U[R.segment]),Ee={},Ye=R.segment+1;Ye<U.length;Ye++)Ee[Ye]={x:U[Ye].x,y:U[Ye].y,tileUnitDistanceFromAnchor:ue},Ye<U.length-1&&(ue+=U[Ye+1].dist(U[Ye]));for(var ot=R.segment||0;ot>=0;ot--)Ee[ot]={x:U[ot].x,y:U[ot].y,tileUnitDistanceFromAnchor:xe},ot>0&&(xe+=U[ot-1].dist(U[ot]));for(var mt=0;mt<U.length;mt++){var At=Ee[mt];this.lineVertexArray.emplaceBack(At.x,At.y,At.tileUnitDistanceFromAnchor)}}return{lineStartIndex:ee,lineLength:this.lineVertexArray.length-ee}},oi.prototype.addSymbols=function(R,U,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt){for(var Zt=R.indexArray,hr=R.layoutVertexArray,Pr=R.segments.prepareSegment(4*U.length,hr,Zt,this.canOverlap?Ee.sortKey:void 0),tn=this.glyphOffsetArray.length,jr=Pr.vertexLength,mn=this.allowVerticalPlacement&&Ye===hs.vertical?Math.PI/2:0,cn=Ee.text&&Ee.text.sections,yn=0;yn<U.length;yn++){var Ln=U[yn],On=Ln.tl,jn=Ln.tr,Yn=Ln.bl,va=Ln.br,oa=Ln.tex,ha=Ln.pixelOffsetTL,Ra=Ln.pixelOffsetBR,da=Ln.minFontScaleX,ma=Ln.minFontScaleY,_a=Ln.glyphOffset,La=Ln.isSDF,Ja=Ln.sectionIndex,si=Pr.vertexLength,Qa=_a[1];Xc(hr,ot.x,ot.y,On.x,Qa+On.y,oa.x,oa.y,ee,La,ha.x,ha.y,da,ma),Xc(hr,ot.x,ot.y,jn.x,Qa+jn.y,oa.x+oa.w,oa.y,ee,La,Ra.x,ha.y,da,ma),Xc(hr,ot.x,ot.y,Yn.x,Qa+Yn.y,oa.x,oa.y+oa.h,ee,La,ha.x,Ra.y,da,ma),Xc(hr,ot.x,ot.y,va.x,Qa+va.y,oa.x+oa.w,oa.y+oa.h,ee,La,Ra.x,Ra.y,da,ma),Th(R.dynamicLayoutVertexArray,ot,mn),Zt.emplaceBack(si,si+1,si+2),Zt.emplaceBack(si+1,si+2,si+3),Pr.vertexLength+=4,Pr.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_a[0]),(yn===U.length-1||Ja!==U[yn+1].sectionIndex)&&R.programConfigurations.populatePaintArrays(hr.length,Ee,Ee.index,{},Jt,cn&&cn[Ja])}R.placedSymbolArray.emplaceBack(ot.x,ot.y,tn,this.glyphOffsetArray.length-tn,jr,mt,At,ot.segment,ee?ee[0]:0,ee?ee[1]:0,ue[0],ue[1],Ye,0,!1,0,Bt)},oi.prototype._addCollisionDebugVertex=function(R,U,ee,ue,xe,Ee){return U.emplaceBack(0,0),R.emplaceBack(ee.x,ee.y,ue,xe,Math.round(Ee.x),Math.round(Ee.y))},oi.prototype.addCollisionDebugVertices=function(R,U,ee,ue,xe,Ee,Ye){var ot=xe.segments.prepareSegment(4,xe.layoutVertexArray,xe.indexArray),mt=ot.vertexLength,At=xe.layoutVertexArray,Bt=xe.collisionVertexArray,Jt=Ye.anchorX,Zt=Ye.anchorY;this._addCollisionDebugVertex(At,Bt,Ee,Jt,Zt,new r(R,U)),this._addCollisionDebugVertex(At,Bt,Ee,Jt,Zt,new r(ee,U)),this._addCollisionDebugVertex(At,Bt,Ee,Jt,Zt,new r(ee,ue)),this._addCollisionDebugVertex(At,Bt,Ee,Jt,Zt,new r(R,ue)),ot.vertexLength+=4;var hr=xe.indexArray;hr.emplaceBack(mt,mt+1),hr.emplaceBack(mt+1,mt+2),hr.emplaceBack(mt+2,mt+3),hr.emplaceBack(mt+3,mt),ot.primitiveLength+=4},oi.prototype.addDebugCollisionBoxes=function(R,U,ee,ue){for(var xe=R;xe<U;xe++){var Ee=this.collisionBoxArray.get(xe),Ye=Ee.x1,ot=Ee.y1,mt=Ee.x2,At=Ee.y2;this.addCollisionDebugVertices(Ye,ot,mt,At,ue?this.textCollisionBox:this.iconCollisionBox,Ee.anchorPoint,ee)}},oi.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Tc(Df,Kh.members,Mf),this.iconCollisionBox=new Tc(Df,Kh.members,Mf);for(var R=0;R<this.symbolInstances.length;R++){var U=this.symbolInstances.get(R);this.addDebugCollisionBoxes(U.textBoxStartIndex,U.textBoxEndIndex,U,!0),this.addDebugCollisionBoxes(U.verticalTextBoxStartIndex,U.verticalTextBoxEndIndex,U,!0),this.addDebugCollisionBoxes(U.iconBoxStartIndex,U.iconBoxEndIndex,U,!1),this.addDebugCollisionBoxes(U.verticalIconBoxStartIndex,U.verticalIconBoxEndIndex,U,!1)}},oi.prototype._deserializeCollisionBoxesForSymbol=function(R,U,ee,ue,xe,Ee,Ye,ot,mt){for(var At={},Bt=U;Bt<ee;Bt++){var Jt=R.get(Bt);At.textBox={x1:Jt.x1,y1:Jt.y1,x2:Jt.x2,y2:Jt.y2,anchorPointX:Jt.anchorPointX,anchorPointY:Jt.anchorPointY},At.textFeatureIndex=Jt.featureIndex;break}for(var Zt=ue;Zt<xe;Zt++){var hr=R.get(Zt);At.verticalTextBox={x1:hr.x1,y1:hr.y1,x2:hr.x2,y2:hr.y2,anchorPointX:hr.anchorPointX,anchorPointY:hr.anchorPointY},At.verticalTextFeatureIndex=hr.featureIndex;break}for(var Pr=Ee;Pr<Ye;Pr++){var tn=R.get(Pr);At.iconBox={x1:tn.x1,y1:tn.y1,x2:tn.x2,y2:tn.y2,anchorPointX:tn.anchorPointX,anchorPointY:tn.anchorPointY},At.iconFeatureIndex=tn.featureIndex;break}for(var jr=ot;jr<mt;jr++){var mn=R.get(jr);At.verticalIconBox={x1:mn.x1,y1:mn.y1,x2:mn.x2,y2:mn.y2,anchorPointX:mn.anchorPointX,anchorPointY:mn.anchorPointY},At.verticalIconFeatureIndex=mn.featureIndex;break}return At},oi.prototype.deserializeCollisionBoxes=function(R){this.collisionArrays=[];for(var U=0;U<this.symbolInstances.length;U++){var ee=this.symbolInstances.get(U);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(R,ee.textBoxStartIndex,ee.textBoxEndIndex,ee.verticalTextBoxStartIndex,ee.verticalTextBoxEndIndex,ee.iconBoxStartIndex,ee.iconBoxEndIndex,ee.verticalIconBoxStartIndex,ee.verticalIconBoxEndIndex))}},oi.prototype.hasTextData=function(){return this.text.segments.get().length>0},oi.prototype.hasIconData=function(){return this.icon.segments.get().length>0},oi.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},oi.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},oi.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},oi.prototype.addIndicesForPlacedSymbol=function(R,U){for(var ee=R.placedSymbolArray.get(U),ue=ee.vertexStartIndex+ee.numGlyphs*4,xe=ee.vertexStartIndex;xe<ue;xe+=4)R.indexArray.emplaceBack(xe,xe+1,xe+2),R.indexArray.emplaceBack(xe+1,xe+2,xe+3)},oi.prototype.getSortedSymbolIndexes=function(R){if(this.sortedAngle===R&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var U=Math.sin(R),ee=Math.cos(R),ue=[],xe=[],Ee=[],Ye=0;Ye<this.symbolInstances.length;++Ye){Ee.push(Ye);var ot=this.symbolInstances.get(Ye);ue.push(Math.round(U*ot.anchorX+ee*ot.anchorY)|0),xe.push(ot.featureIndex)}return Ee.sort(function(mt,At){return ue[mt]-ue[At]||xe[At]-xe[mt]}),Ee},oi.prototype.addToSortKeyRanges=function(R,U){var ee=this.sortKeyRanges[this.sortKeyRanges.length-1];ee&&ee.sortKey===U?ee.symbolInstanceEnd=R+1:this.sortKeyRanges.push({sortKey:U,symbolInstanceStart:R,symbolInstanceEnd:R+1})},oi.prototype.sortFeatures=function(R){var U=this;if(this.sortFeaturesByY&&this.sortedAngle!==R&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var ee=0,ue=this.symbolInstanceIndexes;ee<ue.length;ee+=1){var xe=ue[ee],Ee=this.symbolInstances.get(xe);this.featureSortOrder.push(Ee.featureIndex),[Ee.rightJustifiedTextSymbolIndex,Ee.centerJustifiedTextSymbolIndex,Ee.leftJustifiedTextSymbolIndex].forEach(function(Ye,ot,mt){Ye>=0&&mt.indexOf(Ye)===ot&&U.addIndicesForPlacedSymbol(U.text,Ye)}),Ee.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ee.verticalPlacedTextSymbolIndex),Ee.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ee.placedIconSymbolIndex),Ee.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ee.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},De("SymbolBucket",oi,{omit:["layers","collisionBoxArray","features","compareText"]}),oi.MAX_GLYPHS=65535,oi.addDynamicAttributes=Th;function d0(D,R){return R.replace(/{([^{}]+)}/g,function(U,ee){return ee in D?String(D[ee]):""})}var p0=new ei({"symbol-placement":new qn(yr.layout_symbol["symbol-placement"]),"symbol-spacing":new qn(yr.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new qn(yr.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new xa(yr.layout_symbol["symbol-sort-key"]),"symbol-z-order":new qn(yr.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new qn(yr.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new qn(yr.layout_symbol["icon-ignore-placement"]),"icon-optional":new qn(yr.layout_symbol["icon-optional"]),"icon-rotation-alignment":new qn(yr.layout_symbol["icon-rotation-alignment"]),"icon-size":new xa(yr.layout_symbol["icon-size"]),"icon-text-fit":new qn(yr.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new qn(yr.layout_symbol["icon-text-fit-padding"]),"icon-image":new xa(yr.layout_symbol["icon-image"]),"icon-rotate":new xa(yr.layout_symbol["icon-rotate"]),"icon-padding":new qn(yr.layout_symbol["icon-padding"]),"icon-keep-upright":new qn(yr.layout_symbol["icon-keep-upright"]),"icon-offset":new xa(yr.layout_symbol["icon-offset"]),"icon-anchor":new xa(yr.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new qn(yr.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new qn(yr.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new qn(yr.layout_symbol["text-rotation-alignment"]),"text-field":new xa(yr.layout_symbol["text-field"]),"text-font":new xa(yr.layout_symbol["text-font"]),"text-size":new xa(yr.layout_symbol["text-size"]),"text-max-width":new xa(yr.layout_symbol["text-max-width"]),"text-line-height":new qn(yr.layout_symbol["text-line-height"]),"text-letter-spacing":new xa(yr.layout_symbol["text-letter-spacing"]),"text-justify":new xa(yr.layout_symbol["text-justify"]),"text-radial-offset":new xa(yr.layout_symbol["text-radial-offset"]),"text-variable-anchor":new qn(yr.layout_symbol["text-variable-anchor"]),"text-anchor":new xa(yr.layout_symbol["text-anchor"]),"text-max-angle":new qn(yr.layout_symbol["text-max-angle"]),"text-writing-mode":new qn(yr.layout_symbol["text-writing-mode"]),"text-rotate":new xa(yr.layout_symbol["text-rotate"]),"text-padding":new qn(yr.layout_symbol["text-padding"]),"text-keep-upright":new qn(yr.layout_symbol["text-keep-upright"]),"text-transform":new xa(yr.layout_symbol["text-transform"]),"text-offset":new xa(yr.layout_symbol["text-offset"]),"text-allow-overlap":new qn(yr.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new qn(yr.layout_symbol["text-ignore-placement"]),"text-optional":new qn(yr.layout_symbol["text-optional"])}),g0=new ei({"icon-opacity":new xa(yr.paint_symbol["icon-opacity"]),"icon-color":new xa(yr.paint_symbol["icon-color"]),"icon-halo-color":new xa(yr.paint_symbol["icon-halo-color"]),"icon-halo-width":new xa(yr.paint_symbol["icon-halo-width"]),"icon-halo-blur":new xa(yr.paint_symbol["icon-halo-blur"]),"icon-translate":new qn(yr.paint_symbol["icon-translate"]),"icon-translate-anchor":new qn(yr.paint_symbol["icon-translate-anchor"]),"text-opacity":new xa(yr.paint_symbol["text-opacity"]),"text-color":new xa(yr.paint_symbol["text-color"],{runtimeType:Tn,getOverride:function(D){return D.textColor},hasOverride:function(D){return!!D.textColor}}),"text-halo-color":new xa(yr.paint_symbol["text-halo-color"]),"text-halo-width":new xa(yr.paint_symbol["text-halo-width"]),"text-halo-blur":new xa(yr.paint_symbol["text-halo-blur"]),"text-translate":new qn(yr.paint_symbol["text-translate"]),"text-translate-anchor":new qn(yr.paint_symbol["text-translate-anchor"])}),Ah={paint:g0,layout:p0},Qf=function(R){this.type=R.property.overrides?R.property.overrides.runtimeType:zr,this.defaultValue=R};Qf.prototype.evaluate=function(R){if(R.formattedSection){var U=this.defaultValue.property.overrides;if(U&&U.hasOverride(R.formattedSection))return U.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default},Qf.prototype.eachChild=function(R){if(!this.defaultValue.isConstant()){var U=this.defaultValue.value;R(U._styleExpression.expression)}},Qf.prototype.outputDefined=function(){return!1},Qf.prototype.serialize=function(){return null},De("FormatSectionOverride",Qf,{omit:["defaultValue"]});var y0=function(D){function R(U){D.call(this,U,Ah)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.recalculate=function(ee,ue){if(D.prototype.recalculate.call(this,ee,ue),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 xe=this.layout.get("text-writing-mode");if(xe){for(var Ee=[],Ye=0,ot=xe;Ye<ot.length;Ye+=1){var mt=ot[Ye];Ee.indexOf(mt)<0&&Ee.push(mt)}this.layout._values["text-writing-mode"]=Ee}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},R.prototype.getValueAndResolveTokens=function(ee,ue,xe,Ee){var Ye=this.layout.get(ee).evaluate(ue,{},xe,Ee),ot=this._unevaluatedLayout._values[ee];return!ot.isDataDriven()&&!cl(ot.value)&&Ye?d0(ue.properties,Ye):Ye},R.prototype.createBucket=function(ee){return new oi(ee)},R.prototype.queryRadius=function(){return 0},R.prototype.queryIntersectsFeature=function(){return!1},R.prototype._setPaintOverrides=function(){for(var ee=0,ue=Ah.paint.overridableProperties;ee<ue.length;ee+=1){var xe=ue[ee];if(R.hasPaintOverride(this.layout,xe)){var Ee=this.paint.get(xe),Ye=new Qf(Ee),ot=new os(Ye,Ee.property.specification),mt=null;Ee.value.kind==="constant"||Ee.value.kind==="source"?mt=new Li("source",ot):mt=new Oo("composite",ot,Ee.value.zoomStops,Ee.value._interpolationType),this.paint._values[xe]=new ui(Ee.property,mt,Ee.parameters)}}},R.prototype._handleOverridablePaintPropertyUpdate=function(ee,ue,xe){return!this.layout||ue.isDataDriven()||xe.isDataDriven()?!1:R.hasPaintOverride(this.layout,ee)},R.hasPaintOverride=function(ee,ue){var xe=ee.get("text-field"),Ee=Ah.paint.properties[ue],Ye=!1,ot=function(Bt){for(var Jt=0,Zt=Bt;Jt<Zt.length;Jt+=1){var hr=Zt[Jt];if(Ee.overrides&&Ee.overrides.hasOverride(hr)){Ye=!0;return}}};if(xe.value.kind==="constant"&&xe.value.value instanceof Ii)ot(xe.value.value.sections);else if(xe.value.kind==="source"){var mt=function(Bt){if(!Ye)if(Bt instanceof Ti&&xi(Bt.value)===la){var Jt=Bt.value;ot(Jt.sections)}else Bt instanceof Ni?ot(Bt.sections):Bt.eachChild(mt)},At=xe.value;At._styleExpression&&mt(At._styleExpression.expression)}return Ye},R}(Mi),m0=new ei({"background-color":new qn(yr.paint_background["background-color"]),"background-pattern":new ho(yr.paint_background["background-pattern"]),"background-opacity":new qn(yr.paint_background["background-opacity"])}),x0={paint:m0},b0=function(D){function R(U){D.call(this,U,x0)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R}(Mi),w0=new ei({"raster-opacity":new qn(yr.paint_raster["raster-opacity"]),"raster-hue-rotate":new qn(yr.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new qn(yr.paint_raster["raster-brightness-min"]),"raster-brightness-max":new qn(yr.paint_raster["raster-brightness-max"]),"raster-saturation":new qn(yr.paint_raster["raster-saturation"]),"raster-contrast":new qn(yr.paint_raster["raster-contrast"]),"raster-resampling":new qn(yr.paint_raster["raster-resampling"]),"raster-fade-duration":new qn(yr.paint_raster["raster-fade-duration"])}),T0={paint:w0},A0=function(D){function R(U){D.call(this,U,T0)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R}(Mi);function M0(D){var R=[],U=D.id;return U===void 0&&R.push({message:"layers."+U+': missing required property "id"'}),D.render===void 0&&R.push({message:"layers."+U+': missing required method "render"'}),D.renderingMode&&D.renderingMode!=="2d"&&D.renderingMode!=="3d"&&R.push({message:"layers."+U+': property "renderingMode" must be either "2d" or "3d"'}),R}var S0=function(D){function R(U){D.call(this,U,{}),this.implementation=U}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},R.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},R.prototype.recalculate=function(){},R.prototype.updateTransitions=function(){},R.prototype.hasTransition=function(){},R.prototype.serialize=function(){},R.prototype.onAdd=function(ee){this.implementation.onAdd&&this.implementation.onAdd(ee,ee.painter.context.gl)},R.prototype.onRemove=function(ee){this.implementation.onRemove&&this.implementation.onRemove(ee,ee.painter.context.gl)},R}(Mi),E0={circle:Kv,heatmap:qv,hillshade:rd,fill:Cd,"fill-extrusion":jd,line:fp,symbol:y0,background:b0,raster:A0};function C0(D){return D.type==="custom"?new S0(D):new E0[D.type](D)}var wv=s.HTMLImageElement,Tv=s.HTMLCanvasElement,Av=s.HTMLVideoElement,Mv=s.ImageData,Zc=s.ImageBitmap,Lf=function(R,U,ee,ue){this.context=R,this.format=ee,this.texture=R.gl.createTexture(),this.update(U,ue)};Lf.prototype.update=function(R,U,ee){var ue=R.width,xe=R.height,Ee=(!this.size||this.size[0]!==ue||this.size[1]!==xe)&&!ee,Ye=this,ot=Ye.context,mt=ot.gl;if(this.useMipmap=!!(U&&U.useMipmap),mt.bindTexture(mt.TEXTURE_2D,this.texture),ot.pixelStoreUnpackFlipY.set(!1),ot.pixelStoreUnpack.set(1),ot.pixelStoreUnpackPremultiplyAlpha.set(this.format===mt.RGBA&&(!U||U.premultiply!==!1)),Ee)this.size=[ue,xe],R instanceof wv||R instanceof Tv||R instanceof Av||R instanceof Mv||Zc&&R instanceof Zc?mt.texImage2D(mt.TEXTURE_2D,0,this.format,this.format,mt.UNSIGNED_BYTE,R):mt.texImage2D(mt.TEXTURE_2D,0,this.format,ue,xe,0,this.format,mt.UNSIGNED_BYTE,R.data);else{var At=ee||{x:0,y:0},Bt=At.x,Jt=At.y;R instanceof wv||R instanceof Tv||R instanceof Av||R instanceof Mv||Zc&&R instanceof Zc?mt.texSubImage2D(mt.TEXTURE_2D,0,Bt,Jt,mt.RGBA,mt.UNSIGNED_BYTE,R):mt.texSubImage2D(mt.TEXTURE_2D,0,Bt,Jt,ue,xe,mt.RGBA,mt.UNSIGNED_BYTE,R.data)}this.useMipmap&&this.isSizePowerOfTwo()&&mt.generateMipmap(mt.TEXTURE_2D)},Lf.prototype.bind=function(R,U,ee){var ue=this,xe=ue.context,Ee=xe.gl;Ee.bindTexture(Ee.TEXTURE_2D,this.texture),ee===Ee.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(ee=Ee.LINEAR),R!==this.filter&&(Ee.texParameteri(Ee.TEXTURE_2D,Ee.TEXTURE_MAG_FILTER,R),Ee.texParameteri(Ee.TEXTURE_2D,Ee.TEXTURE_MIN_FILTER,ee||R),this.filter=R),U!==this.wrap&&(Ee.texParameteri(Ee.TEXTURE_2D,Ee.TEXTURE_WRAP_S,U),Ee.texParameteri(Ee.TEXTURE_2D,Ee.TEXTURE_WRAP_T,U),this.wrap=U)},Lf.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},Lf.prototype.destroy=function(){var R=this.context,U=R.gl;U.deleteTexture(this.texture),this.texture=null};var Mh=function(R){var U=this;this._callback=R,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){U._triggered=!1,U._callback()})};Mh.prototype.trigger=function(){var R=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){R._triggered=!1,R._callback()},0))},Mh.prototype.remove=function(){delete this._channel,this._callback=function(){}};var $f=function(R,U,ee){this.target=R,this.parent=U,this.mapId=ee,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},C(["receive","process"],this),this.invoker=new Mh(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=j()?R:s};$f.prototype.send=function(R,U,ee,ue,xe){var Ee=this;xe===void 0&&(xe=!1);var Ye=Math.round(Math.random()*1e18).toString(36).substring(0,10);ee&&(this.callbacks[Ye]=ee);var ot=oe(this.globalScope)?void 0:[];return this.target.postMessage({id:Ye,type:R,hasCallback:!!ee,targetMapId:ue,mustQueue:xe,sourceMapId:this.mapId,data:Tt(U,ot)},ot),{cancel:function(){ee&&delete Ee.callbacks[Ye],Ee.target.postMessage({id:Ye,type:"<cancel>",targetMapId:ue,sourceMapId:Ee.mapId})}}},$f.prototype.receive=function(R){var U=R.data,ee=U.id;if(ee&&!(U.targetMapId&&this.mapId!==U.targetMapId))if(U.type==="<cancel>"){delete this.tasks[ee];var ue=this.cancelCallbacks[ee];delete this.cancelCallbacks[ee],ue&&ue()}else j()||U.mustQueue?(this.tasks[ee]=U,this.taskQueue.push(ee),this.invoker.trigger()):this.processTask(ee,U)},$f.prototype.process=function(){if(this.taskQueue.length){var R=this.taskQueue.shift(),U=this.tasks[R];delete this.tasks[R],this.taskQueue.length&&this.invoker.trigger(),U&&this.processTask(R,U)}},$f.prototype.processTask=function(R,U){var ee=this;if(U.type==="<response>"){var ue=this.callbacks[R];delete this.callbacks[R],ue&&(U.error?ue(yt(U.error)):ue(null,yt(U.data)))}else{var xe=!1,Ee=oe(this.globalScope)?void 0:[],Ye=U.hasCallback?function(Jt,Zt){xe=!0,delete ee.cancelCallbacks[R],ee.target.postMessage({id:R,type:"<response>",sourceMapId:ee.mapId,error:Jt?Tt(Jt):null,data:Tt(Zt,Ee)},Ee)}:function(Jt){xe=!0},ot=null,mt=yt(U.data);if(this.parent[U.type])ot=this.parent[U.type](U.sourceMapId,mt,Ye);else if(this.parent.getWorkerSource){var At=U.type.split("."),Bt=this.parent.getWorkerSource(U.sourceMapId,At[0],mt.source);ot=Bt[At[1]](mt,Ye)}else Ye(new Error("Could not find function "+U.type));!xe&&ot&&ot.cancel&&(this.cancelCallbacks[R]=ot.cancel)}},$f.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function L0(D,R,U){R=Math.pow(2,U)-R-1;var ee=Sv(D*256,R*256,U),ue=Sv((D+1)*256,(R+1)*256,U);return ee[0]+","+ee[1]+","+ue[0]+","+ue[1]}function Sv(D,R,U){var ee=2*Math.PI*6378137/256/Math.pow(2,U),ue=D*ee-2*Math.PI*6378137/2,xe=R*ee-2*Math.PI*6378137/2;return[ue,xe]}var Wi=function(R,U){R&&(U?this.setSouthWest(R).setNorthEast(U):R.length===4?this.setSouthWest([R[0],R[1]]).setNorthEast([R[2],R[3]]):this.setSouthWest(R[0]).setNorthEast(R[1]))};Wi.prototype.setNorthEast=function(R){return this._ne=R instanceof mi?new mi(R.lng,R.lat):mi.convert(R),this},Wi.prototype.setSouthWest=function(R){return this._sw=R instanceof mi?new mi(R.lng,R.lat):mi.convert(R),this},Wi.prototype.extend=function(R){var U=this._sw,ee=this._ne,ue,xe;if(R instanceof mi)ue=R,xe=R;else if(R instanceof Wi){if(ue=R._sw,xe=R._ne,!ue||!xe)return this}else{if(Array.isArray(R))if(R.length===4||R.every(Array.isArray)){var Ee=R;return this.extend(Wi.convert(Ee))}else{var Ye=R;return this.extend(mi.convert(Ye))}return this}return!U&&!ee?(this._sw=new mi(ue.lng,ue.lat),this._ne=new mi(xe.lng,xe.lat)):(U.lng=Math.min(ue.lng,U.lng),U.lat=Math.min(ue.lat,U.lat),ee.lng=Math.max(xe.lng,ee.lng),ee.lat=Math.max(xe.lat,ee.lat)),this},Wi.prototype.getCenter=function(){return new mi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wi.prototype.getSouthWest=function(){return this._sw},Wi.prototype.getNorthEast=function(){return this._ne},Wi.prototype.getNorthWest=function(){return new mi(this.getWest(),this.getNorth())},Wi.prototype.getSouthEast=function(){return new mi(this.getEast(),this.getSouth())},Wi.prototype.getWest=function(){return this._sw.lng},Wi.prototype.getSouth=function(){return this._sw.lat},Wi.prototype.getEast=function(){return this._ne.lng},Wi.prototype.getNorth=function(){return this._ne.lat},Wi.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wi.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wi.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wi.prototype.contains=function(R){var U=mi.convert(R),ee=U.lng,ue=U.lat,xe=this._sw.lat<=ue&&ue<=this._ne.lat,Ee=this._sw.lng<=ee&&ee<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ee=this._sw.lng>=ee&&ee>=this._ne.lng),xe&&Ee},Wi.convert=function(R){return!R||R instanceof Wi?R:new Wi(R)};var Ev=63710088e-1,mi=function(R,U){if(isNaN(R)||isNaN(U))throw new Error("Invalid LngLat object: ("+R+", "+U+")");if(this.lng=+R,this.lat=+U,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};mi.prototype.wrap=function(){return new mi(T(this.lng,-180,180),this.lat)},mi.prototype.toArray=function(){return[this.lng,this.lat]},mi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},mi.prototype.distanceTo=function(R){var U=Math.PI/180,ee=this.lat*U,ue=R.lat*U,xe=Math.sin(ee)*Math.sin(ue)+Math.cos(ee)*Math.cos(ue)*Math.cos((R.lng-this.lng)*U),Ee=Ev*Math.acos(Math.min(xe,1));return Ee},mi.prototype.toBounds=function(R){R===void 0&&(R=0);var U=40075017,ee=360*R/U,ue=ee/Math.cos(Math.PI/180*this.lat);return new Wi(new mi(this.lng-ue,this.lat-ee),new mi(this.lng+ue,this.lat+ee))},mi.convert=function(R){if(R instanceof mi)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new mi(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new mi(Number("lng"in R?R.lng:R.lon),Number(R.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 Cv=2*Math.PI*Ev;function Lv(D){return Cv*Math.cos(D*Math.PI/180)}function Pv(D){return(180+D)/360}function Rv(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function Dv(D,R){return D/Lv(R)}function P0(D){return D*360-180}function Sh(D){var R=180-D*360;return 360/Math.PI*Math.atan(Math.exp(R*Math.PI/180))-90}function R0(D,R){return D*Lv(Sh(R))}function D0(D){return 1/Math.cos(D*Math.PI/180)}var Pf=function(R,U,ee){ee===void 0&&(ee=0),this.x=+R,this.y=+U,this.z=+ee};Pf.fromLngLat=function(R,U){U===void 0&&(U=0);var ee=mi.convert(R);return new Pf(Pv(ee.lng),Rv(ee.lat),Dv(U,ee.lat))},Pf.prototype.toLngLat=function(){return new mi(P0(this.x),Sh(this.y))},Pf.prototype.toAltitude=function(){return R0(this.z,this.y)},Pf.prototype.meterInMercatorCoordinateUnits=function(){return 1/Cv*D0(Sh(this.y))};var Rf=function(R,U,ee){this.z=R,this.x=U,this.y=ee,this.key=Ac(0,R,R,U,ee)};Rf.prototype.equals=function(R){return this.z===R.z&&this.x===R.x&&this.y===R.y},Rf.prototype.url=function(R,U){var ee=L0(this.x,this.y,this.z),ue=I0(this.z,this.x,this.y);return R[(this.x+this.y)%R.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(U==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",ue).replace("{bbox-epsg-3857}",ee)},Rf.prototype.getTilePoint=function(R){var U=Math.pow(2,this.z);return new r((R.x*U-this.x)*ga,(R.y*U-this.y)*ga)},Rf.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Iv=function(R,U){this.wrap=R,this.canonical=U,this.key=Ac(R,U.z,U.z,U.x,U.y)},Yi=function(R,U,ee,ue,xe){this.overscaledZ=R,this.wrap=U,this.canonical=new Rf(ee,+ue,+xe),this.key=Ac(U,R,ee,ue,xe)};Yi.prototype.equals=function(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)},Yi.prototype.scaledTo=function(R){var U=this.canonical.z-R;return R>this.canonical.z?new Yi(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Yi(R,this.wrap,R,this.canonical.x>>U,this.canonical.y>>U)},Yi.prototype.calculateScaledKey=function(R,U){var ee=this.canonical.z-R;return R>this.canonical.z?Ac(this.wrap*+U,R,this.canonical.z,this.canonical.x,this.canonical.y):Ac(this.wrap*+U,R,R,this.canonical.x>>ee,this.canonical.y>>ee)},Yi.prototype.isChildOf=function(R){if(R.wrap!==this.wrap)return!1;var U=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ<this.overscaledZ&&R.canonical.x===this.canonical.x>>U&&R.canonical.y===this.canonical.y>>U},Yi.prototype.children=function(R){if(this.overscaledZ>=R)return[new Yi(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var U=this.canonical.z+1,ee=this.canonical.x*2,ue=this.canonical.y*2;return[new Yi(U,this.wrap,U,ee,ue),new Yi(U,this.wrap,U,ee+1,ue),new Yi(U,this.wrap,U,ee,ue+1),new Yi(U,this.wrap,U,ee+1,ue+1)]},Yi.prototype.isLessThan=function(R){return this.wrap<R.wrap?!0:this.wrap>R.wrap?!1:this.overscaledZ<R.overscaledZ?!0:this.overscaledZ>R.overscaledZ?!1:this.canonical.x<R.canonical.x?!0:this.canonical.x>R.canonical.x?!1:this.canonical.y<R.canonical.y},Yi.prototype.wrapped=function(){return new Yi(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Yi.prototype.unwrapTo=function(R){return new Yi(this.overscaledZ,R,this.canonical.z,this.canonical.x,this.canonical.y)},Yi.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Yi.prototype.toUnwrapped=function(){return new Iv(this.wrap,this.canonical)},Yi.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Yi.prototype.getTilePoint=function(R){return this.canonical.getTilePoint(new Pf(R.x-this.wrap,R.y))};function Ac(D,R,U,ee,ue){D*=2,D<0&&(D=D*-1-1);var xe=1<<U;return(xe*xe*D+xe*ue+ee).toString(36)+U.toString(36)+R.toString(36)}function I0(D,R,U){for(var ee="",ue,xe=D;xe>0;xe--)ue=1<<xe-1,ee+=(R&ue?1:0)+(U&ue?2:0);return ee}De("CanonicalTileID",Rf),De("OverscaledTileID",Yi,{omit:["posMatrix"]});var yu=function(R,U,ee){if(this.uid=R,U.height!==U.width)throw new RangeError("DEM tiles must be square");if(ee&&ee!=="mapbox"&&ee!=="terrarium")return O('"'+ee+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=U.height;var ue=this.dim=U.height-2;this.data=new Uint32Array(U.data.buffer),this.encoding=ee||"mapbox";for(var xe=0;xe<ue;xe++)this.data[this._idx(-1,xe)]=this.data[this._idx(0,xe)],this.data[this._idx(ue,xe)]=this.data[this._idx(ue-1,xe)],this.data[this._idx(xe,-1)]=this.data[this._idx(xe,0)],this.data[this._idx(xe,ue)]=this.data[this._idx(xe,ue-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(ue,-1)]=this.data[this._idx(ue-1,0)],this.data[this._idx(-1,ue)]=this.data[this._idx(0,ue-1)],this.data[this._idx(ue,ue)]=this.data[this._idx(ue-1,ue-1)]};yu.prototype.get=function(R,U){var ee=new Uint8Array(this.data.buffer),ue=this._idx(R,U)*4,xe=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return xe(ee[ue],ee[ue+1],ee[ue+2])},yu.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,.00390625,32768]:[6553.6,25.6,.1,1e4]},yu.prototype._idx=function(R,U){if(R<-1||R>=this.dim+1||U<-1||U>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(U+1)*this.stride+(R+1)},yu.prototype._unpackMapbox=function(R,U,ee){return(R*256*256+U*256+ee)/10-1e4},yu.prototype._unpackTerrarium=function(R,U,ee){return R*256+U+ee/256-32768},yu.prototype.getPixels=function(){return new Go({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},yu.prototype.backfillBorder=function(R,U,ee){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");var ue=U*this.dim,xe=U*this.dim+this.dim,Ee=ee*this.dim,Ye=ee*this.dim+this.dim;switch(U){case-1:ue=xe-1;break;case 1:xe=ue+1;break}switch(ee){case-1:Ee=Ye-1;break;case 1:Ye=Ee+1;break}for(var ot=-U*this.dim,mt=-ee*this.dim,At=Ee;At<Ye;At++)for(var Bt=ue;Bt<xe;Bt++)this.data[this._idx(Bt,At)]=R.data[this._idx(Bt+ot,At+mt)]},De("DEMData",yu);function k0(D,R){var U={};if(!R)return U;for(var ee=function(){var Ee=xe[ue],Ye=Ee.layerIds.map(function(Bt){return R.getLayer(Bt)}).filter(Boolean);if(Ye.length!==0){Ee.layers=Ye,Ee.stateDependentLayerIds&&(Ee.stateDependentLayers=Ee.stateDependentLayerIds.map(function(Bt){return Ye.filter(function(Jt){return Jt.id===Bt})[0]}));for(var ot=0,mt=Ye;ot<mt.length;ot+=1){var At=mt[ot];U[At.id]=Ee}}},ue=0,xe=D;ue<xe.length;ue+=1)ee();return U}var jc=function(R){this._stringToNumber={},this._numberToString=[];for(var U=0;U<R.length;U++){var ee=R[U];this._stringToNumber[ee]=U,this._numberToString[U]=ee}};jc.prototype.encode=function(R){return this._stringToNumber[R]},jc.prototype.decode=function(R){return this._numberToString[R]};var Kc=function(R,U,ee,ue,xe){this.type="Feature",this._vectorTileFeature=R,R._z=U,R._x=ee,R._y=ue,this.properties=R.properties,this.id=xe},Eh={geometry:{configurable:!0}};Eh.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},Eh.geometry.set=function(D){this._geometry=D},Kc.prototype.toJSON=function(){var R={geometry:this.geometry};for(var U in this)U==="_geometry"||U==="_vectorTileFeature"||(R[U]=this[U]);return R},Object.defineProperties(Kc.prototype,Eh);var qf=function(){this.state={},this.stateChanges={},this.deletedStates={}};qf.prototype.updateState=function(R,U,ee){var ue=String(U);if(this.stateChanges[R]=this.stateChanges[R]||{},this.stateChanges[R][ue]=this.stateChanges[R][ue]||{},m(this.stateChanges[R][ue],ee),this.deletedStates[R]===null){this.deletedStates[R]={};for(var xe in this.state[R])xe!==ue&&(this.deletedStates[R][xe]=null)}else{var Ee=this.deletedStates[R]&&this.deletedStates[R][ue]===null;if(Ee){this.deletedStates[R][ue]={};for(var Ye in this.state[R][ue])ee[Ye]||(this.deletedStates[R][ue][Ye]=null)}else for(var ot in ee){var mt=this.deletedStates[R]&&this.deletedStates[R][ue]&&this.deletedStates[R][ue][ot]===null;mt&&delete this.deletedStates[R][ue][ot]}}},qf.prototype.removeFeatureState=function(R,U,ee){var ue=this.deletedStates[R]===null;if(!ue){var xe=String(U);if(this.deletedStates[R]=this.deletedStates[R]||{},ee&&U!==void 0)this.deletedStates[R][xe]!==null&&(this.deletedStates[R][xe]=this.deletedStates[R][xe]||{},this.deletedStates[R][xe][ee]=null);else if(U!==void 0){var Ee=this.stateChanges[R]&&this.stateChanges[R][xe];if(Ee){this.deletedStates[R][xe]={};for(ee in this.stateChanges[R][xe])this.deletedStates[R][xe][ee]=null}else this.deletedStates[R][xe]=null}else this.deletedStates[R]=null}},qf.prototype.getState=function(R,U){var ee=String(U),ue=this.state[R]||{},xe=this.stateChanges[R]||{},Ee=m({},ue[ee],xe[ee]);if(this.deletedStates[R]===null)return{};if(this.deletedStates[R]){var Ye=this.deletedStates[R][U];if(Ye===null)return{};for(var ot in Ye)delete Ee[ot]}return Ee},qf.prototype.initializeTileState=function(R,U){R.setFeatureState(this.state,U)},qf.prototype.coalesceChanges=function(R,U){var ee={};for(var ue in this.stateChanges){this.state[ue]=this.state[ue]||{};var xe={};for(var Ee in this.stateChanges[ue])this.state[ue][Ee]||(this.state[ue][Ee]={}),m(this.state[ue][Ee],this.stateChanges[ue][Ee]),xe[Ee]=this.state[ue][Ee];ee[ue]=xe}for(var Ye in this.deletedStates){this.state[Ye]=this.state[Ye]||{};var ot={};if(this.deletedStates[Ye]===null)for(var mt in this.state[Ye])ot[mt]={},this.state[Ye][mt]={};else for(var At in this.deletedStates[Ye]){var Bt=this.deletedStates[Ye][At]===null;if(Bt)this.state[Ye][At]={};else for(var Jt=0,Zt=Object.keys(this.deletedStates[Ye][At]);Jt<Zt.length;Jt+=1){var hr=Zt[Jt];delete this.state[Ye][At][hr]}ot[At]=this.state[Ye][At]}ee[Ye]=ee[Ye]||{},m(ee[Ye],ot)}if(this.stateChanges={},this.deletedStates={},Object.keys(ee).length!==0)for(var Pr in R){var tn=R[Pr];tn.setFeatureState(ee,U)}};var mu=function(R,U){this.tileID=R,this.x=R.canonical.x,this.y=R.canonical.y,this.z=R.canonical.z,this.grid=new Ca(ga,16,0),this.grid3D=new Ca(ga,16,0),this.featureIndexArray=new Rc,this.promoteId=U};mu.prototype.insert=function(R,U,ee,ue,xe,Ee){var Ye=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ee,ue,xe);for(var ot=Ee?this.grid3D:this.grid,mt=0;mt<U.length;mt++){for(var At=U[mt],Bt=[1/0,1/0,-1/0,-1/0],Jt=0;Jt<At.length;Jt++){var Zt=At[Jt];Bt[0]=Math.min(Bt[0],Zt.x),Bt[1]=Math.min(Bt[1],Zt.y),Bt[2]=Math.max(Bt[2],Zt.x),Bt[3]=Math.max(Bt[3],Zt.y)}Bt[0]<ga&&Bt[1]<ga&&Bt[2]>=0&&Bt[3]>=0&&ot.insert(Ye,Bt[0],Bt[1],Bt[2],Bt[3])}},mu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Hf.VectorTile(new Bc(this.rawTileData)).layers,this.sourceLayerCoder=new jc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},mu.prototype.query=function(R,U,ee,ue){var xe=this;this.loadVTLayers();for(var Ee=R.params||{},Ye=ga/R.tileSize/R.scale,ot=us(Ee.filter),mt=R.queryGeometry,At=R.queryPadding*Ye,Bt=_v(mt),Jt=this.grid.query(Bt.minX-At,Bt.minY-At,Bt.maxX+At,Bt.maxY+At),Zt=_v(R.cameraQueryGeometry),hr=this.grid3D.query(Zt.minX-At,Zt.minY-At,Zt.maxX+At,Zt.maxY+At,function(On,jn,Yn,va){return Js(R.cameraQueryGeometry,On-At,jn-At,Yn+At,va+At)}),Pr=0,tn=hr;Pr<tn.length;Pr+=1){var jr=tn[Pr];Jt.push(jr)}Jt.sort(_0);for(var mn={},cn,yn=function(On){var jn=Jt[On];if(jn!==cn){cn=jn;var Yn=xe.featureIndexArray.get(jn),va=null;xe.loadMatchingFeature(mn,Yn.bucketIndex,Yn.sourceLayerIndex,Yn.featureIndex,ot,Ee.layers,Ee.availableImages,U,ee,ue,function(oa,ha,Ra){return va||(va=Wa(oa)),ha.queryIntersectsFeature(mt,oa,Ra,va,xe.z,R.transform,Ye,R.pixelPosMatrix)})}},Ln=0;Ln<Jt.length;Ln++)yn(Ln);return mn},mu.prototype.loadMatchingFeature=function(R,U,ee,ue,xe,Ee,Ye,ot,mt,At,Bt){var Jt=this.bucketLayerIDs[U];if(!(Ee&&!_(Ee,Jt))){var Zt=this.sourceLayerCoder.decode(ee),hr=this.vtLayers[Zt],Pr=hr.feature(ue);if(xe.needGeometry){var tn=fi(Pr,!0);if(!xe.filter(new pa(this.tileID.overscaledZ),tn,this.tileID.canonical))return}else if(!xe.filter(new pa(this.tileID.overscaledZ),Pr))return;for(var jr=this.getId(Pr,Zt),mn=0;mn<Jt.length;mn++){var cn=Jt[mn];if(!(Ee&&Ee.indexOf(cn)<0)){var yn=ot[cn];if(yn){var Ln={};jr!==void 0&&At&&(Ln=At.getState(yn.sourceLayer||"_geojsonTileLayer",jr));var On=m({},mt[cn]);On.paint=kv(On.paint,yn.paint,Pr,Ln,Ye),On.layout=kv(On.layout,yn.layout,Pr,Ln,Ye);var jn=!Bt||Bt(Pr,yn,Ln);if(jn){var Yn=new Kc(Pr,this.z,this.x,this.y,jr);Yn.layer=On;var va=R[cn];va===void 0&&(va=R[cn]=[]),va.push({featureIndex:ue,feature:Yn,intersectionZ:jn})}}}}}},mu.prototype.lookupSymbolFeatures=function(R,U,ee,ue,xe,Ee,Ye,ot){var mt={};this.loadVTLayers();for(var At=us(xe),Bt=0,Jt=R;Bt<Jt.length;Bt+=1){var Zt=Jt[Bt];this.loadMatchingFeature(mt,ee,ue,Zt,At,Ee,Ye,ot,U)}return mt},mu.prototype.hasLayer=function(R){for(var U=0,ee=this.bucketLayerIDs;U<ee.length;U+=1)for(var ue=ee[U],xe=0,Ee=ue;xe<Ee.length;xe+=1){var Ye=Ee[xe];if(R===Ye)return!0}return!1},mu.prototype.getId=function(R,U){var ee=R.id;if(this.promoteId){var ue=typeof this.promoteId=="string"?this.promoteId:this.promoteId[U];ee=R.properties[ue],typeof ee=="boolean"&&(ee=Number(ee))}return ee},De("FeatureIndex",mu,{omit:["rawTileData","sourceLayerCoder"]});function kv(D,R,U,ee,ue){return k(D,function(xe,Ee){var Ye=R instanceof Ki?R.get(Ee):null;return Ye&&Ye.evaluate?Ye.evaluate(U,ee,ue):Ye})}function _v(D){for(var R=1/0,U=1/0,ee=-1/0,ue=-1/0,xe=0,Ee=D;xe<Ee.length;xe+=1){var Ye=Ee[xe];R=Math.min(R,Ye.x),U=Math.min(U,Ye.y),ee=Math.max(ee,Ye.x),ue=Math.max(ue,Ye.y)}return{minX:R,minY:U,maxX:ee,maxY:ue}}function _0(D,R){return R-D}var z0=3e4,to=function(R,U){this.tileID=R,this.uid=p(),this.uses=0,this.tileSize=U,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(R){var U=R+this.timeAdded;U<ie.now()||this.fadeEndTime&&U<this.fadeEndTime||(this.fadeEndTime=U)},to.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},to.prototype.loadVectorData=function(R,U,ee){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!R){this.collisionBoxArray=new oc;return}R.featureIndex&&(this.latestFeatureIndex=R.featureIndex,R.rawTileData?(this.latestRawTileData=R.rawTileData,this.latestFeatureIndex.rawTileData=R.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=R.collisionBoxArray,this.buckets=k0(R.buckets,U.style),this.hasSymbolBuckets=!1;for(var ue in this.buckets){var xe=this.buckets[ue];if(xe instanceof oi)if(this.hasSymbolBuckets=!0,ee)xe.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var Ee in this.buckets){var Ye=this.buckets[Ee];if(Ye instanceof oi&&Ye.hasRTLText){this.hasRTLText=!0,Da();break}}this.queryPadding=0;for(var ot in this.buckets){var mt=this.buckets[ot];this.queryPadding=Math.max(this.queryPadding,U.style.getLayer(ot).queryRadius(mt))}R.imageAtlas&&(this.imageAtlas=R.imageAtlas),R.glyphAtlasImage&&(this.glyphAtlasImage=R.glyphAtlasImage)},to.prototype.unloadVectorData=function(){for(var R in this.buckets)this.buckets[R].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(R){return this.buckets[R.id]},to.prototype.upload=function(R){for(var U in this.buckets){var ee=this.buckets[U];ee.uploadPending()&&ee.upload(R)}var ue=R.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Lf(R,this.imageAtlas.image,ue.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Lf(R,this.glyphAtlasImage,ue.ALPHA),this.glyphAtlasImage=null)},to.prototype.prepare=function(R){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(R,this.imageAtlasTexture)},to.prototype.queryRenderedFeatures=function(R,U,ee,ue,xe,Ee,Ye,ot,mt,At){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:ue,cameraQueryGeometry:xe,scale:Ee,tileSize:this.tileSize,pixelPosMatrix:At,transform:ot,params:Ye,queryPadding:this.queryPadding*mt},R,U,ee)},to.prototype.querySourceFeatures=function(R,U){var ee=this.latestFeatureIndex;if(!(!ee||!ee.rawTileData)){var ue=ee.loadVTLayers(),xe=U?U.sourceLayer:"",Ee=ue._geojsonTileLayer||ue[xe];if(Ee)for(var Ye=us(U&&U.filter),ot=this.tileID.canonical,mt=ot.z,At=ot.x,Bt=ot.y,Jt={z:mt,x:At,y:Bt},Zt=0;Zt<Ee.length;Zt++){var hr=Ee.feature(Zt);if(Ye.needGeometry){var Pr=fi(hr,!0);if(!Ye.filter(new pa(this.tileID.overscaledZ),Pr,this.tileID.canonical))continue}else if(!Ye.filter(new pa(this.tileID.overscaledZ),hr))continue;var tn=ee.getId(hr,xe),jr=new Kc(hr,mt,At,Bt,tn);jr.tile=Jt,R.push(jr)}}},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(R){var U=this.expirationTime;if(R.cacheControl){var ee=$(R.cacheControl);ee["max-age"]&&(this.expirationTime=Date.now()+ee["max-age"]*1e3)}else R.expires&&(this.expirationTime=new Date(R.expires).getTime());if(this.expirationTime){var ue=Date.now(),xe=!1;if(this.expirationTime>ue)xe=!1;else if(!U)xe=!0;else if(this.expirationTime<U)xe=!0;else{var Ee=this.expirationTime-U;Ee?this.expirationTime=ue+Math.max(Ee,z0):xe=!0}xe?(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(R,U){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(R).length===0)){var ee=this.latestFeatureIndex.loadVTLayers();for(var ue in this.buckets)if(U.style.hasLayer(ue)){var xe=this.buckets[ue],Ee=xe.layers[0].sourceLayer||"_geojsonTileLayer",Ye=ee[Ee],ot=R[Ee];if(!(!Ye||!ot||Object.keys(ot).length===0)){xe.update(ot,Ye,this.imageAtlas&&this.imageAtlas.patternPositions||{});var mt=U&&U.style&&U.style.getLayer(ue);mt&&(this.queryPadding=Math.max(this.queryPadding,mt.queryRadius(xe)))}}}},to.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},to.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<ie.now()},to.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},to.prototype.setHoldDuration=function(R){this.symbolFadeHoldUntil=ie.now()+R},to.prototype.setDependencies=function(R,U){for(var ee={},ue=0,xe=U;ue<xe.length;ue+=1){var Ee=xe[ue];ee[Ee]=!0}this.dependencies[R]=ee},to.prototype.hasDependency=function(R,U){for(var ee=0,ue=R;ee<ue.length;ee+=1){var xe=ue[ee],Ee=this.dependencies[xe];if(Ee)for(var Ye=0,ot=U;Ye<ot.length;Ye+=1){var mt=ot[Ye];if(Ee[mt])return!0}}return!1};var F0=["type","source","source-layer","minzoom","maxzoom","filter","layout"],qu=s.performance,zv=function(R){this._marks={start:[R.url,"start"].join("#"),end:[R.url,"end"].join("#"),measure:R.url.toString()},qu.mark(this._marks.start)};zv.prototype.finish=function(){qu.mark(this._marks.end);var R=qu.getEntriesByName(this._marks.measure);return R.length===0&&(qu.measure(this._marks.measure,this._marks.start,this._marks.end),R=qu.getEntriesByName(this._marks.measure),qu.clearMarks(this._marks.start),qu.clearMarks(this._marks.end),qu.clearMeasures(this._marks.measure)),R},o.Actor=$f,o.AlphaImage=Cf,o.CanonicalTileID=Rf,o.CollisionBoxArray=oc,o.Color=Ga,o.DEMData=yu,o.DataConstantProperty=qn,o.DictionaryCoder=jc,o.EXTENT=ga,o.ErrorEvent=Dt,o.EvaluationParameters=pa,o.Event=Kt,o.Evented=sr,o.FeatureIndex=mu,o.FillBucket=Al,o.FillExtrusionBucket=Ml,o.ImageAtlas=mc,o.ImagePosition=Uc,o.LineBucket=Ro,o.LngLat=mi,o.LngLatBounds=Wi,o.MercatorCoordinate=Pf,o.ONE_EM=lo,o.OverscaledTileID=Yi,o.Point=r,o.Point$1=r,o.Properties=ei,o.Protobuf=Bc,o.RGBAImage=Go,o.RequestManager=_e,o.RequestPerformance=zv,o.ResourceType=cr,o.SegmentVector=Hi,o.SourceFeatureState=qf,o.StructArrayLayout1ui2=Yu,o.StructArrayLayout2f1f2i16=bl,o.StructArrayLayout2i4=hu,o.StructArrayLayout3ui6=wl,o.StructArrayLayout4i8=rc,o.SymbolBucket=oi,o.Texture=Lf,o.Tile=to,o.Transitionable=ja,o.Uniform1f=Ur,o.Uniform1i=Cr,o.Uniform2f=Nr,o.Uniform3f=Fr,o.Uniform4f=Gr,o.UniformColor=nn,o.UniformMatrix4f=Rn,o.UnwrappedTileID=Iv,o.ValidationError=Dr,o.WritingMode=hs,o.ZoomHistory=Ft,o.add=Nf,o.addDynamicAttributes=Th,o.asyncAll=f,o.bezier=l,o.bindAll=C,o.browser=ie,o.cacheEntryPossiblyAdded=Ct,o.clamp=h,o.clearTileCache=gr,o.clipLine=pv,o.clone=Ff,o.clone$1=B,o.clone$2=rh,o.collisionCircleLayout=pp,o.config=ne,o.create=zf,o.create$1=go,o.create$2=_f,o.createCommonjsModule=L,o.createExpression=ss,o.createLayout=gi,o.createStyleLayer=C0,o.cross=Uv,o.deepEqual=a,o.dot=Nv,o.dot$1=Yv,o.ease=y,o.emitValidationErrors=Aa,o.endsWith=x,o.enforceCacheSizeLimit=Yt,o.evaluateSizeForFeature=lv,o.evaluateSizeForZoom=uv,o.evaluateVariableOffset=mv,o.evented=ya,o.extend=m,o.featureFilter=us,o.filterObject=I,o.fromRotation=ju,o.getAnchorAlignment=mh,o.getAnchorJustification=wh,o.getArrayBuffer=_t,o.getImage=Lt,o.getJSON=Mt,o.getRTLTextPluginStatus=Sa,o.getReferrer=ct,o.getVideo=Ut,o.identity=Of,o.invert=Ku,o.isChar=Ot,o.isMapboxURL=ze,o.keysDifference=v,o.makeRequest=Et,o.mapObject=k,o.mercatorXfromLng=Pv,o.mercatorYfromLat=Rv,o.mercatorZfromAltitude=Dv,o.mul=th,o.multiply=Ju,o.mvt=Hf,o.nextPowerOfTwo=w,o.normalize=uc,o.number=yi,o.offscreenCanvasSupported=Wt,o.ortho=eh,o.parseGlyphPBF=Hp,o.pbf=Bc,o.performSymbolLayout=s0,o.perspective=lc,o.pick=b,o.plugin=Hn,o.polygonIntersectsPolygon=ka,o.postMapLoadEvent=Oe,o.postTurnstileEvent=Ue,o.potpack=ev,o.refProperties=F0,o.register=De,o.registerForPluginStateChange=Za,o.renderColorRamp=kh,o.rotate=Sf,o.rotateX=Ho,o.rotateZ=Bf,o.scale=Vo,o.scale$1=Wv,o.scale$2=ah,o.setCacheLimits=ht,o.setRTLTextPlugin=Ai,o.sphericalToCartesian=V,o.sqrLen=jv,o.styleSpec=yr,o.sub=Hv,o.symbolSize=$p,o.transformMat3=Vv,o.transformMat4=Ic,o.translate=Ri,o.triggerPluginCompletionEvent=ra,o.uniqueId=p,o.validateCustomStyleLayer=M0,o.validateLight=Un,o.validateStyle=Sn,o.values=n,o.vectorTile=Hf,o.version=M,o.warnOnce=O,o.webpSupported=le,o.window=s,o.wrap=T}),P(["./shared"],function(o){function L(ct){var qe=typeof ct;if(qe==="number"||qe==="boolean"||qe==="string"||ct===void 0||ct===null)return JSON.stringify(ct);if(Array.isArray(ct)){for(var dt="[",bt=0,Et=ct;bt<Et.length;bt+=1){var Mt=Et[bt];dt+=L(Mt)+","}return dt+"]"}for(var _t=Object.keys(ct).sort(),It="{",Gt=0;Gt<_t.length;Gt++)It+=JSON.stringify(_t[Gt])+":"+L(ct[_t[Gt]])+",";return It+"}"}function M(ct){for(var qe="",dt=0,bt=o.refProperties;dt<bt.length;dt+=1){var Et=bt[dt];qe+="/"+L(ct[Et])}return qe}function d(ct,qe){for(var dt={},bt=0;bt<ct.length;bt++){var Et=qe&&qe[ct[bt].id]||M(ct[bt]);qe&&(qe[ct[bt].id]=Et);var Mt=dt[Et];Mt||(Mt=dt[Et]=[]),Mt.push(ct[bt])}var _t=[];for(var It in dt)_t.push(dt[It]);return _t}var g=function(qe){this.keyCache={},qe&&this.replace(qe)};g.prototype.replace=function(qe){this._layerConfigs={},this._layers={},this.update(qe,[])},g.prototype.update=function(qe,dt){for(var bt=this,Et=0,Mt=qe;Et<Mt.length;Et+=1){var _t=Mt[Et];this._layerConfigs[_t.id]=_t;var It=this._layers[_t.id]=o.createStyleLayer(_t);It._featureFilter=o.featureFilter(It.filter),this.keyCache[_t.id]&&delete this.keyCache[_t.id]}for(var Gt=0,nr=dt;Gt<nr.length;Gt+=1){var ar=nr[Gt];delete this.keyCache[ar],delete this._layerConfigs[ar],delete this._layers[ar]}this.familiesBySource={};for(var ir=d(o.values(this._layerConfigs),this.keyCache),Be=0,Fe=ir;Be<Fe.length;Be+=1){var Rt=Fe[Be],Lt=Rt.map(function(sr){return bt._layers[sr.id]}),Ut=Lt[0];if(Ut.visibility!=="none"){var Qt=Ut.source||"",rr=this.familiesBySource[Qt];rr||(rr=this.familiesBySource[Qt]={});var Kt=Ut.sourceLayer||"_geojsonTileLayer",Dt=rr[Kt];Dt||(Dt=rr[Kt]=[]),Dt.push(Lt)}}};var r=1,t=function(qe){var dt={},bt=[];for(var Et in qe){var Mt=qe[Et],_t=dt[Et]={};for(var It in Mt){var Gt=Mt[+It];if(!(!Gt||Gt.bitmap.width===0||Gt.bitmap.height===0)){var nr={x:0,y:0,w:Gt.bitmap.width+2*r,h:Gt.bitmap.height+2*r};bt.push(nr),_t[It]={rect:nr,metrics:Gt.metrics}}}}var ar=o.potpack(bt),ir=ar.w,Be=ar.h,Fe=new o.AlphaImage({width:ir||1,height:Be||1});for(var Rt in qe){var Lt=qe[Rt];for(var Ut in Lt){var Qt=Lt[+Ut];if(!(!Qt||Qt.bitmap.width===0||Qt.bitmap.height===0)){var rr=dt[Rt][Ut].rect;o.AlphaImage.copy(Qt.bitmap,Fe,{x:0,y:0},{x:rr.x+r,y:rr.y+r},Qt.bitmap)}}}this.image=Fe,this.positions=dt};o.register("GlyphAtlas",t);var s=function(qe){this.tileID=new o.OverscaledTileID(qe.tileID.overscaledZ,qe.tileID.wrap,qe.tileID.canonical.z,qe.tileID.canonical.x,qe.tileID.canonical.y),this.uid=qe.uid,this.zoom=qe.zoom,this.pixelRatio=qe.pixelRatio,this.tileSize=qe.tileSize,this.source=qe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=qe.showCollisionBoxes,this.collectResourceTiming=!!qe.collectResourceTiming,this.returnDependencies=!!qe.returnDependencies,this.promoteId=qe.promoteId};s.prototype.parse=function(qe,dt,bt,Et,Mt){var _t=this;this.status="parsing",this.data=qe,this.collisionBoxArray=new o.CollisionBoxArray;var It=new o.DictionaryCoder(Object.keys(qe.layers).sort()),Gt=new o.FeatureIndex(this.tileID,this.promoteId);Gt.bucketLayerIDs=[];var nr={},ar={featureIndex:Gt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:bt},ir=dt.familiesBySource[this.source];for(var Be in ir){var Fe=qe.layers[Be];if(Fe){Fe.version===1&&o.warnOnce('Vector tile source "'+this.source+'" layer "'+Be+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Rt=It.encode(Be),Lt=[],Ut=0;Ut<Fe.length;Ut++){var Qt=Fe.feature(Ut),rr=Gt.getId(Qt,Be);Lt.push({feature:Qt,id:rr,index:Ut,sourceLayerIndex:Rt})}for(var Kt=0,Dt=ir[Be];Kt<Dt.length;Kt+=1){var sr=Dt[Kt],fr=sr[0];if(!(fr.minzoom&&this.zoom<Math.floor(fr.minzoom))&&!(fr.maxzoom&&this.zoom>=fr.maxzoom)&&fr.visibility!=="none"){a(sr,this.zoom,bt);var vr=nr[fr.id]=fr.createBucket({index:Gt.bucketLayerIDs.length,layers:sr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Rt,sourceID:this.source});vr.populate(Lt,ar,this.tileID.canonical),Gt.bucketLayerIDs.push(sr.map(function(or){return or.id}))}}}}var lr,Or,Sr,Ar,sn=o.mapObject(ar.glyphDependencies,function(or){return Object.keys(or).map(Number)});Object.keys(sn).length?Et.send("getGlyphs",{uid:this.uid,stacks:sn},function(or,Lr){lr||(lr=or,Or=Lr,xn.call(_t))}):Or={};var Jr=Object.keys(ar.iconDependencies);Jr.length?Et.send("getImages",{icons:Jr,source:this.source,tileID:this.tileID,type:"icons"},function(or,Lr){lr||(lr=or,Sr=Lr,xn.call(_t))}):Sr={};var bn=Object.keys(ar.patternDependencies);bn.length?Et.send("getImages",{icons:bn,source:this.source,tileID:this.tileID,type:"patterns"},function(or,Lr){lr||(lr=or,Ar=Lr,xn.call(_t))}):Ar={},xn.call(this);function xn(){if(lr)return Mt(lr);if(Or&&Sr&&Ar){var or=new t(Or),Lr=new o.ImageAtlas(Sr,Ar);for(var Br in nr){var _r=nr[Br];_r instanceof o.SymbolBucket?(a(_r.layers,this.zoom,bt),o.performSymbolLayout(_r,Or,or.positions,Sr,Lr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):_r.hasPattern&&(_r instanceof o.LineBucket||_r instanceof o.FillBucket||_r instanceof o.FillExtrusionBucket)&&(a(_r.layers,this.zoom,bt),_r.addFeatures(ar,this.tileID.canonical,Lr.patternPositions))}this.status="done",Mt(null,{buckets:o.values(nr).filter(function(Qr){return!Qr.isEmpty()}),featureIndex:Gt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:or.image,imageAtlas:Lr,glyphMap:this.returnDependencies?Or:null,iconMap:this.returnDependencies?Sr:null,glyphPositions:this.returnDependencies?or.positions:null})}}};function a(ct,qe,dt){for(var bt=new o.EvaluationParameters(qe),Et=0,Mt=ct;Et<Mt.length;Et+=1){var _t=Mt[Et];_t.recalculate(bt,dt)}}function c(ct,qe){var dt=o.getArrayBuffer(ct.request,function(bt,Et,Mt,_t){bt?qe(bt):Et&&qe(null,{vectorTile:new o.vectorTile.VectorTile(new o.pbf(Et)),rawData:Et,cacheControl:Mt,expires:_t})});return function(){dt.cancel(),qe()}}var u=function(qe,dt,bt,Et){this.actor=qe,this.layerIndex=dt,this.availableImages=bt,this.loadVectorData=Et||c,this.loading={},this.loaded={}};u.prototype.loadTile=function(qe,dt){var bt=this,Et=qe.uid;this.loading||(this.loading={});var Mt=qe&&qe.request&&qe.request.collectResourceTiming?new o.RequestPerformance(qe.request):!1,_t=this.loading[Et]=new s(qe);_t.abort=this.loadVectorData(qe,function(It,Gt){if(delete bt.loading[Et],It||!Gt)return _t.status="done",bt.loaded[Et]=_t,dt(It);var nr=Gt.rawData,ar={};Gt.expires&&(ar.expires=Gt.expires),Gt.cacheControl&&(ar.cacheControl=Gt.cacheControl);var ir={};if(Mt){var Be=Mt.finish();Be&&(ir.resourceTiming=JSON.parse(JSON.stringify(Be)))}_t.vectorTile=Gt.vectorTile,_t.parse(Gt.vectorTile,bt.layerIndex,bt.availableImages,bt.actor,function(Fe,Rt){if(Fe||!Rt)return dt(Fe);dt(null,o.extend({rawTileData:nr.slice(0)},Rt,ar,ir))}),bt.loaded=bt.loaded||{},bt.loaded[Et]=_t})},u.prototype.reloadTile=function(qe,dt){var bt=this,Et=this.loaded,Mt=qe.uid,_t=this;if(Et&&Et[Mt]){var It=Et[Mt];It.showCollisionBoxes=qe.showCollisionBoxes;var Gt=function(nr,ar){var ir=It.reloadCallback;ir&&(delete It.reloadCallback,It.parse(It.vectorTile,_t.layerIndex,bt.availableImages,_t.actor,ir)),dt(nr,ar)};It.status==="parsing"?It.reloadCallback=Gt:It.status==="done"&&(It.vectorTile?It.parse(It.vectorTile,this.layerIndex,this.availableImages,this.actor,Gt):Gt())}},u.prototype.abortTile=function(qe,dt){var bt=this.loading,Et=qe.uid;bt&&bt[Et]&&bt[Et].abort&&(bt[Et].abort(),delete bt[Et]),dt()},u.prototype.removeTile=function(qe,dt){var bt=this.loaded,Et=qe.uid;bt&&bt[Et]&&delete bt[Et],dt()};var l=o.window.ImageBitmap,y=function(){this.loaded={}};y.prototype.loadTile=function(qe,dt){var bt=qe.uid,Et=qe.encoding,Mt=qe.rawImageData,_t=l&&Mt instanceof l?this.getImageData(Mt):Mt,It=new o.DEMData(bt,_t,Et);this.loaded=this.loaded||{},this.loaded[bt]=It,dt(null,It)},y.prototype.getImageData=function(qe){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(qe.width,qe.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=qe.width,this.offscreenCanvas.height=qe.height,this.offscreenCanvasContext.drawImage(qe,0,0,qe.width,qe.height);var dt=this.offscreenCanvasContext.getImageData(-1,-1,qe.width+2,qe.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new o.RGBAImage({width:dt.width,height:dt.height},dt.data)},y.prototype.removeTile=function(qe){var dt=this.loaded,bt=qe.uid;dt&&dt[bt]&&delete dt[bt]};var h=T;function T(ct,qe){var dt=ct&&ct.type,bt;if(dt==="FeatureCollection")for(bt=0;bt<ct.features.length;bt++)T(ct.features[bt],qe);else if(dt==="GeometryCollection")for(bt=0;bt<ct.geometries.length;bt++)T(ct.geometries[bt],qe);else if(dt==="Feature")T(ct.geometry,qe);else if(dt==="Polygon")f(ct.coordinates,qe);else if(dt==="MultiPolygon")for(bt=0;bt<ct.coordinates.length;bt++)f(ct.coordinates[bt],qe);return ct}function f(ct,qe){if(ct.length!==0){n(ct[0],qe);for(var dt=1;dt<ct.length;dt++)n(ct[dt],!qe)}}function n(ct,qe){for(var dt=0,bt=0,Et=ct.length,Mt=Et-1;bt<Et;Mt=bt++)dt+=(ct[bt][0]-ct[Mt][0])*(ct[Mt][1]+ct[bt][1]);dt>=0!=!!qe&&ct.reverse()}var v=o.vectorTile.VectorTileFeature.prototype.toGeoJSON,m=function(qe){this._feature=qe,this.extent=o.EXTENT,this.type=qe.type,this.properties=qe.tags,"id"in qe&&!isNaN(qe.id)&&(this.id=parseInt(qe.id,10))};m.prototype.loadGeometry=function(){if(this._feature.type===1){for(var qe=[],dt=0,bt=this._feature.geometry;dt<bt.length;dt+=1){var Et=bt[dt];qe.push([new o.Point$1(Et[0],Et[1])])}return qe}else{for(var Mt=[],_t=0,It=this._feature.geometry;_t<It.length;_t+=1){for(var Gt=It[_t],nr=[],ar=0,ir=Gt;ar<ir.length;ar+=1){var Be=ir[ar];nr.push(new o.Point$1(Be[0],Be[1]))}Mt.push(nr)}return Mt}},m.prototype.toGeoJSON=function(qe,dt,bt){return v.call(this,qe,dt,bt)};var b=function(qe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=o.EXTENT,this.length=qe.length,this._features=qe};b.prototype.feature=function(qe){return new m(this._features[qe])};var E=o.vectorTile.VectorTileFeature,p=S;function S(ct,qe){this.options=qe||{},this.features=ct,this.length=ct.length}S.prototype.feature=function(ct){return new w(this.features[ct],this.options.extent)};function w(ct,qe){this.id=typeof ct.id=="number"?ct.id:void 0,this.type=ct.type,this.rawGeometry=ct.type===1?[ct.geometry]:ct.geometry,this.properties=ct.tags,this.extent=qe||4096}w.prototype.loadGeometry=function(){var ct=this.rawGeometry;this.geometry=[];for(var qe=0;qe<ct.length;qe++){for(var dt=ct[qe],bt=[],Et=0;Et<dt.length;Et++)bt.push(new o.Point$1(dt[Et][0],dt[Et][1]));this.geometry.push(bt)}return this.geometry},w.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var ct=this.geometry,qe=1/0,dt=-1/0,bt=1/0,Et=-1/0,Mt=0;Mt<ct.length;Mt++)for(var _t=ct[Mt],It=0;It<_t.length;It++){var Gt=_t[It];qe=Math.min(qe,Gt.x),dt=Math.max(dt,Gt.x),bt=Math.min(bt,Gt.y),Et=Math.max(Et,Gt.y)}return[qe,bt,dt,Et]},w.prototype.toGeoJSON=E.prototype.toGeoJSON;var i=I,C=I,x=B,k=p;function I(ct){var qe=new o.pbf;return _(ct,qe),qe.finish()}function B(ct,qe){qe=qe||{};var dt={};for(var bt in ct)dt[bt]=new p(ct[bt].features,qe),dt[bt].name=bt,dt[bt].version=qe.version,dt[bt].extent=qe.extent;return I({layers:dt})}function _(ct,qe){for(var dt in ct.layers)qe.writeMessage(3,z,ct.layers[dt])}function z(ct,qe){qe.writeVarintField(15,ct.version||1),qe.writeStringField(1,ct.name||""),qe.writeVarintField(5,ct.extent||4096);var dt,bt={keys:[],values:[],keycache:{},valuecache:{}};for(dt=0;dt<ct.length;dt++)bt.feature=ct.feature(dt),qe.writeMessage(2,O,bt);var Et=bt.keys;for(dt=0;dt<Et.length;dt++)qe.writeStringField(3,Et[dt]);var Mt=bt.values;for(dt=0;dt<Mt.length;dt++)qe.writeMessage(4,$,Mt[dt])}function O(ct,qe){var dt=ct.feature;dt.id!==void 0&&qe.writeVarintField(1,dt.id),qe.writeMessage(2,F,ct),qe.writeVarintField(3,dt.type),qe.writeMessage(4,j,dt)}function F(ct,qe){var dt=ct.feature,bt=ct.keys,Et=ct.values,Mt=ct.keycache,_t=ct.valuecache;for(var It in dt.properties){var Gt=Mt[It];typeof Gt>"u"&&(bt.push(It),Gt=bt.length-1,Mt[It]=Gt),qe.writeVarint(Gt);var nr=dt.properties[It],ar=typeof nr;ar!=="string"&&ar!=="boolean"&&ar!=="number"&&(nr=JSON.stringify(nr));var ir=ar+":"+nr,Be=_t[ir];typeof Be>"u"&&(Et.push(nr),Be=Et.length-1,_t[ir]=Be),qe.writeVarint(Be)}}function N(ct,qe){return(qe<<3)+(ct&7)}function V(ct){return ct<<1^ct>>31}function j(ct,qe){for(var dt=ct.loadGeometry(),bt=ct.type,Et=0,Mt=0,_t=dt.length,It=0;It<_t;It++){var Gt=dt[It],nr=1;bt===1&&(nr=Gt.length),qe.writeVarint(N(1,nr));for(var ar=bt===3?Gt.length-1:Gt.length,ir=0;ir<ar;ir++){ir===1&&bt!==1&&qe.writeVarint(N(2,ar-1));var Be=Gt[ir].x-Et,Fe=Gt[ir].y-Mt;qe.writeVarint(V(Be)),qe.writeVarint(V(Fe)),Et+=Be,Mt+=Fe}bt===3&&qe.writeVarint(N(7,1))}}function $(ct,qe){var dt=typeof ct;dt==="string"?qe.writeStringField(1,ct):dt==="boolean"?qe.writeBooleanField(7,ct):dt==="number"&&(ct%1!==0?qe.writeDoubleField(3,ct):ct<0?qe.writeSVarintField(6,ct):qe.writeVarintField(5,ct))}i.fromVectorTileJs=C,i.fromGeojsonVt=x,i.GeoJSONWrapper=k;function q(ct,qe,dt,bt,Et,Mt){if(!(Et-bt<=dt)){var _t=bt+Et>>1;oe(ct,qe,_t,bt,Et,Mt%2),q(ct,qe,dt,bt,_t-1,Mt+1),q(ct,qe,dt,_t+1,Et,Mt+1)}}function oe(ct,qe,dt,bt,Et,Mt){for(;Et>bt;){if(Et-bt>600){var _t=Et-bt+1,It=dt-bt+1,Gt=Math.log(_t),nr=.5*Math.exp(2*Gt/3),ar=.5*Math.sqrt(Gt*nr*(_t-nr)/_t)*(It-_t/2<0?-1:1),ir=Math.max(bt,Math.floor(dt-It*nr/_t+ar)),Be=Math.min(Et,Math.floor(dt+(_t-It)*nr/_t+ar));oe(ct,qe,dt,ir,Be,Mt)}var Fe=qe[2*dt+Mt],Rt=bt,Lt=Et;for(Z(ct,qe,bt,dt),qe[2*Et+Mt]>Fe&&Z(ct,qe,bt,Et);Rt<Lt;){for(Z(ct,qe,Rt,Lt),Rt++,Lt--;qe[2*Rt+Mt]<Fe;)Rt++;for(;qe[2*Lt+Mt]>Fe;)Lt--}qe[2*bt+Mt]===Fe?Z(ct,qe,bt,Lt):(Lt++,Z(ct,qe,Lt,Et)),Lt<=dt&&(bt=Lt+1),dt<=Lt&&(Et=Lt-1)}}function Z(ct,qe,dt,bt){G(ct,dt,bt),G(qe,2*dt,2*bt),G(qe,2*dt+1,2*bt+1)}function G(ct,qe,dt){var bt=ct[qe];ct[qe]=ct[dt],ct[dt]=bt}function re(ct,qe,dt,bt,Et,Mt,_t){for(var It=[0,ct.length-1,0],Gt=[],nr,ar;It.length;){var ir=It.pop(),Be=It.pop(),Fe=It.pop();if(Be-Fe<=_t){for(var Rt=Fe;Rt<=Be;Rt++)nr=qe[2*Rt],ar=qe[2*Rt+1],nr>=dt&&nr<=Et&&ar>=bt&&ar<=Mt&&Gt.push(ct[Rt]);continue}var Lt=Math.floor((Fe+Be)/2);nr=qe[2*Lt],ar=qe[2*Lt+1],nr>=dt&&nr<=Et&&ar>=bt&&ar<=Mt&&Gt.push(ct[Lt]);var Ut=(ir+1)%2;(ir===0?dt<=nr:bt<=ar)&&(It.push(Fe),It.push(Lt-1),It.push(Ut)),(ir===0?Et>=nr:Mt>=ar)&&(It.push(Lt+1),It.push(Be),It.push(Ut))}return Gt}function H(ct,qe,dt,bt,Et,Mt){for(var _t=[0,ct.length-1,0],It=[],Gt=Et*Et;_t.length;){var nr=_t.pop(),ar=_t.pop(),ir=_t.pop();if(ar-ir<=Mt){for(var Be=ir;Be<=ar;Be++)J(qe[2*Be],qe[2*Be+1],dt,bt)<=Gt&&It.push(ct[Be]);continue}var Fe=Math.floor((ir+ar)/2),Rt=qe[2*Fe],Lt=qe[2*Fe+1];J(Rt,Lt,dt,bt)<=Gt&&It.push(ct[Fe]);var Ut=(nr+1)%2;(nr===0?dt-Et<=Rt:bt-Et<=Lt)&&(_t.push(ir),_t.push(Fe-1),_t.push(Ut)),(nr===0?dt+Et>=Rt:bt+Et>=Lt)&&(_t.push(Fe+1),_t.push(ar),_t.push(Ut))}return It}function J(ct,qe,dt,bt){var Et=ct-dt,Mt=qe-bt;return Et*Et+Mt*Mt}var ae=function(ct){return ct[0]},K=function(ct){return ct[1]},Y=function(qe,dt,bt,Et,Mt){dt===void 0&&(dt=ae),bt===void 0&&(bt=K),Et===void 0&&(Et=64),Mt===void 0&&(Mt=Float64Array),this.nodeSize=Et,this.points=qe;for(var _t=qe.length<65536?Uint16Array:Uint32Array,It=this.ids=new _t(qe.length),Gt=this.coords=new Mt(qe.length*2),nr=0;nr<qe.length;nr++)It[nr]=nr,Gt[2*nr]=dt(qe[nr]),Gt[2*nr+1]=bt(qe[nr]);q(It,Gt,Et,0,It.length-1,0)};Y.prototype.range=function(qe,dt,bt,Et){return re(this.ids,this.coords,qe,dt,bt,Et,this.nodeSize)},Y.prototype.within=function(qe,dt,bt){return H(this.ids,this.coords,qe,dt,bt,this.nodeSize)};var ie={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(ct){return ct}},ne=function(qe){this.options=Se(Object.create(ie),qe),this.trees=new Array(this.options.maxZoom+1)};ne.prototype.load=function(qe){var dt=this.options,bt=dt.log,Et=dt.minZoom,Mt=dt.maxZoom,_t=dt.nodeSize;bt&&console.time("total time");var It="prepare "+qe.length+" points";bt&&console.time(It),this.points=qe;for(var Gt=[],nr=0;nr<qe.length;nr++)qe[nr].geometry&&Gt.push(de(qe[nr],nr));this.trees[Mt+1]=new Y(Gt,_e,ze,_t,Float32Array),bt&&console.timeEnd(It);for(var ar=Mt;ar>=Et;ar--){var ir=+Date.now();Gt=this._cluster(Gt,ar),this.trees[ar]=new Y(Gt,_e,ze,_t,Float32Array),bt&&console.log("z%d: %d clusters in %dms",ar,Gt.length,+Date.now()-ir)}return bt&&console.timeEnd("total time"),this},ne.prototype.getClusters=function(qe,dt){var bt=((qe[0]+180)%360+360)%360-180,Et=Math.max(-90,Math.min(90,qe[1])),Mt=qe[2]===180?180:((qe[2]+180)%360+360)%360-180,_t=Math.max(-90,Math.min(90,qe[3]));if(qe[2]-qe[0]>=360)bt=-180,Mt=180;else if(bt>Mt){var It=this.getClusters([bt,Et,180,_t],dt),Gt=this.getClusters([-180,Et,Mt,_t],dt);return It.concat(Gt)}for(var nr=this.trees[this._limitZoom(dt)],ar=nr.range(Le(bt),ve(_t),Le(Mt),ve(Et)),ir=[],Be=0,Fe=ar;Be<Fe.length;Be+=1){var Rt=Fe[Be],Lt=nr.points[Rt];ir.push(Lt.numPoints?we(Lt):this.points[Lt.index])}return ir},ne.prototype.getChildren=function(qe){var dt=this._getOriginId(qe),bt=this._getOriginZoom(qe),Et="No cluster with the specified id.",Mt=this.trees[bt];if(!Mt)throw new Error(Et);var _t=Mt.points[dt];if(!_t)throw new Error(Et);for(var It=this.options.radius/(this.options.extent*Math.pow(2,bt-1)),Gt=Mt.within(_t.x,_t.y,It),nr=[],ar=0,ir=Gt;ar<ir.length;ar+=1){var Be=ir[ar],Fe=Mt.points[Be];Fe.parentId===qe&&nr.push(Fe.numPoints?we(Fe):this.points[Fe.index])}if(nr.length===0)throw new Error(Et);return nr},ne.prototype.getLeaves=function(qe,dt,bt){dt=dt||10,bt=bt||0;var Et=[];return this._appendLeaves(Et,qe,dt,bt,0),Et},ne.prototype.getTile=function(qe,dt,bt){var Et=this.trees[this._limitZoom(qe)],Mt=Math.pow(2,qe),_t=this.options,It=_t.extent,Gt=_t.radius,nr=Gt/It,ar=(bt-nr)/Mt,ir=(bt+1+nr)/Mt,Be={features:[]};return this._addTileFeatures(Et.range((dt-nr)/Mt,ar,(dt+1+nr)/Mt,ir),Et.points,dt,bt,Mt,Be),dt===0&&this._addTileFeatures(Et.range(1-nr/Mt,ar,1,ir),Et.points,Mt,bt,Mt,Be),dt===Mt-1&&this._addTileFeatures(Et.range(0,ar,nr/Mt,ir),Et.points,-1,bt,Mt,Be),Be.features.length?Be:null},ne.prototype.getClusterExpansionZoom=function(qe){for(var dt=this._getOriginZoom(qe)-1;dt<=this.options.maxZoom;){var bt=this.getChildren(qe);if(dt++,bt.length!==1)break;qe=bt[0].properties.cluster_id}return dt},ne.prototype._appendLeaves=function(qe,dt,bt,Et,Mt){for(var _t=this.getChildren(dt),It=0,Gt=_t;It<Gt.length;It+=1){var nr=Gt[It],ar=nr.properties;if(ar&&ar.cluster?Mt+ar.point_count<=Et?Mt+=ar.point_count:Mt=this._appendLeaves(qe,ar.cluster_id,bt,Et,Mt):Mt<Et?Mt++:qe.push(nr),qe.length===bt)break}return Mt},ne.prototype._addTileFeatures=function(qe,dt,bt,Et,Mt,_t){for(var It=0,Gt=qe;It<Gt.length;It+=1){var nr=Gt[It],ar=dt[nr],ir=ar.numPoints,Be={type:1,geometry:[[Math.round(this.options.extent*(ar.x*Mt-bt)),Math.round(this.options.extent*(ar.y*Mt-Et))]],tags:ir?me(ar):this.points[ar.index].properties},Fe=void 0;ir?Fe=ar.id:this.options.generateId?Fe=ar.index:this.points[ar.index].id&&(Fe=this.points[ar.index].id),Fe!==void 0&&(Be.id=Fe),_t.features.push(Be)}},ne.prototype._limitZoom=function(qe){return Math.max(this.options.minZoom,Math.min(+qe,this.options.maxZoom+1))},ne.prototype._cluster=function(qe,dt){for(var bt=[],Et=this.options,Mt=Et.radius,_t=Et.extent,It=Et.reduce,Gt=Et.minPoints,nr=Mt/(_t*Math.pow(2,dt)),ar=0;ar<qe.length;ar++){var ir=qe[ar];if(!(ir.zoom<=dt)){ir.zoom=dt;for(var Be=this.trees[dt+1],Fe=Be.within(ir.x,ir.y,nr),Rt=ir.numPoints||1,Lt=Rt,Ut=0,Qt=Fe;Ut<Qt.length;Ut+=1){var rr=Qt[Ut],Kt=Be.points[rr];Kt.zoom>dt&&(Lt+=Kt.numPoints||1)}if(Lt>=Gt){for(var Dt=ir.x*Rt,sr=ir.y*Rt,fr=It&&Rt>1?this._map(ir,!0):null,vr=(ar<<5)+(dt+1)+this.points.length,lr=0,Or=Fe;lr<Or.length;lr+=1){var Sr=Or[lr],Ar=Be.points[Sr];if(!(Ar.zoom<=dt)){Ar.zoom=dt;var sn=Ar.numPoints||1;Dt+=Ar.x*sn,sr+=Ar.y*sn,Ar.parentId=vr,It&&(fr||(fr=this._map(ir,!0)),It(fr,this._map(Ar)))}}ir.parentId=vr,bt.push(le(Dt/Lt,sr/Lt,vr,Lt,fr))}else if(bt.push(ir),Lt>1)for(var Jr=0,bn=Fe;Jr<bn.length;Jr+=1){var xn=bn[Jr],or=Be.points[xn];or.zoom<=dt||(or.zoom=dt,bt.push(or))}}}return bt},ne.prototype._getOriginId=function(qe){return qe-this.points.length>>5},ne.prototype._getOriginZoom=function(qe){return(qe-this.points.length)%32},ne.prototype._map=function(qe,dt){if(qe.numPoints)return dt?Se({},qe.properties):qe.properties;var bt=this.points[qe.index].properties,Et=this.options.map(bt);return dt&&Et===bt?Se({},Et):Et};function le(ct,qe,dt,bt,Et){return{x:ct,y:qe,zoom:1/0,id:dt,parentId:-1,numPoints:bt,properties:Et}}function de(ct,qe){var dt=ct.geometry.coordinates,bt=dt[0],Et=dt[1];return{x:Le(bt),y:ve(Et),zoom:1/0,index:qe,parentId:-1}}function we(ct){return{type:"Feature",id:ct.id,properties:me(ct),geometry:{type:"Point",coordinates:[Ae(ct.x),ye(ct.y)]}}}function me(ct){var qe=ct.numPoints,dt=qe>=1e4?Math.round(qe/1e3)+"k":qe>=1e3?Math.round(qe/100)/10+"k":qe;return Se(Se({},ct.properties),{cluster:!0,cluster_id:ct.id,point_count:qe,point_count_abbreviated:dt})}function Le(ct){return ct/360+.5}function ve(ct){var qe=Math.sin(ct*Math.PI/180),dt=.5-.25*Math.log((1+qe)/(1-qe))/Math.PI;return dt<0?0:dt>1?1:dt}function Ae(ct){return(ct-.5)*360}function ye(ct){var qe=(180-ct*360)*Math.PI/180;return 360*Math.atan(Math.exp(qe))/Math.PI-90}function Se(ct,qe){for(var dt in qe)ct[dt]=qe[dt];return ct}function _e(ct){return ct.x}function ze(ct){return ct.y}function Ie(ct,qe,dt,bt){for(var Et=bt,Mt=dt-qe>>1,_t=dt-qe,It,Gt=ct[qe],nr=ct[qe+1],ar=ct[dt],ir=ct[dt+1],Be=qe+3;Be<dt;Be+=3){var Fe=Ne(ct[Be],ct[Be+1],Gt,nr,ar,ir);if(Fe>Et)It=Be,Et=Fe;else if(Fe===Et){var Rt=Math.abs(Be-Mt);Rt<_t&&(It=Be,_t=Rt)}}Et>bt&&(It-qe>3&&Ie(ct,qe,It,bt),ct[It+2]=Et,dt-It>3&&Ie(ct,It,dt,bt))}function Ne(ct,qe,dt,bt,Et,Mt){var _t=Et-dt,It=Mt-bt;if(_t!==0||It!==0){var Gt=((ct-dt)*_t+(qe-bt)*It)/(_t*_t+It*It);Gt>1?(dt=Et,bt=Mt):Gt>0&&(dt+=_t*Gt,bt+=It*Gt)}return _t=ct-dt,It=qe-bt,_t*_t+It*It}function et(ct,qe,dt,bt){var Et={id:typeof ct>"u"?null:ct,type:qe,geometry:dt,tags:bt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return st(Et),Et}function st(ct){var qe=ct.geometry,dt=ct.type;if(dt==="Point"||dt==="MultiPoint"||dt==="LineString")Ze(ct,qe);else if(dt==="Polygon"||dt==="MultiLineString")for(var bt=0;bt<qe.length;bt++)Ze(ct,qe[bt]);else if(dt==="MultiPolygon")for(bt=0;bt<qe.length;bt++)for(var Et=0;Et<qe[bt].length;Et++)Ze(ct,qe[bt][Et])}function Ze(ct,qe){for(var dt=0;dt<qe.length;dt+=3)ct.minX=Math.min(ct.minX,qe[dt]),ct.minY=Math.min(ct.minY,qe[dt+1]),ct.maxX=Math.max(ct.maxX,qe[dt]),ct.maxY=Math.max(ct.maxY,qe[dt+1])}function Ke(ct,qe){var dt=[];if(ct.type==="FeatureCollection")for(var bt=0;bt<ct.features.length;bt++)nt(dt,ct.features[bt],qe,bt);else ct.type==="Feature"?nt(dt,ct,qe):nt(dt,{geometry:ct},qe);return dt}function nt(ct,qe,dt,bt){if(qe.geometry){var Et=qe.geometry.coordinates,Mt=qe.geometry.type,_t=Math.pow(dt.tolerance/((1<<dt.maxZoom)*dt.extent),2),It=[],Gt=qe.id;if(dt.promoteId?Gt=qe.properties[dt.promoteId]:dt.generateId&&(Gt=bt||0),Mt==="Point")it(Et,It);else if(Mt==="MultiPoint")for(var nr=0;nr<Et.length;nr++)it(Et[nr],It);else if(Mt==="LineString")lt(Et,It,_t,!1);else if(Mt==="MultiLineString")if(dt.lineMetrics){for(nr=0;nr<Et.length;nr++)It=[],lt(Et[nr],It,_t,!1),ct.push(et(Gt,"LineString",It,qe.properties));return}else vt(Et,It,_t,!1);else if(Mt==="Polygon")vt(Et,It,_t,!0);else if(Mt==="MultiPolygon")for(nr=0;nr<Et.length;nr++){var ar=[];vt(Et[nr],ar,_t,!0),It.push(ar)}else if(Mt==="GeometryCollection"){for(nr=0;nr<qe.geometry.geometries.length;nr++)nt(ct,{id:Gt,geometry:qe.geometry.geometries[nr],properties:qe.properties},dt,bt);return}else throw new Error("Input data is not a valid GeoJSON object.");ct.push(et(Gt,Mt,It,qe.properties))}}function it(ct,qe){qe.push(xt(ct[0])),qe.push(Je(ct[1])),qe.push(0)}function lt(ct,qe,dt,bt){for(var Et,Mt,_t=0,It=0;It<ct.length;It++){var Gt=xt(ct[It][0]),nr=Je(ct[It][1]);qe.push(Gt),qe.push(nr),qe.push(0),It>0&&(bt?_t+=(Et*nr-Gt*Mt)/2:_t+=Math.sqrt(Math.pow(Gt-Et,2)+Math.pow(nr-Mt,2))),Et=Gt,Mt=nr}var ar=qe.length-3;qe[2]=1,Ie(qe,0,ar,dt),qe[ar+2]=1,qe.size=Math.abs(_t),qe.start=0,qe.end=qe.size}function vt(ct,qe,dt,bt){for(var Et=0;Et<ct.length;Et++){var Mt=[];lt(ct[Et],Mt,dt,bt),qe.push(Mt)}}function xt(ct){return ct/360+.5}function Je(ct){var qe=Math.sin(ct*Math.PI/180),dt=.5-.25*Math.log((1+qe)/(1-qe))/Math.PI;return dt<0?0:dt>1?1:dt}function Pe(ct,qe,dt,bt,Et,Mt,_t,It){if(dt/=qe,bt/=qe,Mt>=dt&&_t<bt)return ct;if(_t<dt||Mt>=bt)return null;for(var Gt=[],nr=0;nr<ct.length;nr++){var ar=ct[nr],ir=ar.geometry,Be=ar.type,Fe=Et===0?ar.minX:ar.minY,Rt=Et===0?ar.maxX:ar.maxY;if(Fe>=dt&&Rt<bt){Gt.push(ar);continue}else if(Rt<dt||Fe>=bt)continue;var Lt=[];if(Be==="Point"||Be==="MultiPoint")Ue(ir,Lt,dt,bt,Et);else if(Be==="LineString")He(ir,Lt,dt,bt,Et,!1,It.lineMetrics);else if(Be==="MultiLineString")Ce(ir,Lt,dt,bt,Et,!1);else if(Be==="Polygon")Ce(ir,Lt,dt,bt,Et,!0);else if(Be==="MultiPolygon")for(var Ut=0;Ut<ir.length;Ut++){var Qt=[];Ce(ir[Ut],Qt,dt,bt,Et,!0),Qt.length&&Lt.push(Qt)}if(Lt.length){if(It.lineMetrics&&Be==="LineString"){for(Ut=0;Ut<Lt.length;Ut++)Gt.push(et(ar.id,Be,Lt[Ut],ar.tags));continue}(Be==="LineString"||Be==="MultiLineString")&&(Lt.length===1?(Be="LineString",Lt=Lt[0]):Be="MultiLineString"),(Be==="Point"||Be==="MultiPoint")&&(Be=Lt.length===3?"Point":"MultiPoint"),Gt.push(et(ar.id,Be,Lt,ar.tags))}}return Gt.length?Gt:null}function Ue(ct,qe,dt,bt,Et){for(var Mt=0;Mt<ct.length;Mt+=3){var _t=ct[Mt+Et];_t>=dt&&_t<=bt&&(qe.push(ct[Mt]),qe.push(ct[Mt+1]),qe.push(ct[Mt+2]))}}function He(ct,qe,dt,bt,Et,Mt,_t){for(var It=Oe(ct),Gt=Et===0?pe:Te,nr=ct.start,ar,ir,Be=0;Be<ct.length-3;Be+=3){var Fe=ct[Be],Rt=ct[Be+1],Lt=ct[Be+2],Ut=ct[Be+3],Qt=ct[Be+4],rr=Et===0?Fe:Rt,Kt=Et===0?Ut:Qt,Dt=!1;_t&&(ar=Math.sqrt(Math.pow(Fe-Ut,2)+Math.pow(Rt-Qt,2))),rr<dt?Kt>dt&&(ir=Gt(It,Fe,Rt,Ut,Qt,dt),_t&&(It.start=nr+ar*ir)):rr>bt?Kt<bt&&(ir=Gt(It,Fe,Rt,Ut,Qt,bt),_t&&(It.start=nr+ar*ir)):ge(It,Fe,Rt,Lt),Kt<dt&&rr>=dt&&(ir=Gt(It,Fe,Rt,Ut,Qt,dt),Dt=!0),Kt>bt&&rr<=bt&&(ir=Gt(It,Fe,Rt,Ut,Qt,bt),Dt=!0),!Mt&&Dt&&(_t&&(It.end=nr+ar*ir),qe.push(It),It=Oe(ct)),_t&&(nr+=ar)}var sr=ct.length-3;Fe=ct[sr],Rt=ct[sr+1],Lt=ct[sr+2],rr=Et===0?Fe:Rt,rr>=dt&&rr<=bt&&ge(It,Fe,Rt,Lt),sr=It.length-3,Mt&&sr>=3&&(It[sr]!==It[0]||It[sr+1]!==It[1])&&ge(It,It[0],It[1],It[2]),It.length&&qe.push(It)}function Oe(ct){var qe=[];return qe.size=ct.size,qe.start=ct.start,qe.end=ct.end,qe}function Ce(ct,qe,dt,bt,Et,Mt){for(var _t=0;_t<ct.length;_t++)He(ct[_t],qe,dt,bt,Et,Mt,!1)}function ge(ct,qe,dt,bt){ct.push(qe),ct.push(dt),ct.push(bt)}function pe(ct,qe,dt,bt,Et,Mt){var _t=(Mt-qe)/(bt-qe);return ct.push(Mt),ct.push(dt+(Et-dt)*_t),ct.push(1),_t}function Te(ct,qe,dt,bt,Et,Mt){var _t=(Mt-dt)/(Et-dt);return ct.push(qe+(bt-qe)*_t),ct.push(Mt),ct.push(1),_t}function be(ct,qe){var dt=qe.buffer/qe.extent,bt=ct,Et=Pe(ct,1,-1-dt,dt,0,-1,2,qe),Mt=Pe(ct,1,1-dt,2+dt,0,-1,2,qe);return(Et||Mt)&&(bt=Pe(ct,1,-dt,1+dt,0,-1,2,qe)||[],Et&&(bt=ke(Et,1).concat(bt)),Mt&&(bt=bt.concat(ke(Mt,-1)))),bt}function ke(ct,qe){for(var dt=[],bt=0;bt<ct.length;bt++){var Et=ct[bt],Mt=Et.type,_t;if(Mt==="Point"||Mt==="MultiPoint"||Mt==="LineString")_t=Ve(Et.geometry,qe);else if(Mt==="MultiLineString"||Mt==="Polygon"){_t=[];for(var It=0;It<Et.geometry.length;It++)_t.push(Ve(Et.geometry[It],qe))}else if(Mt==="MultiPolygon")for(_t=[],It=0;It<Et.geometry.length;It++){for(var Gt=[],nr=0;nr<Et.geometry[It].length;nr++)Gt.push(Ve(Et.geometry[It][nr],qe));_t.push(Gt)}dt.push(et(Et.id,Mt,_t,Et.tags))}return dt}function Ve(ct,qe){var dt=[];dt.size=ct.size,ct.start!==void 0&&(dt.start=ct.start,dt.end=ct.end);for(var bt=0;bt<ct.length;bt+=3)dt.push(ct[bt]+qe,ct[bt+1],ct[bt+2]);return dt}function je(ct,qe){if(ct.transformed)return ct;var dt=1<<ct.z,bt=ct.x,Et=ct.y,Mt,_t,It;for(Mt=0;Mt<ct.features.length;Mt++){var Gt=ct.features[Mt],nr=Gt.geometry,ar=Gt.type;if(Gt.geometry=[],ar===1)for(_t=0;_t<nr.length;_t+=2)Gt.geometry.push(at(nr[_t],nr[_t+1],qe,dt,bt,Et));else for(_t=0;_t<nr.length;_t++){var ir=[];for(It=0;It<nr[_t].length;It+=2)ir.push(at(nr[_t][It],nr[_t][It+1],qe,dt,bt,Et));Gt.geometry.push(ir)}}return ct.transformed=!0,ct}function at(ct,qe,dt,bt,Et,Mt){return[Math.round(dt*(ct*bt-Et)),Math.round(dt*(qe*bt-Mt))]}function ut(ct,qe,dt,bt,Et){for(var Mt=qe===Et.maxZoom?0:Et.tolerance/((1<<qe)*Et.extent),_t={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:dt,y:bt,z:qe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},It=0;It<ct.length;It++){_t.numFeatures++,Nt(_t,ct[It],Mt,Et);var Gt=ct[It].minX,nr=ct[It].minY,ar=ct[It].maxX,ir=ct[It].maxY;Gt<_t.minX&&(_t.minX=Gt),nr<_t.minY&&(_t.minY=nr),ar>_t.maxX&&(_t.maxX=ar),ir>_t.maxY&&(_t.maxY=ir)}return _t}function Nt(ct,qe,dt,bt){var Et=qe.geometry,Mt=qe.type,_t=[];if(Mt==="Point"||Mt==="MultiPoint")for(var It=0;It<Et.length;It+=3)_t.push(Et[It]),_t.push(Et[It+1]),ct.numPoints++,ct.numSimplified++;else if(Mt==="LineString")Vt(_t,Et,ct,dt,!1,!1);else if(Mt==="MultiLineString"||Mt==="Polygon")for(It=0;It<Et.length;It++)Vt(_t,Et[It],ct,dt,Mt==="Polygon",It===0);else if(Mt==="MultiPolygon")for(var Gt=0;Gt<Et.length;Gt++){var nr=Et[Gt];for(It=0;It<nr.length;It++)Vt(_t,nr[It],ct,dt,!0,It===0)}if(_t.length){var ar=qe.tags||null;if(Mt==="LineString"&&bt.lineMetrics){ar={};for(var ir in qe.tags)ar[ir]=qe.tags[ir];ar.mapbox_clip_start=Et.start/Et.size,ar.mapbox_clip_end=Et.end/Et.size}var Be={geometry:_t,type:Mt==="Polygon"||Mt==="MultiPolygon"?3:Mt==="LineString"||Mt==="MultiLineString"?2:1,tags:ar};qe.id!==null&&(Be.id=qe.id),ct.features.push(Be)}}function Vt(ct,qe,dt,bt,Et,Mt){var _t=bt*bt;if(bt>0&&qe.size<(Et?_t:bt)){dt.numPoints+=qe.length/3;return}for(var It=[],Gt=0;Gt<qe.length;Gt+=3)(bt===0||qe[Gt+2]>_t)&&(dt.numSimplified++,It.push(qe[Gt]),It.push(qe[Gt+1])),dt.numPoints++;Et&&gt(It,Mt),ct.push(It)}function gt(ct,qe){for(var dt=0,bt=0,Et=ct.length,Mt=Et-2;bt<Et;Mt=bt,bt+=2)dt+=(ct[bt]-ct[Mt])*(ct[bt+1]+ct[Mt+1]);if(dt>0===qe)for(bt=0,Et=ct.length;bt<Et/2;bt+=2){var _t=ct[bt],It=ct[bt+1];ct[bt]=ct[Et-2-bt],ct[bt+1]=ct[Et-1-bt],ct[Et-2-bt]=_t,ct[Et-1-bt]=It}}function Ct(ct,qe){return new Yt(ct,qe)}function Yt(ct,qe){qe=this.options=ht(Object.create(this.options),qe);var dt=qe.debug;if(dt&&console.time("preprocess data"),qe.maxZoom<0||qe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(qe.promoteId&&qe.generateId)throw new Error("promoteId and generateId cannot be used together.");var bt=Ke(ct,qe);this.tiles={},this.tileCoords=[],dt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",qe.indexMaxZoom,qe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),bt=be(bt,qe),bt.length&&this.splitTile(bt,0,0,0),dt&&(bt.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)))}Yt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Yt.prototype.splitTile=function(ct,qe,dt,bt,Et,Mt,_t){for(var It=[ct,qe,dt,bt],Gt=this.options,nr=Gt.debug;It.length;){bt=It.pop(),dt=It.pop(),qe=It.pop(),ct=It.pop();var ar=1<<qe,ir=gr(qe,dt,bt),Be=this.tiles[ir];if(!Be&&(nr>1&&console.time("creation"),Be=this.tiles[ir]=ut(ct,qe,dt,bt,Gt),this.tileCoords.push({z:qe,x:dt,y:bt}),nr)){nr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",qe,dt,bt,Be.numFeatures,Be.numPoints,Be.numSimplified),console.timeEnd("creation"));var Fe="z"+qe;this.stats[Fe]=(this.stats[Fe]||0)+1,this.total++}if(Be.source=ct,Et){if(qe===Gt.maxZoom||qe===Et)continue;var Rt=1<<Et-qe;if(dt!==Math.floor(Mt/Rt)||bt!==Math.floor(_t/Rt))continue}else if(qe===Gt.indexMaxZoom||Be.numPoints<=Gt.indexMaxPoints)continue;if(Be.source=null,ct.length!==0){nr>1&&console.time("clipping");var Lt=.5*Gt.buffer/Gt.extent,Ut=.5-Lt,Qt=.5+Lt,rr=1+Lt,Kt,Dt,sr,fr,vr,lr;Kt=Dt=sr=fr=null,vr=Pe(ct,ar,dt-Lt,dt+Qt,0,Be.minX,Be.maxX,Gt),lr=Pe(ct,ar,dt+Ut,dt+rr,0,Be.minX,Be.maxX,Gt),ct=null,vr&&(Kt=Pe(vr,ar,bt-Lt,bt+Qt,1,Be.minY,Be.maxY,Gt),Dt=Pe(vr,ar,bt+Ut,bt+rr,1,Be.minY,Be.maxY,Gt),vr=null),lr&&(sr=Pe(lr,ar,bt-Lt,bt+Qt,1,Be.minY,Be.maxY,Gt),fr=Pe(lr,ar,bt+Ut,bt+rr,1,Be.minY,Be.maxY,Gt),lr=null),nr>1&&console.timeEnd("clipping"),It.push(Kt||[],qe+1,dt*2,bt*2),It.push(Dt||[],qe+1,dt*2,bt*2+1),It.push(sr||[],qe+1,dt*2+1,bt*2),It.push(fr||[],qe+1,dt*2+1,bt*2+1)}}},Yt.prototype.getTile=function(ct,qe,dt){var bt=this.options,Et=bt.extent,Mt=bt.debug;if(ct<0||ct>24)return null;var _t=1<<ct;qe=(qe%_t+_t)%_t;var It=gr(ct,qe,dt);if(this.tiles[It])return je(this.tiles[It],Et);Mt>1&&console.log("drilling down to z%d-%d-%d",ct,qe,dt);for(var Gt=ct,nr=qe,ar=dt,ir;!ir&&Gt>0;)Gt--,nr=Math.floor(nr/2),ar=Math.floor(ar/2),ir=this.tiles[gr(Gt,nr,ar)];return!ir||!ir.source?null:(Mt>1&&console.log("found parent tile z%d-%d-%d",Gt,nr,ar),Mt>1&&console.time("drilling down"),this.splitTile(ir.source,Gt,nr,ar,ct,qe,dt),Mt>1&&console.timeEnd("drilling down"),this.tiles[It]?je(this.tiles[It],Et):null)};function gr(ct,qe,dt){return((1<<ct)*dt+qe)*32+ct}function ht(ct,qe){for(var dt in qe)ct[dt]=qe[dt];return ct}function Ht(ct,qe){var dt=ct.tileID.canonical;if(!this._geoJSONIndex)return qe(null,null);var bt=this._geoJSONIndex.getTile(dt.z,dt.x,dt.y);if(!bt)return qe(null,null);var Et=new b(bt.features),Mt=i(Et);(Mt.byteOffset!==0||Mt.byteLength!==Mt.buffer.byteLength)&&(Mt=new Uint8Array(Mt)),qe(null,{vectorTile:Et,rawData:Mt.buffer})}var Wt=function(ct){function qe(dt,bt,Et,Mt){ct.call(this,dt,bt,Et,Ht),Mt&&(this.loadGeoJSON=Mt)}return qe.__proto__=ct,qe.prototype=Object.create(ct.prototype),qe.prototype.constructor=qe,qe.prototype.loadData=function(bt,Et){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Et,this._pendingLoadDataParams=bt,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},qe.prototype._loadData=function(){var bt=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var Et=this._pendingCallback,Mt=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var _t=Mt&&Mt.request&&Mt.request.collectResourceTiming?new o.RequestPerformance(Mt.request):!1;this.loadGeoJSON(Mt,function(It,Gt){if(It||!Gt)return Et(It);if(typeof Gt!="object")return Et(new Error("Input data given to '"+Mt.source+"' is not a valid GeoJSON object."));h(Gt,!0);try{if(Mt.filter){var nr=o.createExpression(Mt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(nr.result==="error")throw new Error(nr.value.map(function(Fe){return Fe.key+": "+Fe.message}).join(", "));var ar=Gt.features.filter(function(Fe){return nr.value.evaluate({zoom:0},Fe)});Gt={type:"FeatureCollection",features:ar}}bt._geoJSONIndex=Mt.cluster?new ne(cr(Mt)).load(Gt.features):Ct(Gt,Mt.geojsonVtOptions)}catch(Fe){return Et(Fe)}bt.loaded={};var ir={};if(_t){var Be=_t.finish();Be&&(ir.resourceTiming={},ir.resourceTiming[Mt.source]=JSON.parse(JSON.stringify(Be)))}Et(null,ir)})}},qe.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},qe.prototype.reloadTile=function(bt,Et){var Mt=this.loaded,_t=bt.uid;return Mt&&Mt[_t]?ct.prototype.reloadTile.call(this,bt,Et):this.loadTile(bt,Et)},qe.prototype.loadGeoJSON=function(bt,Et){if(bt.request)o.getJSON(bt.request,Et);else if(typeof bt.data=="string")try{return Et(null,JSON.parse(bt.data))}catch{return Et(new Error("Input data given to '"+bt.source+"' is not a valid GeoJSON object."))}else return Et(new Error("Input data given to '"+bt.source+"' is not a valid GeoJSON object."))},qe.prototype.removeSource=function(bt,Et){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Et()},qe.prototype.getClusterExpansionZoom=function(bt,Et){try{Et(null,this._geoJSONIndex.getClusterExpansionZoom(bt.clusterId))}catch(Mt){Et(Mt)}},qe.prototype.getClusterChildren=function(bt,Et){try{Et(null,this._geoJSONIndex.getChildren(bt.clusterId))}catch(Mt){Et(Mt)}},qe.prototype.getClusterLeaves=function(bt,Et){try{Et(null,this._geoJSONIndex.getLeaves(bt.clusterId,bt.limit,bt.offset))}catch(Mt){Et(Mt)}},qe}(u);function cr(ct){var qe=ct.superclusterOptions,dt=ct.clusterProperties;if(!dt||!qe)return qe;for(var bt={},Et={},Mt={accumulated:null,zoom:0},_t={properties:null},It=Object.keys(dt),Gt=0,nr=It;Gt<nr.length;Gt+=1){var ar=nr[Gt],ir=dt[ar],Be=ir[0],Fe=ir[1],Rt=o.createExpression(Fe),Lt=o.createExpression(typeof Be=="string"?[Be,["accumulated"],["get",ar]]:Be);bt[ar]=Rt.value,Et[ar]=Lt.value}return qe.map=function(Ut){_t.properties=Ut;for(var Qt={},rr=0,Kt=It;rr<Kt.length;rr+=1){var Dt=Kt[rr];Qt[Dt]=bt[Dt].evaluate(Mt,_t)}return Qt},qe.reduce=function(Ut,Qt){_t.properties=Qt;for(var rr=0,Kt=It;rr<Kt.length;rr+=1){var Dt=Kt[rr];Mt.accumulated=Ut[Dt],Ut[Dt]=Et[Dt].evaluate(Mt,_t)}},qe}var er=function(qe){var dt=this;this.self=qe,this.actor=new o.Actor(qe,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:u,geojson:Wt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(bt,Et){if(dt.workerSourceTypes[bt])throw new Error('Worker source with name "'+bt+'" already registered.');dt.workerSourceTypes[bt]=Et},this.self.registerRTLTextPlugin=function(bt){if(o.plugin.isParsed())throw new Error("RTL text plugin already registered.");o.plugin.applyArabicShaping=bt.applyArabicShaping,o.plugin.processBidirectionalText=bt.processBidirectionalText,o.plugin.processStyledBidirectionalText=bt.processStyledBidirectionalText}};return er.prototype.setReferrer=function(qe,dt){this.referrer=dt},er.prototype.setImages=function(qe,dt,bt){this.availableImages[qe]=dt;for(var Et in this.workerSources[qe]){var Mt=this.workerSources[qe][Et];for(var _t in Mt)Mt[_t].availableImages=dt}bt()},er.prototype.setLayers=function(qe,dt,bt){this.getLayerIndex(qe).replace(dt),bt()},er.prototype.updateLayers=function(qe,dt,bt){this.getLayerIndex(qe).update(dt.layers,dt.removedIds),bt()},er.prototype.loadTile=function(qe,dt,bt){this.getWorkerSource(qe,dt.type,dt.source).loadTile(dt,bt)},er.prototype.loadDEMTile=function(qe,dt,bt){this.getDEMWorkerSource(qe,dt.source).loadTile(dt,bt)},er.prototype.reloadTile=function(qe,dt,bt){this.getWorkerSource(qe,dt.type,dt.source).reloadTile(dt,bt)},er.prototype.abortTile=function(qe,dt,bt){this.getWorkerSource(qe,dt.type,dt.source).abortTile(dt,bt)},er.prototype.removeTile=function(qe,dt,bt){this.getWorkerSource(qe,dt.type,dt.source).removeTile(dt,bt)},er.prototype.removeDEMTile=function(qe,dt){this.getDEMWorkerSource(qe,dt.source).removeTile(dt)},er.prototype.removeSource=function(qe,dt,bt){if(!(!this.workerSources[qe]||!this.workerSources[qe][dt.type]||!this.workerSources[qe][dt.type][dt.source])){var Et=this.workerSources[qe][dt.type][dt.source];delete this.workerSources[qe][dt.type][dt.source],Et.removeSource!==void 0?Et.removeSource(dt,bt):bt()}},er.prototype.loadWorkerSource=function(qe,dt,bt){try{this.self.importScripts(dt.url),bt()}catch(Et){bt(Et.toString())}},er.prototype.syncRTLPluginState=function(qe,dt,bt){try{o.plugin.setState(dt);var Et=o.plugin.getPluginURL();if(o.plugin.isLoaded()&&!o.plugin.isParsed()&&Et!=null){this.self.importScripts(Et);var Mt=o.plugin.isParsed(),_t=Mt?void 0:new Error("RTL Text Plugin failed to import scripts from "+Et);bt(_t,Mt)}}catch(It){bt(It.toString())}},er.prototype.getAvailableImages=function(qe){var dt=this.availableImages[qe];return dt||(dt=[]),dt},er.prototype.getLayerIndex=function(qe){var dt=this.layerIndexes[qe];return dt||(dt=this.layerIndexes[qe]=new g),dt},er.prototype.getWorkerSource=function(qe,dt,bt){var Et=this;if(this.workerSources[qe]||(this.workerSources[qe]={}),this.workerSources[qe][dt]||(this.workerSources[qe][dt]={}),!this.workerSources[qe][dt][bt]){var Mt={send:function(_t,It,Gt){Et.actor.send(_t,It,Gt,qe)}};this.workerSources[qe][dt][bt]=new this.workerSourceTypes[dt](Mt,this.getLayerIndex(qe),this.getAvailableImages(qe))}return this.workerSources[qe][dt][bt]},er.prototype.getDEMWorkerSource=function(qe,dt){return this.demWorkerSources[qe]||(this.demWorkerSources[qe]={}),this.demWorkerSources[qe][dt]||(this.demWorkerSources[qe][dt]=new y),this.demWorkerSources[qe][dt]},er.prototype.enforceCacheSizeLimit=function(qe,dt){o.enforceCacheSizeLimit(dt)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new er(self)),er}),P(["./shared"],function(o){var L=o.createCommonjsModule(function(ce){ce.exports?ce.exports=W:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=W,window.mapboxgl.notSupportedReason=fe);function W(Fr){return!fe(Fr)}function fe(Fr){if(!Q())return"not a browser";if(!he())return"insufficent Array support";if(!Re())return"insufficient Function support";if(!Ge())return"insufficient Object support";if(!tt())return"insufficient JSON support";if(!wt())return"insufficient worker support";if(!zt())return"insufficient Uint8ClampedArray support";if(!Xt())return"insufficient ArrayBuffer support";if(!tr())return"insufficient Canvas/getImageData support";if(!Cr(Fr&&Fr.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function Q(){return typeof window<"u"&&typeof document<"u"}function he(){return 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 Re(){return Function.prototype&&Function.prototype.bind}function Ge(){return 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}function tt(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function wt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Fr=new Blob([""],{type:"text/javascript"}),Gr=URL.createObjectURL(Fr),nn,Cn;try{Cn=new Worker(Gr),nn=!0}catch{nn=!1}return Cn&&Cn.terminate(),URL.revokeObjectURL(Gr),nn}function zt(){return"Uint8ClampedArray"in window}function Xt(){return ArrayBuffer.isView}function tr(){var Fr=document.createElement("canvas");Fr.width=Fr.height=1;var Gr=Fr.getContext("2d");if(!Gr)return!1;var nn=Gr.getImageData(0,0,1,1);return nn&&nn.width===Fr.width}var qt={};function Cr(Fr){return qt[Fr]===void 0&&(qt[Fr]=Nr(Fr)),qt[Fr]}W.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Ur(Fr){var Gr=document.createElement("canvas"),nn=Object.create(W.webGLContextAttributes);return nn.failIfMajorPerformanceCaveat=Fr,Gr.probablySupportsContext?Gr.probablySupportsContext("webgl",nn)||Gr.probablySupportsContext("experimental-webgl",nn):Gr.supportsContext?Gr.supportsContext("webgl",nn)||Gr.supportsContext("experimental-webgl",nn):Gr.getContext("webgl",nn)||Gr.getContext("experimental-webgl",nn)}function Nr(Fr){var Gr=Ur(Fr);if(!Gr)return!1;var nn=Gr.createShader(Gr.VERTEX_SHADER);return!nn||Gr.isContextLost()?!1:(Gr.shaderSource(nn,"void main() {}"),Gr.compileShader(nn),Gr.getShaderParameter(nn,Gr.COMPILE_STATUS)===!0)}}),M={};M.create=function(ce,W,fe){var Q=o.window.document.createElement(ce);return W!==void 0&&(Q.className=W),fe&&fe.appendChild(Q),Q},M.createNS=function(ce,W){var fe=o.window.document.createElementNS(ce,W);return fe};var d=o.window.document&&o.window.document.documentElement.style;function g(ce){if(!d)return ce[0];for(var W=0;W<ce.length;W++)if(ce[W]in d)return ce[W];return ce[0]}var r=g(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),t;M.disableDrag=function(){d&&r&&(t=d[r],d[r]="none")},M.enableDrag=function(){d&&r&&(d[r]=t)};var s=g(["transform","WebkitTransform"]);M.setTransform=function(ce,W){ce.style[s]=W};var a=!1;try{var c=Object.defineProperty({},"passive",{get:function(){a=!0}});o.window.addEventListener("test",c,c),o.window.removeEventListener("test",c,c)}catch{a=!1}M.addEventListener=function(ce,W,fe,Q){Q===void 0&&(Q={}),"passive"in Q&&a?ce.addEventListener(W,fe,Q):ce.addEventListener(W,fe,Q.capture)},M.removeEventListener=function(ce,W,fe,Q){Q===void 0&&(Q={}),"passive"in Q&&a?ce.removeEventListener(W,fe,Q):ce.removeEventListener(W,fe,Q.capture)};var u=function(ce){ce.preventDefault(),ce.stopPropagation(),o.window.removeEventListener("click",u,!0)};M.suppressClick=function(){o.window.addEventListener("click",u,!0),o.window.setTimeout(function(){o.window.removeEventListener("click",u,!0)},0)},M.mousePos=function(ce,W){var fe=ce.getBoundingClientRect();return new o.Point(W.clientX-fe.left-ce.clientLeft,W.clientY-fe.top-ce.clientTop)},M.touchPos=function(ce,W){for(var fe=ce.getBoundingClientRect(),Q=[],he=0;he<W.length;he++)Q.push(new o.Point(W[he].clientX-fe.left-ce.clientLeft,W[he].clientY-fe.top-ce.clientTop));return Q},M.mouseButton=function(ce){return typeof o.window.InstallTrigger<"u"&&ce.button===2&&ce.ctrlKey&&o.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:ce.button},M.remove=function(ce){ce.parentNode&&ce.parentNode.removeChild(ce)};function l(ce,W,fe){var Q,he,Re,Ge=o.browser.devicePixelRatio>1?"@2x":"",tt=o.getJSON(W.transformRequest(W.normalizeSpriteURL(ce,Ge,".json"),o.ResourceType.SpriteJSON),function(Xt,tr){tt=null,Re||(Re=Xt,Q=tr,zt())}),wt=o.getImage(W.transformRequest(W.normalizeSpriteURL(ce,Ge,".png"),o.ResourceType.SpriteImage),function(Xt,tr){wt=null,Re||(Re=Xt,he=tr,zt())});function zt(){if(Re)fe(Re);else if(Q&&he){var Xt=o.browser.getImageData(he),tr={};for(var qt in Q){var Cr=Q[qt],Ur=Cr.width,Nr=Cr.height,Fr=Cr.x,Gr=Cr.y,nn=Cr.sdf,Cn=Cr.pixelRatio,Rn=Cr.stretchX,Bn=Cr.stretchY,Nn=Cr.content,Fn=new o.RGBAImage({width:Ur,height:Nr});o.RGBAImage.copy(Xt,Fn,{x:Fr,y:Gr},{x:0,y:0},{width:Ur,height:Nr}),tr[qt]={data:Fn,pixelRatio:Cn,sdf:nn,stretchX:Rn,stretchY:Bn,content:Nn}}fe(null,tr)}}return{cancel:function(){tt&&(tt.cancel(),tt=null),wt&&(wt.cancel(),wt=null)}}}function y(ce){var W=ce.userImage;if(W&&W.render){var fe=W.render();if(fe)return ce.data.replace(new Uint8Array(W.data.buffer)),!0}return!1}var h=1,T=function(ce){function W(){ce.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.RGBAImage({width:1,height:1}),this.dirty=!0}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.isLoaded=function(){return this.loaded},W.prototype.setLoaded=function(Q){if(this.loaded!==Q&&(this.loaded=Q,Q)){for(var he=0,Re=this.requestors;he<Re.length;he+=1){var Ge=Re[he],tt=Ge.ids,wt=Ge.callback;this._notify(tt,wt)}this.requestors=[]}},W.prototype.getImage=function(Q){return this.images[Q]},W.prototype.addImage=function(Q,he){this._validate(Q,he)&&(this.images[Q]=he)},W.prototype._validate=function(Q,he){var Re=!0;return this._validateStretch(he.stretchX,he.data&&he.data.width)||(this.fire(new o.ErrorEvent(new Error('Image "'+Q+'" has invalid "stretchX" value'))),Re=!1),this._validateStretch(he.stretchY,he.data&&he.data.height)||(this.fire(new o.ErrorEvent(new Error('Image "'+Q+'" has invalid "stretchY" value'))),Re=!1),this._validateContent(he.content,he)||(this.fire(new o.ErrorEvent(new Error('Image "'+Q+'" has invalid "content" value'))),Re=!1),Re},W.prototype._validateStretch=function(Q,he){if(!Q)return!0;for(var Re=0,Ge=0,tt=Q;Ge<tt.length;Ge+=1){var wt=tt[Ge];if(wt[0]<Re||wt[1]<wt[0]||he<wt[1])return!1;Re=wt[1]}return!0},W.prototype._validateContent=function(Q,he){return Q?!(Q.length!==4||Q[0]<0||he.data.width<Q[0]||Q[1]<0||he.data.height<Q[1]||Q[2]<0||he.data.width<Q[2]||Q[3]<0||he.data.height<Q[3]||Q[2]<Q[0]||Q[3]<Q[1]):!0},W.prototype.updateImage=function(Q,he){var Re=this.images[Q];he.version=Re.version+1,this.images[Q]=he,this.updatedImages[Q]=!0},W.prototype.removeImage=function(Q){var he=this.images[Q];delete this.images[Q],delete this.patterns[Q],he.userImage&&he.userImage.onRemove&&he.userImage.onRemove()},W.prototype.listImages=function(){return Object.keys(this.images)},W.prototype.getImages=function(Q,he){var Re=!0;if(!this.isLoaded())for(var Ge=0,tt=Q;Ge<tt.length;Ge+=1){var wt=tt[Ge];this.images[wt]||(Re=!1)}this.isLoaded()||Re?this._notify(Q,he):this.requestors.push({ids:Q,callback:he})},W.prototype._notify=function(Q,he){for(var Re={},Ge=0,tt=Q;Ge<tt.length;Ge+=1){var wt=tt[Ge];this.images[wt]||this.fire(new o.Event("styleimagemissing",{id:wt}));var zt=this.images[wt];zt?Re[wt]={data:zt.data.clone(),pixelRatio:zt.pixelRatio,sdf:zt.sdf,version:zt.version,stretchX:zt.stretchX,stretchY:zt.stretchY,content:zt.content,hasRenderCallback:!!(zt.userImage&&zt.userImage.render)}:o.warnOnce('Image "'+wt+'" 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.')}he(null,Re)},W.prototype.getPixelSize=function(){var Q=this.atlasImage,he=Q.width,Re=Q.height;return{width:he,height:Re}},W.prototype.getPattern=function(Q){var he=this.patterns[Q],Re=this.getImage(Q);if(!Re)return null;if(he&&he.position.version===Re.version)return he.position;if(he)he.position.version=Re.version;else{var Ge=Re.data.width+h*2,tt=Re.data.height+h*2,wt={w:Ge,h:tt,x:0,y:0},zt=new o.ImagePosition(wt,Re);this.patterns[Q]={bin:wt,position:zt}}return this._updatePatternAtlas(),this.patterns[Q].position},W.prototype.bind=function(Q){var he=Q.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new o.Texture(Q,this.atlasImage,he.RGBA),this.atlasTexture.bind(he.LINEAR,he.CLAMP_TO_EDGE)},W.prototype._updatePatternAtlas=function(){var Q=[];for(var he in this.patterns)Q.push(this.patterns[he].bin);var Re=o.potpack(Q),Ge=Re.w,tt=Re.h,wt=this.atlasImage;wt.resize({width:Ge||1,height:tt||1});for(var zt in this.patterns){var Xt=this.patterns[zt],tr=Xt.bin,qt=tr.x+h,Cr=tr.y+h,Ur=this.images[zt].data,Nr=Ur.width,Fr=Ur.height;o.RGBAImage.copy(Ur,wt,{x:0,y:0},{x:qt,y:Cr},{width:Nr,height:Fr}),o.RGBAImage.copy(Ur,wt,{x:0,y:Fr-1},{x:qt,y:Cr-1},{width:Nr,height:1}),o.RGBAImage.copy(Ur,wt,{x:0,y:0},{x:qt,y:Cr+Fr},{width:Nr,height:1}),o.RGBAImage.copy(Ur,wt,{x:Nr-1,y:0},{x:qt-1,y:Cr},{width:1,height:Fr}),o.RGBAImage.copy(Ur,wt,{x:0,y:0},{x:qt+Nr,y:Cr},{width:1,height:Fr})}this.dirty=!0},W.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},W.prototype.dispatchRenderCallbacks=function(Q){for(var he=0,Re=Q;he<Re.length;he+=1){var Ge=Re[he];if(!this.callbackDispatchedThisFrame[Ge]){this.callbackDispatchedThisFrame[Ge]=!0;var tt=this.images[Ge],wt=y(tt);wt&&this.updateImage(Ge,tt)}}},W}(o.Evented);function f(ce,W,fe,Q,he){var Re=W*256,Ge=Re+255,tt=Q.transformRequest(Q.normalizeGlyphsURL(fe).replace("{fontstack}",ce).replace("{range}",Re+"-"+Ge),o.ResourceType.Glyphs);o.getArrayBuffer(tt,function(wt,zt){if(wt)he(wt);else if(zt){for(var Xt={},tr=0,qt=o.parseGlyphPBF(zt);tr<qt.length;tr+=1){var Cr=qt[tr];Xt[Cr.id]=Cr}he(null,Xt)}})}var n=b,v=b,m=1e20;function b(ce,W,fe,Q,he,Re){this.fontSize=ce||24,this.buffer=W===void 0?3:W,this.cutoff=Q||.25,this.fontFamily=he||"sans-serif",this.fontWeight=Re||"normal",this.radius=fe||8;var Ge=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=Ge,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(Ge*Ge),this.gridInner=new Float64Array(Ge*Ge),this.f=new Float64Array(Ge),this.d=new Float64Array(Ge),this.z=new Float64Array(Ge+1),this.v=new Int16Array(Ge),this.middle=Math.round(Ge/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}b.prototype.draw=function(ce){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ce,this.buffer,this.middle);for(var W=this.ctx.getImageData(0,0,this.size,this.size),fe=new Uint8ClampedArray(this.size*this.size),Q=0;Q<this.size*this.size;Q++){var he=W.data[Q*4+3]/255;this.gridOuter[Q]=he===1?0:he===0?m:Math.pow(Math.max(0,.5-he),2),this.gridInner[Q]=he===1?m:he===0?0:Math.pow(Math.max(0,he-.5),2)}for(E(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),E(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),Q=0;Q<this.size*this.size;Q++){var Re=this.gridOuter[Q]-this.gridInner[Q];fe[Q]=Math.max(0,Math.min(255,Math.round(255-255*(Re/this.radius+this.cutoff))))}return fe};function E(ce,W,fe,Q,he,Re,Ge){for(var tt=0;tt<W;tt++){for(var wt=0;wt<fe;wt++)Q[wt]=ce[wt*W+tt];for(p(Q,he,Re,Ge,fe),wt=0;wt<fe;wt++)ce[wt*W+tt]=he[wt]}for(wt=0;wt<fe;wt++){for(tt=0;tt<W;tt++)Q[tt]=ce[wt*W+tt];for(p(Q,he,Re,Ge,W),tt=0;tt<W;tt++)ce[wt*W+tt]=Math.sqrt(he[tt])}}function p(ce,W,fe,Q,he){fe[0]=0,Q[0]=-1e20,Q[1]=1e20;for(var Re=1,Ge=0;Re<he;Re++){for(var tt=(ce[Re]+Re*Re-(ce[fe[Ge]]+fe[Ge]*fe[Ge]))/(2*Re-2*fe[Ge]);tt<=Q[Ge];)Ge--,tt=(ce[Re]+Re*Re-(ce[fe[Ge]]+fe[Ge]*fe[Ge]))/(2*Re-2*fe[Ge]);Ge++,fe[Ge]=Re,Q[Ge]=tt,Q[Ge+1]=1e20}for(Re=0,Ge=0;Re<he;Re++){for(;Q[Ge+1]<Re;)Ge++;W[Re]=(Re-fe[Ge])*(Re-fe[Ge])+ce[fe[Ge]]}}n.default=v;var S=function(W,fe){this.requestManager=W,this.localIdeographFontFamily=fe,this.entries={}};S.prototype.setURL=function(W){this.url=W},S.prototype.getGlyphs=function(W,fe){var Q=this,he=[];for(var Re in W)for(var Ge=0,tt=W[Re];Ge<tt.length;Ge+=1){var wt=tt[Ge];he.push({stack:Re,id:wt})}o.asyncAll(he,function(zt,Xt){var tr=zt.stack,qt=zt.id,Cr=Q.entries[tr];Cr||(Cr=Q.entries[tr]={glyphs:{},requests:{},ranges:{}});var Ur=Cr.glyphs[qt];if(Ur!==void 0){Xt(null,{stack:tr,id:qt,glyph:Ur});return}if(Ur=Q._tinySDF(Cr,tr,qt),Ur){Cr.glyphs[qt]=Ur,Xt(null,{stack:tr,id:qt,glyph:Ur});return}var Nr=Math.floor(qt/256);if(Nr*256>65535){Xt(new Error("glyphs > 65535 not supported"));return}if(Cr.ranges[Nr]){Xt(null,{stack:tr,id:qt,glyph:Ur});return}var Fr=Cr.requests[Nr];Fr||(Fr=Cr.requests[Nr]=[],S.loadGlyphRange(tr,Nr,Q.url,Q.requestManager,function(Gr,nn){if(nn){for(var Cn in nn)Q._doesCharSupportLocalGlyph(+Cn)||(Cr.glyphs[+Cn]=nn[+Cn]);Cr.ranges[Nr]=!0}for(var Rn=0,Bn=Fr;Rn<Bn.length;Rn+=1){var Nn=Bn[Rn];Nn(Gr,nn)}delete Cr.requests[Nr]})),Fr.push(function(Gr,nn){Gr?Xt(Gr):nn&&Xt(null,{stack:tr,id:qt,glyph:nn[qt]||null})})},function(zt,Xt){if(zt)fe(zt);else if(Xt){for(var tr={},qt=0,Cr=Xt;qt<Cr.length;qt+=1){var Ur=Cr[qt],Nr=Ur.stack,Fr=Ur.id,Gr=Ur.glyph;(tr[Nr]||(tr[Nr]={}))[Fr]=Gr&&{id:Gr.id,bitmap:Gr.bitmap.clone(),metrics:Gr.metrics}}fe(null,tr)}})},S.prototype._doesCharSupportLocalGlyph=function(W){return!!this.localIdeographFontFamily&&(o.isChar["CJK Unified Ideographs"](W)||o.isChar["Hangul Syllables"](W)||o.isChar.Hiragana(W)||o.isChar.Katakana(W))},S.prototype._tinySDF=function(W,fe,Q){var he=this.localIdeographFontFamily;if(he&&this._doesCharSupportLocalGlyph(Q)){var Re=W.tinySDF;if(!Re){var Ge="400";/bold/i.test(fe)?Ge="900":/medium/i.test(fe)?Ge="500":/light/i.test(fe)&&(Ge="200"),Re=W.tinySDF=new S.TinySDF(24,3,8,.25,he,Ge)}return{id:Q,bitmap:new o.AlphaImage({width:30,height:30},Re.draw(String.fromCharCode(Q))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},S.loadGlyphRange=f,S.TinySDF=n;var w=function(){this.specification=o.styleSpec.light.position};w.prototype.possiblyEvaluate=function(W,fe){return o.sphericalToCartesian(W.expression.evaluate(fe))},w.prototype.interpolate=function(W,fe,Q){return{x:o.number(W.x,fe.x,Q),y:o.number(W.y,fe.y,Q),z:o.number(W.z,fe.z,Q)}};var i=new o.Properties({anchor:new o.DataConstantProperty(o.styleSpec.light.anchor),position:new w,color:new o.DataConstantProperty(o.styleSpec.light.color),intensity:new o.DataConstantProperty(o.styleSpec.light.intensity)}),C="-transition",x=function(ce){function W(fe){ce.call(this),this._transitionable=new o.Transitionable(i),this.setLight(fe),this._transitioning=this._transitionable.untransitioned()}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.getLight=function(){return this._transitionable.serialize()},W.prototype.setLight=function(Q,he){if(he===void 0&&(he={}),!this._validate(o.validateLight,Q,he))for(var Re in Q){var Ge=Q[Re];o.endsWith(Re,C)?this._transitionable.setTransition(Re.slice(0,-C.length),Ge):this._transitionable.setValue(Re,Ge)}},W.prototype.updateTransitions=function(Q){this._transitioning=this._transitionable.transitioned(Q,this._transitioning)},W.prototype.hasTransition=function(){return this._transitioning.hasTransition()},W.prototype.recalculate=function(Q){this.properties=this._transitioning.possiblyEvaluate(Q)},W.prototype._validate=function(Q,he,Re){return Re&&Re.validate===!1?!1:o.emitValidationErrors(this,Q.call(o.validateStyle,o.extend({value:he,style:{glyphs:!0,sprite:!0},styleSpec:o.styleSpec})))},W}(o.Evented),k=function(W,fe){this.width=W,this.height=fe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};k.prototype.getDash=function(W,fe){var Q=W.join(",")+String(fe);return this.dashEntry[Q]||(this.dashEntry[Q]=this.addDash(W,fe)),this.dashEntry[Q]},k.prototype.getDashRanges=function(W,fe,Q){var he=W.length%2===1,Re=[],Ge=he?-W[W.length-1]*Q:0,tt=W[0]*Q,wt=!0;Re.push({left:Ge,right:tt,isDash:wt,zeroLength:W[0]===0});for(var zt=W[0],Xt=1;Xt<W.length;Xt++){wt=!wt;var tr=W[Xt];Ge=zt*Q,zt+=tr,tt=zt*Q,Re.push({left:Ge,right:tt,isDash:wt,zeroLength:tr===0})}return Re},k.prototype.addRoundDash=function(W,fe,Q){for(var he=fe/2,Re=-Q;Re<=Q;Re++)for(var Ge=this.nextRow+Q+Re,tt=this.width*Ge,wt=0,zt=W[wt],Xt=0;Xt<this.width;Xt++){Xt/zt.right>1&&(zt=W[++wt]);var tr=Math.abs(Xt-zt.left),qt=Math.abs(Xt-zt.right),Cr=Math.min(tr,qt),Ur=void 0,Nr=Re/Q*(he+1);if(zt.isDash){var Fr=he-Math.abs(Nr);Ur=Math.sqrt(Cr*Cr+Fr*Fr)}else Ur=he-Math.sqrt(Cr*Cr+Nr*Nr);this.data[tt+Xt]=Math.max(0,Math.min(255,Ur+128))}},k.prototype.addRegularDash=function(W){for(var fe=W.length-1;fe>=0;--fe){var Q=W[fe],he=W[fe+1];Q.zeroLength?W.splice(fe,1):he&&he.isDash===Q.isDash&&(he.left=Q.left,W.splice(fe,1))}var Re=W[0],Ge=W[W.length-1];Re.isDash===Ge.isDash&&(Re.left=Ge.left-this.width,Ge.right=Re.right+this.width);for(var tt=this.width*this.nextRow,wt=0,zt=W[wt],Xt=0;Xt<this.width;Xt++){Xt/zt.right>1&&(zt=W[++wt]);var tr=Math.abs(Xt-zt.left),qt=Math.abs(Xt-zt.right),Cr=Math.min(tr,qt),Ur=zt.isDash?Cr:-Cr;this.data[tt+Xt]=Math.max(0,Math.min(255,Ur+128))}},k.prototype.addDash=function(W,fe){var Q=fe?7:0,he=2*Q+1;if(this.nextRow+he>this.height)return o.warnOnce("LineAtlas out of space"),null;for(var Re=0,Ge=0;Ge<W.length;Ge++)Re+=W[Ge];if(Re!==0){var tt=this.width/Re,wt=this.getDashRanges(W,this.width,tt);fe?this.addRoundDash(wt,tt,Q):this.addRegularDash(wt)}var zt={y:(this.nextRow+Q+.5)/this.height,height:2*Q/this.height,width:Re};return this.nextRow+=he,this.dirty=!0,zt},k.prototype.bind=function(W){var fe=W.gl;this.texture?(fe.bindTexture(fe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,fe.texSubImage2D(fe.TEXTURE_2D,0,0,0,this.width,this.height,fe.ALPHA,fe.UNSIGNED_BYTE,this.data))):(this.texture=fe.createTexture(),fe.bindTexture(fe.TEXTURE_2D,this.texture),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_WRAP_S,fe.REPEAT),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_WRAP_T,fe.REPEAT),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_MIN_FILTER,fe.LINEAR),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_MAG_FILTER,fe.LINEAR),fe.texImage2D(fe.TEXTURE_2D,0,fe.ALPHA,this.width,this.height,0,fe.ALPHA,fe.UNSIGNED_BYTE,this.data))};var I=function ce(W,fe){this.workerPool=W,this.actors=[],this.currentActor=0,this.id=o.uniqueId();for(var Q=this.workerPool.acquire(this.id),he=0;he<Q.length;he++){var Re=Q[he],Ge=new ce.Actor(Re,fe,this.id);Ge.name="Worker "+he,this.actors.push(Ge)}};I.prototype.broadcast=function(W,fe,Q){Q=Q||function(){},o.asyncAll(this.actors,function(he,Re){he.send(W,fe,Re)},Q)},I.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},I.prototype.remove=function(){this.actors.forEach(function(W){W.remove()}),this.actors=[],this.workerPool.release(this.id)},I.Actor=o.Actor;function B(ce,W,fe){var Q=function(he,Re){if(he)return fe(he);if(Re){var Ge=o.pick(o.extend(Re,ce),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);Re.vector_layers&&(Ge.vectorLayers=Re.vector_layers,Ge.vectorLayerIds=Ge.vectorLayers.map(function(tt){return tt.id})),Ge.tiles=W.canonicalizeTileset(Ge,ce.url),fe(null,Ge)}};return ce.url?o.getJSON(W.transformRequest(W.normalizeSourceURL(ce.url),o.ResourceType.Source),Q):o.browser.frame(function(){return Q(null,ce)})}var _=function(W,fe,Q){this.bounds=o.LngLatBounds.convert(this.validateBounds(W)),this.minzoom=fe||0,this.maxzoom=Q||24};_.prototype.validateBounds=function(W){return!Array.isArray(W)||W.length!==4?[-180,-90,180,90]:[Math.max(-180,W[0]),Math.max(-90,W[1]),Math.min(180,W[2]),Math.min(90,W[3])]},_.prototype.contains=function(W){var fe=Math.pow(2,W.z),Q={minX:Math.floor(o.mercatorXfromLng(this.bounds.getWest())*fe),minY:Math.floor(o.mercatorYfromLat(this.bounds.getNorth())*fe),maxX:Math.ceil(o.mercatorXfromLng(this.bounds.getEast())*fe),maxY:Math.ceil(o.mercatorYfromLat(this.bounds.getSouth())*fe)},he=W.x>=Q.minX&&W.x<Q.maxX&&W.y>=Q.minY&&W.y<Q.maxY;return he};var z=function(ce){function W(fe,Q,he,Re){if(ce.call(this),this.id=fe,this.dispatcher=he,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,o.extend(this,o.pick(Q,["url","scheme","tileSize","promoteId"])),this._options=o.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(Re)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.load=function(){var Q=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=B(this._options,this.map._requestManager,function(he,Re){Q._tileJSONRequest=null,Q._loaded=!0,he?Q.fire(new o.ErrorEvent(he)):Re&&(o.extend(Q,Re),Re.bounds&&(Q.tileBounds=new _(Re.bounds,Q.minzoom,Q.maxzoom)),o.postTurnstileEvent(Re.tiles,Q.map._requestManager._customAccessToken),o.postMapLoadEvent(Re.tiles,Q.map._getMapId(),Q.map._requestManager._skuToken,Q.map._requestManager._customAccessToken),Q.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})),Q.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})))})},W.prototype.loaded=function(){return this._loaded},W.prototype.hasTile=function(Q){return!this.tileBounds||this.tileBounds.contains(Q.canonical)},W.prototype.onAdd=function(Q){this.map=Q,this.load()},W.prototype.setSourceProperty=function(Q){this._tileJSONRequest&&this._tileJSONRequest.cancel(),Q();var he=this.map.style.sourceCaches[this.id];he.clearTiles(),this.load()},W.prototype.setTiles=function(Q){var he=this;return this.setSourceProperty(function(){he._options.tiles=Q}),this},W.prototype.setUrl=function(Q){var he=this;return this.setSourceProperty(function(){he.url=Q,he._options.url=Q}),this},W.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},W.prototype.serialize=function(){return o.extend({},this._options)},W.prototype.loadTile=function(Q,he){var Re=this.map._requestManager.normalizeTileURL(Q.tileID.canonical.url(this.tiles,this.scheme)),Ge={request:this.map._requestManager.transformRequest(Re,o.ResourceType.Tile),uid:Q.uid,tileID:Q.tileID,zoom:Q.tileID.overscaledZ,tileSize:this.tileSize*Q.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:o.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Ge.request.collectResourceTiming=this._collectResourceTiming,!Q.actor||Q.state==="expired"?(Q.actor=this.dispatcher.getActor(),Q.request=Q.actor.send("loadTile",Ge,tt.bind(this))):Q.state==="loading"?Q.reloadCallback=he:Q.request=Q.actor.send("reloadTile",Ge,tt.bind(this));function tt(wt,zt){if(delete Q.request,Q.aborted)return he(null);if(wt&&wt.status!==404)return he(wt);zt&&zt.resourceTiming&&(Q.resourceTiming=zt.resourceTiming),this.map._refreshExpiredTiles&&zt&&Q.setExpiryData(zt),Q.loadVectorData(zt,this.map.painter),o.cacheEntryPossiblyAdded(this.dispatcher),he(null),Q.reloadCallback&&(this.loadTile(Q,Q.reloadCallback),Q.reloadCallback=null)}},W.prototype.abortTile=function(Q){Q.request&&(Q.request.cancel(),delete Q.request),Q.actor&&Q.actor.send("abortTile",{uid:Q.uid,type:this.type,source:this.id},void 0)},W.prototype.unloadTile=function(Q){Q.unloadVectorData(),Q.actor&&Q.actor.send("removeTile",{uid:Q.uid,type:this.type,source:this.id},void 0)},W.prototype.hasTransition=function(){return!1},W}(o.Evented),O=function(ce){function W(fe,Q,he,Re){ce.call(this),this.id=fe,this.dispatcher=he,this.setEventedParent(Re),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=o.extend({type:"raster"},Q),o.extend(this,o.pick(Q,["url","scheme","tileSize"]))}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.load=function(){var Q=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=B(this._options,this.map._requestManager,function(he,Re){Q._tileJSONRequest=null,Q._loaded=!0,he?Q.fire(new o.ErrorEvent(he)):Re&&(o.extend(Q,Re),Re.bounds&&(Q.tileBounds=new _(Re.bounds,Q.minzoom,Q.maxzoom)),o.postTurnstileEvent(Re.tiles),o.postMapLoadEvent(Re.tiles,Q.map._getMapId(),Q.map._requestManager._skuToken),Q.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})),Q.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})))})},W.prototype.loaded=function(){return this._loaded},W.prototype.onAdd=function(Q){this.map=Q,this.load()},W.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},W.prototype.serialize=function(){return o.extend({},this._options)},W.prototype.hasTile=function(Q){return!this.tileBounds||this.tileBounds.contains(Q.canonical)},W.prototype.loadTile=function(Q,he){var Re=this,Ge=this.map._requestManager.normalizeTileURL(Q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);Q.request=o.getImage(this.map._requestManager.transformRequest(Ge,o.ResourceType.Tile),function(tt,wt){if(delete Q.request,Q.aborted)Q.state="unloaded",he(null);else if(tt)Q.state="errored",he(tt);else if(wt){Re.map._refreshExpiredTiles&&Q.setExpiryData(wt),delete wt.cacheControl,delete wt.expires;var zt=Re.map.painter.context,Xt=zt.gl;Q.texture=Re.map.painter.getTileTexture(wt.width),Q.texture?Q.texture.update(wt,{useMipmap:!0}):(Q.texture=new o.Texture(zt,wt,Xt.RGBA,{useMipmap:!0}),Q.texture.bind(Xt.LINEAR,Xt.CLAMP_TO_EDGE,Xt.LINEAR_MIPMAP_NEAREST),zt.extTextureFilterAnisotropic&&Xt.texParameterf(Xt.TEXTURE_2D,zt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,zt.extTextureFilterAnisotropicMax)),Q.state="loaded",o.cacheEntryPossiblyAdded(Re.dispatcher),he(null)}})},W.prototype.abortTile=function(Q,he){Q.request&&(Q.request.cancel(),delete Q.request),he()},W.prototype.unloadTile=function(Q,he){Q.texture&&this.map.painter.saveTileTexture(Q.texture),he()},W.prototype.hasTransition=function(){return!1},W}(o.Evented),F=function(ce){function W(fe,Q,he,Re){ce.call(this,fe,Q,he,Re),this.type="raster-dem",this.maxzoom=22,this._options=o.extend({type:"raster-dem"},Q),this.encoding=Q.encoding||"mapbox"}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},W.prototype.loadTile=function(Q,he){var Re=this.map._requestManager.normalizeTileURL(Q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);Q.request=o.getImage(this.map._requestManager.transformRequest(Re,o.ResourceType.Tile),Ge.bind(this)),Q.neighboringTiles=this._getNeighboringTiles(Q.tileID);function Ge(wt,zt){if(delete Q.request,Q.aborted)Q.state="unloaded",he(null);else if(wt)Q.state="errored",he(wt);else if(zt){this.map._refreshExpiredTiles&&Q.setExpiryData(zt),delete zt.cacheControl,delete zt.expires;var Xt=o.window.ImageBitmap&&zt instanceof o.window.ImageBitmap&&o.offscreenCanvasSupported(),tr=Xt?zt:o.browser.getImageData(zt,1),qt={uid:Q.uid,coord:Q.tileID,source:this.id,rawImageData:tr,encoding:this.encoding};(!Q.actor||Q.state==="expired")&&(Q.actor=this.dispatcher.getActor(),Q.actor.send("loadDEMTile",qt,tt.bind(this)))}}function tt(wt,zt){wt&&(Q.state="errored",he(wt)),zt&&(Q.dem=zt,Q.needsHillshadePrepare=!0,Q.state="loaded",he(null))}},W.prototype._getNeighboringTiles=function(Q){var he=Q.canonical,Re=Math.pow(2,he.z),Ge=(he.x-1+Re)%Re,tt=he.x===0?Q.wrap-1:Q.wrap,wt=(he.x+1+Re)%Re,zt=he.x+1===Re?Q.wrap+1:Q.wrap,Xt={};return Xt[new o.OverscaledTileID(Q.overscaledZ,tt,he.z,Ge,he.y).key]={backfilled:!1},Xt[new o.OverscaledTileID(Q.overscaledZ,zt,he.z,wt,he.y).key]={backfilled:!1},he.y>0&&(Xt[new o.OverscaledTileID(Q.overscaledZ,tt,he.z,Ge,he.y-1).key]={backfilled:!1},Xt[new o.OverscaledTileID(Q.overscaledZ,Q.wrap,he.z,he.x,he.y-1).key]={backfilled:!1},Xt[new o.OverscaledTileID(Q.overscaledZ,zt,he.z,wt,he.y-1).key]={backfilled:!1}),he.y+1<Re&&(Xt[new o.OverscaledTileID(Q.overscaledZ,tt,he.z,Ge,he.y+1).key]={backfilled:!1},Xt[new o.OverscaledTileID(Q.overscaledZ,Q.wrap,he.z,he.x,he.y+1).key]={backfilled:!1},Xt[new o.OverscaledTileID(Q.overscaledZ,zt,he.z,wt,he.y+1).key]={backfilled:!1}),Xt},W.prototype.unloadTile=function(Q){Q.demTexture&&this.map.painter.saveTileTexture(Q.demTexture),Q.fbo&&(Q.fbo.destroy(),delete Q.fbo),Q.dem&&delete Q.dem,delete Q.neighboringTiles,Q.state="unloaded",Q.actor&&Q.actor.send("removeDEMTile",{uid:Q.uid,source:this.id})},W}(O),N=function(ce){function W(fe,Q,he,Re){ce.call(this),this.id=fe,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=he.getActor(),this.setEventedParent(Re),this._data=Q.data,this._options=o.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 Ge=o.EXTENT/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:Q.cluster||!1,geojsonVtOptions:{buffer:(Q.buffer!==void 0?Q.buffer:128)*Ge,tolerance:(Q.tolerance!==void 0?Q.tolerance:.375)*Ge,extent:o.EXTENT,maxZoom:this.maxzoom,lineMetrics:Q.lineMetrics||!1,generateId:Q.generateId||!1},superclusterOptions:{maxZoom:Q.clusterMaxZoom!==void 0?Math.min(Q.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,Q.clusterMinPoints||2),extent:o.EXTENT,radius:(Q.clusterRadius||50)*Ge,log:!1,generateId:Q.generateId||!1},clusterProperties:Q.clusterProperties,filter:Q.filter},Q.workerOptions)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.load=function(){var Q=this;this.fire(new o.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(he){if(he){Q.fire(new o.ErrorEvent(he));return}var Re={dataType:"source",sourceDataType:"metadata"};Q._collectResourceTiming&&Q._resourceTiming&&Q._resourceTiming.length>0&&(Re.resourceTiming=Q._resourceTiming,Q._resourceTiming=[]),Q.fire(new o.Event("data",Re))})},W.prototype.onAdd=function(Q){this.map=Q,this.load()},W.prototype.setData=function(Q){var he=this;return this._data=Q,this.fire(new o.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Re){if(Re){he.fire(new o.ErrorEvent(Re));return}var Ge={dataType:"source",sourceDataType:"content"};he._collectResourceTiming&&he._resourceTiming&&he._resourceTiming.length>0&&(Ge.resourceTiming=he._resourceTiming,he._resourceTiming=[]),he.fire(new o.Event("data",Ge))}),this},W.prototype.getClusterExpansionZoom=function(Q,he){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:Q,source:this.id},he),this},W.prototype.getClusterChildren=function(Q,he){return this.actor.send("geojson.getClusterChildren",{clusterId:Q,source:this.id},he),this},W.prototype.getClusterLeaves=function(Q,he,Re,Ge){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:Q,limit:he,offset:Re},Ge),this},W.prototype._updateWorkerData=function(Q){var he=this;this._loaded=!1;var Re=o.extend({},this.workerOptions),Ge=this._data;typeof Ge=="string"?(Re.request=this.map._requestManager.transformRequest(o.browser.resolveURL(Ge),o.ResourceType.Source),Re.request.collectResourceTiming=this._collectResourceTiming):Re.data=JSON.stringify(Ge),this.actor.send(this.type+".loadData",Re,function(tt,wt){he._removed||wt&&wt.abandoned||(he._loaded=!0,wt&&wt.resourceTiming&&wt.resourceTiming[he.id]&&(he._resourceTiming=wt.resourceTiming[he.id].slice(0)),he.actor.send(he.type+".coalesce",{source:Re.source},null),Q(tt))})},W.prototype.loaded=function(){return this._loaded},W.prototype.loadTile=function(Q,he){var Re=this,Ge=Q.actor?"reloadTile":"loadTile";Q.actor=this.actor;var tt={type:this.type,uid:Q.uid,tileID:Q.tileID,zoom:Q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:o.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request=this.actor.send(Ge,tt,function(wt,zt){return delete Q.request,Q.unloadVectorData(),Q.aborted?he(null):wt?he(wt):(Q.loadVectorData(zt,Re.map.painter,Ge==="reloadTile"),he(null))})},W.prototype.abortTile=function(Q){Q.request&&(Q.request.cancel(),delete Q.request),Q.aborted=!0},W.prototype.unloadTile=function(Q){Q.unloadVectorData(),this.actor.send("removeTile",{uid:Q.uid,type:this.type,source:this.id})},W.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},W.prototype.serialize=function(){return o.extend({},this._options,{type:this.type,data:this._data})},W.prototype.hasTransition=function(){return!1},W}(o.Evented),V=o.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(ce){function W(fe,Q,he,Re){ce.call(this),this.id=fe,this.dispatcher=he,this.coordinates=Q.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Re),this.options=Q}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.load=function(Q,he){var Re=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this.url=this.options.url,o.getImage(this.map._requestManager.transformRequest(this.url,o.ResourceType.Image),function(Ge,tt){Re._loaded=!0,Ge?Re.fire(new o.ErrorEvent(Ge)):tt&&(Re.image=tt,Q&&(Re.coordinates=Q),he&&he(),Re._finishLoading())})},W.prototype.loaded=function(){return this._loaded},W.prototype.updateImage=function(Q){var he=this;return!this.image||!Q.url?this:(this.options.url=Q.url,this.load(Q.coordinates,function(){he.texture=null}),this)},W.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})))},W.prototype.onAdd=function(Q){this.map=Q,this.load()},W.prototype.setCoordinates=function(Q){var he=this;this.coordinates=Q;var Re=Q.map(o.MercatorCoordinate.fromLngLat);this.tileID=$(Re),this.minzoom=this.maxzoom=this.tileID.z;var Ge=Re.map(function(tt){return he.tileID.getTilePoint(tt)._round()});return this._boundsArray=new o.StructArrayLayout4i8,this._boundsArray.emplaceBack(Ge[0].x,Ge[0].y,0,0),this._boundsArray.emplaceBack(Ge[1].x,Ge[1].y,o.EXTENT,0),this._boundsArray.emplaceBack(Ge[3].x,Ge[3].y,0,o.EXTENT),this._boundsArray.emplaceBack(Ge[2].x,Ge[2].y,o.EXTENT,o.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})),this},W.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var Q=this.map.painter.context,he=Q.gl;this.boundsBuffer||(this.boundsBuffer=Q.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new o.Texture(Q,this.image,he.RGBA),this.texture.bind(he.LINEAR,he.CLAMP_TO_EDGE));for(var Re in this.tiles){var Ge=this.tiles[Re];Ge.state!=="loaded"&&(Ge.state="loaded",Ge.texture=this.texture)}}},W.prototype.loadTile=function(Q,he){this.tileID&&this.tileID.equals(Q.tileID.canonical)?(this.tiles[String(Q.tileID.wrap)]=Q,Q.buckets={},he(null)):(Q.state="errored",he(null))},W.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},W.prototype.hasTransition=function(){return!1},W}(o.Evented);function $(ce){for(var W=1/0,fe=1/0,Q=-1/0,he=-1/0,Re=0,Ge=ce;Re<Ge.length;Re+=1){var tt=Ge[Re];W=Math.min(W,tt.x),fe=Math.min(fe,tt.y),Q=Math.max(Q,tt.x),he=Math.max(he,tt.y)}var wt=Q-W,zt=he-fe,Xt=Math.max(wt,zt),tr=Math.max(0,Math.floor(-Math.log(Xt)/Math.LN2)),qt=Math.pow(2,tr);return new o.CanonicalTileID(tr,Math.floor((W+Q)/2*qt),Math.floor((fe+he)/2*qt))}var q=function(ce){function W(fe,Q,he,Re){ce.call(this,fe,Q,he,Re),this.roundZoom=!0,this.type="video",this.options=Q}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.load=function(){var Q=this;this._loaded=!1;var he=this.options;this.urls=[];for(var Re=0,Ge=he.urls;Re<Ge.length;Re+=1){var tt=Ge[Re];this.urls.push(this.map._requestManager.transformRequest(tt,o.ResourceType.Source).url)}o.getVideo(this.urls,function(wt,zt){Q._loaded=!0,wt?Q.fire(new o.ErrorEvent(wt)):zt&&(Q.video=zt,Q.video.loop=!0,Q.video.addEventListener("playing",function(){Q.map.triggerRepaint()}),Q.map&&Q.video.play(),Q._finishLoading())})},W.prototype.pause=function(){this.video&&this.video.pause()},W.prototype.play=function(){this.video&&this.video.play()},W.prototype.seek=function(Q){if(this.video){var he=this.video.seekable;Q<he.start(0)||Q>he.end(0)?this.fire(new o.ErrorEvent(new o.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+he.start(0)+" and "+he.end(0)+"-second mark."))):this.video.currentTime=Q}},W.prototype.getVideo=function(){return this.video},W.prototype.onAdd=function(Q){this.map||(this.map=Q,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},W.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var Q=this.map.painter.context,he=Q.gl;this.boundsBuffer||(this.boundsBuffer=Q.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(he.LINEAR,he.CLAMP_TO_EDGE),he.texSubImage2D(he.TEXTURE_2D,0,0,0,he.RGBA,he.UNSIGNED_BYTE,this.video)):(this.texture=new o.Texture(Q,this.video,he.RGBA),this.texture.bind(he.LINEAR,he.CLAMP_TO_EDGE));for(var Re in this.tiles){var Ge=this.tiles[Re];Ge.state!=="loaded"&&(Ge.state="loaded",Ge.texture=this.texture)}}},W.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},W.prototype.hasTransition=function(){return this.video&&!this.video.paused},W}(j),oe=function(ce){function W(fe,Q,he,Re){ce.call(this,fe,Q,he,Re),Q.coordinates?(!Array.isArray(Q.coordinates)||Q.coordinates.length!==4||Q.coordinates.some(function(Ge){return!Array.isArray(Ge)||Ge.length!==2||Ge.some(function(tt){return typeof tt!="number"})}))&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,null,'missing required property "coordinates"'))),Q.animate&&typeof Q.animate!="boolean"&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,null,'optional "animate" property must be a boolean value'))),Q.canvas?typeof Q.canvas!="string"&&!(Q.canvas instanceof o.window.HTMLCanvasElement)&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,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 o.ErrorEvent(new o.ValidationError("sources."+fe,null,'missing required property "canvas"'))),this.options=Q,this.animate=Q.animate!==void 0?Q.animate:!0}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof o.window.HTMLCanvasElement?this.options.canvas:o.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new o.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},W.prototype.getCanvas=function(){return this.canvas},W.prototype.onAdd=function(Q){this.map=Q,this.load(),this.canvas&&this.animate&&this.play()},W.prototype.onRemove=function(){this.pause()},W.prototype.prepare=function(){var Q=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,Q=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,Q=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var he=this.map.painter.context,Re=he.gl;this.boundsBuffer||(this.boundsBuffer=he.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(Q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new o.Texture(he,this.canvas,Re.RGBA,{premultiply:!0});for(var Ge in this.tiles){var tt=this.tiles[Ge];tt.state!=="loaded"&&(tt.state="loaded",tt.texture=this.texture)}}},W.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},W.prototype.hasTransition=function(){return this._playing},W.prototype._hasInvalidDimensions=function(){for(var Q=0,he=[this.canvas.width,this.canvas.height];Q<he.length;Q+=1){var Re=he[Q];if(isNaN(Re)||Re<=0)return!0}return!1},W}(j),Z={vector:z,raster:O,"raster-dem":F,geojson:N,video:q,image:j,canvas:oe},G=function(ce,W,fe,Q){var he=new Z[W.type](ce,W,fe,Q);if(he.id!==ce)throw new Error("Expected Source id to be "+ce+" instead of "+he.id);return o.bindAll(["load","abort","unload","serialize","prepare"],he),he},re=function(ce){return Z[ce]},H=function(ce,W){Z[ce]=W};function J(ce,W){var fe=o.identity([]);return o.translate(fe,fe,[1,1,0]),o.scale(fe,fe,[ce.width*.5,ce.height*.5,1]),o.multiply(fe,fe,ce.calculatePosMatrix(W.toUnwrapped()))}function ae(ce,W,fe){if(ce)for(var Q=0,he=ce;Q<he.length;Q+=1){var Re=he[Q],Ge=W[Re];if(Ge&&Ge.source===fe&&Ge.type==="fill-extrusion")return!0}else for(var tt in W){var wt=W[tt];if(wt.source===fe&&wt.type==="fill-extrusion")return!0}return!1}function K(ce,W,fe,Q,he,Re){var Ge=ae(he&&he.layers,W,ce.id),tt=Re.maxPitchScaleFactor(),wt=ce.tilesIn(Q,tt,Ge);wt.sort(ne);for(var zt=[],Xt=0,tr=wt;Xt<tr.length;Xt+=1){var qt=tr[Xt];zt.push({wrappedTileID:qt.tileID.wrapped().key,queryResults:qt.tile.queryRenderedFeatures(W,fe,ce._state,qt.queryGeometry,qt.cameraQueryGeometry,qt.scale,he,Re,tt,J(ce.transform,qt.tileID))})}var Cr=le(zt);for(var Ur in Cr)Cr[Ur].forEach(function(Nr){var Fr=Nr.feature,Gr=ce.getFeatureState(Fr.layer["source-layer"],Fr.id);Fr.source=Fr.layer.source,Fr.layer["source-layer"]&&(Fr.sourceLayer=Fr.layer["source-layer"]),Fr.state=Gr});return Cr}function Y(ce,W,fe,Q,he,Re,Ge){for(var tt={},wt=Re.queryRenderedSymbols(Q),zt=[],Xt=0,tr=Object.keys(wt).map(Number);Xt<tr.length;Xt+=1){var qt=tr[Xt];zt.push(Ge[qt])}zt.sort(ne);for(var Cr=function(){var nn=Nr[Ur],Cn=nn.featureIndex.lookupSymbolFeatures(wt[nn.bucketInstanceId],W,nn.bucketIndex,nn.sourceLayerIndex,he.filter,he.layers,he.availableImages,ce);for(var Rn in Cn){var Bn=tt[Rn]=tt[Rn]||[],Nn=Cn[Rn];Nn.sort(function(ea,ca){var ia=nn.featureSortOrder;if(ia){var Ea=ia.indexOf(ea.featureIndex),Va=ia.indexOf(ca.featureIndex);return Va-Ea}else return ca.featureIndex-ea.featureIndex});for(var Fn=0,Vn=Nn;Fn<Vn.length;Fn+=1){var Zn=Vn[Fn];Bn.push(Zn)}}},Ur=0,Nr=zt;Ur<Nr.length;Ur+=1)Cr();var Fr=function(nn){tt[nn].forEach(function(Cn){var Rn=Cn.feature,Bn=ce[nn],Nn=fe[Bn.source],Fn=Nn.getFeatureState(Rn.layer["source-layer"],Rn.id);Rn.source=Rn.layer.source,Rn.layer["source-layer"]&&(Rn.sourceLayer=Rn.layer["source-layer"]),Rn.state=Fn})};for(var Gr in tt)Fr(Gr);return tt}function ie(ce,W){for(var fe=ce.getRenderableIds().map(function(wt){return ce.getTileByID(wt)}),Q=[],he={},Re=0;Re<fe.length;Re++){var Ge=fe[Re],tt=Ge.tileID.canonical.key;he[tt]||(he[tt]=!0,Ge.querySourceFeatures(Q,W))}return Q}function ne(ce,W){var fe=ce.tileID,Q=W.tileID;return fe.overscaledZ-Q.overscaledZ||fe.canonical.y-Q.canonical.y||fe.wrap-Q.wrap||fe.canonical.x-Q.canonical.x}function le(ce){for(var W={},fe={},Q=0,he=ce;Q<he.length;Q+=1){var Re=he[Q],Ge=Re.queryResults,tt=Re.wrappedTileID,wt=fe[tt]=fe[tt]||{};for(var zt in Ge)for(var Xt=Ge[zt],tr=wt[zt]=wt[zt]||{},qt=W[zt]=W[zt]||[],Cr=0,Ur=Xt;Cr<Ur.length;Cr+=1){var Nr=Ur[Cr];tr[Nr.featureIndex]||(tr[Nr.featureIndex]=!0,qt.push(Nr))}}return W}var de=function(W,fe){this.max=W,this.onRemove=fe,this.reset()};de.prototype.reset=function(){for(var W in this.data)for(var fe=0,Q=this.data[W];fe<Q.length;fe+=1){var he=Q[fe];he.timeout&&clearTimeout(he.timeout),this.onRemove(he.value)}return this.data={},this.order=[],this},de.prototype.add=function(W,fe,Q){var he=this,Re=W.wrapped().key;this.data[Re]===void 0&&(this.data[Re]=[]);var Ge={value:fe,timeout:void 0};if(Q!==void 0&&(Ge.timeout=setTimeout(function(){he.remove(W,Ge)},Q)),this.data[Re].push(Ge),this.order.push(Re),this.order.length>this.max){var tt=this._getAndRemoveByKey(this.order[0]);tt&&this.onRemove(tt)}return this},de.prototype.has=function(W){return W.wrapped().key in this.data},de.prototype.getAndRemove=function(W){return this.has(W)?this._getAndRemoveByKey(W.wrapped().key):null},de.prototype._getAndRemoveByKey=function(W){var fe=this.data[W].shift();return fe.timeout&&clearTimeout(fe.timeout),this.data[W].length===0&&delete this.data[W],this.order.splice(this.order.indexOf(W),1),fe.value},de.prototype.getByKey=function(W){var fe=this.data[W];return fe?fe[0].value:null},de.prototype.get=function(W){if(!this.has(W))return null;var fe=this.data[W.wrapped().key][0];return fe.value},de.prototype.remove=function(W,fe){if(!this.has(W))return this;var Q=W.wrapped().key,he=fe===void 0?0:this.data[Q].indexOf(fe),Re=this.data[Q][he];return this.data[Q].splice(he,1),Re.timeout&&clearTimeout(Re.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(Re.value),this.order.splice(this.order.indexOf(Q),1),this},de.prototype.setMaxSize=function(W){for(this.max=W;this.order.length>this.max;){var fe=this._getAndRemoveByKey(this.order[0]);fe&&this.onRemove(fe)}return this},de.prototype.filter=function(W){var fe=[];for(var Q in this.data)for(var he=0,Re=this.data[Q];he<Re.length;he+=1){var Ge=Re[he];W(Ge.value)||fe.push(Ge)}for(var tt=0,wt=fe;tt<wt.length;tt+=1){var zt=wt[tt];this.remove(zt.value.tileID,zt)}};var we=function(W,fe,Q){this.context=W;var he=W.gl;this.buffer=he.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),W.bindElementBuffer.set(this.buffer),he.bufferData(he.ELEMENT_ARRAY_BUFFER,fe.arrayBuffer,this.dynamicDraw?he.DYNAMIC_DRAW:he.STATIC_DRAW),this.dynamicDraw||delete fe.arrayBuffer};we.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},we.prototype.updateData=function(W){var fe=this.context.gl;this.context.unbindVAO(),this.bind(),fe.bufferSubData(fe.ELEMENT_ARRAY_BUFFER,0,W.arrayBuffer)},we.prototype.destroy=function(){var W=this.context.gl;this.buffer&&(W.deleteBuffer(this.buffer),delete this.buffer)};var me={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Le=function(W,fe,Q,he){this.length=fe.length,this.attributes=Q,this.itemSize=fe.bytesPerElement,this.dynamicDraw=he,this.context=W;var Re=W.gl;this.buffer=Re.createBuffer(),W.bindVertexBuffer.set(this.buffer),Re.bufferData(Re.ARRAY_BUFFER,fe.arrayBuffer,this.dynamicDraw?Re.DYNAMIC_DRAW:Re.STATIC_DRAW),this.dynamicDraw||delete fe.arrayBuffer};Le.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Le.prototype.updateData=function(W){var fe=this.context.gl;this.bind(),fe.bufferSubData(fe.ARRAY_BUFFER,0,W.arrayBuffer)},Le.prototype.enableAttributes=function(W,fe){for(var Q=0;Q<this.attributes.length;Q++){var he=this.attributes[Q],Re=fe.attributes[he.name];Re!==void 0&&W.enableVertexAttribArray(Re)}},Le.prototype.setVertexAttribPointers=function(W,fe,Q){for(var he=0;he<this.attributes.length;he++){var Re=this.attributes[he],Ge=fe.attributes[Re.name];Ge!==void 0&&W.vertexAttribPointer(Ge,Re.components,W[me[Re.type]],!1,this.itemSize,Re.offset+this.itemSize*(Q||0))}},Le.prototype.destroy=function(){var W=this.context.gl;this.buffer&&(W.deleteBuffer(this.buffer),delete this.buffer)};var ve=function(W){this.gl=W.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};ve.prototype.get=function(){return this.current},ve.prototype.set=function(W){},ve.prototype.getDefault=function(){return this.default},ve.prototype.setDefault=function(){this.set(this.default)};var Ae=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return o.Color.transparent},W.prototype.set=function(Q){var he=this.current;Q.r===he.r&&Q.g===he.g&&Q.b===he.b&&Q.a===he.a&&!this.dirty||(this.gl.clearColor(Q.r,Q.g,Q.b,Q.a),this.current=Q,this.dirty=!1)},W}(ve),ye=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return 1},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.clearDepth(Q),this.current=Q,this.dirty=!1)},W}(ve),Se=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return 0},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.clearStencil(Q),this.current=Q,this.dirty=!1)},W}(ve),_e=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return[!0,!0,!0,!0]},W.prototype.set=function(Q){var he=this.current;Q[0]===he[0]&&Q[1]===he[1]&&Q[2]===he[2]&&Q[3]===he[3]&&!this.dirty||(this.gl.colorMask(Q[0],Q[1],Q[2],Q[3]),this.current=Q,this.dirty=!1)},W}(ve),ze=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return!0},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.depthMask(Q),this.current=Q,this.dirty=!1)},W}(ve),Ie=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return 255},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.stencilMask(Q),this.current=Q,this.dirty=!1)},W}(ve),Ne=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},W.prototype.set=function(Q){var he=this.current;Q.func===he.func&&Q.ref===he.ref&&Q.mask===he.mask&&!this.dirty||(this.gl.stencilFunc(Q.func,Q.ref,Q.mask),this.current=Q,this.dirty=!1)},W}(ve),et=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){var Q=this.gl;return[Q.KEEP,Q.KEEP,Q.KEEP]},W.prototype.set=function(Q){var he=this.current;Q[0]===he[0]&&Q[1]===he[1]&&Q[2]===he[2]&&!this.dirty||(this.gl.stencilOp(Q[0],Q[1],Q[2]),this.current=Q,this.dirty=!1)},W}(ve),st=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return!1},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;Q?he.enable(he.STENCIL_TEST):he.disable(he.STENCIL_TEST),this.current=Q,this.dirty=!1}},W}(ve),Ze=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return[0,1]},W.prototype.set=function(Q){var he=this.current;Q[0]===he[0]&&Q[1]===he[1]&&!this.dirty||(this.gl.depthRange(Q[0],Q[1]),this.current=Q,this.dirty=!1)},W}(ve),Ke=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return!1},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;Q?he.enable(he.DEPTH_TEST):he.disable(he.DEPTH_TEST),this.current=Q,this.dirty=!1}},W}(ve),nt=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return this.gl.LESS},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.depthFunc(Q),this.current=Q,this.dirty=!1)},W}(ve),it=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return!1},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;Q?he.enable(he.BLEND):he.disable(he.BLEND),this.current=Q,this.dirty=!1}},W}(ve),lt=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){var Q=this.gl;return[Q.ONE,Q.ZERO]},W.prototype.set=function(Q){var he=this.current;Q[0]===he[0]&&Q[1]===he[1]&&!this.dirty||(this.gl.blendFunc(Q[0],Q[1]),this.current=Q,this.dirty=!1)},W}(ve),vt=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return o.Color.transparent},W.prototype.set=function(Q){var he=this.current;Q.r===he.r&&Q.g===he.g&&Q.b===he.b&&Q.a===he.a&&!this.dirty||(this.gl.blendColor(Q.r,Q.g,Q.b,Q.a),this.current=Q,this.dirty=!1)},W}(ve),xt=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return this.gl.FUNC_ADD},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.blendEquation(Q),this.current=Q,this.dirty=!1)},W}(ve),Je=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return!1},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;Q?he.enable(he.CULL_FACE):he.disable(he.CULL_FACE),this.current=Q,this.dirty=!1}},W}(ve),Pe=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return this.gl.BACK},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.cullFace(Q),this.current=Q,this.dirty=!1)},W}(ve),Ue=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return this.gl.CCW},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.frontFace(Q),this.current=Q,this.dirty=!1)},W}(ve),He=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.useProgram(Q),this.current=Q,this.dirty=!1)},W}(ve),Oe=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return this.gl.TEXTURE0},W.prototype.set=function(Q){Q===this.current&&!this.dirty||(this.gl.activeTexture(Q),this.current=Q,this.dirty=!1)},W}(ve),Ce=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){var Q=this.gl;return[0,0,Q.drawingBufferWidth,Q.drawingBufferHeight]},W.prototype.set=function(Q){var he=this.current;Q[0]===he[0]&&Q[1]===he[1]&&Q[2]===he[2]&&Q[3]===he[3]&&!this.dirty||(this.gl.viewport(Q[0],Q[1],Q[2],Q[3]),this.current=Q,this.dirty=!1)},W}(ve),ge=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;he.bindFramebuffer(he.FRAMEBUFFER,Q),this.current=Q,this.dirty=!1}},W}(ve),pe=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;he.bindRenderbuffer(he.RENDERBUFFER,Q),this.current=Q,this.dirty=!1}},W}(ve),Te=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;he.bindTexture(he.TEXTURE_2D,Q),this.current=Q,this.dirty=!1}},W}(ve),be=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;he.bindBuffer(he.ARRAY_BUFFER,Q),this.current=Q,this.dirty=!1}},W}(ve),ke=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W.prototype.set=function(Q){var he=this.gl;he.bindBuffer(he.ELEMENT_ARRAY_BUFFER,Q),this.current=Q,this.dirty=!1},W}(ve),Ve=function(ce){function W(fe){ce.call(this,fe),this.vao=fe.extVertexArrayObject}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W.prototype.set=function(Q){!this.vao||Q===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(Q),this.current=Q,this.dirty=!1)},W}(ve),je=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return 4},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;he.pixelStorei(he.UNPACK_ALIGNMENT,Q),this.current=Q,this.dirty=!1}},W}(ve),at=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return!1},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;he.pixelStorei(he.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Q),this.current=Q,this.dirty=!1}},W}(ve),ut=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return!1},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){var he=this.gl;he.pixelStorei(he.UNPACK_FLIP_Y_WEBGL,Q),this.current=Q,this.dirty=!1}},W}(ve),Nt=function(ce){function W(fe,Q){ce.call(this,fe),this.context=fe,this.parent=Q}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.getDefault=function(){return null},W}(ve),Vt=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.setDirty=function(){this.dirty=!0},W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var he=this.gl;he.framebufferTexture2D(he.FRAMEBUFFER,he.COLOR_ATTACHMENT0,he.TEXTURE_2D,Q,0),this.current=Q,this.dirty=!1}},W}(Nt),gt=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.set=function(Q){if(!(Q===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var he=this.gl;he.framebufferRenderbuffer(he.FRAMEBUFFER,he.DEPTH_ATTACHMENT,he.RENDERBUFFER,Q),this.current=Q,this.dirty=!1}},W}(Nt),Ct=function(W,fe,Q,he){this.context=W,this.width=fe,this.height=Q;var Re=W.gl,Ge=this.framebuffer=Re.createFramebuffer();this.colorAttachment=new Vt(W,Ge),he&&(this.depthAttachment=new gt(W,Ge))};Ct.prototype.destroy=function(){var W=this.context.gl,fe=this.colorAttachment.get();if(fe&&W.deleteTexture(fe),this.depthAttachment){var Q=this.depthAttachment.get();Q&&W.deleteRenderbuffer(Q)}W.deleteFramebuffer(this.framebuffer)};var Yt=519,gr=function(W,fe,Q){this.func=W,this.mask=fe,this.range=Q};gr.ReadOnly=!1,gr.ReadWrite=!0,gr.disabled=new gr(Yt,gr.ReadOnly,[0,1]);var ht=519,Ht=7680,Wt=function(W,fe,Q,he,Re,Ge){this.test=W,this.ref=fe,this.mask=Q,this.fail=he,this.depthFail=Re,this.pass=Ge};Wt.disabled=new Wt({func:ht,mask:0},0,0,Ht,Ht,Ht);var cr=0,er=1,ct=771,qe=function(W,fe,Q){this.blendFunction=W,this.blendColor=fe,this.mask=Q};qe.Replace=[er,cr],qe.disabled=new qe(qe.Replace,o.Color.transparent,[!1,!1,!1,!1]),qe.unblended=new qe(qe.Replace,o.Color.transparent,[!0,!0,!0,!0]),qe.alphaBlended=new qe([er,ct],o.Color.transparent,[!0,!0,!0,!0]);var dt=1029,bt=2305,Et=function(W,fe,Q){this.enable=W,this.mode=fe,this.frontFace=Q};Et.disabled=new Et(!1,dt,bt),Et.backCCW=new Et(!0,dt,bt);var Mt=function(W){this.gl=W,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Ae(this),this.clearDepth=new ye(this),this.clearStencil=new Se(this),this.colorMask=new _e(this),this.depthMask=new ze(this),this.stencilMask=new Ie(this),this.stencilFunc=new Ne(this),this.stencilOp=new et(this),this.stencilTest=new st(this),this.depthRange=new Ze(this),this.depthTest=new Ke(this),this.depthFunc=new nt(this),this.blend=new it(this),this.blendFunc=new lt(this),this.blendColor=new vt(this),this.blendEquation=new xt(this),this.cullFace=new Je(this),this.cullFaceSide=new Pe(this),this.frontFace=new Ue(this),this.program=new He(this),this.activeTexture=new Oe(this),this.viewport=new Ce(this),this.bindFramebuffer=new ge(this),this.bindRenderbuffer=new pe(this),this.bindTexture=new Te(this),this.bindVertexBuffer=new be(this),this.bindElementBuffer=new ke(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Ve(this),this.pixelStoreUnpack=new je(this),this.pixelStoreUnpackPremultiplyAlpha=new at(this),this.pixelStoreUnpackFlipY=new ut(this),this.extTextureFilterAnisotropic=W.getExtension("EXT_texture_filter_anisotropic")||W.getExtension("MOZ_EXT_texture_filter_anisotropic")||W.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=W.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=W.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(W.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=W.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=W.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=W.getParameter(W.MAX_TEXTURE_SIZE)};Mt.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()},Mt.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},Mt.prototype.createIndexBuffer=function(W,fe){return new we(this,W,fe)},Mt.prototype.createVertexBuffer=function(W,fe,Q){return new Le(this,W,fe,Q)},Mt.prototype.createRenderbuffer=function(W,fe,Q){var he=this.gl,Re=he.createRenderbuffer();return this.bindRenderbuffer.set(Re),he.renderbufferStorage(he.RENDERBUFFER,W,fe,Q),this.bindRenderbuffer.set(null),Re},Mt.prototype.createFramebuffer=function(W,fe,Q){return new Ct(this,W,fe,Q)},Mt.prototype.clear=function(W){var fe=W.color,Q=W.depth,he=this.gl,Re=0;fe&&(Re|=he.COLOR_BUFFER_BIT,this.clearColor.set(fe),this.colorMask.set([!0,!0,!0,!0])),typeof Q<"u"&&(Re|=he.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(Q),this.depthMask.set(!0)),he.clear(Re)},Mt.prototype.setCullFace=function(W){W.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(W.mode),this.frontFace.set(W.frontFace))},Mt.prototype.setDepthMode=function(W){W.func===this.gl.ALWAYS&&!W.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(W.func),this.depthMask.set(W.mask),this.depthRange.set(W.range))},Mt.prototype.setStencilMode=function(W){W.test.func===this.gl.ALWAYS&&!W.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(W.mask),this.stencilOp.set([W.fail,W.depthFail,W.pass]),this.stencilFunc.set({func:W.test.func,ref:W.ref,mask:W.test.mask}))},Mt.prototype.setColorMode=function(W){o.deepEqual(W.blendFunction,qe.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(W.blendFunction),this.blendColor.set(W.blendColor)),this.colorMask.set(W.mask)},Mt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var _t=function(ce){function W(fe,Q,he){var Re=this;ce.call(this),this.id=fe,this.dispatcher=he,this.on("data",function(Ge){Ge.dataType==="source"&&Ge.sourceDataType==="metadata"&&(Re._sourceLoaded=!0),Re._sourceLoaded&&!Re._paused&&Ge.dataType==="source"&&Ge.sourceDataType==="content"&&(Re.reload(),Re.transform&&Re.update(Re.transform))}),this.on("error",function(){Re._sourceErrored=!0}),this._source=G(fe,Q,he,this),this._tiles={},this._cache=new de(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new o.SourceFeatureState}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.onAdd=function(Q){this.map=Q,this._maxTileCacheSize=Q?Q._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(Q)},W.prototype.onRemove=function(Q){this._source&&this._source.onRemove&&this._source.onRemove(Q)},W.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var Q in this._tiles){var he=this._tiles[Q];if(he.state!=="loaded"&&he.state!=="errored")return!1}return!0},W.prototype.getSource=function(){return this._source},W.prototype.pause=function(){this._paused=!0},W.prototype.resume=function(){if(this._paused){var Q=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,Q&&this.reload(),this.transform&&this.update(this.transform)}},W.prototype._loadTile=function(Q,he){return this._source.loadTile(Q,he)},W.prototype._unloadTile=function(Q){if(this._source.unloadTile)return this._source.unloadTile(Q,function(){})},W.prototype._abortTile=function(Q){if(this._source.abortTile)return this._source.abortTile(Q,function(){})},W.prototype.serialize=function(){return this._source.serialize()},W.prototype.prepare=function(Q){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var he in this._tiles){var Re=this._tiles[he];Re.upload(Q),Re.prepare(this.map.style.imageManager)}},W.prototype.getIds=function(){return o.values(this._tiles).map(function(Q){return Q.tileID}).sort(It).map(function(Q){return Q.key})},W.prototype.getRenderableIds=function(Q){var he=this,Re=[];for(var Ge in this._tiles)this._isIdRenderable(Ge,Q)&&Re.push(this._tiles[Ge]);return Q?Re.sort(function(tt,wt){var zt=tt.tileID,Xt=wt.tileID,tr=new o.Point(zt.canonical.x,zt.canonical.y)._rotate(he.transform.angle),qt=new o.Point(Xt.canonical.x,Xt.canonical.y)._rotate(he.transform.angle);return zt.overscaledZ-Xt.overscaledZ||qt.y-tr.y||qt.x-tr.x}).map(function(tt){return tt.tileID.key}):Re.map(function(tt){return tt.tileID}).sort(It).map(function(tt){return tt.key})},W.prototype.hasRenderableParent=function(Q){var he=this.findLoadedParent(Q,0);return he?this._isIdRenderable(he.tileID.key):!1},W.prototype._isIdRenderable=function(Q,he){return this._tiles[Q]&&this._tiles[Q].hasData()&&!this._coveredTiles[Q]&&(he||!this._tiles[Q].holdingForFade())},W.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var Q in this._tiles)this._tiles[Q].state!=="errored"&&this._reloadTile(Q,"reloading")},W.prototype._reloadTile=function(Q,he){var Re=this._tiles[Q];Re&&(Re.state!=="loading"&&(Re.state=he),this._loadTile(Re,this._tileLoaded.bind(this,Re,Q,he)))},W.prototype._tileLoaded=function(Q,he,Re,Ge){if(Ge){Q.state="errored",Ge.status!==404?this._source.fire(new o.ErrorEvent(Ge,{tile:Q})):this.update(this.transform);return}Q.timeAdded=o.browser.now(),Re==="expired"&&(Q.refreshedUponExpiration=!0),this._setTileReloadTimer(he,Q),this.getSource().type==="raster-dem"&&Q.dem&&this._backfillDEM(Q),this._state.initializeTileState(Q,this.map?this.map.painter:null),this._source.fire(new o.Event("data",{dataType:"source",tile:Q,coord:Q.tileID}))},W.prototype._backfillDEM=function(Q){for(var he=this.getRenderableIds(),Re=0;Re<he.length;Re++){var Ge=he[Re];if(Q.neighboringTiles&&Q.neighboringTiles[Ge]){var tt=this.getTileByID(Ge);wt(Q,tt),wt(tt,Q)}}function wt(zt,Xt){zt.needsHillshadePrepare=!0;var tr=Xt.tileID.canonical.x-zt.tileID.canonical.x,qt=Xt.tileID.canonical.y-zt.tileID.canonical.y,Cr=Math.pow(2,zt.tileID.canonical.z),Ur=Xt.tileID.key;tr===0&&qt===0||Math.abs(qt)>1||(Math.abs(tr)>1&&(Math.abs(tr+Cr)===1?tr+=Cr:Math.abs(tr-Cr)===1&&(tr-=Cr)),!(!Xt.dem||!zt.dem)&&(zt.dem.backfillBorder(Xt.dem,tr,qt),zt.neighboringTiles&&zt.neighboringTiles[Ur]&&(zt.neighboringTiles[Ur].backfilled=!0)))}},W.prototype.getTile=function(Q){return this.getTileByID(Q.key)},W.prototype.getTileByID=function(Q){return this._tiles[Q]},W.prototype._retainLoadedChildren=function(Q,he,Re,Ge){for(var tt in this._tiles){var wt=this._tiles[tt];if(!(Ge[tt]||!wt.hasData()||wt.tileID.overscaledZ<=he||wt.tileID.overscaledZ>Re)){for(var zt=wt.tileID;wt&&wt.tileID.overscaledZ>he+1;){var Xt=wt.tileID.scaledTo(wt.tileID.overscaledZ-1);wt=this._tiles[Xt.key],wt&&wt.hasData()&&(zt=Xt)}for(var tr=zt;tr.overscaledZ>he;)if(tr=tr.scaledTo(tr.overscaledZ-1),Q[tr.key]){Ge[zt.key]=zt;break}}}},W.prototype.findLoadedParent=function(Q,he){if(Q.key in this._loadedParentTiles){var Re=this._loadedParentTiles[Q.key];return Re&&Re.tileID.overscaledZ>=he?Re:null}for(var Ge=Q.overscaledZ-1;Ge>=he;Ge--){var tt=Q.scaledTo(Ge),wt=this._getLoadedTile(tt);if(wt)return wt}},W.prototype._getLoadedTile=function(Q){var he=this._tiles[Q.key];if(he&&he.hasData())return he;var Re=this._cache.getByKey(Q.wrapped().key);return Re},W.prototype.updateCacheSize=function(Q){var he=Math.ceil(Q.width/this._source.tileSize)+1,Re=Math.ceil(Q.height/this._source.tileSize)+1,Ge=he*Re,tt=5,wt=Math.floor(Ge*tt),zt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,wt):wt;this._cache.setMaxSize(zt)},W.prototype.handleWrapJump=function(Q){var he=this._prevLng===void 0?Q:this._prevLng,Re=Q-he,Ge=Re/360,tt=Math.round(Ge);if(this._prevLng=Q,tt){var wt={};for(var zt in this._tiles){var Xt=this._tiles[zt];Xt.tileID=Xt.tileID.unwrapTo(Xt.tileID.wrap+tt),wt[Xt.tileID.key]=Xt}this._tiles=wt;for(var tr in this._timers)clearTimeout(this._timers[tr]),delete this._timers[tr];for(var qt in this._tiles){var Cr=this._tiles[qt];this._setTileReloadTimer(qt,Cr)}}},W.prototype.update=function(Q){var he=this;if(this.transform=Q,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(Q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Re;this.used?this._source.tileID?Re=Q.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ea){return new o.OverscaledTileID(ea.canonical.z,ea.wrap,ea.canonical.z,ea.canonical.x,ea.canonical.y)}):(Re=Q.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Re=Re.filter(function(ea){return he._source.hasTile(ea)}))):Re=[];var Ge=Q.coveringZoomLevel(this._source),tt=Math.max(Ge-W.maxOverzooming,this._source.minzoom),wt=Math.max(Ge+W.maxUnderzooming,this._source.minzoom),zt=this._updateRetainedTiles(Re,Ge);if(Gt(this._source.type)){for(var Xt={},tr={},qt=Object.keys(zt),Cr=0,Ur=qt;Cr<Ur.length;Cr+=1){var Nr=Ur[Cr],Fr=zt[Nr],Gr=this._tiles[Nr];if(!(!Gr||Gr.fadeEndTime&&Gr.fadeEndTime<=o.browser.now())){var nn=this.findLoadedParent(Fr,tt);nn&&(this._addTile(nn.tileID),Xt[nn.tileID.key]=nn.tileID),tr[Nr]=Fr}}this._retainLoadedChildren(tr,Ge,wt,zt);for(var Cn in Xt)zt[Cn]||(this._coveredTiles[Cn]=!0,zt[Cn]=Xt[Cn])}for(var Rn in zt)this._tiles[Rn].clearFadeHold();for(var Bn=o.keysDifference(this._tiles,zt),Nn=0,Fn=Bn;Nn<Fn.length;Nn+=1){var Vn=Fn[Nn],Zn=this._tiles[Vn];Zn.hasSymbolBuckets&&!Zn.holdingForFade()?Zn.setHoldDuration(this.map._fadeDuration):(!Zn.hasSymbolBuckets||Zn.symbolFadeFinished())&&this._removeTile(Vn)}this._updateLoadedParentTileCache()}},W.prototype.releaseSymbolFadeTiles=function(){for(var Q in this._tiles)this._tiles[Q].holdingForFade()&&this._removeTile(Q)},W.prototype._updateRetainedTiles=function(Q,he){for(var Re={},Ge={},tt=Math.max(he-W.maxOverzooming,this._source.minzoom),wt=Math.max(he+W.maxUnderzooming,this._source.minzoom),zt={},Xt=0,tr=Q;Xt<tr.length;Xt+=1){var qt=tr[Xt],Cr=this._addTile(qt);Re[qt.key]=qt,!Cr.hasData()&&he<this._source.maxzoom&&(zt[qt.key]=qt)}this._retainLoadedChildren(zt,he,wt,Re);for(var Ur=0,Nr=Q;Ur<Nr.length;Ur+=1){var Fr=Nr[Ur],Gr=this._tiles[Fr.key];if(!Gr.hasData()){if(he+1>this._source.maxzoom){var nn=Fr.children(this._source.maxzoom)[0],Cn=this.getTile(nn);if(Cn&&Cn.hasData()){Re[nn.key]=nn;continue}}else{var Rn=Fr.children(this._source.maxzoom);if(Re[Rn[0].key]&&Re[Rn[1].key]&&Re[Rn[2].key]&&Re[Rn[3].key])continue}for(var Bn=Gr.wasRequested(),Nn=Fr.overscaledZ-1;Nn>=tt;--Nn){var Fn=Fr.scaledTo(Nn);if(Ge[Fn.key]||(Ge[Fn.key]=!0,Gr=this.getTile(Fn),!Gr&&Bn&&(Gr=this._addTile(Fn)),Gr&&(Re[Fn.key]=Fn,Bn=Gr.wasRequested(),Gr.hasData())))break}}}return Re},W.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var Q in this._tiles){for(var he=[],Re=void 0,Ge=this._tiles[Q].tileID;Ge.overscaledZ>0;){if(Ge.key in this._loadedParentTiles){Re=this._loadedParentTiles[Ge.key];break}he.push(Ge.key);var tt=Ge.scaledTo(Ge.overscaledZ-1);if(Re=this._getLoadedTile(tt),Re)break;Ge=tt}for(var wt=0,zt=he;wt<zt.length;wt+=1){var Xt=zt[wt];this._loadedParentTiles[Xt]=Re}}},W.prototype._addTile=function(Q){var he=this._tiles[Q.key];if(he)return he;he=this._cache.getAndRemove(Q),he&&(this._setTileReloadTimer(Q.key,he),he.tileID=Q,this._state.initializeTileState(he,this.map?this.map.painter:null),this._cacheTimers[Q.key]&&(clearTimeout(this._cacheTimers[Q.key]),delete this._cacheTimers[Q.key],this._setTileReloadTimer(Q.key,he)));var Re=!!he;return Re||(he=new o.Tile(Q,this._source.tileSize*Q.overscaleFactor()),this._loadTile(he,this._tileLoaded.bind(this,he,Q.key,he.state))),he?(he.uses++,this._tiles[Q.key]=he,Re||this._source.fire(new o.Event("dataloading",{tile:he,coord:he.tileID,dataType:"source"})),he):null},W.prototype._setTileReloadTimer=function(Q,he){var Re=this;Q in this._timers&&(clearTimeout(this._timers[Q]),delete this._timers[Q]);var Ge=he.getExpiryTimeout();Ge&&(this._timers[Q]=setTimeout(function(){Re._reloadTile(Q,"expired"),delete Re._timers[Q]},Ge))},W.prototype._removeTile=function(Q){var he=this._tiles[Q];he&&(he.uses--,delete this._tiles[Q],this._timers[Q]&&(clearTimeout(this._timers[Q]),delete this._timers[Q]),!(he.uses>0)&&(he.hasData()&&he.state!=="reloading"?this._cache.add(he.tileID,he,he.getExpiryTimeout()):(he.aborted=!0,this._abortTile(he),this._unloadTile(he))))},W.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var Q in this._tiles)this._removeTile(Q);this._cache.reset()},W.prototype.tilesIn=function(Q,he,Re){var Ge=this,tt=[],wt=this.transform;if(!wt)return tt;for(var zt=Re?wt.getCameraQueryGeometry(Q):Q,Xt=Q.map(function(Nn){return wt.pointCoordinate(Nn)}),tr=zt.map(function(Nn){return wt.pointCoordinate(Nn)}),qt=this.getIds(),Cr=1/0,Ur=1/0,Nr=-1/0,Fr=-1/0,Gr=0,nn=tr;Gr<nn.length;Gr+=1){var Cn=nn[Gr];Cr=Math.min(Cr,Cn.x),Ur=Math.min(Ur,Cn.y),Nr=Math.max(Nr,Cn.x),Fr=Math.max(Fr,Cn.y)}for(var Rn=function(Nn){var Fn=Ge._tiles[qt[Nn]];if(!Fn.holdingForFade()){var Vn=Fn.tileID,Zn=Math.pow(2,wt.zoom-Fn.tileID.overscaledZ),ea=he*Fn.queryPadding*o.EXTENT/Fn.tileSize/Zn,ca=[Vn.getTilePoint(new o.MercatorCoordinate(Cr,Ur)),Vn.getTilePoint(new o.MercatorCoordinate(Nr,Fr))];if(ca[0].x-ea<o.EXTENT&&ca[0].y-ea<o.EXTENT&&ca[1].x+ea>=0&&ca[1].y+ea>=0){var ia=Xt.map(function(Va){return Vn.getTilePoint(Va)}),Ea=tr.map(function(Va){return Vn.getTilePoint(Va)});tt.push({tile:Fn,tileID:Vn,queryGeometry:ia,cameraQueryGeometry:Ea,scale:Zn})}}},Bn=0;Bn<qt.length;Bn++)Rn(Bn);return tt},W.prototype.getVisibleCoordinates=function(Q){for(var he=this,Re=this.getRenderableIds(Q).map(function(zt){return he._tiles[zt].tileID}),Ge=0,tt=Re;Ge<tt.length;Ge+=1){var wt=tt[Ge];wt.posMatrix=this.transform.calculatePosMatrix(wt.toUnwrapped())}return Re},W.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Gt(this._source.type))for(var Q in this._tiles){var he=this._tiles[Q];if(he.fadeEndTime!==void 0&&he.fadeEndTime>=o.browser.now())return!0}return!1},W.prototype.setFeatureState=function(Q,he,Re){Q=Q||"_geojsonTileLayer",this._state.updateState(Q,he,Re)},W.prototype.removeFeatureState=function(Q,he,Re){Q=Q||"_geojsonTileLayer",this._state.removeFeatureState(Q,he,Re)},W.prototype.getFeatureState=function(Q,he){return Q=Q||"_geojsonTileLayer",this._state.getState(Q,he)},W.prototype.setDependencies=function(Q,he,Re){var Ge=this._tiles[Q];Ge&&Ge.setDependencies(he,Re)},W.prototype.reloadTilesForDependencies=function(Q,he){for(var Re in this._tiles){var Ge=this._tiles[Re];Ge.hasDependency(Q,he)&&this._reloadTile(Re,"reloading")}this._cache.filter(function(tt){return!tt.hasDependency(Q,he)})},W}(o.Evented);_t.maxOverzooming=10,_t.maxUnderzooming=3;function It(ce,W){var fe=Math.abs(ce.wrap*2)-+(ce.wrap<0),Q=Math.abs(W.wrap*2)-+(W.wrap<0);return ce.overscaledZ-W.overscaledZ||Q-fe||W.canonical.y-ce.canonical.y||W.canonical.x-ce.canonical.x}function Gt(ce){return ce==="raster"||ce==="image"||ce==="video"}function nr(){return new o.window.Worker(Hi.workerUrl)}var ar="mapboxgl_preloaded_worker_pool",ir=function(){this.active={}};ir.prototype.acquire=function(W){if(!this.workers)for(this.workers=[];this.workers.length<ir.workerCount;)this.workers.push(new nr);return this.active[W]=!0,this.workers.slice()},ir.prototype.release=function(W){delete this.active[W],this.numActive()===0&&(this.workers.forEach(function(fe){fe.terminate()}),this.workers=null)},ir.prototype.isPreloaded=function(){return!!this.active[ar]},ir.prototype.numActive=function(){return Object.keys(this.active).length};var Be=Math.floor(o.browser.hardwareConcurrency/2);ir.workerCount=Math.max(Math.min(Be,6),1);var Fe;function Rt(){return Fe||(Fe=new ir),Fe}function Lt(){var ce=Rt();ce.acquire(ar)}function Ut(){var ce=Fe;ce&&(ce.isPreloaded()&&ce.numActive()===1?(ce.release(ar),Fe=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()"))}function Qt(ce,W){var fe={};for(var Q in ce)Q!=="ref"&&(fe[Q]=ce[Q]);return o.refProperties.forEach(function(he){he in W&&(fe[he]=W[he])}),fe}function rr(ce){ce=ce.slice();for(var W=Object.create(null),fe=0;fe<ce.length;fe++)W[ce[fe].id]=ce[fe];for(var Q=0;Q<ce.length;Q++)"ref"in ce[Q]&&(ce[Q]=Qt(ce[Q],W[ce[Q].ref]));return ce}function Kt(){var ce={},W=o.styleSpec.$version;for(var fe in o.styleSpec.$root){var Q=o.styleSpec.$root[fe];if(Q.required){var he=null;fe==="version"?he=W:Q.type==="array"?he=[]:he={},he!=null&&(ce[fe]=he)}}return ce}var Dt={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 sr(ce,W,fe){fe.push({command:Dt.addSource,args:[ce,W[ce]]})}function fr(ce,W,fe){W.push({command:Dt.removeSource,args:[ce]}),fe[ce]=!0}function vr(ce,W,fe,Q){fr(ce,fe,Q),sr(ce,W,fe)}function lr(ce,W,fe){var Q;for(Q in ce[fe])if(ce[fe].hasOwnProperty(Q)&&Q!=="data"&&!o.deepEqual(ce[fe][Q],W[fe][Q]))return!1;for(Q in W[fe])if(W[fe].hasOwnProperty(Q)&&Q!=="data"&&!o.deepEqual(ce[fe][Q],W[fe][Q]))return!1;return!0}function Or(ce,W,fe,Q){ce=ce||{},W=W||{};var he;for(he in ce)ce.hasOwnProperty(he)&&(W.hasOwnProperty(he)||fr(he,fe,Q));for(he in W)W.hasOwnProperty(he)&&(ce.hasOwnProperty(he)?o.deepEqual(ce[he],W[he])||(ce[he].type==="geojson"&&W[he].type==="geojson"&&lr(ce,W,he)?fe.push({command:Dt.setGeoJSONSourceData,args:[he,W[he].data]}):vr(he,W,fe,Q)):sr(he,W,fe))}function Sr(ce,W,fe,Q,he,Re){ce=ce||{},W=W||{};var Ge;for(Ge in ce)ce.hasOwnProperty(Ge)&&(o.deepEqual(ce[Ge],W[Ge])||fe.push({command:Re,args:[Q,Ge,W[Ge],he]}));for(Ge in W)!W.hasOwnProperty(Ge)||ce.hasOwnProperty(Ge)||o.deepEqual(ce[Ge],W[Ge])||fe.push({command:Re,args:[Q,Ge,W[Ge],he]})}function Ar(ce){return ce.id}function sn(ce,W){return ce[W.id]=W,ce}function Jr(ce,W,fe){ce=ce||[],W=W||[];var Q=ce.map(Ar),he=W.map(Ar),Re=ce.reduce(sn,{}),Ge=W.reduce(sn,{}),tt=Q.slice(),wt=Object.create(null),zt,Xt,tr,qt,Cr,Ur,Nr;for(zt=0,Xt=0;zt<Q.length;zt++)tr=Q[zt],Ge.hasOwnProperty(tr)?Xt++:(fe.push({command:Dt.removeLayer,args:[tr]}),tt.splice(tt.indexOf(tr,Xt),1));for(zt=0,Xt=0;zt<he.length;zt++)tr=he[he.length-1-zt],tt[tt.length-1-zt]!==tr&&(Re.hasOwnProperty(tr)?(fe.push({command:Dt.removeLayer,args:[tr]}),tt.splice(tt.lastIndexOf(tr,tt.length-Xt),1)):Xt++,Ur=tt[tt.length-zt],fe.push({command:Dt.addLayer,args:[Ge[tr],Ur]}),tt.splice(tt.length-zt,0,tr),wt[tr]=!0);for(zt=0;zt<he.length;zt++)if(tr=he[zt],qt=Re[tr],Cr=Ge[tr],!(wt[tr]||o.deepEqual(qt,Cr))){if(!o.deepEqual(qt.source,Cr.source)||!o.deepEqual(qt["source-layer"],Cr["source-layer"])||!o.deepEqual(qt.type,Cr.type)){fe.push({command:Dt.removeLayer,args:[tr]}),Ur=tt[tt.lastIndexOf(tr)+1],fe.push({command:Dt.addLayer,args:[Cr,Ur]});continue}Sr(qt.layout,Cr.layout,fe,tr,null,Dt.setLayoutProperty),Sr(qt.paint,Cr.paint,fe,tr,null,Dt.setPaintProperty),o.deepEqual(qt.filter,Cr.filter)||fe.push({command:Dt.setFilter,args:[tr,Cr.filter]}),(!o.deepEqual(qt.minzoom,Cr.minzoom)||!o.deepEqual(qt.maxzoom,Cr.maxzoom))&&fe.push({command:Dt.setLayerZoomRange,args:[tr,Cr.minzoom,Cr.maxzoom]});for(Nr in qt)qt.hasOwnProperty(Nr)&&(Nr==="layout"||Nr==="paint"||Nr==="filter"||Nr==="metadata"||Nr==="minzoom"||Nr==="maxzoom"||(Nr.indexOf("paint.")===0?Sr(qt[Nr],Cr[Nr],fe,tr,Nr.slice(6),Dt.setPaintProperty):o.deepEqual(qt[Nr],Cr[Nr])||fe.push({command:Dt.setLayerProperty,args:[tr,Nr,Cr[Nr]]})));for(Nr in Cr)!Cr.hasOwnProperty(Nr)||qt.hasOwnProperty(Nr)||Nr==="layout"||Nr==="paint"||Nr==="filter"||Nr==="metadata"||Nr==="minzoom"||Nr==="maxzoom"||(Nr.indexOf("paint.")===0?Sr(qt[Nr],Cr[Nr],fe,tr,Nr.slice(6),Dt.setPaintProperty):o.deepEqual(qt[Nr],Cr[Nr])||fe.push({command:Dt.setLayerProperty,args:[tr,Nr,Cr[Nr]]}))}}function bn(ce,W){if(!ce)return[{command:Dt.setStyle,args:[W]}];var fe=[];try{if(!o.deepEqual(ce.version,W.version))return[{command:Dt.setStyle,args:[W]}];o.deepEqual(ce.center,W.center)||fe.push({command:Dt.setCenter,args:[W.center]}),o.deepEqual(ce.zoom,W.zoom)||fe.push({command:Dt.setZoom,args:[W.zoom]}),o.deepEqual(ce.bearing,W.bearing)||fe.push({command:Dt.setBearing,args:[W.bearing]}),o.deepEqual(ce.pitch,W.pitch)||fe.push({command:Dt.setPitch,args:[W.pitch]}),o.deepEqual(ce.sprite,W.sprite)||fe.push({command:Dt.setSprite,args:[W.sprite]}),o.deepEqual(ce.glyphs,W.glyphs)||fe.push({command:Dt.setGlyphs,args:[W.glyphs]}),o.deepEqual(ce.transition,W.transition)||fe.push({command:Dt.setTransition,args:[W.transition]}),o.deepEqual(ce.light,W.light)||fe.push({command:Dt.setLight,args:[W.light]});var Q={},he=[];Or(ce.sources,W.sources,he,Q);var Re=[];ce.layers&&ce.layers.forEach(function(Ge){Q[Ge.source]?fe.push({command:Dt.removeLayer,args:[Ge.id]}):Re.push(Ge)}),fe=fe.concat(he),Jr(Re,W.layers,fe)}catch(Ge){console.warn("Unable to compute style diff:",Ge),fe=[{command:Dt.setStyle,args:[W]}]}return fe}var xn=function(W,fe){this.reset(W,fe)};xn.prototype.reset=function(W,fe){this.points=W||[],this._distances=[0];for(var Q=1;Q<this.points.length;Q++)this._distances[Q]=this._distances[Q-1]+this.points[Q].dist(this.points[Q-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(fe||0,this.length*.5),this.paddedLength=this.length-this.padding*2},xn.prototype.lerp=function(W){if(this.points.length===1)return this.points[0];W=o.clamp(W,0,1);for(var fe=1,Q=this._distances[fe],he=W*this.paddedLength+this.padding;Q<he&&fe<this._distances.length;)Q=this._distances[++fe];var Re=fe-1,Ge=this._distances[Re],tt=Q-Ge,wt=tt>0?(he-Ge)/tt:0;return this.points[Re].mult(1-wt).add(this.points[fe].mult(wt))};var or=function(W,fe,Q){var he=this.boxCells=[],Re=this.circleCells=[];this.xCellCount=Math.ceil(W/Q),this.yCellCount=Math.ceil(fe/Q);for(var Ge=0;Ge<this.xCellCount*this.yCellCount;Ge++)he.push([]),Re.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=W,this.height=fe,this.xScale=this.xCellCount/W,this.yScale=this.yCellCount/fe,this.boxUid=0,this.circleUid=0};or.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},or.prototype.insert=function(W,fe,Q,he,Re){this._forEachCell(fe,Q,he,Re,this._insertBoxCell,this.boxUid++),this.boxKeys.push(W),this.bboxes.push(fe),this.bboxes.push(Q),this.bboxes.push(he),this.bboxes.push(Re)},or.prototype.insertCircle=function(W,fe,Q,he){this._forEachCell(fe-he,Q-he,fe+he,Q+he,this._insertCircleCell,this.circleUid++),this.circleKeys.push(W),this.circles.push(fe),this.circles.push(Q),this.circles.push(he)},or.prototype._insertBoxCell=function(W,fe,Q,he,Re,Ge){this.boxCells[Re].push(Ge)},or.prototype._insertCircleCell=function(W,fe,Q,he,Re,Ge){this.circleCells[Re].push(Ge)},or.prototype._query=function(W,fe,Q,he,Re,Ge){if(Q<0||W>this.width||he<0||fe>this.height)return Re?!1:[];var tt=[];if(W<=0&&fe<=0&&this.width<=Q&&this.height<=he){if(Re)return!0;for(var wt=0;wt<this.boxKeys.length;wt++)tt.push({key:this.boxKeys[wt],x1:this.bboxes[wt*4],y1:this.bboxes[wt*4+1],x2:this.bboxes[wt*4+2],y2:this.bboxes[wt*4+3]});for(var zt=0;zt<this.circleKeys.length;zt++){var Xt=this.circles[zt*3],tr=this.circles[zt*3+1],qt=this.circles[zt*3+2];tt.push({key:this.circleKeys[zt],x1:Xt-qt,y1:tr-qt,x2:Xt+qt,y2:tr+qt})}return Ge?tt.filter(Ge):tt}else{var Cr={hitTest:Re,seenUids:{box:{},circle:{}}};return this._forEachCell(W,fe,Q,he,this._queryCell,tt,Cr,Ge),Re?tt.length>0:tt}},or.prototype._queryCircle=function(W,fe,Q,he,Re){var Ge=W-Q,tt=W+Q,wt=fe-Q,zt=fe+Q;if(tt<0||Ge>this.width||zt<0||wt>this.height)return he?!1:[];var Xt=[],tr={hitTest:he,circle:{x:W,y:fe,radius:Q},seenUids:{box:{},circle:{}}};return this._forEachCell(Ge,wt,tt,zt,this._queryCellCircle,Xt,tr,Re),he?Xt.length>0:Xt},or.prototype.query=function(W,fe,Q,he,Re){return this._query(W,fe,Q,he,!1,Re)},or.prototype.hitTest=function(W,fe,Q,he,Re){return this._query(W,fe,Q,he,!0,Re)},or.prototype.hitTestCircle=function(W,fe,Q,he){return this._queryCircle(W,fe,Q,!0,he)},or.prototype._queryCell=function(W,fe,Q,he,Re,Ge,tt,wt){var zt=tt.seenUids,Xt=this.boxCells[Re];if(Xt!==null)for(var tr=this.bboxes,qt=0,Cr=Xt;qt<Cr.length;qt+=1){var Ur=Cr[qt];if(!zt.box[Ur]){zt.box[Ur]=!0;var Nr=Ur*4;if(W<=tr[Nr+2]&&fe<=tr[Nr+3]&&Q>=tr[Nr+0]&&he>=tr[Nr+1]&&(!wt||wt(this.boxKeys[Ur]))){if(tt.hitTest)return Ge.push(!0),!0;Ge.push({key:this.boxKeys[Ur],x1:tr[Nr],y1:tr[Nr+1],x2:tr[Nr+2],y2:tr[Nr+3]})}}}var Fr=this.circleCells[Re];if(Fr!==null)for(var Gr=this.circles,nn=0,Cn=Fr;nn<Cn.length;nn+=1){var Rn=Cn[nn];if(!zt.circle[Rn]){zt.circle[Rn]=!0;var Bn=Rn*3;if(this._circleAndRectCollide(Gr[Bn],Gr[Bn+1],Gr[Bn+2],W,fe,Q,he)&&(!wt||wt(this.circleKeys[Rn]))){if(tt.hitTest)return Ge.push(!0),!0;var Nn=Gr[Bn],Fn=Gr[Bn+1],Vn=Gr[Bn+2];Ge.push({key:this.circleKeys[Rn],x1:Nn-Vn,y1:Fn-Vn,x2:Nn+Vn,y2:Fn+Vn})}}}},or.prototype._queryCellCircle=function(W,fe,Q,he,Re,Ge,tt,wt){var zt=tt.circle,Xt=tt.seenUids,tr=this.boxCells[Re];if(tr!==null)for(var qt=this.bboxes,Cr=0,Ur=tr;Cr<Ur.length;Cr+=1){var Nr=Ur[Cr];if(!Xt.box[Nr]){Xt.box[Nr]=!0;var Fr=Nr*4;if(this._circleAndRectCollide(zt.x,zt.y,zt.radius,qt[Fr+0],qt[Fr+1],qt[Fr+2],qt[Fr+3])&&(!wt||wt(this.boxKeys[Nr])))return Ge.push(!0),!0}}var Gr=this.circleCells[Re];if(Gr!==null)for(var nn=this.circles,Cn=0,Rn=Gr;Cn<Rn.length;Cn+=1){var Bn=Rn[Cn];if(!Xt.circle[Bn]){Xt.circle[Bn]=!0;var Nn=Bn*3;if(this._circlesCollide(nn[Nn],nn[Nn+1],nn[Nn+2],zt.x,zt.y,zt.radius)&&(!wt||wt(this.circleKeys[Bn])))return Ge.push(!0),!0}}},or.prototype._forEachCell=function(W,fe,Q,he,Re,Ge,tt,wt){for(var zt=this._convertToXCellCoord(W),Xt=this._convertToYCellCoord(fe),tr=this._convertToXCellCoord(Q),qt=this._convertToYCellCoord(he),Cr=zt;Cr<=tr;Cr++)for(var Ur=Xt;Ur<=qt;Ur++){var Nr=this.xCellCount*Ur+Cr;if(Re.call(this,W,fe,Q,he,Nr,Ge,tt,wt))return}},or.prototype._convertToXCellCoord=function(W){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(W*this.xScale)))},or.prototype._convertToYCellCoord=function(W){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(W*this.yScale)))},or.prototype._circlesCollide=function(W,fe,Q,he,Re,Ge){var tt=he-W,wt=Re-fe,zt=Q+Ge;return zt*zt>tt*tt+wt*wt},or.prototype._circleAndRectCollide=function(W,fe,Q,he,Re,Ge,tt){var wt=(Ge-he)/2,zt=Math.abs(W-(he+wt));if(zt>wt+Q)return!1;var Xt=(tt-Re)/2,tr=Math.abs(fe-(Re+Xt));if(tr>Xt+Q)return!1;if(zt<=wt||tr<=Xt)return!0;var qt=zt-wt,Cr=tr-Xt;return qt*qt+Cr*Cr<=Q*Q};function Lr(ce,W,fe,Q,he){var Re=o.create();return W?(o.scale(Re,Re,[1/he,1/he,1]),fe||o.rotateZ(Re,Re,Q.angle)):o.multiply(Re,Q.labelPlaneMatrix,ce),Re}function Br(ce,W,fe,Q,he){if(W){var Re=o.clone(ce);return o.scale(Re,Re,[he,he,1]),fe||o.rotateZ(Re,Re,-Q.angle),Re}else return Q.glCoordMatrix}function _r(ce,W){var fe=[ce.x,ce.y,0,1];pr(fe,fe,W);var Q=fe[3];return{point:new o.Point(fe[0]/Q,fe[1]/Q),signedDistanceFromCamera:Q}}function Qr(ce,W){return .5+.5*(ce/W)}function un(ce,W){var fe=ce[0]/ce[3],Q=ce[1]/ce[3],he=fe>=-W[0]&&fe<=W[0]&&Q>=-W[1]&&Q<=W[1];return he}function ln(ce,W,fe,Q,he,Re,Ge,tt){var wt=Q?ce.textSizeData:ce.iconSizeData,zt=o.evaluateSizeForZoom(wt,fe.transform.zoom),Xt=[256/fe.width*2+1,256/fe.height*2+1],tr=Q?ce.text.dynamicLayoutVertexArray:ce.icon.dynamicLayoutVertexArray;tr.clear();for(var qt=ce.lineVertexArray,Cr=Q?ce.text.placedSymbolArray:ce.icon.placedSymbolArray,Ur=fe.transform.width/fe.transform.height,Nr=!1,Fr=0;Fr<Cr.length;Fr++){var Gr=Cr.get(Fr);if(Gr.hidden||Gr.writingMode===o.WritingMode.vertical&&!Nr){aa(Gr.numGlyphs,tr);continue}Nr=!1;var nn=[Gr.anchorX,Gr.anchorY,0,1];if(o.transformMat4(nn,nn,W),!un(nn,Xt)){aa(Gr.numGlyphs,tr);continue}var Cn=nn[3],Rn=Qr(fe.transform.cameraToCenterDistance,Cn),Bn=o.evaluateSizeForFeature(wt,zt,Gr),Nn=Ge?Bn/Rn:Bn*Rn,Fn=new o.Point(Gr.anchorX,Gr.anchorY),Vn=_r(Fn,he).point,Zn={},ea=Kn(Gr,Nn,!1,tt,W,he,Re,ce.glyphOffsetArray,qt,tr,Vn,Fn,Zn,Ur);Nr=ea.useVertical,(ea.notEnoughRoom||Nr||ea.needsFlipping&&Kn(Gr,Nn,!0,tt,W,he,Re,ce.glyphOffsetArray,qt,tr,Vn,Fn,Zn,Ur).notEnoughRoom)&&aa(Gr.numGlyphs,tr)}Q?ce.text.dynamicLayoutVertexBuffer.updateData(tr):ce.icon.dynamicLayoutVertexBuffer.updateData(tr)}function Mn(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt){var tr=tt.glyphStartIndex+tt.numGlyphs,qt=tt.lineStartIndex,Cr=tt.lineStartIndex+tt.lineLength,Ur=W.getoffsetX(tt.glyphStartIndex),Nr=W.getoffsetX(tr-1),Fr=na(ce*Ur,fe,Q,he,Re,Ge,tt.segment,qt,Cr,wt,zt,Xt);if(!Fr)return null;var Gr=na(ce*Nr,fe,Q,he,Re,Ge,tt.segment,qt,Cr,wt,zt,Xt);return Gr?{first:Fr,last:Gr}:null}function Dn(ce,W,fe,Q){if(ce===o.WritingMode.horizontal){var he=Math.abs(fe.y-W.y),Re=Math.abs(fe.x-W.x)*Q;if(he>Re)return{useVertical:!0}}return(ce===o.WritingMode.vertical?W.y<fe.y:W.x>fe.x)?{needsFlipping:!0}:null}function Kn(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt,tr,qt,Cr){var Ur=W/24,Nr=ce.lineOffsetX*Ur,Fr=ce.lineOffsetY*Ur,Gr;if(ce.numGlyphs>1){var nn=ce.glyphStartIndex+ce.numGlyphs,Cn=ce.lineStartIndex,Rn=ce.lineStartIndex+ce.lineLength,Bn=Mn(Ur,tt,Nr,Fr,fe,Xt,tr,ce,wt,Re,qt);if(!Bn)return{notEnoughRoom:!0};var Nn=_r(Bn.first.point,Ge).point,Fn=_r(Bn.last.point,Ge).point;if(Q&&!fe){var Vn=Dn(ce.writingMode,Nn,Fn,Cr);if(Vn)return Vn}Gr=[Bn.first];for(var Zn=ce.glyphStartIndex+1;Zn<nn-1;Zn++)Gr.push(na(Ur*tt.getoffsetX(Zn),Nr,Fr,fe,Xt,tr,ce.segment,Cn,Rn,wt,Re,qt));Gr.push(Bn.last)}else{if(Q&&!fe){var ea=_r(tr,he).point,ca=ce.lineStartIndex+ce.segment+1,ia=new o.Point(wt.getx(ca),wt.gety(ca)),Ea=_r(ia,he),Va=Ea.signedDistanceFromCamera>0?Ea.point:sa(tr,ia,ea,1,he),za=Dn(ce.writingMode,ea,Va,Cr);if(za)return za}var ga=na(Ur*tt.getoffsetX(ce.glyphStartIndex),Nr,Fr,fe,Xt,tr,ce.segment,ce.lineStartIndex,ce.lineStartIndex+ce.lineLength,wt,Re,qt);if(!ga)return{notEnoughRoom:!0};Gr=[ga]}for(var Fa=0,Ia=Gr;Fa<Ia.length;Fa+=1){var Ka=Ia[Fa];o.addDynamicAttributes(zt,Ka.point,Ka.angle)}return{}}function sa(ce,W,fe,Q,he){var Re=_r(ce.add(ce.sub(W)._unit()),he).point,Ge=fe.sub(Re);return fe.add(Ge._mult(Q/Ge.mag()))}function na(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt,tr){var qt=Q?ce-W:ce+W,Cr=qt>0?1:-1,Ur=0;Q&&(Cr*=-1,Ur=Math.PI),Cr<0&&(Ur+=Math.PI);for(var Nr=Cr>0?tt+Ge:tt+Ge+1,Fr=he,Gr=he,nn=0,Cn=0,Rn=Math.abs(qt),Bn=[];nn+Cn<=Rn;){if(Nr+=Cr,Nr<tt||Nr>=wt)return null;if(Gr=Fr,Bn.push(Fr),Fr=tr[Nr],Fr===void 0){var Nn=new o.Point(zt.getx(Nr),zt.gety(Nr)),Fn=_r(Nn,Xt);if(Fn.signedDistanceFromCamera>0)Fr=tr[Nr]=Fn.point;else{var Vn=Nr-Cr,Zn=nn===0?Re:new o.Point(zt.getx(Vn),zt.gety(Vn));Fr=sa(Zn,Nn,Gr,Rn-nn+1,Xt)}}nn+=Cn,Cn=Gr.dist(Fr)}var ea=(Rn-nn)/Cn,ca=Fr.sub(Gr),ia=ca.mult(ea)._add(Gr);ia._add(ca._unit()._perp()._mult(fe*Cr));var Ea=Ur+Math.atan2(Fr.y-Gr.y,Fr.x-Gr.x);return Bn.push(ia),{point:ia,angle:Ea,path:Bn}}var Jn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function aa(ce,W){for(var fe=0;fe<ce;fe++){var Q=W.length;W.resize(Q+4),W.float32.set(Jn,Q*3)}}function pr(ce,W,fe){var Q=W[0],he=W[1];return ce[0]=fe[0]*Q+fe[4]*he+fe[12],ce[1]=fe[1]*Q+fe[5]*he+fe[13],ce[3]=fe[3]*Q+fe[7]*he+fe[15],ce}var $r=100,Xr=function(W,fe,Q){fe===void 0&&(fe=new or(W.width+2*$r,W.height+2*$r,25)),Q===void 0&&(Q=new or(W.width+2*$r,W.height+2*$r,25)),this.transform=W,this.grid=fe,this.ignoredGrid=Q,this.pitchfactor=Math.cos(W._pitch)*W.cameraToCenterDistance,this.screenRightBoundary=W.width+$r,this.screenBottomBoundary=W.height+$r,this.gridRightBoundary=W.width+2*$r,this.gridBottomBoundary=W.height+2*$r};Xr.prototype.placeCollisionBox=function(W,fe,Q,he,Re){var Ge=this.projectAndGetPerspectiveRatio(he,W.anchorPointX,W.anchorPointY),tt=Q*Ge.perspectiveRatio,wt=W.x1*tt+Ge.point.x,zt=W.y1*tt+Ge.point.y,Xt=W.x2*tt+Ge.point.x,tr=W.y2*tt+Ge.point.y;return!this.isInsideGrid(wt,zt,Xt,tr)||!fe&&this.grid.hitTest(wt,zt,Xt,tr,Re)?{box:[],offscreen:!1}:{box:[wt,zt,Xt,tr],offscreen:this.isOffscreen(wt,zt,Xt,tr)}},Xr.prototype.placeCollisionCircles=function(W,fe,Q,he,Re,Ge,tt,wt,zt,Xt,tr,qt,Cr){var Ur=[],Nr=new o.Point(fe.anchorX,fe.anchorY),Fr=_r(Nr,Ge),Gr=Qr(this.transform.cameraToCenterDistance,Fr.signedDistanceFromCamera),nn=Xt?Re/Gr:Re*Gr,Cn=nn/o.ONE_EM,Rn=_r(Nr,tt).point,Bn={},Nn=fe.lineOffsetX*Cn,Fn=fe.lineOffsetY*Cn,Vn=Mn(Cn,he,Nn,Fn,!1,Rn,Nr,fe,Q,tt,Bn),Zn=!1,ea=!1,ca=!0;if(Vn){for(var ia=qt*.5*Gr+Cr,Ea=new o.Point(-100,-100),Va=new o.Point(this.screenRightBoundary,this.screenBottomBoundary),za=new xn,ga=Vn.first,Fa=Vn.last,Ia=[],Ka=ga.path.length-1;Ka>=1;Ka--)Ia.push(ga.path[Ka]);for(var Wa=1;Wa<Fa.path.length;Wa++)Ia.push(Fa.path[Wa]);var fi=ia*2.5;if(wt){var Ua=Ia.map(function(Ss){return _r(Ss,wt)});Ua.some(function(Ss){return Ss.signedDistanceFromCamera<=0})?Ia=[]:Ia=Ua.map(function(Ss){return Ss.point})}var ii=[];if(Ia.length>0){for(var ka=Ia[0].clone(),Ha=Ia[0].clone(),Si=1;Si<Ia.length;Si++)ka.x=Math.min(ka.x,Ia[Si].x),ka.y=Math.min(ka.y,Ia[Si].y),Ha.x=Math.max(Ha.x,Ia[Si].x),Ha.y=Math.max(Ha.y,Ia[Si].y);ka.x>=Ea.x&&Ha.x<=Va.x&&ka.y>=Ea.y&&Ha.y<=Va.y?ii=[Ia]:Ha.x<Ea.x||ka.x>Va.x||Ha.y<Ea.y||ka.y>Va.y?ii=[]:ii=o.clipLine([Ia],Ea.x,Ea.y,Va.x,Va.y)}for(var Ji=0,fs=ii;Ji<fs.length;Ji+=1){var cs=fs[Ji];za.reset(cs,ia*.25);var As=0;za.length<=.5*ia?As=1:As=Math.ceil(za.paddedLength/fi)+1;for(var js=0;js<As;js++){var pu=js/Math.max(As-1,1),Ks=za.lerp(pu),Lo=Ks.x+$r,Js=Ks.y+$r;Ur.push(Lo,Js,ia,0);var Uo=Lo-ia,Po=Js-ia,Ms=Lo+ia,Tl=Js+ia;if(ca=ca&&this.isOffscreen(Uo,Po,Ms,Tl),ea=ea||this.isInsideGrid(Uo,Po,Ms,Tl),!W&&this.grid.hitTestCircle(Lo,Js,ia,tr)&&(Zn=!0,!zt))return{circles:[],offscreen:!1,collisionDetected:Zn}}}}return{circles:!zt&&Zn||!ea?[]:Ur,offscreen:ca,collisionDetected:Zn}},Xr.prototype.queryRenderedSymbols=function(W){if(W.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var fe=[],Q=1/0,he=1/0,Re=-1/0,Ge=-1/0,tt=0,wt=W;tt<wt.length;tt+=1){var zt=wt[tt],Xt=new o.Point(zt.x+$r,zt.y+$r);Q=Math.min(Q,Xt.x),he=Math.min(he,Xt.y),Re=Math.max(Re,Xt.x),Ge=Math.max(Ge,Xt.y),fe.push(Xt)}for(var tr=this.grid.query(Q,he,Re,Ge).concat(this.ignoredGrid.query(Q,he,Re,Ge)),qt={},Cr={},Ur=0,Nr=tr;Ur<Nr.length;Ur+=1){var Fr=Nr[Ur],Gr=Fr.key;if(qt[Gr.bucketInstanceId]===void 0&&(qt[Gr.bucketInstanceId]={}),!qt[Gr.bucketInstanceId][Gr.featureIndex]){var nn=[new o.Point(Fr.x1,Fr.y1),new o.Point(Fr.x2,Fr.y1),new o.Point(Fr.x2,Fr.y2),new o.Point(Fr.x1,Fr.y2)];o.polygonIntersectsPolygon(fe,nn)&&(qt[Gr.bucketInstanceId][Gr.featureIndex]=!0,Cr[Gr.bucketInstanceId]===void 0&&(Cr[Gr.bucketInstanceId]=[]),Cr[Gr.bucketInstanceId].push(Gr.featureIndex))}}return Cr},Xr.prototype.insertCollisionBox=function(W,fe,Q,he,Re){var Ge=fe?this.ignoredGrid:this.grid,tt={bucketInstanceId:Q,featureIndex:he,collisionGroupID:Re};Ge.insert(tt,W[0],W[1],W[2],W[3])},Xr.prototype.insertCollisionCircles=function(W,fe,Q,he,Re){for(var Ge=fe?this.ignoredGrid:this.grid,tt={bucketInstanceId:Q,featureIndex:he,collisionGroupID:Re},wt=0;wt<W.length;wt+=4)Ge.insertCircle(tt,W[wt],W[wt+1],W[wt+2])},Xr.prototype.projectAndGetPerspectiveRatio=function(W,fe,Q){var he=[fe,Q,0,1];pr(he,he,W);var Re=new o.Point((he[0]/he[3]+1)/2*this.transform.width+$r,(-he[1]/he[3]+1)/2*this.transform.height+$r);return{point:Re,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/he[3])}},Xr.prototype.isOffscreen=function(W,fe,Q,he){return Q<$r||W>=this.screenRightBoundary||he<$r||fe>this.screenBottomBoundary},Xr.prototype.isInsideGrid=function(W,fe,Q,he){return Q>=0&&W<this.gridRightBoundary&&he>=0&&fe<this.gridBottomBoundary},Xr.prototype.getViewportMatrix=function(){var W=o.identity([]);return o.translate(W,W,[-100,-100,0]),W};function fn(ce,W,fe){return W*(o.EXTENT/(ce.tileSize*Math.pow(2,fe-ce.tileID.overscaledZ)))}var zn=function(W,fe,Q,he){W?this.opacity=Math.max(0,Math.min(1,W.opacity+(W.placed?fe:-fe))):this.opacity=he&&Q?1:0,this.placed=Q};zn.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var pn=function(W,fe,Q,he,Re){this.text=new zn(W?W.text:null,fe,Q,Re),this.icon=new zn(W?W.icon:null,fe,he,Re)};pn.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var gn=function(W,fe,Q){this.text=W,this.icon=fe,this.skipFade=Q},In=function(){this.invProjMatrix=o.create(),this.viewportMatrix=o.create(),this.circles=[]},Gn=function(W,fe,Q,he,Re){this.bucketInstanceId=W,this.featureIndex=fe,this.sourceLayerIndex=Q,this.bucketIndex=he,this.tileID=Re},ua=function(W){this.crossSourceCollisions=W,this.maxGroupID=0,this.collisionGroups={}};ua.prototype.get=function(W){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[W]){var fe=++this.maxGroupID;this.collisionGroups[W]={ID:fe,predicate:function(Q){return Q.collisionGroupID===fe}}}return this.collisionGroups[W]};function Ma(ce,W,fe,Q,he){var Re=o.getAnchorAlignment(ce),Ge=Re.horizontalAlign,tt=Re.verticalAlign,wt=-(Ge-.5)*W,zt=-(tt-.5)*fe,Xt=o.evaluateVariableOffset(ce,Q);return new o.Point(wt+Xt[0]*he,zt+Xt[1]*he)}function xr(ce,W,fe,Q,he,Re){var Ge=ce.x1,tt=ce.x2,wt=ce.y1,zt=ce.y2,Xt=ce.anchorPointX,tr=ce.anchorPointY,qt=new o.Point(W,fe);return Q&&qt._rotate(he?Re:-Re),{x1:Ge+qt.x,y1:wt+qt.y,x2:tt+qt.x,y2:zt+qt.y,anchorPointX:Xt,anchorPointY:tr}}var Rr=function(W,fe,Q,he){this.transform=W.clone(),this.collisionIndex=new Xr(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=fe,this.retainedQueryData={},this.collisionGroups=new ua(Q),this.collisionCircleArrays={},this.prevPlacement=he,he&&(he.prevPlacement=void 0),this.placedOrientations={}};Rr.prototype.getBucketParts=function(W,fe,Q,he){var Re=Q.getBucket(fe),Ge=Q.latestFeatureIndex;if(!(!Re||!Ge||fe.id!==Re.layerIds[0])){var tt=Q.collisionBoxArray,wt=Re.layers[0].layout,zt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Xt=Q.tileSize/o.EXTENT,tr=this.transform.calculatePosMatrix(Q.tileID.toUnwrapped()),qt=wt.get("text-pitch-alignment")==="map",Cr=wt.get("text-rotation-alignment")==="map",Ur=fn(Q,1,this.transform.zoom),Nr=Lr(tr,qt,Cr,this.transform,Ur),Fr=null;if(qt){var Gr=Br(tr,qt,Cr,this.transform,Ur);Fr=o.multiply([],this.transform.labelPlaneMatrix,Gr)}this.retainedQueryData[Re.bucketInstanceId]=new Gn(Re.bucketInstanceId,Ge,Re.sourceLayerIndex,Re.index,Q.tileID);var nn={bucket:Re,layout:wt,posMatrix:tr,textLabelPlaneMatrix:Nr,labelToScreenMatrix:Fr,scale:zt,textPixelRatio:Xt,holdingForFade:Q.holdingForFade(),collisionBoxArray:tt,partiallyEvaluatedTextSize:o.evaluateSizeForZoom(Re.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Re.sourceID)};if(he)for(var Cn=0,Rn=Re.sortKeyRanges;Cn<Rn.length;Cn+=1){var Bn=Rn[Cn],Nn=Bn.sortKey,Fn=Bn.symbolInstanceStart,Vn=Bn.symbolInstanceEnd;W.push({sortKey:Nn,symbolInstanceStart:Fn,symbolInstanceEnd:Vn,parameters:nn})}else W.push({symbolInstanceStart:0,symbolInstanceEnd:Re.symbolInstances.length,parameters:nn})}},Rr.prototype.attemptAnchorPlacement=function(W,fe,Q,he,Re,Ge,tt,wt,zt,Xt,tr,qt,Cr,Ur,Nr){var Fr=[qt.textOffset0,qt.textOffset1],Gr=Ma(W,Q,he,Fr,Re),nn=this.collisionIndex.placeCollisionBox(xr(fe,Gr.x,Gr.y,Ge,tt,this.transform.angle),tr,wt,zt,Xt.predicate);if(Nr){var Cn=this.collisionIndex.placeCollisionBox(xr(Nr,Gr.x,Gr.y,Ge,tt,this.transform.angle),tr,wt,zt,Xt.predicate);if(Cn.box.length===0)return}if(nn.box.length>0){var Rn;return this.prevPlacement&&this.prevPlacement.variableOffsets[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID].text&&(Rn=this.prevPlacement.variableOffsets[qt.crossTileID].anchor),this.variableOffsets[qt.crossTileID]={textOffset:Fr,width:Q,height:he,anchor:W,textBoxScale:Re,prevAnchor:Rn},this.markUsedJustification(Cr,W,qt,Ur),Cr.allowVerticalPlacement&&(this.markUsedOrientation(Cr,Ur,qt),this.placedOrientations[qt.crossTileID]=Ur),{shift:Gr,placedGlyphBoxes:nn}}},Rr.prototype.placeLayerBucketPart=function(W,fe,Q){var he=this,Re=W.parameters,Ge=Re.bucket,tt=Re.layout,wt=Re.posMatrix,zt=Re.textLabelPlaneMatrix,Xt=Re.labelToScreenMatrix,tr=Re.textPixelRatio,qt=Re.holdingForFade,Cr=Re.collisionBoxArray,Ur=Re.partiallyEvaluatedTextSize,Nr=Re.collisionGroup,Fr=tt.get("text-optional"),Gr=tt.get("icon-optional"),nn=tt.get("text-allow-overlap"),Cn=tt.get("icon-allow-overlap"),Rn=tt.get("text-rotation-alignment")==="map",Bn=tt.get("text-pitch-alignment")==="map",Nn=tt.get("icon-text-fit")!=="none",Fn=tt.get("symbol-z-order")==="viewport-y",Vn=nn&&(Cn||!Ge.hasIconData()||Gr),Zn=Cn&&(nn||!Ge.hasTextData()||Fr);!Ge.collisionArrays&&Cr&&Ge.deserializeCollisionBoxes(Cr);var ea=function(ga,Fa){if(!fe[ga.crossTileID]){if(qt){he.placements[ga.crossTileID]=new gn(!1,!1,!1);return}var Ia=!1,Ka=!1,Wa=!0,fi=null,Ua={box:null,offscreen:null},ii={box:null,offscreen:null},ka=null,Ha=null,Si=null,Ji=0,fs=0,cs=0;Fa.textFeatureIndex?Ji=Fa.textFeatureIndex:ga.useRuntimeCollisionCircles&&(Ji=ga.featureIndex),Fa.verticalTextFeatureIndex&&(fs=Fa.verticalTextFeatureIndex);var As=Fa.textBox;if(As){var js=function(Ri){var Vo=o.WritingMode.horizontal;if(Ge.allowVerticalPlacement&&!Ri&&he.prevPlacement){var Ho=he.prevPlacement.placedOrientations[ga.crossTileID];Ho&&(he.placedOrientations[ga.crossTileID]=Ho,Vo=Ho,he.markUsedOrientation(Ge,Vo,ga))}return Vo},pu=function(Ri,Vo){if(Ge.allowVerticalPlacement&&ga.numVerticalGlyphVertices>0&&Fa.verticalTextBox)for(var Ho=0,Bf=Ge.writingModes;Ho<Bf.length;Ho+=1){var lc=Bf[Ho];if(lc===o.WritingMode.vertical?(Ua=Vo(),ii=Ua):Ua=Ri(),Ua&&Ua.box&&Ua.box.length)break}else Ua=Ri()};if(tt.get("text-variable-anchor")){var Uo=tt.get("text-variable-anchor");if(he.prevPlacement&&he.prevPlacement.variableOffsets[ga.crossTileID]){var Po=he.prevPlacement.variableOffsets[ga.crossTileID];Uo.indexOf(Po.anchor)>0&&(Uo=Uo.filter(function(Ri){return Ri!==Po.anchor}),Uo.unshift(Po.anchor))}var Ms=function(Ri,Vo,Ho){for(var Bf=Ri.x2-Ri.x1,lc=Ri.y2-Ri.y1,eh=ga.textBoxScale,th=Nn&&!Cn?Vo:null,Ef={box:[],offscreen:!1},rh=nn?Uo.length*2:Uo.length,Nf=0;Nf<rh;++Nf){var nh=Uo[Nf%Uo.length],ah=Nf>=Uo.length,uc=he.attemptAnchorPlacement(nh,Ri,Bf,lc,eh,Rn,Bn,tr,wt,Nr,ah,ga,Ge,Ho,th);if(uc&&(Ef=uc.placedGlyphBoxes,Ef&&Ef.box&&Ef.box.length)){Ia=!0,fi=uc.shift;break}}return Ef},Tl=function(){return Ms(As,Fa.iconBox,o.WritingMode.horizontal)},Ss=function(){var Ri=Fa.verticalTextBox,Vo=Ua&&Ua.box&&Ua.box.length;return Ge.allowVerticalPlacement&&!Vo&&ga.numVerticalGlyphVertices>0&&Ri?Ms(Ri,Fa.verticalIconBox,o.WritingMode.vertical):{box:null,offscreen:null}};pu(Tl,Ss),Ua&&(Ia=Ua.box,Wa=Ua.offscreen);var kf=js(Ua&&Ua.box);if(!Ia&&he.prevPlacement){var Zu=he.prevPlacement.variableOffsets[ga.crossTileID];Zu&&(he.variableOffsets[ga.crossTileID]=Zu,he.markUsedJustification(Ge,Zu.anchor,ga,kf))}}else{var Ks=function(Ri,Vo){var Ho=he.collisionIndex.placeCollisionBox(Ri,nn,tr,wt,Nr.predicate);return Ho&&Ho.box&&Ho.box.length&&(he.markUsedOrientation(Ge,Vo,ga),he.placedOrientations[ga.crossTileID]=Vo),Ho},Lo=function(){return Ks(As,o.WritingMode.horizontal)},Js=function(){var Ri=Fa.verticalTextBox;return Ge.allowVerticalPlacement&&ga.numVerticalGlyphVertices>0&&Ri?Ks(Ri,o.WritingMode.vertical):{box:null,offscreen:null}};pu(Lo,Js),js(Ua&&Ua.box&&Ua.box.length)}}if(ka=Ua,Ia=ka&&ka.box&&ka.box.length>0,Wa=ka&&ka.offscreen,ga.useRuntimeCollisionCircles){var eo=Ge.text.placedSymbolArray.get(ga.centerJustifiedTextSymbolIndex),_f=o.evaluateSizeForFeature(Ge.textSizeData,Ur,eo),Sf=tt.get("text-padding"),go=ga.collisionCircleDiameter;Ha=he.collisionIndex.placeCollisionCircles(nn,eo,Ge.lineVertexArray,Ge.glyphOffsetArray,_f,wt,zt,Xt,Q,Bn,Nr.predicate,go,Sf),Ia=nn||Ha.circles.length>0&&!Ha.collisionDetected,Wa=Wa&&Ha.offscreen}if(Fa.iconFeatureIndex&&(cs=Fa.iconFeatureIndex),Fa.iconBox){var ju=function(Ri){var Vo=Nn&&fi?xr(Ri,fi.x,fi.y,Rn,Bn,he.transform.angle):Ri;return he.collisionIndex.placeCollisionBox(Vo,Cn,tr,wt,Nr.predicate)};ii&&ii.box&&ii.box.length&&Fa.verticalIconBox?(Si=ju(Fa.verticalIconBox),Ka=Si.box.length>0):(Si=ju(Fa.iconBox),Ka=Si.box.length>0),Wa=Wa&&Si.offscreen}var zf=Fr||ga.numHorizontalGlyphVertices===0&&ga.numVerticalGlyphVertices===0,Ff=Gr||ga.numIconVertices===0;if(!zf&&!Ff?Ka=Ia=Ka&&Ia:Ff?zf||(Ka=Ka&&Ia):Ia=Ka&&Ia,Ia&&ka&&ka.box&&(ii&&ii.box&&fs?he.collisionIndex.insertCollisionBox(ka.box,tt.get("text-ignore-placement"),Ge.bucketInstanceId,fs,Nr.ID):he.collisionIndex.insertCollisionBox(ka.box,tt.get("text-ignore-placement"),Ge.bucketInstanceId,Ji,Nr.ID)),Ka&&Si&&he.collisionIndex.insertCollisionBox(Si.box,tt.get("icon-ignore-placement"),Ge.bucketInstanceId,cs,Nr.ID),Ha&&(Ia&&he.collisionIndex.insertCollisionCircles(Ha.circles,tt.get("text-ignore-placement"),Ge.bucketInstanceId,Ji,Nr.ID),Q)){var Of=Ge.bucketInstanceId,Ku=he.collisionCircleArrays[Of];Ku===void 0&&(Ku=he.collisionCircleArrays[Of]=new In);for(var Ju=0;Ju<Ha.circles.length;Ju+=4)Ku.circles.push(Ha.circles[Ju+0]),Ku.circles.push(Ha.circles[Ju+1]),Ku.circles.push(Ha.circles[Ju+2]),Ku.circles.push(Ha.collisionDetected?1:0)}he.placements[ga.crossTileID]=new gn(Ia||Vn,Ka||Zn,Wa||Ge.justReloaded),fe[ga.crossTileID]=!0}};if(Fn)for(var ca=Ge.getSortedSymbolIndexes(this.transform.angle),ia=ca.length-1;ia>=0;--ia){var Ea=ca[ia];ea(Ge.symbolInstances.get(Ea),Ge.collisionArrays[Ea])}else for(var Va=W.symbolInstanceStart;Va<W.symbolInstanceEnd;Va++)ea(Ge.symbolInstances.get(Va),Ge.collisionArrays[Va]);if(Q&&Ge.bucketInstanceId in this.collisionCircleArrays){var za=this.collisionCircleArrays[Ge.bucketInstanceId];o.invert(za.invProjMatrix,wt),za.viewportMatrix=this.collisionIndex.getViewportMatrix()}Ge.justReloaded=!1},Rr.prototype.markUsedJustification=function(W,fe,Q,he){var Re={left:Q.leftJustifiedTextSymbolIndex,center:Q.centerJustifiedTextSymbolIndex,right:Q.rightJustifiedTextSymbolIndex},Ge;he===o.WritingMode.vertical?Ge=Q.verticalPlacedTextSymbolIndex:Ge=Re[o.getAnchorJustification(fe)];for(var tt=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex,Q.verticalPlacedTextSymbolIndex],wt=0,zt=tt;wt<zt.length;wt+=1){var Xt=zt[wt];Xt>=0&&(Ge>=0&&Xt!==Ge?W.text.placedSymbolArray.get(Xt).crossTileID=0:W.text.placedSymbolArray.get(Xt).crossTileID=Q.crossTileID)}},Rr.prototype.markUsedOrientation=function(W,fe,Q){for(var he=fe===o.WritingMode.horizontal||fe===o.WritingMode.horizontalOnly?fe:0,Re=fe===o.WritingMode.vertical?fe:0,Ge=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex],tt=0,wt=Ge;tt<wt.length;tt+=1){var zt=wt[tt];W.text.placedSymbolArray.get(zt).placedOrientation=he}Q.verticalPlacedTextSymbolIndex&&(W.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=Re)},Rr.prototype.commit=function(W){this.commitTime=W,this.zoomAtLastRecencyCheck=this.transform.zoom;var fe=this.prevPlacement,Q=!1;this.prevZoomAdjustment=fe?fe.zoomAdjustment(this.transform.zoom):0;var he=fe?fe.symbolFadeChange(W):1,Re=fe?fe.opacities:{},Ge=fe?fe.variableOffsets:{},tt=fe?fe.placedOrientations:{};for(var wt in this.placements){var zt=this.placements[wt],Xt=Re[wt];Xt?(this.opacities[wt]=new pn(Xt,he,zt.text,zt.icon),Q=Q||zt.text!==Xt.text.placed||zt.icon!==Xt.icon.placed):(this.opacities[wt]=new pn(null,he,zt.text,zt.icon,zt.skipFade),Q=Q||zt.text||zt.icon)}for(var tr in Re){var qt=Re[tr];if(!this.opacities[tr]){var Cr=new pn(qt,he,!1,!1);Cr.isHidden()||(this.opacities[tr]=Cr,Q=Q||qt.text.placed||qt.icon.placed)}}for(var Ur in Ge)!this.variableOffsets[Ur]&&this.opacities[Ur]&&!this.opacities[Ur].isHidden()&&(this.variableOffsets[Ur]=Ge[Ur]);for(var Nr in tt)!this.placedOrientations[Nr]&&this.opacities[Nr]&&!this.opacities[Nr].isHidden()&&(this.placedOrientations[Nr]=tt[Nr]);Q?this.lastPlacementChangeTime=W:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=fe?fe.lastPlacementChangeTime:W)},Rr.prototype.updateLayerOpacities=function(W,fe){for(var Q={},he=0,Re=fe;he<Re.length;he+=1){var Ge=Re[he],tt=Ge.getBucket(W);tt&&Ge.latestFeatureIndex&&W.id===tt.layerIds[0]&&this.updateBucketOpacities(tt,Q,Ge.collisionBoxArray)}},Rr.prototype.updateBucketOpacities=function(W,fe,Q){var he=this;W.hasTextData()&&W.text.opacityVertexArray.clear(),W.hasIconData()&&W.icon.opacityVertexArray.clear(),W.hasIconCollisionBoxData()&&W.iconCollisionBox.collisionVertexArray.clear(),W.hasTextCollisionBoxData()&&W.textCollisionBox.collisionVertexArray.clear();var Re=W.layers[0].layout,Ge=new pn(null,0,!1,!1,!0),tt=Re.get("text-allow-overlap"),wt=Re.get("icon-allow-overlap"),zt=Re.get("text-variable-anchor"),Xt=Re.get("text-rotation-alignment")==="map",tr=Re.get("text-pitch-alignment")==="map",qt=Re.get("icon-text-fit")!=="none",Cr=new pn(null,0,tt&&(wt||!W.hasIconData()||Re.get("icon-optional")),wt&&(tt||!W.hasTextData()||Re.get("text-optional")),!0);!W.collisionArrays&&Q&&(W.hasIconCollisionBoxData()||W.hasTextCollisionBoxData())&&W.deserializeCollisionBoxes(Q);for(var Ur=function(nn,Cn,Rn){for(var Bn=0;Bn<Cn/4;Bn++)nn.opacityVertexArray.emplaceBack(Rn)},Nr=function(nn){var Cn=W.symbolInstances.get(nn),Rn=Cn.numHorizontalGlyphVertices,Bn=Cn.numVerticalGlyphVertices,Nn=Cn.crossTileID,Fn=fe[Nn],Vn=he.opacities[Nn];Fn?Vn=Ge:Vn||(Vn=Cr,he.opacities[Nn]=Vn),fe[Nn]=!0;var Zn=Rn>0||Bn>0,ea=Cn.numIconVertices>0,ca=he.placedOrientations[Cn.crossTileID],ia=ca===o.WritingMode.vertical,Ea=ca===o.WritingMode.horizontal||ca===o.WritingMode.horizontalOnly;if(Zn){var Va=zr(Vn.text),za=ia?Yr:Va;Ur(W.text,Rn,za);var ga=Ea?Yr:Va;Ur(W.text,Bn,ga);var Fa=Vn.text.isHidden();[Cn.rightJustifiedTextSymbolIndex,Cn.centerJustifiedTextSymbolIndex,Cn.leftJustifiedTextSymbolIndex].forEach(function(cs){cs>=0&&(W.text.placedSymbolArray.get(cs).hidden=Fa||ia?1:0)}),Cn.verticalPlacedTextSymbolIndex>=0&&(W.text.placedSymbolArray.get(Cn.verticalPlacedTextSymbolIndex).hidden=Fa||Ea?1:0);var Ia=he.variableOffsets[Cn.crossTileID];Ia&&he.markUsedJustification(W,Ia.anchor,Cn,ca);var Ka=he.placedOrientations[Cn.crossTileID];Ka&&(he.markUsedJustification(W,"left",Cn,Ka),he.markUsedOrientation(W,Ka,Cn))}if(ea){var Wa=zr(Vn.icon),fi=!(qt&&Cn.verticalPlacedIconSymbolIndex&&ia);if(Cn.placedIconSymbolIndex>=0){var Ua=fi?Wa:Yr;Ur(W.icon,Cn.numIconVertices,Ua),W.icon.placedSymbolArray.get(Cn.placedIconSymbolIndex).hidden=Vn.icon.isHidden()}if(Cn.verticalPlacedIconSymbolIndex>=0){var ii=fi?Yr:Wa;Ur(W.icon,Cn.numVerticalIconVertices,ii),W.icon.placedSymbolArray.get(Cn.verticalPlacedIconSymbolIndex).hidden=Vn.icon.isHidden()}}if(W.hasIconCollisionBoxData()||W.hasTextCollisionBoxData()){var ka=W.collisionArrays[nn];if(ka){var Ha=new o.Point(0,0);if(ka.textBox||ka.verticalTextBox){var Si=!0;if(zt){var Ji=he.variableOffsets[Nn];Ji?(Ha=Ma(Ji.anchor,Ji.width,Ji.height,Ji.textOffset,Ji.textBoxScale),Xt&&Ha._rotate(tr?he.transform.angle:-he.transform.angle)):Si=!1}ka.textBox&&yr(W.textCollisionBox.collisionVertexArray,Vn.text.placed,!Si||ia,Ha.x,Ha.y),ka.verticalTextBox&&yr(W.textCollisionBox.collisionVertexArray,Vn.text.placed,!Si||Ea,Ha.x,Ha.y)}var fs=!!(!Ea&&ka.verticalIconBox);ka.iconBox&&yr(W.iconCollisionBox.collisionVertexArray,Vn.icon.placed,fs,qt?Ha.x:0,qt?Ha.y:0),ka.verticalIconBox&&yr(W.iconCollisionBox.collisionVertexArray,Vn.icon.placed,!fs,qt?Ha.x:0,qt?Ha.y:0)}}},Fr=0;Fr<W.symbolInstances.length;Fr++)Nr(Fr);if(W.sortFeatures(this.transform.angle),this.retainedQueryData[W.bucketInstanceId]&&(this.retainedQueryData[W.bucketInstanceId].featureSortOrder=W.featureSortOrder),W.hasTextData()&&W.text.opacityVertexBuffer&&W.text.opacityVertexBuffer.updateData(W.text.opacityVertexArray),W.hasIconData()&&W.icon.opacityVertexBuffer&&W.icon.opacityVertexBuffer.updateData(W.icon.opacityVertexArray),W.hasIconCollisionBoxData()&&W.iconCollisionBox.collisionVertexBuffer&&W.iconCollisionBox.collisionVertexBuffer.updateData(W.iconCollisionBox.collisionVertexArray),W.hasTextCollisionBoxData()&&W.textCollisionBox.collisionVertexBuffer&&W.textCollisionBox.collisionVertexBuffer.updateData(W.textCollisionBox.collisionVertexArray),W.bucketInstanceId in this.collisionCircleArrays){var Gr=this.collisionCircleArrays[W.bucketInstanceId];W.placementInvProjMatrix=Gr.invProjMatrix,W.placementViewportMatrix=Gr.viewportMatrix,W.collisionCircleArray=Gr.circles,delete this.collisionCircleArrays[W.bucketInstanceId]}},Rr.prototype.symbolFadeChange=function(W){return this.fadeDuration===0?1:(W-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Rr.prototype.zoomAdjustment=function(W){return Math.max(0,(this.transform.zoom-W)/1.5)},Rr.prototype.hasTransitions=function(W){return this.stale||W-this.lastPlacementChangeTime<this.fadeDuration},Rr.prototype.stillRecent=function(W,fe){var Q=this.zoomAtLastRecencyCheck===fe?1-this.zoomAdjustment(fe):1;return this.zoomAtLastRecencyCheck=fe,this.commitTime+this.fadeDuration*Q>W},Rr.prototype.setStale=function(){this.stale=!0};function yr(ce,W,fe,Q,he){ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0),ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0),ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0),ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0)}var Dr=Math.pow(2,25),vn=Math.pow(2,24),En=Math.pow(2,17),an=Math.pow(2,16),en=Math.pow(2,9),br=Math.pow(2,8),Vr=Math.pow(2,1);function zr(ce){if(ce.opacity===0&&!ce.placed)return 0;if(ce.opacity===1&&ce.placed)return 4294967295;var W=ce.placed?1:0,fe=Math.floor(ce.opacity*127);return fe*Dr+W*vn+fe*En+W*an+fe*en+W*br+fe*Vr+W}var Yr=0,dn=function(W){this._sortAcrossTiles=W.layout.get("symbol-z-order")!=="viewport-y"&&W.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};dn.prototype.continuePlacement=function(W,fe,Q,he,Re){for(var Ge=this._bucketParts;this._currentTileIndex<W.length;){var tt=W[this._currentTileIndex];if(fe.getBucketParts(Ge,he,tt,this._sortAcrossTiles),this._currentTileIndex++,Re())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Ge.sort(function(zt,Xt){return zt.sortKey-Xt.sortKey}));this._currentPartIndex<Ge.length;){var wt=Ge[this._currentPartIndex];if(fe.placeLayerBucketPart(wt,this._seenCrossTileIDs,Q),this._currentPartIndex++,Re())return!0}return!1};var wn=function(W,fe,Q,he,Re,Ge,tt){this.placement=new Rr(W,Re,Ge,tt),this._currentPlacementIndex=fe.length-1,this._forceFullPlacement=Q,this._showCollisionBoxes=he,this._done=!1};wn.prototype.isDone=function(){return this._done},wn.prototype.continuePlacement=function(W,fe,Q){for(var he=this,Re=o.browser.now(),Ge=function(){var tr=o.browser.now()-Re;return he._forceFullPlacement?!1:tr>2};this._currentPlacementIndex>=0;){var tt=W[this._currentPlacementIndex],wt=fe[tt],zt=this.placement.collisionIndex.transform.zoom;if(wt.type==="symbol"&&(!wt.minzoom||wt.minzoom<=zt)&&(!wt.maxzoom||wt.maxzoom>zt)){this._inProgressLayer||(this._inProgressLayer=new dn(wt));var Xt=this._inProgressLayer.continuePlacement(Q[wt.source],this.placement,this._showCollisionBoxes,wt,Ge);if(Xt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},wn.prototype.commit=function(W){return this.placement.commit(W),this.placement};var Tn=512/o.EXTENT/2,kn=function(W,fe,Q){this.tileID=W,this.indexedSymbolInstances={},this.bucketInstanceId=Q;for(var he=0;he<fe.length;he++){var Re=fe.get(he),Ge=Re.key;this.indexedSymbolInstances[Ge]||(this.indexedSymbolInstances[Ge]=[]),this.indexedSymbolInstances[Ge].push({crossTileID:Re.crossTileID,coord:this.getScaledCoordinates(Re,W)})}};kn.prototype.getScaledCoordinates=function(W,fe){var Q=fe.canonical.z-this.tileID.canonical.z,he=Tn/Math.pow(2,Q);return{x:Math.floor((fe.canonical.x*o.EXTENT+W.anchorX)*he),y:Math.floor((fe.canonical.y*o.EXTENT+W.anchorY)*he)}},kn.prototype.findMatches=function(W,fe,Q){for(var he=this.tileID.canonical.z<fe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-fe.canonical.z),Re=0;Re<W.length;Re++){var Ge=W.get(Re);if(!Ge.crossTileID){var tt=this.indexedSymbolInstances[Ge.key];if(tt)for(var wt=this.getScaledCoordinates(Ge,fe),zt=0,Xt=tt;zt<Xt.length;zt+=1){var tr=Xt[zt];if(Math.abs(tr.coord.x-wt.x)<=he&&Math.abs(tr.coord.y-wt.y)<=he&&!Q[tr.crossTileID]){Q[tr.crossTileID]=!0,Ge.crossTileID=tr.crossTileID;break}}}}};var Pn=function(){this.maxCrossTileID=0};Pn.prototype.generate=function(){return++this.maxCrossTileID};var fa=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};fa.prototype.handleWrapJump=function(W){var fe=Math.round((W-this.lng)/360);if(fe!==0)for(var Q in this.indexes){var he=this.indexes[Q],Re={};for(var Ge in he){var tt=he[Ge];tt.tileID=tt.tileID.unwrapTo(tt.tileID.wrap+fe),Re[tt.tileID.key]=tt}this.indexes[Q]=Re}this.lng=W},fa.prototype.addBucket=function(W,fe,Q){if(this.indexes[W.overscaledZ]&&this.indexes[W.overscaledZ][W.key]){if(this.indexes[W.overscaledZ][W.key].bucketInstanceId===fe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(W.overscaledZ,this.indexes[W.overscaledZ][W.key])}for(var he=0;he<fe.symbolInstances.length;he++){var Re=fe.symbolInstances.get(he);Re.crossTileID=0}this.usedCrossTileIDs[W.overscaledZ]||(this.usedCrossTileIDs[W.overscaledZ]={});var Ge=this.usedCrossTileIDs[W.overscaledZ];for(var tt in this.indexes){var wt=this.indexes[tt];if(Number(tt)>W.overscaledZ)for(var zt in wt){var Xt=wt[zt];Xt.tileID.isChildOf(W)&&Xt.findMatches(fe.symbolInstances,W,Ge)}else{var tr=W.scaledTo(Number(tt)),qt=wt[tr.key];qt&&qt.findMatches(fe.symbolInstances,W,Ge)}}for(var Cr=0;Cr<fe.symbolInstances.length;Cr++){var Ur=fe.symbolInstances.get(Cr);Ur.crossTileID||(Ur.crossTileID=Q.generate(),Ge[Ur.crossTileID]=!0)}return this.indexes[W.overscaledZ]===void 0&&(this.indexes[W.overscaledZ]={}),this.indexes[W.overscaledZ][W.key]=new kn(W,fe.symbolInstances,fe.bucketInstanceId),!0},fa.prototype.removeBucketCrossTileIDs=function(W,fe){for(var Q in fe.indexedSymbolInstances)for(var he=0,Re=fe.indexedSymbolInstances[Q];he<Re.length;he+=1){var Ge=Re[he];delete this.usedCrossTileIDs[W][Ge.crossTileID]}},fa.prototype.removeStaleBuckets=function(W){var fe=!1;for(var Q in this.indexes){var he=this.indexes[Q];for(var Re in he)W[he[Re].bucketInstanceId]||(this.removeBucketCrossTileIDs(Q,he[Re]),delete he[Re],fe=!0)}return fe};var $n=function(){this.layerIndexes={},this.crossTileIDs=new Pn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};$n.prototype.addLayer=function(W,fe,Q){var he=this.layerIndexes[W.id];he===void 0&&(he=this.layerIndexes[W.id]=new fa);var Re=!1,Ge={};he.handleWrapJump(Q);for(var tt=0,wt=fe;tt<wt.length;tt+=1){var zt=wt[tt],Xt=zt.getBucket(W);!Xt||W.id!==Xt.layerIds[0]||(Xt.bucketInstanceId||(Xt.bucketInstanceId=++this.maxBucketInstanceId),he.addBucket(zt.tileID,Xt,this.crossTileIDs)&&(Re=!0),Ge[Xt.bucketInstanceId]=!0)}return he.removeStaleBuckets(Ge)&&(Re=!0),Re},$n.prototype.pruneUnusedLayers=function(W){var fe={};W.forEach(function(he){fe[he]=!0});for(var Q in this.layerIndexes)fe[Q]||delete this.layerIndexes[Q]};var la=function(ce,W){return o.emitValidationErrors(ce,W&&W.filter(function(fe){return fe.identifier!=="source.canvas"}))},ba=o.pick(Dt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),ni=o.pick(Dt,["setCenter","setZoom","setBearing","setPitch"]),Xa=Kt(),uo=function(ce){function W(fe,Q){var he=this;Q===void 0&&(Q={}),ce.call(this),this.map=fe,this.dispatcher=new I(Rt(),this),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new S(fe._requestManager,Q.localIdeographFontFamily),this.lineAtlas=new k(256,512),this.crossTileSymbolIndex=new $n,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new o.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",o.getReferrer());var Re=this;this._rtlTextPluginCallback=W.registerForPluginStateChange(function(Ge){var tt={pluginStatus:Ge.pluginStatus,pluginURL:Ge.pluginURL};Re.dispatcher.broadcast("syncRTLPluginState",tt,function(wt,zt){if(o.triggerPluginCompletionEvent(wt),zt){var Xt=zt.every(function(qt){return qt});if(Xt)for(var tr in Re.sourceCaches)Re.sourceCaches[tr].reload()}})}),this.on("data",function(Ge){if(!(Ge.dataType!=="source"||Ge.sourceDataType!=="metadata")){var tt=he.sourceCaches[Ge.sourceId];if(tt){var wt=tt.getSource();if(!(!wt||!wt.vectorLayerIds))for(var zt in he._layers){var Xt=he._layers[zt];Xt.source===wt.id&&he._validateLayer(Xt)}}}})}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.loadURL=function(Q,he){var Re=this;he===void 0&&(he={}),this.fire(new o.Event("dataloading",{dataType:"style"}));var Ge=typeof he.validate=="boolean"?he.validate:!o.isMapboxURL(Q);Q=this.map._requestManager.normalizeStyleURL(Q,he.accessToken);var tt=this.map._requestManager.transformRequest(Q,o.ResourceType.Style);this._request=o.getJSON(tt,function(wt,zt){Re._request=null,wt?Re.fire(new o.ErrorEvent(wt)):zt&&Re._load(zt,Ge)})},W.prototype.loadJSON=function(Q,he){var Re=this;he===void 0&&(he={}),this.fire(new o.Event("dataloading",{dataType:"style"})),this._request=o.browser.frame(function(){Re._request=null,Re._load(Q,he.validate!==!1)})},W.prototype.loadEmpty=function(){this.fire(new o.Event("dataloading",{dataType:"style"})),this._load(Xa,!1)},W.prototype._load=function(Q,he){if(!(he&&la(this,o.validateStyle(Q)))){this._loaded=!0,this.stylesheet=Q;for(var Re in Q.sources)this.addSource(Re,Q.sources[Re],{validate:!1});Q.sprite?this._loadSprite(Q.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Q.glyphs);var Ge=rr(this.stylesheet.layers);this._order=Ge.map(function(Xt){return Xt.id}),this._layers={},this._serializedLayers={};for(var tt=0,wt=Ge;tt<wt.length;tt+=1){var zt=wt[tt];zt=o.createStyleLayer(zt),zt.setEventedParent(this,{layer:{id:zt.id}}),this._layers[zt.id]=zt,this._serializedLayers[zt.id]=zt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new x(this.stylesheet.light),this.fire(new o.Event("data",{dataType:"style"})),this.fire(new o.Event("style.load"))}},W.prototype._loadSprite=function(Q){var he=this;this._spriteRequest=l(Q,this.map._requestManager,function(Re,Ge){if(he._spriteRequest=null,Re)he.fire(new o.ErrorEvent(Re));else if(Ge)for(var tt in Ge)he.imageManager.addImage(tt,Ge[tt]);he.imageManager.setLoaded(!0),he._availableImages=he.imageManager.listImages(),he.dispatcher.broadcast("setImages",he._availableImages),he.fire(new o.Event("data",{dataType:"style"}))})},W.prototype._validateLayer=function(Q){var he=this.sourceCaches[Q.source];if(he){var Re=Q.sourceLayer;if(Re){var Ge=he.getSource();(Ge.type==="geojson"||Ge.vectorLayerIds&&Ge.vectorLayerIds.indexOf(Re)===-1)&&this.fire(new o.ErrorEvent(new Error('Source layer "'+Re+'" does not exist on source "'+Ge.id+'" as specified by style layer "'+Q.id+'"')))}}},W.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var Q in this.sourceCaches)if(!this.sourceCaches[Q].loaded())return!1;return!!this.imageManager.isLoaded()},W.prototype._serializeLayers=function(Q){for(var he=[],Re=0,Ge=Q;Re<Ge.length;Re+=1){var tt=Ge[Re],wt=this._layers[tt];wt.type!=="custom"&&he.push(wt.serialize())}return he},W.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var Q in this.sourceCaches)if(this.sourceCaches[Q].hasTransition())return!0;for(var he in this._layers)if(this._layers[he].hasTransition())return!0;return!1},W.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},W.prototype.update=function(Q){if(this._loaded){var he=this._changed;if(this._changed){var Re=Object.keys(this._updatedLayers),Ge=Object.keys(this._removedLayers);(Re.length||Ge.length)&&this._updateWorkerLayers(Re,Ge);for(var tt in this._updatedSources){var wt=this._updatedSources[tt];wt==="reload"?this._reloadSource(tt):wt==="clear"&&this._clearSource(tt)}this._updateTilesForChangedImages();for(var zt in this._updatedPaintProps)this._layers[zt].updateTransitions(Q);this.light.updateTransitions(Q),this._resetUpdates()}var Xt={};for(var tr in this.sourceCaches){var qt=this.sourceCaches[tr];Xt[tr]=qt.used,qt.used=!1}for(var Cr=0,Ur=this._order;Cr<Ur.length;Cr+=1){var Nr=Ur[Cr],Fr=this._layers[Nr];Fr.recalculate(Q,this._availableImages),!Fr.isHidden(Q.zoom)&&Fr.source&&(this.sourceCaches[Fr.source].used=!0)}for(var Gr in Xt){var nn=this.sourceCaches[Gr];Xt[Gr]!==nn.used&&nn.fire(new o.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:Gr}))}this.light.recalculate(Q),this.z=Q.zoom,he&&this.fire(new o.Event("data",{dataType:"style"}))}},W.prototype._updateTilesForChangedImages=function(){var Q=Object.keys(this._changedImages);if(Q.length){for(var he in this.sourceCaches)this.sourceCaches[he].reloadTilesForDependencies(["icons","patterns"],Q);this._changedImages={}}},W.prototype._updateWorkerLayers=function(Q,he){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(Q),removedIds:he})},W.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},W.prototype.setState=function(Q){var he=this;if(this._checkLoaded(),la(this,o.validateStyle(Q)))return!1;Q=o.clone$1(Q),Q.layers=rr(Q.layers);var Re=bn(this.serialize(),Q).filter(function(tt){return!(tt.command in ni)});if(Re.length===0)return!1;var Ge=Re.filter(function(tt){return!(tt.command in ba)});if(Ge.length>0)throw new Error("Unimplemented: "+Ge.map(function(tt){return tt.command}).join(", ")+".");return Re.forEach(function(tt){tt.command!=="setTransition"&&he[tt.command].apply(he,tt.args)}),this.stylesheet=Q,!0},W.prototype.addImage=function(Q,he){if(this.getImage(Q))return this.fire(new o.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(Q,he),this._afterImageUpdated(Q)},W.prototype.updateImage=function(Q,he){this.imageManager.updateImage(Q,he)},W.prototype.getImage=function(Q){return this.imageManager.getImage(Q)},W.prototype.removeImage=function(Q){if(!this.getImage(Q))return this.fire(new o.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(Q),this._afterImageUpdated(Q)},W.prototype._afterImageUpdated=function(Q){this._availableImages=this.imageManager.listImages(),this._changedImages[Q]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))},W.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},W.prototype.addSource=function(Q,he,Re){var Ge=this;if(Re===void 0&&(Re={}),this._checkLoaded(),this.sourceCaches[Q]!==void 0)throw new Error("There is already a source with this ID");if(!he.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(he).join(", ")+".");var tt=["vector","raster","geojson","video","image"],wt=tt.indexOf(he.type)>=0;if(!(wt&&this._validate(o.validateStyle.source,"sources."+Q,he,null,Re))){this.map&&this.map._collectResourceTiming&&(he.collectResourceTiming=!0);var zt=this.sourceCaches[Q]=new _t(Q,he,this.dispatcher);zt.style=this,zt.setEventedParent(this,function(){return{isSourceLoaded:Ge.loaded(),source:zt.serialize(),sourceId:Q}}),zt.onAdd(this.map),this._changed=!0}},W.prototype.removeSource=function(Q){if(this._checkLoaded(),this.sourceCaches[Q]===void 0)throw new Error("There is no source with this ID");for(var he in this._layers)if(this._layers[he].source===Q)return this.fire(new o.ErrorEvent(new Error('Source "'+Q+'" cannot be removed while layer "'+he+'" is using it.')));var Re=this.sourceCaches[Q];delete this.sourceCaches[Q],delete this._updatedSources[Q],Re.fire(new o.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:Q})),Re.setEventedParent(null),Re.clearTiles(),Re.onRemove&&Re.onRemove(this.map),this._changed=!0},W.prototype.setGeoJSONSourceData=function(Q,he){this._checkLoaded();var Re=this.sourceCaches[Q].getSource();Re.setData(he),this._changed=!0},W.prototype.getSource=function(Q){return this.sourceCaches[Q]&&this.sourceCaches[Q].getSource()},W.prototype.addLayer=function(Q,he,Re){Re===void 0&&(Re={}),this._checkLoaded();var Ge=Q.id;if(this.getLayer(Ge)){this.fire(new o.ErrorEvent(new Error('Layer with id "'+Ge+'" already exists on this map')));return}var tt;if(Q.type==="custom"){if(la(this,o.validateCustomStyleLayer(Q)))return;tt=o.createStyleLayer(Q)}else{if(typeof Q.source=="object"&&(this.addSource(Ge,Q.source),Q=o.clone$1(Q),Q=o.extend(Q,{source:Ge})),this._validate(o.validateStyle.layer,"layers."+Ge,Q,{arrayIndex:-1},Re))return;tt=o.createStyleLayer(Q),this._validateLayer(tt),tt.setEventedParent(this,{layer:{id:Ge}}),this._serializedLayers[tt.id]=tt.serialize()}var wt=he?this._order.indexOf(he):this._order.length;if(he&&wt===-1){this.fire(new o.ErrorEvent(new Error('Layer with id "'+he+'" does not exist on this map.')));return}if(this._order.splice(wt,0,Ge),this._layerOrderChanged=!0,this._layers[Ge]=tt,this._removedLayers[Ge]&&tt.source&&tt.type!=="custom"){var zt=this._removedLayers[Ge];delete this._removedLayers[Ge],zt.type!==tt.type?this._updatedSources[tt.source]="clear":(this._updatedSources[tt.source]="reload",this.sourceCaches[tt.source].pause())}this._updateLayer(tt),tt.onAdd&&tt.onAdd(this.map)},W.prototype.moveLayer=function(Q,he){this._checkLoaded(),this._changed=!0;var Re=this._layers[Q];if(!Re){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be moved.")));return}if(Q!==he){var Ge=this._order.indexOf(Q);this._order.splice(Ge,1);var tt=he?this._order.indexOf(he):this._order.length;if(he&&tt===-1){this.fire(new o.ErrorEvent(new Error('Layer with id "'+he+'" does not exist on this map.')));return}this._order.splice(tt,0,Q),this._layerOrderChanged=!0}},W.prototype.removeLayer=function(Q){this._checkLoaded();var he=this._layers[Q];if(!he){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be removed.")));return}he.setEventedParent(null);var Re=this._order.indexOf(Q);this._order.splice(Re,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[Q]=he,delete this._layers[Q],delete this._serializedLayers[Q],delete this._updatedLayers[Q],delete this._updatedPaintProps[Q],he.onRemove&&he.onRemove(this.map)},W.prototype.getLayer=function(Q){return this._layers[Q]},W.prototype.hasLayer=function(Q){return Q in this._layers},W.prototype.setLayerZoomRange=function(Q,he,Re){this._checkLoaded();var Ge=this.getLayer(Q);if(!Ge){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot have zoom extent.")));return}Ge.minzoom===he&&Ge.maxzoom===Re||(he!=null&&(Ge.minzoom=he),Re!=null&&(Ge.maxzoom=Re),this._updateLayer(Ge))},W.prototype.setFilter=function(Q,he,Re){Re===void 0&&(Re={}),this._checkLoaded();var Ge=this.getLayer(Q);if(!Ge){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be filtered.")));return}if(!o.deepEqual(Ge.filter,he)){if(he==null){Ge.filter=void 0,this._updateLayer(Ge);return}this._validate(o.validateStyle.filter,"layers."+Ge.id+".filter",he,null,Re)||(Ge.filter=o.clone$1(he),this._updateLayer(Ge))}},W.prototype.getFilter=function(Q){return o.clone$1(this.getLayer(Q).filter)},W.prototype.setLayoutProperty=function(Q,he,Re,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var tt=this.getLayer(Q);if(!tt){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be styled.")));return}o.deepEqual(tt.getLayoutProperty(he),Re)||(tt.setLayoutProperty(he,Re,Ge),this._updateLayer(tt))},W.prototype.getLayoutProperty=function(Q,he){var Re=this.getLayer(Q);if(!Re){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style.")));return}return Re.getLayoutProperty(he)},W.prototype.setPaintProperty=function(Q,he,Re,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var tt=this.getLayer(Q);if(!tt){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be styled.")));return}if(!o.deepEqual(tt.getPaintProperty(he),Re)){var wt=tt.setPaintProperty(he,Re,Ge);wt&&this._updateLayer(tt),this._changed=!0,this._updatedPaintProps[Q]=!0}},W.prototype.getPaintProperty=function(Q,he){return this.getLayer(Q).getPaintProperty(he)},W.prototype.setFeatureState=function(Q,he){this._checkLoaded();var Re=Q.source,Ge=Q.sourceLayer,tt=this.sourceCaches[Re];if(tt===void 0){this.fire(new o.ErrorEvent(new Error("The source '"+Re+"' does not exist in the map's style.")));return}var wt=tt.getSource().type;if(wt==="geojson"&&Ge){this.fire(new o.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(wt==="vector"&&!Ge){this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}Q.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),tt.setFeatureState(Ge,Q.id,he)},W.prototype.removeFeatureState=function(Q,he){this._checkLoaded();var Re=Q.source,Ge=this.sourceCaches[Re];if(Ge===void 0){this.fire(new o.ErrorEvent(new Error("The source '"+Re+"' does not exist in the map's style.")));return}var tt=Ge.getSource().type,wt=tt==="vector"?Q.sourceLayer:void 0;if(tt==="vector"&&!wt){this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(he&&typeof Q.id!="string"&&typeof Q.id!="number"){this.fire(new o.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Ge.removeFeatureState(wt,Q.id,he)},W.prototype.getFeatureState=function(Q){this._checkLoaded();var he=Q.source,Re=Q.sourceLayer,Ge=this.sourceCaches[he];if(Ge===void 0){this.fire(new o.ErrorEvent(new Error("The source '"+he+"' does not exist in the map's style.")));return}var tt=Ge.getSource().type;if(tt==="vector"&&!Re){this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return Q.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),Ge.getFeatureState(Re,Q.id)},W.prototype.getTransition=function(){return o.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},W.prototype.serialize=function(){return o.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:o.mapObject(this.sourceCaches,function(Q){return Q.serialize()}),layers:this._serializeLayers(this._order)},function(Q){return Q!==void 0})},W.prototype._updateLayer=function(Q){this._updatedLayers[Q.id]=!0,Q.source&&!this._updatedSources[Q.source]&&this.sourceCaches[Q.source].getSource().type!=="raster"&&(this._updatedSources[Q.source]="reload",this.sourceCaches[Q.source].pause()),this._changed=!0},W.prototype._flattenAndSortRenderedFeatures=function(Q){for(var he=this,Re=function(Ea){return he._layers[Ea].type==="fill-extrusion"},Ge={},tt=[],wt=this._order.length-1;wt>=0;wt--){var zt=this._order[wt];if(Re(zt)){Ge[zt]=wt;for(var Xt=0,tr=Q;Xt<tr.length;Xt+=1){var qt=tr[Xt],Cr=qt[zt];if(Cr)for(var Ur=0,Nr=Cr;Ur<Nr.length;Ur+=1){var Fr=Nr[Ur];tt.push(Fr)}}}}tt.sort(function(Ea,Va){return Va.intersectionZ-Ea.intersectionZ});for(var Gr=[],nn=this._order.length-1;nn>=0;nn--){var Cn=this._order[nn];if(Re(Cn))for(var Rn=tt.length-1;Rn>=0;Rn--){var Bn=tt[Rn].feature;if(Ge[Bn.layer.id]<nn)break;Gr.push(Bn),tt.pop()}else for(var Nn=0,Fn=Q;Nn<Fn.length;Nn+=1){var Vn=Fn[Nn],Zn=Vn[Cn];if(Zn)for(var ea=0,ca=Zn;ea<ca.length;ea+=1){var ia=ca[ea];Gr.push(ia.feature)}}}return Gr},W.prototype.queryRenderedFeatures=function(Q,he,Re){he&&he.filter&&this._validate(o.validateStyle.filter,"queryRenderedFeatures.filter",he.filter,null,he);var Ge={};if(he&&he.layers){if(!Array.isArray(he.layers))return this.fire(new o.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var tt=0,wt=he.layers;tt<wt.length;tt+=1){var zt=wt[tt],Xt=this._layers[zt];if(!Xt)return this.fire(new o.ErrorEvent(new Error("The layer '"+zt+"' does not exist in the map's style and cannot be queried for features."))),[];Ge[Xt.source]=!0}}var tr=[];he.availableImages=this._availableImages;for(var qt in this.sourceCaches)he.layers&&!Ge[qt]||tr.push(K(this.sourceCaches[qt],this._layers,this._serializedLayers,Q,he,Re));return this.placement&&tr.push(Y(this._layers,this._serializedLayers,this.sourceCaches,Q,he,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(tr)},W.prototype.querySourceFeatures=function(Q,he){he&&he.filter&&this._validate(o.validateStyle.filter,"querySourceFeatures.filter",he.filter,null,he);var Re=this.sourceCaches[Q];return Re?ie(Re,he):[]},W.prototype.addSourceType=function(Q,he,Re){if(W.getSourceType(Q))return Re(new Error('A source type called "'+Q+'" already exists.'));if(W.setSourceType(Q,he),!he.workerSourceURL)return Re(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:Q,url:he.workerSourceURL},Re)},W.prototype.getLight=function(){return this.light.getLight()},W.prototype.setLight=function(Q,he){he===void 0&&(he={}),this._checkLoaded();var Re=this.light.getLight(),Ge=!1;for(var tt in Q)if(!o.deepEqual(Q[tt],Re[tt])){Ge=!0;break}if(Ge){var wt={now:o.browser.now(),transition:o.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(Q,he),this.light.updateTransitions(wt)}},W.prototype._validate=function(Q,he,Re,Ge,tt){return tt===void 0&&(tt={}),tt&&tt.validate===!1?!1:la(this,Q.call(o.validateStyle,o.extend({key:he,style:this.serialize(),value:Re,styleSpec:o.styleSpec},Ge)))},W.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),o.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var Q in this._layers){var he=this._layers[Q];he.setEventedParent(null)}for(var Re in this.sourceCaches)this.sourceCaches[Re].clearTiles(),this.sourceCaches[Re].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},W.prototype._clearSource=function(Q){this.sourceCaches[Q].clearTiles()},W.prototype._reloadSource=function(Q){this.sourceCaches[Q].resume(),this.sourceCaches[Q].reload()},W.prototype._updateSources=function(Q){for(var he in this.sourceCaches)this.sourceCaches[he].update(Q)},W.prototype._generateCollisionBoxes=function(){for(var Q in this.sourceCaches)this._reloadSource(Q)},W.prototype._updatePlacement=function(Q,he,Re,Ge,tt){tt===void 0&&(tt=!1);for(var wt=!1,zt=!1,Xt={},tr=0,qt=this._order;tr<qt.length;tr+=1){var Cr=qt[tr],Ur=this._layers[Cr];if(Ur.type==="symbol"){if(!Xt[Ur.source]){var Nr=this.sourceCaches[Ur.source];Xt[Ur.source]=Nr.getRenderableIds(!0).map(function(Nn){return Nr.getTileByID(Nn)}).sort(function(Nn,Fn){return Fn.tileID.overscaledZ-Nn.tileID.overscaledZ||(Nn.tileID.isLessThan(Fn.tileID)?-1:1)})}var Fr=this.crossTileSymbolIndex.addLayer(Ur,Xt[Ur.source],Q.center.lng);wt=wt||Fr}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),tt=tt||this._layerOrderChanged||Re===0,(tt||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.browser.now(),Q.zoom))&&(this.pauseablePlacement=new wn(Q,this._order,tt,he,Re,Ge,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Xt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.browser.now()),zt=!0),wt&&this.pauseablePlacement.placement.setStale()),zt||wt)for(var Gr=0,nn=this._order;Gr<nn.length;Gr+=1){var Cn=nn[Gr],Rn=this._layers[Cn];Rn.type==="symbol"&&this.placement.updateLayerOpacities(Rn,Xt[Rn.source])}var Bn=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.browser.now());return Bn},W.prototype._releaseSymbolFadeTiles=function(){for(var Q in this.sourceCaches)this.sourceCaches[Q].releaseSymbolFadeTiles()},W.prototype.getImages=function(Q,he,Re){this.imageManager.getImages(he.icons,Re),this._updateTilesForChangedImages();var Ge=this.sourceCaches[he.source];Ge&&Ge.setDependencies(he.tileID.key,he.type,he.icons)},W.prototype.getGlyphs=function(Q,he,Re){this.glyphManager.getGlyphs(he.stacks,Re)},W.prototype.getResource=function(Q,he,Re){return o.makeRequest(he,Re)},W}(o.Evented);uo.getSourceType=re,uo.setSourceType=H,uo.registerForPluginStateChange=o.registerForPluginStateChange;var ao=o.createLayout([{name:"a_pos",type:"Int16",components:2}]),Oi=`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`,Ls=`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 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
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`,jl=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,bu="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Ga=`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,qs="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);}",Kl=`varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ii=`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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 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);}`,$i="void main() {gl_FragColor=vec4(1.0);}",Ps="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Ll=`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,xi=`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;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 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;}`,Rs=`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,Ti="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;}",Ci="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;}}",Ds="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;}",Bi="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;}",Ni="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);}",fo="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);}",wu="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);}",io=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,nf=`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`,_o=`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ki=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,Jl=`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,es=`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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;}`,zo=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ql=`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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);}`,Tu=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,af=`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;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,Pl=`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,of=`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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
? a_pos
: 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;}`,sf=`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,lf="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;}",$l=`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;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,uf="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;}",ff=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Au=`
#define scale 0.015873016
attribute 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float 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);}`,Mu=`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 vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ds=`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);}`,Is=`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;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,el=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute 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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float 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;}`,tl=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
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 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Su=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float 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);}`,Wo=`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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,cf="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;}",Rl=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Eu=`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;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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));}`,Cu=`#define SDF_PX 8.0
uniform 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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Dl=`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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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);}`,bo=`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform 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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ks=`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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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);}`,ps=ai(Oi,Ls),rl=ai(jl,bu),ts=ai(Ga,qs),Fo=ai(Kl,Ii),ql=ai($i,Ps),_s=ai(Ll,xi),wo=ai(Rs,Ti),yi=ai(Ci,Ds),eu=ai(Bi,Ni),hf=ai(fo,wu),Il=ai(io,nf),zs=ai(_o,ki),Fs=ai(Jl,es),vo=ai(zo,Ql),kl=ai(Tu,af),Os=ai(Pl,of),_l=ai(sf,lf),vf=ai($l,uf),Lu=ai(ff,Au),tu=ai(Mu,ds),ru=ai(Is,el),nu=ai(tl,Su),Bs=ai(Wo,cf),zl=ai(Rl,Eu),nl=ai(Cu,Dl),Fl=ai(bo,ks);function ai(ce,W){var fe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=W.match(/attribute ([\w]+) ([\w]+)/g),he=ce.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Re=W.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ge=Re?Re.concat(he):he,tt={};return ce=ce.replace(fe,function(wt,zt,Xt,tr,qt){return tt[qt]=!0,zt==="define"?`
#ifndef HAS_UNIFORM_u_`+qt+`
varying `+Xt+" "+tr+" "+qt+`;
#else
uniform `+Xt+" "+tr+" u_"+qt+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+qt+`
`+Xt+" "+tr+" "+qt+" = u_"+qt+`;
#endif
`}),W=W.replace(fe,function(wt,zt,Xt,tr,qt){var Cr=tr==="float"?"vec2":"vec4",Ur=qt.match(/color/)?"color":Cr;return tt[qt]?zt==="define"?`
#ifndef HAS_UNIFORM_u_`+qt+`
uniform lowp float u_`+qt+`_t;
attribute `+Xt+" "+Cr+" a_"+qt+`;
varying `+Xt+" "+tr+" "+qt+`;
#else
uniform `+Xt+" "+tr+" u_"+qt+`;
#endif
`:Ur==="vec4"?`
#ifndef HAS_UNIFORM_u_`+qt+`
`+qt+" = a_"+qt+`;
#else
`+Xt+" "+tr+" "+qt+" = u_"+qt+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+qt+`
`+qt+" = unpack_mix_"+Ur+"(a_"+qt+", u_"+qt+`_t);
#else
`+Xt+" "+tr+" "+qt+" = u_"+qt+`;
#endif
`:zt==="define"?`
#ifndef HAS_UNIFORM_u_`+qt+`
uniform lowp float u_`+qt+`_t;
attribute `+Xt+" "+Cr+" a_"+qt+`;
#else
uniform `+Xt+" "+tr+" u_"+qt+`;
#endif
`:Ur==="vec4"?`
#ifndef HAS_UNIFORM_u_`+qt+`
`+Xt+" "+tr+" "+qt+" = a_"+qt+`;
#else
`+Xt+" "+tr+" "+qt+" = u_"+qt+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+qt+`
`+Xt+" "+tr+" "+qt+" = unpack_mix_"+Ur+"(a_"+qt+", u_"+qt+`_t);
#else
`+Xt+" "+tr+" "+qt+" = u_"+qt+`;
#endif
`}),{fragmentSource:ce,vertexSource:W,staticAttributes:Q,staticUniforms:Ge}}var Pu=Object.freeze({__proto__:null,prelude:ps,background:rl,backgroundPattern:ts,circle:Fo,clippingMask:ql,heatmap:_s,heatmapTexture:wo,collisionBox:yi,collisionCircle:eu,debug:hf,fill:Il,fillOutline:zs,fillOutlinePattern:Fs,fillPattern:vo,fillExtrusion:kl,fillExtrusionPattern:Os,hillshadePrepare:_l,hillshade:vf,line:Lu,lineGradient:tu,linePattern:ru,lineSDF:nu,raster:Bs,symbolIcon:zl,symbolSDF:nl,symbolTextAndIcon:Fl}),To=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};To.prototype.bind=function(W,fe,Q,he,Re,Ge,tt,wt){this.context=W;for(var zt=this.boundPaintVertexBuffers.length!==he.length,Xt=0;!zt&&Xt<he.length;Xt++)this.boundPaintVertexBuffers[Xt]!==he[Xt]&&(zt=!0);var tr=!this.vao||this.boundProgram!==fe||this.boundLayoutVertexBuffer!==Q||zt||this.boundIndexBuffer!==Re||this.boundVertexOffset!==Ge||this.boundDynamicVertexBuffer!==tt||this.boundDynamicVertexBuffer2!==wt;!W.extVertexArrayObject||tr?this.freshBind(fe,Q,he,Re,Ge,tt,wt):(W.bindVertexArrayOES.set(this.vao),tt&&tt.bind(),Re&&Re.dynamicDraw&&Re.bind(),wt&&wt.bind())},To.prototype.freshBind=function(W,fe,Q,he,Re,Ge,tt){var wt,zt=W.numAttributes,Xt=this.context,tr=Xt.gl;if(Xt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Xt.extVertexArrayObject.createVertexArrayOES(),Xt.bindVertexArrayOES.set(this.vao),wt=0,this.boundProgram=W,this.boundLayoutVertexBuffer=fe,this.boundPaintVertexBuffers=Q,this.boundIndexBuffer=he,this.boundVertexOffset=Re,this.boundDynamicVertexBuffer=Ge,this.boundDynamicVertexBuffer2=tt;else{wt=Xt.currentNumAttributes||0;for(var qt=zt;qt<wt;qt++)tr.disableVertexAttribArray(qt)}fe.enableAttributes(tr,W);for(var Cr=0,Ur=Q;Cr<Ur.length;Cr+=1){var Nr=Ur[Cr];Nr.enableAttributes(tr,W)}Ge&&Ge.enableAttributes(tr,W),tt&&tt.enableAttributes(tr,W),fe.bind(),fe.setVertexAttribPointers(tr,W,Re);for(var Fr=0,Gr=Q;Fr<Gr.length;Fr+=1){var nn=Gr[Fr];nn.bind(),nn.setVertexAttribPointers(tr,W,Re)}Ge&&(Ge.bind(),Ge.setVertexAttribPointers(tr,W,Re)),he&&he.bind(),tt&&(tt.bind(),tt.setVertexAttribPointers(tr,W,Re)),Xt.currentNumAttributes=zt},To.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Ru(ce){for(var W=[],fe=0;fe<ce.length;fe++)if(ce[fe]!==null){var Q=ce[fe].split(" ");W.push(Q.pop())}return W}var au=function(W,fe,Q,he,Re,Ge){var tt=W.gl;this.program=tt.createProgram();for(var wt=Ru(Q.staticAttributes),zt=he?he.getBinderAttributes():[],Xt=wt.concat(zt),tr=Q.staticUniforms?Ru(Q.staticUniforms):[],qt=he?he.getBinderUniforms():[],Cr=tr.concat(qt),Ur=[],Nr=0,Fr=Cr;Nr<Fr.length;Nr+=1){var Gr=Fr[Nr];Ur.indexOf(Gr)<0&&Ur.push(Gr)}var nn=he?he.defines():[];Ge&&nn.push("#define OVERDRAW_INSPECTOR;");var Cn=nn.concat(ps.fragmentSource,Q.fragmentSource).join(`
`),Rn=nn.concat(ps.vertexSource,Q.vertexSource).join(`
`),Bn=tt.createShader(tt.FRAGMENT_SHADER);if(tt.isContextLost()){this.failedToCreate=!0;return}tt.shaderSource(Bn,Cn),tt.compileShader(Bn),tt.attachShader(this.program,Bn);var Nn=tt.createShader(tt.VERTEX_SHADER);if(tt.isContextLost()){this.failedToCreate=!0;return}tt.shaderSource(Nn,Rn),tt.compileShader(Nn),tt.attachShader(this.program,Nn),this.attributes={};var Fn={};this.numAttributes=Xt.length;for(var Vn=0;Vn<this.numAttributes;Vn++)Xt[Vn]&&(tt.bindAttribLocation(this.program,Vn,Xt[Vn]),this.attributes[Xt[Vn]]=Vn);tt.linkProgram(this.program),tt.deleteShader(Nn),tt.deleteShader(Bn);for(var Zn=0;Zn<Ur.length;Zn++){var ea=Ur[Zn];if(ea&&!Fn[ea]){var ca=tt.getUniformLocation(this.program,ea);ca&&(Fn[ea]=ca)}}this.fixedUniforms=Re(W,Fn),this.binderUniforms=he?he.getUniforms(W,Fn):[]};au.prototype.draw=function(W,fe,Q,he,Re,Ge,tt,wt,zt,Xt,tr,qt,Cr,Ur,Nr,Fr){var Gr,nn=W.gl;if(!this.failedToCreate){W.program.set(this.program),W.setDepthMode(Q),W.setStencilMode(he),W.setColorMode(Re),W.setCullFace(Ge);for(var Cn in this.fixedUniforms)this.fixedUniforms[Cn].set(tt[Cn]);Ur&&Ur.setUniforms(W,this.binderUniforms,qt,{zoom:Cr});for(var Rn=(Gr={},Gr[nn.LINES]=2,Gr[nn.TRIANGLES]=3,Gr[nn.LINE_STRIP]=1,Gr)[fe],Bn=0,Nn=tr.get();Bn<Nn.length;Bn+=1){var Fn=Nn[Bn],Vn=Fn.vaos||(Fn.vaos={}),Zn=Vn[wt]||(Vn[wt]=new To);Zn.bind(W,this,zt,Ur?Ur.getPaintVertexBuffers():[],Xt,Fn.vertexOffset,Nr,Fr),nn.drawElements(fe,Fn.primitiveLength*Rn,nn.UNSIGNED_SHORT,Fn.primitiveOffset*Rn*2)}}};function gs(ce,W,fe){var Q=1/fn(fe,1,W.transform.tileZoom),he=Math.pow(2,fe.tileID.overscaledZ),Re=fe.tileSize*Math.pow(2,W.transform.tileZoom)/he,Ge=Re*(fe.tileID.canonical.x+fe.tileID.wrap*he),tt=Re*fe.tileID.canonical.y;return{u_image:0,u_texsize:fe.imageAtlasTexture.size,u_scale:[Q,ce.fromScale,ce.toScale],u_fade:ce.t,u_pixel_coord_upper:[Ge>>16,tt>>16],u_pixel_coord_lower:[Ge&65535,tt&65535]}}function rs(ce,W,fe,Q){var he=fe.imageManager.getPattern(ce.from.toString()),Re=fe.imageManager.getPattern(ce.to.toString()),Ge=fe.imageManager.getPixelSize(),tt=Ge.width,wt=Ge.height,zt=Math.pow(2,Q.tileID.overscaledZ),Xt=Q.tileSize*Math.pow(2,fe.transform.tileZoom)/zt,tr=Xt*(Q.tileID.canonical.x+Q.tileID.wrap*zt),qt=Xt*Q.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:he.tl,u_pattern_br_a:he.br,u_pattern_tl_b:Re.tl,u_pattern_br_b:Re.br,u_texsize:[tt,wt],u_mix:W.t,u_pattern_size_a:he.displaySize,u_pattern_size_b:Re.displaySize,u_scale_a:W.fromScale,u_scale_b:W.toScale,u_tile_units_to_pixels:1/fn(Q,1,fe.transform.tileZoom),u_pixel_coord_upper:[tr>>16,qt>>16],u_pixel_coord_lower:[tr&65535,qt&65535]}}var Ol=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_lightpos:new o.Uniform3f(ce,W.u_lightpos),u_lightintensity:new o.Uniform1f(ce,W.u_lightintensity),u_lightcolor:new o.Uniform3f(ce,W.u_lightcolor),u_vertical_gradient:new o.Uniform1f(ce,W.u_vertical_gradient),u_opacity:new o.Uniform1f(ce,W.u_opacity)}},bi=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_lightpos:new o.Uniform3f(ce,W.u_lightpos),u_lightintensity:new o.Uniform1f(ce,W.u_lightintensity),u_lightcolor:new o.Uniform3f(ce,W.u_lightcolor),u_vertical_gradient:new o.Uniform1f(ce,W.u_vertical_gradient),u_height_factor:new o.Uniform1f(ce,W.u_height_factor),u_image:new o.Uniform1i(ce,W.u_image),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade),u_opacity:new o.Uniform1f(ce,W.u_opacity)}},al=function(ce,W,fe,Q){var he=W.style.light,Re=he.properties.get("position"),Ge=[Re.x,Re.y,Re.z],tt=o.create$1();he.properties.get("anchor")==="viewport"&&o.fromRotation(tt,-W.transform.angle),o.transformMat3(Ge,Ge,tt);var wt=he.properties.get("color");return{u_matrix:ce,u_lightpos:Ge,u_lightintensity:he.properties.get("intensity"),u_lightcolor:[wt.r,wt.g,wt.b],u_vertical_gradient:+fe,u_opacity:Q}},Ao=function(ce,W,fe,Q,he,Re,Ge){return o.extend(al(ce,W,fe,Q),gs(Re,W,Ge),{u_height_factor:-Math.pow(2,he.overscaledZ)/Ge.tileSize/8})},Yo=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},ys=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_image:new o.Uniform1i(ce,W.u_image),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade)}},ns=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_world:new o.Uniform2f(ce,W.u_world)}},Mo=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_world:new o.Uniform2f(ce,W.u_world),u_image:new o.Uniform1i(ce,W.u_image),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade)}},Xo=function(ce){return{u_matrix:ce}},So=function(ce,W,fe,Q){return o.extend(Xo(ce),gs(fe,W,Q))},po=function(ce,W){return{u_matrix:ce,u_world:W}},il=function(ce,W,fe,Q,he){return o.extend(So(ce,W,fe,Q),{u_world:he})},df=function(ce,W){return{u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_scale_with_map:new o.Uniform1i(ce,W.u_scale_with_map),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_extrude_scale:new o.Uniform2f(ce,W.u_extrude_scale),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},pf=function(ce,W,fe,Q){var he=ce.transform,Re,Ge;if(Q.paint.get("circle-pitch-alignment")==="map"){var tt=fn(fe,1,he.zoom);Re=!0,Ge=[tt,tt]}else Re=!1,Ge=he.pixelsToGLUnits;return{u_camera_to_center_distance:he.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:ce.translatePosMatrix(W.posMatrix,fe,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+Re,u_device_pixel_ratio:o.browser.devicePixelRatio,u_extrude_scale:Ge}},gf=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pixels_to_tile_units:new o.Uniform1f(ce,W.u_pixels_to_tile_units),u_extrude_scale:new o.Uniform2f(ce,W.u_extrude_scale),u_overscale_factor:new o.Uniform1f(ce,W.u_overscale_factor)}},yf=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_inv_matrix:new o.UniformMatrix4f(ce,W.u_inv_matrix),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_viewport_size:new o.Uniform2f(ce,W.u_viewport_size)}},iu=function(ce,W,fe){var Q=fn(fe,1,W.zoom),he=Math.pow(2,W.zoom-fe.tileID.overscaledZ),Re=fe.tileID.overscaleFactor();return{u_matrix:ce,u_camera_to_center_distance:W.cameraToCenterDistance,u_pixels_to_tile_units:Q,u_extrude_scale:[W.pixelsToGLUnits[0]/(Q*he),W.pixelsToGLUnits[1]/(Q*he)],u_overscale_factor:Re}},Du=function(ce,W,fe){return{u_matrix:ce,u_inv_matrix:W,u_camera_to_center_distance:fe.cameraToCenterDistance,u_viewport_size:[fe.width,fe.height]}},Ns=function(ce,W){return{u_color:new o.UniformColor(ce,W.u_color),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_overlay:new o.Uniform1i(ce,W.u_overlay),u_overlay_scale:new o.Uniform1f(ce,W.u_overlay_scale)}},_i=function(ce,W,fe){return fe===void 0&&(fe=1),{u_matrix:ce,u_color:W,u_overlay:0,u_overlay_scale:fe}},co=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},Us=function(ce){return{u_matrix:ce}},Iu=function(ce,W){return{u_extrude_scale:new o.Uniform1f(ce,W.u_extrude_scale),u_intensity:new o.Uniform1f(ce,W.u_intensity),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},ol=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_world:new o.Uniform2f(ce,W.u_world),u_image:new o.Uniform1i(ce,W.u_image),u_color_ramp:new o.Uniform1i(ce,W.u_color_ramp),u_opacity:new o.Uniform1f(ce,W.u_opacity)}},Zo=function(ce,W,fe,Q){return{u_matrix:ce,u_extrude_scale:fn(W,1,fe),u_intensity:Q}},mf=function(ce,W,fe,Q){var he=o.create();o.ortho(he,0,ce.width,ce.height,0,0,1);var Re=ce.context.gl;return{u_matrix:he,u_world:[Re.drawingBufferWidth,Re.drawingBufferHeight],u_image:fe,u_color_ramp:Q,u_opacity:W.paint.get("heatmap-opacity")}},ku=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_image:new o.Uniform1i(ce,W.u_image),u_latrange:new o.Uniform2f(ce,W.u_latrange),u_light:new o.Uniform2f(ce,W.u_light),u_shadow:new o.UniformColor(ce,W.u_shadow),u_highlight:new o.UniformColor(ce,W.u_highlight),u_accent:new o.UniformColor(ce,W.u_accent)}},_u=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_image:new o.Uniform1i(ce,W.u_image),u_dimension:new o.Uniform2f(ce,W.u_dimension),u_zoom:new o.Uniform1f(ce,W.u_zoom),u_unpack:new o.Uniform4f(ce,W.u_unpack)}},ou=function(ce,W,fe){var Q=fe.paint.get("hillshade-shadow-color"),he=fe.paint.get("hillshade-highlight-color"),Re=fe.paint.get("hillshade-accent-color"),Ge=fe.paint.get("hillshade-illumination-direction")*(Math.PI/180);fe.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ge-=ce.transform.angle);var tt=!ce.options.moving;return{u_matrix:ce.transform.calculatePosMatrix(W.tileID.toUnwrapped(),tt),u_image:0,u_latrange:qi(ce,W.tileID),u_light:[fe.paint.get("hillshade-exaggeration"),Ge],u_shadow:Q,u_highlight:he,u_accent:Re}},zu=function(ce,W){var fe=W.stride,Q=o.create();return o.ortho(Q,0,o.EXTENT,-o.EXTENT,0,0,1),o.translate(Q,Q,[0,-o.EXTENT,0]),{u_matrix:Q,u_image:1,u_dimension:[fe,fe],u_zoom:ce.overscaledZ,u_unpack:W.getUnpackVector()}};function qi(ce,W){var fe=Math.pow(2,W.canonical.z),Q=W.canonical.y;return[new o.MercatorCoordinate(0,Q/fe).toLngLat().lat,new o.MercatorCoordinate(0,(Q+1)/fe).toLngLat().lat]}var Eo=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels)}},as=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels),u_image:new o.Uniform1i(ce,W.u_image),u_image_height:new o.Uniform1f(ce,W.u_image_height)}},Vs=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_image:new o.Uniform1i(ce,W.u_image),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade)}},Bl=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels),u_patternscale_a:new o.Uniform2f(ce,W.u_patternscale_a),u_patternscale_b:new o.Uniform2f(ce,W.u_patternscale_b),u_sdfgamma:new o.Uniform1f(ce,W.u_sdfgamma),u_image:new o.Uniform1i(ce,W.u_image),u_tex_y_a:new o.Uniform1f(ce,W.u_tex_y_a),u_tex_y_b:new o.Uniform1f(ce,W.u_tex_y_b),u_mix:new o.Uniform1f(ce,W.u_mix)}},ms=function(ce,W,fe){var Q=ce.transform;return{u_matrix:is(ce,W,fe),u_ratio:1/fn(W,1,Q.zoom),u_device_pixel_ratio:o.browser.devicePixelRatio,u_units_to_pixels:[1/Q.pixelsToGLUnits[0],1/Q.pixelsToGLUnits[1]]}},xs=function(ce,W,fe,Q){return o.extend(ms(ce,W,fe),{u_image:0,u_image_height:Q})},Fu=function(ce,W,fe,Q){var he=ce.transform,Re=Hs(W,he);return{u_matrix:is(ce,W,fe),u_texsize:W.imageAtlasTexture.size,u_ratio:1/fn(W,1,he.zoom),u_device_pixel_ratio:o.browser.devicePixelRatio,u_image:0,u_scale:[Re,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/he.pixelsToGLUnits[0],1/he.pixelsToGLUnits[1]]}},jo=function(ce,W,fe,Q,he){var Re=ce.transform,Ge=ce.lineAtlas,tt=Hs(W,Re),wt=fe.layout.get("line-cap")==="round",zt=Ge.getDash(Q.from,wt),Xt=Ge.getDash(Q.to,wt),tr=zt.width*he.fromScale,qt=Xt.width*he.toScale;return o.extend(ms(ce,W,fe),{u_patternscale_a:[tt/tr,-zt.height/2],u_patternscale_b:[tt/qt,-Xt.height/2],u_sdfgamma:Ge.width/(Math.min(tr,qt)*256*o.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:zt.y,u_tex_y_b:Xt.y,u_mix:he.t})};function Hs(ce,W){return 1/fn(ce,1,W.tileZoom)}function is(ce,W,fe){return ce.translatePosMatrix(W.tileID.posMatrix,W,fe.paint.get("line-translate"),fe.paint.get("line-translate-anchor"))}var Ko=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_tl_parent:new o.Uniform2f(ce,W.u_tl_parent),u_scale_parent:new o.Uniform1f(ce,W.u_scale_parent),u_buffer_scale:new o.Uniform1f(ce,W.u_buffer_scale),u_fade_t:new o.Uniform1f(ce,W.u_fade_t),u_opacity:new o.Uniform1f(ce,W.u_opacity),u_image0:new o.Uniform1i(ce,W.u_image0),u_image1:new o.Uniform1i(ce,W.u_image1),u_brightness_low:new o.Uniform1f(ce,W.u_brightness_low),u_brightness_high:new o.Uniform1f(ce,W.u_brightness_high),u_saturation_factor:new o.Uniform1f(ce,W.u_saturation_factor),u_contrast_factor:new o.Uniform1f(ce,W.u_contrast_factor),u_spin_weights:new o.Uniform3f(ce,W.u_spin_weights)}},sl=function(ce,W,fe,Q,he){return{u_matrix:ce,u_tl_parent:W,u_scale_parent:fe,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*he.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:he.paint.get("raster-brightness-min"),u_brightness_high:he.paint.get("raster-brightness-max"),u_saturation_factor:Ws(he.paint.get("raster-saturation")),u_contrast_factor:ti(he.paint.get("raster-contrast")),u_spin_weights:Gs(he.paint.get("raster-hue-rotate"))}};function Gs(ce){ce*=Math.PI/180;var W=Math.sin(ce),fe=Math.cos(ce);return[(2*fe+1)/3,(-Math.sqrt(3)*W-fe+1)/3,(Math.sqrt(3)*W-fe+1)/3]}function ti(ce){return ce>0?1/(1-ce):1+ce}function Ws(ce){return ce>0?1-1/(1.001-ce):-ce}var Nl=function(ce,W){return{u_is_size_zoom_constant:new o.Uniform1i(ce,W.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(ce,W.u_is_size_feature_constant),u_size_t:new o.Uniform1f(ce,W.u_size_t),u_size:new o.Uniform1f(ce,W.u_size),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pitch:new o.Uniform1f(ce,W.u_pitch),u_rotate_symbol:new o.Uniform1i(ce,W.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(ce,W.u_aspect_ratio),u_fade_change:new o.Uniform1f(ce,W.u_fade_change),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(ce,W.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(ce,W.u_coord_matrix),u_is_text:new o.Uniform1i(ce,W.u_is_text),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_texture:new o.Uniform1i(ce,W.u_texture)}},Ou=function(ce,W){return{u_is_size_zoom_constant:new o.Uniform1i(ce,W.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(ce,W.u_is_size_feature_constant),u_size_t:new o.Uniform1f(ce,W.u_size_t),u_size:new o.Uniform1f(ce,W.u_size),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pitch:new o.Uniform1f(ce,W.u_pitch),u_rotate_symbol:new o.Uniform1i(ce,W.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(ce,W.u_aspect_ratio),u_fade_change:new o.Uniform1f(ce,W.u_fade_change),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(ce,W.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(ce,W.u_coord_matrix),u_is_text:new o.Uniform1i(ce,W.u_is_text),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_texture:new o.Uniform1i(ce,W.u_texture),u_gamma_scale:new o.Uniform1f(ce,W.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(ce,W.u_is_halo)}},Ys=function(ce,W){return{u_is_size_zoom_constant:new o.Uniform1i(ce,W.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(ce,W.u_is_size_feature_constant),u_size_t:new o.Uniform1f(ce,W.u_size_t),u_size:new o.Uniform1f(ce,W.u_size),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pitch:new o.Uniform1f(ce,W.u_pitch),u_rotate_symbol:new o.Uniform1i(ce,W.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(ce,W.u_aspect_ratio),u_fade_change:new o.Uniform1f(ce,W.u_fade_change),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(ce,W.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(ce,W.u_coord_matrix),u_is_text:new o.Uniform1i(ce,W.u_is_text),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_texsize_icon:new o.Uniform2f(ce,W.u_texsize_icon),u_texture:new o.Uniform1i(ce,W.u_texture),u_texture_icon:new o.Uniform1i(ce,W.u_texture_icon),u_gamma_scale:new o.Uniform1f(ce,W.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(ce,W.u_is_halo)}},ll=function(ce,W,fe,Q,he,Re,Ge,tt,wt,zt){var Xt=he.transform;return{u_is_size_zoom_constant:+(ce==="constant"||ce==="source"),u_is_size_feature_constant:+(ce==="constant"||ce==="camera"),u_size_t:W?W.uSizeT:0,u_size:W?W.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+fe,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:he.options.fadeDuration?he.symbolFadeChange:1,u_matrix:Re,u_label_plane_matrix:Ge,u_coord_matrix:tt,u_is_text:+wt,u_pitch_with_map:+Q,u_texsize:zt,u_texture:0}},Ul=function(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt){var tr=he.transform;return o.extend(ll(ce,W,fe,Q,he,Re,Ge,tt,wt,zt),{u_gamma_scale:Q?Math.cos(tr._pitch)*tr.cameraToCenterDistance:1,u_device_pixel_ratio:o.browser.devicePixelRatio,u_is_halo:1})},su=function(ce,W,fe,Q,he,Re,Ge,tt,wt,zt){return o.extend(Ul(ce,W,fe,Q,he,Re,Ge,tt,!0,wt),{u_texsize_icon:zt,u_texture_icon:1})},ul=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_opacity:new o.Uniform1f(ce,W.u_opacity),u_color:new o.UniformColor(ce,W.u_color)}},fl=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_opacity:new o.Uniform1f(ce,W.u_opacity),u_image:new o.Uniform1i(ce,W.u_image),u_pattern_tl_a:new o.Uniform2f(ce,W.u_pattern_tl_a),u_pattern_br_a:new o.Uniform2f(ce,W.u_pattern_br_a),u_pattern_tl_b:new o.Uniform2f(ce,W.u_pattern_tl_b),u_pattern_br_b:new o.Uniform2f(ce,W.u_pattern_br_b),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_mix:new o.Uniform1f(ce,W.u_mix),u_pattern_size_a:new o.Uniform2f(ce,W.u_pattern_size_a),u_pattern_size_b:new o.Uniform2f(ce,W.u_pattern_size_b),u_scale_a:new o.Uniform1f(ce,W.u_scale_a),u_scale_b:new o.Uniform1f(ce,W.u_scale_b),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_tile_units_to_pixels:new o.Uniform1f(ce,W.u_tile_units_to_pixels)}},os=function(ce,W,fe){return{u_matrix:ce,u_opacity:W,u_color:fe}},cl=function(ce,W,fe,Q,he,Re){return o.extend(rs(Q,Re,fe,he),{u_matrix:ce,u_opacity:W})},ss={fillExtrusion:Ol,fillExtrusionPattern:bi,fill:Yo,fillPattern:ys,fillOutline:ns,fillOutlinePattern:Mo,circle:df,collisionBox:gf,collisionCircle:yf,debug:Ns,clippingMask:co,heatmap:Iu,heatmapTexture:ol,hillshade:ku,hillshadePrepare:_u,line:Eo,lineGradient:as,linePattern:Vs,lineSDF:Bl,raster:Ko,symbolIcon:Nl,symbolSDF:Ou,symbolTextAndIcon:Ys,background:ul,backgroundPattern:fl},Li;function Oo(ce,W,fe,Q,he,Re,Ge){for(var tt=ce.context,wt=tt.gl,zt=ce.useProgram("collisionBox"),Xt=[],tr=0,qt=0,Cr=0;Cr<Q.length;Cr++){var Ur=Q[Cr],Nr=W.getTile(Ur),Fr=Nr.getBucket(fe);if(Fr){var Gr=Ur.posMatrix;(he[0]!==0||he[1]!==0)&&(Gr=ce.translatePosMatrix(Ur.posMatrix,Nr,he,Re));var nn=Ge?Fr.textCollisionBox:Fr.iconCollisionBox,Cn=Fr.collisionCircleArray;if(Cn.length>0){var Rn=o.create(),Bn=Gr;o.mul(Rn,Fr.placementInvProjMatrix,ce.transform.glCoordMatrix),o.mul(Rn,Rn,Fr.placementViewportMatrix),Xt.push({circleArray:Cn,circleOffset:qt,transform:Bn,invTransform:Rn}),tr+=Cn.length/4,qt=tr}nn&&zt.draw(tt,wt.LINES,gr.disabled,Wt.disabled,ce.colorModeForRenderPass(),Et.disabled,iu(Gr,ce.transform,Nr),fe.id,nn.layoutVertexBuffer,nn.indexBuffer,nn.segments,null,ce.transform.zoom,null,null,nn.collisionVertexBuffer)}}if(!(!Ge||!Xt.length)){var Nn=ce.useProgram("collisionCircle"),Fn=new o.StructArrayLayout2f1f2i16;Fn.resize(tr*4),Fn._trim();for(var Vn=0,Zn=0,ea=Xt;Zn<ea.length;Zn+=1)for(var ca=ea[Zn],ia=0;ia<ca.circleArray.length/4;ia++){var Ea=ia*4,Va=ca.circleArray[Ea+0],za=ca.circleArray[Ea+1],ga=ca.circleArray[Ea+2],Fa=ca.circleArray[Ea+3];Fn.emplace(Vn++,Va,za,ga,Fa,0),Fn.emplace(Vn++,Va,za,ga,Fa,1),Fn.emplace(Vn++,Va,za,ga,Fa,2),Fn.emplace(Vn++,Va,za,ga,Fa,3)}(!Li||Li.length<tr*2)&&(Li=lu(tr));for(var Ia=tt.createIndexBuffer(Li,!0),Ka=tt.createVertexBuffer(Fn,o.collisionCircleLayout.members,!0),Wa=0,fi=Xt;Wa<fi.length;Wa+=1){var Ua=fi[Wa],ii=Du(Ua.transform,Ua.invTransform,ce.transform);Nn.draw(tt,wt.TRIANGLES,gr.disabled,Wt.disabled,ce.colorModeForRenderPass(),Et.disabled,ii,fe.id,Ka,Ia,o.SegmentVector.simpleSegment(0,Ua.circleOffset*2,Ua.circleArray.length,Ua.circleArray.length/2),null,ce.transform.zoom,null,null,null)}Ka.destroy(),Ia.destroy()}}function lu(ce){var W=ce*2,fe=new o.StructArrayLayout3ui6;fe.resize(W),fe._trim();for(var Q=0;Q<W;Q++){var he=Q*6;fe.uint16[he+0]=Q*4+0,fe.uint16[he+1]=Q*4+1,fe.uint16[he+2]=Q*4+2,fe.uint16[he+3]=Q*4+2,fe.uint16[he+4]=Q*4+3,fe.uint16[he+5]=Q*4+0}return fe}var bs=o.identity(new Float32Array(16));function Vl(ce,W,fe,Q,he){if(ce.renderPass==="translucent"){var Re=Wt.disabled,Ge=ce.colorModeForRenderPass(),tt=fe.layout.get("text-variable-anchor");tt&&xf(Q,ce,fe,W,fe.layout.get("text-rotation-alignment"),fe.layout.get("text-pitch-alignment"),he),fe.paint.get("icon-opacity").constantOr(1)!==0&&vl(ce,W,fe,Q,!1,fe.paint.get("icon-translate"),fe.paint.get("icon-translate-anchor"),fe.layout.get("icon-rotation-alignment"),fe.layout.get("icon-pitch-alignment"),fe.layout.get("icon-keep-upright"),Re,Ge),fe.paint.get("text-opacity").constantOr(1)!==0&&vl(ce,W,fe,Q,!0,fe.paint.get("text-translate"),fe.paint.get("text-translate-anchor"),fe.layout.get("text-rotation-alignment"),fe.layout.get("text-pitch-alignment"),fe.layout.get("text-keep-upright"),Re,Ge),W.map.showCollisionBoxes&&(Oo(ce,W,fe,Q,fe.paint.get("text-translate"),fe.paint.get("text-translate-anchor"),!0),Oo(ce,W,fe,Q,fe.paint.get("icon-translate"),fe.paint.get("icon-translate-anchor"),!1))}}function hl(ce,W,fe,Q,he,Re){var Ge=o.getAnchorAlignment(ce),tt=Ge.horizontalAlign,wt=Ge.verticalAlign,zt=-(tt-.5)*W,Xt=-(wt-.5)*fe,tr=o.evaluateVariableOffset(ce,Q);return new o.Point((zt/he+tr[0])*Re,(Xt/he+tr[1])*Re)}function xf(ce,W,fe,Q,he,Re,Ge){for(var tt=W.transform,wt=he==="map",zt=Re==="map",Xt=0,tr=ce;Xt<tr.length;Xt+=1){var qt=tr[Xt],Cr=Q.getTile(qt),Ur=Cr.getBucket(fe);if(!(!Ur||!Ur.text||!Ur.text.segments.get().length)){var Nr=Ur.textSizeData,Fr=o.evaluateSizeForZoom(Nr,tt.zoom),Gr=fn(Cr,1,W.transform.zoom),nn=Lr(qt.posMatrix,zt,wt,W.transform,Gr),Cn=fe.layout.get("icon-text-fit")!=="none"&&Ur.hasIconData();if(Fr){var Rn=Math.pow(2,tt.zoom-Cr.tileID.overscaledZ);Bu(Ur,wt,zt,Ge,o.symbolSize,tt,nn,qt.posMatrix,Rn,Fr,Cn)}}}}function Bu(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt){var tr=ce.text.placedSymbolArray,qt=ce.text.dynamicLayoutVertexArray,Cr=ce.icon.dynamicLayoutVertexArray,Ur={};qt.clear();for(var Nr=0;Nr<tr.length;Nr++){var Fr=tr.get(Nr),Gr=ce.allowVerticalPlacement&&!Fr.placedOrientation,nn=!Fr.hidden&&Fr.crossTileID&&!Gr?Q[Fr.crossTileID]:null;if(!nn)aa(Fr.numGlyphs,qt);else{var Cn=new o.Point(Fr.anchorX,Fr.anchorY),Rn=_r(Cn,fe?tt:Ge),Bn=Qr(Re.cameraToCenterDistance,Rn.signedDistanceFromCamera),Nn=he.evaluateSizeForFeature(ce.textSizeData,zt,Fr)*Bn/o.ONE_EM;fe&&(Nn*=ce.tilePixelRatio/wt);for(var Fn=nn.width,Vn=nn.height,Zn=nn.anchor,ea=nn.textOffset,ca=nn.textBoxScale,ia=hl(Zn,Fn,Vn,ea,ca,Nn),Ea=fe?_r(Cn.add(ia),Ge).point:Rn.point.add(W?ia.rotate(-Re.angle):ia),Va=ce.allowVerticalPlacement&&Fr.placedOrientation===o.WritingMode.vertical?Math.PI/2:0,za=0;za<Fr.numGlyphs;za++)o.addDynamicAttributes(qt,Ea,Va);Xt&&Fr.associatedIconIndex>=0&&(Ur[Fr.associatedIconIndex]={shiftedAnchor:Ea,angle:Va})}}if(Xt){Cr.clear();for(var ga=ce.icon.placedSymbolArray,Fa=0;Fa<ga.length;Fa++){var Ia=ga.get(Fa);if(Ia.hidden)aa(Ia.numGlyphs,Cr);else{var Ka=Ur[Fa];if(!Ka)aa(Ia.numGlyphs,Cr);else for(var Wa=0;Wa<Ia.numGlyphs;Wa++)o.addDynamicAttributes(Cr,Ka.shiftedAnchor,Ka.angle)}}ce.icon.dynamicLayoutVertexBuffer.updateData(Cr)}ce.text.dynamicLayoutVertexBuffer.updateData(qt)}function ji(ce,W,fe){return fe.iconsInText&&W?"symbolTextAndIcon":ce?"symbolSDF":"symbolIcon"}function vl(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt,tr){for(var qt=ce.context,Cr=qt.gl,Ur=ce.transform,Nr=tt==="map",Fr=wt==="map",Gr=Nr&&fe.layout.get("symbol-placement")!=="point",nn=Nr&&!Fr&&!Gr,Cn=fe.layout.get("symbol-sort-key").constantOr(1)!==void 0,Rn=!1,Bn=ce.depthModeForSublayer(0,gr.ReadOnly),Nn=fe.layout.get("text-variable-anchor"),Fn=[],Vn=0,Zn=Q;Vn<Zn.length;Vn+=1){var ea=Zn[Vn],ca=W.getTile(ea),ia=ca.getBucket(fe);if(ia){var Ea=he?ia.text:ia.icon;if(!(!Ea||!Ea.segments.get().length)){var Va=Ea.programConfigurations.get(fe.id),za=he||ia.sdfIcons,ga=he?ia.textSizeData:ia.iconSizeData,Fa=Fr||Ur.pitch!==0,Ia=ce.useProgram(ji(za,he,ia),Va),Ka=o.evaluateSizeForZoom(ga,Ur.zoom),Wa=void 0,fi=[0,0],Ua=void 0,ii=void 0,ka=null,Ha=void 0;if(he){if(Ua=ca.glyphAtlasTexture,ii=Cr.LINEAR,Wa=ca.glyphAtlasTexture.size,ia.iconsInText){fi=ca.imageAtlasTexture.size,ka=ca.imageAtlasTexture;var Si=ga.kind==="composite"||ga.kind==="camera";Ha=Fa||ce.options.rotating||ce.options.zooming||Si?Cr.LINEAR:Cr.NEAREST}}else{var Ji=fe.layout.get("icon-size").constantOr(0)!==1||ia.iconsNeedLinear;Ua=ca.imageAtlasTexture,ii=za||ce.options.rotating||ce.options.zooming||Ji||Fa?Cr.LINEAR:Cr.NEAREST,Wa=ca.imageAtlasTexture.size}var fs=fn(ca,1,ce.transform.zoom),cs=Lr(ea.posMatrix,Fr,Nr,ce.transform,fs),As=Br(ea.posMatrix,Fr,Nr,ce.transform,fs),js=Nn&&ia.hasTextData(),pu=fe.layout.get("icon-text-fit")!=="none"&&js&&ia.hasIconData();Gr&&ln(ia,ea.posMatrix,ce,he,cs,As,Fr,zt);var Ks=ce.translatePosMatrix(ea.posMatrix,ca,Re,Ge),Lo=Gr||he&&Nn||pu?bs:cs,Js=ce.translatePosMatrix(As,ca,Re,Ge,!0),Uo=za&&fe.paint.get(he?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Po=void 0;za?ia.iconsInText?Po=su(ga.kind,Ka,nn,Fr,ce,Ks,Lo,Js,Wa,fi):Po=Ul(ga.kind,Ka,nn,Fr,ce,Ks,Lo,Js,he,Wa):Po=ll(ga.kind,Ka,nn,Fr,ce,Ks,Lo,Js,he,Wa);var Ms={program:Ia,buffers:Ea,uniformValues:Po,atlasTexture:Ua,atlasTextureIcon:ka,atlasInterpolation:ii,atlasInterpolationIcon:Ha,isSDF:za,hasHalo:Uo};if(Cn&&ia.canOverlap){Rn=!0;for(var Tl=Ea.segments.get(),Ss=0,kf=Tl;Ss<kf.length;Ss+=1){var Zu=kf[Ss];Fn.push({segments:new o.SegmentVector([Zu]),sortKey:Zu.sortKey,state:Ms})}}else Fn.push({segments:Ea.segments,sortKey:0,state:Ms})}}}Rn&&Fn.sort(function(zf,Ff){return zf.sortKey-Ff.sortKey});for(var eo=0,_f=Fn;eo<_f.length;eo+=1){var Sf=_f[eo],go=Sf.state;if(qt.activeTexture.set(Cr.TEXTURE0),go.atlasTexture.bind(go.atlasInterpolation,Cr.CLAMP_TO_EDGE),go.atlasTextureIcon&&(qt.activeTexture.set(Cr.TEXTURE1),go.atlasTextureIcon&&go.atlasTextureIcon.bind(go.atlasInterpolationIcon,Cr.CLAMP_TO_EDGE)),go.isSDF){var ju=go.uniformValues;go.hasHalo&&(ju.u_is_halo=1,Xs(go.buffers,Sf.segments,fe,ce,go.program,Bn,Xt,tr,ju)),ju.u_is_halo=0}Xs(go.buffers,Sf.segments,fe,ce,go.program,Bn,Xt,tr,go.uniformValues)}}function Xs(ce,W,fe,Q,he,Re,Ge,tt,wt){var zt=Q.context,Xt=zt.gl;he.draw(zt,Xt.TRIANGLES,Re,Ge,tt,Et.disabled,wt,fe.id,ce.layoutVertexBuffer,ce.indexBuffer,W,fe.paint,Q.transform.zoom,ce.programConfigurations.get(fe.id),ce.dynamicLayoutVertexBuffer,ce.opacityVertexBuffer)}function Nu(ce,W,fe,Q){if(ce.renderPass==="translucent"){var he=fe.paint.get("circle-opacity"),Re=fe.paint.get("circle-stroke-width"),Ge=fe.paint.get("circle-stroke-opacity"),tt=fe.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(he.constantOr(1)===0&&(Re.constantOr(1)===0||Ge.constantOr(1)===0))){for(var wt=ce.context,zt=wt.gl,Xt=ce.depthModeForSublayer(0,gr.ReadOnly),tr=Wt.disabled,qt=ce.colorModeForRenderPass(),Cr=[],Ur=0;Ur<Q.length;Ur++){var Nr=Q[Ur],Fr=W.getTile(Nr),Gr=Fr.getBucket(fe);if(Gr){var nn=Gr.programConfigurations.get(fe.id),Cn=ce.useProgram("circle",nn),Rn=Gr.layoutVertexBuffer,Bn=Gr.indexBuffer,Nn=pf(ce,Nr,Fr,fe),Fn={programConfiguration:nn,program:Cn,layoutVertexBuffer:Rn,indexBuffer:Bn,uniformValues:Nn};if(tt)for(var Vn=Gr.segments.get(),Zn=0,ea=Vn;Zn<ea.length;Zn+=1){var ca=ea[Zn];Cr.push({segments:new o.SegmentVector([ca]),sortKey:ca.sortKey,state:Fn})}else Cr.push({segments:Gr.segments,sortKey:0,state:Fn})}}tt&&Cr.sort(function(Ua,ii){return Ua.sortKey-ii.sortKey});for(var ia=0,Ea=Cr;ia<Ea.length;ia+=1){var Va=Ea[ia],za=Va.state,ga=za.programConfiguration,Fa=za.program,Ia=za.layoutVertexBuffer,Ka=za.indexBuffer,Wa=za.uniformValues,fi=Va.segments;Fa.draw(wt,zt.TRIANGLES,Xt,tr,qt,Et.disabled,Wa,fe.id,Ia,Ka,fi,fe.paint,ce.transform.zoom,ga)}}}}function ls(ce,W,fe,Q){if(fe.paint.get("heatmap-opacity")!==0)if(ce.renderPass==="offscreen"){var he=ce.context,Re=he.gl,Ge=Wt.disabled,tt=new qe([Re.ONE,Re.ONE],o.Color.transparent,[!0,!0,!0,!0]);bf(he,ce,fe),he.clear({color:o.Color.transparent});for(var wt=0;wt<Q.length;wt++){var zt=Q[wt];if(!W.hasRenderableParent(zt)){var Xt=W.getTile(zt),tr=Xt.getBucket(fe);if(tr){var qt=tr.programConfigurations.get(fe.id),Cr=ce.useProgram("heatmap",qt),Ur=ce.transform,Nr=Ur.zoom;Cr.draw(he,Re.TRIANGLES,gr.disabled,Ge,tt,Et.disabled,Zo(zt.posMatrix,Xt,Nr,fe.paint.get("heatmap-intensity")),fe.id,tr.layoutVertexBuffer,tr.indexBuffer,tr.segments,fe.paint,ce.transform.zoom,qt)}}}he.viewport.set([0,0,ce.width,ce.height])}else ce.renderPass==="translucent"&&(ce.context.setColorMode(ce.colorModeForRenderPass()),dl(ce,fe))}function bf(ce,W,fe){var Q=ce.gl;ce.activeTexture.set(Q.TEXTURE1),ce.viewport.set([0,0,W.width/4,W.height/4]);var he=fe.heatmapFbo;if(he)Q.bindTexture(Q.TEXTURE_2D,he.colorAttachment.get()),ce.bindFramebuffer.set(he.framebuffer);else{var Re=Q.createTexture();Q.bindTexture(Q.TEXTURE_2D,Re),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_S,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_T,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MIN_FILTER,Q.LINEAR),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MAG_FILTER,Q.LINEAR),he=fe.heatmapFbo=ce.createFramebuffer(W.width/4,W.height/4,!1),oo(ce,W,Re,he)}}function oo(ce,W,fe,Q){var he=ce.gl,Re=ce.extRenderToTextureHalfFloat?ce.extTextureHalfFloat.HALF_FLOAT_OES:he.UNSIGNED_BYTE;he.texImage2D(he.TEXTURE_2D,0,he.RGBA,W.width/4,W.height/4,0,he.RGBA,Re,null),Q.colorAttachment.set(fe)}function dl(ce,W){var fe=ce.context,Q=fe.gl,he=W.heatmapFbo;if(he){fe.activeTexture.set(Q.TEXTURE0),Q.bindTexture(Q.TEXTURE_2D,he.colorAttachment.get()),fe.activeTexture.set(Q.TEXTURE1);var Re=W.colorRampTexture;Re||(Re=W.colorRampTexture=new o.Texture(fe,W.colorRamp,Q.RGBA)),Re.bind(Q.LINEAR,Q.CLAMP_TO_EDGE),ce.useProgram("heatmapTexture").draw(fe,Q.TRIANGLES,gr.disabled,Wt.disabled,ce.colorModeForRenderPass(),Et.disabled,mf(ce,W,0,1),W.id,ce.viewportBuffer,ce.quadTriangleIndexBuffer,ce.viewportSegments,W.paint,ce.transform.zoom)}}function Hl(ce,W,fe,Q){if(ce.renderPass==="translucent"){var he=fe.paint.get("line-opacity"),Re=fe.paint.get("line-width");if(!(he.constantOr(1)===0||Re.constantOr(1)===0))for(var Ge=ce.depthModeForSublayer(0,gr.ReadOnly),tt=ce.colorModeForRenderPass(),wt=fe.paint.get("line-dasharray"),zt=fe.paint.get("line-pattern"),Xt=zt.constantOr(1),tr=fe.paint.get("line-gradient"),qt=fe.getCrossfadeParameters(),Cr=Xt?"linePattern":wt?"lineSDF":tr?"lineGradient":"line",Ur=ce.context,Nr=Ur.gl,Fr=!0,Gr=0,nn=Q;Gr<nn.length;Gr+=1){var Cn=nn[Gr],Rn=W.getTile(Cn);if(!(Xt&&!Rn.patternsLoaded())){var Bn=Rn.getBucket(fe);if(Bn){var Nn=Bn.programConfigurations.get(fe.id),Fn=ce.context.program.get(),Vn=ce.useProgram(Cr,Nn),Zn=Fr||Vn.program!==Fn,ea=zt.constantOr(null);if(ea&&Rn.imageAtlas){var ca=Rn.imageAtlas,ia=ca.patternPositions[ea.to.toString()],Ea=ca.patternPositions[ea.from.toString()];ia&&Ea&&Nn.setConstantPatternPositions(ia,Ea)}var Va=Xt?Fu(ce,Rn,fe,qt):wt?jo(ce,Rn,fe,wt,qt):tr?xs(ce,Rn,fe,Bn.lineClipsArray.length):ms(ce,Rn,fe);if(Xt)Ur.activeTexture.set(Nr.TEXTURE0),Rn.imageAtlasTexture.bind(Nr.LINEAR,Nr.CLAMP_TO_EDGE),Nn.updatePaintBuffers(qt);else if(wt&&(Zn||ce.lineAtlas.dirty))Ur.activeTexture.set(Nr.TEXTURE0),ce.lineAtlas.bind(Ur);else if(tr){var za=Bn.gradients[fe.id],ga=za.texture;if(fe.gradientVersion!==za.version){var Fa=256;if(fe.stepInterpolant){var Ia=W.getSource().maxzoom,Ka=Cn.canonical.z===Ia?Math.ceil(1<<ce.transform.maxZoom-Cn.canonical.z):1,Wa=Bn.maxLineLength/o.EXTENT,fi=1024,Ua=Wa*fi*Ka;Fa=o.clamp(o.nextPowerOfTwo(Ua),256,Ur.maxTextureSize)}za.gradient=o.renderColorRamp({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Fa,image:za.gradient||void 0,clips:Bn.lineClipsArray}),za.texture?za.texture.update(za.gradient):za.texture=new o.Texture(Ur,za.gradient,Nr.RGBA),za.version=fe.gradientVersion,ga=za.texture}Ur.activeTexture.set(Nr.TEXTURE0),ga.bind(fe.stepInterpolant?Nr.NEAREST:Nr.LINEAR,Nr.CLAMP_TO_EDGE)}Vn.draw(Ur,Nr.TRIANGLES,Ge,ce.stencilModeForClipping(Cn),tt,Et.disabled,Va,fe.id,Bn.layoutVertexBuffer,Bn.indexBuffer,Bn.segments,fe.paint,ce.transform.zoom,Nn,Bn.layoutVertexBuffer2),Fr=!1}}}}}function Jo(ce,W,fe,Q){var he=fe.paint.get("fill-color"),Re=fe.paint.get("fill-opacity");if(Re.constantOr(1)!==0){var Ge=ce.colorModeForRenderPass(),tt=fe.paint.get("fill-pattern"),wt=ce.opaquePassEnabledForLayer()&&!tt.constantOr(1)&&he.constantOr(o.Color.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(ce.renderPass===wt){var zt=ce.depthModeForSublayer(1,ce.renderPass==="opaque"?gr.ReadWrite:gr.ReadOnly);us(ce,W,fe,Q,zt,Ge,!1)}if(ce.renderPass==="translucent"&&fe.paint.get("fill-antialias")){var Xt=ce.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,gr.ReadOnly);us(ce,W,fe,Q,Xt,Ge,!0)}}}function us(ce,W,fe,Q,he,Re,Ge){var tt=ce.context.gl,wt=fe.paint.get("fill-pattern"),zt=wt&&wt.constantOr(1),Xt=fe.getCrossfadeParameters(),tr,qt,Cr,Ur,Nr;Ge?(qt=zt&&!fe.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",tr=tt.LINES):(qt=zt?"fillPattern":"fill",tr=tt.TRIANGLES);for(var Fr=0,Gr=Q;Fr<Gr.length;Fr+=1){var nn=Gr[Fr],Cn=W.getTile(nn);if(!(zt&&!Cn.patternsLoaded())){var Rn=Cn.getBucket(fe);if(Rn){var Bn=Rn.programConfigurations.get(fe.id),Nn=ce.useProgram(qt,Bn);zt&&(ce.context.activeTexture.set(tt.TEXTURE0),Cn.imageAtlasTexture.bind(tt.LINEAR,tt.CLAMP_TO_EDGE),Bn.updatePaintBuffers(Xt));var Fn=wt.constantOr(null);if(Fn&&Cn.imageAtlas){var Vn=Cn.imageAtlas,Zn=Vn.patternPositions[Fn.to.toString()],ea=Vn.patternPositions[Fn.from.toString()];Zn&&ea&&Bn.setConstantPatternPositions(Zn,ea)}var ca=ce.translatePosMatrix(nn.posMatrix,Cn,fe.paint.get("fill-translate"),fe.paint.get("fill-translate-anchor"));if(!Ge)Ur=Rn.indexBuffer,Nr=Rn.segments,Cr=zt?So(ca,ce,Xt,Cn):Xo(ca);else{Ur=Rn.indexBuffer2,Nr=Rn.segments2;var ia=[tt.drawingBufferWidth,tt.drawingBufferHeight];Cr=qt==="fillOutlinePattern"&&zt?il(ca,ce,Xt,Cn,ia):po(ca,ia)}Nn.draw(ce.context,tr,he,ce.stencilModeForClipping(nn),Re,Et.disabled,Cr,fe.id,Rn.layoutVertexBuffer,Ur,Nr,fe.paint,ce.transform.zoom,Bn)}}}}function uu(ce,W,fe,Q){var he=fe.paint.get("fill-extrusion-opacity");if(he!==0&&ce.renderPass==="translucent"){var Re=new gr(ce.context.gl.LEQUAL,gr.ReadWrite,ce.depthRangeFor3D);if(he===1&&!fe.paint.get("fill-extrusion-pattern").constantOr(1)){var Ge=ce.colorModeForRenderPass();pl(ce,W,fe,Q,Re,Wt.disabled,Ge)}else pl(ce,W,fe,Q,Re,Wt.disabled,qe.disabled),pl(ce,W,fe,Q,Re,ce.stencilModeFor3D(),ce.colorModeForRenderPass())}}function pl(ce,W,fe,Q,he,Re,Ge){for(var tt=ce.context,wt=tt.gl,zt=fe.paint.get("fill-extrusion-pattern"),Xt=zt.constantOr(1),tr=fe.getCrossfadeParameters(),qt=fe.paint.get("fill-extrusion-opacity"),Cr=0,Ur=Q;Cr<Ur.length;Cr+=1){var Nr=Ur[Cr],Fr=W.getTile(Nr),Gr=Fr.getBucket(fe);if(Gr){var nn=Gr.programConfigurations.get(fe.id),Cn=ce.useProgram(Xt?"fillExtrusionPattern":"fillExtrusion",nn);Xt&&(ce.context.activeTexture.set(wt.TEXTURE0),Fr.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),nn.updatePaintBuffers(tr));var Rn=zt.constantOr(null);if(Rn&&Fr.imageAtlas){var Bn=Fr.imageAtlas,Nn=Bn.patternPositions[Rn.to.toString()],Fn=Bn.patternPositions[Rn.from.toString()];Nn&&Fn&&nn.setConstantPatternPositions(Nn,Fn)}var Vn=ce.translatePosMatrix(Nr.posMatrix,Fr,fe.paint.get("fill-extrusion-translate"),fe.paint.get("fill-extrusion-translate-anchor")),Zn=fe.paint.get("fill-extrusion-vertical-gradient"),ea=Xt?Ao(Vn,ce,Zn,qt,Nr,tr,Fr):al(Vn,ce,Zn,qt);Cn.draw(tt,tt.gl.TRIANGLES,he,Re,Ge,Et.backCCW,ea,fe.id,Gr.layoutVertexBuffer,Gr.indexBuffer,Gr.segments,fe.paint,ce.transform.zoom,nn)}}}function yl(ce,W,fe,Q){if(!(ce.renderPass!=="offscreen"&&ce.renderPass!=="translucent")){for(var he=ce.context,Re=ce.depthModeForSublayer(0,gr.ReadOnly),Ge=ce.colorModeForRenderPass(),tt=ce.renderPass==="translucent"?ce.stencilConfigForOverlap(Q):[{},Q],wt=tt[0],zt=tt[1],Xt=0,tr=zt;Xt<tr.length;Xt+=1){var qt=tr[Xt],Cr=W.getTile(qt);Cr.needsHillshadePrepare&&ce.renderPass==="offscreen"?Uu(ce,Cr,fe,Re,Wt.disabled,Ge):ce.renderPass==="translucent"&&Gl(ce,Cr,fe,Re,wt[qt.overscaledZ],Ge)}he.viewport.set([0,0,ce.width,ce.height])}}function Gl(ce,W,fe,Q,he,Re){var Ge=ce.context,tt=Ge.gl,wt=W.fbo;if(wt){var zt=ce.useProgram("hillshade");Ge.activeTexture.set(tt.TEXTURE0),tt.bindTexture(tt.TEXTURE_2D,wt.colorAttachment.get());var Xt=ou(ce,W,fe);zt.draw(Ge,tt.TRIANGLES,Q,he,Re,Et.disabled,Xt,fe.id,ce.rasterBoundsBuffer,ce.quadTriangleIndexBuffer,ce.rasterBoundsSegments)}}function Uu(ce,W,fe,Q,he,Re){var Ge=ce.context,tt=Ge.gl,wt=W.dem;if(wt&&wt.data){var zt=wt.dim,Xt=wt.stride,tr=wt.getPixels();if(Ge.activeTexture.set(tt.TEXTURE1),Ge.pixelStoreUnpackPremultiplyAlpha.set(!1),W.demTexture=W.demTexture||ce.getTileTexture(Xt),W.demTexture){var qt=W.demTexture;qt.update(tr,{premultiply:!1}),qt.bind(tt.NEAREST,tt.CLAMP_TO_EDGE)}else W.demTexture=new o.Texture(Ge,tr,tt.RGBA,{premultiply:!1}),W.demTexture.bind(tt.NEAREST,tt.CLAMP_TO_EDGE);Ge.activeTexture.set(tt.TEXTURE0);var Cr=W.fbo;if(!Cr){var Ur=new o.Texture(Ge,{width:zt,height:zt,data:null},tt.RGBA);Ur.bind(tt.LINEAR,tt.CLAMP_TO_EDGE),Cr=W.fbo=Ge.createFramebuffer(zt,zt,!0),Cr.colorAttachment.set(Ur.texture)}Ge.bindFramebuffer.set(Cr.framebuffer),Ge.viewport.set([0,0,zt,zt]),ce.useProgram("hillshadePrepare").draw(Ge,tt.TRIANGLES,Q,he,Re,Et.disabled,zu(W.tileID,wt),fe.id,ce.rasterBoundsBuffer,ce.quadTriangleIndexBuffer,ce.rasterBoundsSegments),W.needsHillshadePrepare=!1}}function ml(ce,W,fe,Q){if(ce.renderPass==="translucent"&&fe.paint.get("raster-opacity")!==0&&Q.length)for(var he=ce.context,Re=he.gl,Ge=W.getSource(),tt=ce.useProgram("raster"),wt=ce.colorModeForRenderPass(),zt=Ge instanceof j?[{},Q]:ce.stencilConfigForOverlap(Q),Xt=zt[0],tr=zt[1],qt=tr[tr.length-1].overscaledZ,Cr=!ce.options.moving,Ur=0,Nr=tr;Ur<Nr.length;Ur+=1){var Fr=Nr[Ur],Gr=ce.depthModeForSublayer(Fr.overscaledZ-qt,fe.paint.get("raster-opacity")===1?gr.ReadWrite:gr.ReadOnly,Re.LESS),nn=W.getTile(Fr),Cn=ce.transform.calculatePosMatrix(Fr.toUnwrapped(),Cr);nn.registerFadeDuration(fe.paint.get("raster-fade-duration"));var Rn=W.findLoadedParent(Fr,0),Bn=fu(nn,Rn,W,fe,ce.transform),Nn=void 0,Fn=void 0,Vn=fe.paint.get("raster-resampling")==="nearest"?Re.NEAREST:Re.LINEAR;he.activeTexture.set(Re.TEXTURE0),nn.texture.bind(Vn,Re.CLAMP_TO_EDGE,Re.LINEAR_MIPMAP_NEAREST),he.activeTexture.set(Re.TEXTURE1),Rn?(Rn.texture.bind(Vn,Re.CLAMP_TO_EDGE,Re.LINEAR_MIPMAP_NEAREST),Nn=Math.pow(2,Rn.tileID.overscaledZ-nn.tileID.overscaledZ),Fn=[nn.tileID.canonical.x*Nn%1,nn.tileID.canonical.y*Nn%1]):nn.texture.bind(Vn,Re.CLAMP_TO_EDGE,Re.LINEAR_MIPMAP_NEAREST);var Zn=sl(Cn,Fn||[0,0],Nn||1,Bn,fe);Ge instanceof j?tt.draw(he,Re.TRIANGLES,Gr,Wt.disabled,wt,Et.disabled,Zn,fe.id,Ge.boundsBuffer,ce.quadTriangleIndexBuffer,Ge.boundsSegments):tt.draw(he,Re.TRIANGLES,Gr,Xt[Fr.overscaledZ],wt,Et.disabled,Zn,fe.id,ce.rasterBoundsBuffer,ce.quadTriangleIndexBuffer,ce.rasterBoundsSegments)}}function fu(ce,W,fe,Q,he){var Re=Q.paint.get("raster-fade-duration");if(Re>0){var Ge=o.browser.now(),tt=(Ge-ce.timeAdded)/Re,wt=W?(Ge-W.timeAdded)/Re:-1,zt=fe.getSource(),Xt=he.coveringZoomLevel({tileSize:zt.tileSize,roundZoom:zt.roundZoom}),tr=!W||Math.abs(W.tileID.overscaledZ-Xt)>Math.abs(ce.tileID.overscaledZ-Xt),qt=tr&&ce.refreshedUponExpiration?1:o.clamp(tr?tt:1-wt,0,1);return ce.refreshedUponExpiration&&tt>=1&&(ce.refreshedUponExpiration=!1),W?{opacity:1,mix:1-qt}:{opacity:qt,mix:0}}else return{opacity:1,mix:0}}function ws(ce,W,fe){var Q=fe.paint.get("background-color"),he=fe.paint.get("background-opacity");if(he!==0){var Re=ce.context,Ge=Re.gl,tt=ce.transform,wt=tt.tileSize,zt=fe.paint.get("background-pattern");if(!ce.isPatternMissing(zt)){var Xt=!zt&&Q.a===1&&he===1&&ce.opaquePassEnabledForLayer()?"opaque":"translucent";if(ce.renderPass===Xt){var tr=Wt.disabled,qt=ce.depthModeForSublayer(0,Xt==="opaque"?gr.ReadWrite:gr.ReadOnly),Cr=ce.colorModeForRenderPass(),Ur=ce.useProgram(zt?"backgroundPattern":"background"),Nr=tt.coveringTiles({tileSize:wt});zt&&(Re.activeTexture.set(Ge.TEXTURE0),ce.imageManager.bind(ce.context));for(var Fr=fe.getCrossfadeParameters(),Gr=0,nn=Nr;Gr<nn.length;Gr+=1){var Cn=nn[Gr],Rn=ce.transform.calculatePosMatrix(Cn.toUnwrapped()),Bn=zt?cl(Rn,he,ce,zt,{tileID:Cn,tileSize:wt},Fr):os(Rn,he,Q);Ur.draw(Re,Ge.TRIANGLES,qt,tr,Cr,Et.disabled,Bn,fe.id,ce.tileExtentBuffer,ce.quadTriangleIndexBuffer,ce.tileExtentSegments)}}}}}var cu=new o.Color(1,0,0,1),xl=new o.Color(0,1,0,1),Vu=new o.Color(0,0,1,1),We=new o.Color(1,0,1,1),$e=new o.Color(0,1,1,1);function ft(ce){var W=ce.transform.padding,fe=3;Pt(ce,ce.transform.height-(W.top||0),fe,cu),Pt(ce,W.bottom||0,fe,xl),St(ce,W.left||0,fe,Vu),St(ce,ce.transform.width-(W.right||0),fe,We);var Q=ce.transform.centerPoint;pt(ce,Q.x,ce.transform.height-Q.y,$e)}function pt(ce,W,fe,Q){var he=20,Re=2;kt(ce,W-Re/2,fe-he/2,Re,he,Q),kt(ce,W-he/2,fe-Re/2,he,Re,Q)}function Pt(ce,W,fe,Q){kt(ce,0,W+fe/2,ce.transform.width,fe,Q)}function St(ce,W,fe,Q){kt(ce,W-fe/2,0,fe,ce.transform.height,Q)}function kt(ce,W,fe,Q,he,Re){var Ge=ce.context,tt=Ge.gl;tt.enable(tt.SCISSOR_TEST),tt.scissor(W*o.browser.devicePixelRatio,fe*o.browser.devicePixelRatio,Q*o.browser.devicePixelRatio,he*o.browser.devicePixelRatio),Ge.clear({color:Re}),tt.disable(tt.SCISSOR_TEST)}function ur(ce,W,fe){for(var Q=0;Q<fe.length;Q++)dr(ce,W,fe[Q])}function dr(ce,W,fe){var Q=ce.context,he=Q.gl,Re=fe.posMatrix,Ge=ce.useProgram("debug"),tt=gr.disabled,wt=Wt.disabled,zt=ce.colorModeForRenderPass(),Xt="$debug";Q.activeTexture.set(he.TEXTURE0),ce.emptyTexture.bind(he.LINEAR,he.CLAMP_TO_EDGE),Ge.draw(Q,he.LINE_STRIP,tt,wt,zt,Et.disabled,_i(Re,o.Color.red),Xt,ce.debugBuffer,ce.tileBorderIndexBuffer,ce.debugSegments);var tr=W.getTileByID(fe.key).latestRawTileData,qt=tr&&tr.byteLength||0,Cr=Math.floor(qt/1024),Ur=W.getTile(fe).tileSize,Nr=512/Math.min(Ur,512)*(fe.overscaledZ/ce.transform.zoom)*.5,Fr=fe.canonical.toString();fe.overscaledZ!==fe.canonical.z&&(Fr+=" => "+fe.overscaledZ);var Gr=Fr+" "+Cr+"kb";$t(ce,Gr),Ge.draw(Q,he.TRIANGLES,tt,wt,qe.alphaBlended,Et.disabled,_i(Re,o.Color.transparent,Nr),Xt,ce.debugBuffer,ce.quadTriangleIndexBuffer,ce.debugSegments)}function $t(ce,W){ce.initDebugOverlayCanvas();var fe=ce.debugOverlayCanvas,Q=ce.context.gl,he=ce.debugOverlayCanvas.getContext("2d");he.clearRect(0,0,fe.width,fe.height),he.shadowColor="white",he.shadowBlur=2,he.lineWidth=1.5,he.strokeStyle="white",he.textBaseline="top",he.font="bold 36px Open Sans, sans-serif",he.fillText(W,5,5),he.strokeText(W,5,5),ce.debugOverlayTexture.update(fe),ce.debugOverlayTexture.bind(Q.LINEAR,Q.CLAMP_TO_EDGE)}function mr(ce,W,fe){var Q=ce.context,he=fe.implementation;if(ce.renderPass==="offscreen"){var Re=he.prerender;Re&&(ce.setCustomLayerDefaults(),Q.setColorMode(ce.colorModeForRenderPass()),Re.call(he,Q.gl,ce.transform.customLayerMatrix()),Q.setDirty(),ce.setBaseState())}else if(ce.renderPass==="translucent"){ce.setCustomLayerDefaults(),Q.setColorMode(ce.colorModeForRenderPass()),Q.setStencilMode(Wt.disabled);var Ge=he.renderingMode==="3d"?new gr(ce.context.gl.LEQUAL,gr.ReadWrite,ce.depthRangeFor3D):ce.depthModeForSublayer(0,gr.ReadOnly);Q.setDepthMode(Ge),he.render(Q.gl,ce.transform.customLayerMatrix()),Q.setDirty(),ce.setBaseState(),Q.bindFramebuffer.set(null)}}var Er={symbol:Vl,circle:Nu,heatmap:ls,line:Hl,fill:Jo,"fill-extrusion":uu,hillshade:yl,raster:ml,background:ws,debug:ur,custom:mr},Ir=function(W,fe){this.context=new Mt(W),this.transform=fe,this._tileTextures={},this.setup(),this.numSublayers=_t.maxUnderzooming+_t.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $n,this.gpuTimers={}};Ir.prototype.resize=function(W,fe){if(this.width=W*o.browser.devicePixelRatio,this.height=fe*o.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var Q=0,he=this.style._order;Q<he.length;Q+=1){var Re=he[Q];this.style._layers[Re].resize()}},Ir.prototype.setup=function(){var W=this.context,fe=new o.StructArrayLayout2i4;fe.emplaceBack(0,0),fe.emplaceBack(o.EXTENT,0),fe.emplaceBack(0,o.EXTENT),fe.emplaceBack(o.EXTENT,o.EXTENT),this.tileExtentBuffer=W.createVertexBuffer(fe,ao.members),this.tileExtentSegments=o.SegmentVector.simpleSegment(0,0,4,2);var Q=new o.StructArrayLayout2i4;Q.emplaceBack(0,0),Q.emplaceBack(o.EXTENT,0),Q.emplaceBack(0,o.EXTENT),Q.emplaceBack(o.EXTENT,o.EXTENT),this.debugBuffer=W.createVertexBuffer(Q,ao.members),this.debugSegments=o.SegmentVector.simpleSegment(0,0,4,5);var he=new o.StructArrayLayout4i8;he.emplaceBack(0,0,0,0),he.emplaceBack(o.EXTENT,0,o.EXTENT,0),he.emplaceBack(0,o.EXTENT,0,o.EXTENT),he.emplaceBack(o.EXTENT,o.EXTENT,o.EXTENT,o.EXTENT),this.rasterBoundsBuffer=W.createVertexBuffer(he,V.members),this.rasterBoundsSegments=o.SegmentVector.simpleSegment(0,0,4,2);var Re=new o.StructArrayLayout2i4;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=W.createVertexBuffer(Re,ao.members),this.viewportSegments=o.SegmentVector.simpleSegment(0,0,4,2);var Ge=new o.StructArrayLayout1ui2;Ge.emplaceBack(0),Ge.emplaceBack(1),Ge.emplaceBack(3),Ge.emplaceBack(2),Ge.emplaceBack(0),this.tileBorderIndexBuffer=W.createIndexBuffer(Ge);var tt=new o.StructArrayLayout3ui6;tt.emplaceBack(0,1,2),tt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=W.createIndexBuffer(tt),this.emptyTexture=new o.Texture(W,{width:1,height:1,data:new Uint8Array([0,0,0,0])},W.gl.RGBA);var wt=this.context.gl;this.stencilClearMode=new Wt({func:wt.ALWAYS,mask:0},0,255,wt.ZERO,wt.ZERO,wt.ZERO)},Ir.prototype.clearStencil=function(){var W=this.context,fe=W.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var Q=o.create();o.ortho(Q,0,this.width,this.height,0,0,1),o.scale(Q,Q,[fe.drawingBufferWidth,fe.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(W,fe.TRIANGLES,gr.disabled,this.stencilClearMode,qe.disabled,Et.disabled,Us(Q),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Ir.prototype._renderTileClippingMasks=function(W,fe){if(!(this.currentStencilSource===W.source||!W.isTileClipped()||!fe||!fe.length)){this.currentStencilSource=W.source;var Q=this.context,he=Q.gl;this.nextStencilID+fe.length>256&&this.clearStencil(),Q.setColorMode(qe.disabled),Q.setDepthMode(gr.disabled);var Re=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Ge=0,tt=fe;Ge<tt.length;Ge+=1){var wt=tt[Ge],zt=this._tileClippingMaskIDs[wt.key]=this.nextStencilID++;Re.draw(Q,he.TRIANGLES,gr.disabled,new Wt({func:he.ALWAYS,mask:0},zt,255,he.KEEP,he.KEEP,he.REPLACE),qe.disabled,Et.disabled,Us(wt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Ir.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var W=this.nextStencilID++,fe=this.context.gl;return new Wt({func:fe.NOTEQUAL,mask:255},W,255,fe.KEEP,fe.KEEP,fe.REPLACE)},Ir.prototype.stencilModeForClipping=function(W){var fe=this.context.gl;return new Wt({func:fe.EQUAL,mask:255},this._tileClippingMaskIDs[W.key],0,fe.KEEP,fe.KEEP,fe.REPLACE)},Ir.prototype.stencilConfigForOverlap=function(W){var fe,Q=this.context.gl,he=W.sort(function(zt,Xt){return Xt.overscaledZ-zt.overscaledZ}),Re=he[he.length-1].overscaledZ,Ge=he[0].overscaledZ-Re+1;if(Ge>1){this.currentStencilSource=void 0,this.nextStencilID+Ge>256&&this.clearStencil();for(var tt={},wt=0;wt<Ge;wt++)tt[wt+Re]=new Wt({func:Q.GEQUAL,mask:255},wt+this.nextStencilID,255,Q.KEEP,Q.KEEP,Q.REPLACE);return this.nextStencilID+=Ge,[tt,he]}return[(fe={},fe[Re]=Wt.disabled,fe),he]},Ir.prototype.colorModeForRenderPass=function(){var W=this.context.gl;if(this._showOverdrawInspector){var fe=8,Q=1/fe;return new qe([W.CONSTANT_COLOR,W.ONE],new o.Color(Q,Q,Q,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?qe.unblended:qe.alphaBlended},Ir.prototype.depthModeForSublayer=function(W,fe,Q){if(!this.opaquePassEnabledForLayer())return gr.disabled;var he=1-((1+this.currentLayer)*this.numSublayers+W)*this.depthEpsilon;return new gr(Q||this.context.gl.LEQUAL,fe,[he,he])},Ir.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Ir.prototype.render=function(W,fe){var Q=this;this.style=W,this.options=fe,this.lineAtlas=W.lineAtlas,this.imageManager=W.imageManager,this.glyphManager=W.glyphManager,this.symbolFadeChange=W.placement.symbolFadeChange(o.browser.now()),this.imageManager.beginFrame();var he=this.style._order,Re=this.style.sourceCaches;for(var Ge in Re){var tt=Re[Ge];tt.used&&tt.prepare(this.context)}var wt={},zt={},Xt={};for(var tr in Re){var qt=Re[tr];wt[tr]=qt.getVisibleCoordinates(),zt[tr]=wt[tr].slice().reverse(),Xt[tr]=qt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Cr=0;Cr<he.length;Cr++){var Ur=he[Cr];if(this.style._layers[Ur].is3D()){this.opaquePassCutoff=Cr;break}}this.renderPass="offscreen";for(var Nr=0,Fr=he;Nr<Fr.length;Nr+=1){var Gr=Fr[Nr],nn=this.style._layers[Gr];if(!(!nn.hasOffscreenPass()||nn.isHidden(this.transform.zoom))){var Cn=zt[nn.source];nn.type!=="custom"&&!Cn.length||this.renderLayer(this,Re[nn.source],nn,Cn)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:fe.showOverdrawInspector?o.Color.black:o.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=fe.showOverdrawInspector,this.depthRangeFor3D=[0,1-(W._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=he.length-1;this.currentLayer>=0;this.currentLayer--){var Rn=this.style._layers[he[this.currentLayer]],Bn=Re[Rn.source],Nn=wt[Rn.source];this._renderTileClippingMasks(Rn,Nn),this.renderLayer(this,Bn,Rn,Nn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<he.length;this.currentLayer++){var Fn=this.style._layers[he[this.currentLayer]],Vn=Re[Fn.source],Zn=(Fn.type==="symbol"?Xt:zt)[Fn.source];this._renderTileClippingMasks(Fn,wt[Fn.source]),this.renderLayer(this,Vn,Fn,Zn)}if(this.options.showTileBoundaries){var ea,ca,ia=o.values(this.style._layers);ia.forEach(function(Ea){Ea.source&&!Ea.isHidden(Q.transform.zoom)&&(Ea.source!==(ca&&ca.id)&&(ca=Q.style.sourceCaches[Ea.source]),(!ea||ea.getSource().maxzoom<ca.getSource().maxzoom)&&(ea=ca))}),ea&&Er.debug(this,ea,ea.getVisibleCoordinates())}this.options.showPadding&&ft(this),this.context.setDefault()},Ir.prototype.renderLayer=function(W,fe,Q,he){Q.isHidden(this.transform.zoom)||Q.type!=="background"&&Q.type!=="custom"&&!he.length||(this.id=Q.id,this.gpuTimingStart(Q),Er[Q.type](W,fe,Q,he,this.style.placement.variableOffsets),this.gpuTimingEnd())},Ir.prototype.gpuTimingStart=function(W){if(this.options.gpuTiming){var fe=this.context.extTimerQuery,Q=this.gpuTimers[W.id];Q||(Q=this.gpuTimers[W.id]={calls:0,cpuTime:0,query:fe.createQueryEXT()}),Q.calls++,fe.beginQueryEXT(fe.TIME_ELAPSED_EXT,Q.query)}},Ir.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var W=this.context.extTimerQuery;W.endQueryEXT(W.TIME_ELAPSED_EXT)}},Ir.prototype.collectGpuTimers=function(){var W=this.gpuTimers;return this.gpuTimers={},W},Ir.prototype.queryGpuTimers=function(W){var fe={};for(var Q in W){var he=W[Q],Re=this.context.extTimerQuery,Ge=Re.getQueryObjectEXT(he.query,Re.QUERY_RESULT_EXT)/(1e3*1e3);Re.deleteQueryEXT(he.query),fe[Q]=Ge}return fe},Ir.prototype.translatePosMatrix=function(W,fe,Q,he,Re){if(!Q[0]&&!Q[1])return W;var Ge=Re?he==="map"?this.transform.angle:0:he==="viewport"?-this.transform.angle:0;if(Ge){var tt=Math.sin(Ge),wt=Math.cos(Ge);Q=[Q[0]*wt-Q[1]*tt,Q[0]*tt+Q[1]*wt]}var zt=[Re?Q[0]:fn(fe,Q[0],this.transform.zoom),Re?Q[1]:fn(fe,Q[1],this.transform.zoom),0],Xt=new Float32Array(16);return o.translate(Xt,W,zt),Xt},Ir.prototype.saveTileTexture=function(W){var fe=this._tileTextures[W.size[0]];fe?fe.push(W):this._tileTextures[W.size[0]]=[W]},Ir.prototype.getTileTexture=function(W){var fe=this._tileTextures[W];return fe&&fe.length>0?fe.pop():null},Ir.prototype.isPatternMissing=function(W){if(!W)return!1;if(!W.from||!W.to)return!0;var fe=this.imageManager.getPattern(W.from.toString()),Q=this.imageManager.getPattern(W.to.toString());return!fe||!Q},Ir.prototype.useProgram=function(W,fe){this.cache=this.cache||{};var Q=""+W+(fe?fe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[Q]||(this.cache[Q]=new au(this.context,W,Pu[W],fe,ss[W],this._showOverdrawInspector)),this.cache[Q]},Ir.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()},Ir.prototype.setBaseState=function(){var W=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(W.FUNC_ADD)},Ir.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=o.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var W=this.context.gl;this.debugOverlayTexture=new o.Texture(this.context,this.debugOverlayCanvas,W.RGBA)}},Ir.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Kr=function(W,fe){this.points=W,this.planes=fe};Kr.fromInvProjectionMatrix=function(W,fe,Q){var he=[[-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]],Re=Math.pow(2,Q),Ge=he.map(function(zt){return o.transformMat4([],zt,W)}).map(function(zt){return o.scale$1([],zt,1/zt[3]/fe*Re)}),tt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],wt=tt.map(function(zt){var Xt=o.sub([],Ge[zt[0]],Ge[zt[1]]),tr=o.sub([],Ge[zt[2]],Ge[zt[1]]),qt=o.normalize([],o.cross([],Xt,tr)),Cr=-o.dot(qt,Ge[zt[1]]);return qt.concat(Cr)});return new Kr(Ge,wt)};var hn=function(W,fe){this.min=W,this.max=fe,this.center=o.scale$2([],o.add([],this.min,this.max),.5)};hn.prototype.quadrant=function(W){for(var fe=[W%2===0,W<2],Q=o.clone$2(this.min),he=o.clone$2(this.max),Re=0;Re<fe.length;Re++)Q[Re]=fe[Re]?this.min[Re]:this.center[Re],he[Re]=fe[Re]?this.center[Re]:this.max[Re];return he[2]=this.max[2],new hn(Q,he)},hn.prototype.distanceX=function(W){var fe=Math.max(Math.min(this.max[0],W[0]),this.min[0]);return fe-W[0]},hn.prototype.distanceY=function(W){var fe=Math.max(Math.min(this.max[1],W[1]),this.min[1]);return fe-W[1]},hn.prototype.intersects=function(W){for(var fe=[[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]],Q=!0,he=0;he<W.planes.length;he++){for(var Re=W.planes[he],Ge=0,tt=0;tt<fe.length;tt++)Ge+=o.dot$1(Re,fe[tt])>=0;if(Ge===0)return 0;Ge!==fe.length&&(Q=!1)}if(Q)return 2;for(var wt=0;wt<3;wt++){for(var zt=Number.MAX_VALUE,Xt=-Number.MAX_VALUE,tr=0;tr<W.points.length;tr++){var qt=W.points[tr][wt]-this.min[wt];zt=Math.min(zt,qt),Xt=Math.max(Xt,qt)}if(Xt<0||zt>this.max[wt]-this.min[wt])return 0}return 1};var An=function(W,fe,Q,he){if(W===void 0&&(W=0),fe===void 0&&(fe=0),Q===void 0&&(Q=0),he===void 0&&(he=0),isNaN(W)||W<0||isNaN(fe)||fe<0||isNaN(Q)||Q<0||isNaN(he)||he<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=W,this.bottom=fe,this.left=Q,this.right=he};An.prototype.interpolate=function(W,fe,Q){return fe.top!=null&&W.top!=null&&(this.top=o.number(W.top,fe.top,Q)),fe.bottom!=null&&W.bottom!=null&&(this.bottom=o.number(W.bottom,fe.bottom,Q)),fe.left!=null&&W.left!=null&&(this.left=o.number(W.left,fe.left,Q)),fe.right!=null&&W.right!=null&&(this.right=o.number(W.right,fe.right,Q)),this},An.prototype.getCenter=function(W,fe){var Q=o.clamp((this.left+W-this.right)/2,0,W),he=o.clamp((this.top+fe-this.bottom)/2,0,fe);return new o.Point(Q,he)},An.prototype.equals=function(W){return this.top===W.top&&this.bottom===W.bottom&&this.left===W.left&&this.right===W.right},An.prototype.clone=function(){return new An(this.top,this.bottom,this.left,this.right)},An.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Sn=function(W,fe,Q,he,Re){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Re===void 0?!0:Re,this._minZoom=W||0,this._maxZoom=fe||22,this._minPitch=Q??0,this._maxPitch=he??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new o.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new An,this._posMatrixCache={},this._alignedPosMatrixCache={}},Un={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}};Sn.prototype.clone=function(){var W=new Sn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return W.tileSize=this.tileSize,W.latRange=this.latRange,W.width=this.width,W.height=this.height,W._center=this._center,W.zoom=this.zoom,W.angle=this.angle,W._fov=this._fov,W._pitch=this._pitch,W._unmodified=this._unmodified,W._edgeInsets=this._edgeInsets.clone(),W._calcMatrices(),W},Un.minZoom.get=function(){return this._minZoom},Un.minZoom.set=function(ce){this._minZoom!==ce&&(this._minZoom=ce,this.zoom=Math.max(this.zoom,ce))},Un.maxZoom.get=function(){return this._maxZoom},Un.maxZoom.set=function(ce){this._maxZoom!==ce&&(this._maxZoom=ce,this.zoom=Math.min(this.zoom,ce))},Un.minPitch.get=function(){return this._minPitch},Un.minPitch.set=function(ce){this._minPitch!==ce&&(this._minPitch=ce,this.pitch=Math.max(this.pitch,ce))},Un.maxPitch.get=function(){return this._maxPitch},Un.maxPitch.set=function(ce){this._maxPitch!==ce&&(this._maxPitch=ce,this.pitch=Math.min(this.pitch,ce))},Un.renderWorldCopies.get=function(){return this._renderWorldCopies},Un.renderWorldCopies.set=function(ce){ce===void 0?ce=!0:ce===null&&(ce=!1),this._renderWorldCopies=ce},Un.worldSize.get=function(){return this.tileSize*this.scale},Un.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Un.size.get=function(){return new o.Point(this.width,this.height)},Un.bearing.get=function(){return-this.angle/Math.PI*180},Un.bearing.set=function(ce){var W=-o.wrap(ce,-180,180)*Math.PI/180;this.angle!==W&&(this._unmodified=!1,this.angle=W,this._calcMatrices(),this.rotationMatrix=o.create$2(),o.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Un.pitch.get=function(){return this._pitch/Math.PI*180},Un.pitch.set=function(ce){var W=o.clamp(ce,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==W&&(this._unmodified=!1,this._pitch=W,this._calcMatrices())},Un.fov.get=function(){return this._fov/Math.PI*180},Un.fov.set=function(ce){ce=Math.max(.01,Math.min(60,ce)),this._fov!==ce&&(this._unmodified=!1,this._fov=ce/180*Math.PI,this._calcMatrices())},Un.zoom.get=function(){return this._zoom},Un.zoom.set=function(ce){var W=Math.min(Math.max(ce,this.minZoom),this.maxZoom);this._zoom!==W&&(this._unmodified=!1,this._zoom=W,this.scale=this.zoomScale(W),this.tileZoom=Math.floor(W),this.zoomFraction=W-this.tileZoom,this._constrain(),this._calcMatrices())},Un.center.get=function(){return this._center},Un.center.set=function(ce){ce.lat===this._center.lat&&ce.lng===this._center.lng||(this._unmodified=!1,this._center=ce,this._constrain(),this._calcMatrices())},Un.padding.get=function(){return this._edgeInsets.toJSON()},Un.padding.set=function(ce){this._edgeInsets.equals(ce)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ce,1),this._calcMatrices())},Un.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Sn.prototype.isPaddingEqual=function(W){return this._edgeInsets.equals(W)},Sn.prototype.interpolatePadding=function(W,fe,Q){this._unmodified=!1,this._edgeInsets.interpolate(W,fe,Q),this._constrain(),this._calcMatrices()},Sn.prototype.coveringZoomLevel=function(W){var fe=(W.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/W.tileSize));return Math.max(0,fe)},Sn.prototype.getVisibleUnwrappedCoordinates=function(W){var fe=[new o.UnwrappedTileID(0,W)];if(this._renderWorldCopies)for(var Q=this.pointCoordinate(new o.Point(0,0)),he=this.pointCoordinate(new o.Point(this.width,0)),Re=this.pointCoordinate(new o.Point(this.width,this.height)),Ge=this.pointCoordinate(new o.Point(0,this.height)),tt=Math.floor(Math.min(Q.x,he.x,Re.x,Ge.x)),wt=Math.floor(Math.max(Q.x,he.x,Re.x,Ge.x)),zt=1,Xt=tt-zt;Xt<=wt+zt;Xt++)Xt!==0&&fe.push(new o.UnwrappedTileID(Xt,W));return fe},Sn.prototype.coveringTiles=function(W){var fe=this.coveringZoomLevel(W),Q=fe;if(W.minzoom!==void 0&&fe<W.minzoom)return[];W.maxzoom!==void 0&&fe>W.maxzoom&&(fe=W.maxzoom);var he=o.MercatorCoordinate.fromLngLat(this.center),Re=Math.pow(2,fe),Ge=[Re*he.x,Re*he.y,0],tt=Kr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,fe),wt=W.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(wt=fe);var zt=3,Xt=function(ia){return{aabb:new hn([ia*Re,0,0],[(ia+1)*Re,Re,0]),zoom:0,x:0,y:0,wrap:ia,fullyVisible:!1}},tr=[],qt=[],Cr=fe,Ur=W.reparseOverscaled?Q:fe;if(this._renderWorldCopies)for(var Nr=1;Nr<=3;Nr++)tr.push(Xt(-Nr)),tr.push(Xt(Nr));for(tr.push(Xt(0));tr.length>0;){var Fr=tr.pop(),Gr=Fr.x,nn=Fr.y,Cn=Fr.fullyVisible;if(!Cn){var Rn=Fr.aabb.intersects(tt);if(Rn===0)continue;Cn=Rn===2}var Bn=Fr.aabb.distanceX(Ge),Nn=Fr.aabb.distanceY(Ge),Fn=Math.max(Math.abs(Bn),Math.abs(Nn)),Vn=zt+(1<<Cr-Fr.zoom)-2;if(Fr.zoom===Cr||Fn>Vn&&Fr.zoom>=wt){qt.push({tileID:new o.OverscaledTileID(Fr.zoom===Cr?Ur:Fr.zoom,Fr.wrap,Fr.zoom,Gr,nn),distanceSq:o.sqrLen([Ge[0]-.5-Gr,Ge[1]-.5-nn])});continue}for(var Zn=0;Zn<4;Zn++){var ea=(Gr<<1)+Zn%2,ca=(nn<<1)+(Zn>>1);tr.push({aabb:Fr.aabb.quadrant(Zn),zoom:Fr.zoom+1,x:ea,y:ca,wrap:Fr.wrap,fullyVisible:Cn})}}return qt.sort(function(ia,Ea){return ia.distanceSq-Ea.distanceSq}).map(function(ia){return ia.tileID})},Sn.prototype.resize=function(W,fe){this.width=W,this.height=fe,this.pixelsToGLUnits=[2/W,-2/fe],this._constrain(),this._calcMatrices()},Un.unmodified.get=function(){return this._unmodified},Sn.prototype.zoomScale=function(W){return Math.pow(2,W)},Sn.prototype.scaleZoom=function(W){return Math.log(W)/Math.LN2},Sn.prototype.project=function(W){var fe=o.clamp(W.lat,-this.maxValidLatitude,this.maxValidLatitude);return new o.Point(o.mercatorXfromLng(W.lng)*this.worldSize,o.mercatorYfromLat(fe)*this.worldSize)},Sn.prototype.unproject=function(W){return new o.MercatorCoordinate(W.x/this.worldSize,W.y/this.worldSize).toLngLat()},Un.point.get=function(){return this.project(this.center)},Sn.prototype.setLocationAtPoint=function(W,fe){var Q=this.pointCoordinate(fe),he=this.pointCoordinate(this.centerPoint),Re=this.locationCoordinate(W),Ge=new o.MercatorCoordinate(Re.x-(Q.x-he.x),Re.y-(Q.y-he.y));this.center=this.coordinateLocation(Ge),this._renderWorldCopies&&(this.center=this.center.wrap())},Sn.prototype.locationPoint=function(W){return this.coordinatePoint(this.locationCoordinate(W))},Sn.prototype.pointLocation=function(W){return this.coordinateLocation(this.pointCoordinate(W))},Sn.prototype.locationCoordinate=function(W){return o.MercatorCoordinate.fromLngLat(W)},Sn.prototype.coordinateLocation=function(W){return W.toLngLat()},Sn.prototype.pointCoordinate=function(W){var fe=0,Q=[W.x,W.y,0,1],he=[W.x,W.y,1,1];o.transformMat4(Q,Q,this.pixelMatrixInverse),o.transformMat4(he,he,this.pixelMatrixInverse);var Re=Q[3],Ge=he[3],tt=Q[0]/Re,wt=he[0]/Ge,zt=Q[1]/Re,Xt=he[1]/Ge,tr=Q[2]/Re,qt=he[2]/Ge,Cr=tr===qt?0:(fe-tr)/(qt-tr);return new o.MercatorCoordinate(o.number(tt,wt,Cr)/this.worldSize,o.number(zt,Xt,Cr)/this.worldSize)},Sn.prototype.coordinatePoint=function(W){var fe=[W.x*this.worldSize,W.y*this.worldSize,0,1];return o.transformMat4(fe,fe,this.pixelMatrix),new o.Point(fe[0]/fe[3],fe[1]/fe[3])},Sn.prototype.getBounds=function(){return new o.LngLatBounds().extend(this.pointLocation(new o.Point(0,0))).extend(this.pointLocation(new o.Point(this.width,0))).extend(this.pointLocation(new o.Point(this.width,this.height))).extend(this.pointLocation(new o.Point(0,this.height)))},Sn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new o.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Sn.prototype.setMaxBounds=function(W){W?(this.lngRange=[W.getWest(),W.getEast()],this.latRange=[W.getSouth(),W.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Sn.prototype.calculatePosMatrix=function(W,fe){fe===void 0&&(fe=!1);var Q=W.key,he=fe?this._alignedPosMatrixCache:this._posMatrixCache;if(he[Q])return he[Q];var Re=W.canonical,Ge=this.worldSize/this.zoomScale(Re.z),tt=Re.x+Math.pow(2,Re.z)*W.wrap,wt=o.identity(new Float64Array(16));return o.translate(wt,wt,[tt*Ge,Re.y*Ge,0]),o.scale(wt,wt,[Ge/o.EXTENT,Ge/o.EXTENT,1]),o.multiply(wt,fe?this.alignedProjMatrix:this.projMatrix,wt),he[Q]=new Float32Array(wt),he[Q]},Sn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Sn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var W=-90,fe=90,Q=-180,he=180,Re,Ge,tt,wt,zt=this.size,Xt=this._unmodified;if(this.latRange){var tr=this.latRange;W=o.mercatorYfromLat(tr[1])*this.worldSize,fe=o.mercatorYfromLat(tr[0])*this.worldSize,Re=fe-W<zt.y?zt.y/(fe-W):0}if(this.lngRange){var qt=this.lngRange;Q=o.mercatorXfromLng(qt[0])*this.worldSize,he=o.mercatorXfromLng(qt[1])*this.worldSize,Ge=he-Q<zt.x?zt.x/(he-Q):0}var Cr=this.point,Ur=Math.max(Ge||0,Re||0);if(Ur){this.center=this.unproject(new o.Point(Ge?(he+Q)/2:Cr.x,Re?(fe+W)/2:Cr.y)),this.zoom+=this.scaleZoom(Ur),this._unmodified=Xt,this._constraining=!1;return}if(this.latRange){var Nr=Cr.y,Fr=zt.y/2;Nr-Fr<W&&(wt=W+Fr),Nr+Fr>fe&&(wt=fe-Fr)}if(this.lngRange){var Gr=Cr.x,nn=zt.x/2;Gr-nn<Q&&(tt=Q+nn),Gr+nn>he&&(tt=he-nn)}(tt!==void 0||wt!==void 0)&&(this.center=this.unproject(new o.Point(tt!==void 0?tt:Cr.x,wt!==void 0?wt:Cr.y))),this._unmodified=Xt,this._constraining=!1}},Sn.prototype._calcMatrices=function(){if(this.height){var W=this._fov/2,fe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(W)*this.height;var Q=Math.PI/2+this._pitch,he=this._fov*(.5+fe.y/this.height),Re=Math.sin(he)*this.cameraToCenterDistance/Math.sin(o.clamp(Math.PI-Q-he,.01,Math.PI-.01)),Ge=this.point,tt=Ge.x,wt=Ge.y,zt=Math.cos(Math.PI/2-this._pitch)*Re+this.cameraToCenterDistance,Xt=zt*1.01,tr=this.height/50,qt=new Float64Array(16);o.perspective(qt,this._fov,this.width/this.height,tr,Xt),qt[8]=-fe.x*2/this.width,qt[9]=fe.y*2/this.height,o.scale(qt,qt,[1,-1,1]),o.translate(qt,qt,[0,0,-this.cameraToCenterDistance]),o.rotateX(qt,qt,this._pitch),o.rotateZ(qt,qt,this.angle),o.translate(qt,qt,[-tt,-wt,0]),this.mercatorMatrix=o.scale([],qt,[this.worldSize,this.worldSize,this.worldSize]),o.scale(qt,qt,[1,1,o.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=qt,this.invProjMatrix=o.invert([],this.projMatrix);var Cr=this.width%2/2,Ur=this.height%2/2,Nr=Math.cos(this.angle),Fr=Math.sin(this.angle),Gr=tt-Math.round(tt)+Nr*Cr+Fr*Ur,nn=wt-Math.round(wt)+Nr*Ur+Fr*Cr,Cn=new Float64Array(qt);if(o.translate(Cn,Cn,[Gr>.5?Gr-1:Gr,nn>.5?nn-1:nn,0]),this.alignedProjMatrix=Cn,qt=o.create(),o.scale(qt,qt,[this.width/2,-this.height/2,1]),o.translate(qt,qt,[1,-1,0]),this.labelPlaneMatrix=qt,qt=o.create(),o.scale(qt,qt,[1,-1,1]),o.translate(qt,qt,[-1,-1,0]),o.scale(qt,qt,[2/this.width,2/this.height,1]),this.glCoordMatrix=qt,this.pixelMatrix=o.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),qt=o.invert(new Float64Array(16),this.pixelMatrix),!qt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=qt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Sn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var W=this.pointCoordinate(new o.Point(0,0)),fe=[W.x*this.worldSize,W.y*this.worldSize,0,1],Q=o.transformMat4(fe,fe,this.pixelMatrix);return Q[3]/this.cameraToCenterDistance},Sn.prototype.getCameraPoint=function(){var W=this._pitch,fe=Math.tan(W)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.Point(0,fe))},Sn.prototype.getCameraQueryGeometry=function(W){var fe=this.getCameraPoint();if(W.length===1)return[W[0],fe];for(var Q=fe.x,he=fe.y,Re=fe.x,Ge=fe.y,tt=0,wt=W;tt<wt.length;tt+=1){var zt=wt[tt];Q=Math.min(Q,zt.x),he=Math.min(he,zt.y),Re=Math.max(Re,zt.x),Ge=Math.max(Ge,zt.y)}return[new o.Point(Q,he),new o.Point(Re,he),new o.Point(Re,Ge),new o.Point(Q,Ge),new o.Point(Q,he)]},Object.defineProperties(Sn.prototype,Un);function wa(ce,W){var fe=!1,Q=null,he=function(){Q=null,fe&&(ce(),Q=setTimeout(he,W),fe=!1)};return function(){return fe=!0,Q||he(),Q}}var Ta=function(W){this._hashName=W&&encodeURIComponent(W),o.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=wa(this._updateHashUnthrottled.bind(this),30*1e3/100)};Ta.prototype.addTo=function(W){return this._map=W,o.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Ta.prototype.remove=function(){return o.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ta.prototype.getHashString=function(W){var fe=this._map.getCenter(),Q=Math.round(this._map.getZoom()*100)/100,he=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),Re=Math.pow(10,he),Ge=Math.round(fe.lng*Re)/Re,tt=Math.round(fe.lat*Re)/Re,wt=this._map.getBearing(),zt=this._map.getPitch(),Xt="";if(W?Xt+="/"+Ge+"/"+tt+"/"+Q:Xt+=Q+"/"+tt+"/"+Ge,(wt||zt)&&(Xt+="/"+Math.round(wt*10)/10),zt&&(Xt+="/"+Math.round(zt)),this._hashName){var tr=this._hashName,qt=!1,Cr=o.window.location.hash.slice(1).split("&").map(function(Ur){var Nr=Ur.split("=")[0];return Nr===tr?(qt=!0,Nr+"="+Xt):Ur}).filter(function(Ur){return Ur});return qt||Cr.push(tr+"="+Xt),"#"+Cr.join("&")}return"#"+Xt},Ta.prototype._getCurrentHash=function(){var W=this,fe=o.window.location.hash.replace("#","");if(this._hashName){var Q;return fe.split("&").map(function(he){return he.split("=")}).forEach(function(he){he[0]===W._hashName&&(Q=he)}),(Q&&Q[1]||"").split("/")}return fe.split("/")},Ta.prototype._onHashChange=function(){var W=this._getCurrentHash();if(W.length>=3&&!W.some(function(Q){return isNaN(Q)})){var fe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(W[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+W[2],+W[1]],zoom:+W[0],bearing:fe,pitch:+(W[4]||0)}),!0}return!1},Ta.prototype._updateHashUnthrottled=function(){var W=o.window.location.href.replace(/(#.+)?$/,this.getHashString());try{o.window.history.replaceState(o.window.history.state,null,W)}catch{}};var Aa={linearity:.3,easing:o.bezier(0,0,.3,1)},Ca=o.extend({deceleration:2500,maxSpeed:1400},Aa),Oa=o.extend({deceleration:20,maxSpeed:1400},Aa),ri=o.extend({deceleration:1e3,maxSpeed:360},Aa),wi=o.extend({deceleration:1e3,maxSpeed:90},Aa),se=function(W){this._map=W,this.clear()};se.prototype.clear=function(){this._inertiaBuffer=[]},se.prototype.record=function(W){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.browser.now(),settings:W})},se.prototype._drainInertiaBuffer=function(){for(var W=this._inertiaBuffer,fe=o.browser.now(),Q=160;W.length>0&&fe-W[0].time>Q;)W.shift()},se.prototype._onMoveEnd=function(W){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var fe={zoom:0,bearing:0,pitch:0,pan:new o.Point(0,0),pinchAround:void 0,around:void 0},Q=0,he=this._inertiaBuffer;Q<he.length;Q+=1){var Re=he[Q],Ge=Re.settings;fe.zoom+=Ge.zoomDelta||0,fe.bearing+=Ge.bearingDelta||0,fe.pitch+=Ge.pitchDelta||0,Ge.panDelta&&fe.pan._add(Ge.panDelta),Ge.around&&(fe.around=Ge.around),Ge.pinchAround&&(fe.pinchAround=Ge.pinchAround)}var tt=this._inertiaBuffer[this._inertiaBuffer.length-1],wt=tt.time-this._inertiaBuffer[0].time,zt={};if(fe.pan.mag()){var Xt=De(fe.pan.mag(),wt,o.extend({},Ca,W||{}));zt.offset=fe.pan.mult(Xt.amount/fe.pan.mag()),zt.center=this._map.transform.center,Me(zt,Xt)}if(fe.zoom){var tr=De(fe.zoom,wt,Oa);zt.zoom=this._map.transform.zoom+tr.amount,Me(zt,tr)}if(fe.bearing){var qt=De(fe.bearing,wt,ri);zt.bearing=this._map.transform.bearing+o.clamp(qt.amount,-179,179),Me(zt,qt)}if(fe.pitch){var Cr=De(fe.pitch,wt,wi);zt.pitch=this._map.transform.pitch+Cr.amount,Me(zt,Cr)}if(zt.zoom||zt.bearing){var Ur=fe.pinchAround===void 0?fe.around:fe.pinchAround;zt.around=Ur?this._map.unproject(Ur):this._map.getCenter()}return this.clear(),o.extend(zt,{noMoveStart:!0})}};function Me(ce,W){(!ce.duration||ce.duration<W.duration)&&(ce.duration=W.duration,ce.easing=W.easing)}function De(ce,W,fe){var Q=fe.maxSpeed,he=fe.linearity,Re=fe.deceleration,Ge=o.clamp(ce*he/(W/1e3),-Q,Q),tt=Math.abs(Ge)/(Re*he);return{easing:fe.easing,duration:tt*1e3,amount:Ge*(tt/2)}}var Xe=function(ce){function W(Q,he,Re,Ge){Ge===void 0&&(Ge={});var tt=M.mousePos(he.getCanvasContainer(),Re),wt=he.unproject(tt);ce.call(this,Q,o.extend({point:tt,lngLat:wt,originalEvent:Re},Ge)),this._defaultPrevented=!1,this.target=he}ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W;var fe={defaultPrevented:{configurable:!0}};return W.prototype.preventDefault=function(){this._defaultPrevented=!0},fe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(W.prototype,fe),W}(o.Event),Qe=function(ce){function W(Q,he,Re){var Ge=Q==="touchend"?Re.changedTouches:Re.touches,tt=M.touchPos(he.getCanvasContainer(),Ge),wt=tt.map(function(tr){return he.unproject(tr)}),zt=tt.reduce(function(tr,qt,Cr,Ur){return tr.add(qt.div(Ur.length))},new o.Point(0,0)),Xt=he.unproject(zt);ce.call(this,Q,{points:tt,point:zt,lngLats:wt,lngLat:Xt,originalEvent:Re}),this._defaultPrevented=!1}ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W;var fe={defaultPrevented:{configurable:!0}};return W.prototype.preventDefault=function(){this._defaultPrevented=!0},fe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(W.prototype,fe),W}(o.Event),rt=function(ce){function W(Q,he,Re){ce.call(this,Q,{originalEvent:Re}),this._defaultPrevented=!1}ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W;var fe={defaultPrevented:{configurable:!0}};return W.prototype.preventDefault=function(){this._defaultPrevented=!0},fe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(W.prototype,fe),W}(o.Event),Tt=function(W,fe){this._map=W,this._clickTolerance=fe.clickTolerance};Tt.prototype.reset=function(){delete this._mousedownPos},Tt.prototype.wheel=function(W){return this._firePreventable(new rt(W.type,this._map,W))},Tt.prototype.mousedown=function(W,fe){return this._mousedownPos=fe,this._firePreventable(new Xe(W.type,this._map,W))},Tt.prototype.mouseup=function(W){this._map.fire(new Xe(W.type,this._map,W))},Tt.prototype.click=function(W,fe){this._mousedownPos&&this._mousedownPos.dist(fe)>=this._clickTolerance||this._map.fire(new Xe(W.type,this._map,W))},Tt.prototype.dblclick=function(W){return this._firePreventable(new Xe(W.type,this._map,W))},Tt.prototype.mouseover=function(W){this._map.fire(new Xe(W.type,this._map,W))},Tt.prototype.mouseout=function(W){this._map.fire(new Xe(W.type,this._map,W))},Tt.prototype.touchstart=function(W){return this._firePreventable(new Qe(W.type,this._map,W))},Tt.prototype.touchmove=function(W){this._map.fire(new Qe(W.type,this._map,W))},Tt.prototype.touchend=function(W){this._map.fire(new Qe(W.type,this._map,W))},Tt.prototype.touchcancel=function(W){this._map.fire(new Qe(W.type,this._map,W))},Tt.prototype._firePreventable=function(W){if(this._map.fire(W),W.defaultPrevented)return{}},Tt.prototype.isEnabled=function(){return!0},Tt.prototype.isActive=function(){return!1},Tt.prototype.enable=function(){},Tt.prototype.disable=function(){};var yt=function(W){this._map=W};yt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},yt.prototype.mousemove=function(W){this._map.fire(new Xe(W.type,this._map,W))},yt.prototype.mousedown=function(){this._delayContextMenu=!0},yt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xe("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},yt.prototype.contextmenu=function(W){this._delayContextMenu?this._contextMenuEvent=W:this._map.fire(new Xe(W.type,this._map,W)),this._map.listens("contextmenu")&&W.preventDefault()},yt.prototype.isEnabled=function(){return!0},yt.prototype.isActive=function(){return!1},yt.prototype.enable=function(){},yt.prototype.disable=function(){};var Ft=function(W,fe){this._map=W,this._el=W.getCanvasContainer(),this._container=W.getContainer(),this._clickTolerance=fe.clickTolerance||1};Ft.prototype.isEnabled=function(){return!!this._enabled},Ft.prototype.isActive=function(){return!!this._active},Ft.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ft.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ft.prototype.mousedown=function(W,fe){this.isEnabled()&&W.shiftKey&&W.button===0&&(M.disableDrag(),this._startPos=this._lastPos=fe,this._active=!0)},Ft.prototype.mousemoveWindow=function(W,fe){if(this._active){var Q=fe;if(!(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)<this._clickTolerance)){var he=this._startPos;this._lastPos=Q,this._box||(this._box=M.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",W));var Re=Math.min(he.x,Q.x),Ge=Math.max(he.x,Q.x),tt=Math.min(he.y,Q.y),wt=Math.max(he.y,Q.y);M.setTransform(this._box,"translate("+Re+"px,"+tt+"px)"),this._box.style.width=Ge-Re+"px",this._box.style.height=wt-tt+"px"}}},Ft.prototype.mouseupWindow=function(W,fe){var Q=this;if(this._active&&W.button===0){var he=this._startPos,Re=fe;if(this.reset(),M.suppressClick(),he.x===Re.x&&he.y===Re.y)this._fireEvent("boxzoomcancel",W);else return this._map.fire(new o.Event("boxzoomend",{originalEvent:W})),{cameraAnimation:function(Ge){return Ge.fitScreenCoordinates(he,Re,Q._map.getBearing(),{linear:!0})}}}},Ft.prototype.keydown=function(W){this._active&&W.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",W))},Ft.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(M.remove(this._box),this._box=null),M.enableDrag(),delete this._startPos,delete this._lastPos},Ft.prototype._fireEvent=function(W,fe){return this._map.fire(new o.Event(W,{originalEvent:fe}))};function Ot(ce,W){for(var fe={},Q=0;Q<ce.length;Q++)fe[ce[Q].identifier]=W[Q];return fe}function jt(ce){for(var W=new o.Point(0,0),fe=0,Q=ce;fe<Q.length;fe+=1){var he=Q[fe];W._add(he)}return W.div(ce.length)}var wr=500,Tr=500,Wr=30,qr=function(W){this.reset(),this.numTouches=W.numTouches};qr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},qr.prototype.touchstart=function(W,fe,Q){(this.centroid||Q.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=W.timeStamp),Q.length===this.numTouches&&(this.centroid=jt(fe),this.touches=Ot(Q,fe)))},qr.prototype.touchmove=function(W,fe,Q){if(!(this.aborted||!this.centroid)){var he=Ot(Q,fe);for(var Re in this.touches){var Ge=this.touches[Re],tt=he[Re];(!tt||tt.dist(Ge)>Wr)&&(this.aborted=!0)}}},qr.prototype.touchend=function(W,fe,Q){if((!this.centroid||W.timeStamp-this.startTime>Tr)&&(this.aborted=!0),Q.length===0){var he=!this.aborted&&this.centroid;if(this.reset(),he)return he}};var Mr=function(W){this.singleTap=new qr(W),this.numTaps=W.numTaps,this.reset()};Mr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Mr.prototype.touchstart=function(W,fe,Q){this.singleTap.touchstart(W,fe,Q)},Mr.prototype.touchmove=function(W,fe,Q){this.singleTap.touchmove(W,fe,Q)},Mr.prototype.touchend=function(W,fe,Q){var he=this.singleTap.touchend(W,fe,Q);if(he){var Re=W.timeStamp-this.lastTime<wr,Ge=!this.lastTap||this.lastTap.dist(he)<Wr;if((!Re||!Ge)&&this.reset(),this.count++,this.lastTime=W.timeStamp,this.lastTap=he,this.count===this.numTaps)return this.reset(),he}};var kr=function(){this._zoomIn=new Mr({numTouches:1,numTaps:2}),this._zoomOut=new Mr({numTouches:2,numTaps:1}),this.reset()};kr.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},kr.prototype.touchstart=function(W,fe,Q){this._zoomIn.touchstart(W,fe,Q),this._zoomOut.touchstart(W,fe,Q)},kr.prototype.touchmove=function(W,fe,Q){this._zoomIn.touchmove(W,fe,Q),this._zoomOut.touchmove(W,fe,Q)},kr.prototype.touchend=function(W,fe,Q){var he=this,Re=this._zoomIn.touchend(W,fe,Q),Ge=this._zoomOut.touchend(W,fe,Q);if(Re)return this._active=!0,W.preventDefault(),setTimeout(function(){return he.reset()},0),{cameraAnimation:function(tt){return tt.easeTo({duration:300,zoom:tt.getZoom()+1,around:tt.unproject(Re)},{originalEvent:W})}};if(Ge)return this._active=!0,W.preventDefault(),setTimeout(function(){return he.reset()},0),{cameraAnimation:function(tt){return tt.easeTo({duration:300,zoom:tt.getZoom()-1,around:tt.unproject(Ge)},{originalEvent:W})}}},kr.prototype.touchcancel=function(){this.reset()},kr.prototype.enable=function(){this._enabled=!0},kr.prototype.disable=function(){this._enabled=!1,this.reset()},kr.prototype.isEnabled=function(){return this._enabled},kr.prototype.isActive=function(){return this._active};var Hr=0,rn=2,on={};on[Hr]=1,on[rn]=2;function Zr(ce,W){var fe=on[W];return ce.buttons===void 0||(ce.buttons&fe)!==fe}var _n=function(W){this.reset(),this._clickTolerance=W.clickTolerance||1};_n.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},_n.prototype._correctButton=function(W,fe){return!1},_n.prototype._move=function(W,fe){return{}},_n.prototype.mousedown=function(W,fe){if(!this._lastPoint){var Q=M.mouseButton(W);this._correctButton(W,Q)&&(this._lastPoint=fe,this._eventButton=Q)}},_n.prototype.mousemoveWindow=function(W,fe){var Q=this._lastPoint;if(Q){if(W.preventDefault(),Zr(W,this._eventButton)){this.reset();return}if(!(!this._moved&&fe.dist(Q)<this._clickTolerance))return this._moved=!0,this._lastPoint=fe,this._move(Q,fe)}},_n.prototype.mouseupWindow=function(W){if(this._lastPoint){var fe=M.mouseButton(W);fe===this._eventButton&&(this._moved&&M.suppressClick(),this.reset())}},_n.prototype.enable=function(){this._enabled=!0},_n.prototype.disable=function(){this._enabled=!1,this.reset()},_n.prototype.isEnabled=function(){return this._enabled},_n.prototype.isActive=function(){return this._active};var Xn=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.mousedown=function(Q,he){ce.prototype.mousedown.call(this,Q,he),this._lastPoint&&(this._active=!0)},W.prototype._correctButton=function(Q,he){return he===Hr&&!Q.ctrlKey},W.prototype._move=function(Q,he){return{around:he,panDelta:he.sub(Q)}},W}(_n),ta=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype._correctButton=function(Q,he){return he===Hr&&Q.ctrlKey||he===rn},W.prototype._move=function(Q,he){var Re=.8,Ge=(he.x-Q.x)*Re;if(Ge)return this._active=!0,{bearingDelta:Ge}},W.prototype.contextmenu=function(Q){Q.preventDefault()},W}(_n),Wn=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype._correctButton=function(Q,he){return he===Hr&&Q.ctrlKey||he===rn},W.prototype._move=function(Q,he){var Re=-.5,Ge=(he.y-Q.y)*Re;if(Ge)return this._active=!0,{pitchDelta:Ge}},W.prototype.contextmenu=function(Q){Q.preventDefault()},W}(_n),Qn=function(W){this._minTouches=1,this._clickTolerance=W.clickTolerance||1,this.reset()};Qn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new o.Point(0,0)},Qn.prototype.touchstart=function(W,fe,Q){return this._calculateTransform(W,fe,Q)},Qn.prototype.touchmove=function(W,fe,Q){if(!(!this._active||Q.length<this._minTouches))return W.preventDefault(),this._calculateTransform(W,fe,Q)},Qn.prototype.touchend=function(W,fe,Q){this._calculateTransform(W,fe,Q),this._active&&Q.length<this._minTouches&&this.reset()},Qn.prototype.touchcancel=function(){this.reset()},Qn.prototype._calculateTransform=function(W,fe,Q){Q.length>0&&(this._active=!0);var he=Ot(Q,fe),Re=new o.Point(0,0),Ge=new o.Point(0,0),tt=0;for(var wt in he){var zt=he[wt],Xt=this._touches[wt];Xt&&(Re._add(zt),Ge._add(zt.sub(Xt)),tt++,he[wt]=zt)}if(this._touches=he,!(tt<this._minTouches||!Ge.mag())){var tr=Ge.div(tt);if(this._sum._add(tr),!(this._sum.mag()<this._clickTolerance)){var qt=Re.div(tt);return{around:qt,panDelta:tr}}}},Qn.prototype.enable=function(){this._enabled=!0},Qn.prototype.disable=function(){this._enabled=!1,this.reset()},Qn.prototype.isEnabled=function(){return this._enabled},Qn.prototype.isActive=function(){return this._active};var ra=function(){this.reset()};ra.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},ra.prototype._start=function(W){},ra.prototype._move=function(W,fe,Q){return{}},ra.prototype.touchstart=function(W,fe,Q){this._firstTwoTouches||Q.length<2||(this._firstTwoTouches=[Q[0].identifier,Q[1].identifier],this._start([fe[0],fe[1]]))},ra.prototype.touchmove=function(W,fe,Q){if(this._firstTwoTouches){W.preventDefault();var he=this._firstTwoTouches,Re=he[0],Ge=he[1],tt=Pa(Q,fe,Re),wt=Pa(Q,fe,Ge);if(!(!tt||!wt)){var zt=this._aroundCenter?null:tt.add(wt).div(2);return this._move([tt,wt],zt,W)}}},ra.prototype.touchend=function(W,fe,Q){if(this._firstTwoTouches){var he=this._firstTwoTouches,Re=he[0],Ge=he[1],tt=Pa(Q,fe,Re),wt=Pa(Q,fe,Ge);tt&&wt||(this._active&&M.suppressClick(),this.reset())}},ra.prototype.touchcancel=function(){this.reset()},ra.prototype.enable=function(W){this._enabled=!0,this._aroundCenter=!!W&&W.around==="center"},ra.prototype.disable=function(){this._enabled=!1,this.reset()},ra.prototype.isEnabled=function(){return this._enabled},ra.prototype.isActive=function(){return this._active};function Pa(ce,W,fe){for(var Q=0;Q<ce.length;Q++)if(ce[Q].identifier===fe)return W[Q]}var ya=.1;function Sa(ce,W){return Math.log(ce/W)/Math.LN2}var Za=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.reset=function(){ce.prototype.reset.call(this),delete this._distance,delete this._startDistance},W.prototype._start=function(Q){this._startDistance=this._distance=Q[0].dist(Q[1])},W.prototype._move=function(Q,he){var Re=this._distance;if(this._distance=Q[0].dist(Q[1]),!(!this._active&&Math.abs(Sa(this._distance,this._startDistance))<ya))return this._active=!0,{zoomDelta:Sa(this._distance,Re),pinchAround:he}},W}(ra),Ai=25;function qa(ce,W){return ce.angleWith(W)*180/Math.PI}var Hn=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.reset=function(){ce.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},W.prototype._start=function(Q){this._startVector=this._vector=Q[0].sub(Q[1]),this._minDiameter=Q[0].dist(Q[1])},W.prototype._move=function(Q,he){var Re=this._vector;if(this._vector=Q[0].sub(Q[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:qa(this._vector,Re),pinchAround:he}},W.prototype._isBelowThreshold=function(Q){this._minDiameter=Math.min(this._minDiameter,Q.mag());var he=Math.PI*this._minDiameter,Re=Ai/he*360,Ge=qa(Q,this._startVector);return Math.abs(Ge)<Re},W}(ra);function Da(ce){return Math.abs(ce.y)>Math.abs(ce.x)}var pa=100,Ba=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.reset=function(){ce.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},W.prototype._start=function(Q){this._lastPoints=Q,Da(Q[0].sub(Q[1]))&&(this._valid=!1)},W.prototype._move=function(Q,he,Re){var Ge=Q[0].sub(this._lastPoints[0]),tt=Q[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Ge,tt,Re.timeStamp),!!this._valid){this._lastPoints=Q,this._active=!0;var wt=(Ge.y+tt.y)/2,zt=-.5;return{pitchDelta:wt*zt}}},W.prototype.gestureBeginsVertically=function(Q,he,Re){if(this._valid!==void 0)return this._valid;var Ge=2,tt=Q.mag()>=Ge,wt=he.mag()>=Ge;if(!(!tt&&!wt)){if(!tt||!wt)return this._firstMove===void 0&&(this._firstMove=Re),Re-this._firstMove<pa?void 0:!1;var zt=Q.y>0==he.y>0;return Da(Q)&&Da(he)&&zt}},W}(ra),li={panStep:100,bearingStep:15,pitchStep:10},ja=function(){var W=li;this._panStep=W.panStep,this._bearingStep=W.bearingStep,this._pitchStep=W.pitchStep,this._rotationDisabled=!1};ja.prototype.reset=function(){this._active=!1},ja.prototype.keydown=function(W){var fe=this;if(!(W.altKey||W.ctrlKey||W.metaKey)){var Q=0,he=0,Re=0,Ge=0,tt=0;switch(W.keyCode){case 61:case 107:case 171:case 187:Q=1;break;case 189:case 109:case 173:Q=-1;break;case 37:W.shiftKey?he=-1:(W.preventDefault(),Ge=-1);break;case 39:W.shiftKey?he=1:(W.preventDefault(),Ge=1);break;case 38:W.shiftKey?Re=1:(W.preventDefault(),tt=-1);break;case 40:W.shiftKey?Re=-1:(W.preventDefault(),tt=1);break;default:return}return this._rotationDisabled&&(he=0,Re=0),{cameraAnimation:function(wt){var zt=wt.getZoom();wt.easeTo({duration:300,easeId:"keyboardHandler",easing:zi,zoom:Q?Math.round(zt)+Q*(W.shiftKey?2:1):zt,bearing:wt.getBearing()+he*fe._bearingStep,pitch:wt.getPitch()+Re*fe._pitchStep,offset:[-Ge*fe._panStep,-tt*fe._panStep],center:wt.getCenter()},{originalEvent:W})}}}},ja.prototype.enable=function(){this._enabled=!0},ja.prototype.disable=function(){this._enabled=!1,this.reset()},ja.prototype.isEnabled=function(){return this._enabled},ja.prototype.isActive=function(){return this._active},ja.prototype.disableRotation=function(){this._rotationDisabled=!0},ja.prototype.enableRotation=function(){this._rotationDisabled=!1};function zi(ce){return ce*(2-ce)}var Fi=4.000244140625,Ui=1/100,ui=1/450,Ki=2,qn=function(W,fe){this._map=W,this._el=W.getCanvasContainer(),this._handler=fe,this._delta=0,this._defaultZoomRate=Ui,this._wheelZoomRate=ui,o.bindAll(["_onTimeout"],this)};qn.prototype.setZoomRate=function(W){this._defaultZoomRate=W},qn.prototype.setWheelZoomRate=function(W){this._wheelZoomRate=W},qn.prototype.isEnabled=function(){return!!this._enabled},qn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},qn.prototype.isZooming=function(){return!!this._zooming},qn.prototype.enable=function(W){this.isEnabled()||(this._enabled=!0,this._aroundCenter=W&&W.around==="center")},qn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},qn.prototype.wheel=function(W){if(this.isEnabled()){var fe=W.deltaMode===o.window.WheelEvent.DOM_DELTA_LINE?W.deltaY*40:W.deltaY,Q=o.browser.now(),he=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,fe!==0&&fe%Fi===0?this._type="wheel":fe!==0&&Math.abs(fe)<4?this._type="trackpad":he>400?(this._type=null,this._lastValue=fe,this._timeout=setTimeout(this._onTimeout,40,W)):this._type||(this._type=Math.abs(he*fe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,fe+=this._lastValue)),W.shiftKey&&fe&&(fe=fe/4),this._type&&(this._lastWheelEvent=W,this._delta-=fe,this._active||this._start(W)),W.preventDefault()}},qn.prototype._onTimeout=function(W){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(W)},qn.prototype._start=function(W){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 fe=M.mousePos(this._el,W);this._around=o.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(fe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},qn.prototype.renderFrame=function(){var W=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var fe=this._map.transform;if(this._delta!==0){var Q=this._type==="wheel"&&Math.abs(this._delta)>Fi?this._wheelZoomRate:this._defaultZoomRate,he=Ki/(1+Math.exp(-Math.abs(this._delta*Q)));this._delta<0&&he!==0&&(he=1/he);var Re=typeof this._targetZoom=="number"?fe.zoomScale(this._targetZoom):fe.scale;this._targetZoom=Math.min(fe.maxZoom,Math.max(fe.minZoom,fe.scaleZoom(Re*he))),this._type==="wheel"&&(this._startZoom=fe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Ge=typeof this._targetZoom=="number"?this._targetZoom:fe.zoom,tt=this._startZoom,wt=this._easing,zt=!1,Xt;if(this._type==="wheel"&&tt&&wt){var tr=Math.min((o.browser.now()-this._lastWheelEventTime)/200,1),qt=wt(tr);Xt=o.number(tt,Ge,qt),tr<1?this._frameId||(this._frameId=!0):zt=!0}else Xt=Ge,zt=!0;return this._active=!0,zt&&(this._active=!1,this._finishTimeout=setTimeout(function(){W._zooming=!1,W._handler._triggerRenderFrame(),delete W._targetZoom,delete W._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!zt,zoomDelta:Xt-fe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},qn.prototype._smoothOutEasing=function(W){var fe=o.ease;if(this._prevEase){var Q=this._prevEase,he=(o.browser.now()-Q.start)/Q.duration,Re=Q.easing(he+.01)-Q.easing(he),Ge=.27/Math.sqrt(Re*Re+1e-4)*.01,tt=Math.sqrt(.27*.27-Ge*Ge);fe=o.bezier(Ge,tt,.25,1)}return this._prevEase={start:o.browser.now(),duration:W,easing:fe},fe},qn.prototype.reset=function(){this._active=!1};var xa=function(W,fe){this._clickZoom=W,this._tapZoom=fe};xa.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},xa.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},xa.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},xa.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var so=function(){this.reset()};so.prototype.reset=function(){this._active=!1},so.prototype.dblclick=function(W,fe){return W.preventDefault(),{cameraAnimation:function(Q){Q.easeTo({duration:300,zoom:Q.getZoom()+(W.shiftKey?-1:1),around:Q.unproject(fe)},{originalEvent:W})}}},so.prototype.enable=function(){this._enabled=!0},so.prototype.disable=function(){this._enabled=!1,this.reset()},so.prototype.isEnabled=function(){return this._enabled},so.prototype.isActive=function(){return this._active};var ho=function(){this._tap=new Mr({numTouches:1,numTaps:1}),this.reset()};ho.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ho.prototype.touchstart=function(W,fe,Q){this._swipePoint||(this._tapTime&&W.timeStamp-this._tapTime>wr&&this.reset(),this._tapTime?Q.length>0&&(this._swipePoint=fe[0],this._swipeTouch=Q[0].identifier):this._tap.touchstart(W,fe,Q))},ho.prototype.touchmove=function(W,fe,Q){if(!this._tapTime)this._tap.touchmove(W,fe,Q);else if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;var he=fe[0],Re=he.y-this._swipePoint.y;return this._swipePoint=he,W.preventDefault(),this._active=!0,{zoomDelta:Re/128}}},ho.prototype.touchend=function(W,fe,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{var he=this._tap.touchend(W,fe,Q);he&&(this._tapTime=W.timeStamp)}},ho.prototype.touchcancel=function(){this.reset()},ho.prototype.enable=function(){this._enabled=!0},ho.prototype.disable=function(){this._enabled=!1,this.reset()},ho.prototype.isEnabled=function(){return this._enabled},ho.prototype.isActive=function(){return this._active};var Vi=function(W,fe,Q){this._el=W,this._mousePan=fe,this._touchPan=Q};Vi.prototype.enable=function(W){this._inertiaOptions=W||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Vi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Vi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Vi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ei=function(W,fe,Q){this._pitchWithRotate=W.pitchWithRotate,this._mouseRotate=fe,this._mousePitch=Q};ei.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ei.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ei.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ei.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Pi=function(W,fe,Q,he){this._el=W,this._touchZoom=fe,this._touchRotate=Q,this._tapDragZoom=he,this._rotationDisabled=!1,this._enabled=!0};Pi.prototype.enable=function(W){this._touchZoom.enable(W),this._rotationDisabled||this._touchRotate.enable(W),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Pi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Pi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Pi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Pi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Pi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Mi=function(ce){return ce.zoom||ce.drag||ce.pitch||ce.rotate},Bo=function(ce){function W(){ce.apply(this,arguments)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W}(o.Event);function Qo(ce){return ce.panDelta&&ce.panDelta.mag()||ce.zoomDelta||ce.bearingDelta||ce.pitchDelta}var pi=function(W,fe){this._map=W,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new se(W),this._bearingSnap=fe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(fe),o.bindAll(["handleEvent","handleWindowEvent"],this);var Q=this._el;this._listeners=[[Q,"touchstart",{passive:!0}],[Q,"touchmove",{passive:!1}],[Q,"touchend",void 0],[Q,"touchcancel",void 0],[Q,"mousedown",void 0],[Q,"mousemove",void 0],[Q,"mouseup",void 0],[o.window.document,"mousemove",{capture:!0}],[o.window.document,"mouseup",void 0],[Q,"mouseover",void 0],[Q,"mouseout",void 0],[Q,"dblclick",void 0],[Q,"click",void 0],[Q,"keydown",{capture:!1}],[Q,"keyup",void 0],[Q,"wheel",{passive:!1}],[Q,"contextmenu",void 0],[o.window,"blur",void 0]];for(var he=0,Re=this._listeners;he<Re.length;he+=1){var Ge=Re[he],tt=Ge[0],wt=Ge[1],zt=Ge[2];M.addEventListener(tt,wt,tt===o.window.document?this.handleWindowEvent:this.handleEvent,zt)}};pi.prototype.destroy=function(){for(var W=0,fe=this._listeners;W<fe.length;W+=1){var Q=fe[W],he=Q[0],Re=Q[1],Ge=Q[2];M.removeEventListener(he,Re,he===o.window.document?this.handleWindowEvent:this.handleEvent,Ge)}},pi.prototype._addDefaultHandlers=function(W){var fe=this._map,Q=fe.getCanvasContainer();this._add("mapEvent",new Tt(fe,W));var he=fe.boxZoom=new Ft(fe,W);this._add("boxZoom",he);var Re=new kr,Ge=new so;fe.doubleClickZoom=new xa(Ge,Re),this._add("tapZoom",Re),this._add("clickZoom",Ge);var tt=new ho;this._add("tapDragZoom",tt);var wt=fe.touchPitch=new Ba;this._add("touchPitch",wt);var zt=new ta(W),Xt=new Wn(W);fe.dragRotate=new ei(W,zt,Xt),this._add("mouseRotate",zt,["mousePitch"]),this._add("mousePitch",Xt,["mouseRotate"]);var tr=new Xn(W),qt=new Qn(W);fe.dragPan=new Vi(Q,tr,qt),this._add("mousePan",tr),this._add("touchPan",qt,["touchZoom","touchRotate"]);var Cr=new Hn,Ur=new Za;fe.touchZoomRotate=new Pi(Q,Ur,Cr,tt),this._add("touchRotate",Cr,["touchPan","touchZoom"]),this._add("touchZoom",Ur,["touchPan","touchRotate"]);var Nr=fe.scrollZoom=new qn(fe,this);this._add("scrollZoom",Nr,["mousePan"]);var Fr=fe.keyboard=new ja;this._add("keyboard",Fr),this._add("blockableMapEvent",new yt(fe));for(var Gr=0,nn=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Gr<nn.length;Gr+=1){var Cn=nn[Gr];W.interactive&&W[Cn]&&fe[Cn].enable(W[Cn])}},pi.prototype._add=function(W,fe,Q){this._handlers.push({handlerName:W,handler:fe,allowed:Q}),this._handlersById[W]=fe},pi.prototype.stop=function(W){if(!this._updatingCamera){for(var fe=0,Q=this._handlers;fe<Q.length;fe+=1){var he=Q[fe],Re=he.handler;Re.reset()}this._inertia.clear(),this._fireEvents({},{},W),this._changes=[]}},pi.prototype.isActive=function(){for(var W=0,fe=this._handlers;W<fe.length;W+=1){var Q=fe[W],he=Q.handler;if(he.isActive())return!0}return!1},pi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},pi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},pi.prototype.isMoving=function(){return!!Mi(this._eventsInProgress)||this.isZooming()},pi.prototype._blockedByActive=function(W,fe,Q){for(var he in W)if(he!==Q&&(!fe||fe.indexOf(he)<0))return!0;return!1},pi.prototype.handleWindowEvent=function(W){this.handleEvent(W,W.type+"Window")},pi.prototype._getMapTouches=function(W){for(var fe=[],Q=0,he=W;Q<he.length;Q+=1){var Re=he[Q],Ge=Re.target;this._el.contains(Ge)&&fe.push(Re)}return fe},pi.prototype.handleEvent=function(W,fe){if(W.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var Q=W.type==="renderFrame"?void 0:W,he={needsRenderFrame:!1},Re={},Ge={},tt=W.touches?this._getMapTouches(W.touches):void 0,wt=tt?M.touchPos(this._el,tt):M.mousePos(this._el,W),zt=0,Xt=this._handlers;zt<Xt.length;zt+=1){var tr=Xt[zt],qt=tr.handlerName,Cr=tr.handler,Ur=tr.allowed;if(Cr.isEnabled()){var Nr=void 0;this._blockedByActive(Ge,Ur,qt)?Cr.reset():Cr[fe||W.type]&&(Nr=Cr[fe||W.type](W,wt,tt),this.mergeHandlerResult(he,Re,Nr,qt,Q),Nr&&Nr.needsRenderFrame&&this._triggerRenderFrame()),(Nr||Cr.isActive())&&(Ge[qt]=Cr)}}var Fr={};for(var Gr in this._previousActiveHandlers)Ge[Gr]||(Fr[Gr]=Q);this._previousActiveHandlers=Ge,(Object.keys(Fr).length||Qo(he))&&(this._changes.push([he,Re,Fr]),this._triggerRenderFrame()),(Object.keys(Ge).length||Qo(he))&&this._map._stop(!0),this._updatingCamera=!1;var nn=he.cameraAnimation;nn&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],nn(this._map))},pi.prototype.mergeHandlerResult=function(W,fe,Q,he,Re){if(Q){o.extend(W,Q);var Ge={handlerName:he,originalEvent:Q.originalEvent||Re};Q.zoomDelta!==void 0&&(fe.zoom=Ge),Q.panDelta!==void 0&&(fe.drag=Ge),Q.pitchDelta!==void 0&&(fe.pitch=Ge),Q.bearingDelta!==void 0&&(fe.rotate=Ge)}},pi.prototype._applyChanges=function(){for(var W={},fe={},Q={},he=0,Re=this._changes;he<Re.length;he+=1){var Ge=Re[he],tt=Ge[0],wt=Ge[1],zt=Ge[2];tt.panDelta&&(W.panDelta=(W.panDelta||new o.Point(0,0))._add(tt.panDelta)),tt.zoomDelta&&(W.zoomDelta=(W.zoomDelta||0)+tt.zoomDelta),tt.bearingDelta&&(W.bearingDelta=(W.bearingDelta||0)+tt.bearingDelta),tt.pitchDelta&&(W.pitchDelta=(W.pitchDelta||0)+tt.pitchDelta),tt.around!==void 0&&(W.around=tt.around),tt.pinchAround!==void 0&&(W.pinchAround=tt.pinchAround),tt.noInertia&&(W.noInertia=tt.noInertia),o.extend(fe,wt),o.extend(Q,zt)}this._updateMapTransform(W,fe,Q),this._changes=[]},pi.prototype._updateMapTransform=function(W,fe,Q){var he=this._map,Re=he.transform;if(!Qo(W))return this._fireEvents(fe,Q,!0);var Ge=W.panDelta,tt=W.zoomDelta,wt=W.bearingDelta,zt=W.pitchDelta,Xt=W.around,tr=W.pinchAround;tr!==void 0&&(Xt=tr),he._stop(!0),Xt=Xt||he.transform.centerPoint;var qt=Re.pointLocation(Ge?Xt.sub(Ge):Xt);wt&&(Re.bearing+=wt),zt&&(Re.pitch+=zt),tt&&(Re.zoom+=tt),Re.setLocationAtPoint(qt,Xt),this._map._update(),W.noInertia||this._inertia.record(W),this._fireEvents(fe,Q,!0)},pi.prototype._fireEvents=function(W,fe,Q){var he=this,Re=Mi(this._eventsInProgress),Ge=Mi(W),tt={};for(var wt in W){var zt=W[wt],Xt=zt.originalEvent;this._eventsInProgress[wt]||(tt[wt+"start"]=Xt),this._eventsInProgress[wt]=W[wt]}!Re&&Ge&&this._fireEvent("movestart",Ge.originalEvent);for(var tr in tt)this._fireEvent(tr,tt[tr]);Ge&&this._fireEvent("move",Ge.originalEvent);for(var qt in W){var Cr=W[qt],Ur=Cr.originalEvent;this._fireEvent(qt,Ur)}var Nr={},Fr;for(var Gr in this._eventsInProgress){var nn=this._eventsInProgress[Gr],Cn=nn.handlerName,Rn=nn.originalEvent;this._handlersById[Cn].isActive()||(delete this._eventsInProgress[Gr],Fr=fe[Cn]||Rn,Nr[Gr+"end"]=Fr)}for(var Bn in Nr)this._fireEvent(Bn,Nr[Bn]);var Nn=Mi(this._eventsInProgress);if(Q&&(Re||Ge)&&!Nn){this._updatingCamera=!0;var Fn=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Vn=function(Zn){return Zn!==0&&-he._bearingSnap<Zn&&Zn<he._bearingSnap};Fn?(Vn(Fn.bearing||this._map.getBearing())&&(Fn.bearing=0),this._map.easeTo(Fn,{originalEvent:Fr})):(this._map.fire(new o.Event("moveend",{originalEvent:Fr})),Vn(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},pi.prototype._fireEvent=function(W,fe){this._map.fire(new o.Event(W,fe?{originalEvent:fe}:{}))},pi.prototype._requestFrame=function(){var W=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(fe){delete W._frameId,W.handleEvent(new Bo("renderFrame",{timeStamp:fe})),W._applyChanges()})},pi.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Zs=function(ce){function W(fe,Q){ce.call(this),this._moving=!1,this._zooming=!1,this.transform=fe,this._bearingSnap=Q.bearingSnap,o.bindAll(["_renderFrameCallback"],this)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.getCenter=function(){return new o.LngLat(this.transform.center.lng,this.transform.center.lat)},W.prototype.setCenter=function(Q,he){return this.jumpTo({center:Q},he)},W.prototype.panBy=function(Q,he,Re){return Q=o.Point.convert(Q).mult(-1),this.panTo(this.transform.center,o.extend({offset:Q},he),Re)},W.prototype.panTo=function(Q,he,Re){return this.easeTo(o.extend({center:Q},he),Re)},W.prototype.getZoom=function(){return this.transform.zoom},W.prototype.setZoom=function(Q,he){return this.jumpTo({zoom:Q},he),this},W.prototype.zoomTo=function(Q,he,Re){return this.easeTo(o.extend({zoom:Q},he),Re)},W.prototype.zoomIn=function(Q,he){return this.zoomTo(this.getZoom()+1,Q,he),this},W.prototype.zoomOut=function(Q,he){return this.zoomTo(this.getZoom()-1,Q,he),this},W.prototype.getBearing=function(){return this.transform.bearing},W.prototype.setBearing=function(Q,he){return this.jumpTo({bearing:Q},he),this},W.prototype.getPadding=function(){return this.transform.padding},W.prototype.setPadding=function(Q,he){return this.jumpTo({padding:Q},he),this},W.prototype.rotateTo=function(Q,he,Re){return this.easeTo(o.extend({bearing:Q},he),Re)},W.prototype.resetNorth=function(Q,he){return this.rotateTo(0,o.extend({duration:1e3},Q),he),this},W.prototype.resetNorthPitch=function(Q,he){return this.easeTo(o.extend({bearing:0,pitch:0,duration:1e3},Q),he),this},W.prototype.snapToNorth=function(Q,he){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(Q,he):this},W.prototype.getPitch=function(){return this.transform.pitch},W.prototype.setPitch=function(Q,he){return this.jumpTo({pitch:Q},he),this},W.prototype.cameraForBounds=function(Q,he){Q=o.LngLatBounds.convert(Q);var Re=he&&he.bearing||0;return this._cameraForBoxAndBearing(Q.getNorthWest(),Q.getSouthEast(),Re,he)},W.prototype._cameraForBoxAndBearing=function(Q,he,Re,Ge){var tt={top:0,bottom:0,right:0,left:0};if(Ge=o.extend({padding:tt,offset:[0,0],maxZoom:this.transform.maxZoom},Ge),typeof Ge.padding=="number"){var wt=Ge.padding;Ge.padding={top:wt,bottom:wt,right:wt,left:wt}}Ge.padding=o.extend(tt,Ge.padding);var zt=this.transform,Xt=zt.padding,tr=zt.project(o.LngLat.convert(Q)),qt=zt.project(o.LngLat.convert(he)),Cr=tr.rotate(-Re*Math.PI/180),Ur=qt.rotate(-Re*Math.PI/180),Nr=new o.Point(Math.max(Cr.x,Ur.x),Math.max(Cr.y,Ur.y)),Fr=new o.Point(Math.min(Cr.x,Ur.x),Math.min(Cr.y,Ur.y)),Gr=Nr.sub(Fr),nn=(zt.width-(Xt.left+Xt.right+Ge.padding.left+Ge.padding.right))/Gr.x,Cn=(zt.height-(Xt.top+Xt.bottom+Ge.padding.top+Ge.padding.bottom))/Gr.y;if(Cn<0||nn<0){o.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var Rn=Math.min(zt.scaleZoom(zt.scale*Math.min(nn,Cn)),Ge.maxZoom),Bn=typeof Ge.offset.x=="number"?new o.Point(Ge.offset.x,Ge.offset.y):o.Point.convert(Ge.offset),Nn=(Ge.padding.left-Ge.padding.right)/2,Fn=(Ge.padding.top-Ge.padding.bottom)/2,Vn=new o.Point(Nn,Fn),Zn=Vn.rotate(Re*Math.PI/180),ea=Bn.add(Zn),ca=ea.mult(zt.scale/zt.zoomScale(Rn)),ia=zt.unproject(tr.add(qt).div(2).sub(ca));return{center:ia,zoom:Rn,bearing:Re}},W.prototype.fitBounds=function(Q,he,Re){return this._fitInternal(this.cameraForBounds(Q,he),he,Re)},W.prototype.fitScreenCoordinates=function(Q,he,Re,Ge,tt){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(o.Point.convert(Q)),this.transform.pointLocation(o.Point.convert(he)),Re,Ge),Ge,tt)},W.prototype._fitInternal=function(Q,he,Re){return Q?(he=o.extend(Q,he),delete he.padding,he.linear?this.easeTo(he,Re):this.flyTo(he,Re)):this},W.prototype.jumpTo=function(Q,he){this.stop();var Re=this.transform,Ge=!1,tt=!1,wt=!1;return"zoom"in Q&&Re.zoom!==+Q.zoom&&(Ge=!0,Re.zoom=+Q.zoom),Q.center!==void 0&&(Re.center=o.LngLat.convert(Q.center)),"bearing"in Q&&Re.bearing!==+Q.bearing&&(tt=!0,Re.bearing=+Q.bearing),"pitch"in Q&&Re.pitch!==+Q.pitch&&(wt=!0,Re.pitch=+Q.pitch),Q.padding!=null&&!Re.isPaddingEqual(Q.padding)&&(Re.padding=Q.padding),this.fire(new o.Event("movestart",he)).fire(new o.Event("move",he)),Ge&&this.fire(new o.Event("zoomstart",he)).fire(new o.Event("zoom",he)).fire(new o.Event("zoomend",he)),tt&&this.fire(new o.Event("rotatestart",he)).fire(new o.Event("rotate",he)).fire(new o.Event("rotateend",he)),wt&&this.fire(new o.Event("pitchstart",he)).fire(new o.Event("pitch",he)).fire(new o.Event("pitchend",he)),this.fire(new o.Event("moveend",he))},W.prototype.easeTo=function(Q,he){var Re=this;this._stop(!1,Q.easeId),Q=o.extend({offset:[0,0],duration:500,easing:o.ease},Q),(Q.animate===!1||!Q.essential&&o.browser.prefersReducedMotion)&&(Q.duration=0);var Ge=this.transform,tt=this.getZoom(),wt=this.getBearing(),zt=this.getPitch(),Xt=this.getPadding(),tr="zoom"in Q?+Q.zoom:tt,qt="bearing"in Q?this._normalizeBearing(Q.bearing,wt):wt,Cr="pitch"in Q?+Q.pitch:zt,Ur="padding"in Q?Q.padding:Ge.padding,Nr=o.Point.convert(Q.offset),Fr=Ge.centerPoint.add(Nr),Gr=Ge.pointLocation(Fr),nn=o.LngLat.convert(Q.center||Gr);this._normalizeCenter(nn);var Cn=Ge.project(Gr),Rn=Ge.project(nn).sub(Cn),Bn=Ge.zoomScale(tr-tt),Nn,Fn;Q.around&&(Nn=o.LngLat.convert(Q.around),Fn=Ge.locationPoint(Nn));var Vn={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||tr!==tt,this._rotating=this._rotating||wt!==qt,this._pitching=this._pitching||Cr!==zt,this._padding=!Ge.isPaddingEqual(Ur),this._easeId=Q.easeId,this._prepareEase(he,Q.noMoveStart,Vn),this._ease(function(Zn){if(Re._zooming&&(Ge.zoom=o.number(tt,tr,Zn)),Re._rotating&&(Ge.bearing=o.number(wt,qt,Zn)),Re._pitching&&(Ge.pitch=o.number(zt,Cr,Zn)),Re._padding&&(Ge.interpolatePadding(Xt,Ur,Zn),Fr=Ge.centerPoint.add(Nr)),Nn)Ge.setLocationAtPoint(Nn,Fn);else{var ea=Ge.zoomScale(Ge.zoom-tt),ca=tr>tt?Math.min(2,Bn):Math.max(.5,Bn),ia=Math.pow(ca,1-Zn),Ea=Ge.unproject(Cn.add(Rn.mult(Zn*ia)).mult(ea));Ge.setLocationAtPoint(Ge.renderWorldCopies?Ea.wrap():Ea,Fr)}Re._fireMoveEvents(he)},function(Zn){Re._afterEase(he,Zn)},Q),this},W.prototype._prepareEase=function(Q,he,Re){Re===void 0&&(Re={}),this._moving=!0,!he&&!Re.moving&&this.fire(new o.Event("movestart",Q)),this._zooming&&!Re.zooming&&this.fire(new o.Event("zoomstart",Q)),this._rotating&&!Re.rotating&&this.fire(new o.Event("rotatestart",Q)),this._pitching&&!Re.pitching&&this.fire(new o.Event("pitchstart",Q))},W.prototype._fireMoveEvents=function(Q){this.fire(new o.Event("move",Q)),this._zooming&&this.fire(new o.Event("zoom",Q)),this._rotating&&this.fire(new o.Event("rotate",Q)),this._pitching&&this.fire(new o.Event("pitch",Q))},W.prototype._afterEase=function(Q,he){if(!(this._easeId&&he&&this._easeId===he)){delete this._easeId;var Re=this._zooming,Ge=this._rotating,tt=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Re&&this.fire(new o.Event("zoomend",Q)),Ge&&this.fire(new o.Event("rotateend",Q)),tt&&this.fire(new o.Event("pitchend",Q)),this.fire(new o.Event("moveend",Q))}},W.prototype.flyTo=function(Q,he){var Re=this;if(!Q.essential&&o.browser.prefersReducedMotion){var Ge=o.pick(Q,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ge,he)}this.stop(),Q=o.extend({offset:[0,0],speed:1.2,curve:1.42,easing:o.ease},Q);var tt=this.transform,wt=this.getZoom(),zt=this.getBearing(),Xt=this.getPitch(),tr=this.getPadding(),qt="zoom"in Q?o.clamp(+Q.zoom,tt.minZoom,tt.maxZoom):wt,Cr="bearing"in Q?this._normalizeBearing(Q.bearing,zt):zt,Ur="pitch"in Q?+Q.pitch:Xt,Nr="padding"in Q?Q.padding:tt.padding,Fr=tt.zoomScale(qt-wt),Gr=o.Point.convert(Q.offset),nn=tt.centerPoint.add(Gr),Cn=tt.pointLocation(nn),Rn=o.LngLat.convert(Q.center||Cn);this._normalizeCenter(Rn);var Bn=tt.project(Cn),Nn=tt.project(Rn).sub(Bn),Fn=Q.curve,Vn=Math.max(tt.width,tt.height),Zn=Vn/Fr,ea=Nn.mag();if("minZoom"in Q){var ca=o.clamp(Math.min(Q.minZoom,wt,qt),tt.minZoom,tt.maxZoom),ia=Vn/tt.zoomScale(ca-wt);Fn=Math.sqrt(ia/ea*2)}var Ea=Fn*Fn;function Va(ka){var Ha=(Zn*Zn-Vn*Vn+(ka?-1:1)*Ea*Ea*ea*ea)/(2*(ka?Zn:Vn)*Ea*ea);return Math.log(Math.sqrt(Ha*Ha+1)-Ha)}function za(ka){return(Math.exp(ka)-Math.exp(-ka))/2}function ga(ka){return(Math.exp(ka)+Math.exp(-ka))/2}function Fa(ka){return za(ka)/ga(ka)}var Ia=Va(0),Ka=function(ka){return ga(Ia)/ga(Ia+Fn*ka)},Wa=function(ka){return Vn*((ga(Ia)*Fa(Ia+Fn*ka)-za(Ia))/Ea)/ea},fi=(Va(1)-Ia)/Fn;if(Math.abs(ea)<1e-6||!isFinite(fi)){if(Math.abs(Vn-Zn)<1e-6)return this.easeTo(Q,he);var Ua=Zn<Vn?-1:1;fi=Math.abs(Math.log(Zn/Vn))/Fn,Wa=function(){return 0},Ka=function(ka){return Math.exp(Ua*Fn*ka)}}if("duration"in Q)Q.duration=+Q.duration;else{var ii="screenSpeed"in Q?+Q.screenSpeed/Fn:+Q.speed;Q.duration=1e3*fi/ii}return Q.maxDuration&&Q.duration>Q.maxDuration&&(Q.duration=0),this._zooming=!0,this._rotating=zt!==Cr,this._pitching=Ur!==Xt,this._padding=!tt.isPaddingEqual(Nr),this._prepareEase(he,!1),this._ease(function(ka){var Ha=ka*fi,Si=1/Ka(Ha);tt.zoom=ka===1?qt:wt+tt.scaleZoom(Si),Re._rotating&&(tt.bearing=o.number(zt,Cr,ka)),Re._pitching&&(tt.pitch=o.number(Xt,Ur,ka)),Re._padding&&(tt.interpolatePadding(tr,Nr,ka),nn=tt.centerPoint.add(Gr));var Ji=ka===1?Rn:tt.unproject(Bn.add(Nn.mult(Wa(Ha))).mult(Si));tt.setLocationAtPoint(tt.renderWorldCopies?Ji.wrap():Ji,nn),Re._fireMoveEvents(he)},function(){return Re._afterEase(he)},Q),this},W.prototype.isEasing=function(){return!!this._easeFrameId},W.prototype.stop=function(){return this._stop()},W.prototype._stop=function(Q,he){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Re=this._onEaseEnd;delete this._onEaseEnd,Re.call(this,he)}if(!Q){var Ge=this.handlers;Ge&&Ge.stop(!1)}return this},W.prototype._ease=function(Q,he,Re){Re.animate===!1||Re.duration===0?(Q(1),he()):(this._easeStart=o.browser.now(),this._easeOptions=Re,this._onEaseFrame=Q,this._onEaseEnd=he,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},W.prototype._renderFrameCallback=function(){var Q=Math.min((o.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},W.prototype._normalizeBearing=function(Q,he){Q=o.wrap(Q,-180,180);var Re=Math.abs(Q-he);return Math.abs(Q-360-he)<Re&&(Q-=360),Math.abs(Q+360-he)<Re&&(Q+=360),Q},W.prototype._normalizeCenter=function(Q){var he=this.transform;if(!(!he.renderWorldCopies||he.lngRange)){var Re=Q.lng-he.center.lng;Q.lng+=Re>180?-360:Re<-180?360:0}},W}(o.Evented),Na=function(W){W===void 0&&(W={}),this.options=W,o.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Na.prototype.getDefaultPosition=function(){return"bottom-right"},Na.prototype.onAdd=function(W){var fe=this.options&&this.options.compact;return this._map=W,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=M.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=M.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),fe&&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),fe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Na.prototype.onRemove=function(){M.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},Na.prototype._setElementTitle=function(W,fe){var Q=this._map._getUIString("AttributionControl."+fe);W.title=Q,W.setAttribute("aria-label",Q)},Na.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Na.prototype._updateEditLink=function(){var W=this._editLink;W||(W=this._editLink=this._container.querySelector(".mapbox-improve-map"));var fe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||o.config.ACCESS_TOKEN}];if(W){var Q=fe.reduce(function(he,Re,Ge){return Re.value&&(he+=Re.key+"="+Re.value+(Ge<fe.length-1?"&":"")),he},"?");W.href=o.config.FEEDBACK_URL+"/"+Q+(this._map._hash?this._map._hash.getHashString(!0):""),W.rel="noopener nofollow",this._setElementTitle(W,"MapFeedback")}},Na.prototype._updateData=function(W){W&&(W.sourceDataType==="metadata"||W.sourceDataType==="visibility"||W.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Na.prototype._updateAttributions=function(){if(this._map.style){var W=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?W=W.concat(this.options.customAttribution.map(function(wt){return typeof wt!="string"?"":wt})):typeof this.options.customAttribution=="string"&&W.push(this.options.customAttribution)),this._map.style.stylesheet){var fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}var Q=this._map.style.sourceCaches;for(var he in Q){var Re=Q[he];if(Re.used){var Ge=Re.getSource();Ge.attribution&&W.indexOf(Ge.attribution)<0&&W.push(Ge.attribution)}}W.sort(function(wt,zt){return wt.length-zt.length}),W=W.filter(function(wt,zt){for(var Xt=zt+1;Xt<W.length;Xt++)if(W[Xt].indexOf(wt)>=0)return!1;return!0});var tt=W.join(" | ");tt!==this._attribHTML&&(this._attribHTML=tt,W.length?(this._innerContainer.innerHTML=tt,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Na.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var gi=function(){o.bindAll(["_updateLogo"],this),o.bindAll(["_updateCompact"],this)};gi.prototype.onAdd=function(W){this._map=W,this._container=M.create("div","mapboxgl-ctrl");var fe=M.create("a","mapboxgl-ctrl-logo");return fe.target="_blank",fe.rel="noopener nofollow",fe.href="https://www.mapbox.com/",fe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),fe.setAttribute("rel","noopener nofollow"),this._container.appendChild(fe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},gi.prototype.onRemove=function(){M.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},gi.prototype.getDefaultPosition=function(){return"bottom-left"},gi.prototype._updateLogo=function(W){(!W||W.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},gi.prototype._logoRequired=function(){if(this._map.style){var W=this._map.style.sourceCaches;for(var fe in W){var Q=W[fe].getSource();if(Q.mapbox_logo)return!0}return!1}},gi.prototype._updateCompact=function(){var W=this._container.children;if(W.length){var fe=W[0];this._map.getCanvasContainer().offsetWidth<250?fe.classList.add("mapboxgl-compact"):fe.classList.remove("mapboxgl-compact")}};var wf=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wf.prototype.add=function(W){var fe=++this._id,Q=this._queue;return Q.push({callback:W,id:fe,cancelled:!1}),fe},wf.prototype.remove=function(W){for(var fe=this._currentlyRunning,Q=fe?this._queue.concat(fe):this._queue,he=0,Re=Q;he<Re.length;he+=1){var Ge=Re[he];if(Ge.id===W){Ge.cancelled=!0;return}}},wf.prototype.run=function(W){W===void 0&&(W=0);var fe=this._currentlyRunning=this._queue;this._queue=[];for(var Q=0,he=fe;Q<he.length;Q+=1){var Re=he[Q];if(!Re.cancelled&&(Re.callback(W),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},wf.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Sc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","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"},hu=o.window.HTMLImageElement,rc=o.window.HTMLElement,Wl=o.window.ImageBitmap,Hu=-2,Gu=22,Co=0,Yl=60,nc={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:Hu,maxZoom:Gu,minPitch:Co,maxPitch:Yl,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,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},ac=function(ce){function W(Q){var he=this;if(Q=o.extend({},nc,Q),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<Co)throw new Error("minPitch must be greater than or equal to "+Co);if(Q.maxPitch!=null&&Q.maxPitch>Yl)throw new Error("maxPitch must be less than or equal to "+Yl);var Re=new Sn(Q.minZoom,Q.maxZoom,Q.minPitch,Q.maxPitch,Q.renderWorldCopies);if(ce.call(this,Re,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 wf,this._controls=[],this._mapId=o.uniqueId(),this._locale=o.extend({},Sc,Q.locale),this._clickTolerance=Q.clickTolerance,this._requestManager=new o.RequestManager(Q.transformRequest,Q.accessToken),typeof Q.container=="string"){if(this._container=o.window.document.getElementById(Q.container),!this._container)throw new Error("Container '"+Q.container+"' not found.")}else if(Q.container instanceof rc)this._container=Q.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(Q.maxBounds&&this.setMaxBounds(Q.maxBounds),o.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return he._update(!1)}),this.on("moveend",function(){return he._update(!1)}),this.on("zoom",function(){return he._update(!0)}),typeof o.window<"u"&&(o.window.addEventListener("online",this._onWindowOnline,!1),o.window.addEventListener("resize",this._onWindowResize,!1),o.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new pi(this,Q);var Ge=typeof Q.hash=="string"&&Q.hash||void 0;this._hash=Q.hash&&new Ta(Ge).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:Q.center,zoom:Q.zoom,bearing:Q.bearing,pitch:Q.pitch}),Q.bounds&&(this.resize(),this.fitBounds(Q.bounds,o.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 Na({customAttribution:Q.customAttribution})),this.addControl(new gi,Q.logoPosition),this.on("style.load",function(){he.transform.unmodified&&he.jumpTo(he.style.stylesheet)}),this.on("data",function(tt){he._update(tt.dataType==="style"),he.fire(new o.Event(tt.dataType+"data",tt))}),this.on("dataloading",function(tt){he.fire(new o.Event(tt.dataType+"dataloading",tt))})}W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W;var fe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return W.prototype._getMapId=function(){return this._mapId},W.prototype.addControl=function(he,Re){if(Re===void 0&&(he.getDefaultPosition?Re=he.getDefaultPosition():Re="top-right"),!he||!he.onAdd)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Ge=he.onAdd(this);this._controls.push(he);var tt=this._controlPositions[Re];return Re.indexOf("bottom")!==-1?tt.insertBefore(Ge,tt.firstChild):tt.appendChild(Ge),this},W.prototype.removeControl=function(he){if(!he||!he.onRemove)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Re=this._controls.indexOf(he);return Re>-1&&this._controls.splice(Re,1),he.onRemove(this),this},W.prototype.hasControl=function(he){return this._controls.indexOf(he)>-1},W.prototype.resize=function(he){var Re=this._containerDimensions(),Ge=Re[0],tt=Re[1];this._resizeCanvas(Ge,tt),this.transform.resize(Ge,tt),this.painter.resize(Ge,tt);var wt=!this._moving;return wt&&(this.stop(),this.fire(new o.Event("movestart",he)).fire(new o.Event("move",he))),this.fire(new o.Event("resize",he)),wt&&this.fire(new o.Event("moveend",he)),this},W.prototype.getBounds=function(){return this.transform.getBounds()},W.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},W.prototype.setMaxBounds=function(he){return this.transform.setMaxBounds(o.LngLatBounds.convert(he)),this._update()},W.prototype.setMinZoom=function(he){if(he=he??Hu,he>=Hu&&he<=this.transform.maxZoom)return this.transform.minZoom=he,this._update(),this.getZoom()<he&&this.setZoom(he),this;throw new Error("minZoom must be between "+Hu+" and the current maxZoom, inclusive")},W.prototype.getMinZoom=function(){return this.transform.minZoom},W.prototype.setMaxZoom=function(he){if(he=he??Gu,he>=this.transform.minZoom)return this.transform.maxZoom=he,this._update(),this.getZoom()>he&&this.setZoom(he),this;throw new Error("maxZoom must be greater than the current minZoom")},W.prototype.getMaxZoom=function(){return this.transform.maxZoom},W.prototype.setMinPitch=function(he){if(he=he??Co,he<Co)throw new Error("minPitch must be greater than or equal to "+Co);if(he>=Co&&he<=this.transform.maxPitch)return this.transform.minPitch=he,this._update(),this.getPitch()<he&&this.setPitch(he),this;throw new Error("minPitch must be between "+Co+" and the current maxPitch, inclusive")},W.prototype.getMinPitch=function(){return this.transform.minPitch},W.prototype.setMaxPitch=function(he){if(he=he??Yl,he>Yl)throw new Error("maxPitch must be less than or equal to "+Yl);if(he>=this.transform.minPitch)return this.transform.maxPitch=he,this._update(),this.getPitch()>he&&this.setPitch(he),this;throw new Error("maxPitch must be greater than the current minPitch")},W.prototype.getMaxPitch=function(){return this.transform.maxPitch},W.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},W.prototype.setRenderWorldCopies=function(he){return this.transform.renderWorldCopies=he,this._update()},W.prototype.project=function(he){return this.transform.locationPoint(o.LngLat.convert(he))},W.prototype.unproject=function(he){return this.transform.pointLocation(o.Point.convert(he))},W.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},W.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},W.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},W.prototype._createDelegatedListener=function(he,Re,Ge){var tt=this,wt;if(he==="mouseenter"||he==="mouseover"){var zt=!1,Xt=function(Fr){var Gr=tt.getLayer(Re)?tt.queryRenderedFeatures(Fr.point,{layers:[Re]}):[];Gr.length?zt||(zt=!0,Ge.call(tt,new Xe(he,tt,Fr.originalEvent,{features:Gr}))):zt=!1},tr=function(){zt=!1};return{layer:Re,listener:Ge,delegates:{mousemove:Xt,mouseout:tr}}}else if(he==="mouseleave"||he==="mouseout"){var qt=!1,Cr=function(Fr){var Gr=tt.getLayer(Re)?tt.queryRenderedFeatures(Fr.point,{layers:[Re]}):[];Gr.length?qt=!0:qt&&(qt=!1,Ge.call(tt,new Xe(he,tt,Fr.originalEvent)))},Ur=function(Fr){qt&&(qt=!1,Ge.call(tt,new Xe(he,tt,Fr.originalEvent)))};return{layer:Re,listener:Ge,delegates:{mousemove:Cr,mouseout:Ur}}}else{var Nr=function(Fr){var Gr=tt.getLayer(Re)?tt.queryRenderedFeatures(Fr.point,{layers:[Re]}):[];Gr.length&&(Fr.features=Gr,Ge.call(tt,Fr),delete Fr.features)};return{layer:Re,listener:Ge,delegates:(wt={},wt[he]=Nr,wt)}}},W.prototype.on=function(he,Re,Ge){if(Ge===void 0)return ce.prototype.on.call(this,he,Re);var tt=this._createDelegatedListener(he,Re,Ge);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[he]=this._delegatedListeners[he]||[],this._delegatedListeners[he].push(tt);for(var wt in tt.delegates)this.on(wt,tt.delegates[wt]);return this},W.prototype.once=function(he,Re,Ge){if(Ge===void 0)return ce.prototype.once.call(this,he,Re);var tt=this._createDelegatedListener(he,Re,Ge);for(var wt in tt.delegates)this.once(wt,tt.delegates[wt]);return this},W.prototype.off=function(he,Re,Ge){var tt=this;if(Ge===void 0)return ce.prototype.off.call(this,he,Re);var wt=function(zt){for(var Xt=zt[he],tr=0;tr<Xt.length;tr++){var qt=Xt[tr];if(qt.layer===Re&&qt.listener===Ge){for(var Cr in qt.delegates)tt.off(Cr,qt.delegates[Cr]);return Xt.splice(tr,1),tt}}};return this._delegatedListeners&&this._delegatedListeners[he]&&wt(this._delegatedListeners),this},W.prototype.queryRenderedFeatures=function(he,Re){if(!this.style)return[];Re===void 0&&he!==void 0&&!(he instanceof o.Point)&&!Array.isArray(he)&&(Re=he,he=void 0),Re=Re||{},he=he||[[0,0],[this.transform.width,this.transform.height]];var Ge;if(he instanceof o.Point||typeof he[0]=="number")Ge=[o.Point.convert(he)];else{var tt=o.Point.convert(he[0]),wt=o.Point.convert(he[1]);Ge=[tt,new o.Point(wt.x,tt.y),wt,new o.Point(tt.x,wt.y),tt]}return this.style.queryRenderedFeatures(Ge,Re,this.transform)},W.prototype.querySourceFeatures=function(he,Re){return this.style.querySourceFeatures(he,Re)},W.prototype.setStyle=function(he,Re){return Re=o.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},Re),Re.diff!==!1&&Re.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&he?(this._diffStyle(he,Re),this):(this._localIdeographFontFamily=Re.localIdeographFontFamily,this._updateStyle(he,Re))},W.prototype._getUIString=function(he){var Re=this._locale[he];if(Re==null)throw new Error("Missing UI string '"+he+"'");return Re},W.prototype._updateStyle=function(he,Re){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),he)this.style=new uo(this,Re||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof he=="string"?this.style.loadURL(he):this.style.loadJSON(he),this},W.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new uo(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},W.prototype._diffStyle=function(he,Re){var Ge=this;if(typeof he=="string"){var tt=this._requestManager.normalizeStyleURL(he),wt=this._requestManager.transformRequest(tt,o.ResourceType.Style);o.getJSON(wt,function(zt,Xt){zt?Ge.fire(new o.ErrorEvent(zt)):Xt&&Ge._updateDiff(Xt,Re)})}else typeof he=="object"&&this._updateDiff(he,Re)},W.prototype._updateDiff=function(he,Re){try{this.style.setState(he)&&this._update(!0)}catch(Ge){o.warnOnce("Unable to perform style diff: "+(Ge.message||Ge.error||Ge)+". Rebuilding the style from scratch."),this._updateStyle(he,Re)}},W.prototype.getStyle=function(){if(this.style)return this.style.serialize()},W.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():o.warnOnce("There is no style added to the map.")},W.prototype.addSource=function(he,Re){return this._lazyInitEmptyStyle(),this.style.addSource(he,Re),this._update(!0)},W.prototype.isSourceLoaded=function(he){var Re=this.style&&this.style.sourceCaches[he];if(Re===void 0){this.fire(new o.ErrorEvent(new Error("There is no source with ID '"+he+"'")));return}return Re.loaded()},W.prototype.areTilesLoaded=function(){var he=this.style&&this.style.sourceCaches;for(var Re in he){var Ge=he[Re],tt=Ge._tiles;for(var wt in tt){var zt=tt[wt];if(!(zt.state==="loaded"||zt.state==="errored"))return!1}}return!0},W.prototype.addSourceType=function(he,Re,Ge){return this._lazyInitEmptyStyle(),this.style.addSourceType(he,Re,Ge)},W.prototype.removeSource=function(he){return this.style.removeSource(he),this._update(!0)},W.prototype.getSource=function(he){return this.style.getSource(he)},W.prototype.addImage=function(he,Re,Ge){Ge===void 0&&(Ge={});var tt=Ge.pixelRatio;tt===void 0&&(tt=1);var wt=Ge.sdf;wt===void 0&&(wt=!1);var zt=Ge.stretchX,Xt=Ge.stretchY,tr=Ge.content;this._lazyInitEmptyStyle();var qt=0;if(Re instanceof hu||Wl&&Re instanceof Wl){var Cr=o.browser.getImageData(Re),Ur=Cr.width,Nr=Cr.height,Fr=Cr.data;this.style.addImage(he,{data:new o.RGBAImage({width:Ur,height:Nr},Fr),pixelRatio:tt,stretchX:zt,stretchY:Xt,content:tr,sdf:wt,version:qt})}else{if(Re.width===void 0||Re.height===void 0)return this.fire(new o.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 Gr=Re.width,nn=Re.height,Cn=Re.data,Rn=Re;this.style.addImage(he,{data:new o.RGBAImage({width:Gr,height:nn},new Uint8Array(Cn)),pixelRatio:tt,stretchX:zt,stretchY:Xt,content:tr,sdf:wt,version:qt,userImage:Rn}),Rn.onAdd&&Rn.onAdd(this,he)}},W.prototype.updateImage=function(he,Re){var Ge=this.style.getImage(he);if(!Ge)return this.fire(new o.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var tt=Re instanceof hu||Wl&&Re instanceof Wl?o.browser.getImageData(Re):Re,wt=tt.width,zt=tt.height,Xt=tt.data;if(wt===void 0||zt===void 0)return this.fire(new o.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(wt!==Ge.data.width||zt!==Ge.data.height)return this.fire(new o.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var tr=!(Re instanceof hu||Wl&&Re instanceof Wl);Ge.data.replace(Xt,tr),this.style.updateImage(he,Ge)},W.prototype.hasImage=function(he){return he?!!this.style.getImage(he):(this.fire(new o.ErrorEvent(new Error("Missing required image id"))),!1)},W.prototype.removeImage=function(he){this.style.removeImage(he)},W.prototype.loadImage=function(he,Re){o.getImage(this._requestManager.transformRequest(he,o.ResourceType.Image),Re)},W.prototype.listImages=function(){return this.style.listImages()},W.prototype.addLayer=function(he,Re){return this._lazyInitEmptyStyle(),this.style.addLayer(he,Re),this._update(!0)},W.prototype.moveLayer=function(he,Re){return this.style.moveLayer(he,Re),this._update(!0)},W.prototype.removeLayer=function(he){return this.style.removeLayer(he),this._update(!0)},W.prototype.getLayer=function(he){return this.style.getLayer(he)},W.prototype.setLayerZoomRange=function(he,Re,Ge){return this.style.setLayerZoomRange(he,Re,Ge),this._update(!0)},W.prototype.setFilter=function(he,Re,Ge){return Ge===void 0&&(Ge={}),this.style.setFilter(he,Re,Ge),this._update(!0)},W.prototype.getFilter=function(he){return this.style.getFilter(he)},W.prototype.setPaintProperty=function(he,Re,Ge,tt){return tt===void 0&&(tt={}),this.style.setPaintProperty(he,Re,Ge,tt),this._update(!0)},W.prototype.getPaintProperty=function(he,Re){return this.style.getPaintProperty(he,Re)},W.prototype.setLayoutProperty=function(he,Re,Ge,tt){return tt===void 0&&(tt={}),this.style.setLayoutProperty(he,Re,Ge,tt),this._update(!0)},W.prototype.getLayoutProperty=function(he,Re){return this.style.getLayoutProperty(he,Re)},W.prototype.setLight=function(he,Re){return Re===void 0&&(Re={}),this._lazyInitEmptyStyle(),this.style.setLight(he,Re),this._update(!0)},W.prototype.getLight=function(){return this.style.getLight()},W.prototype.setFeatureState=function(he,Re){return this.style.setFeatureState(he,Re),this._update()},W.prototype.removeFeatureState=function(he,Re){return this.style.removeFeatureState(he,Re),this._update()},W.prototype.getFeatureState=function(he){return this.style.getFeatureState(he)},W.prototype.getContainer=function(){return this._container},W.prototype.getCanvasContainer=function(){return this._canvasContainer},W.prototype.getCanvas=function(){return this._canvas},W.prototype._containerDimensions=function(){var he=0,Re=0;return this._container&&(he=this._container.clientWidth||400,Re=this._container.clientHeight||300),[he,Re]},W.prototype._detectMissingCSS=function(){var he=o.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");he!=="rgb(250, 128, 114)"&&o.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 in https://www.mapbox.com/mapbox-gl-js/api/.")},W.prototype._setupContainer=function(){var he=this._container;he.classList.add("mapboxgl-map");var Re=this._missingCSSCanary=M.create("div","mapboxgl-canary",he);Re.style.visibility="hidden",this._detectMissingCSS();var Ge=this._canvasContainer=M.create("div","mapboxgl-canvas-container",he);this._interactive&&Ge.classList.add("mapboxgl-interactive"),this._canvas=M.create("canvas","mapboxgl-canvas",Ge),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"),this._canvas.setAttribute("role","region");var tt=this._containerDimensions();this._resizeCanvas(tt[0],tt[1]);var wt=this._controlContainer=M.create("div","mapboxgl-control-container",he),zt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Xt){zt[Xt]=M.create("div","mapboxgl-ctrl-"+Xt,wt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},W.prototype._resizeCanvas=function(he,Re){var Ge=o.browser.devicePixelRatio||1;this._canvas.width=Ge*he,this._canvas.height=Ge*Re,this._canvas.style.width=he+"px",this._canvas.style.height=Re+"px"},W.prototype._setupPainter=function(){var he=o.extend({},L.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),Re=this._canvas.getContext("webgl",he)||this._canvas.getContext("experimental-webgl",he);if(!Re){this.fire(new o.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Ir(Re,this.transform),o.webpSupported.testSupport(Re)},W.prototype._contextLost=function(he){he.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.Event("webglcontextlost",{originalEvent:he}))},W.prototype._contextRestored=function(he){this._setupPainter(),this.resize(),this._update(),this.fire(new o.Event("webglcontextrestored",{originalEvent:he}))},W.prototype._onMapScroll=function(he){if(he.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},W.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},W.prototype._update=function(he){return this.style?(this._styleDirty=this._styleDirty||he,this._sourcesDirty=!0,this.triggerRepaint(),this):this},W.prototype._requestRenderFrame=function(he){return this._update(),this._renderTaskQueue.add(he)},W.prototype._cancelRenderFrame=function(he){this._renderTaskQueue.remove(he)},W.prototype._render=function(he){var Re=this,Ge,tt=0,wt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(Ge=wt.createQueryEXT(),wt.beginQueryEXT(wt.TIME_ELAPSED_EXT,Ge),tt=o.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(he),!this._removed){var zt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Xt=this.transform.zoom,tr=o.browser.now();this.style.zoomHistory.update(Xt,tr);var qt=new o.EvaluationParameters(Xt,{now:tr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Cr=qt.crossFadingFactor();(Cr!==1||Cr!==this._crossFadingFactor)&&(zt=!0,this._crossFadingFactor=Cr),this.style.update(qt)}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 o.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new o.Event("load"))),this.style&&(this.style.hasTransitions()||zt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var Ur=o.browser.now()-tt;wt.endQueryEXT(wt.TIME_ELAPSED_EXT,Ge),setTimeout(function(){var Gr=wt.getQueryObjectEXT(Ge,wt.QUERY_RESULT_EXT)/1e6;wt.deleteQueryEXT(Ge),Re.fire(new o.Event("gpu-timing-frame",{cpuTime:Ur,gpuTime:Gr}))},50)}if(this.listens("gpu-timing-layer")){var Nr=this.painter.collectGpuTimers();setTimeout(function(){var Gr=Re.painter.queryGpuTimers(Nr);Re.fire(new o.Event("gpu-timing-layer",{layerTimes:Gr}))},50)}var Fr=this._sourcesDirty||this._styleDirty||this._placementDirty;return Fr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.Event("idle")),this._loaded&&!this._fullyLoaded&&!Fr&&(this._fullyLoaded=!0),this}},W.prototype.remove=function(){this._hash&&this._hash.remove();for(var he=0,Re=this._controls;he<Re.length;he+=1){var Ge=Re[he];Ge.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),typeof o.window<"u"&&(o.window.removeEventListener("resize",this._onWindowResize,!1),o.window.removeEventListener("orientationchange",this._onWindowResize,!1),o.window.removeEventListener("online",this._onWindowOnline,!1));var tt=this.painter.context.gl.getExtension("WEBGL_lose_context");tt&&tt.loseContext&&tt.loseContext(),Tf(this._canvasContainer),Tf(this._controlContainer),Tf(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new o.Event("remove"))},W.prototype.triggerRepaint=function(){var he=this;this.style&&!this._frame&&(this._frame=o.browser.frame(function(Re){he._frame=null,he._render(Re)}))},W.prototype._onWindowOnline=function(){this._update()},W.prototype._onWindowResize=function(he){this._trackResize&&this.resize({originalEvent:he})._update()},fe.showTileBoundaries.get=function(){return!!this._showTileBoundaries},fe.showTileBoundaries.set=function(Q){this._showTileBoundaries!==Q&&(this._showTileBoundaries=Q,this._update())},fe.showPadding.get=function(){return!!this._showPadding},fe.showPadding.set=function(Q){this._showPadding!==Q&&(this._showPadding=Q,this._update())},fe.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},fe.showCollisionBoxes.set=function(Q){this._showCollisionBoxes!==Q&&(this._showCollisionBoxes=Q,Q?this.style._generateCollisionBoxes():this._update())},fe.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},fe.showOverdrawInspector.set=function(Q){this._showOverdrawInspector!==Q&&(this._showOverdrawInspector=Q,this._update())},fe.repaint.get=function(){return!!this._repaint},fe.repaint.set=function(Q){this._repaint!==Q&&(this._repaint=Q,this.triggerRepaint())},fe.vertices.get=function(){return!!this._vertices},fe.vertices.set=function(Q){this._vertices=Q,this._update()},W.prototype._setCacheLimits=function(he,Re){o.setCacheLimits(he,Re)},fe.version.get=function(){return o.version},Object.defineProperties(W.prototype,fe),W}(Zs);function Tf(ce){ce.parentNode&&ce.parentNode.removeChild(ce)}var Df={showCompass:!0,showZoom:!0,visualizePitch:!1},bl=function(W){var fe=this;this.options=o.extend({},Df,W),this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(Q){return Q.preventDefault()}),this.options.showZoom&&(o.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(Q){return fe._map.zoomIn({},{originalEvent:Q})}),M.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(Q){return fe._map.zoomOut({},{originalEvent:Q})}),M.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(o.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(Q){fe.options.visualizePitch?fe._map.resetNorthPitch({},{originalEvent:Q}):fe._map.resetNorth({},{originalEvent:Q})}),this._compassIcon=M.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};bl.prototype._updateZoomButtons=function(){var W=this._map.getZoom(),fe=W===this._map.getMaxZoom(),Q=W===this._map.getMinZoom();this._zoomInButton.disabled=fe,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute("aria-disabled",fe.toString()),this._zoomOutButton.setAttribute("aria-disabled",Q.toString())},bl.prototype._rotateCompassArrow=function(){var W=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=W},bl.prototype.onAdd=function(W){return this._map=W,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 No(this._map,this._compass,this.options.visualizePitch)),this._container},bl.prototype.onRemove=function(){M.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},bl.prototype._createButton=function(W,fe){var Q=M.create("button",W,this._container);return Q.type="button",Q.addEventListener("click",fe),Q},bl.prototype._setButtonTitle=function(W,fe){var Q=this._map._getUIString("NavigationControl."+fe);W.title=Q,W.setAttribute("aria-label",Q)};var No=function(W,fe,Q){Q===void 0&&(Q=!1),this._clickTolerance=10,this.element=fe,this.mouseRotate=new ta({clickTolerance:W.dragRotate._mouseRotate._clickTolerance}),this.map=W,Q&&(this.mousePitch=new Wn({clickTolerance:W.dragRotate._mousePitch._clickTolerance})),o.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),M.addEventListener(fe,"mousedown",this.mousedown),M.addEventListener(fe,"touchstart",this.touchstart,{passive:!1}),M.addEventListener(fe,"touchmove",this.touchmove),M.addEventListener(fe,"touchend",this.touchend),M.addEventListener(fe,"touchcancel",this.reset)};No.prototype.down=function(W,fe){this.mouseRotate.mousedown(W,fe),this.mousePitch&&this.mousePitch.mousedown(W,fe),M.disableDrag()},No.prototype.move=function(W,fe){var Q=this.map,he=this.mouseRotate.mousemoveWindow(W,fe);if(he&&he.bearingDelta&&Q.setBearing(Q.getBearing()+he.bearingDelta),this.mousePitch){var Re=this.mousePitch.mousemoveWindow(W,fe);Re&&Re.pitchDelta&&Q.setPitch(Q.getPitch()+Re.pitchDelta)}},No.prototype.off=function(){var W=this.element;M.removeEventListener(W,"mousedown",this.mousedown),M.removeEventListener(W,"touchstart",this.touchstart,{passive:!1}),M.removeEventListener(W,"touchmove",this.touchmove),M.removeEventListener(W,"touchend",this.touchend),M.removeEventListener(W,"touchcancel",this.reset),this.offTemp()},No.prototype.offTemp=function(){M.enableDrag(),M.removeEventListener(o.window,"mousemove",this.mousemove),M.removeEventListener(o.window,"mouseup",this.mouseup)},No.prototype.mousedown=function(W){this.down(o.extend({},W,{ctrlKey:!0,preventDefault:function(){return W.preventDefault()}}),M.mousePos(this.element,W)),M.addEventListener(o.window,"mousemove",this.mousemove),M.addEventListener(o.window,"mouseup",this.mouseup)},No.prototype.mousemove=function(W){this.move(W,M.mousePos(this.element,W))},No.prototype.mouseup=function(W){this.mouseRotate.mouseupWindow(W),this.mousePitch&&this.mousePitch.mouseupWindow(W),this.offTemp()},No.prototype.touchstart=function(W){W.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=M.touchPos(this.element,W.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return W.preventDefault()}},this._startPos))},No.prototype.touchmove=function(W){W.targetTouches.length!==1?this.reset():(this._lastPos=M.touchPos(this.element,W.targetTouches)[0],this.move({preventDefault:function(){return W.preventDefault()}},this._lastPos))},No.prototype.touchend=function(W){W.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},No.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function wl(ce,W,fe){if(ce=new o.LngLat(ce.lng,ce.lat),W){var Q=new o.LngLat(ce.lng-360,ce.lat),he=new o.LngLat(ce.lng+360,ce.lat),Re=fe.locationPoint(ce).distSqr(W);fe.locationPoint(Q).distSqr(W)<Re?ce=Q:fe.locationPoint(he).distSqr(W)<Re&&(ce=he)}for(;Math.abs(ce.lng-fe.center.lng)>180;){var Ge=fe.locationPoint(ce);if(Ge.x>=0&&Ge.y>=0&&Ge.x<=fe.width&&Ge.y<=fe.height)break;ce.lng>fe.center.lng?ce.lng-=360:ce.lng+=360}return ce}var Af={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 If(ce,W,fe){var Q=ce.classList;for(var he in Af)Q.remove("mapboxgl-"+fe+"-anchor-"+he);Q.add("mapboxgl-"+fe+"-anchor-"+W)}var Wu=function(ce){function W(fe,Q){if(ce.call(this),(fe instanceof o.window.HTMLElement||Q)&&(fe=o.extend({element:fe},Q)),o.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=fe&&fe.anchor||"center",this._color=fe&&fe.color||"#3FB1CE",this._scale=fe&&fe.scale||1,this._draggable=fe&&fe.draggable||!1,this._clickTolerance=fe&&fe.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=fe&&fe.rotation||0,this._rotationAlignment=fe&&fe.rotationAlignment||"auto",this._pitchAlignment=fe&&fe.pitchAlignment&&fe.pitchAlignment!=="auto"?fe.pitchAlignment:this._rotationAlignment,!fe||!fe.element){this._defaultMarker=!0,this._element=M.create("div"),this._element.setAttribute("aria-label","Map marker");var he=M.createNS("http://www.w3.org/2000/svg","svg"),Re=41,Ge=27;he.setAttributeNS(null,"display","block"),he.setAttributeNS(null,"height",Re+"px"),he.setAttributeNS(null,"width",Ge+"px"),he.setAttributeNS(null,"viewBox","0 0 "+Ge+" "+Re);var tt=M.createNS("http://www.w3.org/2000/svg","g");tt.setAttributeNS(null,"stroke","none"),tt.setAttributeNS(null,"stroke-width","1"),tt.setAttributeNS(null,"fill","none"),tt.setAttributeNS(null,"fill-rule","evenodd");var wt=M.createNS("http://www.w3.org/2000/svg","g");wt.setAttributeNS(null,"fill-rule","nonzero");var zt=M.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),zt.setAttributeNS(null,"fill","#000000");for(var Xt=[{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"}],tr=0,qt=Xt;tr<qt.length;tr+=1){var Cr=qt[tr],Ur=M.createNS("http://www.w3.org/2000/svg","ellipse");Ur.setAttributeNS(null,"opacity","0.04"),Ur.setAttributeNS(null,"cx","10.5"),Ur.setAttributeNS(null,"cy","5.80029008"),Ur.setAttributeNS(null,"rx",Cr.rx),Ur.setAttributeNS(null,"ry",Cr.ry),zt.appendChild(Ur)}var Nr=M.createNS("http://www.w3.org/2000/svg","g");Nr.setAttributeNS(null,"fill",this._color);var Fr=M.createNS("http://www.w3.org/2000/svg","path");Fr.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"),Nr.appendChild(Fr);var Gr=M.createNS("http://www.w3.org/2000/svg","g");Gr.setAttributeNS(null,"opacity","0.25"),Gr.setAttributeNS(null,"fill","#000000");var nn=M.createNS("http://www.w3.org/2000/svg","path");nn.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"),Gr.appendChild(nn);var Cn=M.createNS("http://www.w3.org/2000/svg","g");Cn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Cn.setAttributeNS(null,"fill","#FFFFFF");var Rn=M.createNS("http://www.w3.org/2000/svg","g");Rn.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Bn=M.createNS("http://www.w3.org/2000/svg","circle");Bn.setAttributeNS(null,"fill","#000000"),Bn.setAttributeNS(null,"opacity","0.25"),Bn.setAttributeNS(null,"cx","5.5"),Bn.setAttributeNS(null,"cy","5.5"),Bn.setAttributeNS(null,"r","5.4999962");var Nn=M.createNS("http://www.w3.org/2000/svg","circle");Nn.setAttributeNS(null,"fill","#FFFFFF"),Nn.setAttributeNS(null,"cx","5.5"),Nn.setAttributeNS(null,"cy","5.5"),Nn.setAttributeNS(null,"r","5.4999962"),Rn.appendChild(Bn),Rn.appendChild(Nn),wt.appendChild(zt),wt.appendChild(Nr),wt.appendChild(Gr),wt.appendChild(Cn),wt.appendChild(Rn),he.appendChild(wt),he.setAttributeNS(null,"height",Re*this._scale+"px"),he.setAttributeNS(null,"width",Ge*this._scale+"px"),this._element.appendChild(he),this._offset=o.Point.convert(fe&&fe.offset||[0,-14])}else this._element=fe.element,this._offset=o.Point.convert(fe&&fe.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(Fn){Fn.preventDefault()}),this._element.addEventListener("mousedown",function(Fn){Fn.preventDefault()}),If(this._element,this._anchor,"marker"),this._popup=null}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.addTo=function(Q){return this.remove(),this._map=Q,Q.getCanvasContainer().appendChild(this._element),Q.on("move",this._update),Q.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},W.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),M.remove(this._element),this._popup&&this._popup.remove(),this},W.prototype.getLngLat=function(){return this._lngLat},W.prototype.setLngLat=function(Q){return this._lngLat=o.LngLat.convert(Q),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},W.prototype.getElement=function(){return this._element},W.prototype.setPopup=function(Q){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),Q){if(!("offset"in Q.options)){var he=38.1,Re=13.5,Ge=Math.sqrt(Math.pow(Re,2)/2);Q.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-he],"bottom-left":[Ge,(he-Re+Ge)*-1],"bottom-right":[-Ge,(he-Re+Ge)*-1],left:[Re,(he-Re)*-1],right:[-Re,(he-Re)*-1]}:this._offset}this._popup=Q,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},W.prototype._onKeyPress=function(Q){var he=Q.code,Re=Q.charCode||Q.keyCode;(he==="Space"||he==="Enter"||Re===32||Re===13)&&this.togglePopup()},W.prototype._onMapClick=function(Q){var he=Q.originalEvent.target,Re=this._element;this._popup&&(he===Re||Re.contains(he))&&this.togglePopup()},W.prototype.getPopup=function(){return this._popup},W.prototype.togglePopup=function(){var Q=this._popup;if(Q)Q.isOpen()?Q.remove():Q.addTo(this._map);else return this;return this},W.prototype._update=function(Q){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=wl(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var he="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?he="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(he="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var Re="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Re="rotateX(0deg)":this._pitchAlignment==="map"&&(Re="rotateX("+this._map.getPitch()+"deg)"),(!Q||Q.type==="moveend")&&(this._pos=this._pos.round()),M.setTransform(this._element,Af[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+Re+" "+he)}},W.prototype.getOffset=function(){return this._offset},W.prototype.setOffset=function(Q){return this._offset=o.Point.convert(Q),this._update(),this},W.prototype._onMove=function(Q){if(!this._isDragging){var he=this._clickTolerance||this._map._clickTolerance;this._isDragging=Q.point.dist(this._pointerdownPos)>=he}this._isDragging&&(this._pos=Q.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 o.Event("dragstart"))),this.fire(new o.Event("drag")))},W.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.Event("dragend")),this._state="inactive"},W.prototype._addDragHandler=function(Q){this._element.contains(Q.originalEvent.target)&&(Q.preventDefault(),this._positionDelta=Q.point.sub(this._pos).add(this._offset),this._pointerdownPos=Q.point,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))},W.prototype.setDraggable=function(Q){return this._draggable=!!Q,this._map&&(Q?(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},W.prototype.isDraggable=function(){return this._draggable},W.prototype.setRotation=function(Q){return this._rotation=Q||0,this._update(),this},W.prototype.getRotation=function(){return this._rotation},W.prototype.setRotationAlignment=function(Q){return this._rotationAlignment=Q||"auto",this._update(),this},W.prototype.getRotationAlignment=function(){return this._rotationAlignment},W.prototype.setPitchAlignment=function(Q){return this._pitchAlignment=Q&&Q!=="auto"?Q:this._rotationAlignment,this._update(),this},W.prototype.getPitchAlignment=function(){return this._pitchAlignment},W}(o.Evented),ic={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Xl;function Mf(ce){Xl!==void 0?ce(Xl):o.window.navigator.permissions!==void 0?o.window.navigator.permissions.query({name:"geolocation"}).then(function(W){Xl=W.state!=="denied",ce(Xl)}):(Xl=!!o.window.navigator.geolocation,ce(Xl))}var Yu=0,vu=!1,Ec=function(ce){function W(fe){ce.call(this),this.options=o.extend({},ic,fe),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.onAdd=function(Q){return this._map=Q,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Mf(this._setupUI),this._container},W.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(o.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(),M.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yu=0,vu=!1},W.prototype._isOutOfMapMaxBounds=function(Q){var he=this._map.getMaxBounds(),Re=Q.coords;return he&&(Re.longitude<he.getWest()||Re.longitude>he.getEast()||Re.latitude<he.getSouth()||Re.latitude>he.getNorth())},W.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",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");break}},W.prototype._onSuccess=function(Q){if(this._map){if(this._isOutOfMapMaxBounds(Q)){this._setErrorState(),this.fire(new o.Event("outofmaxbounds",Q)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=Q,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");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(Q),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(Q),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",Q)),this._finish()}},W.prototype._updateCamera=function(Q){var he=new o.LngLat(Q.coords.longitude,Q.coords.latitude),Re=Q.coords.accuracy,Ge=this._map.getBearing(),tt=o.extend({bearing:Ge},this.options.fitBoundsOptions);this._map.fitBounds(he.toBounds(Re),tt,{geolocateSource:!0})},W.prototype._updateMarker=function(Q){if(Q){var he=new o.LngLat(Q.coords.longitude,Q.coords.latitude);this._accuracyCircleMarker.setLngLat(he).addTo(this._map),this._userLocationDotMarker.setLngLat(he).addTo(this._map),this._accuracy=Q.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},W.prototype._updateCircleRadius=function(){var Q=this._map._container.clientHeight/2,he=this._map.unproject([0,Q]),Re=this._map.unproject([1,Q]),Ge=he.distanceTo(Re),tt=Math.ceil(2*this._accuracy/Ge);this._circleElement.style.width=tt+"px",this._circleElement.style.height=tt+"px"},W.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},W.prototype._onError=function(Q){if(this._map){if(this.options.trackUserLocation)if(Q.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 he=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=he,this._geolocateButton.setAttribute("aria-label",he),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(Q.code===3&&vu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("error",Q)),this._finish()}},W.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},W.prototype._setupUI=function(Q){var he=this;if(this._container.addEventListener("contextmenu",function(tt){return tt.preventDefault()}),this._geolocateButton=M.create("button","mapboxgl-ctrl-geolocate",this._container),M.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",Q===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Re=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Re,this._geolocateButton.setAttribute("aria-label",Re)}else{var Ge=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Ge,this._geolocateButton.setAttribute("aria-label",Ge)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=M.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Wu(this._dotElement),this._circleElement=M.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Wu({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(tt){var wt=tt.originalEvent&&tt.originalEvent.type==="resize";!tt.geolocateSource&&he._watchState==="ACTIVE_LOCK"&&!wt&&(he._watchState="BACKGROUND",he._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),he._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),he.fire(new o.Event("trackuserlocationend")))})},W.prototype.trigger=function(){if(!this._setup)return o.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 o.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Yu--,vu=!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 o.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 o.Event("trackuserlocationstart"));break}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");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yu++;var Q;Yu>1?(Q={maximumAge:6e5,timeout:0},vu=!0):(Q=this.options.positionOptions,vu=!1),this._geolocationWatchID=o.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Q)}}else o.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},W.prototype._clearWatch=function(){o.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)},W}(o.Evented),oc={maxWidth:100,unit:"metric"},du=function(W){this.options=o.extend({},oc,W),o.bindAll(["_onMove","setUnit"],this)};du.prototype.getDefaultPosition=function(){return"bottom-left"},du.prototype._onMove=function(){sc(this._map,this._container,this.options)},du.prototype.onAdd=function(W){return this._map=W,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",W.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},du.prototype.onRemove=function(){M.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},du.prototype.setUnit=function(W){this.options.unit=W,sc(this._map,this._container,this.options)};function sc(ce,W,fe){var Q=fe&&fe.maxWidth||100,he=ce._container.clientHeight/2,Re=ce.unproject([0,he]),Ge=ce.unproject([Q,he]),tt=Re.distanceTo(Ge);if(fe&&fe.unit==="imperial"){var wt=3.2808*tt;if(wt>5280){var zt=wt/5280;Xu(W,Q,zt,ce._getUIString("ScaleControl.Miles"))}else Xu(W,Q,wt,ce._getUIString("ScaleControl.Feet"))}else if(fe&&fe.unit==="nautical"){var Xt=tt/1852;Xu(W,Q,Xt,ce._getUIString("ScaleControl.NauticalMiles"))}else tt>=1e3?Xu(W,Q,tt/1e3,ce._getUIString("ScaleControl.Kilometers")):Xu(W,Q,tt,ce._getUIString("ScaleControl.Meters"))}function Xu(ce,W,fe,Q){var he=Lc(fe),Re=he/fe;ce.style.width=W*Re+"px",ce.innerHTML=he+"&nbsp;"+Q}function Cc(ce){var W=Math.pow(10,Math.ceil(-Math.log(ce)/Math.LN10));return Math.round(ce*W)/W}function Lc(ce){var W=Math.pow(10,(""+Math.floor(ce)).length-1),fe=ce/W;return fe=fe>=10?10:fe>=5?5:fe>=3?3:fe>=2?2:fe>=1?1:Cc(fe),W*fe}var Ts=function(W){this._fullscreen=!1,W&&W.container&&(W.container instanceof o.window.HTMLElement?this._container=W.container:o.warnOnce("Full screen control 'container' must be a DOM element.")),o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in o.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in o.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in o.window.document&&(this._fullscreenchange="MSFullscreenChange")};Ts.prototype.onAdd=function(W){return this._map=W,this._container||(this._container=this._map.getContainer()),this._controlContainer=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Ts.prototype.onRemove=function(){M.remove(this._controlContainer),this._map=null,o.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ts.prototype._checkFullscreenSupport=function(){return!!(o.window.document.fullscreenEnabled||o.window.document.mozFullScreenEnabled||o.window.document.msFullscreenEnabled||o.window.document.webkitFullscreenEnabled)},Ts.prototype._setupUI=function(){var W=this._fullscreenButton=M.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);M.create("span","mapboxgl-ctrl-icon",W).setAttribute("aria-hidden",!0),W.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ts.prototype._updateTitle=function(){var W=this._getTitle();this._fullscreenButton.setAttribute("aria-label",W),this._fullscreenButton.title=W},Ts.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Ts.prototype._isFullscreen=function(){return this._fullscreen},Ts.prototype._changeIcon=function(){var W=o.window.document.fullscreenElement||o.window.document.mozFullScreenElement||o.window.document.webkitFullscreenElement||o.window.document.msFullscreenElement;W===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Ts.prototype._onClickFullscreen=function(){this._isFullscreen()?o.window.document.exitFullscreen?o.window.document.exitFullscreen():o.window.document.mozCancelFullScreen?o.window.document.mozCancelFullScreen():o.window.document.msExitFullscreen?o.window.document.msExitFullscreen():o.window.document.webkitCancelFullScreen&&o.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 Pc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Rc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),qc=function(ce){function W(fe){ce.call(this),this.options=o.extend(Object.create(Pc),fe),o.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.addTo=function(Q){return this._map&&this.remove(),this._map=Q,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._focusFirstElement(),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 o.Event("open")),this},W.prototype.isOpen=function(){return!!this._map},W.prototype.remove=function(){return this._content&&M.remove(this._content),this._container&&(M.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 o.Event("close")),this},W.prototype.getLngLat=function(){return this._lngLat},W.prototype.setLngLat=function(Q){return this._lngLat=o.LngLat.convert(Q),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},W.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},W.prototype.getElement=function(){return this._container},W.prototype.setText=function(Q){return this.setDOMContent(o.window.document.createTextNode(Q))},W.prototype.setHTML=function(Q){var he=o.window.document.createDocumentFragment(),Re=o.window.document.createElement("body"),Ge;for(Re.innerHTML=Q;Ge=Re.firstChild,!!Ge;)he.appendChild(Ge);return this.setDOMContent(he)},W.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},W.prototype.setMaxWidth=function(Q){return this.options.maxWidth=Q,this._update(),this},W.prototype.setDOMContent=function(Q){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=M.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(Q),this._createCloseButton(),this._update(),this._focusFirstElement(),this},W.prototype.addClassName=function(Q){this._container&&this._container.classList.add(Q)},W.prototype.removeClassName=function(Q){this._container&&this._container.classList.remove(Q)},W.prototype.setOffset=function(Q){return this.options.offset=Q,this._update(),this},W.prototype.toggleClassName=function(Q){if(this._container)return this._container.classList.toggle(Q)},W.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=M.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},W.prototype._onMouseUp=function(Q){this._update(Q.point)},W.prototype._onMouseMove=function(Q){this._update(Q.point)},W.prototype._onDrag=function(Q){this._update(Q.point)},W.prototype._update=function(Q){var he=this,Re=this._lngLat||this._trackPointer;if(!(!this._map||!Re||!this._content)&&(this._container||(this._container=M.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=M.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Cr){return he._container.classList.add(Cr)}),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=wl(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!Q))){var Ge=this._pos=this._trackPointer&&Q?Q:this._map.project(this._lngLat),tt=this.options.anchor,wt=Dc(this.options.offset);if(!tt){var zt=this._container.offsetWidth,Xt=this._container.offsetHeight,tr;Ge.y+wt.bottom.y<Xt?tr=["top"]:Ge.y>this._map.transform.height-Xt?tr=["bottom"]:tr=[],Ge.x<zt/2?tr.push("left"):Ge.x>this._map.transform.width-zt/2&&tr.push("right"),tr.length===0?tt="bottom":tt=tr.join("-")}var qt=Ge.add(wt[tt]).round();M.setTransform(this._container,Af[tt]+" translate("+qt.x+"px,"+qt.y+"px)"),If(this._container,tt,"popup")}},W.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var Q=this._container.querySelector(Rc);Q&&Q.focus()}},W.prototype._onClose=function(){this.remove()},W}(o.Evented);function Dc(ce){if(ce)if(typeof ce=="number"){var W=Math.round(Math.sqrt(.5*Math.pow(ce,2)));return{center:new o.Point(0,0),top:new o.Point(0,ce),"top-left":new o.Point(W,W),"top-right":new o.Point(-W,W),bottom:new o.Point(0,-ce),"bottom-left":new o.Point(W,-W),"bottom-right":new o.Point(-W,-W),left:new o.Point(ce,0),right:new o.Point(-ce,0)}}else if(ce instanceof o.Point||Array.isArray(ce)){var fe=o.Point.convert(ce);return{center:fe,top:fe,"top-left":fe,"top-right":fe,bottom:fe,"bottom-left":fe,"bottom-right":fe,left:fe,right:fe}}else return{center:o.Point.convert(ce.center||[0,0]),top:o.Point.convert(ce.top||[0,0]),"top-left":o.Point.convert(ce["top-left"]||[0,0]),"top-right":o.Point.convert(ce["top-right"]||[0,0]),bottom:o.Point.convert(ce.bottom||[0,0]),"bottom-left":o.Point.convert(ce["bottom-left"]||[0,0]),"bottom-right":o.Point.convert(ce["bottom-right"]||[0,0]),left:o.Point.convert(ce.left||[0,0]),right:o.Point.convert(ce.right||[0,0])};else return Dc(new o.Point(0,0))}var Hi={version:o.version,supported:L,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:ac,NavigationControl:bl,GeolocateControl:Ec,AttributionControl:Na,ScaleControl:du,FullscreenControl:Ts,Popup:qc,Marker:Wu,Style:uo,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.Point,MercatorCoordinate:o.MercatorCoordinate,Evented:o.Evented,config:o.config,prewarm:Lt,clearPrewarmedResources:Ut,get accessToken(){return o.config.ACCESS_TOKEN},set accessToken(ce){o.config.ACCESS_TOKEN=ce},get baseApiUrl(){return o.config.API_URL},set baseApiUrl(ce){o.config.API_URL=ce},get workerCount(){return ir.workerCount},set workerCount(ce){ir.workerCount=ce},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ce){o.config.MAX_PARALLEL_IMAGE_REQUESTS=ce},clearStorage:function(W){o.clearTileCache(W)},workerUrl:""};return Hi}),A})},3108:function(te,X,e){te.exports=e(26099)},26099:function(te,X,e){var A=e(64928),P=e(32420),o=e(51160),L=e(76752),M=e(55616),d=e(31264),g=e(47520),r=e(18400),t=e(72512),s=e(76244),a=1073741824;te.exports=function(l,y){y||(y={}),l=g(l,"float64"),y=M(y,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var h=d(y.maxDepth,255),T=d(y.bounds,L(l,2));T[0]===T[2]&&T[2]++,T[1]===T[3]&&T[3]++;var f=c(l,T),n=l.length>>>1,v;y.dtype||(y.dtype="array"),typeof y.dtype=="string"?v=new(t(y.dtype))(n):y.dtype&&(v=y.dtype,Array.isArray(v)&&(v.length=n));for(var m=0;m<n;++m)v[m]=m;var b=[],E=[],p=[],S=[];B(0,0,1,v,0,1);for(var w=0,i=0;i<b.length;i++){var C=b[i];if(v.set)v.set(C,w);else for(var x=0,k=C.length;x<k;x++)v[x+w]=C[x];var I=w+b[i].length;S[i]=[w,I],w=I}return v.range=_,v;function B(F,N,V,j,$,q){if(!j.length)return null;var oe=b[$]||(b[$]=[]),Z=p[$]||(p[$]=[]),G=E[$]||(E[$]=[]),re=oe.length;if($++,$>h||q>a){for(var H=0;H<j.length;H++)oe.push(j[H]),Z.push(q),G.push(null,null,null,null);return re}if(oe.push(j[0]),Z.push(q),j.length<=1)return G.push(null,null,null,null),re;for(var J=V*.5,ae=F+J,K=N+J,Y=[],ie=[],ne=[],le=[],de=1,we=j.length;de<we;de++){var me=j[de],Le=f[me*2],ve=f[me*2+1];Le<ae?ve<K?Y.push(me):ie.push(me):ve<K?ne.push(me):le.push(me)}return q<<=2,G.push(B(F,N,J,Y,$,q),B(F,K,J,ie,$,q+1),B(ae,N,J,ne,$,q+2),B(ae,K,J,le,$,q+3)),re}function _(){for(var F=[],N=arguments.length;N--;)F[N]=arguments[N];var V;if(r(F[F.length-1])){var j=F.pop();!F.length&&(j.x!=null||j.l!=null||j.left!=null)&&(F=[j],V={}),V=M(j,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else V={};F.length||(F=T);var $=o.apply(void 0,F),q=[Math.min($.x,$.x+$.width),Math.min($.y,$.y+$.height),Math.max($.x,$.x+$.width),Math.max($.y,$.y+$.height)],oe=q[0],Z=q[1],G=q[2],re=q[3],H=c([oe,Z,G,re],T),J=H[0],ae=H[1],K=H[2],Y=H[3],ie=d(V.level,b.length);if(V.d!=null){var ne;typeof V.d=="number"?ne=[V.d,V.d]:V.d.length&&(ne=V.d),ie=Math.min(Math.max(Math.ceil(-s(Math.abs(ne[0])/(T[2]-T[0]))),Math.ceil(-s(Math.abs(ne[1])/(T[3]-T[1])))),ie)}if(ie=Math.min(ie,b.length),V.lod)return z(J,ae,K,Y,ie);var le=[];de(0,0,1,0,0,1);function de(me,Le,ve,Ae,ye,Se){if(!(ye===null||Se===null)){var _e=me+ve,ze=Le+ve;if(!(J>_e||ae>ze||K<me||Y<Le)&&!(Ae>=ie)&&ye!==Se){var Ie=b[Ae];Se===void 0&&(Se=Ie.length);for(var Ne=ye;Ne<Se;Ne++){var et=Ie[Ne],st=l[et*2],Ze=l[et*2+1];st>=oe&&st<=G&&Ze>=Z&&Ze<=re&&le.push(et)}var Ke=E[Ae],nt=Ke[ye*4+0],it=Ke[ye*4+1],lt=Ke[ye*4+2],vt=Ke[ye*4+3],xt=we(Ke,ye+1),Je=ve*.5,Pe=Ae+1;de(me,Le,Je,Pe,nt,it||lt||vt||xt),de(me,Le+Je,Je,Pe,it,lt||vt||xt),de(me+Je,Le,Je,Pe,lt,vt||xt),de(me+Je,Le+Je,Je,Pe,vt,xt)}}}function we(me,Le){for(var ve=null,Ae=0;ve===null;)if(ve=me[Le*4+Ae],Ae++,Ae>me.length)return null;return ve}return le}function z(F,N,V,j,$){for(var q=[],oe=0;oe<$;oe++){var Z=p[oe],G=S[oe][0],re=O(F,N,oe),H=O(V,j,oe),J=A.ge(Z,re),ae=A.gt(Z,H,J,Z.length-1);q[oe]=[J+G,ae+G]}return q}function O(F,N,V){for(var j=1,$=.5,q=.5,oe=.5,Z=0;Z<V;Z++)j<<=2,j+=F<$?N<q?0:1:N<q?2:3,oe*=.5,$+=F<$?-oe:oe,q+=N<q?-oe:oe;return j}};function c(u,l){for(var y=l[0],h=l[1],T=l[2],f=l[3],n=1/(T-y),v=1/(f-h),m=new Array(u.length),b=0,E=u.length/2;b<E;b++)m[2*b]=P((u[2*b]-y)*n,0,1),m[2*b+1]=P((u[2*b+1]-h)*v,0,1);return m}},40440:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(3256),P=6378137;function o(r){return A.geomReduce(r,function(t,s){return t+L(s)},0)}X.default=o;function L(r){var t=0,s;switch(r.type){case"Polygon":return M(r.coordinates);case"MultiPolygon":for(s=0;s<r.coordinates.length;s++)t+=M(r.coordinates[s]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function M(r){var t=0;if(r&&r.length>0){t+=Math.abs(d(r[0]));for(var s=1;s<r.length;s++)t-=Math.abs(d(r[s]))}return t}function d(r){var t,s,a,c,u,l,y,h=0,T=r.length;if(T>2){for(y=0;y<T;y++)y===T-2?(c=T-2,u=T-1,l=0):y===T-1?(c=T-1,u=0,l=1):(c=y,u=y+1,l=y+2),t=r[c],s=r[u],a=r[l],h+=(g(a[0])-g(t[0]))*Math.sin(g(s[1]));h=h*P*P/2}return h}function g(r){return r*Math.PI/180}},46284:function(te,X){Object.defineProperty(X,"__esModule",{value:!0}),X.earthRadius=63710088e-1,X.factors={centimeters:X.earthRadius*100,centimetres:X.earthRadius*100,degrees:X.earthRadius/111325,feet:X.earthRadius*3.28084,inches:X.earthRadius*39.37,kilometers:X.earthRadius/1e3,kilometres:X.earthRadius/1e3,meters:X.earthRadius,metres:X.earthRadius,miles:X.earthRadius/1609.344,millimeters:X.earthRadius*1e3,millimetres:X.earthRadius*1e3,nauticalmiles:X.earthRadius/1852,radians:1,yards:X.earthRadius*1.0936},X.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/X.earthRadius,yards:1.0936133},X.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};function e(w,i,C){C===void 0&&(C={});var x={type:"Feature"};return(C.id===0||C.id)&&(x.id=C.id),C.bbox&&(x.bbox=C.bbox),x.properties=i||{},x.geometry=w,x}X.feature=e;function A(w,i,C){switch(w){case"Point":return P(i).geometry;case"LineString":return d(i).geometry;case"Polygon":return L(i).geometry;case"MultiPoint":return s(i).geometry;case"MultiLineString":return t(i).geometry;case"MultiPolygon":return a(i).geometry;default:throw new Error(w+" is invalid")}}X.geometry=A;function P(w,i,C){if(C===void 0&&(C={}),!w)throw new Error("coordinates is required");if(!Array.isArray(w))throw new Error("coordinates must be an Array");if(w.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!b(w[0])||!b(w[1]))throw new Error("coordinates must contain numbers");var x={type:"Point",coordinates:w};return e(x,i,C)}X.point=P;function o(w,i,C){return C===void 0&&(C={}),r(w.map(function(x){return P(x,i)}),C)}X.points=o;function L(w,i,C){C===void 0&&(C={});for(var x=0,k=w;x<k.length;x++){var I=k[x];if(I.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var B=0;B<I[I.length-1].length;B++)if(I[I.length-1][B]!==I[0][B])throw new Error("First and last Position are not equivalent.")}var _={type:"Polygon",coordinates:w};return e(_,i,C)}X.polygon=L;function M(w,i,C){return C===void 0&&(C={}),r(w.map(function(x){return L(x,i)}),C)}X.polygons=M;function d(w,i,C){if(C===void 0&&(C={}),w.length<2)throw new Error("coordinates must be an array of two or more positions");var x={type:"LineString",coordinates:w};return e(x,i,C)}X.lineString=d;function g(w,i,C){return C===void 0&&(C={}),r(w.map(function(x){return d(x,i)}),C)}X.lineStrings=g;function r(w,i){i===void 0&&(i={});var C={type:"FeatureCollection"};return i.id&&(C.id=i.id),i.bbox&&(C.bbox=i.bbox),C.features=w,C}X.featureCollection=r;function t(w,i,C){C===void 0&&(C={});var x={type:"MultiLineString",coordinates:w};return e(x,i,C)}X.multiLineString=t;function s(w,i,C){C===void 0&&(C={});var x={type:"MultiPoint",coordinates:w};return e(x,i,C)}X.multiPoint=s;function a(w,i,C){C===void 0&&(C={});var x={type:"MultiPolygon",coordinates:w};return e(x,i,C)}X.multiPolygon=a;function c(w,i,C){C===void 0&&(C={});var x={type:"GeometryCollection",geometries:w};return e(x,i,C)}X.geometryCollection=c;function u(w,i){if(i===void 0&&(i=0),i&&!(i>=0))throw new Error("precision must be a positive number");var C=Math.pow(10,i||0);return Math.round(w*C)/C}X.round=u;function l(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w*C}X.radiansToLength=l;function y(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w/C}X.lengthToRadians=y;function h(w,i){return f(y(w,i))}X.lengthToDegrees=h;function T(w){var i=w%360;return i<0&&(i+=360),i}X.bearingToAzimuth=T;function f(w){var i=w%(2*Math.PI);return i*180/Math.PI}X.radiansToDegrees=f;function n(w){var i=w%360;return i*Math.PI/180}X.degreesToRadians=n;function v(w,i,C){if(i===void 0&&(i="kilometers"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("length must be a positive number");return l(y(w,i),C)}X.convertLength=v;function m(w,i,C){if(i===void 0&&(i="meters"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("area must be a positive number");var x=X.areaFactors[i];if(!x)throw new Error("invalid original units");var k=X.areaFactors[C];if(!k)throw new Error("invalid final units");return w/x*k}X.convertArea=m;function b(w){return!isNaN(w)&&w!==null&&!Array.isArray(w)}X.isNumber=b;function E(w){return!!w&&w.constructor===Object}X.isObject=E;function p(w){if(!w)throw new Error("bbox is required");if(!Array.isArray(w))throw new Error("bbox must be an Array");if(w.length!==4&&w.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");w.forEach(function(i){if(!b(i))throw new Error("bbox must only contain numbers")})}X.validateBBox=p;function S(w){if(!w)throw new Error("id is required");if(["string","number"].indexOf(typeof w)===-1)throw new Error("id must be a number or a string")}X.validateId=S},3256:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(46284);function P(n,v,m){if(n!==null)for(var b,E,p,S,w,i,C,x=0,k=0,I,B=n.type,_=B==="FeatureCollection",z=B==="Feature",O=_?n.features.length:1,F=0;F<O;F++){C=_?n.features[F].geometry:z?n.geometry:n,I=C?C.type==="GeometryCollection":!1,w=I?C.geometries.length:1;for(var N=0;N<w;N++){var V=0,j=0;if(S=I?C.geometries[N]:C,S!==null){i=S.coordinates;var $=S.type;switch(x=m&&($==="Polygon"||$==="MultiPolygon")?1:0,$){case null:break;case"Point":if(v(i,k,F,V,j)===!1)return!1;k++,V++;break;case"LineString":case"MultiPoint":for(b=0;b<i.length;b++){if(v(i[b],k,F,V,j)===!1)return!1;k++,$==="MultiPoint"&&V++}$==="LineString"&&V++;break;case"Polygon":case"MultiLineString":for(b=0;b<i.length;b++){for(E=0;E<i[b].length-x;E++){if(v(i[b][E],k,F,V,j)===!1)return!1;k++}$==="MultiLineString"&&V++,$==="Polygon"&&j++}$==="Polygon"&&V++;break;case"MultiPolygon":for(b=0;b<i.length;b++){for(j=0,E=0;E<i[b].length;E++){for(p=0;p<i[b][E].length-x;p++){if(v(i[b][E][p],k,F,V,j)===!1)return!1;k++}j++}V++}break;case"GeometryCollection":for(b=0;b<S.geometries.length;b++)if(P(S.geometries[b],v,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(n,v,m,b){var E=m;return P(n,function(p,S,w,i,C){S===0&&m===void 0?E=p:E=v(E,p,S,w,i,C)},b),E}function L(n,v){var m;switch(n.type){case"FeatureCollection":for(m=0;m<n.features.length&&v(n.features[m].properties,m)!==!1;m++);break;case"Feature":v(n.properties,0);break}}function M(n,v,m){var b=m;return L(n,function(E,p){p===0&&m===void 0?b=E:b=v(b,E,p)}),b}function d(n,v){if(n.type==="Feature")v(n,0);else if(n.type==="FeatureCollection")for(var m=0;m<n.features.length&&v(n.features[m],m)!==!1;m++);}function g(n,v,m){var b=m;return d(n,function(E,p){p===0&&m===void 0?b=E:b=v(b,E,p)}),b}function r(n){var v=[];return P(n,function(m){v.push(m)}),v}function t(n,v){var m,b,E,p,S,w,i,C,x,k,I=0,B=n.type==="FeatureCollection",_=n.type==="Feature",z=B?n.features.length:1;for(m=0;m<z;m++){for(w=B?n.features[m].geometry:_?n.geometry:n,C=B?n.features[m].properties:_?n.properties:{},x=B?n.features[m].bbox:_?n.bbox:void 0,k=B?n.features[m].id:_?n.id:void 0,i=w?w.type==="GeometryCollection":!1,S=i?w.geometries.length:1,E=0;E<S;E++){if(p=i?w.geometries[E]:w,p===null){if(v(null,I,C,x,k)===!1)return!1;continue}switch(p.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(v(p,I,C,x,k)===!1)return!1;break}case"GeometryCollection":{for(b=0;b<p.geometries.length;b++)if(v(p.geometries[b],I,C,x,k)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}I++}}function s(n,v,m){var b=m;return t(n,function(E,p,S,w,i){p===0&&m===void 0?b=E:b=v(b,E,p,S,w,i)}),b}function a(n,v){t(n,function(m,b,E,p,S){var w=m===null?null:m.type;switch(w){case null:case"Point":case"LineString":case"Polygon":return v(A.feature(m,E,{bbox:p,id:S}),b,0)===!1?!1:void 0}var i;switch(w){case"MultiPoint":i="Point";break;case"MultiLineString":i="LineString";break;case"MultiPolygon":i="Polygon";break}for(var C=0;C<m.coordinates.length;C++){var x=m.coordinates[C],k={type:i,coordinates:x};if(v(A.feature(k,E),b,C)===!1)return!1}})}function c(n,v,m){var b=m;return a(n,function(E,p,S){p===0&&S===0&&m===void 0?b=E:b=v(b,E,p,S)}),b}function u(n,v){a(n,function(m,b,E){var p=0;if(m.geometry){var S=m.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var w,i=0,C=0,x=0;if(P(m,function(k,I,B,_,z){if(w===void 0||b>i||_>C||z>x){w=k,i=b,C=_,x=z,p=0;return}var O=A.lineString([w,k],m.properties);if(v(O,b,E,z,p)===!1)return!1;p++,w=k})===!1)return!1}}})}function l(n,v,m){var b=m,E=!1;return u(n,function(p,S,w,i,C){E===!1&&m===void 0?b=p:b=v(b,p,S,w,i,C),E=!0}),b}function y(n,v){if(!n)throw new Error("geojson is required");a(n,function(m,b,E){if(m.geometry!==null){var p=m.geometry.type,S=m.geometry.coordinates;switch(p){case"LineString":if(v(m,b,E,0,0)===!1)return!1;break;case"Polygon":for(var w=0;w<S.length;w++)if(v(A.lineString(S[w],m.properties),b,E,w)===!1)return!1;break}}})}function h(n,v,m){var b=m;return y(n,function(E,p,S,w){p===0&&m===void 0?b=E:b=v(b,E,p,S,w)}),b}function T(n,v){if(v=v||{},!A.isObject(v))throw new Error("options is invalid");var m=v.featureIndex||0,b=v.multiFeatureIndex||0,E=v.geometryIndex||0,p=v.segmentIndex||0,S=v.properties,w;switch(n.type){case"FeatureCollection":m<0&&(m=n.features.length+m),S=S||n.features[m].properties,w=n.features[m].geometry;break;case"Feature":S=S||n.properties,w=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":w=n;break;default:throw new Error("geojson is invalid")}if(w===null)return null;var i=w.coordinates;switch(w.type){case"Point":case"MultiPoint":return null;case"LineString":return p<0&&(p=i.length+p-1),A.lineString([i[p],i[p+1]],S,v);case"Polygon":return E<0&&(E=i.length+E),p<0&&(p=i[E].length+p-1),A.lineString([i[E][p],i[E][p+1]],S,v);case"MultiLineString":return b<0&&(b=i.length+b),p<0&&(p=i[b].length+p-1),A.lineString([i[b][p],i[b][p+1]],S,v);case"MultiPolygon":return b<0&&(b=i.length+b),E<0&&(E=i[b].length+E),p<0&&(p=i[b][E].length-p-1),A.lineString([i[b][E][p],i[b][E][p+1]],S,v)}throw new Error("geojson is invalid")}function f(n,v){if(v=v||{},!A.isObject(v))throw new Error("options is invalid");var m=v.featureIndex||0,b=v.multiFeatureIndex||0,E=v.geometryIndex||0,p=v.coordIndex||0,S=v.properties,w;switch(n.type){case"FeatureCollection":m<0&&(m=n.features.length+m),S=S||n.features[m].properties,w=n.features[m].geometry;break;case"Feature":S=S||n.properties,w=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":w=n;break;default:throw new Error("geojson is invalid")}if(w===null)return null;var i=w.coordinates;switch(w.type){case"Point":return A.point(i,S,v);case"MultiPoint":return b<0&&(b=i.length+b),A.point(i[b],S,v);case"LineString":return p<0&&(p=i.length+p),A.point(i[p],S,v);case"Polygon":return E<0&&(E=i.length+E),p<0&&(p=i[E].length+p),A.point(i[E][p],S,v);case"MultiLineString":return b<0&&(b=i.length+b),p<0&&(p=i[b].length+p),A.point(i[b][p],S,v);case"MultiPolygon":return b<0&&(b=i.length+b),E<0&&(E=i[b].length+E),p<0&&(p=i[b][E].length-p),A.point(i[b][E][p],S,v)}throw new Error("geojson is invalid")}X.coordEach=P,X.coordReduce=o,X.propEach=L,X.propReduce=M,X.featureEach=d,X.featureReduce=g,X.coordAll=r,X.geomEach=t,X.geomReduce=s,X.flattenEach=a,X.flattenReduce=c,X.segmentEach=u,X.segmentReduce=l,X.lineEach=y,X.lineReduce=h,X.findSegment=T,X.findPoint=f},42428:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(84880);function P(o){var L=[1/0,1/0,-1/0,-1/0];return A.coordEach(o,function(M){L[0]>M[0]&&(L[0]=M[0]),L[1]>M[1]&&(L[1]=M[1]),L[2]<M[0]&&(L[2]=M[0]),L[3]<M[1]&&(L[3]=M[1])}),L}P.default=P,X.default=P},76796:function(te,X){Object.defineProperty(X,"__esModule",{value:!0}),X.earthRadius=63710088e-1,X.factors={centimeters:X.earthRadius*100,centimetres:X.earthRadius*100,degrees:X.earthRadius/111325,feet:X.earthRadius*3.28084,inches:X.earthRadius*39.37,kilometers:X.earthRadius/1e3,kilometres:X.earthRadius/1e3,meters:X.earthRadius,metres:X.earthRadius,miles:X.earthRadius/1609.344,millimeters:X.earthRadius*1e3,millimetres:X.earthRadius*1e3,nauticalmiles:X.earthRadius/1852,radians:1,yards:X.earthRadius*1.0936},X.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/X.earthRadius,yards:1.0936133},X.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};function e(w,i,C){C===void 0&&(C={});var x={type:"Feature"};return(C.id===0||C.id)&&(x.id=C.id),C.bbox&&(x.bbox=C.bbox),x.properties=i||{},x.geometry=w,x}X.feature=e;function A(w,i,C){switch(w){case"Point":return P(i).geometry;case"LineString":return d(i).geometry;case"Polygon":return L(i).geometry;case"MultiPoint":return s(i).geometry;case"MultiLineString":return t(i).geometry;case"MultiPolygon":return a(i).geometry;default:throw new Error(w+" is invalid")}}X.geometry=A;function P(w,i,C){if(C===void 0&&(C={}),!w)throw new Error("coordinates is required");if(!Array.isArray(w))throw new Error("coordinates must be an Array");if(w.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!b(w[0])||!b(w[1]))throw new Error("coordinates must contain numbers");var x={type:"Point",coordinates:w};return e(x,i,C)}X.point=P;function o(w,i,C){return C===void 0&&(C={}),r(w.map(function(x){return P(x,i)}),C)}X.points=o;function L(w,i,C){C===void 0&&(C={});for(var x=0,k=w;x<k.length;x++){var I=k[x];if(I.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var B=0;B<I[I.length-1].length;B++)if(I[I.length-1][B]!==I[0][B])throw new Error("First and last Position are not equivalent.")}var _={type:"Polygon",coordinates:w};return e(_,i,C)}X.polygon=L;function M(w,i,C){return C===void 0&&(C={}),r(w.map(function(x){return L(x,i)}),C)}X.polygons=M;function d(w,i,C){if(C===void 0&&(C={}),w.length<2)throw new Error("coordinates must be an array of two or more positions");var x={type:"LineString",coordinates:w};return e(x,i,C)}X.lineString=d;function g(w,i,C){return C===void 0&&(C={}),r(w.map(function(x){return d(x,i)}),C)}X.lineStrings=g;function r(w,i){i===void 0&&(i={});var C={type:"FeatureCollection"};return i.id&&(C.id=i.id),i.bbox&&(C.bbox=i.bbox),C.features=w,C}X.featureCollection=r;function t(w,i,C){C===void 0&&(C={});var x={type:"MultiLineString",coordinates:w};return e(x,i,C)}X.multiLineString=t;function s(w,i,C){C===void 0&&(C={});var x={type:"MultiPoint",coordinates:w};return e(x,i,C)}X.multiPoint=s;function a(w,i,C){C===void 0&&(C={});var x={type:"MultiPolygon",coordinates:w};return e(x,i,C)}X.multiPolygon=a;function c(w,i,C){C===void 0&&(C={});var x={type:"GeometryCollection",geometries:w};return e(x,i,C)}X.geometryCollection=c;function u(w,i){if(i===void 0&&(i=0),i&&!(i>=0))throw new Error("precision must be a positive number");var C=Math.pow(10,i||0);return Math.round(w*C)/C}X.round=u;function l(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w*C}X.radiansToLength=l;function y(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w/C}X.lengthToRadians=y;function h(w,i){return f(y(w,i))}X.lengthToDegrees=h;function T(w){var i=w%360;return i<0&&(i+=360),i}X.bearingToAzimuth=T;function f(w){var i=w%(2*Math.PI);return i*180/Math.PI}X.radiansToDegrees=f;function n(w){var i=w%360;return i*Math.PI/180}X.degreesToRadians=n;function v(w,i,C){if(i===void 0&&(i="kilometers"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("length must be a positive number");return l(y(w,i),C)}X.convertLength=v;function m(w,i,C){if(i===void 0&&(i="meters"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("area must be a positive number");var x=X.areaFactors[i];if(!x)throw new Error("invalid original units");var k=X.areaFactors[C];if(!k)throw new Error("invalid final units");return w/x*k}X.convertArea=m;function b(w){return!isNaN(w)&&w!==null&&!Array.isArray(w)}X.isNumber=b;function E(w){return!!w&&w.constructor===Object}X.isObject=E;function p(w){if(!w)throw new Error("bbox is required");if(!Array.isArray(w))throw new Error("bbox must be an Array");if(w.length!==4&&w.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");w.forEach(function(i){if(!b(i))throw new Error("bbox must only contain numbers")})}X.validateBBox=p;function S(w){if(!w)throw new Error("id is required");if(["string","number"].indexOf(typeof w)===-1)throw new Error("id must be a number or a string")}X.validateId=S},84880:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(76796);function P(n,v,m){if(n!==null)for(var b,E,p,S,w,i,C,x=0,k=0,I,B=n.type,_=B==="FeatureCollection",z=B==="Feature",O=_?n.features.length:1,F=0;F<O;F++){C=_?n.features[F].geometry:z?n.geometry:n,I=C?C.type==="GeometryCollection":!1,w=I?C.geometries.length:1;for(var N=0;N<w;N++){var V=0,j=0;if(S=I?C.geometries[N]:C,S!==null){i=S.coordinates;var $=S.type;switch(x=m&&($==="Polygon"||$==="MultiPolygon")?1:0,$){case null:break;case"Point":if(v(i,k,F,V,j)===!1)return!1;k++,V++;break;case"LineString":case"MultiPoint":for(b=0;b<i.length;b++){if(v(i[b],k,F,V,j)===!1)return!1;k++,$==="MultiPoint"&&V++}$==="LineString"&&V++;break;case"Polygon":case"MultiLineString":for(b=0;b<i.length;b++){for(E=0;E<i[b].length-x;E++){if(v(i[b][E],k,F,V,j)===!1)return!1;k++}$==="MultiLineString"&&V++,$==="Polygon"&&j++}$==="Polygon"&&V++;break;case"MultiPolygon":for(b=0;b<i.length;b++){for(j=0,E=0;E<i[b].length;E++){for(p=0;p<i[b][E].length-x;p++){if(v(i[b][E][p],k,F,V,j)===!1)return!1;k++}j++}V++}break;case"GeometryCollection":for(b=0;b<S.geometries.length;b++)if(P(S.geometries[b],v,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(n,v,m,b){var E=m;return P(n,function(p,S,w,i,C){S===0&&m===void 0?E=p:E=v(E,p,S,w,i,C)},b),E}function L(n,v){var m;switch(n.type){case"FeatureCollection":for(m=0;m<n.features.length&&v(n.features[m].properties,m)!==!1;m++);break;case"Feature":v(n.properties,0);break}}function M(n,v,m){var b=m;return L(n,function(E,p){p===0&&m===void 0?b=E:b=v(b,E,p)}),b}function d(n,v){if(n.type==="Feature")v(n,0);else if(n.type==="FeatureCollection")for(var m=0;m<n.features.length&&v(n.features[m],m)!==!1;m++);}function g(n,v,m){var b=m;return d(n,function(E,p){p===0&&m===void 0?b=E:b=v(b,E,p)}),b}function r(n){var v=[];return P(n,function(m){v.push(m)}),v}function t(n,v){var m,b,E,p,S,w,i,C,x,k,I=0,B=n.type==="FeatureCollection",_=n.type==="Feature",z=B?n.features.length:1;for(m=0;m<z;m++){for(w=B?n.features[m].geometry:_?n.geometry:n,C=B?n.features[m].properties:_?n.properties:{},x=B?n.features[m].bbox:_?n.bbox:void 0,k=B?n.features[m].id:_?n.id:void 0,i=w?w.type==="GeometryCollection":!1,S=i?w.geometries.length:1,E=0;E<S;E++){if(p=i?w.geometries[E]:w,p===null){if(v(null,I,C,x,k)===!1)return!1;continue}switch(p.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(v(p,I,C,x,k)===!1)return!1;break}case"GeometryCollection":{for(b=0;b<p.geometries.length;b++)if(v(p.geometries[b],I,C,x,k)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}I++}}function s(n,v,m){var b=m;return t(n,function(E,p,S,w,i){p===0&&m===void 0?b=E:b=v(b,E,p,S,w,i)}),b}function a(n,v){t(n,function(m,b,E,p,S){var w=m===null?null:m.type;switch(w){case null:case"Point":case"LineString":case"Polygon":return v(A.feature(m,E,{bbox:p,id:S}),b,0)===!1?!1:void 0}var i;switch(w){case"MultiPoint":i="Point";break;case"MultiLineString":i="LineString";break;case"MultiPolygon":i="Polygon";break}for(var C=0;C<m.coordinates.length;C++){var x=m.coordinates[C],k={type:i,coordinates:x};if(v(A.feature(k,E),b,C)===!1)return!1}})}function c(n,v,m){var b=m;return a(n,function(E,p,S){p===0&&S===0&&m===void 0?b=E:b=v(b,E,p,S)}),b}function u(n,v){a(n,function(m,b,E){var p=0;if(m.geometry){var S=m.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var w,i=0,C=0,x=0;if(P(m,function(k,I,B,_,z){if(w===void 0||b>i||_>C||z>x){w=k,i=b,C=_,x=z,p=0;return}var O=A.lineString([w,k],m.properties);if(v(O,b,E,z,p)===!1)return!1;p++,w=k})===!1)return!1}}})}function l(n,v,m){var b=m,E=!1;return u(n,function(p,S,w,i,C){E===!1&&m===void 0?b=p:b=v(b,p,S,w,i,C),E=!0}),b}function y(n,v){if(!n)throw new Error("geojson is required");a(n,function(m,b,E){if(m.geometry!==null){var p=m.geometry.type,S=m.geometry.coordinates;switch(p){case"LineString":if(v(m,b,E,0,0)===!1)return!1;break;case"Polygon":for(var w=0;w<S.length;w++)if(v(A.lineString(S[w],m.properties),b,E,w)===!1)return!1;break}}})}function h(n,v,m){var b=m;return y(n,function(E,p,S,w){p===0&&m===void 0?b=E:b=v(b,E,p,S,w)}),b}function T(n,v){if(v=v||{},!A.isObject(v))throw new Error("options is invalid");var m=v.featureIndex||0,b=v.multiFeatureIndex||0,E=v.geometryIndex||0,p=v.segmentIndex||0,S=v.properties,w;switch(n.type){case"FeatureCollection":m<0&&(m=n.features.length+m),S=S||n.features[m].properties,w=n.features[m].geometry;break;case"Feature":S=S||n.properties,w=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":w=n;break;default:throw new Error("geojson is invalid")}if(w===null)return null;var i=w.coordinates;switch(w.type){case"Point":case"MultiPoint":return null;case"LineString":return p<0&&(p=i.length+p-1),A.lineString([i[p],i[p+1]],S,v);case"Polygon":return E<0&&(E=i.length+E),p<0&&(p=i[E].length+p-1),A.lineString([i[E][p],i[E][p+1]],S,v);case"MultiLineString":return b<0&&(b=i.length+b),p<0&&(p=i[b].length+p-1),A.lineString([i[b][p],i[b][p+1]],S,v);case"MultiPolygon":return b<0&&(b=i.length+b),E<0&&(E=i[b].length+E),p<0&&(p=i[b][E].length-p-1),A.lineString([i[b][E][p],i[b][E][p+1]],S,v)}throw new Error("geojson is invalid")}function f(n,v){if(v=v||{},!A.isObject(v))throw new Error("options is invalid");var m=v.featureIndex||0,b=v.multiFeatureIndex||0,E=v.geometryIndex||0,p=v.coordIndex||0,S=v.properties,w;switch(n.type){case"FeatureCollection":m<0&&(m=n.features.length+m),S=S||n.features[m].properties,w=n.features[m].geometry;break;case"Feature":S=S||n.properties,w=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":w=n;break;default:throw new Error("geojson is invalid")}if(w===null)return null;var i=w.coordinates;switch(w.type){case"Point":return A.point(i,S,v);case"MultiPoint":return b<0&&(b=i.length+b),A.point(i[b],S,v);case"LineString":return p<0&&(p=i.length+p),A.point(i[p],S,v);case"Polygon":return E<0&&(E=i.length+E),p<0&&(p=i[E].length+p),A.point(i[E][p],S,v);case"MultiLineString":return b<0&&(b=i.length+b),p<0&&(p=i[b].length+p),A.point(i[b][p],S,v);case"MultiPolygon":return b<0&&(b=i.length+b),E<0&&(E=i[b].length+E),p<0&&(p=i[b][E].length-p),A.point(i[b][E][p],S,v)}throw new Error("geojson is invalid")}X.coordEach=P,X.coordReduce=o,X.propEach=L,X.propReduce=M,X.featureEach=d,X.featureReduce=g,X.coordAll=r,X.geomEach=t,X.geomReduce=s,X.flattenEach=a,X.flattenReduce=c,X.segmentEach=u,X.segmentReduce=l,X.lineEach=y,X.lineReduce=h,X.findSegment=T,X.findPoint=f},77844:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(43752),P=e(49840);function o(L,M){M===void 0&&(M={});var d=0,g=0,r=0;return A.coordEach(L,function(t){d+=t[0],g+=t[1],r++}),P.point([d/r,g/r],M.properties)}X.default=o},49840:function(te,X){Object.defineProperty(X,"__esModule",{value:!0}),X.earthRadius=63710088e-1,X.factors={centimeters:X.earthRadius*100,centimetres:X.earthRadius*100,degrees:X.earthRadius/111325,feet:X.earthRadius*3.28084,inches:X.earthRadius*39.37,kilometers:X.earthRadius/1e3,kilometres:X.earthRadius/1e3,meters:X.earthRadius,metres:X.earthRadius,miles:X.earthRadius/1609.344,millimeters:X.earthRadius*1e3,millimetres:X.earthRadius*1e3,nauticalmiles:X.earthRadius/1852,radians:1,yards:X.earthRadius/1.0936},X.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/X.earthRadius,yards:.91441111923921},X.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};function e(_,z,O){O===void 0&&(O={});var F={type:"Feature"};return(O.id===0||O.id)&&(F.id=O.id),O.bbox&&(F.bbox=O.bbox),F.properties=z||{},F.geometry=_,F}X.feature=e;function A(_,z,O){switch(_){case"Point":return P(z).geometry;case"LineString":return d(z).geometry;case"Polygon":return L(z).geometry;case"MultiPoint":return s(z).geometry;case"MultiLineString":return t(z).geometry;case"MultiPolygon":return a(z).geometry;default:throw new Error(_+" is invalid")}}X.geometry=A;function P(_,z,O){O===void 0&&(O={});var F={type:"Point",coordinates:_};return e(F,z,O)}X.point=P;function o(_,z,O){return O===void 0&&(O={}),r(_.map(function(F){return P(F,z)}),O)}X.points=o;function L(_,z,O){O===void 0&&(O={});for(var F=0,N=_;F<N.length;F++){var V=N[F];if(V.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var j=0;j<V[V.length-1].length;j++)if(V[V.length-1][j]!==V[0][j])throw new Error("First and last Position are not equivalent.")}var $={type:"Polygon",coordinates:_};return e($,z,O)}X.polygon=L;function M(_,z,O){return O===void 0&&(O={}),r(_.map(function(F){return L(F,z)}),O)}X.polygons=M;function d(_,z,O){if(O===void 0&&(O={}),_.length<2)throw new Error("coordinates must be an array of two or more positions");var F={type:"LineString",coordinates:_};return e(F,z,O)}X.lineString=d;function g(_,z,O){return O===void 0&&(O={}),r(_.map(function(F){return d(F,z)}),O)}X.lineStrings=g;function r(_,z){z===void 0&&(z={});var O={type:"FeatureCollection"};return z.id&&(O.id=z.id),z.bbox&&(O.bbox=z.bbox),O.features=_,O}X.featureCollection=r;function t(_,z,O){O===void 0&&(O={});var F={type:"MultiLineString",coordinates:_};return e(F,z,O)}X.multiLineString=t;function s(_,z,O){O===void 0&&(O={});var F={type:"MultiPoint",coordinates:_};return e(F,z,O)}X.multiPoint=s;function a(_,z,O){O===void 0&&(O={});var F={type:"MultiPolygon",coordinates:_};return e(F,z,O)}X.multiPolygon=a;function c(_,z,O){O===void 0&&(O={});var F={type:"GeometryCollection",geometries:_};return e(F,z,O)}X.geometryCollection=c;function u(_,z){if(z===void 0&&(z=0),z&&!(z>=0))throw new Error("precision must be a positive number");var O=Math.pow(10,z||0);return Math.round(_*O)/O}X.round=u;function l(_,z){z===void 0&&(z="kilometers");var O=X.factors[z];if(!O)throw new Error(z+" units is invalid");return _*O}X.radiansToLength=l;function y(_,z){z===void 0&&(z="kilometers");var O=X.factors[z];if(!O)throw new Error(z+" units is invalid");return _/O}X.lengthToRadians=y;function h(_,z){return f(y(_,z))}X.lengthToDegrees=h;function T(_){var z=_%360;return z<0&&(z+=360),z}X.bearingToAzimuth=T;function f(_){var z=_%(2*Math.PI);return z*180/Math.PI}X.radiansToDegrees=f;function n(_){var z=_%360;return z*Math.PI/180}X.degreesToRadians=n;function v(_,z,O){if(z===void 0&&(z="kilometers"),O===void 0&&(O="kilometers"),!(_>=0))throw new Error("length must be a positive number");return l(y(_,z),O)}X.convertLength=v;function m(_,z,O){if(z===void 0&&(z="meters"),O===void 0&&(O="kilometers"),!(_>=0))throw new Error("area must be a positive number");var F=X.areaFactors[z];if(!F)throw new Error("invalid original units");var N=X.areaFactors[O];if(!N)throw new Error("invalid final units");return _/F*N}X.convertArea=m;function b(_){return!isNaN(_)&&_!==null&&!Array.isArray(_)&&!/^\s*$/.test(_)}X.isNumber=b;function E(_){return!!_&&_.constructor===Object}X.isObject=E;function p(_){if(!_)throw new Error("bbox is required");if(!Array.isArray(_))throw new Error("bbox must be an Array");if(_.length!==4&&_.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");_.forEach(function(z){if(!b(z))throw new Error("bbox must only contain numbers")})}X.validateBBox=p;function S(_){if(!_)throw new Error("id is required");if(["string","number"].indexOf(typeof _)===-1)throw new Error("id must be a number or a string")}X.validateId=S;function w(){throw new Error("method has been renamed to `radiansToDegrees`")}X.radians2degrees=w;function i(){throw new Error("method has been renamed to `degreesToRadians`")}X.degrees2radians=i;function C(){throw new Error("method has been renamed to `lengthToDegrees`")}X.distanceToDegrees=C;function x(){throw new Error("method has been renamed to `lengthToRadians`")}X.distanceToRadians=x;function k(){throw new Error("method has been renamed to `radiansToLength`")}X.radiansToDistance=k;function I(){throw new Error("method has been renamed to `bearingToAzimuth`")}X.bearingToAngle=I;function B(){throw new Error("method has been renamed to `convertLength`")}X.convertDistance=B},43752:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(49840);function P(n,v,m){if(n!==null)for(var b,E,p,S,w,i,C,x=0,k=0,I,B=n.type,_=B==="FeatureCollection",z=B==="Feature",O=_?n.features.length:1,F=0;F<O;F++){C=_?n.features[F].geometry:z?n.geometry:n,I=C?C.type==="GeometryCollection":!1,w=I?C.geometries.length:1;for(var N=0;N<w;N++){var V=0,j=0;if(S=I?C.geometries[N]:C,S!==null){i=S.coordinates;var $=S.type;switch(x=m&&($==="Polygon"||$==="MultiPolygon")?1:0,$){case null:break;case"Point":if(v(i,k,F,V,j)===!1)return!1;k++,V++;break;case"LineString":case"MultiPoint":for(b=0;b<i.length;b++){if(v(i[b],k,F,V,j)===!1)return!1;k++,$==="MultiPoint"&&V++}$==="LineString"&&V++;break;case"Polygon":case"MultiLineString":for(b=0;b<i.length;b++){for(E=0;E<i[b].length-x;E++){if(v(i[b][E],k,F,V,j)===!1)return!1;k++}$==="MultiLineString"&&V++,$==="Polygon"&&j++}$==="Polygon"&&V++;break;case"MultiPolygon":for(b=0;b<i.length;b++){for(j=0,E=0;E<i[b].length;E++){for(p=0;p<i[b][E].length-x;p++){if(v(i[b][E][p],k,F,V,j)===!1)return!1;k++}j++}V++}break;case"GeometryCollection":for(b=0;b<S.geometries.length;b++)if(P(S.geometries[b],v,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(n,v,m,b){var E=m;return P(n,function(p,S,w,i,C){S===0&&m===void 0?E=p:E=v(E,p,S,w,i,C)},b),E}function L(n,v){var m;switch(n.type){case"FeatureCollection":for(m=0;m<n.features.length&&v(n.features[m].properties,m)!==!1;m++);break;case"Feature":v(n.properties,0);break}}function M(n,v,m){var b=m;return L(n,function(E,p){p===0&&m===void 0?b=E:b=v(b,E,p)}),b}function d(n,v){if(n.type==="Feature")v(n,0);else if(n.type==="FeatureCollection")for(var m=0;m<n.features.length&&v(n.features[m],m)!==!1;m++);}function g(n,v,m){var b=m;return d(n,function(E,p){p===0&&m===void 0?b=E:b=v(b,E,p)}),b}function r(n){var v=[];return P(n,function(m){v.push(m)}),v}function t(n,v){var m,b,E,p,S,w,i,C,x,k,I=0,B=n.type==="FeatureCollection",_=n.type==="Feature",z=B?n.features.length:1;for(m=0;m<z;m++){for(w=B?n.features[m].geometry:_?n.geometry:n,C=B?n.features[m].properties:_?n.properties:{},x=B?n.features[m].bbox:_?n.bbox:void 0,k=B?n.features[m].id:_?n.id:void 0,i=w?w.type==="GeometryCollection":!1,S=i?w.geometries.length:1,E=0;E<S;E++){if(p=i?w.geometries[E]:w,p===null){if(v(null,I,C,x,k)===!1)return!1;continue}switch(p.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(v(p,I,C,x,k)===!1)return!1;break}case"GeometryCollection":{for(b=0;b<p.geometries.length;b++)if(v(p.geometries[b],I,C,x,k)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}I++}}function s(n,v,m){var b=m;return t(n,function(E,p,S,w,i){p===0&&m===void 0?b=E:b=v(b,E,p,S,w,i)}),b}function a(n,v){t(n,function(m,b,E,p,S){var w=m===null?null:m.type;switch(w){case null:case"Point":case"LineString":case"Polygon":return v(A.feature(m,E,{bbox:p,id:S}),b,0)===!1?!1:void 0}var i;switch(w){case"MultiPoint":i="Point";break;case"MultiLineString":i="LineString";break;case"MultiPolygon":i="Polygon";break}for(var C=0;C<m.coordinates.length;C++){var x=m.coordinates[C],k={type:i,coordinates:x};if(v(A.feature(k,E),b,C)===!1)return!1}})}function c(n,v,m){var b=m;return a(n,function(E,p,S){p===0&&S===0&&m===void 0?b=E:b=v(b,E,p,S)}),b}function u(n,v){a(n,function(m,b,E){var p=0;if(m.geometry){var S=m.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var w,i=0,C=0,x=0;if(P(m,function(k,I,B,_,z){if(w===void 0||b>i||_>C||z>x){w=k,i=b,C=_,x=z,p=0;return}var O=A.lineString([w,k],m.properties);if(v(O,b,E,z,p)===!1)return!1;p++,w=k})===!1)return!1}}})}function l(n,v,m){var b=m,E=!1;return u(n,function(p,S,w,i,C){E===!1&&m===void 0?b=p:b=v(b,p,S,w,i,C),E=!0}),b}function y(n,v){if(!n)throw new Error("geojson is required");a(n,function(m,b,E){if(m.geometry!==null){var p=m.geometry.type,S=m.geometry.coordinates;switch(p){case"LineString":if(v(m,b,E,0,0)===!1)return!1;break;case"Polygon":for(var w=0;w<S.length;w++)if(v(A.lineString(S[w],m.properties),b,E,w)===!1)return!1;break}}})}function h(n,v,m){var b=m;return y(n,function(E,p,S,w){p===0&&m===void 0?b=E:b=v(b,E,p,S,w)}),b}function T(n,v){if(v=v||{},!A.isObject(v))throw new Error("options is invalid");var m=v.featureIndex||0,b=v.multiFeatureIndex||0,E=v.geometryIndex||0,p=v.segmentIndex||0,S=v.properties,w;switch(n.type){case"FeatureCollection":m<0&&(m=n.features.length+m),S=S||n.features[m].properties,w=n.features[m].geometry;break;case"Feature":S=S||n.properties,w=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":w=n;break;default:throw new Error("geojson is invalid")}if(w===null)return null;var i=w.coordinates;switch(w.type){case"Point":case"MultiPoint":return null;case"LineString":return p<0&&(p=i.length+p-1),A.lineString([i[p],i[p+1]],S,v);case"Polygon":return E<0&&(E=i.length+E),p<0&&(p=i[E].length+p-1),A.lineString([i[E][p],i[E][p+1]],S,v);case"MultiLineString":return b<0&&(b=i.length+b),p<0&&(p=i[b].length+p-1),A.lineString([i[b][p],i[b][p+1]],S,v);case"MultiPolygon":return b<0&&(b=i.length+b),E<0&&(E=i[b].length+E),p<0&&(p=i[b][E].length-p-1),A.lineString([i[b][E][p],i[b][E][p+1]],S,v)}throw new Error("geojson is invalid")}function f(n,v){if(v=v||{},!A.isObject(v))throw new Error("options is invalid");var m=v.featureIndex||0,b=v.multiFeatureIndex||0,E=v.geometryIndex||0,p=v.coordIndex||0,S=v.properties,w;switch(n.type){case"FeatureCollection":m<0&&(m=n.features.length+m),S=S||n.features[m].properties,w=n.features[m].geometry;break;case"Feature":S=S||n.properties,w=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":w=n;break;default:throw new Error("geojson is invalid")}if(w===null)return null;var i=w.coordinates;switch(w.type){case"Point":return A.point(i,S,v);case"MultiPoint":return b<0&&(b=i.length+b),A.point(i[b],S,v);case"LineString":return p<0&&(p=i.length+p),A.point(i[p],S,v);case"Polygon":return E<0&&(E=i.length+E),p<0&&(p=i[E].length+p),A.point(i[E][p],S,v);case"MultiLineString":return b<0&&(b=i.length+b),p<0&&(p=i[b].length+p),A.point(i[b][p],S,v);case"MultiPolygon":return b<0&&(b=i.length+b),E<0&&(E=i[b].length+E),p<0&&(p=i[b][E].length-p),A.point(i[b][E][p],S,v)}throw new Error("geojson is invalid")}X.coordEach=P,X.coordReduce=o,X.propEach=L,X.propReduce=M,X.featureEach=d,X.featureReduce=g,X.coordAll=r,X.geomEach=t,X.geomReduce=s,X.flattenEach=a,X.flattenReduce=c,X.segmentEach=u,X.segmentReduce=l,X.lineEach=y,X.lineReduce=h,X.findSegment=T,X.findPoint=f},49972:function(te){te.exports=X;function X(e){var A=0,P=0,o=0,L=0;return e.map(function(M){M=M.slice();var d=M[0],g=d.toUpperCase();if(d!=g)switch(M[0]=g,d){case"a":M[6]+=o,M[7]+=L;break;case"v":M[1]+=L;break;case"h":M[1]+=o;break;default:for(var r=1;r<M.length;)M[r++]+=o,M[r++]+=L}switch(g){case"Z":o=A,L=P;break;case"H":o=M[1];break;case"V":L=M[1];break;case"M":o=A=M[1],L=P=M[2];break;default:o=M[M.length-2],L=M[M.length-1]}return M})}},76752:function(te){te.exports=X;function X(e,A){if(!e||e.length==null)throw Error("Argument should be an array");A==null?A=1:A=Math.floor(A);for(var P=Array(A*2),o=0;o<A;o++){for(var L=-1/0,M=1/0,d=o,g=e.length;d<g;d+=A)e[d]>L&&(L=e[d]),e[d]<M&&(M=e[d]);P[o]=M,P[A+o]=L}return P}},10272:function(te){te.exports=function(X,e,A){if(typeof Array.prototype.findIndex=="function")return X.findIndex(e,A);if(typeof e!="function")throw new TypeError("predicate must be a function");var P=Object(X),o=P.length;if(o===0)return-1;for(var L=0;L<o;L++)if(e.call(A,P[L],L,P))return L;return-1}},71152:function(te,X,e){var A=e(76752);te.exports=P;function P(o,L,M){if(!o||o.length==null)throw Error("Argument should be an array");L==null&&(L=1),M==null&&(M=A(o,L));for(var d=0;d<L;d++){var g=M[L+d],r=M[d],t=d,s=o.length;if(g===1/0&&r===-1/0)for(t=d;t<s;t+=L)o[t]=o[t]===g?1:o[t]===r?0:.5;else if(g===1/0)for(t=d;t<s;t+=L)o[t]=o[t]===g?1:0;else if(r===-1/0)for(t=d;t<s;t+=L)o[t]=o[t]===r?0:1;else{var a=g-r;for(t=d;t<s;t+=L)isNaN(o[t])||(o[t]=a===0?.5:(o[t]-r)/a)}}return o}},67752:function(te){te.exports=function(e,A){var P=typeof e=="number",o=typeof A=="number";P&&!o?(A=e,e=0):!P&&!o&&(e=0,A=0),e=e|0,A=A|0;var L=A-e;if(L<0)throw new Error("array length must be positive");for(var M=new Array(L),d=0,g=e;d<L;d++,g++)M[d]=g;return M}},45408:function(te,X,e){var A=e(4168);function P(j){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(q){return typeof q}:P=function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},P(j)}function o(j,$){if(!(j instanceof $))throw new TypeError("Cannot call a class as a function")}var L=e(86832),M=L.codes,d=M.ERR_AMBIGUOUS_ARGUMENT,g=M.ERR_INVALID_ARG_TYPE,r=M.ERR_INVALID_ARG_VALUE,t=M.ERR_INVALID_RETURN_VALUE,s=M.ERR_MISSING_ARGS,a=e(26144),c=e(35840),u=c.inspect,l=e(35840).types,y=l.isPromise,h=l.isRegExp,T=Object.assign?Object.assign:e(60964).assign,f=Object.is?Object.is:e(39896),n,v;function m(){var j=e(25116);n=j.isDeepEqual,v=j.isDeepStrictEqual}var b=!1,E=te.exports=C,p={};function S(j){throw j.message instanceof Error?j.message:new a(j)}function w(j,$,q,oe,Z){var G=arguments.length,re;if(G===0)re="Failed";else if(G===1)q=j,j=void 0;else{if(b===!1){b=!0;var H=A.emitWarning?A.emitWarning:console.warn.bind(console);H("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}G===2&&(oe="!=")}if(q instanceof Error)throw q;var J={actual:j,expected:$,operator:oe===void 0?"fail":oe,stackStartFn:Z||w};q!==void 0&&(J.message=q);var ae=new a(J);throw re&&(ae.message=re,ae.generatedMessage=!0),ae}E.fail=w,E.AssertionError=a;function i(j,$,q,oe){if(!q){var Z=!1;if($===0)Z=!0,oe="No value argument passed to `assert.ok()`";else if(oe instanceof Error)throw oe;var G=new a({actual:q,expected:!0,message:oe,operator:"==",stackStartFn:j});throw G.generatedMessage=Z,G}}function C(){for(var j=arguments.length,$=new Array(j),q=0;q<j;q++)$[q]=arguments[q];i.apply(void 0,[C,$.length].concat($))}E.ok=C,E.equal=function j($,q,oe){if(arguments.length<2)throw new s("actual","expected");$!=q&&S({actual:$,expected:q,message:oe,operator:"==",stackStartFn:j})},E.notEqual=function j($,q,oe){if(arguments.length<2)throw new s("actual","expected");$==q&&S({actual:$,expected:q,message:oe,operator:"!=",stackStartFn:j})},E.deepEqual=function j($,q,oe){if(arguments.length<2)throw new s("actual","expected");n===void 0&&m(),n($,q)||S({actual:$,expected:q,message:oe,operator:"deepEqual",stackStartFn:j})},E.notDeepEqual=function j($,q,oe){if(arguments.length<2)throw new s("actual","expected");n===void 0&&m(),n($,q)&&S({actual:$,expected:q,message:oe,operator:"notDeepEqual",stackStartFn:j})},E.deepStrictEqual=function j($,q,oe){if(arguments.length<2)throw new s("actual","expected");n===void 0&&m(),v($,q)||S({actual:$,expected:q,message:oe,operator:"deepStrictEqual",stackStartFn:j})},E.notDeepStrictEqual=x;function x(j,$,q){if(arguments.length<2)throw new s("actual","expected");n===void 0&&m(),v(j,$)&&S({actual:j,expected:$,message:q,operator:"notDeepStrictEqual",stackStartFn:x})}E.strictEqual=function j($,q,oe){if(arguments.length<2)throw new s("actual","expected");f($,q)||S({actual:$,expected:q,message:oe,operator:"strictEqual",stackStartFn:j})},E.notStrictEqual=function j($,q,oe){if(arguments.length<2)throw new s("actual","expected");f($,q)&&S({actual:$,expected:q,message:oe,operator:"notStrictEqual",stackStartFn:j})};var k=function j($,q,oe){var Z=this;o(this,j),q.forEach(function(G){G in $&&(oe!==void 0&&typeof oe[G]=="string"&&h($[G])&&$[G].test(oe[G])?Z[G]=oe[G]:Z[G]=$[G])})};function I(j,$,q,oe,Z,G){if(!(q in j)||!v(j[q],$[q])){if(!oe){var re=new k(j,Z),H=new k($,Z,j),J=new a({actual:re,expected:H,operator:"deepStrictEqual",stackStartFn:G});throw J.actual=j,J.expected=$,J.operator=G.name,J}S({actual:j,expected:$,message:oe,operator:G.name,stackStartFn:G})}}function B(j,$,q,oe){if(typeof $!="function"){if(h($))return $.test(j);if(arguments.length===2)throw new g("expected",["Function","RegExp"],$);if(P(j)!=="object"||j===null){var Z=new a({actual:j,expected:$,message:q,operator:"deepStrictEqual",stackStartFn:oe});throw Z.operator=oe.name,Z}var G=Object.keys($);if($ instanceof Error)G.push("name","message");else if(G.length===0)throw new r("error",$,"may not be an empty object");return n===void 0&&m(),G.forEach(function(re){typeof j[re]=="string"&&h($[re])&&$[re].test(j[re])||I(j,$,re,q,G,oe)}),!0}return $.prototype!==void 0&&j instanceof $?!0:Error.isPrototypeOf($)?!1:$.call({},j)===!0}function _(j){if(typeof j!="function")throw new g("fn","Function",j);try{j()}catch($){return $}return p}function z(j){return y(j)||j!==null&&P(j)==="object"&&typeof j.then=="function"&&typeof j.catch=="function"}function O(j){return Promise.resolve().then(function(){var $;if(typeof j=="function"){if($=j(),!z($))throw new t("instance of Promise","promiseFn",$)}else if(z(j))$=j;else throw new g("promiseFn",["Function","Promise"],j);return Promise.resolve().then(function(){return $}).then(function(){return p}).catch(function(q){return q})})}function F(j,$,q,oe){if(typeof q=="string"){if(arguments.length===4)throw new g("error",["Object","Error","Function","RegExp"],q);if(P($)==="object"&&$!==null){if($.message===q)throw new d("error/message",'The error message "'.concat($.message,'" is identical to the message.'))}else if($===q)throw new d("error/message",'The error "'.concat($,'" is identical to the message.'));oe=q,q=void 0}else if(q!=null&&P(q)!=="object"&&typeof q!="function")throw new g("error",["Object","Error","Function","RegExp"],q);if($===p){var Z="";q&&q.name&&(Z+=" (".concat(q.name,")")),Z+=oe?": ".concat(oe):".";var G=j.name==="rejects"?"rejection":"exception";S({actual:void 0,expected:q,operator:j.name,message:"Missing expected ".concat(G).concat(Z),stackStartFn:j})}if(q&&!B($,q,oe,j))throw $}function N(j,$,q,oe){if($!==p){if(typeof q=="string"&&(oe=q,q=void 0),!q||B($,q)){var Z=oe?": ".concat(oe):".",G=j.name==="doesNotReject"?"rejection":"exception";S({actual:$,expected:q,operator:j.name,message:"Got unwanted ".concat(G).concat(Z,`
`)+'Actual message: "'.concat($&&$.message,'"'),stackStartFn:j})}throw $}}E.throws=function j($){for(var q=arguments.length,oe=new Array(q>1?q-1:0),Z=1;Z<q;Z++)oe[Z-1]=arguments[Z];F.apply(void 0,[j,_($)].concat(oe))},E.rejects=function j($){for(var q=arguments.length,oe=new Array(q>1?q-1:0),Z=1;Z<q;Z++)oe[Z-1]=arguments[Z];return O($).then(function(G){return F.apply(void 0,[j,G].concat(oe))})},E.doesNotThrow=function j($){for(var q=arguments.length,oe=new Array(q>1?q-1:0),Z=1;Z<q;Z++)oe[Z-1]=arguments[Z];N.apply(void 0,[j,_($)].concat(oe))},E.doesNotReject=function j($){for(var q=arguments.length,oe=new Array(q>1?q-1:0),Z=1;Z<q;Z++)oe[Z-1]=arguments[Z];return O($).then(function(G){return N.apply(void 0,[j,G].concat(oe))})},E.ifError=function j($){if($!=null){var q="ifError got unwanted exception: ";P($)==="object"&&typeof $.message=="string"?$.message.length===0&&$.constructor?q+=$.constructor.name:q+=$.message:q+=u($);var oe=new a({actual:$,expected:null,operator:"ifError",message:q,stackStartFn:j}),Z=$.stack;if(typeof Z=="string"){var G=Z.split(`
`);G.shift();for(var re=oe.stack.split(`
`),H=0;H<G.length;H++){var J=re.indexOf(G[H]);if(J!==-1){re=re.slice(0,J);break}}oe.stack="".concat(re.join(`
`),`
`).concat(G.join(`
`))}throw oe}};function V(){for(var j=arguments.length,$=new Array(j),q=0;q<j;q++)$[q]=arguments[q];i.apply(void 0,[V,$.length].concat($))}E.strict=T(V,E,{equal:E.strictEqual,deepEqual:E.deepStrictEqual,notEqual:E.notStrictEqual,notDeepEqual:E.notDeepStrictEqual}),E.strict.strict=E.strict},26144:function(te,X,e){var A=e(4168);function P(_){for(var z=1;z<arguments.length;z++){var O=arguments[z]!=null?arguments[z]:{},F=Object.keys(O);typeof Object.getOwnPropertySymbols=="function"&&(F=F.concat(Object.getOwnPropertySymbols(O).filter(function(N){return Object.getOwnPropertyDescriptor(O,N).enumerable}))),F.forEach(function(N){o(_,N,O[N])})}return _}function o(_,z,O){return z in _?Object.defineProperty(_,z,{value:O,enumerable:!0,configurable:!0,writable:!0}):_[z]=O,_}function L(_,z){if(!(_ instanceof z))throw new TypeError("Cannot call a class as a function")}function M(_,z){for(var O=0;O<z.length;O++){var F=z[O];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(_,F.key,F)}}function d(_,z,O){return M(_.prototype,z),_}function g(_,z){return z&&(h(z)==="object"||typeof z=="function")?z:r(_)}function r(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function t(_,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(z&&z.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),z&&l(_,z)}function s(_){var z=typeof Map=="function"?new Map:void 0;return s=function(F){if(F===null||!u(F))return F;if(typeof F!="function")throw new TypeError("Super expression must either be null or a function");if(typeof z<"u"){if(z.has(F))return z.get(F);z.set(F,N)}function N(){return c(F,arguments,y(this).constructor)}return N.prototype=Object.create(F.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),l(N,F)},s(_)}function a(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function c(_,z,O){return a()?c=Reflect.construct:c=function(N,V,j){var $=[null];$.push.apply($,V);var q=Function.bind.apply(N,$),oe=new q;return j&&l(oe,j.prototype),oe},c.apply(null,arguments)}function u(_){return Function.toString.call(_).indexOf("[native code]")!==-1}function l(_,z){return l=Object.setPrototypeOf||function(F,N){return F.__proto__=N,F},l(_,z)}function y(_){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},y(_)}function h(_){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(O){return typeof O}:h=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},h(_)}var T=e(35840),f=T.inspect,n=e(86832),v=n.codes.ERR_INVALID_ARG_TYPE;function m(_,z,O){return(O===void 0||O>_.length)&&(O=_.length),_.substring(O-z.length,O)===z}function b(_,z){if(z=Math.floor(z),_.length==0||z==0)return"";var O=_.length*z;for(z=Math.floor(Math.log(z)/Math.log(2));z;)_+=_,z--;return _+=_.substring(0,O-_.length),_}var E="",p="",S="",w="",i={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},C=10;function x(_){var z=Object.keys(_),O=Object.create(Object.getPrototypeOf(_));return z.forEach(function(F){O[F]=_[F]}),Object.defineProperty(O,"message",{value:_.message}),O}function k(_){return f(_,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function I(_,z,O){var F="",N="",V=0,j="",$=!1,q=k(_),oe=q.split(`
`),Z=k(z).split(`
`),G=0,re="";if(O==="strictEqual"&&h(_)==="object"&&h(z)==="object"&&_!==null&&z!==null&&(O="strictEqualObject"),oe.length===1&&Z.length===1&&oe[0]!==Z[0]){var H=oe[0].length+Z[0].length;if(H<=C){if((h(_)!=="object"||_===null)&&(h(z)!=="object"||z===null)&&(_!==0||z!==0))return"".concat(i[O],`
`)+"".concat(oe[0]," !== ").concat(Z[0],`
`)}else if(O!=="strictEqualObject"){var J=A.stderr&&A.stderr.isTTY?A.stderr.columns:80;if(H<J){for(;oe[0][G]===Z[0][G];)G++;G>2&&(re=`
`.concat(b(" ",G),"^"),G=0)}}}for(var ae=oe[oe.length-1],K=Z[Z.length-1];ae===K&&(G++<2?j=`
`.concat(ae).concat(j):F=ae,oe.pop(),Z.pop(),!(oe.length===0||Z.length===0));)ae=oe[oe.length-1],K=Z[Z.length-1];var Y=Math.max(oe.length,Z.length);if(Y===0){var ie=q.split(`
`);if(ie.length>30)for(ie[26]="".concat(E,"...").concat(w);ie.length>27;)ie.pop();return"".concat(i.notIdentical,`
`).concat(ie.join(`
`),`
`)}G>3&&(j=`
`.concat(E,"...").concat(w).concat(j),$=!0),F!==""&&(j=`
`.concat(F).concat(j),F="");var ne=0,le=i[O]+`
`.concat(p,"+ actual").concat(w," ").concat(S,"- expected").concat(w),de=" ".concat(E,"...").concat(w," Lines skipped");for(G=0;G<Y;G++){var we=G-V;if(oe.length<G+1)we>1&&G>2&&(we>4?(N+=`
`.concat(E,"...").concat(w),$=!0):we>3&&(N+=`
`.concat(Z[G-2]),ne++),N+=`
`.concat(Z[G-1]),ne++),V=G,F+=`
`.concat(S,"-").concat(w," ").concat(Z[G]),ne++;else if(Z.length<G+1)we>1&&G>2&&(we>4?(N+=`
`.concat(E,"...").concat(w),$=!0):we>3&&(N+=`
`.concat(oe[G-2]),ne++),N+=`
`.concat(oe[G-1]),ne++),V=G,N+=`
`.concat(p,"+").concat(w," ").concat(oe[G]),ne++;else{var me=Z[G],Le=oe[G],ve=Le!==me&&(!m(Le,",")||Le.slice(0,-1)!==me);ve&&m(me,",")&&me.slice(0,-1)===Le&&(ve=!1,Le+=","),ve?(we>1&&G>2&&(we>4?(N+=`
`.concat(E,"...").concat(w),$=!0):we>3&&(N+=`
`.concat(oe[G-2]),ne++),N+=`
`.concat(oe[G-1]),ne++),V=G,N+=`
`.concat(p,"+").concat(w," ").concat(Le),F+=`
`.concat(S,"-").concat(w," ").concat(me),ne+=2):(N+=F,F="",(we===1||G===0)&&(N+=`
`.concat(Le),ne++))}if(ne>20&&G<Y-2)return"".concat(le).concat(de,`
`).concat(N,`
`).concat(E,"...").concat(w).concat(F,`
`)+"".concat(E,"...").concat(w)}return"".concat(le).concat($?de:"",`
`).concat(N).concat(F).concat(j).concat(re)}var B=function(_){t(z,_);function z(O){var F;if(L(this,z),h(O)!=="object"||O===null)throw new v("options","Object",O);var N=O.message,V=O.operator,j=O.stackStartFn,$=O.actual,q=O.expected,oe=Error.stackTraceLimit;if(Error.stackTraceLimit=0,N!=null)F=g(this,y(z).call(this,String(N)));else if(A.stderr&&A.stderr.isTTY&&(A.stderr&&A.stderr.getColorDepth&&A.stderr.getColorDepth()!==1?(E="\x1B[34m",p="\x1B[32m",w="\x1B[39m",S="\x1B[31m"):(E="",p="",w="",S="")),h($)==="object"&&$!==null&&h(q)==="object"&&q!==null&&"stack"in $&&$ instanceof Error&&"stack"in q&&q instanceof Error&&($=x($),q=x(q)),V==="deepStrictEqual"||V==="strictEqual")F=g(this,y(z).call(this,I($,q,V)));else if(V==="notDeepStrictEqual"||V==="notStrictEqual"){var Z=i[V],G=k($).split(`
`);if(V==="notStrictEqual"&&h($)==="object"&&$!==null&&(Z=i.notStrictEqualObject),G.length>30)for(G[26]="".concat(E,"...").concat(w);G.length>27;)G.pop();G.length===1?F=g(this,y(z).call(this,"".concat(Z," ").concat(G[0]))):F=g(this,y(z).call(this,"".concat(Z,`
`).concat(G.join(`
`),`
`)))}else{var re=k($),H="",J=i[V];V==="notDeepEqual"||V==="notEqual"?(re="".concat(i[V],`
`).concat(re),re.length>1024&&(re="".concat(re.slice(0,1021),"..."))):(H="".concat(k(q)),re.length>512&&(re="".concat(re.slice(0,509),"...")),H.length>512&&(H="".concat(H.slice(0,509),"...")),V==="deepEqual"||V==="equal"?re="".concat(J,`
`).concat(re,`
should equal
`):H=" ".concat(V," ").concat(H)),F=g(this,y(z).call(this,"".concat(re).concat(H)))}return Error.stackTraceLimit=oe,F.generatedMessage=!N,Object.defineProperty(r(F),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),F.code="ERR_ASSERTION",F.actual=$,F.expected=q,F.operator=V,Error.captureStackTrace&&Error.captureStackTrace(r(F),j),F.stack,F.name="AssertionError",g(F)}return d(z,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(F,N){return f(this,P({},N,{customInspect:!1,depth:0}))}}]),z}(s(Error));te.exports=B},86832:function(te,X,e){function A(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(f){return typeof f}:A=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},A(h)}function P(h,T){if(!(h instanceof T))throw new TypeError("Cannot call a class as a function")}function o(h,T){return T&&(A(T)==="object"||typeof T=="function")?T:L(h)}function L(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function M(h){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},M(h)}function d(h,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(T&&T.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),T&&g(h,T)}function g(h,T){return g=Object.setPrototypeOf||function(n,v){return n.__proto__=v,n},g(h,T)}var r={},t,s;function a(h,T,f){f||(f=Error);function n(m,b,E){return typeof T=="string"?T:T(m,b,E)}var v=function(m){d(b,m);function b(E,p,S){var w;return P(this,b),w=o(this,M(b).call(this,n(E,p,S))),w.code=h,w}return b}(f);r[h]=v}function c(h,T){if(Array.isArray(h)){var f=h.length;return h=h.map(function(n){return String(n)}),f>2?"one of ".concat(T," ").concat(h.slice(0,f-1).join(", "),", or ")+h[f-1]:f===2?"one of ".concat(T," ").concat(h[0]," or ").concat(h[1]):"of ".concat(T," ").concat(h[0])}else return"of ".concat(T," ").concat(String(h))}function u(h,T,f){return h.substr(0,T.length)===T}function l(h,T,f){return(f===void 0||f>h.length)&&(f=h.length),h.substring(f-T.length,f)===T}function y(h,T,f){return typeof f!="number"&&(f=0),f+T.length>h.length?!1:h.indexOf(T,f)!==-1}a("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),a("ERR_INVALID_ARG_TYPE",function(h,T,f){t===void 0&&(t=e(45408)),t(typeof h=="string","'name' must be a string");var n;typeof T=="string"&&u(T,"not ")?(n="must not be",T=T.replace(/^not /,"")):n="must be";var v;if(l(h," argument"))v="The ".concat(h," ").concat(n," ").concat(c(T,"type"));else{var m=y(h,".")?"property":"argument";v='The "'.concat(h,'" ').concat(m," ").concat(n," ").concat(c(T,"type"))}return v+=". Received type ".concat(A(f)),v},TypeError),a("ERR_INVALID_ARG_VALUE",function(h,T){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";s===void 0&&(s=e(35840));var n=s.inspect(T);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(h,"' ").concat(f,". Received ").concat(n)},TypeError),a("ERR_INVALID_RETURN_VALUE",function(h,T,f){var n;return f&&f.constructor&&f.constructor.name?n="instance of ".concat(f.constructor.name):n="type ".concat(A(f)),"Expected ".concat(h,' to be returned from the "').concat(T,'"')+" function but got ".concat(n,".")},TypeError),a("ERR_MISSING_ARGS",function(){for(var h=arguments.length,T=new Array(h),f=0;f<h;f++)T[f]=arguments[f];t===void 0&&(t=e(45408)),t(T.length>0,"At least one arg needs to be specified");var n="The ",v=T.length;switch(T=T.map(function(m){return'"'.concat(m,'"')}),v){case 1:n+="".concat(T[0]," argument");break;case 2:n+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:n+=T.slice(0,v-1).join(", "),n+=", and ".concat(T[v-1]," arguments");break}return"".concat(n," must be specified")},TypeError),te.exports.codes=r},25116:function(te,X,e){function A(ve,Ae){return o(ve)||P(ve,Ae)}function P(ve,Ae){var ye=[],Se=!0,_e=!1,ze=void 0;try{for(var Ie=ve[Symbol.iterator](),Ne;!(Se=(Ne=Ie.next()).done)&&(ye.push(Ne.value),!(Ae&&ye.length===Ae));Se=!0);}catch(et){_e=!0,ze=et}finally{try{!Se&&Ie.return!=null&&Ie.return()}finally{if(_e)throw ze}}return ye}function o(ve){if(Array.isArray(ve))return ve}function L(ve){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L=function(ye){return typeof ye}:L=function(ye){return ye&&typeof Symbol=="function"&&ye.constructor===Symbol&&ye!==Symbol.prototype?"symbol":typeof ye},L(ve)}var M=/a/g.flags!==void 0,d=function(Ae){var ye=[];return Ae.forEach(function(Se){return ye.push(Se)}),ye},g=function(Ae){var ye=[];return Ae.forEach(function(Se,_e){return ye.push([_e,Se])}),ye},r=Object.is?Object.is:e(39896),t=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},s=Number.isNaN?Number.isNaN:e(1560);function a(ve){return ve.call.bind(ve)}var c=a(Object.prototype.hasOwnProperty),u=a(Object.prototype.propertyIsEnumerable),l=a(Object.prototype.toString),y=e(35840).types,h=y.isAnyArrayBuffer,T=y.isArrayBufferView,f=y.isDate,n=y.isMap,v=y.isRegExp,m=y.isSet,b=y.isNativeError,E=y.isBoxedPrimitive,p=y.isNumberObject,S=y.isStringObject,w=y.isBooleanObject,i=y.isBigIntObject,C=y.isSymbolObject,x=y.isFloat32Array,k=y.isFloat64Array;function I(ve){if(ve.length===0||ve.length>10)return!0;for(var Ae=0;Ae<ve.length;Ae++){var ye=ve.charCodeAt(Ae);if(ye<48||ye>57)return!0}return ve.length===10&&ve>=Math.pow(2,32)}function B(ve){return Object.keys(ve).filter(I).concat(t(ve).filter(Object.prototype.propertyIsEnumerable.bind(ve)))}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/function _(ve,Ae){if(ve===Ae)return 0;for(var ye=ve.length,Se=Ae.length,_e=0,ze=Math.min(ye,Se);_e<ze;++_e)if(ve[_e]!==Ae[_e]){ye=ve[_e],Se=Ae[_e];break}return ye<Se?-1:Se<ye?1:0}var z=!0,O=!1,F=0,N=1,V=2,j=3;function $(ve,Ae){return M?ve.source===Ae.source&&ve.flags===Ae.flags:RegExp.prototype.toString.call(ve)===RegExp.prototype.toString.call(Ae)}function q(ve,Ae){if(ve.byteLength!==Ae.byteLength)return!1;for(var ye=0;ye<ve.byteLength;ye++)if(ve[ye]!==Ae[ye])return!1;return!0}function oe(ve,Ae){return ve.byteLength!==Ae.byteLength?!1:_(new Uint8Array(ve.buffer,ve.byteOffset,ve.byteLength),new Uint8Array(Ae.buffer,Ae.byteOffset,Ae.byteLength))===0}function Z(ve,Ae){return ve.byteLength===Ae.byteLength&&_(new Uint8Array(ve),new Uint8Array(Ae))===0}function G(ve,Ae){return p(ve)?p(Ae)&&r(Number.prototype.valueOf.call(ve),Number.prototype.valueOf.call(Ae)):S(ve)?S(Ae)&&String.prototype.valueOf.call(ve)===String.prototype.valueOf.call(Ae):w(ve)?w(Ae)&&Boolean.prototype.valueOf.call(ve)===Boolean.prototype.valueOf.call(Ae):i(ve)?i(Ae)&&BigInt.prototype.valueOf.call(ve)===BigInt.prototype.valueOf.call(Ae):C(Ae)&&Symbol.prototype.valueOf.call(ve)===Symbol.prototype.valueOf.call(Ae)}function re(ve,Ae,ye,Se){if(ve===Ae)return ve!==0?!0:ye?r(ve,Ae):!0;if(ye){if(L(ve)!=="object")return typeof ve=="number"&&s(ve)&&s(Ae);if(L(Ae)!=="object"||ve===null||Ae===null||Object.getPrototypeOf(ve)!==Object.getPrototypeOf(Ae))return!1}else{if(ve===null||L(ve)!=="object")return Ae===null||L(Ae)!=="object"?ve==Ae:!1;if(Ae===null||L(Ae)!=="object")return!1}var _e=l(ve),ze=l(Ae);if(_e!==ze)return!1;if(Array.isArray(ve)){if(ve.length!==Ae.length)return!1;var Ie=B(ve),Ne=B(Ae);return Ie.length!==Ne.length?!1:J(ve,Ae,ye,Se,N,Ie)}if(_e==="[object Object]"&&(!n(ve)&&n(Ae)||!m(ve)&&m(Ae)))return!1;if(f(ve)){if(!f(Ae)||Date.prototype.getTime.call(ve)!==Date.prototype.getTime.call(Ae))return!1}else if(v(ve)){if(!v(Ae)||!$(ve,Ae))return!1}else if(b(ve)||ve instanceof Error){if(ve.message!==Ae.message||ve.name!==Ae.name)return!1}else if(T(ve)){if(!ye&&(x(ve)||k(ve))){if(!q(ve,Ae))return!1}else if(!oe(ve,Ae))return!1;var et=B(ve),st=B(Ae);return et.length!==st.length?!1:J(ve,Ae,ye,Se,F,et)}else{if(m(ve))return!m(Ae)||ve.size!==Ae.size?!1:J(ve,Ae,ye,Se,V);if(n(ve))return!n(Ae)||ve.size!==Ae.size?!1:J(ve,Ae,ye,Se,j);if(h(ve)){if(!Z(ve,Ae))return!1}else if(E(ve)&&!G(ve,Ae))return!1}return J(ve,Ae,ye,Se,F)}function H(ve,Ae){return Ae.filter(function(ye){return u(ve,ye)})}function J(ve,Ae,ye,Se,_e,ze){if(arguments.length===5){ze=Object.keys(ve);var Ie=Object.keys(Ae);if(ze.length!==Ie.length)return!1}for(var Ne=0;Ne<ze.length;Ne++)if(!c(Ae,ze[Ne]))return!1;if(ye&&arguments.length===5){var et=t(ve);if(et.length!==0){var st=0;for(Ne=0;Ne<et.length;Ne++){var Ze=et[Ne];if(u(ve,Ze)){if(!u(Ae,Ze))return!1;ze.push(Ze),st++}else if(u(Ae,Ze))return!1}var Ke=t(Ae);if(et.length!==Ke.length&&H(Ae,Ke).length!==st)return!1}else{var nt=t(Ae);if(nt.length!==0&&H(Ae,nt).length!==0)return!1}}if(ze.length===0&&(_e===F||_e===N&&ve.length===0||ve.size===0))return!0;if(Se===void 0)Se={val1:new Map,val2:new Map,position:0};else{var it=Se.val1.get(ve);if(it!==void 0){var lt=Se.val2.get(Ae);if(lt!==void 0)return it===lt}Se.position++}Se.val1.set(ve,Se.position),Se.val2.set(Ae,Se.position);var vt=we(ve,Ae,ye,ze,Se,_e);return Se.val1.delete(ve),Se.val2.delete(Ae),vt}function ae(ve,Ae,ye,Se){for(var _e=d(ve),ze=0;ze<_e.length;ze++){var Ie=_e[ze];if(re(Ae,Ie,ye,Se))return ve.delete(Ie),!0}return!1}function K(ve){switch(L(ve)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":ve=+ve;case"number":if(s(ve))return!1}return!0}function Y(ve,Ae,ye){var Se=K(ye);return Se??(Ae.has(Se)&&!ve.has(Se))}function ie(ve,Ae,ye,Se,_e){var ze=K(ye);if(ze!=null)return ze;var Ie=Ae.get(ze);return Ie===void 0&&!Ae.has(ze)||!re(Se,Ie,!1,_e)?!1:!ve.has(ze)&&re(Se,Ie,!1,_e)}function ne(ve,Ae,ye,Se){for(var _e=null,ze=d(ve),Ie=0;Ie<ze.length;Ie++){var Ne=ze[Ie];if(L(Ne)==="object"&&Ne!==null)_e===null&&(_e=new Set),_e.add(Ne);else if(!Ae.has(Ne)){if(ye||!Y(ve,Ae,Ne))return!1;_e===null&&(_e=new Set),_e.add(Ne)}}if(_e!==null){for(var et=d(Ae),st=0;st<et.length;st++){var Ze=et[st];if(L(Ze)==="object"&&Ze!==null){if(!ae(_e,Ze,ye,Se))return!1}else if(!ye&&!ve.has(Ze)&&!ae(_e,Ze,ye,Se))return!1}return _e.size===0}return!0}function le(ve,Ae,ye,Se,_e,ze){for(var Ie=d(ve),Ne=0;Ne<Ie.length;Ne++){var et=Ie[Ne];if(re(ye,et,_e,ze)&&re(Se,Ae.get(et),_e,ze))return ve.delete(et),!0}return!1}function de(ve,Ae,ye,Se){for(var _e=null,ze=g(ve),Ie=0;Ie<ze.length;Ie++){var Ne=A(ze[Ie],2),et=Ne[0],st=Ne[1];if(L(et)==="object"&&et!==null)_e===null&&(_e=new Set),_e.add(et);else{var Ze=Ae.get(et);if(Ze===void 0&&!Ae.has(et)||!re(st,Ze,ye,Se)){if(ye||!ie(ve,Ae,et,st,Se))return!1;_e===null&&(_e=new Set),_e.add(et)}}}if(_e!==null){for(var Ke=g(Ae),nt=0;nt<Ke.length;nt++){var it=A(Ke[nt],2),et=it[0],lt=it[1];if(L(et)==="object"&&et!==null){if(!le(_e,ve,et,lt,ye,Se))return!1}else if(!ye&&(!ve.has(et)||!re(ve.get(et),lt,!1,Se))&&!le(_e,ve,et,lt,!1,Se))return!1}return _e.size===0}return!0}function we(ve,Ae,ye,Se,_e,ze){var Ie=0;if(ze===V){if(!ne(ve,Ae,ye,_e))return!1}else if(ze===j){if(!de(ve,Ae,ye,_e))return!1}else if(ze===N)for(;Ie<ve.length;Ie++)if(c(ve,Ie)){if(!c(Ae,Ie)||!re(ve[Ie],Ae[Ie],ye,_e))return!1}else{if(c(Ae,Ie))return!1;for(var Ne=Object.keys(ve);Ie<Ne.length;Ie++){var et=Ne[Ie];if(!c(Ae,et)||!re(ve[et],Ae[et],ye,_e))return!1}return Ne.length===Object.keys(Ae).length}for(Ie=0;Ie<Se.length;Ie++){var st=Se[Ie];if(!re(ve[st],Ae[st],ye,_e))return!1}return!0}function me(ve,Ae){return re(ve,Ae,O)}function Le(ve,Ae){return re(ve,Ae,z)}te.exports={isDeepEqual:me,isDeepStrictEqual:Le}},83160:function(te,X,e){e.r(X),e.d(X,{decode:function(){return M},encode:function(){return L}});for(var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P=typeof Uint8Array>"u"?[]:new Uint8Array(256),o=0;o<A.length;o++)P[A.charCodeAt(o)]=o;var L=function(d){var g=new Uint8Array(d),r,t=g.length,s="";for(r=0;r<t;r+=3)s+=A[g[r]>>2],s+=A[(g[r]&3)<<4|g[r+1]>>4],s+=A[(g[r+1]&15)<<2|g[r+2]>>6],s+=A[g[r+2]&63];return t%3===2?s=s.substring(0,s.length-1)+"=":t%3===1&&(s=s.substring(0,s.length-2)+"=="),s},M=function(d){var g=d.length*.75,r=d.length,t,s=0,a,c,u,l;d[d.length-1]==="="&&(g--,d[d.length-2]==="="&&g--);var y=new ArrayBuffer(g),h=new Uint8Array(y);for(t=0;t<r;t+=4)a=P[d.charCodeAt(t)],c=P[d.charCodeAt(t+1)],u=P[d.charCodeAt(t+2)],l=P[d.charCodeAt(t+3)],h[s++]=a<<2|c>>4,h[s++]=(c&15)<<4|u>>2,h[s++]=(u&3)<<6|l&63;return y}},59968:function(te,X){X.byteLength=g,X.toByteArray=t,X.fromByteArray=c;for(var e=[],A=[],P=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L=0,M=o.length;L<M;++L)e[L]=o[L],A[o.charCodeAt(L)]=L;A[45]=62,A[95]=63;function d(u){var l=u.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=u.indexOf("=");y===-1&&(y=l);var h=y===l?0:4-y%4;return[y,h]}function g(u){var l=d(u),y=l[0],h=l[1];return(y+h)*3/4-h}function r(u,l,y){return(l+y)*3/4-y}function t(u){var l,y=d(u),h=y[0],T=y[1],f=new P(r(u,h,T)),n=0,v=T>0?h-4:h,m;for(m=0;m<v;m+=4)l=A[u.charCodeAt(m)]<<18|A[u.charCodeAt(m+1)]<<12|A[u.charCodeAt(m+2)]<<6|A[u.charCodeAt(m+3)],f[n++]=l>>16&255,f[n++]=l>>8&255,f[n++]=l&255;return T===2&&(l=A[u.charCodeAt(m)]<<2|A[u.charCodeAt(m+1)]>>4,f[n++]=l&255),T===1&&(l=A[u.charCodeAt(m)]<<10|A[u.charCodeAt(m+1)]<<4|A[u.charCodeAt(m+2)]>>2,f[n++]=l>>8&255,f[n++]=l&255),f}function s(u){return e[u>>18&63]+e[u>>12&63]+e[u>>6&63]+e[u&63]}function a(u,l,y){for(var h,T=[],f=l;f<y;f+=3)h=(u[f]<<16&16711680)+(u[f+1]<<8&65280)+(u[f+2]&255),T.push(s(h));return T.join("")}function c(u){for(var l,y=u.length,h=y%3,T=[],f=16383,n=0,v=y-h;n<v;n+=f)T.push(a(u,n,n+f>v?v:n+f));return h===1?(l=u[y-1],T.push(e[l>>2]+e[l<<4&63]+"==")):h===2&&(l=(u[y-2]<<8)+u[y-1],T.push(e[l>>10]+e[l>>4&63]+e[l<<2&63]+"=")),T.join("")}},64928:function(te){function X(M,d,g,r,t){for(var s=t+1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u>=0?(s=a,t=a-1):r=a+1}return s}function e(M,d,g,r,t){for(var s=t+1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u>0?(s=a,t=a-1):r=a+1}return s}function A(M,d,g,r,t){for(var s=r-1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u<0?(s=a,r=a+1):t=a-1}return s}function P(M,d,g,r,t){for(var s=r-1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u<=0?(s=a,r=a+1):t=a-1}return s}function o(M,d,g,r,t){for(;r<=t;){var s=r+t>>>1,a=M[s],c=g!==void 0?g(a,d):a-d;if(c===0)return s;c<=0?r=s+1:t=s-1}return-1}function L(M,d,g,r,t,s){return typeof g=="function"?s(M,d,g,r===void 0?0:r|0,t===void 0?M.length-1:t|0):s(M,d,void 0,g===void 0?0:g|0,r===void 0?M.length-1:r|0)}te.exports={ge:function(M,d,g,r,t){return L(M,d,g,r,t,X)},gt:function(M,d,g,r,t){return L(M,d,g,r,t,e)},lt:function(M,d,g,r,t){return L(M,d,g,r,t,A)},le:function(M,d,g,r,t){return L(M,d,g,r,t,P)},eq:function(M,d,g,r,t){return L(M,d,g,r,t,o)}}},308:function(te,X){"use restrict";var e=32;X.INT_BITS=e,X.INT_MAX=2147483647,X.INT_MIN=-1<<e-1,X.sign=function(o){return(o>0)-(o<0)},X.abs=function(o){var L=o>>e-1;return(o^L)-L},X.min=function(o,L){return L^(o^L)&-(o<L)},X.max=function(o,L){return o^(o^L)&-(o<L)},X.isPow2=function(o){return!(o&o-1)&&!!o},X.log2=function(o){var L,M;return L=(o>65535)<<4,o>>>=L,M=(o>255)<<3,o>>>=M,L|=M,M=(o>15)<<2,o>>>=M,L|=M,M=(o>3)<<1,o>>>=M,L|=M,L|o>>1},X.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},X.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function A(o){var L=32;return o&=-o,o&&L--,o&65535&&(L-=16),o&16711935&&(L-=8),o&252645135&&(L-=4),o&858993459&&(L-=2),o&1431655765&&(L-=1),L}X.countTrailingZeros=A,X.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},X.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},X.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var P=new Array(256);(function(o){for(var L=0;L<256;++L){var M=L,d=L,g=7;for(M>>>=1;M;M>>>=1)d<<=1,d|=M&1,--g;o[L]=d<<g&255}})(P),X.reverse=function(o){return P[o&255]<<24|P[o>>>8&255]<<16|P[o>>>16&255]<<8|P[o>>>24&255]},X.interleave2=function(o,L){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,L&=65535,L=(L|L<<8)&16711935,L=(L|L<<4)&252645135,L=(L|L<<2)&858993459,L=(L|L<<1)&1431655765,o|L<<1},X.deinterleave2=function(o,L){return o=o>>>L&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},X.interleave3=function(o,L,M){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,L&=1023,L=(L|L<<16)&4278190335,L=(L|L<<8)&251719695,L=(L|L<<4)&3272356035,L=(L|L<<2)&1227133513,o|=L<<1,M&=1023,M=(M|M<<16)&4278190335,M=(M|M<<8)&251719695,M=(M|M<<4)&3272356035,M=(M|M<<2)&1227133513,o|M<<2},X.deinterleave3=function(o,L){return o=o>>>L&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},X.nextCombination=function(o){var L=o|o-1;return L+1|(~L&-~L)-1>>>A(o)+1}},29620:function(te,X,e){var A=e(32420);te.exports=o;var P=1e20;function o(d,g){g||(g={});var r=g.cutoff==null?.25:g.cutoff,t=g.radius==null?8:g.radius,s=g.channel||0,a,c,u,l,y,h,T,f,n,v,m;if(ArrayBuffer.isView(d)||Array.isArray(d)){if(!g.width||!g.height)throw Error("For raw data width and height should be provided by options");a=g.width,c=g.height,l=d,g.stride?h=g.stride:h=Math.floor(d.length/a/c)}else window.HTMLCanvasElement&&d instanceof window.HTMLCanvasElement?(f=d,T=f.getContext("2d"),a=f.width,c=f.height,n=T.getImageData(0,0,a,c),l=n.data,h=4):window.CanvasRenderingContext2D&&d instanceof window.CanvasRenderingContext2D?(f=d.canvas,T=d,a=f.width,c=f.height,n=T.getImageData(0,0,a,c),l=n.data,h=4):window.ImageData&&d instanceof window.ImageData&&(n=d,a=d.width,c=d.height,l=n.data,h=4);if(u=Math.max(a,c),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(y=l,l=Array(a*c),v=0,m=y.length;v<m;v++)l[v]=y[v*h+s]/255;else if(h!==1)throw Error("Raw data can have only 1 value per pixel");var b=Array(a*c),E=Array(a*c),p=Array(u),S=Array(u),w=Array(u+1),i=Array(u);for(v=0,m=a*c;v<m;v++){var C=l[v];b[v]=C===1?0:C===0?P:Math.pow(Math.max(0,.5-C),2),E[v]=C===1?P:C===0?0:Math.pow(Math.max(0,C-.5),2)}L(b,a,c,p,S,i,w),L(E,a,c,p,S,i,w);var x=window.Float32Array?new Float32Array(a*c):new Array(a*c);for(v=0,m=a*c;v<m;v++)x[v]=A(1-((b[v]-E[v])/t+r),0,1);return x}function L(d,g,r,t,s,a,c){for(var u=0;u<g;u++){for(var l=0;l<r;l++)t[l]=d[l*g+u];for(M(t,s,a,c,r),l=0;l<r;l++)d[l*g+u]=s[l]}for(l=0;l<r;l++){for(u=0;u<g;u++)t[u]=d[l*g+u];for(M(t,s,a,c,g),u=0;u<g;u++)d[l*g+u]=Math.sqrt(s[u])}}function M(d,g,r,t,s){r[0]=0,t[0]=-1e20,t[1]=1e20;for(var a=1,c=0;a<s;a++){for(var u=(d[a]+a*a-(d[r[c]]+r[c]*r[c]))/(2*a-2*r[c]);u<=t[c];)c--,u=(d[a]+a*a-(d[r[c]]+r[c]*r[c]))/(2*a-2*r[c]);c++,r[c]=a,t[c]=u,t[c+1]=1e20}for(a=0,c=0;a<s;a++){for(;t[c+1]<a;)c++;g[a]=(a-r[c])*(a-r[c])+d[r[c]]}}},99676:function(te,X,e){var A=e(53664),P=e(57916),o=P(A("String.prototype.indexOf"));te.exports=function(M,d){var g=A(M,!!d);return typeof g=="function"&&o(M,".prototype.")>-1?P(g):g}},57916:function(te,X,e){var A=e(8844),P=e(53664),o=e(14500),L=P("%TypeError%"),M=P("%Function.prototype.apply%"),d=P("%Function.prototype.call%"),g=P("%Reflect.apply%",!0)||A.call(d,M),r=P("%Object.defineProperty%",!0),t=P("%Math.max%");if(r)try{r({},"a",{value:1})}catch{r=null}te.exports=function(c){if(typeof c!="function")throw new L("a function is required");var u=g(A,d,arguments);return o(u,1+t(0,c.length-(arguments.length-1)),!0)};var s=function(){return g(A,M,arguments)};r?r(te.exports,"apply",{value:s}):te.exports.apply=s},32420:function(te){te.exports=X;function X(e,A,P){return A<P?e<A?A:e>P?P:e:e<P?P:e>A?A:e}},3808:function(te,X,e){var A=e(32420);te.exports=P,te.exports.to=P,te.exports.from=o;function P(L,M){M==null&&(M=!0);var d=L[0],g=L[1],r=L[2],t=L[3];t==null&&(t=M?1:255),M&&(d*=255,g*=255,r*=255,t*=255),d=A(d,0,255)&255,g=A(g,0,255)&255,r=A(r,0,255)&255,t=A(t,0,255)&255;var s=d*16777216+(g<<16)+(r<<8)+t;return s}function o(L,M){L=+L;var d=L>>>24,g=(L&16711680)>>>16,r=(L&65280)>>>8,t=L&255;return M===!1?[d,g,r,t]:[d/255,g/255,r/255,t/255]}},17592:function(te){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],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]}},72160:function(te,X,e){var A=e(96824),P=e(32420),o=e(72512);te.exports=function(d,g){(g==="float"||!g)&&(g="array"),g==="uint"&&(g="uint8"),g==="uint_clamped"&&(g="uint8_clamped");var r=o(g),t=new r(4),s=g!=="uint8"&&g!=="uint8_clamped";return(!d.length||typeof d=="string")&&(d=A(d),d[0]/=255,d[1]/=255,d[2]/=255),L(d)?(t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=d[3]!=null?d[3]:255,s&&(t[0]/=255,t[1]/=255,t[2]/=255,t[3]/=255),t):(s?(t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=d[3]!=null?d[3]:1):(t[0]=P(Math.floor(d[0]*255),0,255),t[1]=P(Math.floor(d[1]*255),0,255),t[2]=P(Math.floor(d[2]*255),0,255),t[3]=d[3]==null?255:P(Math.floor(d[3]*255),0,255)),t)};function L(M){return!!(M instanceof Uint8Array||M instanceof Uint8ClampedArray||Array.isArray(M)&&(M[0]>1||M[0]===0)&&(M[1]>1||M[1]===0)&&(M[2]>1||M[2]===0)&&(!M[3]||M[3]>1))}},96824:function(te,X,e){var A=e(95532),P=e(53576),o=e(32420);te.exports=function(M){var d,g=A(M);return g.space?(d=Array(3),d[0]=o(g.values[0],0,255),d[1]=o(g.values[1],0,255),d[2]=o(g.values[2],0,255),g.space[0]==="h"&&(d=P.rgb(d)),d.push(o(g.alpha,0,1)),d):[]}},95532:function(te,X,e){var A=e(17592);te.exports=o;var P={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function o(L){var M,d=[],g=1,r;if(typeof L=="string")if(L=L.toLowerCase(),A[L])d=A[L].slice(),r="rgb";else if(L==="transparent")g=0,r="rgb",d=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(L)){var t=L.slice(1),s=t.length,a=s<=4;g=1,a?(d=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],s===4&&(g=parseInt(t[3]+t[3],16)/255)):(d=[parseInt(t[0]+t[1],16),parseInt(t[2]+t[3],16),parseInt(t[4]+t[5],16)],s===8&&(g=parseInt(t[6]+t[7],16)/255)),d[0]||(d[0]=0),d[1]||(d[1]=0),d[2]||(d[2]=0),r="rgb"}else if(M=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(L)){var c=M[1],u=c==="rgb",t=c.replace(/a$/,"");r=t;var s=t==="cmyk"?4:t==="gray"?1:3;d=M[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,T){if(/%$/.test(h))return T===s?parseFloat(h)/100:t==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(t[T]==="h"){if(/deg$/.test(h))return parseFloat(h);if(P[h]!==void 0)return P[h]}return parseFloat(h)}),c===t&&d.push(1),g=u||d[s]===void 0?1:d[s],d=d.slice(0,s)}else L.length>10&&/[0-9](?:\s|\/)/.test(L)&&(d=L.match(/([0-9]+)/g).map(function(l){return parseFloat(l)}),r=L.match(/([a-z])/ig).join("").toLowerCase());else isNaN(L)?Array.isArray(L)||L.length?(d=[L[0],L[1],L[2]],r="rgb",g=L.length===4?L[3]:1):L instanceof Object&&(L.r!=null||L.red!=null||L.R!=null?(r="rgb",d=[L.r||L.red||L.R||0,L.g||L.green||L.G||0,L.b||L.blue||L.B||0]):(r="hsl",d=[L.h||L.hue||L.H||0,L.s||L.saturation||L.S||0,L.l||L.lightness||L.L||L.b||L.brightness]),g=L.a||L.alpha||L.opacity||1,L.opacity!=null&&(g/=100)):(r="rgb",d=[L>>>16,(L&65280)>>>8,L&255]);return{space:r,values:d,alpha:g}}},53576:function(te,X,e){var A=e(19336);te.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(P){var o=P[0]/360,L=P[1]/100,M=P[2]/100,d,g,r,t,s;if(L===0)return s=M*255,[s,s,s];M<.5?g=M*(1+L):g=M+L-M*L,d=2*M-g,t=[0,0,0];for(var a=0;a<3;a++)r=o+.3333333333333333*-(a-1),r<0?r++:r>1&&r--,6*r<1?s=d+(g-d)*6*r:2*r<1?s=g:3*r<2?s=d+(g-d)*(.6666666666666666-r)*6:s=d,t[a]=s*255;return t}},A.hsl=function(P){var o=P[0]/255,L=P[1]/255,M=P[2]/255,d=Math.min(o,L,M),g=Math.max(o,L,M),r=g-d,t,s,a;return g===d?t=0:o===g?t=(L-M)/r:L===g?t=2+(M-o)/r:M===g&&(t=4+(o-L)/r),t=Math.min(t*60,360),t<0&&(t+=360),a=(d+g)/2,g===d?s=0:a<=.5?s=r/(g+d):s=r/(2-g-d),[t,s*100,a*100]}},19336:function(te){te.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(te){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|ç)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?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},42771:function(te,X,e){te.exports={parse:e(46416),stringify:e(49395)}},8744:function(te,X,e){var A=e(30584);te.exports={isSize:function(o){return/^[\d\.]/.test(o)||o.indexOf("/")!==-1||A.indexOf(o)!==-1}}},46416:function(te,X,e){var A=e(92384),P=e(68194),o=e(3748),L=e(2904),M=e(47916),d=e(7294),g=e(39956),r=e(8744).isSize;te.exports=s;var t=s.cache={};function s(c){if(typeof c!="string")throw new Error("Font argument must be a string.");if(t[c])return t[c];if(c==="")throw new Error("Cannot parse an empty string.");if(o.indexOf(c)!==-1)return t[c]={system:c};for(var u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},l=g(c,/\s+/),y;y=l.shift();){if(P.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(T){u[T]=y}),t[c]=u;if(M.indexOf(y)!==-1){u.style=y;continue}if(y==="normal"||y==="small-caps"){u.variant=y;continue}if(d.indexOf(y)!==-1){u.stretch=y;continue}if(L.indexOf(y)!==-1){u.weight=y;continue}if(r(y)){var h=g(y,"/");if(u.size=h[0],h[1]!=null?u.lineHeight=a(h[1]):l[0]==="/"&&(l.shift(),u.lineHeight=a(l.shift())),!l.length)throw new Error("Missing required font-family.");return u.family=g(l.join(" "),/\s*,\s*/).map(A),t[c]=u}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function a(c){var u=parseFloat(c);return u.toString()===c?u:c}},49395:function(te,X,e){var A=e(55616),P=e(8744).isSize,o=c(e(68194)),L=c(e(3748)),M=c(e(2904)),d=c(e(47916)),g=c(e(7294)),r={normal:1,"small-caps":1},t={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};te.exports=function(l){if(l=A(l,{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"}),l.system)return l.system&&a(l.system,L),l.system;if(a(l.style,d),a(l.variant,r),a(l.weight,M),a(l.stretch,g),l.size==null&&(l.size=s.size),typeof l.size=="number"&&(l.size+="px"),!P)throw Error("Bad size value `"+l.size+"`");l.family||(l.family=s.family),Array.isArray(l.family)&&(l.family.length||(l.family=[s.family]),l.family=l.family.map(function(h){return t[h]?h:'"'+h+'"'}).join(", "));var y=[];return y.push(l.style),l.variant!==l.style&&y.push(l.variant),l.weight!==l.variant&&l.weight!==l.style&&y.push(l.weight),l.stretch!==l.weight&&l.stretch!==l.variant&&l.stretch!==l.style&&y.push(l.stretch),y.push(l.size+(l.lineHeight==null||l.lineHeight==="normal"||l.lineHeight+""=="1"?"":"/"+l.lineHeight)),y.push(l.family),y.filter(Boolean).join(" ")};function a(u,l){if(u&&!l[u]&&!o[u])throw Error("Unknown keyword `"+u+"`");return u}function c(u){for(var l={},y=0;y<u.length;y++)l[u[y]]=1;return l}},27940:function(te,X,e){var A=e(81680),P=e(18496),o=e(87396),L=e(95920),M=e(50868),d=e(84323),g=Function.prototype.bind,r=Object.defineProperty,t=Object.prototype.hasOwnProperty,s;s=function(a,c,u){var l=P(c)&&o(c.value),y;return y=L(c),delete y.writable,delete y.value,y.get=function(){return!u.overwriteDefinition&&t.call(this,a)?l:(c.value=g.call(l,u.resolveContext?u.resolveContext(this):this),r(this,a,c),this[a])},y},te.exports=function(a){var c=M(arguments[1]);return A(c.resolveContext)&&o(c.resolveContext),d(a,function(u,l){return s(l,u,c)})}},21092:function(te,X,e){var A=e(81680),P=e(85488),o=e(38452),L=e(50868),M=e(71056),d=te.exports=function(g,r){var t,s,a,c,u;return arguments.length<2||typeof g!="string"?(c=r,r=g,g=null):c=arguments[2],A(g)?(t=M.call(g,"c"),s=M.call(g,"e"),a=M.call(g,"w")):(t=a=!0,s=!1),u={value:r,configurable:t,enumerable:s,writable:a},c?o(L(c),u):u};d.gs=function(g,r,t){var s,a,c,u;return typeof g!="string"?(c=t,t=r,r=g,g=null):c=arguments[3],A(r)?P(r)?A(t)?P(t)||(c=t,t=void 0):t=void 0:(c=r,r=t=void 0):r=void 0,A(g)?(s=M.call(g,"c"),a=M.call(g,"e")):(s=!0,a=!1),u={get:r,set:t,configurable:s,enumerable:a},c?o(L(c),u):u}},84706:function(te,X,e){e.d(X,{XE:function(){return A},kv:function(){return L},mo:function(){return d},Uf:function(){return g},SY:function(){return r},ik:function(){return t},oh:function(){return s}});function A(a,c){return a<c?-1:a>c?1:a>=c?0:NaN}function P(a){return a.length===1&&(a=o(a)),{left:function(c,u,l,y){for(l==null&&(l=0),y==null&&(y=c.length);l<y;){var h=l+y>>>1;a(c[h],u)<0?l=h+1:y=h}return l},right:function(c,u,l,y){for(l==null&&(l=0),y==null&&(y=c.length);l<y;){var h=l+y>>>1;a(c[h],u)>0?y=h:l=h+1}return l}}}function o(a){return function(c,u){return A(a(c),u)}}P(A);function L(a,c){var u=a.length,l=-1,y,h;if(c==null){for(;++l<u;)if((y=a[l])!=null&&y>=y)for(h=y;++l<u;)(y=a[l])!=null&&y>h&&(h=y)}else for(;++l<u;)if((y=c(a[l],l,a))!=null&&y>=y)for(h=y;++l<u;)(y=c(a[l],l,a))!=null&&y>h&&(h=y);return h}function M(a){return a===null?NaN:+a}function d(a,c){var u=a.length,l=u,y=-1,h,T=0;if(c==null)for(;++y<u;)isNaN(h=M(a[y]))?--l:T+=h;else for(;++y<u;)isNaN(h=M(c(a[y],y,a)))?--l:T+=h;if(l)return T/l}function g(a){for(var c=a.length,u,l=-1,y=0,h,T;++l<c;)y+=a[l].length;for(h=new Array(y);--c>=0;)for(T=a[c],u=T.length;--u>=0;)h[--y]=T[u];return h}function r(a,c){var u=a.length,l=-1,y,h;if(c==null){for(;++l<u;)if((y=a[l])!=null&&y>=y)for(h=y;++l<u;)(y=a[l])!=null&&h>y&&(h=y)}else for(;++l<u;)if((y=c(a[l],l,a))!=null&&y>=y)for(h=y;++l<u;)(y=c(a[l],l,a))!=null&&h>y&&(h=y);return h}function t(a,c,u){a=+a,c=+c,u=(y=arguments.length)<2?(c=a,a=0,1):y<3?1:+u;for(var l=-1,y=Math.max(0,Math.ceil((c-a)/u))|0,h=new Array(y);++l<y;)h[l]=a+l*u;return h}function s(a,c){var u=a.length,l=-1,y,h=0;if(c==null)for(;++l<u;)(y=+a[l])&&(h+=y);else for(;++l<u;)(y=+c(a[l],l,a))&&(h+=y);return h}},34712:function(te,X,e){e.d(X,{kH:function(){return L},UJ:function(){return M}});var A="$";function P(){}P.prototype=o.prototype={constructor:P,has:function(c){return A+c in this},get:function(c){return this[A+c]},set:function(c,u){return this[A+c]=u,this},remove:function(c){var u=A+c;return u in this&&delete this[u]},clear:function(){for(var c in this)c[0]===A&&delete this[c]},keys:function(){var c=[];for(var u in this)u[0]===A&&c.push(u.slice(1));return c},values:function(){var c=[];for(var u in this)u[0]===A&&c.push(this[u]);return c},entries:function(){var c=[];for(var u in this)u[0]===A&&c.push({key:u.slice(1),value:this[u]});return c},size:function(){var c=0;for(var u in this)u[0]===A&&++c;return c},empty:function(){for(var c in this)if(c[0]===A)return!1;return!0},each:function(c){for(var u in this)u[0]===A&&c(this[u],u.slice(1),this)}};function o(c,u){var l=new P;if(c instanceof P)c.each(function(n,v){l.set(v,n)});else if(Array.isArray(c)){var y=-1,h=c.length,T;if(u==null)for(;++y<h;)l.set(y,c[y]);else for(;++y<h;)l.set(u(T=c[y],y,c),T)}else if(c)for(var f in c)l.set(f,c[f]);return l}var L=o;function M(){var c=[],u=[],l,y,h;function T(n,v,m,b){if(v>=c.length)return l!=null&&n.sort(l),y!=null?y(n):n;for(var E=-1,p=n.length,S=c[v++],w,i,C=L(),x,k=m();++E<p;)(x=C.get(w=S(i=n[E])+""))?x.push(i):C.set(w,[i]);return C.each(function(I,B){b(k,B,T(I,v,m,b))}),k}function f(n,v){if(++v>c.length)return n;var m,b=u[v-1];return y!=null&&v>=c.length?m=n.entries():(m=[],n.each(function(E,p){m.push({key:p,values:f(E,v)})})),b!=null?m.sort(function(E,p){return b(E.key,p.key)}):m}return h={object:function(n){return T(n,0,d,g)},map:function(n){return T(n,0,r,t)},entries:function(n){return f(T(n,0,r,t),0)},key:function(n){return c.push(n),h},sortKeys:function(n){return u[c.length-1]=n,h},sortValues:function(n){return l=n,h},rollup:function(n){return y=n,h}}}function d(){return{}}function g(c,u,l){c[u]=l}function r(){return L()}function t(c,u,l){c.set(u,l)}function s(){}var a=L.prototype;s.prototype={constructor:s,has:a.has,add:function(c){return c+="",this[A+c]=c,this},remove:a.remove,clear:a.clear,values:a.keys,size:a.size,empty:a.empty,each:a.each}},49812:function(te,X,e){e.r(X),e.d(X,{forceCenter:function(){return A},forceCollide:function(){return C},forceLink:function(){return B},forceManyBody:function(){return Ne},forceRadial:function(){return et},forceSimulation:function(){return Ie},forceX:function(){return st},forceY:function(){return Ze}});function A(Ke,nt){var it;Ke==null&&(Ke=0),nt==null&&(nt=0);function lt(){var vt,xt=it.length,Je,Pe=0,Ue=0;for(vt=0;vt<xt;++vt)Je=it[vt],Pe+=Je.x,Ue+=Je.y;for(Pe=Pe/xt-Ke,Ue=Ue/xt-nt,vt=0;vt<xt;++vt)Je=it[vt],Je.x-=Pe,Je.y-=Ue}return lt.initialize=function(vt){it=vt},lt.x=function(vt){return arguments.length?(Ke=+vt,lt):Ke},lt.y=function(vt){return arguments.length?(nt=+vt,lt):nt},lt}function P(Ke){return function(){return Ke}}function o(){return(Math.random()-.5)*1e-6}function L(Ke){var nt=+this._x.call(null,Ke),it=+this._y.call(null,Ke);return M(this.cover(nt,it),nt,it,Ke)}function M(Ke,nt,it,lt){if(isNaN(nt)||isNaN(it))return Ke;var vt,xt=Ke._root,Je={data:lt},Pe=Ke._x0,Ue=Ke._y0,He=Ke._x1,Oe=Ke._y1,Ce,ge,pe,Te,be,ke,Ve,je;if(!xt)return Ke._root=Je,Ke;for(;xt.length;)if((be=nt>=(Ce=(Pe+He)/2))?Pe=Ce:He=Ce,(ke=it>=(ge=(Ue+Oe)/2))?Ue=ge:Oe=ge,vt=xt,!(xt=xt[Ve=ke<<1|be]))return vt[Ve]=Je,Ke;if(pe=+Ke._x.call(null,xt.data),Te=+Ke._y.call(null,xt.data),nt===pe&&it===Te)return Je.next=xt,vt?vt[Ve]=Je:Ke._root=Je,Ke;do vt=vt?vt[Ve]=new Array(4):Ke._root=new Array(4),(be=nt>=(Ce=(Pe+He)/2))?Pe=Ce:He=Ce,(ke=it>=(ge=(Ue+Oe)/2))?Ue=ge:Oe=ge;while((Ve=ke<<1|be)===(je=(Te>=ge)<<1|pe>=Ce));return vt[je]=xt,vt[Ve]=Je,Ke}function d(Ke){var nt,it,lt=Ke.length,vt,xt,Je=new Array(lt),Pe=new Array(lt),Ue=1/0,He=1/0,Oe=-1/0,Ce=-1/0;for(it=0;it<lt;++it)isNaN(vt=+this._x.call(null,nt=Ke[it]))||isNaN(xt=+this._y.call(null,nt))||(Je[it]=vt,Pe[it]=xt,vt<Ue&&(Ue=vt),vt>Oe&&(Oe=vt),xt<He&&(He=xt),xt>Ce&&(Ce=xt));if(Ue>Oe||He>Ce)return this;for(this.cover(Ue,He).cover(Oe,Ce),it=0;it<lt;++it)M(this,Je[it],Pe[it],Ke[it]);return this}function g(Ke,nt){if(isNaN(Ke=+Ke)||isNaN(nt=+nt))return this;var it=this._x0,lt=this._y0,vt=this._x1,xt=this._y1;if(isNaN(it))vt=(it=Math.floor(Ke))+1,xt=(lt=Math.floor(nt))+1;else{for(var Je=vt-it,Pe=this._root,Ue,He;it>Ke||Ke>=vt||lt>nt||nt>=xt;)switch(He=(nt<lt)<<1|Ke<it,Ue=new Array(4),Ue[He]=Pe,Pe=Ue,Je*=2,He){case 0:vt=it+Je,xt=lt+Je;break;case 1:it=vt-Je,xt=lt+Je;break;case 2:vt=it+Je,lt=xt-Je;break;case 3:it=vt-Je,lt=xt-Je;break}this._root&&this._root.length&&(this._root=Pe)}return this._x0=it,this._y0=lt,this._x1=vt,this._y1=xt,this}function r(){var Ke=[];return this.visit(function(nt){if(!nt.length)do Ke.push(nt.data);while(nt=nt.next)}),Ke}function t(Ke){return arguments.length?this.cover(+Ke[0][0],+Ke[0][1]).cover(+Ke[1][0],+Ke[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function s(Ke,nt,it,lt,vt){this.node=Ke,this.x0=nt,this.y0=it,this.x1=lt,this.y1=vt}function a(Ke,nt,it){var lt,vt=this._x0,xt=this._y0,Je,Pe,Ue,He,Oe=this._x1,Ce=this._y1,ge=[],pe=this._root,Te,be;for(pe&&ge.push(new s(pe,vt,xt,Oe,Ce)),it==null?it=1/0:(vt=Ke-it,xt=nt-it,Oe=Ke+it,Ce=nt+it,it*=it);Te=ge.pop();)if(!(!(pe=Te.node)||(Je=Te.x0)>Oe||(Pe=Te.y0)>Ce||(Ue=Te.x1)<vt||(He=Te.y1)<xt))if(pe.length){var ke=(Je+Ue)/2,Ve=(Pe+He)/2;ge.push(new s(pe[3],ke,Ve,Ue,He),new s(pe[2],Je,Ve,ke,He),new s(pe[1],ke,Pe,Ue,Ve),new s(pe[0],Je,Pe,ke,Ve)),(be=(nt>=Ve)<<1|Ke>=ke)&&(Te=ge[ge.length-1],ge[ge.length-1]=ge[ge.length-1-be],ge[ge.length-1-be]=Te)}else{var je=Ke-+this._x.call(null,pe.data),at=nt-+this._y.call(null,pe.data),ut=je*je+at*at;if(ut<it){var Nt=Math.sqrt(it=ut);vt=Ke-Nt,xt=nt-Nt,Oe=Ke+Nt,Ce=nt+Nt,lt=pe.data}}return lt}function c(Ke){if(isNaN(Oe=+this._x.call(null,Ke))||isNaN(Ce=+this._y.call(null,Ke)))return this;var nt,it=this._root,lt,vt,xt,Je=this._x0,Pe=this._y0,Ue=this._x1,He=this._y1,Oe,Ce,ge,pe,Te,be,ke,Ve;if(!it)return this;if(it.length)for(;;){if((Te=Oe>=(ge=(Je+Ue)/2))?Je=ge:Ue=ge,(be=Ce>=(pe=(Pe+He)/2))?Pe=pe:He=pe,nt=it,!(it=it[ke=be<<1|Te]))return this;if(!it.length)break;(nt[ke+1&3]||nt[ke+2&3]||nt[ke+3&3])&&(lt=nt,Ve=ke)}for(;it.data!==Ke;)if(vt=it,!(it=it.next))return this;return(xt=it.next)&&delete it.next,vt?(xt?vt.next=xt:delete vt.next,this):nt?(xt?nt[ke]=xt:delete nt[ke],(it=nt[0]||nt[1]||nt[2]||nt[3])&&it===(nt[3]||nt[2]||nt[1]||nt[0])&&!it.length&&(lt?lt[Ve]=it:this._root=it),this):(this._root=xt,this)}function u(Ke){for(var nt=0,it=Ke.length;nt<it;++nt)this.remove(Ke[nt]);return this}function l(){return this._root}function y(){var Ke=0;return this.visit(function(nt){if(!nt.length)do++Ke;while(nt=nt.next)}),Ke}function h(Ke){var nt=[],it,lt=this._root,vt,xt,Je,Pe,Ue;for(lt&&nt.push(new s(lt,this._x0,this._y0,this._x1,this._y1));it=nt.pop();)if(!Ke(lt=it.node,xt=it.x0,Je=it.y0,Pe=it.x1,Ue=it.y1)&&lt.length){var He=(xt+Pe)/2,Oe=(Je+Ue)/2;(vt=lt[3])&&nt.push(new s(vt,He,Oe,Pe,Ue)),(vt=lt[2])&&nt.push(new s(vt,xt,Oe,He,Ue)),(vt=lt[1])&&nt.push(new s(vt,He,Je,Pe,Oe)),(vt=lt[0])&&nt.push(new s(vt,xt,Je,He,Oe))}return this}function T(Ke){var nt=[],it=[],lt;for(this._root&&nt.push(new s(this._root,this._x0,this._y0,this._x1,this._y1));lt=nt.pop();){var vt=lt.node;if(vt.length){var xt,Je=lt.x0,Pe=lt.y0,Ue=lt.x1,He=lt.y1,Oe=(Je+Ue)/2,Ce=(Pe+He)/2;(xt=vt[0])&&nt.push(new s(xt,Je,Pe,Oe,Ce)),(xt=vt[1])&&nt.push(new s(xt,Oe,Pe,Ue,Ce)),(xt=vt[2])&&nt.push(new s(xt,Je,Ce,Oe,He)),(xt=vt[3])&&nt.push(new s(xt,Oe,Ce,Ue,He))}it.push(lt)}for(;lt=it.pop();)Ke(lt.node,lt.x0,lt.y0,lt.x1,lt.y1);return this}function f(Ke){return Ke[0]}function n(Ke){return arguments.length?(this._x=Ke,this):this._x}function v(Ke){return Ke[1]}function m(Ke){return arguments.length?(this._y=Ke,this):this._y}function b(Ke,nt,it){var lt=new E(nt??f,it??v,NaN,NaN,NaN,NaN);return Ke==null?lt:lt.addAll(Ke)}function E(Ke,nt,it,lt,vt,xt){this._x=Ke,this._y=nt,this._x0=it,this._y0=lt,this._x1=vt,this._y1=xt,this._root=void 0}function p(Ke){for(var nt={data:Ke.data},it=nt;Ke=Ke.next;)it=it.next={data:Ke.data};return nt}var S=b.prototype=E.prototype;S.copy=function(){var Ke=new E(this._x,this._y,this._x0,this._y0,this._x1,this._y1),nt=this._root,it,lt;if(!nt)return Ke;if(!nt.length)return Ke._root=p(nt),Ke;for(it=[{source:nt,target:Ke._root=new Array(4)}];nt=it.pop();)for(var vt=0;vt<4;++vt)(lt=nt.source[vt])&&(lt.length?it.push({source:lt,target:nt.target[vt]=new Array(4)}):nt.target[vt]=p(lt));return Ke},S.add=L,S.addAll=d,S.cover=g,S.data=r,S.extent=t,S.find=a,S.remove=c,S.removeAll=u,S.root=l,S.size=y,S.visit=h,S.visitAfter=T,S.x=n,S.y=m;function w(Ke){return Ke.x+Ke.vx}function i(Ke){return Ke.y+Ke.vy}function C(Ke){var nt,it,lt=1,vt=1;typeof Ke!="function"&&(Ke=P(Ke==null?1:+Ke));function xt(){for(var Ue,He=nt.length,Oe,Ce,ge,pe,Te,be,ke=0;ke<vt;++ke)for(Oe=b(nt,w,i).visitAfter(Je),Ue=0;Ue<He;++Ue)Ce=nt[Ue],Te=it[Ce.index],be=Te*Te,ge=Ce.x+Ce.vx,pe=Ce.y+Ce.vy,Oe.visit(Ve);function Ve(je,at,ut,Nt,Vt){var gt=je.data,Ct=je.r,Yt=Te+Ct;if(gt){if(gt.index>Ce.index){var gr=ge-gt.x-gt.vx,ht=pe-gt.y-gt.vy,Ht=gr*gr+ht*ht;Ht<Yt*Yt&&(gr===0&&(gr=o(),Ht+=gr*gr),ht===0&&(ht=o(),Ht+=ht*ht),Ht=(Yt-(Ht=Math.sqrt(Ht)))/Ht*lt,Ce.vx+=(gr*=Ht)*(Yt=(Ct*=Ct)/(be+Ct)),Ce.vy+=(ht*=Ht)*Yt,gt.vx-=gr*(Yt=1-Yt),gt.vy-=ht*Yt)}return}return at>ge+Yt||Nt<ge-Yt||ut>pe+Yt||Vt<pe-Yt}}function Je(Ue){if(Ue.data)return Ue.r=it[Ue.data.index];for(var He=Ue.r=0;He<4;++He)Ue[He]&&Ue[He].r>Ue.r&&(Ue.r=Ue[He].r)}function Pe(){if(nt){var Ue,He=nt.length,Oe;for(it=new Array(He),Ue=0;Ue<He;++Ue)Oe=nt[Ue],it[Oe.index]=+Ke(Oe,Ue,nt)}}return xt.initialize=function(Ue){nt=Ue,Pe()},xt.iterations=function(Ue){return arguments.length?(vt=+Ue,xt):vt},xt.strength=function(Ue){return arguments.length?(lt=+Ue,xt):lt},xt.radius=function(Ue){return arguments.length?(Ke=typeof Ue=="function"?Ue:P(+Ue),Pe(),xt):Ke},xt}var x=e(34712);function k(Ke){return Ke.index}function I(Ke,nt){var it=Ke.get(nt);if(!it)throw new Error("missing: "+nt);return it}function B(Ke){var nt=k,it=Oe,lt,vt=P(30),xt,Je,Pe,Ue,He=1;Ke==null&&(Ke=[]);function Oe(be){return 1/Math.min(Pe[be.source.index],Pe[be.target.index])}function Ce(be){for(var ke=0,Ve=Ke.length;ke<He;++ke)for(var je=0,at,ut,Nt,Vt,gt,Ct,Yt;je<Ve;++je)at=Ke[je],ut=at.source,Nt=at.target,Vt=Nt.x+Nt.vx-ut.x-ut.vx||o(),gt=Nt.y+Nt.vy-ut.y-ut.vy||o(),Ct=Math.sqrt(Vt*Vt+gt*gt),Ct=(Ct-xt[je])/Ct*be*lt[je],Vt*=Ct,gt*=Ct,Nt.vx-=Vt*(Yt=Ue[je]),Nt.vy-=gt*Yt,ut.vx+=Vt*(Yt=1-Yt),ut.vy+=gt*Yt}function ge(){if(Je){var be,ke=Je.length,Ve=Ke.length,je=(0,x.kH)(Je,nt),at;for(be=0,Pe=new Array(ke);be<Ve;++be)at=Ke[be],at.index=be,typeof at.source!="object"&&(at.source=I(je,at.source)),typeof at.target!="object"&&(at.target=I(je,at.target)),Pe[at.source.index]=(Pe[at.source.index]||0)+1,Pe[at.target.index]=(Pe[at.target.index]||0)+1;for(be=0,Ue=new Array(Ve);be<Ve;++be)at=Ke[be],Ue[be]=Pe[at.source.index]/(Pe[at.source.index]+Pe[at.target.index]);lt=new Array(Ve),pe(),xt=new Array(Ve),Te()}}function pe(){if(Je)for(var be=0,ke=Ke.length;be<ke;++be)lt[be]=+it(Ke[be],be,Ke)}function Te(){if(Je)for(var be=0,ke=Ke.length;be<ke;++be)xt[be]=+vt(Ke[be],be,Ke)}return Ce.initialize=function(be){Je=be,ge()},Ce.links=function(be){return arguments.length?(Ke=be,ge(),Ce):Ke},Ce.id=function(be){return arguments.length?(nt=be,Ce):nt},Ce.iterations=function(be){return arguments.length?(He=+be,Ce):He},Ce.strength=function(be){return arguments.length?(it=typeof be=="function"?be:P(+be),pe(),Ce):it},Ce.distance=function(be){return arguments.length?(vt=typeof be=="function"?be:P(+be),Te(),Ce):vt},Ce}var _={value:function(){}};function z(){for(var Ke=0,nt=arguments.length,it={},lt;Ke<nt;++Ke){if(!(lt=arguments[Ke]+"")||lt in it||/[\s.]/.test(lt))throw new Error("illegal type: "+lt);it[lt]=[]}return new O(it)}function O(Ke){this._=Ke}function F(Ke,nt){return Ke.trim().split(/^|\s+/).map(function(it){var lt="",vt=it.indexOf(".");if(vt>=0&&(lt=it.slice(vt+1),it=it.slice(0,vt)),it&&!nt.hasOwnProperty(it))throw new Error("unknown type: "+it);return{type:it,name:lt}})}O.prototype=z.prototype={constructor:O,on:function(Ke,nt){var it=this._,lt=F(Ke+"",it),vt,xt=-1,Je=lt.length;if(arguments.length<2){for(;++xt<Je;)if((vt=(Ke=lt[xt]).type)&&(vt=N(it[vt],Ke.name)))return vt;return}if(nt!=null&&typeof nt!="function")throw new Error("invalid callback: "+nt);for(;++xt<Je;)if(vt=(Ke=lt[xt]).type)it[vt]=V(it[vt],Ke.name,nt);else if(nt==null)for(vt in it)it[vt]=V(it[vt],Ke.name,null);return this},copy:function(){var Ke={},nt=this._;for(var it in nt)Ke[it]=nt[it].slice();return new O(Ke)},call:function(Ke,nt){if((vt=arguments.length-2)>0)for(var it=new Array(vt),lt=0,vt,xt;lt<vt;++lt)it[lt]=arguments[lt+2];if(!this._.hasOwnProperty(Ke))throw new Error("unknown type: "+Ke);for(xt=this._[Ke],lt=0,vt=xt.length;lt<vt;++lt)xt[lt].value.apply(nt,it)},apply:function(Ke,nt,it){if(!this._.hasOwnProperty(Ke))throw new Error("unknown type: "+Ke);for(var lt=this._[Ke],vt=0,xt=lt.length;vt<xt;++vt)lt[vt].value.apply(nt,it)}};function N(Ke,nt){for(var it=0,lt=Ke.length,vt;it<lt;++it)if((vt=Ke[it]).name===nt)return vt.value}function V(Ke,nt,it){for(var lt=0,vt=Ke.length;lt<vt;++lt)if(Ke[lt].name===nt){Ke[lt]=_,Ke=Ke.slice(0,lt).concat(Ke.slice(lt+1));break}return it!=null&&Ke.push({name:nt,value:it}),Ke}var j=z,$=0,q=0,oe=0,Z=1e3,G,re,H=0,J=0,ae=0,K=typeof performance=="object"&&performance.now?performance:Date,Y=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(Ke){setTimeout(Ke,17)};function ie(){return J||(Y(ne),J=K.now()+ae)}function ne(){J=0}function le(){this._call=this._time=this._next=null}le.prototype=de.prototype={constructor:le,restart:function(Ke,nt,it){if(typeof Ke!="function")throw new TypeError("callback is not a function");it=(it==null?ie():+it)+(nt==null?0:+nt),!this._next&&re!==this&&(re?re._next=this:G=this,re=this),this._call=Ke,this._time=it,Ae()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ae())}};function de(Ke,nt,it){var lt=new le;return lt.restart(Ke,nt,it),lt}function we(){ie(),++$;for(var Ke=G,nt;Ke;)(nt=J-Ke._time)>=0&&Ke._call.call(null,nt),Ke=Ke._next;--$}function me(){J=(H=K.now())+ae,$=q=0;try{we()}finally{$=0,ve(),J=0}}function Le(){var Ke=K.now(),nt=Ke-H;nt>Z&&(ae-=nt,H=Ke)}function ve(){for(var Ke,nt=G,it,lt=1/0;nt;)nt._call?(lt>nt._time&&(lt=nt._time),Ke=nt,nt=nt._next):(it=nt._next,nt._next=null,nt=Ke?Ke._next=it:G=it);re=Ke,Ae(lt)}function Ae(Ke){if(!$){q&&(q=clearTimeout(q));var nt=Ke-J;nt>24?(Ke<1/0&&(q=setTimeout(me,Ke-K.now()-ae)),oe&&(oe=clearInterval(oe))):(oe||(H=K.now(),oe=setInterval(Le,Z)),$=1,Y(me))}}function ye(Ke){return Ke.x}function Se(Ke){return Ke.y}var _e=10,ze=Math.PI*(3-Math.sqrt(5));function Ie(Ke){var nt,it=1,lt=.001,vt=1-Math.pow(lt,1/300),xt=0,Je=.6,Pe=(0,x.kH)(),Ue=de(Oe),He=j("tick","end");Ke==null&&(Ke=[]);function Oe(){Ce(),He.call("tick",nt),it<lt&&(Ue.stop(),He.call("end",nt))}function Ce(Te){var be,ke=Ke.length,Ve;Te===void 0&&(Te=1);for(var je=0;je<Te;++je)for(it+=(xt-it)*vt,Pe.each(function(at){at(it)}),be=0;be<ke;++be)Ve=Ke[be],Ve.fx==null?Ve.x+=Ve.vx*=Je:(Ve.x=Ve.fx,Ve.vx=0),Ve.fy==null?Ve.y+=Ve.vy*=Je:(Ve.y=Ve.fy,Ve.vy=0);return nt}function ge(){for(var Te=0,be=Ke.length,ke;Te<be;++Te){if(ke=Ke[Te],ke.index=Te,ke.fx!=null&&(ke.x=ke.fx),ke.fy!=null&&(ke.y=ke.fy),isNaN(ke.x)||isNaN(ke.y)){var Ve=_e*Math.sqrt(Te),je=Te*ze;ke.x=Ve*Math.cos(je),ke.y=Ve*Math.sin(je)}(isNaN(ke.vx)||isNaN(ke.vy))&&(ke.vx=ke.vy=0)}}function pe(Te){return Te.initialize&&Te.initialize(Ke),Te}return ge(),nt={tick:Ce,restart:function(){return Ue.restart(Oe),nt},stop:function(){return Ue.stop(),nt},nodes:function(Te){return arguments.length?(Ke=Te,ge(),Pe.each(pe),nt):Ke},alpha:function(Te){return arguments.length?(it=+Te,nt):it},alphaMin:function(Te){return arguments.length?(lt=+Te,nt):lt},alphaDecay:function(Te){return arguments.length?(vt=+Te,nt):+vt},alphaTarget:function(Te){return arguments.length?(xt=+Te,nt):xt},velocityDecay:function(Te){return arguments.length?(Je=1-Te,nt):1-Je},force:function(Te,be){return arguments.length>1?(be==null?Pe.remove(Te):Pe.set(Te,pe(be)),nt):Pe.get(Te)},find:function(Te,be,ke){var Ve=0,je=Ke.length,at,ut,Nt,Vt,gt;for(ke==null?ke=1/0:ke*=ke,Ve=0;Ve<je;++Ve)Vt=Ke[Ve],at=Te-Vt.x,ut=be-Vt.y,Nt=at*at+ut*ut,Nt<ke&&(gt=Vt,ke=Nt);return gt},on:function(Te,be){return arguments.length>1?(He.on(Te,be),nt):He.on(Te)}}}function Ne(){var Ke,nt,it,lt=P(-30),vt,xt=1,Je=1/0,Pe=.81;function Ue(ge){var pe,Te=Ke.length,be=b(Ke,ye,Se).visitAfter(Oe);for(it=ge,pe=0;pe<Te;++pe)nt=Ke[pe],be.visit(Ce)}function He(){if(Ke){var ge,pe=Ke.length,Te;for(vt=new Array(pe),ge=0;ge<pe;++ge)Te=Ke[ge],vt[Te.index]=+lt(Te,ge,Ke)}}function Oe(ge){var pe=0,Te,be,ke=0,Ve,je,at;if(ge.length){for(Ve=je=at=0;at<4;++at)(Te=ge[at])&&(be=Math.abs(Te.value))&&(pe+=Te.value,ke+=be,Ve+=be*Te.x,je+=be*Te.y);ge.x=Ve/ke,ge.y=je/ke}else{Te=ge,Te.x=Te.data.x,Te.y=Te.data.y;do pe+=vt[Te.data.index];while(Te=Te.next)}ge.value=pe}function Ce(ge,pe,Te,be){if(!ge.value)return!0;var ke=ge.x-nt.x,Ve=ge.y-nt.y,je=be-pe,at=ke*ke+Ve*Ve;if(je*je/Pe<at)return at<Je&&(ke===0&&(ke=o(),at+=ke*ke),Ve===0&&(Ve=o(),at+=Ve*Ve),at<xt&&(at=Math.sqrt(xt*at)),nt.vx+=ke*ge.value*it/at,nt.vy+=Ve*ge.value*it/at),!0;if(ge.length||at>=Je)return;(ge.data!==nt||ge.next)&&(ke===0&&(ke=o(),at+=ke*ke),Ve===0&&(Ve=o(),at+=Ve*Ve),at<xt&&(at=Math.sqrt(xt*at)));do ge.data!==nt&&(je=vt[ge.data.index]*it/at,nt.vx+=ke*je,nt.vy+=Ve*je);while(ge=ge.next)}return Ue.initialize=function(ge){Ke=ge,He()},Ue.strength=function(ge){return arguments.length?(lt=typeof ge=="function"?ge:P(+ge),He(),Ue):lt},Ue.distanceMin=function(ge){return arguments.length?(xt=ge*ge,Ue):Math.sqrt(xt)},Ue.distanceMax=function(ge){return arguments.length?(Je=ge*ge,Ue):Math.sqrt(Je)},Ue.theta=function(ge){return arguments.length?(Pe=ge*ge,Ue):Math.sqrt(Pe)},Ue}function et(Ke,nt,it){var lt,vt=P(.1),xt,Je;typeof Ke!="function"&&(Ke=P(+Ke)),nt==null&&(nt=0),it==null&&(it=0);function Pe(He){for(var Oe=0,Ce=lt.length;Oe<Ce;++Oe){var ge=lt[Oe],pe=ge.x-nt||1e-6,Te=ge.y-it||1e-6,be=Math.sqrt(pe*pe+Te*Te),ke=(Je[Oe]-be)*xt[Oe]*He/be;ge.vx+=pe*ke,ge.vy+=Te*ke}}function Ue(){if(lt){var He,Oe=lt.length;for(xt=new Array(Oe),Je=new Array(Oe),He=0;He<Oe;++He)Je[He]=+Ke(lt[He],He,lt),xt[He]=isNaN(Je[He])?0:+vt(lt[He],He,lt)}}return Pe.initialize=function(He){lt=He,Ue()},Pe.strength=function(He){return arguments.length?(vt=typeof He=="function"?He:P(+He),Ue(),Pe):vt},Pe.radius=function(He){return arguments.length?(Ke=typeof He=="function"?He:P(+He),Ue(),Pe):Ke},Pe.x=function(He){return arguments.length?(nt=+He,Pe):nt},Pe.y=function(He){return arguments.length?(it=+He,Pe):it},Pe}function st(Ke){var nt=P(.1),it,lt,vt;typeof Ke!="function"&&(Ke=P(Ke==null?0:+Ke));function xt(Pe){for(var Ue=0,He=it.length,Oe;Ue<He;++Ue)Oe=it[Ue],Oe.vx+=(vt[Ue]-Oe.x)*lt[Ue]*Pe}function Je(){if(it){var Pe,Ue=it.length;for(lt=new Array(Ue),vt=new Array(Ue),Pe=0;Pe<Ue;++Pe)lt[Pe]=isNaN(vt[Pe]=+Ke(it[Pe],Pe,it))?0:+nt(it[Pe],Pe,it)}}return xt.initialize=function(Pe){it=Pe,Je()},xt.strength=function(Pe){return arguments.length?(nt=typeof Pe=="function"?Pe:P(+Pe),Je(),xt):nt},xt.x=function(Pe){return arguments.length?(Ke=typeof Pe=="function"?Pe:P(+Pe),Je(),xt):Ke},xt}function Ze(Ke){var nt=P(.1),it,lt,vt;typeof Ke!="function"&&(Ke=P(Ke==null?0:+Ke));function xt(Pe){for(var Ue=0,He=it.length,Oe;Ue<He;++Ue)Oe=it[Ue],Oe.vy+=(vt[Ue]-Oe.y)*lt[Ue]*Pe}function Je(){if(it){var Pe,Ue=it.length;for(lt=new Array(Ue),vt=new Array(Ue),Pe=0;Pe<Ue;++Pe)lt[Pe]=isNaN(vt[Pe]=+Ke(it[Pe],Pe,it))?0:+nt(it[Pe],Pe,it)}}return xt.initialize=function(Pe){it=Pe,Je()},xt.strength=function(Pe){return arguments.length?(nt=typeof Pe=="function"?Pe:P(+Pe),Je(),xt):nt},xt.y=function(Pe){return arguments.length?(Ke=typeof Pe=="function"?Pe:P(+Pe),Je(),xt):Ke},xt}},57624:function(te,X,e){e.d(X,{E9:function(){return n},SO:function(){return T}});function A(m){return Math.abs(m=Math.round(m))>=1e21?m.toLocaleString("en").replace(/,/g,""):m.toString(10)}function P(m,b){if((E=(m=b?m.toExponential(b-1):m.toExponential()).indexOf("e"))<0)return null;var E,p=m.slice(0,E);return[p.length>1?p[0]+p.slice(2):p,+m.slice(E+1)]}function o(m){return m=P(Math.abs(m)),m?m[1]:NaN}function L(m,b){return function(E,p){for(var S=E.length,w=[],i=0,C=m[0],x=0;S>0&&C>0&&(x+C+1>p&&(C=Math.max(1,p-x)),w.push(E.substring(S-=C,S+C)),!((x+=C+1)>p));)C=m[i=(i+1)%m.length];return w.reverse().join(b)}}function M(m){return function(b){return b.replace(/[0-9]/g,function(E){return m[+E]})}}var d=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function g(m){if(!(b=d.exec(m)))throw new Error("invalid format: "+m);var b;return new r({fill:b[1],align:b[2],sign:b[3],symbol:b[4],zero:b[5],width:b[6],comma:b[7],precision:b[8]&&b[8].slice(1),trim:b[9],type:b[10]})}g.prototype=r.prototype;function r(m){this.fill=m.fill===void 0?" ":m.fill+"",this.align=m.align===void 0?">":m.align+"",this.sign=m.sign===void 0?"-":m.sign+"",this.symbol=m.symbol===void 0?"":m.symbol+"",this.zero=!!m.zero,this.width=m.width===void 0?void 0:+m.width,this.comma=!!m.comma,this.precision=m.precision===void 0?void 0:+m.precision,this.trim=!!m.trim,this.type=m.type===void 0?"":m.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function t(m){e:for(var b=m.length,E=1,p=-1,S;E<b;++E)switch(m[E]){case".":p=S=E;break;case"0":p===0&&(p=E),S=E;break;default:if(!+m[E])break e;p>0&&(p=0);break}return p>0?m.slice(0,p)+m.slice(S+1):m}var s;function a(m,b){var E=P(m,b);if(!E)return m+"";var p=E[0],S=E[1],w=S-(s=Math.max(-8,Math.min(8,Math.floor(S/3)))*3)+1,i=p.length;return w===i?p:w>i?p+new Array(w-i+1).join("0"):w>0?p.slice(0,w)+"."+p.slice(w):"0."+new Array(1-w).join("0")+P(m,Math.max(0,b+w-1))[0]}function c(m,b){var E=P(m,b);if(!E)return m+"";var p=E[0],S=E[1];return S<0?"0."+new Array(-S).join("0")+p:p.length>S+1?p.slice(0,S+1)+"."+p.slice(S+1):p+new Array(S-p.length+2).join("0")}var u={"%":function(m,b){return(m*100).toFixed(b)},b:function(m){return Math.round(m).toString(2)},c:function(m){return m+""},d:A,e:function(m,b){return m.toExponential(b)},f:function(m,b){return m.toFixed(b)},g:function(m,b){return m.toPrecision(b)},o:function(m){return Math.round(m).toString(8)},p:function(m,b){return c(m*100,b)},r:c,s:a,X:function(m){return Math.round(m).toString(16).toUpperCase()},x:function(m){return Math.round(m).toString(16)}};function l(m){return m}var y=Array.prototype.map,h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T(m){var b=m.grouping===void 0||m.thousands===void 0?l:L(y.call(m.grouping,Number),m.thousands+""),E=m.currency===void 0?"":m.currency[0]+"",p=m.currency===void 0?"":m.currency[1]+"",S=m.decimal===void 0?".":m.decimal+"",w=m.numerals===void 0?l:M(y.call(m.numerals,String)),i=m.percent===void 0?"%":m.percent+"",C=m.minus===void 0?"-":m.minus+"",x=m.nan===void 0?"NaN":m.nan+"";function k(B){B=g(B);var _=B.fill,z=B.align,O=B.sign,F=B.symbol,N=B.zero,V=B.width,j=B.comma,$=B.precision,q=B.trim,oe=B.type;oe==="n"?(j=!0,oe="g"):u[oe]||($===void 0&&($=12),q=!0,oe="g"),(N||_==="0"&&z==="=")&&(N=!0,_="0",z="=");var Z=F==="$"?E:F==="#"&&/[boxX]/.test(oe)?"0"+oe.toLowerCase():"",G=F==="$"?p:/[%p]/.test(oe)?i:"",re=u[oe],H=/[defgprs%]/.test(oe);$=$===void 0?6:/[gprs]/.test(oe)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function J(ae){var K=Z,Y=G,ie,ne,le;if(oe==="c")Y=re(ae)+Y,ae="";else{ae=+ae;var de=ae<0||1/ae<0;if(ae=isNaN(ae)?x:re(Math.abs(ae),$),q&&(ae=t(ae)),de&&+ae==0&&O!=="+"&&(de=!1),K=(de?O==="("?O:C:O==="-"||O==="("?"":O)+K,Y=(oe==="s"?h[8+s/3]:"")+Y+(de&&O==="("?")":""),H){for(ie=-1,ne=ae.length;++ie<ne;)if(le=ae.charCodeAt(ie),48>le||le>57){Y=(le===46?S+ae.slice(ie+1):ae.slice(ie))+Y,ae=ae.slice(0,ie);break}}}j&&!N&&(ae=b(ae,1/0));var we=K.length+ae.length+Y.length,me=we<V?new Array(V-we+1).join(_):"";switch(j&&N&&(ae=b(me+ae,me.length?V-Y.length:1/0),me=""),z){case"<":ae=K+ae+Y+me;break;case"=":ae=K+me+ae+Y;break;case"^":ae=me.slice(0,we=me.length>>1)+K+ae+Y+me.slice(we);break;default:ae=me+K+ae+Y;break}return w(ae)}return J.toString=function(){return B+""},J}function I(B,_){var z=k((B=g(B),B.type="f",B)),O=Math.max(-8,Math.min(8,Math.floor(o(_)/3)))*3,F=Math.pow(10,-O),N=h[8+O/3];return function(V){return z(F*V)+N}}return{format:k,formatPrefix:I}}var f,n;v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function v(m){return f=T(m),n=f.format,f.formatPrefix,f}},87108:function(te,X,e){e.r(X),e.d(X,{geoAiry:function(){return N},geoAiryRaw:function(){return F},geoAitoff:function(){return j},geoAitoffRaw:function(){return V},geoArmadillo:function(){return q},geoArmadilloRaw:function(){return $},geoAugust:function(){return Z},geoAugustRaw:function(){return oe},geoBaker:function(){return J},geoBakerRaw:function(){return H},geoBerghaus:function(){return Y},geoBerghausRaw:function(){return K},geoBertin1953:function(){return ve},geoBertin1953Raw:function(){return Le},geoBoggs:function(){return et},geoBoggsRaw:function(){return Ne},geoBonne:function(){return it},geoBonneRaw:function(){return nt},geoBottomley:function(){return vt},geoBottomleyRaw:function(){return lt},geoBromley:function(){return Je},geoBromleyRaw:function(){return xt},geoChamberlin:function(){return be},geoChamberlinAfrica:function(){return Te},geoChamberlinRaw:function(){return ge},geoCollignon:function(){return Ve},geoCollignonRaw:function(){return ke},geoCraig:function(){return at},geoCraigRaw:function(){return je},geoCraster:function(){return Vt},geoCrasterRaw:function(){return Nt},geoCylindricalEqualArea:function(){return Ct},geoCylindricalEqualAreaRaw:function(){return gt},geoCylindricalStereographic:function(){return gr},geoCylindricalStereographicRaw:function(){return Yt},geoEckert1:function(){return Ht},geoEckert1Raw:function(){return ht},geoEckert2:function(){return cr},geoEckert2Raw:function(){return Wt},geoEckert3:function(){return ct},geoEckert3Raw:function(){return er},geoEckert4:function(){return dt},geoEckert4Raw:function(){return qe},geoEckert5:function(){return Et},geoEckert5Raw:function(){return bt},geoEckert6:function(){return _t},geoEckert6Raw:function(){return Mt},geoEisenlohr:function(){return nr},geoEisenlohrRaw:function(){return Gt},geoFahey:function(){return Be},geoFaheyRaw:function(){return ir},geoFoucaut:function(){return Rt},geoFoucautRaw:function(){return Fe},geoFoucautSinusoidal:function(){return Ut},geoFoucautSinusoidalRaw:function(){return Lt},geoGilbert:function(){return sr},geoGingery:function(){return Or},geoGingeryRaw:function(){return fr},geoGinzburg4:function(){return sn},geoGinzburg4Raw:function(){return Ar},geoGinzburg5:function(){return bn},geoGinzburg5Raw:function(){return Jr},geoGinzburg6:function(){return or},geoGinzburg6Raw:function(){return xn},geoGinzburg8:function(){return Br},geoGinzburg8Raw:function(){return Lr},geoGinzburg9:function(){return Qr},geoGinzburg9Raw:function(){return _r},geoGringorten:function(){return Kn},geoGringortenQuincuncial:function(){return mf},geoGringortenRaw:function(){return ln},geoGuyou:function(){return fn},geoGuyouRaw:function(){return pr},geoHammer:function(){return de},geoHammerRaw:function(){return ne},geoHammerRetroazimuthal:function(){return In},geoHammerRetroazimuthalRaw:function(){return pn},geoHealpix:function(){return en},geoHealpixRaw:function(){return yr},geoHill:function(){return Vr},geoHillRaw:function(){return br},geoHomolosine:function(){return kn},geoHomolosineRaw:function(){return Tn},geoHufnagel:function(){return fa},geoHufnagelRaw:function(){return Pn},geoHyperelliptical:function(){return ni},geoHyperellipticalRaw:function(){return ba},geoInterrupt:function(){return Oi},geoInterruptedBoggs:function(){return jl},geoInterruptedHomolosine:function(){return Ga},geoInterruptedMollweide:function(){return Kl},geoInterruptedMollweideHemispheres:function(){return $i},geoInterruptedQuarticAuthalic:function(){return ts},geoInterruptedSinuMollweide:function(){return Ll},geoInterruptedSinusoidal:function(){return Rs},geoKavrayskiy7:function(){return Ci},geoKavrayskiy7Raw:function(){return Ti},geoLagrange:function(){return Bi},geoLagrangeRaw:function(){return Ds},geoLarrivee:function(){return wu},geoLarriveeRaw:function(){return fo},geoLaskowski:function(){return nf},geoLaskowskiRaw:function(){return io},geoLittrow:function(){return ki},geoLittrowRaw:function(){return _o},geoLoximuthal:function(){return es},geoLoximuthalRaw:function(){return Jl},geoMiller:function(){return Ql},geoMillerRaw:function(){return zo},geoModifiedStereographic:function(){return ds},geoModifiedStereographicAlaska:function(){return $l},geoModifiedStereographicGs48:function(){return uf},geoModifiedStereographicGs50:function(){return ff},geoModifiedStereographicLee:function(){return Mu},geoModifiedStereographicMiller:function(){return Au},geoModifiedStereographicRaw:function(){return Tu},geoMollweide:function(){return _e},geoMollweideRaw:function(){return Se},geoMtFlatPolarParabolic:function(){return Su},geoMtFlatPolarParabolicRaw:function(){return tl},geoMtFlatPolarQuartic:function(){return cf},geoMtFlatPolarQuarticRaw:function(){return Wo},geoMtFlatPolarSinusoidal:function(){return Eu},geoMtFlatPolarSinusoidalRaw:function(){return Rl},geoNaturalEarth:function(){return Cu.c},geoNaturalEarth2:function(){return bo},geoNaturalEarth2Raw:function(){return Dl},geoNaturalEarthRaw:function(){return Cu.g},geoNellHammer:function(){return ps},geoNellHammerRaw:function(){return ks},geoNicolosi:function(){return ql},geoNicolosiRaw:function(){return Fo},geoPatterson:function(){return Os},geoPattersonRaw:function(){return kl},geoPeirceQuincuncial:function(){return ku},geoPierceQuincuncial:function(){return ku},geoPolyconic:function(){return vf},geoPolyconicRaw:function(){return _l},geoPolyhedral:function(){return ai},geoPolyhedralButterfly:function(){return al},geoPolyhedralCollignon:function(){return ys},geoPolyhedralWaterman:function(){return ns},geoProject:function(){return gf},geoQuantize:function(){return _u},geoQuincuncial:function(){return Zo},geoRectangularPolyconic:function(){return zu},geoRectangularPolyconicRaw:function(){return ou},geoRobinson:function(){return as},geoRobinsonRaw:function(){return Eo},geoSatellite:function(){return ms},geoSatelliteRaw:function(){return Bl},geoSinuMollweide:function(){return wn},geoSinuMollweideRaw:function(){return dn},geoSinusoidal:function(){return Ke},geoSinusoidalRaw:function(){return Ze},geoStitch:function(){return cl},geoTimes:function(){return Li},geoTimesRaw:function(){return ss},geoTwoPointAzimuthal:function(){return Vl},geoTwoPointAzimuthalRaw:function(){return lu},geoTwoPointAzimuthalUsa:function(){return bs},geoTwoPointEquidistant:function(){return Bu},geoTwoPointEquidistantRaw:function(){return hl},geoTwoPointEquidistantUsa:function(){return xf},geoVanDerGrinten:function(){return vl},geoVanDerGrinten2:function(){return Nu},geoVanDerGrinten2Raw:function(){return Xs},geoVanDerGrinten3:function(){return bf},geoVanDerGrinten3Raw:function(){return ls},geoVanDerGrinten4:function(){return dl},geoVanDerGrinten4Raw:function(){return oo},geoVanDerGrintenRaw:function(){return ji},geoWagner:function(){return us},geoWagner4:function(){return Uu},geoWagner4Raw:function(){return Gl},geoWagner6:function(){return fu},geoWagner6Raw:function(){return ml},geoWagner7:function(){return uu},geoWagnerRaw:function(){return Jo},geoWiechel:function(){return cu},geoWiechelRaw:function(){return ws},geoWinkel3:function(){return Vu},geoWinkel3Raw:function(){return xl}});var A=e(87952),P=Math.abs,o=Math.atan,L=Math.atan2,M=Math.cos,d=Math.exp,g=Math.floor,r=Math.log,t=Math.max,s=Math.min,a=Math.pow,c=Math.round,u=Math.sign||function(We){return We>0?1:We<0?-1:0},l=Math.sin,y=Math.tan,h=1e-6,T=1e-12,f=Math.PI,n=f/2,v=f/4,m=Math.SQRT1_2,b=k(2),E=k(f),p=f*2,S=180/f,w=f/180;function i(We){return We?We/Math.sin(We):1}function C(We){return We>1?n:We<-1?-n:Math.asin(We)}function x(We){return We>1?0:We<-1?f:Math.acos(We)}function k(We){return We>0?Math.sqrt(We):0}function I(We){return We=d(2*We),(We-1)/(We+1)}function B(We){return(d(We)-d(-We))/2}function _(We){return(d(We)+d(-We))/2}function z(We){return r(We+k(We*We+1))}function O(We){return r(We+k(We*We-1))}function F(We){var $e=y(We/2),ft=2*r(M(We/2))/($e*$e);function pt(Pt,St){var kt=M(Pt),ur=M(St),dr=l(St),$t=ur*kt,mr=-((1-$t?r((1+$t)/2)/(1-$t):-.5)+ft/(1+$t));return[mr*ur*l(Pt),mr*dr]}return pt.invert=function(Pt,St){var kt=k(Pt*Pt+St*St),ur=-We/2,dr=50,$t;if(!kt)return[0,0];do{var mr=ur/2,Er=M(mr),Ir=l(mr),Kr=Ir/Er,hn=-r(P(Er));ur-=$t=(2/Kr*hn-ft*Kr-kt)/(-hn/(Ir*Ir)+1-ft/(2*Er*Er))*(Er<0?.7:1)}while(P($t)>h&&--dr>0);var An=l(ur);return[L(Pt*An,kt*M(ur)),C(St*An/kt)]},pt}function N(){var We=n,$e=(0,A.U)(F),ft=$e(We);return ft.radius=function(pt){return arguments.length?$e(We=pt*w):We*S},ft.scale(179.976).clipAngle(147)}function V(We,$e){var ft=M($e),pt=i(x(ft*M(We/=2)));return[2*ft*l(We)*pt,l($e)*pt]}V.invert=function(We,$e){if(!(We*We+4*$e*$e>f*f+h)){var ft=We,pt=$e,Pt=25;do{var St=l(ft),kt=l(ft/2),ur=M(ft/2),dr=l(pt),$t=M(pt),mr=l(2*pt),Er=dr*dr,Ir=$t*$t,Kr=kt*kt,hn=1-Ir*ur*ur,An=hn?x($t*ur)*k(Sn=1/hn):Sn=0,Sn,Un=2*An*$t*kt-We,wa=An*dr-$e,Ta=Sn*(Ir*Kr+An*$t*ur*Er),Aa=Sn*(.5*St*mr-An*2*dr*kt),Ca=Sn*.25*(mr*kt-An*dr*Ir*St),Oa=Sn*(Er*ur+An*Kr*$t),ri=Aa*Ca-Oa*Ta;if(!ri)break;var wi=(wa*Aa-Un*Oa)/ri,se=(Un*Ca-wa*Ta)/ri;ft-=wi,pt-=se}while((P(wi)>h||P(se)>h)&&--Pt>0);return[ft,pt]}};function j(){return(0,A.c)(V).scale(152.63)}function $(We){var $e=l(We),ft=M(We),pt=We>=0?1:-1,Pt=y(pt*We),St=(1+$e-ft)/2;function kt(ur,dr){var $t=M(dr),mr=M(ur/=2);return[(1+$t)*l(ur),(pt*dr>-L(mr,Pt)-.001?0:-pt*10)+St+l(dr)*ft-(1+$t)*$e*mr]}return kt.invert=function(ur,dr){var $t=0,mr=0,Er=50;do{var Ir=M($t),Kr=l($t),hn=M(mr),An=l(mr),Sn=1+hn,Un=Sn*Kr-ur,wa=St+An*ft-Sn*$e*Ir-dr,Ta=Sn*Ir/2,Aa=-Kr*An,Ca=$e*Sn*Kr/2,Oa=ft*hn+$e*Ir*An,ri=Aa*Ca-Oa*Ta,wi=(wa*Aa-Un*Oa)/ri/2,se=(Un*Ca-wa*Ta)/ri;P(se)>2&&(se/=2),$t-=wi,mr-=se}while((P(wi)>h||P(se)>h)&&--Er>0);return pt*mr>-L(M($t),Pt)-.001?[$t*2,mr]:null},kt}function q(){var We=20*w,$e=We>=0?1:-1,ft=y($e*We),pt=(0,A.U)($),Pt=pt(We),St=Pt.stream;return Pt.parallel=function(kt){return arguments.length?(ft=y(($e=(We=kt*w)>=0?1:-1)*We),pt(We)):We*S},Pt.stream=function(kt){var ur=Pt.rotate(),dr=St(kt),$t=(Pt.rotate([0,0]),St(kt)),mr=Pt.precision();return Pt.rotate(ur),dr.sphere=function(){$t.polygonStart(),$t.lineStart();for(var Er=$e*-180;$e*Er<180;Er+=$e*90)$t.point(Er,$e*90);if(We)for(;$e*(Er-=3*$e*mr)>=-180;)$t.point(Er,$e*-L(M(Er*w/2),ft)*S);$t.lineEnd(),$t.polygonEnd()},dr},Pt.scale(218.695).center([0,28.0974])}function oe(We,$e){var ft=y($e/2),pt=k(1-ft*ft),Pt=1+pt*M(We/=2),St=l(We)*pt/Pt,kt=ft/Pt,ur=St*St,dr=kt*kt;return[1.3333333333333333*St*(3+ur-3*dr),1.3333333333333333*kt*(3+3*ur-dr)]}oe.invert=function(We,$e){if(We*=.375,$e*=.375,!We&&P($e)>1)return null;var ft=We*We,pt=$e*$e,Pt=1+ft+pt,St=k((Pt-k(Pt*Pt-4*$e*$e))/2),kt=C(St)/3,ur=St?O(P($e/St))/3:z(P(We))/3,dr=M(kt),$t=_(ur),mr=$t*$t-dr*dr;return[u(We)*2*L(B(ur)*dr,.25-mr),u($e)*2*L($t*l(kt),.25+mr)]};function Z(){return(0,A.c)(oe).scale(66.1603)}var G=k(8),re=r(1+b);function H(We,$e){var ft=P($e);return ft<v?[We,r(y(v+$e/2))]:[We*M(ft)*(2*b-1/l(ft)),u($e)*(2*b*(ft-v)-r(y(ft/2)))]}H.invert=function(We,$e){if((St=P($e))<re)return[We,2*o(d($e))-n];var ft=v,pt=25,Pt,St;do{var kt=M(ft/2),ur=y(ft/2);ft-=Pt=(G*(ft-v)-r(ur)-St)/(G-kt*kt/(2*ur))}while(P(Pt)>T&&--pt>0);return[We/(M(ft)*(G-1/l(ft))),u($e)*ft]};function J(){return(0,A.c)(H).scale(112.314)}var ae=e(69020);function K(We){var $e=2*f/We;function ft(pt,Pt){var St=(0,ae.O)(pt,Pt);if(P(pt)>n){var kt=L(St[1],St[0]),ur=k(St[0]*St[0]+St[1]*St[1]),dr=$e*c((kt-n)/$e)+n,$t=L(l(kt-=dr),2-M(kt));kt=dr+C(f/ur*l($t))-$t,St[0]=ur*M(kt),St[1]=ur*l(kt)}return St}return ft.invert=function(pt,Pt){var St=k(pt*pt+Pt*Pt);if(St>n){var kt=L(Pt,pt),ur=$e*c((kt-n)/$e)+n,dr=kt>ur?-1:1,$t=St*M(ur-kt),mr=1/y(dr*x(($t-f)/k(f*(f-2*$t)+St*St)));kt=ur+2*o((mr+dr*k(mr*mr-3))/3),pt=St*M(kt),Pt=St*l(kt)}return ae.O.invert(pt,Pt)},ft}function Y(){var We=5,$e=(0,A.U)(K),ft=$e(We),pt=ft.stream,Pt=.01,St=-M(Pt*w),kt=l(Pt*w);return ft.lobes=function(ur){return arguments.length?$e(We=+ur):We},ft.stream=function(ur){var dr=ft.rotate(),$t=pt(ur),mr=(ft.rotate([0,0]),pt(ur));return ft.rotate(dr),$t.sphere=function(){mr.polygonStart(),mr.lineStart();for(var Er=0,Ir=360/We,Kr=2*f/We,hn=90-180/We,An=n;Er<We;++Er,hn-=Ir,An-=Kr)mr.point(L(kt*M(An),St)*S,C(kt*l(An))*S),hn<-90?(mr.point(-90,-180-hn-Pt),mr.point(-90,-180-hn+Pt)):(mr.point(90,hn+Pt),mr.point(90,hn-Pt));mr.lineEnd(),mr.polygonEnd()},$t},ft.scale(87.8076).center([0,17.1875]).clipAngle(179.999)}var ie=e(54724);function ne(We,$e){if(arguments.length<2&&($e=We),$e===1)return ie.y;if($e===1/0)return le;function ft(pt,Pt){var St=(0,ie.y)(pt/$e,Pt);return St[0]*=We,St}return ft.invert=function(pt,Pt){var St=ie.y.invert(pt/We,Pt);return St[0]*=$e,St},ft}function le(We,$e){return[We*M($e)/M($e/=2),2*l($e)]}le.invert=function(We,$e){var ft=2*C($e/2);return[We*M(ft/2)/M(ft),ft]};function de(){var We=2,$e=(0,A.U)(ne),ft=$e(We);return ft.coefficient=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(169.529)}function we(We,$e,ft){var pt=100,Pt,St,kt;ft=ft===void 0?0:+ft,$e=+$e;do St=We(ft),kt=We(ft+h),St===kt&&(kt=St+h),ft-=Pt=-1*h*(St-$e)/(St-kt);while(pt-- >0&&P(Pt)>h);return pt<0?NaN:ft}function me(We,$e,ft){return $e===void 0&&($e=40),ft===void 0&&(ft=T),function(pt,Pt,St,kt){var ur,dr,$t;St=St===void 0?0:+St,kt=kt===void 0?0:+kt;for(var mr=0;mr<$e;mr++){var Er=We(St,kt),Ir=Er[0]-pt,Kr=Er[1]-Pt;if(P(Ir)<ft&&P(Kr)<ft)break;var hn=Ir*Ir+Kr*Kr;if(hn>ur){St-=dr/=2,kt-=$t/=2;continue}ur=hn;var An=(St>0?-1:1)*ft,Sn=(kt>0?-1:1)*ft,Un=We(St+An,kt),wa=We(St,kt+Sn),Ta=(Un[0]-Er[0])/An,Aa=(Un[1]-Er[1])/An,Ca=(wa[0]-Er[0])/Sn,Oa=(wa[1]-Er[1])/Sn,ri=Oa*Ta-Aa*Ca,wi=(P(ri)<.5?.5:1)/ri;if(dr=(Kr*Ca-Ir*Oa)*wi,$t=(Ir*Aa-Kr*Ta)*wi,St+=dr,kt+=$t,P(dr)<ft&&P($t)<ft)break}return[St,kt]}}function Le(){var We=ne(1.68,2),$e=1.4,ft=12;function pt(Pt,St){if(Pt+St<-1.4){var kt=(Pt-St+1.6)*(Pt+St+$e)/8;Pt+=kt,St-=.8*kt*l(St+f/2)}var ur=We(Pt,St),dr=(1-M(Pt*St))/ft;return ur[1]<0&&(ur[0]*=1+dr),ur[1]>0&&(ur[1]*=1+dr/1.5*ur[0]*ur[0]),ur}return pt.invert=me(pt),pt}function ve(){return(0,A.c)(Le()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ae(We,$e){var ft=We*l($e),pt=30,Pt;do $e-=Pt=($e+l($e)-ft)/(1+M($e));while(P(Pt)>h&&--pt>0);return $e/2}function ye(We,$e,ft){function pt(Pt,St){return[We*Pt*M(St=Ae(ft,St)),$e*l(St)]}return pt.invert=function(Pt,St){return St=C(St/$e),[Pt/(We*M(St)),C((2*St+l(2*St))/ft)]},pt}var Se=ye(b/n,b,f);function _e(){return(0,A.c)(Se).scale(169.529)}var ze=2.00276,Ie=1.11072;function Ne(We,$e){var ft=Ae(f,$e);return[ze*We/(1/M($e)+Ie/M(ft)),($e+b*l(ft))/ze]}Ne.invert=function(We,$e){var ft=ze*$e,pt=$e<0?-v:v,Pt=25,St,kt;do kt=ft-b*l(pt),pt-=St=(l(2*pt)+2*pt-f*l(kt))/(2*M(2*pt)+2+f*M(kt)*b*M(pt));while(P(St)>h&&--Pt>0);return kt=ft-b*l(pt),[We*(1/M(kt)+Ie/M(pt))/ze,kt]};function et(){return(0,A.c)(Ne).scale(160.857)}function st(We){var $e=0,ft=(0,A.U)(We),pt=ft($e);return pt.parallel=function(Pt){return arguments.length?ft($e=Pt*w):$e*S},pt}function Ze(We,$e){return[We*M($e),$e]}Ze.invert=function(We,$e){return[We/M($e),$e]};function Ke(){return(0,A.c)(Ze).scale(152.63)}function nt(We){if(!We)return Ze;var $e=1/y(We);function ft(pt,Pt){var St=$e+We-Pt,kt=St&&pt*M(Pt)/St;return[St*l(kt),$e-St*M(kt)]}return ft.invert=function(pt,Pt){var St=k(pt*pt+(Pt=$e-Pt)*Pt),kt=$e+We-St;return[St/M(kt)*L(pt,Pt),kt]},ft}function it(){return st(nt).scale(123.082).center([0,26.1441]).parallel(45)}function lt(We){function $e(ft,pt){var Pt=n-pt,St=Pt&&ft*We*l(Pt)/Pt;return[Pt*l(St)/We,n-Pt*M(St)]}return $e.invert=function(ft,pt){var Pt=ft*We,St=n-pt,kt=k(Pt*Pt+St*St),ur=L(Pt,St);return[(kt?kt/l(kt):1)*ur/We,n-kt]},$e}function vt(){var We=.5,$e=(0,A.U)(lt),ft=$e(We);return ft.fraction=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(158.837)}var xt=ye(1,4/f,f);function Je(){return(0,A.c)(xt).scale(152.63)}var Pe=e(24052),Ue=e(92992);function He(We,$e,ft,pt,Pt,St){var kt=M(St),ur;if(P(We)>1||P(St)>1)ur=x(ft*Pt+$e*pt*kt);else{var dr=l(We/2),$t=l(St/2);ur=2*C(k(dr*dr+$e*pt*$t*$t))}return P(ur)>h?[ur,L(pt*l(St),$e*Pt-ft*pt*kt)]:[0,0]}function Oe(We,$e,ft){return x((We*We+$e*$e-ft*ft)/(2*We*$e))}function Ce(We){return We-2*f*g((We+f)/(2*f))}function ge(We,$e,ft){for(var pt=[[We[0],We[1],l(We[1]),M(We[1])],[$e[0],$e[1],l($e[1]),M($e[1])],[ft[0],ft[1],l(ft[1]),M(ft[1])]],Pt=pt[2],St,kt=0;kt<3;++kt,Pt=St)St=pt[kt],Pt.v=He(St[1]-Pt[1],Pt[3],Pt[2],St[3],St[2],St[0]-Pt[0]),Pt.point=[0,0];var ur=Oe(pt[0].v[0],pt[2].v[0],pt[1].v[0]),dr=Oe(pt[0].v[0],pt[1].v[0],pt[2].v[0]),$t=f-ur;pt[2].point[1]=0,pt[0].point[0]=-(pt[1].point[0]=pt[0].v[0]/2);var mr=[pt[2].point[0]=pt[0].point[0]+pt[2].v[0]*M(ur),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*l(ur))];function Er(Ir,Kr){var hn=l(Kr),An=M(Kr),Sn=new Array(3),Un;for(Un=0;Un<3;++Un){var wa=pt[Un];if(Sn[Un]=He(Kr-wa[1],wa[3],wa[2],An,hn,Ir-wa[0]),!Sn[Un][0])return wa.point;Sn[Un][1]=Ce(Sn[Un][1]-wa.v[1])}var Ta=mr.slice();for(Un=0;Un<3;++Un){var Aa=Un==2?0:Un+1,Ca=Oe(pt[Un].v[0],Sn[Un][0],Sn[Aa][0]);Sn[Un][1]<0&&(Ca=-Ca),Un?Un==1?(Ca=dr-Ca,Ta[0]-=Sn[Un][0]*M(Ca),Ta[1]-=Sn[Un][0]*l(Ca)):(Ca=$t-Ca,Ta[0]+=Sn[Un][0]*M(Ca),Ta[1]+=Sn[Un][0]*l(Ca)):(Ta[0]+=Sn[Un][0]*M(Ca),Ta[1]-=Sn[Un][0]*l(Ca))}return Ta[0]/=3,Ta[1]/=3,Ta}return Er}function pe(We){return We[0]*=w,We[1]*=w,We}function Te(){return be([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function be(We,$e,ft){var pt=(0,Pe.c)({type:"MultiPoint",coordinates:[We,$e,ft]}),Pt=[-pt[0],-pt[1]],St=(0,Ue.c)(Pt),kt=ge(pe(St(We)),pe(St($e)),pe(St(ft)));kt.invert=me(kt);var ur=(0,A.c)(kt).rotate(Pt),dr=ur.center;return delete ur.rotate,ur.center=function($t){return arguments.length?dr(St($t)):St.invert(dr())},ur.clipAngle(90)}function ke(We,$e){var ft=k(1-l($e));return[2/E*We*ft,E*(1-ft)]}ke.invert=function(We,$e){var ft=(ft=$e/E-1)*ft;return[ft>0?We*k(f/ft)/2:0,C(1-ft)]};function Ve(){return(0,A.c)(ke).scale(95.6464).center([0,30])}function je(We){var $e=y(We);function ft(pt,Pt){return[pt,(pt?pt/l(pt):1)*(l(Pt)*M(pt)-$e*M(Pt))]}return ft.invert=$e?function(pt,Pt){pt&&(Pt*=l(pt)/pt);var St=M(pt);return[pt,2*L(k(St*St+$e*$e-Pt*Pt)-St,$e-Pt)]}:function(pt,Pt){return[pt,C(pt?Pt*y(pt)/pt:Pt)]},ft}function at(){return st(je).scale(249.828).clipAngle(90)}var ut=k(3);function Nt(We,$e){return[ut*We*(2*M(2*$e/3)-1)/E,ut*E*l($e/3)]}Nt.invert=function(We,$e){var ft=3*C($e/(ut*E));return[E*We/(ut*(2*M(2*ft/3)-1)),ft]};function Vt(){return(0,A.c)(Nt).scale(156.19)}function gt(We){var $e=M(We);function ft(pt,Pt){return[pt*$e,l(Pt)/$e]}return ft.invert=function(pt,Pt){return[pt/$e,C(Pt*$e)]},ft}function Ct(){return st(gt).parallel(38.58).scale(195.044)}function Yt(We){var $e=M(We);function ft(pt,Pt){return[pt*$e,(1+$e)*y(Pt/2)]}return ft.invert=function(pt,Pt){return[pt/$e,o(Pt/(1+$e))*2]},ft}function gr(){return st(Yt).scale(124.75)}function ht(We,$e){var ft=k(8/(3*f));return[ft*We*(1-P($e)/f),ft*$e]}ht.invert=function(We,$e){var ft=k(8/(3*f)),pt=$e/ft;return[We/(ft*(1-P(pt)/f)),pt]};function Ht(){return(0,A.c)(ht).scale(165.664)}function Wt(We,$e){var ft=k(4-3*l(P($e)));return[2/k(6*f)*We*ft,u($e)*k(2*f/3)*(2-ft)]}Wt.invert=function(We,$e){var ft=2-P($e)/k(2*f/3);return[We*k(6*f)/(2*ft),u($e)*C((4-ft*ft)/3)]};function cr(){return(0,A.c)(Wt).scale(165.664)}function er(We,$e){var ft=k(f*(4+f));return[2/ft*We*(1+k(1-4*$e*$e/(f*f))),4/ft*$e]}er.invert=function(We,$e){var ft=k(f*(4+f))/2;return[We*ft/(1+k(1-$e*$e*(4+f)/(4*f))),$e*ft/2]};function ct(){return(0,A.c)(er).scale(180.739)}function qe(We,$e){var ft=(2+n)*l($e);$e/=2;for(var pt=0,Pt=1/0;pt<10&&P(Pt)>h;pt++){var St=M($e);$e-=Pt=($e+l($e)*(St+2)-ft)/(2*St*(1+St))}return[2/k(f*(4+f))*We*(1+M($e)),2*k(f/(4+f))*l($e)]}qe.invert=function(We,$e){var ft=$e*k((4+f)/f)/2,pt=C(ft),Pt=M(pt);return[We/(2/k(f*(4+f))*(1+Pt)),C((pt+ft*(Pt+2))/(2+n))]};function dt(){return(0,A.c)(qe).scale(180.739)}function bt(We,$e){return[We*(1+M($e))/k(2+f),2*$e/k(2+f)]}bt.invert=function(We,$e){var ft=k(2+f),pt=$e*ft/2;return[ft*We/(1+M(pt)),pt]};function Et(){return(0,A.c)(bt).scale(173.044)}function Mt(We,$e){for(var ft=(1+n)*l($e),pt=0,Pt=1/0;pt<10&&P(Pt)>h;pt++)$e-=Pt=($e+l($e)-ft)/(1+M($e));return ft=k(2+f),[We*(1+M($e))/ft,2*$e/ft]}Mt.invert=function(We,$e){var ft=1+n,pt=k(ft/2);return[We*2*pt/(1+M($e*=pt)),C(($e+l($e))/ft)]};function _t(){return(0,A.c)(Mt).scale(173.044)}var It=3+2*b;function Gt(We,$e){var ft=l(We/=2),pt=M(We),Pt=k(M($e)),St=M($e/=2),kt=l($e)/(St+b*pt*Pt),ur=k(2/(1+kt*kt)),dr=k((b*St+(pt+ft)*Pt)/(b*St+(pt-ft)*Pt));return[It*(ur*(dr-1/dr)-2*r(dr)),It*(ur*kt*(dr+1/dr)-2*o(kt))]}Gt.invert=function(We,$e){if(!(St=oe.invert(We/1.2,$e*1.065)))return null;var ft=St[0],pt=St[1],Pt=20,St;We/=It,$e/=It;do{var kt=ft/2,ur=pt/2,dr=l(kt),$t=M(kt),mr=l(ur),Er=M(ur),Ir=M(pt),Kr=k(Ir),hn=mr/(Er+b*$t*Kr),An=hn*hn,Sn=k(2/(1+An)),Un=b*Er+($t+dr)*Kr,wa=b*Er+($t-dr)*Kr,Ta=Un/wa,Aa=k(Ta),Ca=Aa-1/Aa,Oa=Aa+1/Aa,ri=Sn*Ca-2*r(Aa)-We,wi=Sn*hn*Oa-2*o(hn)-$e,se=mr&&m*Kr*dr*An/mr,Me=(b*$t*Er+Kr)/(2*(Er+b*$t*Kr)*(Er+b*$t*Kr)*Kr),De=-.5*hn*Sn*Sn*Sn,Xe=De*se,Qe=De*Me,rt=(rt=2*Er+b*Kr*($t-dr))*rt*Aa,Tt=(b*$t*Er*Kr+Ir)/rt,yt=-(b*dr*mr)/(Kr*rt),Ft=Ca*Xe-2*Tt/Aa+Sn*(Tt+Tt/Ta),Ot=Ca*Qe-2*yt/Aa+Sn*(yt+yt/Ta),jt=hn*Oa*Xe-2*se/(1+An)+Sn*Oa*se+Sn*hn*(Tt-Tt/Ta),wr=hn*Oa*Qe-2*Me/(1+An)+Sn*Oa*Me+Sn*hn*(yt-yt/Ta),Tr=Ot*jt-wr*Ft;if(!Tr)break;var Wr=(wi*Ot-ri*wr)/Tr,qr=(ri*jt-wi*Ft)/Tr;ft-=Wr,pt=t(-n,s(n,pt-qr))}while((P(Wr)>h||P(qr)>h)&&--Pt>0);return P(P(pt)-n)<h?[0,pt]:Pt&&[ft,pt]};function nr(){return(0,A.c)(Gt).scale(62.5271)}var ar=M(35*w);function ir(We,$e){var ft=y($e/2);return[We*ar*k(1-ft*ft),(1+ar)*ft]}ir.invert=function(We,$e){var ft=$e/(1+ar);return[We&&We/(ar*k(1-ft*ft)),2*o(ft)]};function Be(){return(0,A.c)(ir).scale(137.152)}function Fe(We,$e){var ft=$e/2,pt=M(ft);return[2*We/E*M($e)*pt*pt,E*y(ft)]}Fe.invert=function(We,$e){var ft=o($e/E),pt=M(ft),Pt=2*ft;return[We*E/2/(M(Pt)*pt*pt),Pt]};function Rt(){return(0,A.c)(Fe).scale(135.264)}function Lt(We){var $e=1-We,ft=St(f,0)[0]-St(-f,0)[0],pt=St(0,n)[1]-St(0,-n)[1],Pt=k(2*pt/ft);function St(dr,$t){var mr=M($t),Er=l($t);return[mr/($e+We*mr)*dr,$e*$t+We*Er]}function kt(dr,$t){var mr=St(dr,$t);return[mr[0]*Pt,mr[1]/Pt]}function ur(dr){return kt(0,dr)[1]}return kt.invert=function(dr,$t){var mr=we(ur,$t),Er=dr/Pt*(We+$e/M(mr));return[Er,mr]},kt}function Ut(){var We=.5,$e=(0,A.U)(Lt),ft=$e(We);return ft.alpha=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(168.725)}var Qt=e(4888),rr=e(69604);function Kt(We){return[We[0]/2,C(y(We[1]/2*w))*S]}function Dt(We){return[We[0]*2,2*o(l(We[1]*w))*S]}function sr(We){We==null&&(We=Qt.c);var $e=We(),ft=(0,rr.c)().scale(S).precision(0).clipAngle(null).translate([0,0]);function pt(St){return $e(Kt(St))}$e.invert&&(pt.invert=function(St){return Dt($e.invert(St))}),pt.stream=function(St){var kt=$e.stream(St),ur=ft.stream({point:function(dr,$t){kt.point(dr/2,C(y(-$t/2*w))*S)},lineStart:function(){kt.lineStart()},lineEnd:function(){kt.lineEnd()},polygonStart:function(){kt.polygonStart()},polygonEnd:function(){kt.polygonEnd()}});return ur.sphere=kt.sphere,ur};function Pt(St){pt[St]=function(){return arguments.length?($e[St].apply($e,arguments),pt):$e[St]()}}return pt.rotate=function(St){return arguments.length?(ft.rotate(St),pt):ft.rotate()},pt.center=function(St){return arguments.length?($e.center(Kt(St)),pt):Dt($e.center())},Pt("angle"),Pt("clipAngle"),Pt("clipExtent"),Pt("fitExtent"),Pt("fitHeight"),Pt("fitSize"),Pt("fitWidth"),Pt("scale"),Pt("translate"),Pt("precision"),pt.scale(249.5)}function fr(We,$e){var ft=2*f/$e,pt=We*We;function Pt(St,kt){var ur=(0,ae.O)(St,kt),dr=ur[0],$t=ur[1],mr=dr*dr+$t*$t;if(mr>pt){var Er=k(mr),Ir=L($t,dr),Kr=ft*c(Ir/ft),hn=Ir-Kr,An=We*M(hn),Sn=(We*l(hn)-hn*l(An))/(n-An),Un=vr(hn,Sn),wa=(f-We)/lr(Un,An,f);dr=Er;var Ta=50,Aa;do dr-=Aa=(We+lr(Un,An,dr)*wa-Er)/(Un(dr)*wa);while(P(Aa)>h&&--Ta>0);$t=hn*l(dr),dr<n&&($t-=Sn*(dr-n));var Ca=l(Kr),Oa=M(Kr);ur[0]=dr*Oa-$t*Ca,ur[1]=dr*Ca+$t*Oa}return ur}return Pt.invert=function(St,kt){var ur=St*St+kt*kt;if(ur>pt){var dr=k(ur),$t=L(kt,St),mr=ft*c($t/ft),Er=$t-mr;St=dr*M(Er),kt=dr*l(Er);for(var Ir=St-n,Kr=l(St),hn=kt/Kr,An=St<n?1/0:0,Sn=10;;){var Un=We*l(hn),wa=We*M(hn),Ta=l(wa),Aa=n-wa,Ca=(Un-hn*Ta)/Aa,Oa=vr(hn,Ca);if(P(An)<T||!--Sn)break;hn-=An=(hn*Kr-Ca*Ir-kt)/(Kr-Ir*2*(Aa*(wa+hn*Un*M(wa)-Ta)-Un*(Un-hn*Ta))/(Aa*Aa))}dr=We+lr(Oa,wa,St)*(f-We)/lr(Oa,wa,f),$t=mr+hn,St=dr*M($t),kt=dr*l($t)}return ae.O.invert(St,kt)},Pt}function vr(We,$e){return function(ft){var pt=We*M(ft);return ft<n&&(pt-=$e),k(1+pt*pt)}}function lr(We,$e,ft){for(var pt=50,Pt=(ft-$e)/pt,St=We($e)+We(ft),kt=1,ur=$e;kt<pt;++kt)St+=2*We(ur+=Pt);return St*.5*Pt}function Or(){var We=6,$e=30*w,ft=M($e),pt=l($e),Pt=(0,A.U)(fr),St=Pt($e,We),kt=St.stream,ur=.01,dr=-M(ur*w),$t=l(ur*w);return St.radius=function(mr){return arguments.length?(ft=M($e=mr*w),pt=l($e),Pt($e,We)):$e*S},St.lobes=function(mr){return arguments.length?Pt($e,We=+mr):We},St.stream=function(mr){var Er=St.rotate(),Ir=kt(mr),Kr=(St.rotate([0,0]),kt(mr));return St.rotate(Er),Ir.sphere=function(){Kr.polygonStart(),Kr.lineStart();for(var hn=0,An=2*f/We,Sn=0;hn<We;++hn,Sn-=An)Kr.point(L($t*M(Sn),dr)*S,C($t*l(Sn))*S),Kr.point(L(pt*M(Sn-An/2),ft)*S,C(pt*l(Sn-An/2))*S);Kr.lineEnd(),Kr.polygonEnd()},Ir},St.rotate([90,-40]).scale(91.7095).clipAngle(179.999)}function Sr(We,$e,ft,pt,Pt,St,kt,ur){arguments.length<8&&(ur=0);function dr($t,mr){if(!mr)return[We*$t/f,0];var Er=mr*mr,Ir=We+Er*($e+Er*(ft+Er*pt)),Kr=mr*(Pt-1+Er*(St-ur+Er*kt)),hn=(Ir*Ir+Kr*Kr)/(2*Kr),An=$t*C(Ir/hn)/f;return[hn*l(An),mr*(1+Er*ur)+hn*(1-M(An))]}return dr.invert=function($t,mr){var Er=f*$t/We,Ir=mr,Kr,hn,An=50;do{var Sn=Ir*Ir,Un=We+Sn*($e+Sn*(ft+Sn*pt)),wa=Ir*(Pt-1+Sn*(St-ur+Sn*kt)),Ta=Un*Un+wa*wa,Aa=2*wa,Ca=Ta/Aa,Oa=Ca*Ca,ri=C(Un/Ca)/f,wi=Er*ri,se=Un*Un,Me=(2*$e+Sn*(4*ft+Sn*6*pt))*Ir,De=Pt+Sn*(3*St+Sn*5*kt),Xe=2*(Un*Me+wa*(De-1)),Qe=2*(De-1),rt=(Xe*Aa-Ta*Qe)/(Aa*Aa),Tt=M(wi),yt=l(wi),Ft=Ca*Tt,Ot=Ca*yt,jt=Er/f*(1/k(1-se/Oa))*(Me*Ca-Un*rt)/Oa,wr=Ot-$t,Tr=Ir*(1+Sn*ur)+Ca-Ft-mr,Wr=rt*yt+Ft*jt,qr=Ft*ri,Mr=1+rt-(rt*Tt-Ot*jt),kr=Ot*ri,Hr=Wr*kr-Mr*qr;if(!Hr)break;Er-=Kr=(Tr*Wr-wr*Mr)/Hr,Ir-=hn=(wr*kr-Tr*qr)/Hr}while((P(Kr)>h||P(hn)>h)&&--An>0);return[Er,Ir]},dr}var Ar=Sr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function sn(){return(0,A.c)(Ar).scale(149.995)}var Jr=Sr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function bn(){return(0,A.c)(Jr).scale(153.93)}var xn=Sr(5/6*f,-.62636,-.0344,0,1.3493,-.05524,0,.045);function or(){return(0,A.c)(xn).scale(130.945)}function Lr(We,$e){var ft=We*We,pt=$e*$e;return[We*(1-.162388*pt)*(.87-952426e-9*ft*ft),$e*(1+pt/12)]}Lr.invert=function(We,$e){var ft=We,pt=$e,Pt=50,St;do{var kt=pt*pt;pt-=St=(pt*(1+kt/12)-$e)/(1+kt/4)}while(P(St)>h&&--Pt>0);Pt=50,We/=1-.162388*kt;do{var ur=(ur=ft*ft)*ur;ft-=St=(ft*(.87-952426e-9*ur)-We)/(.87-.00476213*ur)}while(P(St)>h&&--Pt>0);return[ft,pt]};function Br(){return(0,A.c)(Lr).scale(131.747)}var _r=Sr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Qr(){return(0,A.c)(_r).scale(131.087)}function un(We){var $e=We(n,0)[0]-We(-n,0)[0];function ft(pt,Pt){var St=pt>0?-.5:.5,kt=We(pt+St*f,Pt);return kt[0]-=St*$e,kt}return We.invert&&(ft.invert=function(pt,Pt){var St=pt>0?-.5:.5,kt=We.invert(pt+St*$e,Pt),ur=kt[0]-St*f;return ur<-f?ur+=2*f:ur>f&&(ur-=2*f),kt[0]=ur,kt}),ft}function ln(We,$e){var ft=u(We),pt=u($e),Pt=M($e),St=M(We)*Pt,kt=l(We)*Pt,ur=l(pt*$e);We=P(L(kt,ur)),$e=C(St),P(We-n)>h&&(We%=n);var dr=Mn(We>f/4?n-We:We,$e);return We>f/4&&(ur=dr[0],dr[0]=-dr[1],dr[1]=-ur),dr[0]*=ft,dr[1]*=-pt,dr}ln.invert=function(We,$e){P(We)>1&&(We=u(We)*2-We),P($e)>1&&($e=u($e)*2-$e);var ft=u(We),pt=u($e),Pt=-ft*We,St=-pt*$e,kt=St/Pt<1,ur=Dn(kt?St:Pt,kt?Pt:St),dr=ur[0],$t=ur[1],mr=M($t);return kt&&(dr=-n-dr),[ft*(L(l(dr)*mr,-l($t))+f),pt*C(M(dr)*mr)]};function Mn(We,$e){if($e===n)return[0,0];var ft=l($e),pt=ft*ft,Pt=pt*pt,St=1+Pt,kt=1+3*Pt,ur=1-Pt,dr=C(1/k(St)),$t=ur+pt*St*dr,mr=(1-ft)/$t,Er=k(mr),Ir=mr*St,Kr=k(Ir),hn=Er*ur,An,Sn;if(We===0)return[0,-(hn+pt*Kr)];var Un=M($e),wa=1/Un,Ta=2*ft*Un,Aa=(-3*pt+dr*kt)*Ta,Ca=(-$t*Un-(1-ft)*Aa)/($t*$t),Oa=.5*Ca/Er,ri=ur*Oa-2*pt*Er*Ta,wi=pt*St*Ca+mr*kt*Ta,se=-wa*Ta,Me=-wa*wi,De=-2*wa*ri,Xe=4*We/f,Qe;if(We>.222*f||$e<f/4&&We>.175*f){if(An=(hn+pt*k(Ir*(1+Pt)-hn*hn))/(1+Pt),We>f/4)return[An,An];var rt=An,Tt=.5*An;An=.5*(Tt+rt),Sn=50;do{var yt=k(Ir-An*An),Ft=An*(De+se*yt)+Me*C(An/Kr)-Xe;if(!Ft)break;Ft<0?Tt=An:rt=An,An=.5*(Tt+rt)}while(P(rt-Tt)>h&&--Sn>0)}else{An=h,Sn=25;do{var Ot=An*An,jt=k(Ir-Ot),wr=De+se*jt,Tr=An*wr+Me*C(An/Kr)-Xe,Wr=wr+(Me-se*Ot)/jt;An-=Qe=jt?Tr/Wr:0}while(P(Qe)>h&&--Sn>0)}return[An,-hn-pt*k(Ir-An*An)]}function Dn(We,$e){for(var ft=0,pt=1,Pt=.5,St=50;;){var kt=Pt*Pt,ur=k(Pt),dr=C(1/k(1+kt)),$t=1-kt+Pt*(1+kt)*dr,mr=(1-ur)/$t,Er=k(mr),Ir=mr*(1+kt),Kr=Er*(1-kt),hn=Ir-We*We,An=k(hn),Sn=$e+Kr+Pt*An;if(P(pt-ft)<T||--St===0||Sn===0)break;Sn>0?ft=Pt:pt=Pt,Pt=.5*(ft+pt)}if(!St)return null;var Un=C(ur),wa=M(Un),Ta=1/wa,Aa=2*ur*wa,Ca=(-3*Pt+dr*(1+3*kt))*Aa,Oa=(-$t*wa-(1-ur)*Ca)/($t*$t),ri=.5*Oa/Er,wi=(1-kt)*ri-2*Pt*Er*Aa,se=-2*Ta*wi,Me=-Ta*Aa,De=-Ta*(Pt*(1+kt)*Oa+mr*(1+3*kt)*Aa);return[f/4*(We*(se+Me*An)+De*C(We/k(Ir))),Un]}function Kn(){return(0,A.c)(un(ln)).scale(239.75)}function sa(We,$e,ft){var pt,Pt,St;return We?(pt=na(We,ft),$e?(Pt=na($e,1-ft),St=Pt[1]*Pt[1]+ft*pt[0]*pt[0]*Pt[0]*Pt[0],[[pt[0]*Pt[2]/St,pt[1]*pt[2]*Pt[0]*Pt[1]/St],[pt[1]*Pt[1]/St,-pt[0]*pt[2]*Pt[0]*Pt[2]/St],[pt[2]*Pt[1]*Pt[2]/St,-ft*pt[0]*pt[1]*Pt[0]/St]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Pt=na($e,1-ft),[[0,Pt[0]/Pt[1]],[1/Pt[1],0],[Pt[2]/Pt[1],0]])}function na(We,$e){var ft,pt,Pt,St,kt;if($e<h)return St=l(We),pt=M(We),ft=$e*(We-St*pt)/4,[St-ft*pt,pt+ft*St,1-$e*St*St/2,We-ft];if($e>=1-h)return ft=(1-$e)/4,pt=_(We),St=I(We),Pt=1/pt,kt=pt*B(We),[St+ft*(kt-We)/(pt*pt),Pt-ft*St*Pt*(kt-We),Pt+ft*St*Pt*(kt+We),2*o(d(We))-n+ft*(kt-We)/pt];var ur=[1,0,0,0,0,0,0,0,0],dr=[k($e),0,0,0,0,0,0,0,0],$t=0;for(pt=k(1-$e),kt=1;P(dr[$t]/ur[$t])>h&&$t<8;)ft=ur[$t++],dr[$t]=(ft-pt)/2,ur[$t]=(ft+pt)/2,pt=k(ft*pt),kt*=2;Pt=kt*ur[$t]*We;do St=dr[$t]*l(pt=Pt)/ur[$t],Pt=(C(St)+Pt)/2;while(--$t);return[l(Pt),St=M(Pt),St/M(Pt-pt),Pt]}function Jn(We,$e,ft){var pt=P(We),Pt=P($e),St=B(Pt);if(pt){var kt=1/l(pt),ur=1/(y(pt)*y(pt)),dr=-(ur+ft*(St*St*kt*kt)-1+ft),$t=(ft-1)*ur,mr=(-dr+k(dr*dr-4*$t))/2;return[aa(o(1/k(mr)),ft)*u(We),aa(o(k((mr/ur-1)/ft)),1-ft)*u($e)]}return[0,aa(o(St),1-ft)*u($e)]}function aa(We,$e){if(!$e)return We;if($e===1)return r(y(We/2+v));for(var ft=1,pt=k(1-$e),Pt=k($e),St=0;P(Pt)>h;St++){if(We%f){var kt=o(pt*y(We)/ft);kt<0&&(kt+=f),We+=kt+~~(We/f)*f}else We+=We;Pt=(ft+pt)/2,pt=k(ft*pt),Pt=((ft=Pt)-pt)/2}return We/(a(2,St)*ft)}function pr(We,$e){var ft=(b-1)/(b+1),pt=k(1-ft*ft),Pt=aa(n,pt*pt),St=-1,kt=r(y(f/4+P($e)/2)),ur=d(St*kt)/k(ft),dr=$r(ur*M(St*We),ur*l(St*We)),$t=Jn(dr[0],dr[1],pt*pt);return[-$t[1],($e>=0?1:-1)*(.5*Pt-$t[0])]}function $r(We,$e){var ft=We*We,pt=$e+1,Pt=1-ft-$e*$e;return[.5*((We>=0?n:-n)-L(Pt,2*We)),-.25*r(Pt*Pt+4*ft)+.5*r(pt*pt+ft)]}function Xr(We,$e){var ft=$e[0]*$e[0]+$e[1]*$e[1];return[(We[0]*$e[0]+We[1]*$e[1])/ft,(We[1]*$e[0]-We[0]*$e[1])/ft]}pr.invert=function(We,$e){var ft=(b-1)/(b+1),pt=k(1-ft*ft),Pt=aa(n,pt*pt),St=-1,kt=sa(.5*Pt-$e,-We,pt*pt),ur=Xr(kt[0],kt[1]),dr=L(ur[1],ur[0])/St;return[dr,2*o(d(.5/St*r(ft*ur[0]*ur[0]+ft*ur[1]*ur[1])))-n]};function fn(){return(0,A.c)(un(pr)).scale(151.496)}var zn=e(61780);function pn(We){var $e=l(We),ft=M(We),pt=gn(We);pt.invert=gn(-We);function Pt(St,kt){var ur=pt(St,kt);St=ur[0],kt=ur[1];var dr=l(kt),$t=M(kt),mr=M(St),Er=x($e*dr+ft*$t*mr),Ir=l(Er),Kr=P(Ir)>h?Er/Ir:1;return[Kr*ft*l(St),(P(St)>n?Kr:-Kr)*($e*$t-ft*dr*mr)]}return Pt.invert=function(St,kt){var ur=k(St*St+kt*kt),dr=-l(ur),$t=M(ur),mr=ur*$t,Er=-kt*dr,Ir=ur*$e,Kr=k(mr*mr+Er*Er-Ir*Ir),hn=L(mr*Ir+Er*Kr,Er*Ir-mr*Kr),An=(ur>n?-1:1)*L(St*dr,ur*M(hn)*$t+kt*l(hn)*dr);return pt.invert(An,hn)},Pt}function gn(We){var $e=l(We),ft=M(We);return function(pt,Pt){var St=M(Pt),kt=M(pt)*St,ur=l(pt)*St,dr=l(Pt);return[L(ur,kt*ft-dr*$e),C(dr*ft+kt*$e)]}}function In(){var We=0,$e=(0,A.U)(pn),ft=$e(We),pt=ft.rotate,Pt=ft.stream,St=(0,zn.c)();return ft.parallel=function(kt){if(!arguments.length)return We*S;var ur=ft.rotate();return $e(We=kt*w).rotate(ur)},ft.rotate=function(kt){return arguments.length?(pt.call(ft,[kt[0],kt[1]-We*S]),St.center([-kt[0],-kt[1]]),ft):(kt=pt.call(ft),kt[1]+=We*S,kt)},ft.stream=function(kt){return kt=Pt(kt),kt.sphere=function(){kt.polygonStart();var ur=.01,dr=St.radius(90-ur)().coordinates[0],$t=dr.length-1,mr=-1,Er;for(kt.lineStart();++mr<$t;)kt.point((Er=dr[mr])[0],Er[1]);for(kt.lineEnd(),dr=St.radius(90+ur)().coordinates[0],$t=dr.length-1,kt.lineStart();--mr>=0;)kt.point((Er=dr[mr])[0],Er[1]);kt.lineEnd(),kt.polygonEnd()},kt},ft.scale(79.4187).parallel(45).clipAngle(179.999)}var Gn=e(84706),ua=e(16016),Ma=3,xr=C(1-1/Ma)*S,Rr=gt(0);function yr(We){var $e=xr*w,ft=ke(f,$e)[0]-ke(-f,$e)[0],pt=Rr(0,$e)[1],Pt=ke(0,$e)[1],St=E-Pt,kt=p/We,ur=4/p,dr=pt+St*St*4/p;function $t(mr,Er){var Ir,Kr=P(Er);if(Kr>$e){var hn=s(We-1,t(0,g((mr+f)/kt)));mr+=f*(We-1)/We-hn*kt,Ir=ke(mr,Kr),Ir[0]=Ir[0]*p/ft-p*(We-1)/(2*We)+hn*p/We,Ir[1]=pt+(Ir[1]-Pt)*4*St/p,Er<0&&(Ir[1]=-Ir[1])}else Ir=Rr(mr,Er);return Ir[0]*=ur,Ir[1]/=dr,Ir}return $t.invert=function(mr,Er){mr/=ur,Er*=dr;var Ir=P(Er);if(Ir>pt){var Kr=s(We-1,t(0,g((mr+f)/kt)));mr=(mr+f*(We-1)/We-Kr*kt)*ft/p;var hn=ke.invert(mr,.25*(Ir-pt)*p/St+Pt);return hn[0]-=f*(We-1)/We-Kr*kt,Er<0&&(hn[1]=-hn[1]),hn}return Rr.invert(mr,Er)},$t}function Dr(We,$e){return[We,$e&1?90-h:xr]}function vn(We,$e){return[We,$e&1?-90+h:-xr]}function En(We){return[We[0]*(1-h),We[1]]}function an(We){var $e=[].concat((0,Gn.ik)(-180,180+We/2,We).map(Dr),(0,Gn.ik)(180,-180-We/2,-We).map(vn));return{type:"Polygon",coordinates:[We===180?$e.map(En):$e]}}function en(){var We=4,$e=(0,A.U)(yr),ft=$e(We),pt=ft.stream;return ft.lobes=function(Pt){return arguments.length?$e(We=+Pt):We},ft.stream=function(Pt){var St=ft.rotate(),kt=pt(Pt),ur=(ft.rotate([0,0]),pt(Pt));return ft.rotate(St),kt.sphere=function(){(0,ua.c)(an(180/We),ur)},kt},ft.scale(239.75)}function br(We){var $e=1+We,ft=l(1/$e),pt=C(ft),Pt=2*k(f/(St=f+4*pt*$e)),St,kt=.5*Pt*($e+k(We*(2+We))),ur=We*We,dr=$e*$e;function $t(mr,Er){var Ir=1-l(Er),Kr,hn;if(Ir&&Ir<2){var An=n-Er,Sn=25,Un;do{var wa=l(An),Ta=M(An),Aa=pt+L(wa,$e-Ta),Ca=1+dr-2*$e*Ta;An-=Un=(An-ur*pt-$e*wa+Ca*Aa-.5*Ir*St)/(2*$e*wa*Aa)}while(P(Un)>T&&--Sn>0);Kr=Pt*k(Ca),hn=mr*Aa/f}else Kr=Pt*(We+Ir),hn=mr*pt/f;return[Kr*l(hn),kt-Kr*M(hn)]}return $t.invert=function(mr,Er){var Ir=mr*mr+(Er-=kt)*Er,Kr=(1+dr-Ir/(Pt*Pt))/(2*$e),hn=x(Kr),An=l(hn),Sn=pt+L(An,$e-Kr);return[C(mr/k(Ir))*f/Sn,C(1-2*(hn-ur*pt-$e*An+(1+dr-2*$e*Kr)*Sn)/St)]},$t}function Vr(){var We=1,$e=(0,A.U)(br),ft=$e(We);return ft.ratio=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(167.774).center([0,18.67])}var zr=.7109889596207567,Yr=.0528035274542;function dn(We,$e){return $e>-.7109889596207567?(We=Se(We,$e),We[1]+=Yr,We):Ze(We,$e)}dn.invert=function(We,$e){return $e>-.7109889596207567?Se.invert(We,$e-Yr):Ze.invert(We,$e)};function wn(){return(0,A.c)(dn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Tn(We,$e){return P($e)>zr?(We=Se(We,$e),We[1]-=$e>0?Yr:-.0528035274542,We):Ze(We,$e)}Tn.invert=function(We,$e){return P($e)>zr?Se.invert(We,$e+($e>0?Yr:-.0528035274542)):Ze.invert(We,$e)};function kn(){return(0,A.c)(Tn).scale(152.63)}function Pn(We,$e,ft,pt){var Pt=k(4*f/(2*ft+(1+We-$e/2)*l(2*ft)+(We+$e)/2*l(4*ft)+$e/2*l(6*ft))),St=k(pt*l(ft)*k((1+We*M(2*ft)+$e*M(4*ft))/(1+We+$e))),kt=ft*dr(1);function ur(Er){return k(1+We*M(2*Er)+$e*M(4*Er))}function dr(Er){var Ir=Er*ft;return(2*Ir+(1+We-$e/2)*l(2*Ir)+(We+$e)/2*l(4*Ir)+$e/2*l(6*Ir))/ft}function $t(Er){return ur(Er)*l(Er)}var mr=function(Er,Ir){var Kr=ft*we(dr,kt*l(Ir)/ft,Ir/f);isNaN(Kr)&&(Kr=ft*u(Ir));var hn=Pt*ur(Kr);return[hn*St*Er/f*M(Kr),hn/St*l(Kr)]};return mr.invert=function(Er,Ir){var Kr=we($t,Ir*St/Pt);return[Er*f/(M(Kr)*Pt*St*ur(Kr)),C(ft*dr(Kr/ft)/kt)]},ft===0&&(Pt=k(pt/f),mr=function(Er,Ir){return[Er*Pt,l(Ir)/Pt]},mr.invert=function(Er,Ir){return[Er/Pt,C(Ir*Pt)]}),mr}function fa(){var We=1,$e=0,ft=45*w,pt=2,Pt=(0,A.U)(Pn),St=Pt(We,$e,ft,pt);return St.a=function(kt){return arguments.length?Pt(We=+kt,$e,ft,pt):We},St.b=function(kt){return arguments.length?Pt(We,$e=+kt,ft,pt):$e},St.psiMax=function(kt){return arguments.length?Pt(We,$e,ft=+kt*w,pt):ft*S},St.ratio=function(kt){return arguments.length?Pt(We,$e,ft,pt=+kt):pt},St.scale(180.739)}function $n(We,$e,ft,pt,Pt,St,kt,ur,dr,$t,mr){if(mr.nanEncountered)return NaN;var Er,Ir,Kr,hn,An,Sn,Un,wa,Ta,Aa;if(Er=ft-$e,Ir=We($e+Er*.25),Kr=We(ft-Er*.25),isNaN(Ir)){mr.nanEncountered=!0;return}if(isNaN(Kr)){mr.nanEncountered=!0;return}return hn=Er*(pt+4*Ir+Pt)/12,An=Er*(Pt+4*Kr+St)/12,Sn=hn+An,Aa=(Sn-kt)/15,$t>dr?(mr.maxDepthCount++,Sn+Aa):Math.abs(Aa)<ur?Sn+Aa:(Un=$e+Er*.5,wa=$n(We,$e,Un,pt,Ir,Pt,hn,ur*.5,dr,$t+1,mr),isNaN(wa)?(mr.nanEncountered=!0,NaN):(Ta=$n(We,Un,ft,Pt,Kr,St,An,ur*.5,dr,$t+1,mr),isNaN(Ta)?(mr.nanEncountered=!0,NaN):wa+Ta))}function la(We,$e,ft,pt,Pt){var St={maxDepthCount:0,nanEncountered:!1};Pt===void 0&&(Pt=20);var kt=We($e),ur=We(.5*($e+ft)),dr=We(ft),$t=(kt+4*ur+dr)*(ft-$e)/6,mr=$n(We,$e,ft,kt,ur,dr,$t,pt,Pt,1,St);return mr}function ba(We,$e,ft){function pt(Kr){return We+(1-We)*a(1-a(Kr,$e),1/$e)}function Pt(Kr){return la(pt,0,Kr,1e-4)}for(var St=1/Pt(1),kt=1e3,ur=(1+1e-8)*St,dr=[],$t=0;$t<=kt;$t++)dr.push(Pt($t/kt)*ur);function mr(Kr){var hn=0,An=kt,Sn=kt>>1;do dr[Sn]>Kr?An=Sn:hn=Sn,Sn=hn+An>>1;while(Sn>hn);var Un=dr[Sn+1]-dr[Sn];return Un&&(Un=(Kr-dr[Sn+1])/Un),(Sn+1+Un)/kt}var Er=2*mr(1)/f*St/ft,Ir=function(Kr,hn){var An=mr(P(l(hn))),Sn=pt(An)*Kr;return An/=Er,[Sn,hn>=0?An:-An]};return Ir.invert=function(Kr,hn){var An;return hn*=Er,P(hn)<1&&(An=u(hn)*C(Pt(P(hn))*St)),[Kr/pt(P(hn)),An]},Ir}function ni(){var We=0,$e=2.5,ft=1.183136,pt=(0,A.U)(ba),Pt=pt(We,$e,ft);return Pt.alpha=function(St){return arguments.length?pt(We=+St,$e,ft):We},Pt.k=function(St){return arguments.length?pt(We,$e=+St,ft):$e},Pt.gamma=function(St){return arguments.length?pt(We,$e,ft=+St):ft},Pt.scale(152.63)}function Xa(We,$e){return P(We[0]-$e[0])<h&&P(We[1]-$e[1])<h}function uo(We,$e){for(var ft=-1,pt=We.length,Pt=We[0],St,kt,ur,dr=[];++ft<pt;){St=We[ft],kt=(St[0]-Pt[0])/$e,ur=(St[1]-Pt[1])/$e;for(var $t=0;$t<$e;++$t)dr.push([Pt[0]+$t*kt,Pt[1]+$t*ur]);Pt=St}return dr.push(St),dr}function ao(We){var $e=[],ft,pt,Pt,St,kt,ur,dr,$t=We[0].length;for(dr=0;dr<$t;++dr)ft=We[0][dr],pt=ft[0][0],Pt=ft[0][1],St=ft[1][1],kt=ft[2][0],ur=ft[2][1],$e.push(uo([[pt+h,Pt+h],[pt+h,St-h],[kt-h,St-h],[kt-h,ur+h]],30));for(dr=We[1].length-1;dr>=0;--dr)ft=We[1][dr],pt=ft[0][0],Pt=ft[0][1],St=ft[1][1],kt=ft[2][0],ur=ft[2][1],$e.push(uo([[kt-h,ur-h],[kt-h,St+h],[pt+h,St+h],[pt+h,Pt-h]],30));return{type:"Polygon",coordinates:[(0,Gn.Uf)($e)]}}function Oi(We,$e,ft){var pt,Pt;function St(dr,$t){for(var mr=$t<0?-1:1,Er=$e[+($t<0)],Ir=0,Kr=Er.length-1;Ir<Kr&&dr>Er[Ir][2][0];++Ir);var hn=We(dr-Er[Ir][1][0],$t);return hn[0]+=We(Er[Ir][1][0],mr*$t>mr*Er[Ir][0][1]?Er[Ir][0][1]:$t)[0],hn}ft?St.invert=ft(St):We.invert&&(St.invert=function(dr,$t){for(var mr=Pt[+($t<0)],Er=$e[+($t<0)],Ir=0,Kr=mr.length;Ir<Kr;++Ir){var hn=mr[Ir];if(hn[0][0]<=dr&&dr<hn[1][0]&&hn[0][1]<=$t&&$t<hn[1][1]){var An=We.invert(dr-We(Er[Ir][1][0],0)[0],$t);return An[0]+=Er[Ir][1][0],Xa(St(An[0],An[1]),[dr,$t])?An:null}}});var kt=(0,A.c)(St),ur=kt.stream;return kt.stream=function(dr){var $t=kt.rotate(),mr=ur(dr),Er=(kt.rotate([0,0]),ur(dr));return kt.rotate($t),mr.sphere=function(){(0,ua.c)(pt,Er)},mr},kt.lobes=function(dr){return arguments.length?(pt=ao(dr),$e=dr.map(function($t){return $t.map(function(mr){return[[mr[0][0]*w,mr[0][1]*w],[mr[1][0]*w,mr[1][1]*w],[mr[2][0]*w,mr[2][1]*w]]})}),Pt=$e.map(function($t){return $t.map(function(mr){var Er=We(mr[0][0],mr[0][1])[0],Ir=We(mr[2][0],mr[2][1])[0],Kr=We(mr[1][0],mr[0][1])[1],hn=We(mr[1][0],mr[1][1])[1],An;return Kr>hn&&(An=Kr,Kr=hn,hn=An),[[Er,Kr],[Ir,hn]]})}),kt):$e.map(function($t){return $t.map(function(mr){return[[mr[0][0]*S,mr[0][1]*S],[mr[1][0]*S,mr[1][1]*S],[mr[2][0]*S,mr[2][1]*S]]})})},$e!=null&&kt.lobes($e),kt}var Ls=[[[[-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]]]];function jl(){return Oi(Ne,Ls).scale(160.857)}var bu=[[[[-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]]]];function Ga(){return Oi(Tn,bu).scale(152.63)}var qs=[[[[-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]]]];function Kl(){return Oi(Se,qs).scale(169.529)}var Ii=[[[[-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 $i(){return Oi(Se,Ii).scale(169.529).rotate([20,0])}var Ps=[[[[-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]]]];function Ll(){return Oi(dn,Ps,me).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var xi=[[[[-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 Rs(){return Oi(Ze,xi).scale(152.63).rotate([-20,0])}function Ti(We,$e){return[3/p*We*k(f*f/3-$e*$e),$e]}Ti.invert=function(We,$e){return[p/3*We/k(f*f/3-$e*$e),$e]};function Ci(){return(0,A.c)(Ti).scale(158.837)}function Ds(We){function $e(ft,pt){if(P(P(pt)-n)<h)return[0,pt<0?-2:2];var Pt=l(pt),St=a((1+Pt)/(1-Pt),We/2),kt=.5*(St+1/St)+M(ft*=We);return[2*l(ft)/kt,(St-1/St)/kt]}return $e.invert=function(ft,pt){var Pt=P(pt);if(P(Pt-2)<h)return ft?null:[0,u(pt)*n];if(Pt>2)return null;ft/=2,pt/=2;var St=ft*ft,kt=pt*pt,ur=2*pt/(1+St+kt);return ur=a((1+ur)/(1-ur),1/We),[L(2*ft,1-St-kt)/We,C((ur-1)/(ur+1))]},$e}function Bi(){var We=.5,$e=(0,A.U)(Ds),ft=$e(We);return ft.spacing=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(124.75)}var Ni=f/b;function fo(We,$e){return[We*(1+k(M($e)))/2,$e/(M($e/2)*M(We/6))]}fo.invert=function(We,$e){var ft=P(We),pt=P($e),Pt=h,St=n;pt<Ni?St*=pt/Ni:Pt+=6*x(Ni/pt);for(var kt=0;kt<25;kt++){var ur=l(St),dr=k(M(St)),$t=l(St/2),mr=M(St/2),Er=l(Pt/6),Ir=M(Pt/6),Kr=.5*Pt*(1+dr)-ft,hn=St/(mr*Ir)-pt,An=dr?-.25*Pt*ur/dr:0,Sn=.5*(1+dr),Un=(1+.5*St*$t/mr)/(mr*Ir),wa=St/mr*(Er/6)/(Ir*Ir),Ta=An*wa-Un*Sn,Aa=(Kr*wa-hn*Sn)/Ta,Ca=(hn*An-Kr*Un)/Ta;if(St-=Aa,Pt-=Ca,P(Aa)<h&&P(Ca)<h)break}return[We<0?-Pt:Pt,$e<0?-St:St]};function wu(){return(0,A.c)(fo).scale(97.2672)}function io(We,$e){var ft=We*We,pt=$e*$e;return[We*(.975534+pt*(-.119161+ft*-.0143059+pt*-.0547009)),$e*(1.00384+ft*(.0802894+pt*-.02855+ft*199025e-9)+pt*(.0998909+pt*-.0491032))]}io.invert=function(We,$e){var ft=u(We)*f,pt=$e/2,Pt=50;do{var St=ft*ft,kt=pt*pt,ur=ft*pt,dr=ft*(.975534+kt*(-.119161+St*-.0143059+kt*-.0547009))-We,$t=pt*(1.00384+St*(.0802894+kt*-.02855+St*199025e-9)+kt*(.0998909+kt*-.0491032))-$e,mr=.975534-kt*(.119161+3*St*.0143059+kt*.0547009),Er=-ur*(2*.119161+4*.0547009*kt+2*.0143059*St),Ir=ur*(2*.0802894+4*199025e-9*St+2*-.02855*kt),Kr=1.00384+St*(.0802894+199025e-9*St)+kt*(3*(.0998909-.02855*St)-5*.0491032*kt),hn=Er*Ir-Kr*mr,An=($t*Er-dr*Kr)/hn,Sn=(dr*Ir-$t*mr)/hn;ft-=An,pt-=Sn}while((P(An)>h||P(Sn)>h)&&--Pt>0);return Pt&&[ft,pt]};function nf(){return(0,A.c)(io).scale(139.98)}function _o(We,$e){return[l(We)/M($e),y($e)*M(We)]}_o.invert=function(We,$e){var ft=We*We,pt=$e*$e,Pt=pt+1,St=ft+Pt,kt=We?m*k((St-k(St*St-4*ft))/ft):1/k(Pt);return[C(We*kt),u($e)*x(kt)]};function ki(){return(0,A.c)(_o).scale(144.049).clipAngle(89.999)}function Jl(We){var $e=M(We),ft=y(v+We/2);function pt(Pt,St){var kt=St-We,ur=P(kt)<h?Pt*$e:P(ur=v+St/2)<h||P(P(ur)-n)<h?0:Pt*kt/r(y(ur)/ft);return[ur,kt]}return pt.invert=function(Pt,St){var kt,ur=St+We;return[P(St)<h?Pt/$e:P(kt=v+ur/2)<h||P(P(kt)-n)<h?0:Pt*r(y(kt)/ft)/St,ur]},pt}function es(){return st(Jl).parallel(40).scale(158.837)}function zo(We,$e){return[We,1.25*r(y(v+.4*$e))]}zo.invert=function(We,$e){return[We,2.5*o(d(.8*$e))-.625*f]};function Ql(){return(0,A.c)(zo).scale(108.318)}function Tu(We){var $e=We.length-1;function ft(pt,Pt){for(var St=M(Pt),kt=2/(1+St*M(pt)),ur=kt*St*l(pt),dr=kt*l(Pt),$t=$e,mr=We[$t],Er=mr[0],Ir=mr[1],Kr;--$t>=0;)mr=We[$t],Er=mr[0]+ur*(Kr=Er)-dr*Ir,Ir=mr[1]+ur*Ir+dr*Kr;return Er=ur*(Kr=Er)-dr*Ir,Ir=ur*Ir+dr*Kr,[Er,Ir]}return ft.invert=function(pt,Pt){var St=20,kt=pt,ur=Pt;do{for(var dr=$e,$t=We[dr],mr=$t[0],Er=$t[1],Ir=0,Kr=0,hn;--dr>=0;)$t=We[dr],Ir=mr+kt*(hn=Ir)-ur*Kr,Kr=Er+kt*Kr+ur*hn,mr=$t[0]+kt*(hn=mr)-ur*Er,Er=$t[1]+kt*Er+ur*hn;Ir=mr+kt*(hn=Ir)-ur*Kr,Kr=Er+kt*Kr+ur*hn,mr=kt*(hn=mr)-ur*Er-pt,Er=kt*Er+ur*hn-Pt;var An=Ir*Ir+Kr*Kr,Sn,Un;kt-=Sn=(mr*Ir+Er*Kr)/An,ur-=Un=(Er*Ir-mr*Kr)/An}while(P(Sn)+P(Un)>h*h&&--St>0);if(St){var wa=k(kt*kt+ur*ur),Ta=2*o(wa*.5),Aa=l(Ta);return[L(kt*Aa,wa*M(Ta)),wa?C(ur*Aa/wa):0]}},ft}var af=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Pl=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],of=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],sf=[[.9245,0],[0,0],[.01943,0]],lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function $l(){return ds(af,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function uf(){return ds(Pl,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function ff(){return ds(of,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Au(){return ds(sf,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Mu(){return ds(lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function ds(We,$e){var ft=(0,A.c)(Tu(We)).rotate($e).clipAngle(90),pt=(0,Ue.c)($e),Pt=ft.center;return delete ft.rotate,ft.center=function(St){return arguments.length?Pt(pt(St)):pt.invert(Pt())},ft}var Is=k(6),el=k(7);function tl(We,$e){var ft=C(7*l($e)/(3*Is));return[Is*We*(2*M(2*ft/3)-1)/el,9*l(ft/3)/el]}tl.invert=function(We,$e){var ft=3*C($e*el/9);return[We*el/(Is*(2*M(2*ft/3)-1)),C(l(ft)*3*Is/7)]};function Su(){return(0,A.c)(tl).scale(164.859)}function Wo(We,$e){for(var ft=(1+m)*l($e),pt=$e,Pt=0,St;Pt<25&&(pt-=St=(l(pt/2)+l(pt)-ft)/(.5*M(pt/2)+M(pt)),!(P(St)<h));Pt++);return[We*(1+2*M(pt)/M(pt/2))/(3*b),2*k(3)*l(pt/2)/k(2+b)]}Wo.invert=function(We,$e){var ft=$e*k(2+b)/(2*k(3)),pt=2*C(ft);return[3*b*We/(1+2*M(pt)/M(pt/2)),C((ft+l(pt))/(1+m))]};function cf(){return(0,A.c)(Wo).scale(188.209)}function Rl(We,$e){for(var ft=k(6/(4+f)),pt=(1+f/4)*l($e),Pt=$e/2,St=0,kt;St<25&&(Pt-=kt=(Pt/2+l(Pt)-pt)/(.5+M(Pt)),!(P(kt)<h));St++);return[ft*(.5+M(Pt))*We/1.5,ft*Pt]}Rl.invert=function(We,$e){var ft=k(6/(4+f)),pt=$e/ft;return P(P(pt)-n)<h&&(pt=pt<0?-n:n),[1.5*We/(ft*(.5+M(pt))),C((pt/2+l(pt))/(1+f/4))]};function Eu(){return(0,A.c)(Rl).scale(166.518)}var Cu=e(47984);function Dl(We,$e){var ft=$e*$e,pt=ft*ft,Pt=ft*pt;return[We*(.84719-.13063*ft+Pt*Pt*(-.04515+.05494*ft-.02326*pt+.00331*Pt)),$e*(1.01183+pt*pt*(-.02625+.01926*ft-.00396*pt))]}Dl.invert=function(We,$e){var ft=$e,pt=25,Pt,St,kt,ur;do St=ft*ft,kt=St*St,ft-=Pt=(ft*(1.01183+kt*kt*(-.02625+.01926*St-.00396*kt))-$e)/(1.01183+kt*kt*(-.23625+.21186*St+-.05148*kt));while(P(Pt)>T&&--pt>0);return St=ft*ft,kt=St*St,ur=St*kt,[We/(.84719-.13063*St+ur*ur*(-.04515+.05494*St-.02326*kt+.00331*ur)),ft]};function bo(){return(0,A.c)(Dl).scale(175.295)}function ks(We,$e){return[We*(1+M($e))/2,2*($e-y($e/2))]}ks.invert=function(We,$e){for(var ft=$e/2,pt=0,Pt=1/0;pt<10&&P(Pt)>h;++pt){var St=M($e/2);$e-=Pt=($e-y($e/2)-ft)/(1-.5/(St*St))}return[2*We/(1+M($e)),$e]};function ps(){return(0,A.c)(ks).scale(152.63)}var rl=[[[[-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 ts(){return Oi(ne(1/0),rl).rotate([20,0]).scale(152.63)}function Fo(We,$e){var ft=l($e),pt=M($e),Pt=u(We);if(We===0||P($e)===n)return[0,$e];if($e===0)return[We,0];if(P(We)===n)return[We*pt,n*ft];var St=f/(2*We)-2*We/f,kt=2*$e/f,ur=(1-kt*kt)/(ft-kt),dr=St*St,$t=ur*ur,mr=1+dr/$t,Er=1+$t/dr,Ir=(St*ft/ur-St/2)/mr,Kr=($t*ft/dr+ur/2)/Er,hn=Ir*Ir+pt*pt/mr,An=Kr*Kr-($t*ft*ft/dr+ur*ft-1)/Er;return[n*(Ir+k(hn)*Pt),n*(Kr+k(An<0?0:An)*u(-$e*St)*Pt)]}Fo.invert=function(We,$e){We/=n,$e/=n;var ft=We*We,pt=$e*$e,Pt=ft+pt,St=f*f;return[We?(Pt-1+k((1-Pt)*(1-Pt)+4*ft))/(2*We)*n:0,we(function(kt){return Pt*(f*l(kt)-2*kt)*f+4*kt*kt*($e-l(kt))+2*f*kt-St*$e},0)]};function ql(){return(0,A.c)(Fo).scale(127.267)}var _s=1.0148,wo=.23185,yi=-.14499,eu=.02406,hf=_s,Il=5*wo,zs=7*yi,Fs=9*eu,vo=1.790857183;function kl(We,$e){var ft=$e*$e;return[We,$e*(_s+ft*ft*(wo+ft*(yi+eu*ft)))]}kl.invert=function(We,$e){$e>vo?$e=vo:$e<-1.790857183&&($e=-1.790857183);var ft=$e,pt;do{var Pt=ft*ft;ft-=pt=(ft*(_s+Pt*Pt*(wo+Pt*(yi+eu*Pt)))-$e)/(hf+Pt*Pt*(Il+Pt*(zs+Fs*Pt)))}while(P(pt)>h);return[We,ft]};function Os(){return(0,A.c)(kl).scale(139.319)}function _l(We,$e){if(P($e)<h)return[We,0];var ft=y($e),pt=We*l($e);return[l(pt)/ft,$e+(1-M(pt))/ft]}_l.invert=function(We,$e){if(P($e)<h)return[We,0];var ft=We*We+$e*$e,pt=$e*.5,Pt=10,St;do{var kt=y(pt),ur=1/M(pt),dr=ft-2*$e*pt+pt*pt;pt-=St=(kt*dr+2*(pt-$e))/(2+dr*ur*ur+2*(pt-$e)*kt)}while(P(St)>h&&--Pt>0);return kt=y(pt),[(P($e)<P(pt+1/kt)?C(We*kt):u($e)*u(We)*(x(P(We*kt))+n))/l(pt),pt]};function vf(){return(0,A.c)(_l).scale(103.74)}var Lu=e(13696),tu=e(27284);function ru(We,$e){var ft=zl(We[1],We[0]),pt=zl($e[1],$e[0]),Pt=Fl(ft,pt),St=nl(ft)/nl(pt);return Bs([1,0,We[0][0],0,1,We[0][1]],Bs([St,0,0,0,St,0],Bs([M(Pt),l(Pt),0,-l(Pt),M(Pt),0],[1,0,-$e[0][0],0,1,-$e[0][1]])))}function nu(We){var $e=1/(We[0]*We[4]-We[1]*We[3]);return[$e*We[4],-$e*We[1],$e*(We[1]*We[5]-We[2]*We[4]),-$e*We[3],$e*We[0],$e*(We[2]*We[3]-We[0]*We[5])]}function Bs(We,$e){return[We[0]*$e[0]+We[1]*$e[3],We[0]*$e[1]+We[1]*$e[4],We[0]*$e[2]+We[1]*$e[5]+We[2],We[3]*$e[0]+We[4]*$e[3],We[3]*$e[1]+We[4]*$e[4],We[3]*$e[2]+We[4]*$e[5]+We[5]]}function zl(We,$e){return[We[0]-$e[0],We[1]-$e[1]]}function nl(We){return k(We[0]*We[0]+We[1]*We[1])}function Fl(We,$e){return L(We[0]*$e[1]-We[1]*$e[0],We[0]*$e[0]+We[1]*$e[1])}function ai(We,$e,ft){pt(We,{transform:null});function pt($t,mr){if($t.edges=au($t.face),mr.face){var Er=$t.shared=Ru($t.face,mr.face),Ir=ru(Er.map(mr.project),Er.map($t.project));$t.transform=mr.transform?Bs(mr.transform,Ir):Ir;for(var Kr=mr.edges,hn=0,An=Kr.length;hn<An;++hn)To(Er[0],Kr[hn][1])&&To(Er[1],Kr[hn][0])&&(Kr[hn]=$t),To(Er[0],Kr[hn][0])&&To(Er[1],Kr[hn][1])&&(Kr[hn]=$t);for(Kr=$t.edges,hn=0,An=Kr.length;hn<An;++hn)To(Er[0],Kr[hn][0])&&To(Er[1],Kr[hn][1])&&(Kr[hn]=mr),To(Er[0],Kr[hn][1])&&To(Er[1],Kr[hn][0])&&(Kr[hn]=mr)}else $t.transform=mr.transform;return $t.children&&$t.children.forEach(function(Sn){pt(Sn,$t)}),$t}function Pt($t,mr){var Er=$e($t,mr),Ir=Er.project([$t*S,mr*S]),Kr;return(Kr=Er.transform)?[Kr[0]*Ir[0]+Kr[1]*Ir[1]+Kr[2],-(Kr[3]*Ir[0]+Kr[4]*Ir[1]+Kr[5])]:(Ir[1]=-Ir[1],Ir)}gs(We)&&(Pt.invert=function($t,mr){var Er=St(We,[$t,-mr]);return Er&&(Er[0]*=w,Er[1]*=w,Er)});function St($t,mr){var Er=$t.project.invert,Ir=$t.transform,Kr=mr;if(Ir&&(Ir=nu(Ir),Kr=[Ir[0]*Kr[0]+Ir[1]*Kr[1]+Ir[2],Ir[3]*Kr[0]+Ir[4]*Kr[1]+Ir[5]]),Er&&$t===kt(hn=Er(Kr)))return hn;for(var hn,An=$t.children,Sn=0,Un=An&&An.length;Sn<Un;++Sn)if(hn=St(An[Sn],mr))return hn}function kt($t){return $e($t[0]*w,$t[1]*w)}var ur=(0,A.c)(Pt),dr=ur.stream;return ur.stream=function($t){var mr=ur.rotate(),Er=dr($t),Ir=(ur.rotate([0,0]),dr($t));return ur.rotate(mr),Er.sphere=function(){Ir.polygonStart(),Ir.lineStart(),Pu(Ir,We),Ir.lineEnd(),Ir.polygonEnd()},Er},ur.angle(ft==null?-30:ft*S)}function Pu(We,$e,ft){var pt,Pt=$e.edges,St=Pt.length,kt,ur={type:"MultiPoint",coordinates:$e.face},dr=$e.face.filter(function(An){return P(An[1])!==90}),$t=(0,Lu.c)({type:"MultiPoint",coordinates:dr}),mr=!1,Er=-1,Ir=$t[1][0]-$t[0][0],Kr=Ir===180||Ir===360?[($t[0][0]+$t[1][0])/2,($t[0][1]+$t[1][1])/2]:(0,Pe.c)(ur);if(ft)for(;++Er<St&&Pt[Er]!==ft;);++Er;for(var hn=0;hn<St;++hn)kt=Pt[(hn+Er)%St],Array.isArray(kt)?(mr||(We.point((pt=(0,tu.c)(kt[0],Kr)(h))[0],pt[1]),mr=!0),We.point((pt=(0,tu.c)(kt[1],Kr)(h))[0],pt[1])):(mr=!1,kt!==ft&&Pu(We,kt,$e))}function To(We,$e){return We&&$e&&We[0]===$e[0]&&We[1]===$e[1]}function Ru(We,$e){for(var ft,pt,Pt=We.length,St=null,kt=0;kt<Pt;++kt){ft=We[kt];for(var ur=$e.length;--ur>=0;)if(pt=$e[ur],ft[0]===pt[0]&&ft[1]===pt[1]){if(St)return[St,ft];St=ft}}}function au(We){for(var $e=We.length,ft=[],pt=We[$e-1],Pt=0;Pt<$e;++Pt)ft.push([pt,pt=We[Pt]]);return ft}function gs(We){return We.project.invert||We.children&&We.children.some(gs)}var rs=e(53285),Ol=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],bi=[[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(We){return We.map(function($e){return Ol[$e]})});function al(We){We=We||function(ft){var pt=(0,Pe.c)({type:"MultiPoint",coordinates:ft});return(0,rs.c)().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=bi.map(function(ft){return{face:ft,project:We(ft)}});return[-1,0,0,1,0,1,4,5].forEach(function(ft,pt){var Pt=$e[ft];Pt&&(Pt.children||(Pt.children=[])).push($e[pt])}),ai($e[0],function(ft,pt){return $e[ft<-f/2?pt<0?6:4:ft<0?pt<0?2:0:ft<f/2?pt<0?3:1:pt<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var Ao=2/k(3);function Yo(We,$e){var ft=ke(We,$e);return[ft[0]*Ao,ft[1]]}Yo.invert=function(We,$e){return ke.invert(We/Ao,$e)};function ys(We){We=We||function(ft){var pt=(0,Pe.c)({type:"MultiPoint",coordinates:ft});return(0,A.c)(Yo).translate([0,0]).scale(1).rotate(pt[1]>0?[-pt[0],0]:[180-pt[0],180])};var $e=bi.map(function(ft){return{face:ft,project:We(ft)}});return[-1,0,0,1,0,1,4,5].forEach(function(ft,pt){var Pt=$e[ft];Pt&&(Pt.children||(Pt.children=[])).push($e[pt])}),ai($e[0],function(ft,pt){return $e[ft<-f/2?pt<0?6:4:ft<0?pt<0?2:0:ft<f/2?pt<0?3:1:pt<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function ns(We){We=We||function(kt){var ur=kt.length===6?(0,Pe.c)({type:"MultiPoint",coordinates:kt}):kt[0];return(0,rs.c)().scale(1).translate([0,0]).rotate([-ur[0],-ur[1]])};var $e=bi.map(function(kt){for(var ur=kt.map(po),dr=ur.length,$t=ur[dr-1],mr,Er=[],Ir=0;Ir<dr;++Ir)mr=ur[Ir],Er.push(So([$t[0]*.9486832980505138+mr[0]*.31622776601683794,$t[1]*.9486832980505138+mr[1]*.31622776601683794,$t[2]*.9486832980505138+mr[2]*.31622776601683794]),So([mr[0]*.9486832980505138+$t[0]*.31622776601683794,mr[1]*.9486832980505138+$t[1]*.31622776601683794,mr[2]*.9486832980505138+$t[2]*.31622776601683794])),$t=mr;return Er}),ft=[],pt=[-1,0,0,1,0,1,4,5];$e.forEach(function(kt,ur){for(var dr=bi[ur],$t=dr.length,mr=ft[ur]=[],Er=0;Er<$t;++Er)$e.push([dr[Er],kt[(Er*2+2)%(2*$t)],kt[(Er*2+1)%(2*$t)]]),pt.push(ur),mr.push(Xo(po(kt[(Er*2+2)%(2*$t)]),po(kt[(Er*2+1)%(2*$t)])))});var Pt=$e.map(function(kt){return{project:We(kt),face:kt}});pt.forEach(function(kt,ur){var dr=Pt[kt];dr&&(dr.children||(dr.children=[])).push(Pt[ur])});function St(kt,ur){var dr=M(ur),$t=[dr*M(kt),dr*l(kt),l(ur)],mr=kt<-f/2?ur<0?6:4:kt<0?ur<0?2:0:kt<f/2?ur<0?3:1:ur<0?7:5,Er=ft[mr];return Pt[Mo(Er[0],$t)<0?8+3*mr:Mo(Er[1],$t)<0?8+3*mr+1:Mo(Er[2],$t)<0?8+3*mr+2:mr]}return ai(Pt[0],St).angle(-30).scale(110.625).center([0,45])}function Mo(We,$e){for(var ft=0,pt=We.length,Pt=0;ft<pt;++ft)Pt+=We[ft]*$e[ft];return Pt}function Xo(We,$e){return[We[1]*$e[2]-We[2]*$e[1],We[2]*$e[0]-We[0]*$e[2],We[0]*$e[1]-We[1]*$e[0]]}function So(We){return[L(We[1],We[0])*S,C(t(-1,s(1,We[2])))*S]}function po(We){var $e=We[0]*w,ft=We[1]*w,pt=M(ft);return[pt*M($e),pt*l($e),l(ft)]}function il(){}function df(We){if((ft=We.length)<4)return!1;for(var $e=0,ft,pt=We[ft-1][1]*We[0][0]-We[ft-1][0]*We[0][1];++$e<ft;)pt+=We[$e-1][1]*We[$e][0]-We[$e-1][0]*We[$e][1];return pt<=0}function pf(We,$e){for(var ft=$e[0],pt=$e[1],Pt=!1,St=0,kt=We.length,ur=kt-1;St<kt;ur=St++){var dr=We[St],$t=dr[0],mr=dr[1],Er=We[ur],Ir=Er[0],Kr=Er[1];mr>pt^Kr>pt&&ft<(Ir-$t)*(pt-mr)/(Kr-mr)+$t&&(Pt=!Pt)}return Pt}function gf(We,$e){var ft=$e.stream,pt;if(!ft)throw new Error("invalid projection");switch(We&&We.type){case"Feature":pt=iu;break;case"FeatureCollection":pt=yf;break;default:pt=Ns;break}return pt(We,ft)}function yf(We,$e){return{type:"FeatureCollection",features:We.features.map(function(ft){return iu(ft,$e)})}}function iu(We,$e){return{type:"Feature",id:We.id,properties:We.properties,geometry:Ns(We.geometry,$e)}}function Du(We,$e){return{type:"GeometryCollection",geometries:We.geometries.map(function(ft){return Ns(ft,$e)})}}function Ns(We,$e){if(!We)return null;if(We.type==="GeometryCollection")return Du(We,$e);var ft;switch(We.type){case"Point":ft=Us;break;case"MultiPoint":ft=Us;break;case"LineString":ft=Iu;break;case"MultiLineString":ft=Iu;break;case"Polygon":ft=ol;break;case"MultiPolygon":ft=ol;break;case"Sphere":ft=ol;break;default:return null}return(0,ua.c)(We,$e(ft)),ft.result()}var _i=[],co=[],Us={point:function(We,$e){_i.push([We,$e])},result:function(){var We=_i.length?_i.length<2?{type:"Point",coordinates:_i[0]}:{type:"MultiPoint",coordinates:_i}:null;return _i=[],We}},Iu={lineStart:il,point:function(We,$e){_i.push([We,$e])},lineEnd:function(){_i.length&&(co.push(_i),_i=[])},result:function(){var We=co.length?co.length<2?{type:"LineString",coordinates:co[0]}:{type:"MultiLineString",coordinates:co}:null;return co=[],We}},ol={polygonStart:il,lineStart:il,point:function(We,$e){_i.push([We,$e])},lineEnd:function(){var We=_i.length;if(We){do _i.push(_i[0].slice());while(++We<4);co.push(_i),_i=[]}},polygonEnd:il,result:function(){if(!co.length)return null;var We=[],$e=[];return co.forEach(function(ft){df(ft)?We.push([ft]):$e.push(ft)}),$e.forEach(function(ft){var pt=ft[0];We.some(function(Pt){if(pf(Pt[0],pt))return Pt.push(ft),!0})||We.push([ft])}),co=[],We.length?We.length>1?{type:"MultiPolygon",coordinates:We}:{type:"Polygon",coordinates:We[0]}:null}};function Zo(We){var $e=We(n,0)[0]-We(-n,0)[0];function ft(pt,Pt){var St=P(pt)<n,kt=We(St?pt:pt>0?pt-f:pt+f,Pt),ur=(kt[0]-kt[1])*m,dr=(kt[0]+kt[1])*m;if(St)return[ur,dr];var $t=$e*m,mr=ur>0^dr>0?-1:1;return[mr*ur-u(dr)*$t,mr*dr-u(ur)*$t]}return We.invert&&(ft.invert=function(pt,Pt){var St=(pt+Pt)*m,kt=(Pt-pt)*m,ur=P(St)<.5*$e&&P(kt)<.5*$e;if(!ur){var dr=$e*m,$t=St>0^kt>0?-1:1,mr=-$t*pt+(kt>0?1:-1)*dr,Er=-$t*Pt+(St>0?1:-1)*dr;St=(-mr-Er)*m,kt=(mr-Er)*m}var Ir=We.invert(St,kt);return ur||(Ir[0]+=St>0?f:-f),Ir}),(0,A.c)(ft).rotate([-90,-90,45]).clipAngle(179.999)}function mf(){return Zo(ln).scale(176.423)}function ku(){return Zo(pr).scale(111.48)}function _u(We,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function ft($t){var mr=$t.length,Er=2,Ir=new Array(mr);for(Ir[0]=+$t[0].toFixed($e),Ir[1]=+$t[1].toFixed($e);Er<mr;)Ir[Er]=$t[Er],++Er;return Ir}function pt($t){return $t.map(ft)}function Pt($t){for(var mr=ft($t[0]),Er=[mr],Ir=1;Ir<$t.length;Ir++){var Kr=ft($t[Ir]);(Kr.length>2||Kr[0]!=mr[0]||Kr[1]!=mr[1])&&(Er.push(Kr),mr=Kr)}return Er.length===1&&$t.length>1&&Er.push(ft($t[$t.length-1])),Er}function St($t){return $t.map(Pt)}function kt($t){if($t==null)return $t;var mr;switch($t.type){case"GeometryCollection":mr={type:"GeometryCollection",geometries:$t.geometries.map(kt)};break;case"Point":mr={type:"Point",coordinates:ft($t.coordinates)};break;case"MultiPoint":mr={type:$t.type,coordinates:pt($t.coordinates)};break;case"LineString":mr={type:$t.type,coordinates:Pt($t.coordinates)};break;case"MultiLineString":case"Polygon":mr={type:$t.type,coordinates:St($t.coordinates)};break;case"MultiPolygon":mr={type:"MultiPolygon",coordinates:$t.coordinates.map(St)};break;default:return $t}return $t.bbox!=null&&(mr.bbox=$t.bbox),mr}function ur($t){var mr={type:"Feature",properties:$t.properties,geometry:kt($t.geometry)};return $t.id!=null&&(mr.id=$t.id),$t.bbox!=null&&(mr.bbox=$t.bbox),mr}if(We!=null)switch(We.type){case"Feature":return ur(We);case"FeatureCollection":{var dr={type:"FeatureCollection",features:We.features.map(ur)};return We.bbox!=null&&(dr.bbox=We.bbox),dr}default:return kt(We)}return We}function ou(We){var $e=l(We);function ft(pt,Pt){var St=$e?y(pt*$e/2)/$e:pt/2;if(!Pt)return[2*St,-We];var kt=2*o(St*l(Pt)),ur=1/y(Pt);return[l(kt)*ur,Pt+(1-M(kt))*ur-We]}return ft.invert=function(pt,Pt){if(P(Pt+=We)<h)return[$e?2*o($e*pt/2)/$e:pt,0];var St=pt*pt+Pt*Pt,kt=0,ur=10,dr;do{var $t=y(kt),mr=1/M(kt),Er=St-2*Pt*kt+kt*kt;kt-=dr=($t*Er+2*(kt-Pt))/(2+Er*mr*mr+2*(kt-Pt)*$t)}while(P(dr)>h&&--ur>0);var Ir=pt*($t=y(kt)),Kr=y(P(Pt)<P(kt+1/$t)?C(Ir)*.5:x(Ir)*.5+f/4)/l(kt);return[$e?2*o($e*Kr)/$e:2*Kr,kt]},ft}function zu(){return st(ou).scale(131.215)}var qi=[[.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]];qi.forEach(function(We){We[1]*=1.0144});function Eo(We,$e){var ft=s(18,P($e)*36/f),pt=g(ft),Pt=ft-pt,St=(Er=qi[pt])[0],kt=Er[1],ur=(Er=qi[++pt])[0],dr=Er[1],$t=(Er=qi[s(19,++pt)])[0],mr=Er[1],Er;return[We*(ur+Pt*($t-St)/2+Pt*Pt*($t-2*ur+St)/2),($e>0?n:-n)*(dr+Pt*(mr-kt)/2+Pt*Pt*(mr-2*dr+kt)/2)]}Eo.invert=function(We,$e){var ft=$e/n,pt=ft*90,Pt=s(18,P(pt/5)),St=t(0,g(Pt));do{var kt=qi[St][1],ur=qi[St+1][1],dr=qi[s(19,St+2)][1],$t=dr-kt,mr=dr-2*ur+kt,Er=2*(P(ft)-ur)/$t,Ir=mr/$t,Kr=Er*(1-Ir*Er*(1-2*Ir*Er));if(Kr>=0||St===1){pt=($e>=0?5:-5)*(Kr+Pt);var hn=50,An;do Pt=s(18,P(pt)/5),St=g(Pt),Kr=Pt-St,kt=qi[St][1],ur=qi[St+1][1],dr=qi[s(19,St+2)][1],pt-=(An=($e>=0?n:-n)*(ur+Kr*(dr-kt)/2+Kr*Kr*(dr-2*ur+kt)/2)-$e)*S;while(P(An)>T&&--hn>0);break}}while(--St>=0);var Sn=qi[St][0],Un=qi[St+1][0],wa=qi[s(19,St+2)][0];return[We/(Un+Kr*(wa-Sn)/2+Kr*Kr*(wa-2*Un+Sn)/2),pt*w]};function as(){return(0,A.c)(Eo).scale(152.63)}function Vs(We){function $e(ft,pt){var Pt=M(pt),St=(We-1)/(We-Pt*M(ft));return[St*Pt*l(ft),St*l(pt)]}return $e.invert=function(ft,pt){var Pt=ft*ft+pt*pt,St=k(Pt),kt=(We-k(1-Pt*(We+1)/(We-1)))/((We-1)/St+St/(We-1));return[L(ft*kt,St*k(1-kt*kt)),St?C(pt*kt/St):0]},$e}function Bl(We,$e){var ft=Vs(We);if(!$e)return ft;var pt=M($e),Pt=l($e);function St(kt,ur){var dr=ft(kt,ur),$t=dr[1],mr=$t*Pt/(We-1)+pt;return[dr[0]*pt/mr,$t/mr]}return St.invert=function(kt,ur){var dr=(We-1)/(We-1-ur*Pt);return ft.invert(dr*kt,dr*ur*pt)},St}function ms(){var We=2,$e=0,ft=(0,A.U)(Bl),pt=ft(We,$e);return pt.distance=function(Pt){return arguments.length?ft(We=+Pt,$e):We},pt.tilt=function(Pt){return arguments.length?ft(We,$e=Pt*w):$e*S},pt.scale(432.147).clipAngle(x(1/We)*S-1e-6)}var xs=1e-4,Fu=1e4,jo=-180,Hs=jo+xs,is=180,Ko=is-xs,sl=-90,Gs=sl+xs,ti=90,Ws=ti-xs;function Nl(We){return We.length>0}function Ou(We){return Math.floor(We*Fu)/Fu}function Ys(We){return We===sl||We===ti?[0,We]:[jo,Ou(We)]}function ll(We){var $e=We[0],ft=We[1],pt=!1;return $e<=Hs?($e=jo,pt=!0):$e>=Ko&&($e=is,pt=!0),ft<=Gs?(ft=sl,pt=!0):ft>=Ws&&(ft=ti,pt=!0),pt?[$e,ft]:We}function Ul(We){return We.map(ll)}function su(We,$e,ft){for(var pt=0,Pt=We.length;pt<Pt;++pt){var St=We[pt].slice();ft.push({index:-1,polygon:$e,ring:St});for(var kt=0,ur=St.length;kt<ur;++kt){var dr=St[kt],$t=dr[0],mr=dr[1];if($t<=Hs||$t>=Ko||mr<=Gs||mr>=Ws){St[kt]=ll(dr);for(var Er=kt+1;Er<ur;++Er){var Ir=St[Er],Kr=Ir[0],hn=Ir[1];if(Kr>Hs&&Kr<Ko&&hn>Gs&&hn<Ws)break}if(Er===kt+1)continue;if(kt){var An={index:-1,polygon:$e,ring:St.slice(0,kt+1)};An.ring[An.ring.length-1]=Ys(mr),ft[ft.length-1]=An}else ft.pop();if(Er>=ur)break;ft.push({index:-1,polygon:$e,ring:St=St.slice(Er-1)}),St[0]=Ys(St[0][1]),kt=-1,ur=St.length}}}}function ul(We){var $e,ft=We.length,pt={},Pt={},St,kt,ur,dr,$t;for($e=0;$e<ft;++$e){if(St=We[$e],kt=St.ring[0],dr=St.ring[St.ring.length-1],kt[0]===dr[0]&&kt[1]===dr[1]){St.polygon.push(St.ring),We[$e]=null;continue}St.index=$e,pt[kt]=Pt[dr]=St}for($e=0;$e<ft;++$e)if(St=We[$e],St){if(kt=St.ring[0],dr=St.ring[St.ring.length-1],ur=Pt[kt],$t=pt[dr],delete pt[kt],delete Pt[dr],kt[0]===dr[0]&&kt[1]===dr[1]){St.polygon.push(St.ring);continue}ur?(delete Pt[kt],delete pt[ur.ring[0]],ur.ring.pop(),We[ur.index]=null,St={index:-1,polygon:ur.polygon,ring:ur.ring.concat(St.ring)},ur===$t?St.polygon.push(St.ring):(St.index=ft++,We.push(pt[St.ring[0]]=Pt[St.ring[St.ring.length-1]]=St))):$t?(delete pt[dr],delete Pt[$t.ring[$t.ring.length-1]],St.ring.pop(),St={index:ft++,polygon:$t.polygon,ring:St.ring.concat($t.ring)},We[$t.index]=null,We.push(pt[St.ring[0]]=Pt[St.ring[St.ring.length-1]]=St)):(St.ring.push(St.ring[0]),St.polygon.push(St.ring))}}function fl(We){var $e={type:"Feature",geometry:os(We.geometry)};return We.id!=null&&($e.id=We.id),We.bbox!=null&&($e.bbox=We.bbox),We.properties!=null&&($e.properties=We.properties),$e}function os(We){if(We==null)return We;var $e,ft,pt,Pt;switch(We.type){case"GeometryCollection":$e={type:"GeometryCollection",geometries:We.geometries.map(os)};break;case"Point":$e={type:"Point",coordinates:ll(We.coordinates)};break;case"MultiPoint":case"LineString":$e={type:We.type,coordinates:Ul(We.coordinates)};break;case"MultiLineString":$e={type:"MultiLineString",coordinates:We.coordinates.map(Ul)};break;case"Polygon":{var St=[];su(We.coordinates,St,ft=[]),ul(ft),$e={type:"Polygon",coordinates:St};break}case"MultiPolygon":{ft=[],pt=-1,Pt=We.coordinates.length;for(var kt=new Array(Pt);++pt<Pt;)su(We.coordinates[pt],kt[pt]=[],ft);ul(ft),$e={type:"MultiPolygon",coordinates:kt.filter(Nl)};break}default:return We}return We.bbox!=null&&($e.bbox=We.bbox),$e}function cl(We){if(We==null)return We;switch(We.type){case"Feature":return fl(We);case"FeatureCollection":{var $e={type:"FeatureCollection",features:We.features.map(fl)};return We.bbox!=null&&($e.bbox=We.bbox),$e}default:return os(We)}}function ss(We,$e){var ft=y($e/2),pt=l(v*ft);return[We*(.74482-.34588*pt*pt),1.70711*ft]}ss.invert=function(We,$e){var ft=$e/1.70711,pt=l(v*ft);return[We/(.74482-.34588*pt*pt),2*o(ft)]};function Li(){return(0,A.c)(ss).scale(146.153)}function Oo(We,$e,ft){var pt=(0,tu.c)($e,ft),Pt=pt(.5),St=(0,Ue.c)([-Pt[0],-Pt[1]])($e),kt=pt.distance/2,ur=-C(l(St[1]*w)/l(kt)),dr=[-Pt[0],-Pt[1],-(St[0]>0?f-ur:ur)*S],$t=(0,A.c)(We(kt)).rotate(dr),mr=(0,Ue.c)(dr),Er=$t.center;return delete $t.rotate,$t.center=function(Ir){return arguments.length?Er(mr(Ir)):mr.invert(Er())},$t.clipAngle(90)}function lu(We){var $e=M(We);function ft(pt,Pt){var St=(0,rs.Y)(pt,Pt);return St[0]*=$e,St}return ft.invert=function(pt,Pt){return rs.Y.invert(pt/$e,Pt)},ft}function bs(){return Vl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Vl(We,$e){return Oo(lu,We,$e)}function hl(We){if(!(We*=2))return ae.O;var $e=-We/2,ft=-$e,pt=We*We,Pt=y(ft),St=.5/l(ft);function kt(ur,dr){var $t=x(M(dr)*M(ur-$e)),mr=x(M(dr)*M(ur-ft)),Er=dr<0?-1:1;return $t*=$t,mr*=mr,[($t-mr)/(2*We),Er*k(4*pt*mr-(pt-$t+mr)*(pt-$t+mr))/(2*We)]}return kt.invert=function(ur,dr){var $t=dr*dr,mr=M(k($t+(Ir=ur+$e)*Ir)),Er=M(k($t+(Ir=ur+ft)*Ir)),Ir,Kr;return[L(Kr=mr-Er,Ir=(mr+Er)*Pt),(dr<0?-1:1)*x(k(Ir*Ir+Kr*Kr)*St)]},kt}function xf(){return Bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Bu(We,$e){return Oo(hl,We,$e)}function ji(We,$e){if(P($e)<h)return[We,0];var ft=P($e/n),pt=C(ft);if(P(We)<h||P(P($e)-n)<h)return[0,u($e)*f*y(pt/2)];var Pt=M(pt),St=P(f/We-We/f)/2,kt=St*St,ur=Pt/(ft+Pt-1),dr=ur*(2/ft-1),$t=dr*dr,mr=$t+kt,Er=ur-$t,Ir=kt+ur;return[u(We)*f*(St*Er+k(kt*Er*Er-mr*(ur*ur-$t)))/mr,u($e)*f*(dr*Ir-St*k((kt+1)*mr-Ir*Ir))/mr]}ji.invert=function(We,$e){if(P($e)<h)return[We,0];if(P(We)<h)return[0,n*l(2*o($e/f))];var ft=(We/=f)*We,pt=($e/=f)*$e,Pt=ft+pt,St=Pt*Pt,kt=-P($e)*(1+Pt),ur=kt-2*pt+ft,dr=-2*kt+1+2*pt+St,$t=pt/dr+(2*ur*ur*ur/(dr*dr*dr)-9*kt*ur/(dr*dr))/27,mr=(kt-ur*ur/(3*dr))/dr,Er=2*k(-mr/3),Ir=x(3*$t/(mr*Er))/3;return[f*(Pt-1+k(1+2*(ft-pt)+St))/(2*We),u($e)*f*(-Er*M(Ir+f/3)-ur/(3*dr))]};function vl(){return(0,A.c)(ji).scale(79.4183)}function Xs(We,$e){if(P($e)<h)return[We,0];var ft=P($e/n),pt=C(ft);if(P(We)<h||P(P($e)-n)<h)return[0,u($e)*f*y(pt/2)];var Pt=M(pt),St=P(f/We-We/f)/2,kt=St*St,ur=Pt*(k(1+kt)-St*Pt)/(1+kt*ft*ft);return[u(We)*f*ur,u($e)*f*k(1-ur*(2*St+ur))]}Xs.invert=function(We,$e){if(!We)return[0,n*l(2*o($e/f))];var ft=P(We/f),pt=(1-ft*ft-($e/=f)*$e)/(2*ft),Pt=pt*pt,St=k(Pt+1);return[u(We)*f*(St-pt),u($e)*n*l(2*L(k((1-2*pt*ft)*(pt+St)-ft),k(St+pt+ft)))]};function Nu(){return(0,A.c)(Xs).scale(79.4183)}function ls(We,$e){if(P($e)<h)return[We,0];var ft=$e/n,pt=C(ft);if(P(We)<h||P(P($e)-n)<h)return[0,f*y(pt/2)];var Pt=(f/We-We/f)/2,St=ft/(1+M(pt));return[f*(u(We)*k(Pt*Pt+1-St*St)-Pt),f*St]}ls.invert=function(We,$e){if(!$e)return[We,0];var ft=$e/f,pt=(f*f*(1-ft*ft)-We*We)/(2*f*We);return[We?f*(u(We)*k(pt*pt+1)-pt):0,n*l(2*o(ft))]};function bf(){return(0,A.c)(ls).scale(79.4183)}function oo(We,$e){if(!$e)return[We,0];var ft=P($e);if(!We||ft===n)return[0,$e];var pt=ft/n,Pt=pt*pt,St=(8*pt-Pt*(Pt+2)-5)/(2*Pt*(pt-1)),kt=St*St,ur=pt*St,dr=Pt+kt+2*ur,$t=pt+3*St,mr=We/n,Er=mr+1/mr,Ir=u(P(We)-n)*k(Er*Er-4),Kr=Ir*Ir,hn=dr*(Pt+kt*Kr-1)+(1-Pt)*(Pt*($t*$t+4*kt)+12*ur*kt+4*kt*kt),An=(Ir*(dr+kt-1)+2*k(hn))/(4*dr+Kr);return[u(We)*n*An,u($e)*n*k(1+Ir*P(An)-An*An)]}oo.invert=function(We,$e){var ft;if(!We||!$e)return[We,$e];$e/=f;var pt=u(We)*We/n,Pt=(pt*pt-1+4*$e*$e)/P(pt),St=Pt*Pt,kt=2*$e,ur=50;do{var dr=kt*kt,$t=(8*kt-dr*(dr+2)-5)/(2*dr*(kt-1)),mr=(3*kt-dr*kt-10)/(2*dr*kt),Er=$t*$t,Ir=kt*$t,Kr=kt+$t,hn=Kr*Kr,An=kt+3*$t,Sn=hn*(dr+Er*St-1)+(1-dr)*(dr*(An*An+4*Er)+Er*(12*Ir+4*Er)),Un=-2*Kr*(4*Ir*Er+(1-4*dr+3*dr*dr)*(1+mr)+Er*(-6+14*dr-St+(-8+8*dr-2*St)*mr)+Ir*(-8+12*dr+(-10+10*dr-St)*mr)),wa=k(Sn),Ta=Pt*(hn+Er-1)+2*wa-pt*(4*hn+St),Aa=Pt*(2*$t*mr+2*Kr*(1+mr))+Un/wa-8*Kr*(Pt*(-1+Er+hn)+2*wa)*(1+mr)/(St+4*hn);kt-=ft=Ta/Aa}while(ft>h&&--ur>0);return[u(We)*(k(Pt*Pt+4)+Pt)*f/4,n*kt]};function dl(){return(0,A.c)(oo).scale(127.16)}function Hl(We,$e,ft,pt,Pt){function St(kt,ur){var dr=ft*l(pt*ur),$t=k(1-dr*dr),mr=k(2/(1+$t*M(kt*=Pt)));return[We*$t*mr*l(kt),$e*dr*mr]}return St.invert=function(kt,ur){var dr=kt/We,$t=ur/$e,mr=k(dr*dr+$t*$t),Er=2*C(mr/2);return[L(kt*y(Er),We*mr)/Pt,mr&&C(ur*l(Er)/($e*ft*mr))/pt]},St}function Jo(We,$e,ft,pt){var Pt=f/3;We=t(We,h),$e=t($e,h),We=s(We,n),$e=s($e,f-h),ft=t(ft,0),ft=s(ft,100-h),pt=t(pt,h);var St=ft/100+1,kt=pt/100,ur=x(St*M(Pt))/Pt,dr=l(We)/l(ur*n),$t=$e/f,mr=k(kt*l(We/2)/l($e/2)),Er=mr/k($t*dr*ur),Ir=1/(mr*k($t*dr*ur));return Hl(Er,Ir,dr,ur,$t)}function us(){var We=65*w,$e=60*w,ft=20,pt=200,Pt=(0,A.U)(Jo),St=Pt(We,$e,ft,pt);return St.poleline=function(kt){return arguments.length?Pt(We=+kt*w,$e,ft,pt):We*S},St.parallels=function(kt){return arguments.length?Pt(We,$e=+kt*w,ft,pt):$e*S},St.inflation=function(kt){return arguments.length?Pt(We,$e,ft=+kt,pt):ft},St.ratio=function(kt){return arguments.length?Pt(We,$e,ft,pt=+kt):pt},St.scale(163.775)}function uu(){return us().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var pl=4*f+3*k(3),yl=2*k(2*f*k(3)/pl),Gl=ye(yl*k(3)/f,yl,pl/6);function Uu(){return(0,A.c)(Gl).scale(176.84)}function ml(We,$e){return[We*k(1-3*$e*$e/(f*f)),$e]}ml.invert=function(We,$e){return[We/k(1-3*$e*$e/(f*f)),$e]};function fu(){return(0,A.c)(ml).scale(152.63)}function ws(We,$e){var ft=M($e),pt=M(We)*ft,Pt=1-pt,St=M(We=L(l(We)*ft,-l($e))),kt=l(We);return ft=k(1-pt*pt),[kt*ft-St*Pt,-St*ft-kt*Pt]}ws.invert=function(We,$e){var ft=(We*We+$e*$e)/-2,pt=k(-ft*(2+ft)),Pt=$e*ft+We*pt,St=We*ft-$e*pt,kt=k(St*St+Pt*Pt);return[L(pt*Pt,kt*(1+ft)),kt?-C(pt*St/kt):0]};function cu(){return(0,A.c)(ws).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function xl(We,$e){var ft=V(We,$e);return[(ft[0]+We/n)/2,(ft[1]+$e)/2]}xl.invert=function(We,$e){var ft=We,pt=$e,Pt=25;do{var St=M(pt),kt=l(pt),ur=l(2*pt),dr=kt*kt,$t=St*St,mr=l(ft),Er=M(ft/2),Ir=l(ft/2),Kr=Ir*Ir,hn=1-$t*Er*Er,An=hn?x(St*Er)*k(Sn=1/hn):Sn=0,Sn,Un=.5*(2*An*St*Ir+ft/n)-We,wa=.5*(An*kt+pt)-$e,Ta=.5*Sn*($t*Kr+An*St*Er*dr)+.5/n,Aa=Sn*(mr*ur/4-An*kt*Ir),Ca=.125*Sn*(ur*Ir-An*kt*$t*mr),Oa=.5*Sn*(dr*Er+An*Kr*St)+.5,ri=Aa*Ca-Oa*Ta,wi=(wa*Aa-Un*Oa)/ri,se=(Un*Ca-wa*Ta)/ri;ft-=wi,pt-=se}while((P(wi)>h||P(se)>h)&&--Pt>0);return[ft,pt]};function Vu(){return(0,A.c)(xl).scale(158.837)}},88728:function(te,X,e){e.d(X,{c:function(){return A}});function A(){return new P}function P(){this.reset()}P.prototype={constructor:P,reset:function(){this.s=this.t=0},add:function(M){L(o,M,this.t),L(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new P;function L(M,d,g){var r=M.s=d+g,t=r-d,s=r-t;M.t=d-s+(g-t)}},95384:function(te,X,e){e.d(X,{cp:function(){return T},mQ:function(){return M},oB:function(){return c}});var A=e(88728),P=e(64528),o=e(70932),L=e(16016),M=(0,A.c)(),d=(0,A.c)(),g,r,t,s,a,c={point:o.c,lineStart:o.c,lineEnd:o.c,polygonStart:function(){M.reset(),c.lineStart=u,c.lineEnd=l},polygonEnd:function(){var f=+M;d.add(f<0?P.kD+f:f),this.lineStart=this.lineEnd=this.point=o.c},sphere:function(){d.add(P.kD)}};function u(){c.point=y}function l(){h(g,r)}function y(f,n){c.point=h,g=f,r=n,f*=P.qw,n*=P.qw,t=f,s=(0,P.W8)(n=n/2+P.wL),a=(0,P.g$)(n)}function h(f,n){f*=P.qw,n*=P.qw,n=n/2+P.wL;var v=f-t,m=v>=0?1:-1,b=m*v,E=(0,P.W8)(n),p=(0,P.g$)(n),S=a*p,w=s*E+S*(0,P.W8)(b),i=S*m*(0,P.g$)(b);M.add((0,P.WE)(i,w)),t=f,s=E,a=p}function T(f){return d.reset(),(0,L.c)(f,c),d*2}},13696:function(te,X,e){e.d(X,{c:function(){return C}});var A=e(88728),P=e(95384),o=e(84220),L=e(64528),M=e(16016),d,g,r,t,s,a,c,u,l=(0,A.c)(),y,h,T={point:f,lineStart:v,lineEnd:m,polygonStart:function(){T.point=b,T.lineStart=E,T.lineEnd=p,l.reset(),P.oB.polygonStart()},polygonEnd:function(){P.oB.polygonEnd(),T.point=f,T.lineStart=v,T.lineEnd=m,P.mQ<0?(d=-(r=180),g=-(t=90)):l>L.Gg?t=90:l<-L.Gg&&(g=-90),h[0]=d,h[1]=r},sphere:function(){d=-(r=180),g=-(t=90)}};function f(x,k){y.push(h=[d=x,r=x]),k<g&&(g=k),k>t&&(t=k)}function n(x,k){var I=(0,o.ux)([x*L.qw,k*L.qw]);if(u){var B=(0,o.CW)(u,I),_=[B[1],-B[0],0],z=(0,o.CW)(_,B);(0,o.cJ)(z),z=(0,o.G)(z);var O=x-s,F=O>0?1:-1,N=z[0]*L.oh*F,V,j=(0,L.a2)(O)>180;j^(F*s<N&&N<F*x)?(V=z[1]*L.oh,V>t&&(t=V)):(N=(N+360)%360-180,j^(F*s<N&&N<F*x)?(V=-z[1]*L.oh,V<g&&(g=V)):(k<g&&(g=k),k>t&&(t=k))),j?x<s?S(d,x)>S(d,r)&&(r=x):S(x,r)>S(d,r)&&(d=x):r>=d?(x<d&&(d=x),x>r&&(r=x)):x>s?S(d,x)>S(d,r)&&(r=x):S(x,r)>S(d,r)&&(d=x)}else y.push(h=[d=x,r=x]);k<g&&(g=k),k>t&&(t=k),u=I,s=x}function v(){T.point=n}function m(){h[0]=d,h[1]=r,T.point=f,u=null}function b(x,k){if(u){var I=x-s;l.add((0,L.a2)(I)>180?I+(I>0?360:-360):I)}else a=x,c=k;P.oB.point(x,k),n(x,k)}function E(){P.oB.lineStart()}function p(){b(a,c),P.oB.lineEnd(),(0,L.a2)(l)>L.Gg&&(d=-(r=180)),h[0]=d,h[1]=r,u=null}function S(x,k){return(k-=x)<0?k+360:k}function w(x,k){return x[0]-k[0]}function i(x,k){return x[0]<=x[1]?x[0]<=k&&k<=x[1]:k<x[0]||x[1]<k}function C(x){var k,I,B,_,z,O,F;if(t=r=-(d=g=1/0),y=[],(0,M.c)(x,T),I=y.length){for(y.sort(w),k=1,B=y[0],z=[B];k<I;++k)_=y[k],i(B,_[0])||i(B,_[1])?(S(B[0],_[1])>S(B[0],B[1])&&(B[1]=_[1]),S(_[0],B[1])>S(B[0],B[1])&&(B[0]=_[0])):z.push(B=_);for(O=-1/0,I=z.length-1,k=0,B=z[I];k<=I;B=_,++k)_=z[k],(F=S(B[1],_[0]))>O&&(O=F,d=_[0],r=B[1])}return y=h=null,d===1/0||g===1/0?[[NaN,NaN],[NaN,NaN]]:[[d,g],[r,t]]}},84220:function(te,X,e){e.d(X,{CW:function(){return M},Ez:function(){return L},G:function(){return P},cJ:function(){return r},mg:function(){return d},ux:function(){return o},wx:function(){return g}});var A=e(64528);function P(t){return[(0,A.WE)(t[1],t[0]),(0,A.qR)(t[2])]}function o(t){var s=t[0],a=t[1],c=(0,A.W8)(a);return[c*(0,A.W8)(s),c*(0,A.g$)(s),(0,A.g$)(a)]}function L(t,s){return t[0]*s[0]+t[1]*s[1]+t[2]*s[2]}function M(t,s){return[t[1]*s[2]-t[2]*s[1],t[2]*s[0]-t[0]*s[2],t[0]*s[1]-t[1]*s[0]]}function d(t,s){t[0]+=s[0],t[1]+=s[1],t[2]+=s[2]}function g(t,s){return[t[0]*s,t[1]*s,t[2]*s]}function r(t){var s=(0,A._I)(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=s,t[1]/=s,t[2]/=s}},24052:function(te,X,e){e.d(X,{c:function(){return I}});var A=e(64528),P=e(70932),o=e(16016),L,M,d,g,r,t,s,a,c,u,l,y,h,T,f,n,v={sphere:P.c,point:m,lineStart:E,lineEnd:w,polygonStart:function(){v.lineStart=i,v.lineEnd=C},polygonEnd:function(){v.lineStart=E,v.lineEnd=w}};function m(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_);b(z*(0,A.W8)(B),z*(0,A.g$)(B),(0,A.g$)(_))}function b(B,_,z){++L,d+=(B-d)/L,g+=(_-g)/L,r+=(z-r)/L}function E(){v.point=p}function p(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_);T=z*(0,A.W8)(B),f=z*(0,A.g$)(B),n=(0,A.g$)(_),v.point=S,b(T,f,n)}function S(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_),O=z*(0,A.W8)(B),F=z*(0,A.g$)(B),N=(0,A.g$)(_),V=(0,A.WE)((0,A._I)((V=f*N-n*F)*V+(V=n*O-T*N)*V+(V=T*F-f*O)*V),T*O+f*F+n*N);M+=V,t+=V*(T+(T=O)),s+=V*(f+(f=F)),a+=V*(n+(n=N)),b(T,f,n)}function w(){v.point=m}function i(){v.point=x}function C(){k(y,h),v.point=m}function x(B,_){y=B,h=_,B*=A.qw,_*=A.qw,v.point=k;var z=(0,A.W8)(_);T=z*(0,A.W8)(B),f=z*(0,A.g$)(B),n=(0,A.g$)(_),b(T,f,n)}function k(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_),O=z*(0,A.W8)(B),F=z*(0,A.g$)(B),N=(0,A.g$)(_),V=f*N-n*F,j=n*O-T*N,$=T*F-f*O,q=(0,A._I)(V*V+j*j+$*$),oe=(0,A.qR)(q),Z=q&&-oe/q;c+=Z*V,u+=Z*j,l+=Z*$,M+=oe,t+=oe*(T+(T=O)),s+=oe*(f+(f=F)),a+=oe*(n+(n=N)),b(T,f,n)}function I(B){L=M=d=g=r=t=s=a=c=u=l=0,(0,o.c)(B,v);var _=c,z=u,O=l,F=_*_+z*z+O*O;return F<A.a8&&(_=t,z=s,O=a,M<A.Gg&&(_=d,z=g,O=r),F=_*_+z*z+O*O,F<A.a8)?[NaN,NaN]:[(0,A.WE)(z,_)*A.oh,(0,A.qR)(O/(0,A._I)(F))*A.oh]}},61780:function(te,X,e){e.d(X,{Q:function(){return M},c:function(){return g}});var A=e(84220);function P(r){return function(){return r}}var o=e(64528),L=e(92992);function M(r,t,s,a,c,u){if(s){var l=(0,o.W8)(t),y=(0,o.g$)(t),h=a*s;c==null?(c=t+a*o.kD,u=t-h/2):(c=d(l,c),u=d(l,u),(a>0?c<u:c>u)&&(c+=a*o.kD));for(var T,f=c;a>0?f>u:f<u;f-=h)T=(0,A.G)([l,-y*(0,o.W8)(f),-y*(0,o.g$)(f)]),r.point(T[0],T[1])}}function d(r,t){t=(0,A.ux)(t),t[0]-=r,(0,A.cJ)(t);var s=(0,o.mE)(-t[1]);return((-t[2]<0?-s:s)+o.kD-o.Gg)%o.kD}function g(){var r=P([0,0]),t=P(90),s=P(6),a,c,u={point:l};function l(h,T){a.push(h=c(h,T)),h[0]*=o.oh,h[1]*=o.oh}function y(){var h=r.apply(this,arguments),T=t.apply(this,arguments)*o.qw,f=s.apply(this,arguments)*o.qw;return a=[],c=(0,L.O)(-h[0]*o.qw,-h[1]*o.qw,0).invert,M(u,T,f,1),h={type:"Polygon",coordinates:[a]},a=c=null,h}return y.center=function(h){return arguments.length?(r=typeof h=="function"?h:P([+h[0],+h[1]]),y):r},y.radius=function(h){return arguments.length?(t=typeof h=="function"?h:P(+h),y):t},y.precision=function(h){return arguments.length?(s=typeof h=="function"?h:P(+h),y):s},y}},78284:function(te,X,e){var A=e(14229),P=e(64528);X.c=(0,A.c)(function(){return!0},o,M,[-P.pi,-P.or]);function o(d){var g=NaN,r=NaN,t=NaN,s;return{lineStart:function(){d.lineStart(),s=1},point:function(a,c){var u=a>0?P.pi:-P.pi,l=(0,P.a2)(a-g);(0,P.a2)(l-P.pi)<P.Gg?(d.point(g,r=(r+c)/2>0?P.or:-P.or),d.point(t,r),d.lineEnd(),d.lineStart(),d.point(u,r),d.point(a,r),s=0):t!==u&&l>=P.pi&&((0,P.a2)(g-t)<P.Gg&&(g-=t*P.Gg),(0,P.a2)(a-u)<P.Gg&&(a-=u*P.Gg),r=L(g,r,a,c),d.point(t,r),d.lineEnd(),d.lineStart(),d.point(u,r),s=0),d.point(g=a,r=c),t=u},lineEnd:function(){d.lineEnd(),g=r=NaN},clean:function(){return 2-s}}}function L(d,g,r,t){var s,a,c=(0,P.g$)(d-r);return(0,P.a2)(c)>P.Gg?(0,P.MQ)(((0,P.g$)(g)*(a=(0,P.W8)(t))*(0,P.g$)(r)-(0,P.g$)(t)*(s=(0,P.W8)(g))*(0,P.g$)(d))/(s*a*c)):(g+t)/2}function M(d,g,r,t){var s;if(d==null)s=r*P.or,t.point(-P.pi,s),t.point(0,s),t.point(P.pi,s),t.point(P.pi,0),t.point(P.pi,-s),t.point(0,-s),t.point(-P.pi,-s),t.point(-P.pi,0),t.point(-P.pi,s);else if((0,P.a2)(d[0]-g[0])>P.Gg){var a=d[0]<g[0]?P.pi:-P.pi;s=r*a/2,t.point(-a,s),t.point(0,s),t.point(a,s)}else t.point(g[0],g[1])}},97208:function(te,X,e){e.d(X,{c:function(){return P}});var A=e(70932);function P(){var o=[],L;return{point:function(M,d,g){L.push([M,d,g])},lineStart:function(){o.push(L=[])},lineEnd:A.c,rejoin:function(){o.length>1&&o.push(o.pop().concat(o.shift()))},result:function(){var M=o;return o=[],L=null,M}}}},2728:function(te,X,e){e.d(X,{c:function(){return d}});var A=e(84220),P=e(61780),o=e(64528),L=e(41860),M=e(14229);function d(g){var r=(0,o.W8)(g),t=6*o.qw,s=r>0,a=(0,o.a2)(r)>o.Gg;function c(T,f,n,v){(0,P.Q)(v,g,t,n,T,f)}function u(T,f){return(0,o.W8)(T)*(0,o.W8)(f)>r}function l(T){var f,n,v,m,b;return{lineStart:function(){m=v=!1,b=1},point:function(E,p){var S=[E,p],w,i=u(E,p),C=s?i?0:h(E,p):i?h(E+(E<0?o.pi:-o.pi),p):0;if(!f&&(m=v=i)&&T.lineStart(),i!==v&&(w=y(f,S),(!w||(0,L.c)(f,w)||(0,L.c)(S,w))&&(S[2]=1)),i!==v)b=0,i?(T.lineStart(),w=y(S,f),T.point(w[0],w[1])):(w=y(f,S),T.point(w[0],w[1],2),T.lineEnd()),f=w;else if(a&&f&&s^i){var x;!(C&n)&&(x=y(S,f,!0))&&(b=0,s?(T.lineStart(),T.point(x[0][0],x[0][1]),T.point(x[1][0],x[1][1]),T.lineEnd()):(T.point(x[1][0],x[1][1]),T.lineEnd(),T.lineStart(),T.point(x[0][0],x[0][1],3)))}i&&(!f||!(0,L.c)(f,S))&&T.point(S[0],S[1]),f=S,v=i,n=C},lineEnd:function(){v&&T.lineEnd(),f=null},clean:function(){return b|(m&&v)<<1}}}function y(T,f,n){var v=(0,A.ux)(T),m=(0,A.ux)(f),b=[1,0,0],E=(0,A.CW)(v,m),p=(0,A.Ez)(E,E),S=E[0],w=p-S*S;if(!w)return!n&&T;var i=r*p/w,C=-r*S/w,x=(0,A.CW)(b,E),k=(0,A.wx)(b,i),I=(0,A.wx)(E,C);(0,A.mg)(k,I);var B=x,_=(0,A.Ez)(k,B),z=(0,A.Ez)(B,B),O=_*_-z*((0,A.Ez)(k,k)-1);if(!(O<0)){var F=(0,o._I)(O),N=(0,A.wx)(B,(-_-F)/z);if((0,A.mg)(N,k),N=(0,A.G)(N),!n)return N;var V=T[0],j=f[0],$=T[1],q=f[1],oe;j<V&&(oe=V,V=j,j=oe);var Z=j-V,G=(0,o.a2)(Z-o.pi)<o.Gg,re=G||Z<o.Gg;if(!G&&q<$&&(oe=$,$=q,q=oe),re?G?$+q>0^N[1]<((0,o.a2)(N[0]-V)<o.Gg?$:q):$<=N[1]&&N[1]<=q:Z>o.pi^(V<=N[0]&&N[0]<=j)){var H=(0,A.wx)(B,(-_+F)/z);return(0,A.mg)(H,k),[N,(0,A.G)(H)]}}}function h(T,f){var n=s?g:o.pi-g,v=0;return T<-n?v|=1:T>n&&(v|=2),f<-n?v|=4:f>n&&(v|=8),v}return(0,M.c)(u,l,c,s?[0,-g]:[-o.pi,g-o.pi])}},14229:function(te,X,e){e.d(X,{c:function(){return d}});var A=e(97208),P=e(32232),o=e(64528),L=e(58196),M=e(84706);function d(t,s,a,c){return function(u){var l=s(u),y=(0,A.c)(),h=s(y),T=!1,f,n,v,m={point:b,lineStart:p,lineEnd:S,polygonStart:function(){m.point=w,m.lineStart=i,m.lineEnd=C,n=[],f=[]},polygonEnd:function(){m.point=b,m.lineStart=p,m.lineEnd=S,n=(0,M.Uf)(n);var x=(0,L.c)(f,c);n.length?(T||(u.polygonStart(),T=!0),(0,P.c)(n,r,x,a,u)):x&&(T||(u.polygonStart(),T=!0),u.lineStart(),a(null,null,1,u),u.lineEnd()),T&&(u.polygonEnd(),T=!1),n=f=null},sphere:function(){u.polygonStart(),u.lineStart(),a(null,null,1,u),u.lineEnd(),u.polygonEnd()}};function b(x,k){t(x,k)&&u.point(x,k)}function E(x,k){l.point(x,k)}function p(){m.point=E,l.lineStart()}function S(){m.point=b,l.lineEnd()}function w(x,k){v.push([x,k]),h.point(x,k)}function i(){h.lineStart(),v=[]}function C(){w(v[0][0],v[0][1]),h.lineEnd();var x=h.clean(),k=y.result(),I,B=k.length,_,z,O;if(v.pop(),f.push(v),v=null,!!B){if(x&1){if(z=k[0],(_=z.length-1)>0){for(T||(u.polygonStart(),T=!0),u.lineStart(),I=0;I<_;++I)u.point((O=z[I])[0],O[1]);u.lineEnd()}return}B>1&&x&2&&k.push(k.pop().concat(k.shift())),n.push(k.filter(g))}}return m}}function g(t){return t.length>1}function r(t,s){return((t=t.x)[0]<0?t[1]-o.or-o.Gg:o.or-t[1])-((s=s.x)[0]<0?s[1]-o.or-o.Gg:o.or-s[1])}},21676:function(te,X,e){e.d(X,{c:function(){return r}});var A=e(64528),P=e(97208);function o(t,s,a,c,u,l){var y=t[0],h=t[1],T=s[0],f=s[1],n=0,v=1,m=T-y,b=f-h,E;if(E=a-y,!(!m&&E>0)){if(E/=m,m<0){if(E<n)return;E<v&&(v=E)}else if(m>0){if(E>v)return;E>n&&(n=E)}if(E=u-y,!(!m&&E<0)){if(E/=m,m<0){if(E>v)return;E>n&&(n=E)}else if(m>0){if(E<n)return;E<v&&(v=E)}if(E=c-h,!(!b&&E>0)){if(E/=b,b<0){if(E<n)return;E<v&&(v=E)}else if(b>0){if(E>v)return;E>n&&(n=E)}if(E=l-h,!(!b&&E<0)){if(E/=b,b<0){if(E>v)return;E>n&&(n=E)}else if(b>0){if(E<n)return;E<v&&(v=E)}return n>0&&(t[0]=y+n*m,t[1]=h+n*b),v<1&&(s[0]=y+v*m,s[1]=h+v*b),!0}}}}}var L=e(32232),M=e(84706),d=1e9,g=-1e9;function r(t,s,a,c){function u(f,n){return t<=f&&f<=a&&s<=n&&n<=c}function l(f,n,v,m){var b=0,E=0;if(f==null||(b=y(f,v))!==(E=y(n,v))||T(f,n)<0^v>0)do m.point(b===0||b===3?t:a,b>1?c:s);while((b=(b+v+4)%4)!==E);else m.point(n[0],n[1])}function y(f,n){return(0,A.a2)(f[0]-t)<A.Gg?n>0?0:3:(0,A.a2)(f[0]-a)<A.Gg?n>0?2:1:(0,A.a2)(f[1]-s)<A.Gg?n>0?1:0:n>0?3:2}function h(f,n){return T(f.x,n.x)}function T(f,n){var v=y(f,1),m=y(n,1);return v!==m?v-m:v===0?n[1]-f[1]:v===1?f[0]-n[0]:v===2?f[1]-n[1]:n[0]-f[0]}return function(f){var n=f,v=(0,P.c)(),m,b,E,p,S,w,i,C,x,k,I,B={point:_,lineStart:N,lineEnd:V,polygonStart:O,polygonEnd:F};function _($,q){u($,q)&&n.point($,q)}function z(){for(var $=0,q=0,oe=b.length;q<oe;++q)for(var Z=b[q],G=1,re=Z.length,H=Z[0],J,ae,K=H[0],Y=H[1];G<re;++G)J=K,ae=Y,H=Z[G],K=H[0],Y=H[1],ae<=c?Y>c&&(K-J)*(c-ae)>(Y-ae)*(t-J)&&++$:Y<=c&&(K-J)*(c-ae)<(Y-ae)*(t-J)&&--$;return $}function O(){n=v,m=[],b=[],I=!0}function F(){var $=z(),q=I&&$,oe=(m=(0,M.Uf)(m)).length;(q||oe)&&(f.polygonStart(),q&&(f.lineStart(),l(null,null,1,f),f.lineEnd()),oe&&(0,L.c)(m,h,$,l,f),f.polygonEnd()),n=f,m=b=E=null}function N(){B.point=j,b&&b.push(E=[]),k=!0,x=!1,i=C=NaN}function V(){m&&(j(p,S),w&&x&&v.rejoin(),m.push(v.result())),B.point=_,x&&n.lineEnd()}function j($,q){var oe=u($,q);if(b&&E.push([$,q]),k)p=$,S=q,w=oe,k=!1,oe&&(n.lineStart(),n.point($,q));else if(oe&&x)n.point($,q);else{var Z=[i=Math.max(g,Math.min(d,i)),C=Math.max(g,Math.min(d,C))],G=[$=Math.max(g,Math.min(d,$)),q=Math.max(g,Math.min(d,q))];o(Z,G,t,s,a,c)?(x||(n.lineStart(),n.point(Z[0],Z[1])),n.point(G[0],G[1]),oe||n.lineEnd(),I=!1):oe&&(n.lineStart(),n.point($,q),I=!1)}i=$,C=q,x=oe}return B}}},32232:function(te,X,e){e.d(X,{c:function(){return L}});var A=e(41860),P=e(64528);function o(d,g,r,t){this.x=d,this.z=g,this.o=r,this.e=t,this.v=!1,this.n=this.p=null}function L(d,g,r,t,s){var a=[],c=[],u,l;if(d.forEach(function(v){if(!((m=v.length-1)<=0)){var m,b=v[0],E=v[m],p;if((0,A.c)(b,E)){if(!b[2]&&!E[2]){for(s.lineStart(),u=0;u<m;++u)s.point((b=v[u])[0],b[1]);s.lineEnd();return}E[0]+=2*P.Gg}a.push(p=new o(b,v,null,!0)),c.push(p.o=new o(b,null,p,!1)),a.push(p=new o(E,v,null,!1)),c.push(p.o=new o(E,null,p,!0))}}),!!a.length){for(c.sort(g),M(a),M(c),u=0,l=c.length;u<l;++u)c[u].e=r=!r;for(var y=a[0],h,T;;){for(var f=y,n=!0;f.v;)if((f=f.n)===y)return;h=f.z,s.lineStart();do{if(f.v=f.o.v=!0,f.e){if(n)for(u=0,l=h.length;u<l;++u)s.point((T=h[u])[0],T[1]);else t(f.x,f.n.x,1,s);f=f.n}else{if(n)for(h=f.p.z,u=h.length-1;u>=0;--u)s.point((T=h[u])[0],T[1]);else t(f.x,f.p.x,-1,s);f=f.p}f=f.o,h=f.z,n=!n}while(!f.v);s.lineEnd()}}}function M(d){if(g=d.length){for(var g,r=0,t=d[0],s;++r<g;)t.n=s=d[r],s.p=t,t=s;t.n=s=d[0],s.p=t}}},68120:function(te,X,e){e.d(X,{c:function(){return A}});function A(P,o){function L(M,d){return M=P(M,d),o(M[0],M[1])}return P.invert&&o.invert&&(L.invert=function(M,d){return M=o.invert(M,d),M&&P.invert(M[0],M[1])}),L}},7376:function(te,X,e){e.d(X,{c:function(){return A}});function A(P){return P}},83356:function(te,X,e){e.r(X),e.d(X,{geoAlbers:function(){return cr},geoAlbersUsa:function(){return qe},geoArea:function(){return A.cp},geoAzimuthalEqualArea:function(){return dt.c},geoAzimuthalEqualAreaRaw:function(){return dt.y},geoAzimuthalEquidistant:function(){return bt.c},geoAzimuthalEquidistantRaw:function(){return bt.O},geoBounds:function(){return P.c},geoCentroid:function(){return o.c},geoCircle:function(){return L.c},geoClipAntimeridian:function(){return M.c},geoClipCircle:function(){return d.c},geoClipExtent:function(){return r},geoClipRectangle:function(){return g.c},geoConicConformal:function(){return ar},geoConicConformalRaw:function(){return nr},geoConicEqualArea:function(){return Wt},geoConicEqualAreaRaw:function(){return Ht},geoConicEquidistant:function(){return Fe},geoConicEquidistantRaw:function(){return Be},geoContains:function(){return O},geoDistance:function(){return w},geoEqualEarth:function(){return sr},geoEqualEarthRaw:function(){return Dt},geoEquirectangular:function(){return ir.c},geoEquirectangularRaw:function(){return ir.u},geoGnomonic:function(){return fr.c},geoGnomonicRaw:function(){return fr.Y},geoGraticule:function(){return j},geoGraticule10:function(){return $},geoIdentity:function(){return lr},geoInterpolate:function(){return q.c},geoLength:function(){return E},geoMercator:function(){return _t},geoMercatorRaw:function(){return Mt},geoNaturalEarth1:function(){return Or.c},geoNaturalEarth1Raw:function(){return Or.g},geoOrthographic:function(){return Sr.c},geoOrthographicRaw:function(){return Sr.t},geoPath:function(){return Ct},geoProjection:function(){return Yt.c},geoProjectionMutator:function(){return Yt.U},geoRotation:function(){return Et.c},geoStereographic:function(){return Jr},geoStereographicRaw:function(){return sn},geoStream:function(){return u.c},geoTransform:function(){return vr.c},geoTransverseMercator:function(){return xn},geoTransverseMercatorRaw:function(){return bn}});var A=e(95384),P=e(13696),o=e(24052),L=e(61780),M=e(78284),d=e(2728),g=e(21676);function r(){var or=0,Lr=0,Br=960,_r=500,Qr,un,ln;return ln={stream:function(Mn){return Qr&&un===Mn?Qr:Qr=(0,g.c)(or,Lr,Br,_r)(un=Mn)},extent:function(Mn){return arguments.length?(or=+Mn[0][0],Lr=+Mn[0][1],Br=+Mn[1][0],_r=+Mn[1][1],Qr=un=null,ln):[[or,Lr],[Br,_r]]}}}var t=e(58196),s=e(88728),a=e(64528),c=e(70932),u=e(16016),l=(0,s.c)(),y,h,T,f={sphere:c.c,point:c.c,lineStart:n,lineEnd:c.c,polygonStart:c.c,polygonEnd:c.c};function n(){f.point=m,f.lineEnd=v}function v(){f.point=f.lineEnd=c.c}function m(or,Lr){or*=a.qw,Lr*=a.qw,y=or,h=(0,a.g$)(Lr),T=(0,a.W8)(Lr),f.point=b}function b(or,Lr){or*=a.qw,Lr*=a.qw;var Br=(0,a.g$)(Lr),_r=(0,a.W8)(Lr),Qr=(0,a.a2)(or-y),un=(0,a.W8)(Qr),ln=(0,a.g$)(Qr),Mn=_r*ln,Dn=T*Br-h*_r*un,Kn=h*Br+T*_r*un;l.add((0,a.WE)((0,a._I)(Mn*Mn+Dn*Dn),Kn)),y=or,h=Br,T=_r}function E(or){return l.reset(),(0,u.c)(or,f),+l}var p=[null,null],S={type:"LineString",coordinates:p};function w(or,Lr){return p[0]=or,p[1]=Lr,E(S)}var i={Feature:function(or,Lr){return x(or.geometry,Lr)},FeatureCollection:function(or,Lr){for(var Br=or.features,_r=-1,Qr=Br.length;++_r<Qr;)if(x(Br[_r].geometry,Lr))return!0;return!1}},C={Sphere:function(){return!0},Point:function(or,Lr){return k(or.coordinates,Lr)},MultiPoint:function(or,Lr){for(var Br=or.coordinates,_r=-1,Qr=Br.length;++_r<Qr;)if(k(Br[_r],Lr))return!0;return!1},LineString:function(or,Lr){return I(or.coordinates,Lr)},MultiLineString:function(or,Lr){for(var Br=or.coordinates,_r=-1,Qr=Br.length;++_r<Qr;)if(I(Br[_r],Lr))return!0;return!1},Polygon:function(or,Lr){return B(or.coordinates,Lr)},MultiPolygon:function(or,Lr){for(var Br=or.coordinates,_r=-1,Qr=Br.length;++_r<Qr;)if(B(Br[_r],Lr))return!0;return!1},GeometryCollection:function(or,Lr){for(var Br=or.geometries,_r=-1,Qr=Br.length;++_r<Qr;)if(x(Br[_r],Lr))return!0;return!1}};function x(or,Lr){return or&&C.hasOwnProperty(or.type)?C[or.type](or,Lr):!1}function k(or,Lr){return w(or,Lr)===0}function I(or,Lr){for(var Br,_r,Qr,un=0,ln=or.length;un<ln;un++){if(_r=w(or[un],Lr),_r===0||un>0&&(Qr=w(or[un],or[un-1]),Qr>0&&Br<=Qr&&_r<=Qr&&(Br+_r-Qr)*(1-Math.pow((Br-_r)/Qr,2))<a.a8*Qr))return!0;Br=_r}return!1}function B(or,Lr){return!!(0,t.c)(or.map(_),z(Lr))}function _(or){return or=or.map(z),or.pop(),or}function z(or){return[or[0]*a.qw,or[1]*a.qw]}function O(or,Lr){return(or&&i.hasOwnProperty(or.type)?i[or.type]:x)(or,Lr)}var F=e(84706);function N(or,Lr,Br){var _r=(0,F.ik)(or,Lr-a.Gg,Br).concat(Lr);return function(Qr){return _r.map(function(un){return[Qr,un]})}}function V(or,Lr,Br){var _r=(0,F.ik)(or,Lr-a.Gg,Br).concat(Lr);return function(Qr){return _r.map(function(un){return[un,Qr]})}}function j(){var or,Lr,Br,_r,Qr,un,ln,Mn,Dn=10,Kn=Dn,sa=90,na=360,Jn,aa,pr,$r,Xr=2.5;function fn(){return{type:"MultiLineString",coordinates:zn()}}function zn(){return(0,F.ik)((0,a.Km)(_r/sa)*sa,Br,sa).map(pr).concat((0,F.ik)((0,a.Km)(Mn/na)*na,ln,na).map($r)).concat((0,F.ik)((0,a.Km)(Lr/Dn)*Dn,or,Dn).filter(function(pn){return(0,a.a2)(pn%sa)>a.Gg}).map(Jn)).concat((0,F.ik)((0,a.Km)(un/Kn)*Kn,Qr,Kn).filter(function(pn){return(0,a.a2)(pn%na)>a.Gg}).map(aa))}return fn.lines=function(){return zn().map(function(pn){return{type:"LineString",coordinates:pn}})},fn.outline=function(){return{type:"Polygon",coordinates:[pr(_r).concat($r(ln).slice(1),pr(Br).reverse().slice(1),$r(Mn).reverse().slice(1))]}},fn.extent=function(pn){return arguments.length?fn.extentMajor(pn).extentMinor(pn):fn.extentMinor()},fn.extentMajor=function(pn){return arguments.length?(_r=+pn[0][0],Br=+pn[1][0],Mn=+pn[0][1],ln=+pn[1][1],_r>Br&&(pn=_r,_r=Br,Br=pn),Mn>ln&&(pn=Mn,Mn=ln,ln=pn),fn.precision(Xr)):[[_r,Mn],[Br,ln]]},fn.extentMinor=function(pn){return arguments.length?(Lr=+pn[0][0],or=+pn[1][0],un=+pn[0][1],Qr=+pn[1][1],Lr>or&&(pn=Lr,Lr=or,or=pn),un>Qr&&(pn=un,un=Qr,Qr=pn),fn.precision(Xr)):[[Lr,un],[or,Qr]]},fn.step=function(pn){return arguments.length?fn.stepMajor(pn).stepMinor(pn):fn.stepMinor()},fn.stepMajor=function(pn){return arguments.length?(sa=+pn[0],na=+pn[1],fn):[sa,na]},fn.stepMinor=function(pn){return arguments.length?(Dn=+pn[0],Kn=+pn[1],fn):[Dn,Kn]},fn.precision=function(pn){return arguments.length?(Xr=+pn,Jn=N(un,Qr,90),aa=V(Lr,or,Xr),pr=N(Mn,ln,90),$r=V(_r,Br,Xr),fn):Xr},fn.extentMajor([[-180,-90+a.Gg],[180,90-a.Gg]]).extentMinor([[-180,-80-a.Gg],[180,80+a.Gg]])}function $(){return j()()}var q=e(27284),oe=e(7376),Z=(0,s.c)(),G=(0,s.c)(),re,H,J,ae,K={point:c.c,lineStart:c.c,lineEnd:c.c,polygonStart:function(){K.lineStart=Y,K.lineEnd=le},polygonEnd:function(){K.lineStart=K.lineEnd=K.point=c.c,Z.add((0,a.a2)(G)),G.reset()},result:function(){var or=Z/2;return Z.reset(),or}};function Y(){K.point=ie}function ie(or,Lr){K.point=ne,re=J=or,H=ae=Lr}function ne(or,Lr){G.add(ae*or-J*Lr),J=or,ae=Lr}function le(){ne(re,H)}var de=K,we=e(73784),me=0,Le=0,ve=0,Ae=0,ye=0,Se=0,_e=0,ze=0,Ie=0,Ne,et,st,Ze,Ke={point:nt,lineStart:it,lineEnd:xt,polygonStart:function(){Ke.lineStart=Je,Ke.lineEnd=Pe},polygonEnd:function(){Ke.point=nt,Ke.lineStart=it,Ke.lineEnd=xt},result:function(){var or=Ie?[_e/Ie,ze/Ie]:Se?[Ae/Se,ye/Se]:ve?[me/ve,Le/ve]:[NaN,NaN];return me=Le=ve=Ae=ye=Se=_e=ze=Ie=0,or}};function nt(or,Lr){me+=or,Le+=Lr,++ve}function it(){Ke.point=lt}function lt(or,Lr){Ke.point=vt,nt(st=or,Ze=Lr)}function vt(or,Lr){var Br=or-st,_r=Lr-Ze,Qr=(0,a._I)(Br*Br+_r*_r);Ae+=Qr*(st+or)/2,ye+=Qr*(Ze+Lr)/2,Se+=Qr,nt(st=or,Ze=Lr)}function xt(){Ke.point=nt}function Je(){Ke.point=Ue}function Pe(){He(Ne,et)}function Ue(or,Lr){Ke.point=He,nt(Ne=st=or,et=Ze=Lr)}function He(or,Lr){var Br=or-st,_r=Lr-Ze,Qr=(0,a._I)(Br*Br+_r*_r);Ae+=Qr*(st+or)/2,ye+=Qr*(Ze+Lr)/2,Se+=Qr,Qr=Ze*or-st*Lr,_e+=Qr*(st+or),ze+=Qr*(Ze+Lr),Ie+=Qr*3,nt(st=or,Ze=Lr)}var Oe=Ke;function Ce(or){this._context=or}Ce.prototype={_radius:4.5,pointRadius:function(or){return this._radius=or,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(or,Lr){switch(this._point){case 0:{this._context.moveTo(or,Lr),this._point=1;break}case 1:{this._context.lineTo(or,Lr);break}default:{this._context.moveTo(or+this._radius,Lr),this._context.arc(or,Lr,this._radius,0,a.kD);break}}},result:c.c};var ge=(0,s.c)(),pe,Te,be,ke,Ve,je={point:c.c,lineStart:function(){je.point=at},lineEnd:function(){pe&&ut(Te,be),je.point=c.c},polygonStart:function(){pe=!0},polygonEnd:function(){pe=null},result:function(){var or=+ge;return ge.reset(),or}};function at(or,Lr){je.point=ut,Te=ke=or,be=Ve=Lr}function ut(or,Lr){ke-=or,Ve-=Lr,ge.add((0,a._I)(ke*ke+Ve*Ve)),ke=or,Ve=Lr}var Nt=je;function Vt(){this._string=[]}Vt.prototype={_radius:4.5,_circle:gt(4.5),pointRadius:function(or){return(or=+or)!==this._radius&&(this._radius=or,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(or,Lr){switch(this._point){case 0:{this._string.push("M",or,",",Lr),this._point=1;break}case 1:{this._string.push("L",or,",",Lr);break}default:{this._circle==null&&(this._circle=gt(this._radius)),this._string.push("M",or,",",Lr,this._circle);break}}},result:function(){if(this._string.length){var or=this._string.join("");return this._string=[],or}else return null}};function gt(or){return"m0,"+or+"a"+or+","+or+" 0 1,1 0,"+-2*or+"a"+or+","+or+" 0 1,1 0,"+2*or+"z"}function Ct(or,Lr){var Br=4.5,_r,Qr;function un(ln){return ln&&(typeof Br=="function"&&Qr.pointRadius(+Br.apply(this,arguments)),(0,u.c)(ln,_r(Qr))),Qr.result()}return un.area=function(ln){return(0,u.c)(ln,_r(de)),de.result()},un.measure=function(ln){return(0,u.c)(ln,_r(Nt)),Nt.result()},un.bounds=function(ln){return(0,u.c)(ln,_r(we.c)),we.c.result()},un.centroid=function(ln){return(0,u.c)(ln,_r(Oe)),Oe.result()},un.projection=function(ln){return arguments.length?(_r=ln==null?(or=null,oe.c):(or=ln).stream,un):or},un.context=function(ln){return arguments.length?(Qr=ln==null?(Lr=null,new Vt):new Ce(Lr=ln),typeof Br!="function"&&Qr.pointRadius(Br),un):Lr},un.pointRadius=function(ln){return arguments.length?(Br=typeof ln=="function"?ln:(Qr.pointRadius(+ln),+ln),un):Br},un.projection(or).context(Lr)}var Yt=e(87952);function gr(or){var Lr=0,Br=a.pi/3,_r=(0,Yt.U)(or),Qr=_r(Lr,Br);return Qr.parallels=function(un){return arguments.length?_r(Lr=un[0]*a.qw,Br=un[1]*a.qw):[Lr*a.oh,Br*a.oh]},Qr}function ht(or){var Lr=(0,a.W8)(or);function Br(_r,Qr){return[_r*Lr,(0,a.g$)(Qr)/Lr]}return Br.invert=function(_r,Qr){return[_r/Lr,(0,a.qR)(Qr*Lr)]},Br}function Ht(or,Lr){var Br=(0,a.g$)(or),_r=(Br+(0,a.g$)(Lr))/2;if((0,a.a2)(_r)<a.Gg)return ht(or);var Qr=1+Br*(2*_r-Br),un=(0,a._I)(Qr)/_r;function ln(Mn,Dn){var Kn=(0,a._I)(Qr-2*_r*(0,a.g$)(Dn))/_r;return[Kn*(0,a.g$)(Mn*=_r),un-Kn*(0,a.W8)(Mn)]}return ln.invert=function(Mn,Dn){var Kn=un-Dn,sa=(0,a.WE)(Mn,(0,a.a2)(Kn))*(0,a.kq)(Kn);return Kn*_r<0&&(sa-=a.pi*(0,a.kq)(Mn)*(0,a.kq)(Kn)),[sa/_r,(0,a.qR)((Qr-(Mn*Mn+Kn*Kn)*_r*_r)/(2*_r))]},ln}function Wt(){return gr(Ht).scale(155.424).center([0,33.6442])}function cr(){return Wt().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}var er=e(86420);function ct(or){var Lr=or.length;return{point:function(Br,_r){for(var Qr=-1;++Qr<Lr;)or[Qr].point(Br,_r)},sphere:function(){for(var Br=-1;++Br<Lr;)or[Br].sphere()},lineStart:function(){for(var Br=-1;++Br<Lr;)or[Br].lineStart()},lineEnd:function(){for(var Br=-1;++Br<Lr;)or[Br].lineEnd()},polygonStart:function(){for(var Br=-1;++Br<Lr;)or[Br].polygonStart()},polygonEnd:function(){for(var Br=-1;++Br<Lr;)or[Br].polygonEnd()}}}function qe(){var or,Lr,Br=cr(),_r,Qr=Wt().rotate([154,0]).center([-2,58.5]).parallels([55,65]),un,ln=Wt().rotate([157,0]).center([-3,19.9]).parallels([8,18]),Mn,Dn,Kn={point:function(Jn,aa){Dn=[Jn,aa]}};function sa(Jn){var aa=Jn[0],pr=Jn[1];return Dn=null,_r.point(aa,pr),Dn||(un.point(aa,pr),Dn)||(Mn.point(aa,pr),Dn)}sa.invert=function(Jn){var aa=Br.scale(),pr=Br.translate(),$r=(Jn[0]-pr[0])/aa,Xr=(Jn[1]-pr[1])/aa;return(Xr>=.12&&Xr<.234&&$r>=-.425&&$r<-.214?Qr:Xr>=.166&&Xr<.234&&$r>=-.214&&$r<-.115?ln:Br).invert(Jn)},sa.stream=function(Jn){return or&&Lr===Jn?or:or=ct([Br.stream(Lr=Jn),Qr.stream(Jn),ln.stream(Jn)])},sa.precision=function(Jn){return arguments.length?(Br.precision(Jn),Qr.precision(Jn),ln.precision(Jn),na()):Br.precision()},sa.scale=function(Jn){return arguments.length?(Br.scale(Jn),Qr.scale(Jn*.35),ln.scale(Jn),sa.translate(Br.translate())):Br.scale()},sa.translate=function(Jn){if(!arguments.length)return Br.translate();var aa=Br.scale(),pr=+Jn[0],$r=+Jn[1];return _r=Br.translate(Jn).clipExtent([[pr-.455*aa,$r-.238*aa],[pr+.455*aa,$r+.238*aa]]).stream(Kn),un=Qr.translate([pr-.307*aa,$r+.201*aa]).clipExtent([[pr-.425*aa+a.Gg,$r+.12*aa+a.Gg],[pr-.214*aa-a.Gg,$r+.234*aa-a.Gg]]).stream(Kn),Mn=ln.translate([pr-.205*aa,$r+.212*aa]).clipExtent([[pr-.214*aa+a.Gg,$r+.166*aa+a.Gg],[pr-.115*aa-a.Gg,$r+.234*aa-a.Gg]]).stream(Kn),na()},sa.fitExtent=function(Jn,aa){return(0,er.QX)(sa,Jn,aa)},sa.fitSize=function(Jn,aa){return(0,er.UV)(sa,Jn,aa)},sa.fitWidth=function(Jn,aa){return(0,er.Qx)(sa,Jn,aa)},sa.fitHeight=function(Jn,aa){return(0,er.OW)(sa,Jn,aa)};function na(){return or=Lr=null,sa}return sa.scale(1070)}var dt=e(54724),bt=e(69020),Et=e(92992);function Mt(or,Lr){return[or,(0,a.Yz)((0,a.a6)((a.or+Lr)/2))]}Mt.invert=function(or,Lr){return[or,2*(0,a.MQ)((0,a.oN)(Lr))-a.or]};function _t(){return It(Mt).scale(961/a.kD)}function It(or){var Lr=(0,Yt.c)(or),Br=Lr.center,_r=Lr.scale,Qr=Lr.translate,un=Lr.clipExtent,ln=null,Mn,Dn,Kn;Lr.scale=function(na){return arguments.length?(_r(na),sa()):_r()},Lr.translate=function(na){return arguments.length?(Qr(na),sa()):Qr()},Lr.center=function(na){return arguments.length?(Br(na),sa()):Br()},Lr.clipExtent=function(na){return arguments.length?(na==null?ln=Mn=Dn=Kn=null:(ln=+na[0][0],Mn=+na[0][1],Dn=+na[1][0],Kn=+na[1][1]),sa()):ln==null?null:[[ln,Mn],[Dn,Kn]]};function sa(){var na=a.pi*_r(),Jn=Lr((0,Et.c)(Lr.rotate()).invert([0,0]));return un(ln==null?[[Jn[0]-na,Jn[1]-na],[Jn[0]+na,Jn[1]+na]]:or===Mt?[[Math.max(Jn[0]-na,ln),Mn],[Math.min(Jn[0]+na,Dn),Kn]]:[[ln,Math.max(Jn[1]-na,Mn)],[Dn,Math.min(Jn[1]+na,Kn)]])}return sa()}function Gt(or){return(0,a.a6)((a.or+or)/2)}function nr(or,Lr){var Br=(0,a.W8)(or),_r=or===Lr?(0,a.g$)(or):(0,a.Yz)(Br/(0,a.W8)(Lr))/(0,a.Yz)(Gt(Lr)/Gt(or)),Qr=Br*(0,a.g3)(Gt(or),_r)/_r;if(!_r)return Mt;function un(ln,Mn){Qr>0?Mn<-a.or+a.Gg&&(Mn=-a.or+a.Gg):Mn>a.or-a.Gg&&(Mn=a.or-a.Gg);var Dn=Qr/(0,a.g3)(Gt(Mn),_r);return[Dn*(0,a.g$)(_r*ln),Qr-Dn*(0,a.W8)(_r*ln)]}return un.invert=function(ln,Mn){var Dn=Qr-Mn,Kn=(0,a.kq)(_r)*(0,a._I)(ln*ln+Dn*Dn),sa=(0,a.WE)(ln,(0,a.a2)(Dn))*(0,a.kq)(Dn);return Dn*_r<0&&(sa-=a.pi*(0,a.kq)(ln)*(0,a.kq)(Dn)),[sa/_r,2*(0,a.MQ)((0,a.g3)(Qr/Kn,1/_r))-a.or]},un}function ar(){return gr(nr).scale(109.5).parallels([30,30])}var ir=e(69604);function Be(or,Lr){var Br=(0,a.W8)(or),_r=or===Lr?(0,a.g$)(or):(Br-(0,a.W8)(Lr))/(Lr-or),Qr=Br/_r+or;if((0,a.a2)(_r)<a.Gg)return ir.u;function un(ln,Mn){var Dn=Qr-Mn,Kn=_r*ln;return[Dn*(0,a.g$)(Kn),Qr-Dn*(0,a.W8)(Kn)]}return un.invert=function(ln,Mn){var Dn=Qr-Mn,Kn=(0,a.WE)(ln,(0,a.a2)(Dn))*(0,a.kq)(Dn);return Dn*_r<0&&(Kn-=a.pi*(0,a.kq)(ln)*(0,a.kq)(Dn)),[Kn/_r,Qr-(0,a.kq)(_r)*(0,a._I)(ln*ln+Dn*Dn)]},un}function Fe(){return gr(Be).scale(131.154).center([0,13.9389])}var Rt=1.340264,Lt=-.081106,Ut=893e-6,Qt=.003796,rr=(0,a._I)(3)/2,Kt=12;function Dt(or,Lr){var Br=(0,a.qR)(rr*(0,a.g$)(Lr)),_r=Br*Br,Qr=_r*_r*_r;return[or*(0,a.W8)(Br)/(rr*(Rt+3*Lt*_r+Qr*(7*Ut+9*Qt*_r))),Br*(Rt+Lt*_r+Qr*(Ut+Qt*_r))]}Dt.invert=function(or,Lr){for(var Br=Lr,_r=Br*Br,Qr=_r*_r*_r,un=0,ln,Mn,Dn;un<Kt&&(Mn=Br*(Rt+Lt*_r+Qr*(Ut+Qt*_r))-Lr,Dn=Rt+3*Lt*_r+Qr*(7*Ut+9*Qt*_r),Br-=ln=Mn/Dn,_r=Br*Br,Qr=_r*_r*_r,!((0,a.a2)(ln)<a.a8));++un);return[rr*or*(Rt+3*Lt*_r+Qr*(7*Ut+9*Qt*_r))/(0,a.W8)(Br),(0,a.qR)((0,a.g$)(Br)/rr)]};function sr(){return(0,Yt.c)(Dt).scale(177.158)}var fr=e(53285),vr=e(15196);function lr(){var or=1,Lr=0,Br=0,_r=1,Qr=1,un=0,ln,Mn,Dn=null,Kn,sa,na,Jn=1,aa=1,pr=(0,vr.s)({point:function(gn,In){var Gn=pn([gn,In]);this.stream.point(Gn[0],Gn[1])}}),$r=oe.c,Xr,fn;function zn(){return Jn=or*_r,aa=or*Qr,Xr=fn=null,pn}function pn(gn){var In=gn[0]*Jn,Gn=gn[1]*aa;if(un){var ua=Gn*ln-In*Mn;In=In*ln+Gn*Mn,Gn=ua}return[In+Lr,Gn+Br]}return pn.invert=function(gn){var In=gn[0]-Lr,Gn=gn[1]-Br;if(un){var ua=Gn*ln+In*Mn;In=In*ln-Gn*Mn,Gn=ua}return[In/Jn,Gn/aa]},pn.stream=function(gn){return Xr&&fn===gn?Xr:Xr=pr($r(fn=gn))},pn.postclip=function(gn){return arguments.length?($r=gn,Dn=Kn=sa=na=null,zn()):$r},pn.clipExtent=function(gn){return arguments.length?($r=gn==null?(Dn=Kn=sa=na=null,oe.c):(0,g.c)(Dn=+gn[0][0],Kn=+gn[0][1],sa=+gn[1][0],na=+gn[1][1]),zn()):Dn==null?null:[[Dn,Kn],[sa,na]]},pn.scale=function(gn){return arguments.length?(or=+gn,zn()):or},pn.translate=function(gn){return arguments.length?(Lr=+gn[0],Br=+gn[1],zn()):[Lr,Br]},pn.angle=function(gn){return arguments.length?(un=gn%360*a.qw,Mn=(0,a.g$)(un),ln=(0,a.W8)(un),zn()):un*a.oh},pn.reflectX=function(gn){return arguments.length?(_r=gn?-1:1,zn()):_r<0},pn.reflectY=function(gn){return arguments.length?(Qr=gn?-1:1,zn()):Qr<0},pn.fitExtent=function(gn,In){return(0,er.QX)(pn,gn,In)},pn.fitSize=function(gn,In){return(0,er.UV)(pn,gn,In)},pn.fitWidth=function(gn,In){return(0,er.Qx)(pn,gn,In)},pn.fitHeight=function(gn,In){return(0,er.OW)(pn,gn,In)},pn}var Or=e(47984),Sr=e(4888),Ar=e(62280);function sn(or,Lr){var Br=(0,a.W8)(Lr),_r=1+(0,a.W8)(or)*Br;return[Br*(0,a.g$)(or)/_r,(0,a.g$)(Lr)/_r]}sn.invert=(0,Ar.g)(function(or){return 2*(0,a.MQ)(or)});function Jr(){return(0,Yt.c)(sn).scale(250).clipAngle(142)}function bn(or,Lr){return[(0,a.Yz)((0,a.a6)((a.or+Lr)/2)),-or]}bn.invert=function(or,Lr){return[-Lr,2*(0,a.MQ)((0,a.oN)(or))-a.or]};function xn(){var or=It(bn),Lr=or.center,Br=or.rotate;return or.center=function(_r){return arguments.length?Lr([-_r[1],_r[0]]):(_r=Lr(),[_r[1],-_r[0]])},or.rotate=function(_r){return arguments.length?Br([_r[0],_r[1],_r.length>2?_r[2]+90:90]):(_r=Br(),[_r[0],_r[1],_r[2]-90])},Br([0,0,90]).scale(159.155)}},27284:function(te,X,e){e.d(X,{c:function(){return P}});var A=e(64528);function P(o,L){var M=o[0]*A.qw,d=o[1]*A.qw,g=L[0]*A.qw,r=L[1]*A.qw,t=(0,A.W8)(d),s=(0,A.g$)(d),a=(0,A.W8)(r),c=(0,A.g$)(r),u=t*(0,A.W8)(M),l=t*(0,A.g$)(M),y=a*(0,A.W8)(g),h=a*(0,A.g$)(g),T=2*(0,A.qR)((0,A._I)((0,A.SD)(r-d)+t*a*(0,A.SD)(g-M))),f=(0,A.g$)(T),n=T?function(v){var m=(0,A.g$)(v*=T)/f,b=(0,A.g$)(T-v)/f,E=b*u+m*y,p=b*l+m*h,S=b*s+m*c;return[(0,A.WE)(p,E)*A.oh,(0,A.WE)(S,(0,A._I)(E*E+p*p))*A.oh]}:function(){return[M*A.oh,d*A.oh]};return n.distance=T,n}},64528:function(te,X,e){e.d(X,{Gg:function(){return A},Km:function(){return u},MQ:function(){return s},SD:function(){return E},W8:function(){return c},WE:function(){return a},Yz:function(){return y},_I:function(){return n},a2:function(){return t},a6:function(){return v},a8:function(){return P},g$:function(){return T},g3:function(){return h},kD:function(){return d},kq:function(){return f},mE:function(){return m},oN:function(){return l},oh:function(){return g},or:function(){return L},pi:function(){return o},qR:function(){return b},qw:function(){return r},wL:function(){return M}});var A=1e-6,P=1e-12,o=Math.PI,L=o/2,M=o/4,d=o*2,g=180/o,r=o/180,t=Math.abs,s=Math.atan,a=Math.atan2,c=Math.cos,u=Math.ceil,l=Math.exp,y=Math.log,h=Math.pow,T=Math.sin,f=Math.sign||function(p){return p>0?1:p<0?-1:0},n=Math.sqrt,v=Math.tan;function m(p){return p>1?0:p<-1?o:Math.acos(p)}function b(p){return p>1?L:p<-1?-L:Math.asin(p)}function E(p){return(p=T(p/2))*p}},70932:function(te,X,e){e.d(X,{c:function(){return A}});function A(){}},73784:function(te,X,e){var A=e(70932),P=1/0,o=P,L=-P,M=L,d={point:g,lineStart:A.c,lineEnd:A.c,polygonStart:A.c,polygonEnd:A.c,result:function(){var r=[[P,o],[L,M]];return L=M=-(o=P=1/0),r}};function g(r,t){r<P&&(P=r),r>L&&(L=r),t<o&&(o=t),t>M&&(M=t)}X.c=d},41860:function(te,X,e){e.d(X,{c:function(){return P}});var A=e(64528);function P(o,L){return(0,A.a2)(o[0]-L[0])<A.Gg&&(0,A.a2)(o[1]-L[1])<A.Gg}},58196:function(te,X,e){e.d(X,{c:function(){return d}});var A=e(88728),P=e(84220),o=e(64528),L=(0,A.c)();function M(g){return(0,o.a2)(g[0])<=o.pi?g[0]:(0,o.kq)(g[0])*(((0,o.a2)(g[0])+o.pi)%o.kD-o.pi)}function d(g,r){var t=M(r),s=r[1],a=(0,o.g$)(s),c=[(0,o.g$)(t),-(0,o.W8)(t),0],u=0,l=0;L.reset(),a===1?s=o.or+o.Gg:a===-1&&(s=-o.or-o.Gg);for(var y=0,h=g.length;y<h;++y)if(f=(T=g[y]).length)for(var T,f,n=T[f-1],v=M(n),m=n[1]/2+o.wL,b=(0,o.g$)(m),E=(0,o.W8)(m),p=0;p<f;++p,v=w,b=C,E=x,n=S){var S=T[p],w=M(S),i=S[1]/2+o.wL,C=(0,o.g$)(i),x=(0,o.W8)(i),k=w-v,I=k>=0?1:-1,B=I*k,_=B>o.pi,z=b*C;if(L.add((0,o.WE)(z*I*(0,o.g$)(B),E*x+z*(0,o.W8)(B))),u+=_?k+I*o.kD:k,_^v>=t^w>=t){var O=(0,P.CW)((0,P.ux)(n),(0,P.ux)(S));(0,P.cJ)(O);var F=(0,P.CW)(c,O);(0,P.cJ)(F);var N=(_^k>=0?-1:1)*(0,o.qR)(F[2]);(s>N||s===N&&(O[0]||O[1]))&&(l+=_^k>=0?1:-1)}}return(u<-o.Gg||u<o.Gg&&L<-o.Gg)^l&1}},62280:function(te,X,e){e.d(X,{a:function(){return P},g:function(){return o}});var A=e(64528);function P(L){return function(M,d){var g=(0,A.W8)(M),r=(0,A.W8)(d),t=L(g*r);return[t*r*(0,A.g$)(M),t*(0,A.g$)(d)]}}function o(L){return function(M,d){var g=(0,A._I)(M*M+d*d),r=L(g),t=(0,A.g$)(r),s=(0,A.W8)(r);return[(0,A.WE)(M*t,g*s),(0,A.qR)(g&&d*t/g)]}}},54724:function(te,X,e){e.d(X,{c:function(){return M},y:function(){return L}});var A=e(64528),P=e(62280),o=e(87952),L=(0,P.a)(function(d){return(0,A._I)(2/(1+d))});L.invert=(0,P.g)(function(d){return 2*(0,A.qR)(d/2)});function M(){return(0,o.c)(L).scale(124.75).clipAngle(179.999)}},69020:function(te,X,e){e.d(X,{O:function(){return L},c:function(){return M}});var A=e(64528),P=e(62280),o=e(87952),L=(0,P.a)(function(d){return(d=(0,A.mE)(d))&&d/(0,A.g$)(d)});L.invert=(0,P.g)(function(d){return d});function M(){return(0,o.c)(L).scale(79.4188).clipAngle(179.999)}},69604:function(te,X,e){e.d(X,{c:function(){return o},u:function(){return P}});var A=e(87952);function P(L,M){return[L,M]}P.invert=P;function o(){return(0,A.c)(P).scale(152.63)}},86420:function(te,X,e){e.d(X,{OW:function(){return g},QX:function(){return L},Qx:function(){return d},UV:function(){return M}});var A=e(16016),P=e(73784);function o(r,t,s){var a=r.clipExtent&&r.clipExtent();return r.scale(150).translate([0,0]),a!=null&&r.clipExtent(null),(0,A.c)(s,r.stream(P.c)),t(P.c.result()),a!=null&&r.clipExtent(a),r}function L(r,t,s){return o(r,function(a){var c=t[1][0]-t[0][0],u=t[1][1]-t[0][1],l=Math.min(c/(a[1][0]-a[0][0]),u/(a[1][1]-a[0][1])),y=+t[0][0]+(c-l*(a[1][0]+a[0][0]))/2,h=+t[0][1]+(u-l*(a[1][1]+a[0][1]))/2;r.scale(150*l).translate([y,h])},s)}function M(r,t,s){return L(r,[[0,0],t],s)}function d(r,t,s){return o(r,function(a){var c=+t,u=c/(a[1][0]-a[0][0]),l=(c-u*(a[1][0]+a[0][0]))/2,y=-u*a[0][1];r.scale(150*u).translate([l,y])},s)}function g(r,t,s){return o(r,function(a){var c=+t,u=c/(a[1][1]-a[0][1]),l=-u*a[0][0],y=(c-u*(a[1][1]+a[0][1]))/2;r.scale(150*u).translate([l,y])},s)}},53285:function(te,X,e){e.d(X,{Y:function(){return L},c:function(){return M}});var A=e(64528),P=e(62280),o=e(87952);function L(d,g){var r=(0,A.W8)(g),t=(0,A.W8)(d)*r;return[r*(0,A.g$)(d)/t,(0,A.g$)(g)/t]}L.invert=(0,P.g)(A.MQ);function M(){return(0,o.c)(L).scale(144.049).clipAngle(60)}},87952:function(te,X,e){e.d(X,{c:function(){return v},U:function(){return m}});var A=e(78284),P=e(2728),o=e(21676),L=e(68120),M=e(7376),d=e(64528),g=e(92992),r=e(15196),t=e(86420),s=e(84220),a=16,c=(0,d.W8)(30*d.qw);function u(b,E){return+E?y(b,E):l(b)}function l(b){return(0,r.s)({point:function(E,p){E=b(E,p),this.stream.point(E[0],E[1])}})}function y(b,E){function p(S,w,i,C,x,k,I,B,_,z,O,F,N,V){var j=I-S,$=B-w,q=j*j+$*$;if(q>4*E&&N--){var oe=C+z,Z=x+O,G=k+F,re=(0,d._I)(oe*oe+Z*Z+G*G),H=(0,d.qR)(G/=re),J=(0,d.a2)((0,d.a2)(G)-1)<d.Gg||(0,d.a2)(i-_)<d.Gg?(i+_)/2:(0,d.WE)(Z,oe),ae=b(J,H),K=ae[0],Y=ae[1],ie=K-S,ne=Y-w,le=$*ie-j*ne;(le*le/q>E||(0,d.a2)((j*ie+$*ne)/q-.5)>.3||C*z+x*O+k*F<c)&&(p(S,w,i,C,x,k,K,Y,J,oe/=re,Z/=re,G,N,V),V.point(K,Y),p(K,Y,J,oe,Z,G,I,B,_,z,O,F,N,V))}}return function(S){var w,i,C,x,k,I,B,_,z,O,F,N,V={point:j,lineStart:$,lineEnd:oe,polygonStart:function(){S.polygonStart(),V.lineStart=Z},polygonEnd:function(){S.polygonEnd(),V.lineStart=$}};function j(H,J){H=b(H,J),S.point(H[0],H[1])}function $(){_=NaN,V.point=q,S.lineStart()}function q(H,J){var ae=(0,s.ux)([H,J]),K=b(H,J);p(_,z,B,O,F,N,_=K[0],z=K[1],B=H,O=ae[0],F=ae[1],N=ae[2],a,S),S.point(_,z)}function oe(){V.point=j,S.lineEnd()}function Z(){$(),V.point=G,V.lineEnd=re}function G(H,J){q(w=H,J),i=_,C=z,x=O,k=F,I=N,V.point=q}function re(){p(_,z,B,O,F,N,i,C,w,x,k,I,a,S),V.lineEnd=oe,oe()}return V}}var h=(0,r.s)({point:function(b,E){this.stream.point(b*d.qw,E*d.qw)}});function T(b){return(0,r.s)({point:function(E,p){var S=b(E,p);return this.stream.point(S[0],S[1])}})}function f(b,E,p,S,w){function i(C,x){return C*=S,x*=w,[E+b*C,p-b*x]}return i.invert=function(C,x){return[(C-E)/b*S,(p-x)/b*w]},i}function n(b,E,p,S,w,i){var C=(0,d.W8)(i),x=(0,d.g$)(i),k=C*b,I=x*b,B=C/b,_=x/b,z=(x*p-C*E)/b,O=(x*E+C*p)/b;function F(N,V){return N*=S,V*=w,[k*N-I*V+E,p-I*N-k*V]}return F.invert=function(N,V){return[S*(B*N-_*V+z),w*(O-_*N-B*V)]},F}function v(b){return m(function(){return b})()}function m(b){var E,p=150,S=480,w=250,i=0,C=0,x=0,k=0,I=0,B,_=0,z=1,O=1,F=null,N=A.c,V=null,j,$,q,oe=M.c,Z=.5,G,re,H,J,ae;function K(le){return H(le[0]*d.qw,le[1]*d.qw)}function Y(le){return le=H.invert(le[0],le[1]),le&&[le[0]*d.oh,le[1]*d.oh]}K.stream=function(le){return J&&ae===le?J:J=h(T(B)(N(G(oe(ae=le)))))},K.preclip=function(le){return arguments.length?(N=le,F=void 0,ne()):N},K.postclip=function(le){return arguments.length?(oe=le,V=j=$=q=null,ne()):oe},K.clipAngle=function(le){return arguments.length?(N=+le?(0,P.c)(F=le*d.qw):(F=null,A.c),ne()):F*d.oh},K.clipExtent=function(le){return arguments.length?(oe=le==null?(V=j=$=q=null,M.c):(0,o.c)(V=+le[0][0],j=+le[0][1],$=+le[1][0],q=+le[1][1]),ne()):V==null?null:[[V,j],[$,q]]},K.scale=function(le){return arguments.length?(p=+le,ie()):p},K.translate=function(le){return arguments.length?(S=+le[0],w=+le[1],ie()):[S,w]},K.center=function(le){return arguments.length?(i=le[0]%360*d.qw,C=le[1]%360*d.qw,ie()):[i*d.oh,C*d.oh]},K.rotate=function(le){return arguments.length?(x=le[0]%360*d.qw,k=le[1]%360*d.qw,I=le.length>2?le[2]%360*d.qw:0,ie()):[x*d.oh,k*d.oh,I*d.oh]},K.angle=function(le){return arguments.length?(_=le%360*d.qw,ie()):_*d.oh},K.reflectX=function(le){return arguments.length?(z=le?-1:1,ie()):z<0},K.reflectY=function(le){return arguments.length?(O=le?-1:1,ie()):O<0},K.precision=function(le){return arguments.length?(G=u(re,Z=le*le),ne()):(0,d._I)(Z)},K.fitExtent=function(le,de){return(0,t.QX)(K,le,de)},K.fitSize=function(le,de){return(0,t.UV)(K,le,de)},K.fitWidth=function(le,de){return(0,t.Qx)(K,le,de)},K.fitHeight=function(le,de){return(0,t.OW)(K,le,de)};function ie(){var le=n(p,0,0,z,O,_).apply(null,E(i,C)),de=(_?n:f)(p,S-le[0],w-le[1],z,O,_);return B=(0,g.O)(x,k,I),re=(0,L.c)(E,de),H=(0,L.c)(B,re),G=u(re,Z),ne()}function ne(){return J=ae=null,K}return function(){return E=b.apply(this,arguments),K.invert=E.invert&&Y,ie()}}},47984:function(te,X,e){e.d(X,{c:function(){return L},g:function(){return o}});var A=e(87952),P=e(64528);function o(M,d){var g=d*d,r=g*g;return[M*(.8707-.131979*g+r*(-.013791+r*(.003971*g-.001529*r))),d*(1.007226+g*(.015085+r*(-.044475+.028874*g-.005916*r)))]}o.invert=function(M,d){var g=d,r=25,t;do{var s=g*g,a=s*s;g-=t=(g*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-d)/(1.007226+s*(.045255+a*(-.311325+.259866*s-.06507600000000001*a)))}while((0,P.a2)(t)>P.Gg&&--r>0);return[M/(.8707+(s=g*g)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),g]};function L(){return(0,A.c)(o).scale(175.295)}},4888:function(te,X,e){e.d(X,{c:function(){return M},t:function(){return L}});var A=e(64528),P=e(62280),o=e(87952);function L(d,g){return[(0,A.W8)(g)*(0,A.g$)(d),(0,A.g$)(g)]}L.invert=(0,P.g)(A.qR);function M(){return(0,o.c)(L).scale(249.5).clipAngle(90+A.Gg)}},92992:function(te,X,e){e.d(X,{O:function(){return L},c:function(){return r}});var A=e(68120),P=e(64528);function o(t,s){return[(0,P.a2)(t)>P.pi?t+Math.round(-t/P.kD)*P.kD:t,s]}o.invert=o;function L(t,s,a){return(t%=P.kD)?s||a?(0,A.c)(d(t),g(s,a)):d(t):s||a?g(s,a):o}function M(t){return function(s,a){return s+=t,[s>P.pi?s-P.kD:s<-P.pi?s+P.kD:s,a]}}function d(t){var s=M(t);return s.invert=M(-t),s}function g(t,s){var a=(0,P.W8)(t),c=(0,P.g$)(t),u=(0,P.W8)(s),l=(0,P.g$)(s);function y(h,T){var f=(0,P.W8)(T),n=(0,P.W8)(h)*f,v=(0,P.g$)(h)*f,m=(0,P.g$)(T),b=m*a+n*c;return[(0,P.WE)(v*u-b*l,n*a-m*c),(0,P.qR)(b*u+v*l)]}return y.invert=function(h,T){var f=(0,P.W8)(T),n=(0,P.W8)(h)*f,v=(0,P.g$)(h)*f,m=(0,P.g$)(T),b=m*u-v*l;return[(0,P.WE)(v*u+m*l,n*a+b*c),(0,P.qR)(b*a-n*c)]},y}function r(t){t=L(t[0]*P.qw,t[1]*P.qw,t.length>2?t[2]*P.qw:0);function s(a){return a=t(a[0]*P.qw,a[1]*P.qw),a[0]*=P.oh,a[1]*=P.oh,a}return s.invert=function(a){return a=t.invert(a[0]*P.qw,a[1]*P.qw),a[0]*=P.oh,a[1]*=P.oh,a},s}},16016:function(te,X,e){e.d(X,{c:function(){return d}});function A(g,r){g&&o.hasOwnProperty(g.type)&&o[g.type](g,r)}var P={Feature:function(g,r){A(g.geometry,r)},FeatureCollection:function(g,r){for(var t=g.features,s=-1,a=t.length;++s<a;)A(t[s].geometry,r)}},o={Sphere:function(g,r){r.sphere()},Point:function(g,r){g=g.coordinates,r.point(g[0],g[1],g[2])},MultiPoint:function(g,r){for(var t=g.coordinates,s=-1,a=t.length;++s<a;)g=t[s],r.point(g[0],g[1],g[2])},LineString:function(g,r){L(g.coordinates,r,0)},MultiLineString:function(g,r){for(var t=g.coordinates,s=-1,a=t.length;++s<a;)L(t[s],r,0)},Polygon:function(g,r){M(g.coordinates,r)},MultiPolygon:function(g,r){for(var t=g.coordinates,s=-1,a=t.length;++s<a;)M(t[s],r)},GeometryCollection:function(g,r){for(var t=g.geometries,s=-1,a=t.length;++s<a;)A(t[s],r)}};function L(g,r,t){var s=-1,a=g.length-t,c;for(r.lineStart();++s<a;)c=g[s],r.point(c[0],c[1],c[2]);r.lineEnd()}function M(g,r){var t=-1,s=g.length;for(r.polygonStart();++t<s;)L(g[t],r,1);r.polygonEnd()}function d(g,r){g&&P.hasOwnProperty(g.type)?P[g.type](g,r):A(g,r)}},15196:function(te,X,e){e.d(X,{c:function(){return A},s:function(){return P}});function A(L){return{stream:P(L)}}function P(L){return function(M){var d=new o;for(var g in L)d[g]=L[g];return d.stream=M,d}}function o(){}o.prototype={constructor:o,point:function(L,M){this.stream.point(L,M)},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()}}},74148:function(te,X,e){e.r(X),e.d(X,{cluster:function(){return r},hierarchy:function(){return b},pack:function(){return Y},packEnclose:function(){return k},packSiblings:function(){return G},partition:function(){return me},stratify:function(){return _e},tree:function(){return it},treemap:function(){return Pe},treemapBinary:function(){return Ue},treemapDice:function(){return we},treemapResquarify:function(){return Oe},treemapSlice:function(){return lt},treemapSliceDice:function(){return He},treemapSquarify:function(){return Je}});function A(Ce,ge){return Ce.parent===ge.parent?1:2}function P(Ce){return Ce.reduce(o,0)/Ce.length}function o(Ce,ge){return Ce+ge.x}function L(Ce){return 1+Ce.reduce(M,0)}function M(Ce,ge){return Math.max(Ce,ge.y)}function d(Ce){for(var ge;ge=Ce.children;)Ce=ge[0];return Ce}function g(Ce){for(var ge;ge=Ce.children;)Ce=ge[ge.length-1];return Ce}function r(){var Ce=A,ge=1,pe=1,Te=!1;function be(ke){var Ve,je=0;ke.eachAfter(function(gt){var Ct=gt.children;Ct?(gt.x=P(Ct),gt.y=L(Ct)):(gt.x=Ve?je+=Ce(gt,Ve):0,gt.y=0,Ve=gt)});var at=d(ke),ut=g(ke),Nt=at.x-Ce(at,ut)/2,Vt=ut.x+Ce(ut,at)/2;return ke.eachAfter(Te?function(gt){gt.x=(gt.x-ke.x)*ge,gt.y=(ke.y-gt.y)*pe}:function(gt){gt.x=(gt.x-Nt)/(Vt-Nt)*ge,gt.y=(1-(ke.y?gt.y/ke.y:1))*pe})}return be.separation=function(ke){return arguments.length?(Ce=ke,be):Ce},be.size=function(ke){return arguments.length?(Te=!1,ge=+ke[0],pe=+ke[1],be):Te?null:[ge,pe]},be.nodeSize=function(ke){return arguments.length?(Te=!0,ge=+ke[0],pe=+ke[1],be):Te?[ge,pe]:null},be}function t(Ce){var ge=0,pe=Ce.children,Te=pe&&pe.length;if(!Te)ge=1;else for(;--Te>=0;)ge+=pe[Te].value;Ce.value=ge}function s(){return this.eachAfter(t)}function a(Ce){var ge=this,pe,Te=[ge],be,ke,Ve;do for(pe=Te.reverse(),Te=[];ge=pe.pop();)if(Ce(ge),be=ge.children,be)for(ke=0,Ve=be.length;ke<Ve;++ke)Te.push(be[ke]);while(Te.length);return this}function c(Ce){for(var ge=this,pe=[ge],Te,be;ge=pe.pop();)if(Ce(ge),Te=ge.children,Te)for(be=Te.length-1;be>=0;--be)pe.push(Te[be]);return this}function u(Ce){for(var ge=this,pe=[ge],Te=[],be,ke,Ve;ge=pe.pop();)if(Te.push(ge),be=ge.children,be)for(ke=0,Ve=be.length;ke<Ve;++ke)pe.push(be[ke]);for(;ge=Te.pop();)Ce(ge);return this}function l(Ce){return this.eachAfter(function(ge){for(var pe=+Ce(ge.data)||0,Te=ge.children,be=Te&&Te.length;--be>=0;)pe+=Te[be].value;ge.value=pe})}function y(Ce){return this.eachBefore(function(ge){ge.children&&ge.children.sort(Ce)})}function h(Ce){for(var ge=this,pe=T(ge,Ce),Te=[ge];ge!==pe;)ge=ge.parent,Te.push(ge);for(var be=Te.length;Ce!==pe;)Te.splice(be,0,Ce),Ce=Ce.parent;return Te}function T(Ce,ge){if(Ce===ge)return Ce;var pe=Ce.ancestors(),Te=ge.ancestors(),be=null;for(Ce=pe.pop(),ge=Te.pop();Ce===ge;)be=Ce,Ce=pe.pop(),ge=Te.pop();return be}function f(){for(var Ce=this,ge=[Ce];Ce=Ce.parent;)ge.push(Ce);return ge}function n(){var Ce=[];return this.each(function(ge){Ce.push(ge)}),Ce}function v(){var Ce=[];return this.eachBefore(function(ge){ge.children||Ce.push(ge)}),Ce}function m(){var Ce=this,ge=[];return Ce.each(function(pe){pe!==Ce&&ge.push({source:pe.parent,target:pe})}),ge}function b(Ce,ge){var pe=new i(Ce),Te=+Ce.value&&(pe.value=Ce.value),be,ke=[pe],Ve,je,at,ut;for(ge==null&&(ge=p);be=ke.pop();)if(Te&&(be.value=+be.data.value),(je=ge(be.data))&&(ut=je.length))for(be.children=new Array(ut),at=ut-1;at>=0;--at)ke.push(Ve=be.children[at]=new i(je[at])),Ve.parent=be,Ve.depth=be.depth+1;return pe.eachBefore(w)}function E(){return b(this).eachBefore(S)}function p(Ce){return Ce.children}function S(Ce){Ce.data=Ce.data.data}function w(Ce){var ge=0;do Ce.height=ge;while((Ce=Ce.parent)&&Ce.height<++ge)}function i(Ce){this.data=Ce,this.depth=this.height=0,this.parent=null}i.prototype=b.prototype={constructor:i,count:s,each:a,eachAfter:u,eachBefore:c,sum:l,sort:y,path:h,ancestors:f,descendants:n,leaves:v,links:m,copy:E};var C=Array.prototype.slice;function x(Ce){for(var ge=Ce.length,pe,Te;ge;)Te=Math.random()*ge--|0,pe=Ce[ge],Ce[ge]=Ce[Te],Ce[Te]=pe;return Ce}function k(Ce){for(var ge=0,pe=(Ce=x(C.call(Ce))).length,Te=[],be,ke;ge<pe;)be=Ce[ge],ke&&_(ke,be)?++ge:(ke=O(Te=I(Te,be)),ge=0);return ke}function I(Ce,ge){var pe,Te;if(z(ge,Ce))return[ge];for(pe=0;pe<Ce.length;++pe)if(B(ge,Ce[pe])&&z(N(Ce[pe],ge),Ce))return[Ce[pe],ge];for(pe=0;pe<Ce.length-1;++pe)for(Te=pe+1;Te<Ce.length;++Te)if(B(N(Ce[pe],Ce[Te]),ge)&&B(N(Ce[pe],ge),Ce[Te])&&B(N(Ce[Te],ge),Ce[pe])&&z(V(Ce[pe],Ce[Te],ge),Ce))return[Ce[pe],Ce[Te],ge];throw new Error}function B(Ce,ge){var pe=Ce.r-ge.r,Te=ge.x-Ce.x,be=ge.y-Ce.y;return pe<0||pe*pe<Te*Te+be*be}function _(Ce,ge){var pe=Ce.r-ge.r+1e-6,Te=ge.x-Ce.x,be=ge.y-Ce.y;return pe>0&&pe*pe>Te*Te+be*be}function z(Ce,ge){for(var pe=0;pe<ge.length;++pe)if(!_(Ce,ge[pe]))return!1;return!0}function O(Ce){switch(Ce.length){case 1:return F(Ce[0]);case 2:return N(Ce[0],Ce[1]);case 3:return V(Ce[0],Ce[1],Ce[2])}}function F(Ce){return{x:Ce.x,y:Ce.y,r:Ce.r}}function N(Ce,ge){var pe=Ce.x,Te=Ce.y,be=Ce.r,ke=ge.x,Ve=ge.y,je=ge.r,at=ke-pe,ut=Ve-Te,Nt=je-be,Vt=Math.sqrt(at*at+ut*ut);return{x:(pe+ke+at/Vt*Nt)/2,y:(Te+Ve+ut/Vt*Nt)/2,r:(Vt+be+je)/2}}function V(Ce,ge,pe){var Te=Ce.x,be=Ce.y,ke=Ce.r,Ve=ge.x,je=ge.y,at=ge.r,ut=pe.x,Nt=pe.y,Vt=pe.r,gt=Te-Ve,Ct=Te-ut,Yt=be-je,gr=be-Nt,ht=at-ke,Ht=Vt-ke,Wt=Te*Te+be*be-ke*ke,cr=Wt-Ve*Ve-je*je+at*at,er=Wt-ut*ut-Nt*Nt+Vt*Vt,ct=Ct*Yt-gt*gr,qe=(Yt*er-gr*cr)/(ct*2)-Te,dt=(gr*ht-Yt*Ht)/ct,bt=(Ct*cr-gt*er)/(ct*2)-be,Et=(gt*Ht-Ct*ht)/ct,Mt=dt*dt+Et*Et-1,_t=2*(ke+qe*dt+bt*Et),It=qe*qe+bt*bt-ke*ke,Gt=-(Mt?(_t+Math.sqrt(_t*_t-4*Mt*It))/(2*Mt):It/_t);return{x:Te+qe+dt*Gt,y:be+bt+Et*Gt,r:Gt}}function j(Ce,ge,pe){var Te=Ce.x-ge.x,be,ke,Ve=Ce.y-ge.y,je,at,ut=Te*Te+Ve*Ve;ut?(ke=ge.r+pe.r,ke*=ke,at=Ce.r+pe.r,at*=at,ke>at?(be=(ut+at-ke)/(2*ut),je=Math.sqrt(Math.max(0,at/ut-be*be)),pe.x=Ce.x-be*Te-je*Ve,pe.y=Ce.y-be*Ve+je*Te):(be=(ut+ke-at)/(2*ut),je=Math.sqrt(Math.max(0,ke/ut-be*be)),pe.x=ge.x+be*Te-je*Ve,pe.y=ge.y+be*Ve+je*Te)):(pe.x=ge.x+pe.r,pe.y=ge.y)}function $(Ce,ge){var pe=Ce.r+ge.r-1e-6,Te=ge.x-Ce.x,be=ge.y-Ce.y;return pe>0&&pe*pe>Te*Te+be*be}function q(Ce){var ge=Ce._,pe=Ce.next._,Te=ge.r+pe.r,be=(ge.x*pe.r+pe.x*ge.r)/Te,ke=(ge.y*pe.r+pe.y*ge.r)/Te;return be*be+ke*ke}function oe(Ce){this._=Ce,this.next=null,this.previous=null}function Z(Ce){if(!(be=Ce.length))return 0;var ge,pe,Te,be,ke,Ve,je,at,ut,Nt,Vt;if(ge=Ce[0],ge.x=0,ge.y=0,!(be>1))return ge.r;if(pe=Ce[1],ge.x=-pe.r,pe.x=ge.r,pe.y=0,!(be>2))return ge.r+pe.r;j(pe,ge,Te=Ce[2]),ge=new oe(ge),pe=new oe(pe),Te=new oe(Te),ge.next=Te.previous=pe,pe.next=ge.previous=Te,Te.next=pe.previous=ge;e:for(je=3;je<be;++je){j(ge._,pe._,Te=Ce[je]),Te=new oe(Te),at=pe.next,ut=ge.previous,Nt=pe._.r,Vt=ge._.r;do if(Nt<=Vt){if($(at._,Te._)){pe=at,ge.next=pe,pe.previous=ge,--je;continue e}Nt+=at._.r,at=at.next}else{if($(ut._,Te._)){ge=ut,ge.next=pe,pe.previous=ge,--je;continue e}Vt+=ut._.r,ut=ut.previous}while(at!==ut.next);for(Te.previous=ge,Te.next=pe,ge.next=pe.previous=pe=Te,ke=q(ge);(Te=Te.next)!==pe;)(Ve=q(Te))<ke&&(ge=Te,ke=Ve);pe=ge.next}for(ge=[pe._],Te=pe;(Te=Te.next)!==pe;)ge.push(Te._);for(Te=k(ge),je=0;je<be;++je)ge=Ce[je],ge.x-=Te.x,ge.y-=Te.y;return Te.r}function G(Ce){return Z(Ce),Ce}function re(Ce){return Ce==null?null:H(Ce)}function H(Ce){if(typeof Ce!="function")throw new Error;return Ce}function J(){return 0}function ae(Ce){return function(){return Ce}}function K(Ce){return Math.sqrt(Ce.value)}function Y(){var Ce=null,ge=1,pe=1,Te=J;function be(ke){return ke.x=ge/2,ke.y=pe/2,Ce?ke.eachBefore(ie(Ce)).eachAfter(ne(Te,.5)).eachBefore(le(1)):ke.eachBefore(ie(K)).eachAfter(ne(J,1)).eachAfter(ne(Te,ke.r/Math.min(ge,pe))).eachBefore(le(Math.min(ge,pe)/(2*ke.r))),ke}return be.radius=function(ke){return arguments.length?(Ce=re(ke),be):Ce},be.size=function(ke){return arguments.length?(ge=+ke[0],pe=+ke[1],be):[ge,pe]},be.padding=function(ke){return arguments.length?(Te=typeof ke=="function"?ke:ae(+ke),be):Te},be}function ie(Ce){return function(ge){ge.children||(ge.r=Math.max(0,+Ce(ge)||0))}}function ne(Ce,ge){return function(pe){if(Te=pe.children){var Te,be,ke=Te.length,Ve=Ce(pe)*ge||0,je;if(Ve)for(be=0;be<ke;++be)Te[be].r+=Ve;if(je=Z(Te),Ve)for(be=0;be<ke;++be)Te[be].r-=Ve;pe.r=je+Ve}}}function le(Ce){return function(ge){var pe=ge.parent;ge.r*=Ce,pe&&(ge.x=pe.x+Ce*ge.x,ge.y=pe.y+Ce*ge.y)}}function de(Ce){Ce.x0=Math.round(Ce.x0),Ce.y0=Math.round(Ce.y0),Ce.x1=Math.round(Ce.x1),Ce.y1=Math.round(Ce.y1)}function we(Ce,ge,pe,Te,be){for(var ke=Ce.children,Ve,je=-1,at=ke.length,ut=Ce.value&&(Te-ge)/Ce.value;++je<at;)Ve=ke[je],Ve.y0=pe,Ve.y1=be,Ve.x0=ge,Ve.x1=ge+=Ve.value*ut}function me(){var Ce=1,ge=1,pe=0,Te=!1;function be(Ve){var je=Ve.height+1;return Ve.x0=Ve.y0=pe,Ve.x1=Ce,Ve.y1=ge/je,Ve.eachBefore(ke(ge,je)),Te&&Ve.eachBefore(de),Ve}function ke(Ve,je){return function(at){at.children&&we(at,at.x0,Ve*(at.depth+1)/je,at.x1,Ve*(at.depth+2)/je);var ut=at.x0,Nt=at.y0,Vt=at.x1-pe,gt=at.y1-pe;Vt<ut&&(ut=Vt=(ut+Vt)/2),gt<Nt&&(Nt=gt=(Nt+gt)/2),at.x0=ut,at.y0=Nt,at.x1=Vt,at.y1=gt}}return be.round=function(Ve){return arguments.length?(Te=!!Ve,be):Te},be.size=function(Ve){return arguments.length?(Ce=+Ve[0],ge=+Ve[1],be):[Ce,ge]},be.padding=function(Ve){return arguments.length?(pe=+Ve,be):pe},be}var Le="$",ve={depth:-1},Ae={};function ye(Ce){return Ce.id}function Se(Ce){return Ce.parentId}function _e(){var Ce=ye,ge=Se;function pe(Te){var be,ke,Ve=Te.length,je,at,ut,Nt=new Array(Ve),Vt,gt,Ct={};for(ke=0;ke<Ve;++ke)be=Te[ke],ut=Nt[ke]=new i(be),(Vt=Ce(be,ke,Te))!=null&&(Vt+="")&&(gt=Le+(ut.id=Vt),Ct[gt]=gt in Ct?Ae:ut);for(ke=0;ke<Ve;++ke)if(ut=Nt[ke],Vt=ge(Te[ke],ke,Te),Vt==null||!(Vt+="")){if(je)throw new Error("multiple roots");je=ut}else{if(at=Ct[Le+Vt],!at)throw new Error("missing: "+Vt);if(at===Ae)throw new Error("ambiguous: "+Vt);at.children?at.children.push(ut):at.children=[ut],ut.parent=at}if(!je)throw new Error("no root");if(je.parent=ve,je.eachBefore(function(Yt){Yt.depth=Yt.parent.depth+1,--Ve}).eachBefore(w),je.parent=null,Ve>0)throw new Error("cycle");return je}return pe.id=function(Te){return arguments.length?(Ce=H(Te),pe):Ce},pe.parentId=function(Te){return arguments.length?(ge=H(Te),pe):ge},pe}function ze(Ce,ge){return Ce.parent===ge.parent?1:2}function Ie(Ce){var ge=Ce.children;return ge?ge[0]:Ce.t}function Ne(Ce){var ge=Ce.children;return ge?ge[ge.length-1]:Ce.t}function et(Ce,ge,pe){var Te=pe/(ge.i-Ce.i);ge.c-=Te,ge.s+=pe,Ce.c+=Te,ge.z+=pe,ge.m+=pe}function st(Ce){for(var ge=0,pe=0,Te=Ce.children,be=Te.length,ke;--be>=0;)ke=Te[be],ke.z+=ge,ke.m+=ge,ge+=ke.s+(pe+=ke.c)}function Ze(Ce,ge,pe){return Ce.a.parent===ge.parent?Ce.a:pe}function Ke(Ce,ge){this._=Ce,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=ge}Ke.prototype=Object.create(i.prototype);function nt(Ce){for(var ge=new Ke(Ce,0),pe,Te=[ge],be,ke,Ve,je;pe=Te.pop();)if(ke=pe._.children)for(pe.children=new Array(je=ke.length),Ve=je-1;Ve>=0;--Ve)Te.push(be=pe.children[Ve]=new Ke(ke[Ve],Ve)),be.parent=pe;return(ge.parent=new Ke(null,0)).children=[ge],ge}function it(){var Ce=ze,ge=1,pe=1,Te=null;function be(ut){var Nt=nt(ut);if(Nt.eachAfter(ke),Nt.parent.m=-Nt.z,Nt.eachBefore(Ve),Te)ut.eachBefore(at);else{var Vt=ut,gt=ut,Ct=ut;ut.eachBefore(function(Wt){Wt.x<Vt.x&&(Vt=Wt),Wt.x>gt.x&&(gt=Wt),Wt.depth>Ct.depth&&(Ct=Wt)});var Yt=Vt===gt?1:Ce(Vt,gt)/2,gr=Yt-Vt.x,ht=ge/(gt.x+Yt+gr),Ht=pe/(Ct.depth||1);ut.eachBefore(function(Wt){Wt.x=(Wt.x+gr)*ht,Wt.y=Wt.depth*Ht})}return ut}function ke(ut){var Nt=ut.children,Vt=ut.parent.children,gt=ut.i?Vt[ut.i-1]:null;if(Nt){st(ut);var Ct=(Nt[0].z+Nt[Nt.length-1].z)/2;gt?(ut.z=gt.z+Ce(ut._,gt._),ut.m=ut.z-Ct):ut.z=Ct}else gt&&(ut.z=gt.z+Ce(ut._,gt._));ut.parent.A=je(ut,gt,ut.parent.A||Vt[0])}function Ve(ut){ut._.x=ut.z+ut.parent.m,ut.m+=ut.parent.m}function je(ut,Nt,Vt){if(Nt){for(var gt=ut,Ct=ut,Yt=Nt,gr=gt.parent.children[0],ht=gt.m,Ht=Ct.m,Wt=Yt.m,cr=gr.m,er;Yt=Ne(Yt),gt=Ie(gt),Yt&&gt;)gr=Ie(gr),Ct=Ne(Ct),Ct.a=ut,er=Yt.z+Wt-gt.z-ht+Ce(Yt._,gt._),er>0&&(et(Ze(Yt,ut,Vt),ut,er),ht+=er,Ht+=er),Wt+=Yt.m,ht+=gt.m,cr+=gr.m,Ht+=Ct.m;Yt&&!Ne(Ct)&&(Ct.t=Yt,Ct.m+=Wt-Ht),gt&&!Ie(gr)&&(gr.t=gt,gr.m+=ht-cr,Vt=ut)}return Vt}function at(ut){ut.x*=ge,ut.y=ut.depth*pe}return be.separation=function(ut){return arguments.length?(Ce=ut,be):Ce},be.size=function(ut){return arguments.length?(Te=!1,ge=+ut[0],pe=+ut[1],be):Te?null:[ge,pe]},be.nodeSize=function(ut){return arguments.length?(Te=!0,ge=+ut[0],pe=+ut[1],be):Te?[ge,pe]:null},be}function lt(Ce,ge,pe,Te,be){for(var ke=Ce.children,Ve,je=-1,at=ke.length,ut=Ce.value&&(be-pe)/Ce.value;++je<at;)Ve=ke[je],Ve.x0=ge,Ve.x1=Te,Ve.y0=pe,Ve.y1=pe+=Ve.value*ut}var vt=(1+Math.sqrt(5))/2;function xt(Ce,ge,pe,Te,be,ke){for(var Ve=[],je=ge.children,at,ut,Nt=0,Vt=0,gt=je.length,Ct,Yt,gr=ge.value,ht,Ht,Wt,cr,er,ct,qe;Nt<gt;){Ct=be-pe,Yt=ke-Te;do ht=je[Vt++].value;while(!ht&&Vt<gt);for(Ht=Wt=ht,ct=Math.max(Yt/Ct,Ct/Yt)/(gr*Ce),qe=ht*ht*ct,er=Math.max(Wt/qe,qe/Ht);Vt<gt;++Vt){if(ht+=ut=je[Vt].value,ut<Ht&&(Ht=ut),ut>Wt&&(Wt=ut),qe=ht*ht*ct,cr=Math.max(Wt/qe,qe/Ht),cr>er){ht-=ut;break}er=cr}Ve.push(at={value:ht,dice:Ct<Yt,children:je.slice(Nt,Vt)}),at.dice?we(at,pe,Te,be,gr?Te+=Yt*ht/gr:ke):lt(at,pe,Te,gr?pe+=Ct*ht/gr:be,ke),gr-=ht,Nt=Vt}return Ve}var Je=function Ce(ge){function pe(Te,be,ke,Ve,je){xt(ge,Te,be,ke,Ve,je)}return pe.ratio=function(Te){return Ce((Te=+Te)>1?Te:1)},pe}(vt);function Pe(){var Ce=Je,ge=!1,pe=1,Te=1,be=[0],ke=J,Ve=J,je=J,at=J,ut=J;function Nt(gt){return gt.x0=gt.y0=0,gt.x1=pe,gt.y1=Te,gt.eachBefore(Vt),be=[0],ge&&gt.eachBefore(de),gt}function Vt(gt){var Ct=be[gt.depth],Yt=gt.x0+Ct,gr=gt.y0+Ct,ht=gt.x1-Ct,Ht=gt.y1-Ct;ht<Yt&&(Yt=ht=(Yt+ht)/2),Ht<gr&&(gr=Ht=(gr+Ht)/2),gt.x0=Yt,gt.y0=gr,gt.x1=ht,gt.y1=Ht,gt.children&&(Ct=be[gt.depth+1]=ke(gt)/2,Yt+=ut(gt)-Ct,gr+=Ve(gt)-Ct,ht-=je(gt)-Ct,Ht-=at(gt)-Ct,ht<Yt&&(Yt=ht=(Yt+ht)/2),Ht<gr&&(gr=Ht=(gr+Ht)/2),Ce(gt,Yt,gr,ht,Ht))}return Nt.round=function(gt){return arguments.length?(ge=!!gt,Nt):ge},Nt.size=function(gt){return arguments.length?(pe=+gt[0],Te=+gt[1],Nt):[pe,Te]},Nt.tile=function(gt){return arguments.length?(Ce=H(gt),Nt):Ce},Nt.padding=function(gt){return arguments.length?Nt.paddingInner(gt).paddingOuter(gt):Nt.paddingInner()},Nt.paddingInner=function(gt){return arguments.length?(ke=typeof gt=="function"?gt:ae(+gt),Nt):ke},Nt.paddingOuter=function(gt){return arguments.length?Nt.paddingTop(gt).paddingRight(gt).paddingBottom(gt).paddingLeft(gt):Nt.paddingTop()},Nt.paddingTop=function(gt){return arguments.length?(Ve=typeof gt=="function"?gt:ae(+gt),Nt):Ve},Nt.paddingRight=function(gt){return arguments.length?(je=typeof gt=="function"?gt:ae(+gt),Nt):je},Nt.paddingBottom=function(gt){return arguments.length?(at=typeof gt=="function"?gt:ae(+gt),Nt):at},Nt.paddingLeft=function(gt){return arguments.length?(ut=typeof gt=="function"?gt:ae(+gt),Nt):ut},Nt}function Ue(Ce,ge,pe,Te,be){var ke=Ce.children,Ve,je=ke.length,at,ut=new Array(je+1);for(ut[0]=at=Ve=0;Ve<je;++Ve)ut[Ve+1]=at+=ke[Ve].value;Nt(0,je,Ce.value,ge,pe,Te,be);function Nt(Vt,gt,Ct,Yt,gr,ht,Ht){if(Vt>=gt-1){var Wt=ke[Vt];Wt.x0=Yt,Wt.y0=gr,Wt.x1=ht,Wt.y1=Ht;return}for(var cr=ut[Vt],er=Ct/2+cr,ct=Vt+1,qe=gt-1;ct<qe;){var dt=ct+qe>>>1;ut[dt]<er?ct=dt+1:qe=dt}er-ut[ct-1]<ut[ct]-er&&Vt+1<ct&&--ct;var bt=ut[ct]-cr,Et=Ct-bt;if(ht-Yt>Ht-gr){var Mt=(Yt*Et+ht*bt)/Ct;Nt(Vt,ct,bt,Yt,gr,Mt,Ht),Nt(ct,gt,Et,Mt,gr,ht,Ht)}else{var _t=(gr*Et+Ht*bt)/Ct;Nt(Vt,ct,bt,Yt,gr,ht,_t),Nt(ct,gt,Et,Yt,_t,ht,Ht)}}}function He(Ce,ge,pe,Te,be){(Ce.depth&1?lt:we)(Ce,ge,pe,Te,be)}var Oe=function Ce(ge){function pe(Te,be,ke,Ve,je){if((at=Te._squarify)&&at.ratio===ge)for(var at,ut,Nt,Vt,gt=-1,Ct,Yt=at.length,gr=Te.value;++gt<Yt;){for(ut=at[gt],Nt=ut.children,Vt=ut.value=0,Ct=Nt.length;Vt<Ct;++Vt)ut.value+=Nt[Vt].value;ut.dice?we(ut,be,ke,Ve,ke+=(je-ke)*ut.value/gr):lt(ut,be,ke,be+=(Ve-be)*ut.value/gr,je),gr-=ut.value}else Te._squarify=at=xt(ge,Te,be,ke,Ve,je),at.ratio=ge}return pe.ratio=function(Te){return Ce((Te=+Te)>1?Te:1)},pe}(vt)},10132:function(te,X,e){e.d(X,{ak:function(){return h}});var A=Math.PI,P=2*A,o=1e-6,L=P-o;function M(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function d(){return new M}M.prototype=d.prototype={constructor:M,moveTo:function(T,f){this._+="M"+(this._x0=this._x1=+T)+","+(this._y0=this._y1=+f)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(T,f){this._+="L"+(this._x1=+T)+","+(this._y1=+f)},quadraticCurveTo:function(T,f,n,v){this._+="Q"+ +T+","+ +f+","+(this._x1=+n)+","+(this._y1=+v)},bezierCurveTo:function(T,f,n,v,m,b){this._+="C"+ +T+","+ +f+","+ +n+","+ +v+","+(this._x1=+m)+","+(this._y1=+b)},arcTo:function(T,f,n,v,m){T=+T,f=+f,n=+n,v=+v,m=+m;var b=this._x1,E=this._y1,p=n-T,S=v-f,w=b-T,i=E-f,C=w*w+i*i;if(m<0)throw new Error("negative radius: "+m);if(this._x1===null)this._+="M"+(this._x1=T)+","+(this._y1=f);else if(C>o)if(!(Math.abs(i*p-S*w)>o)||!m)this._+="L"+(this._x1=T)+","+(this._y1=f);else{var x=n-b,k=v-E,I=p*p+S*S,B=x*x+k*k,_=Math.sqrt(I),z=Math.sqrt(C),O=m*Math.tan((A-Math.acos((I+C-B)/(2*_*z)))/2),F=O/z,N=O/_;Math.abs(F-1)>o&&(this._+="L"+(T+F*w)+","+(f+F*i)),this._+="A"+m+","+m+",0,0,"+ +(i*x>w*k)+","+(this._x1=T+N*p)+","+(this._y1=f+N*S)}},arc:function(T,f,n,v,m,b){T=+T,f=+f,n=+n,b=!!b;var E=n*Math.cos(v),p=n*Math.sin(v),S=T+E,w=f+p,i=1^b,C=b?v-m:m-v;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+S+","+w:(Math.abs(this._x1-S)>o||Math.abs(this._y1-w)>o)&&(this._+="L"+S+","+w),n&&(C<0&&(C=C%P+P),C>L?this._+="A"+n+","+n+",0,1,"+i+","+(T-E)+","+(f-p)+"A"+n+","+n+",0,1,"+i+","+(this._x1=S)+","+(this._y1=w):C>o&&(this._+="A"+n+","+n+",0,"+ +(C>=A)+","+i+","+(this._x1=T+n*Math.cos(m))+","+(this._y1=f+n*Math.sin(m))))},rect:function(T,f,n,v){this._+="M"+(this._x0=this._x1=+T)+","+(this._y0=this._y1=+f)+"h"+ +n+"v"+ +v+"h"+-n+"Z"},toString:function(){return this._}};var g=d,r=Array.prototype.slice;function t(T){return function(){return T}}function s(T){return T[0]}function a(T){return T[1]}function c(T){return T.source}function u(T){return T.target}function l(T){var f=c,n=u,v=s,m=a,b=null;function E(){var p,S=r.call(arguments),w=f.apply(this,S),i=n.apply(this,S);if(b||(b=p=g()),T(b,+v.apply(this,(S[0]=w,S)),+m.apply(this,S),+v.apply(this,(S[0]=i,S)),+m.apply(this,S)),p)return b=null,p+""||null}return E.source=function(p){return arguments.length?(f=p,E):f},E.target=function(p){return arguments.length?(n=p,E):n},E.x=function(p){return arguments.length?(v=typeof p=="function"?p:t(+p),E):v},E.y=function(p){return arguments.length?(m=typeof p=="function"?p:t(+p),E):m},E.context=function(p){return arguments.length?(b=p??null,E):b},E}function y(T,f,n,v,m){T.moveTo(f,n),T.bezierCurveTo(f=(f+v)/2,n,f,m,v,m)}function h(){return l(y)}},94336:function(te,X,e){e.d(X,{Yn:function(){return Ue},m_:function(){return s},E9:function(){return He}});var A=e(8208),P=e(58931),o=e(46192),L=e(68936),M=e(32171),d=e(53528);function g(Ce){if(0<=Ce.y&&Ce.y<100){var ge=new Date(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L);return ge.setFullYear(Ce.y),ge}return new Date(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L)}function r(Ce){if(0<=Ce.y&&Ce.y<100){var ge=new Date(Date.UTC(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L));return ge.setUTCFullYear(Ce.y),ge}return new Date(Date.UTC(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L))}function t(Ce,ge,pe){return{y:Ce,m:ge,d:pe,H:0,M:0,S:0,L:0}}function s(Ce){var ge=Ce.dateTime,pe=Ce.date,Te=Ce.time,be=Ce.periods,ke=Ce.days,Ve=Ce.shortDays,je=Ce.months,at=Ce.shortMonths,ut=T(be),Nt=f(be),Vt=T(ke),gt=f(ke),Ct=T(Ve),Yt=f(Ve),gr=T(je),ht=f(je),Ht=T(at),Wt=f(at),cr={a:Be,A:Fe,b:Rt,B:Lt,c:null,d:j,e:j,f:G,H:$,I:q,j:oe,L:Z,m:re,M:H,p:Ut,q:Qt,Q:xt,s:Je,S:J,u:ae,U:K,V:Y,w:ie,W:ne,x:null,X:null,y:le,Y:de,Z:we,"%":vt},er={a:rr,A:Kt,b:Dt,B:sr,c:null,d:me,e:me,f:Se,H:Le,I:ve,j:Ae,L:ye,m:_e,M:ze,p:fr,q:vr,Q:xt,s:Je,S:Ie,u:Ne,U:et,V:st,w:Ze,W:Ke,x:null,X:null,y:nt,Y:it,Z:lt,"%":vt},ct={a:Mt,A:_t,b:It,B:Gt,c:nr,d:x,e:x,f:O,H:I,I,j:k,L:z,m:C,M:B,p:Et,q:i,Q:N,s:V,S:_,u:v,U:m,V:b,w:n,W:E,x:ar,X:ir,y:S,Y:p,Z:w,"%":F};cr.x=qe(pe,cr),cr.X=qe(Te,cr),cr.c=qe(ge,cr),er.x=qe(pe,er),er.X=qe(Te,er),er.c=qe(ge,er);function qe(lr,Or){return function(Sr){var Ar=[],sn=-1,Jr=0,bn=lr.length,xn,or,Lr;for(Sr instanceof Date||(Sr=new Date(+Sr));++sn<bn;)lr.charCodeAt(sn)===37&&(Ar.push(lr.slice(Jr,sn)),(or=a[xn=lr.charAt(++sn)])!=null?xn=lr.charAt(++sn):or=xn==="e"?" ":"0",(Lr=Or[xn])&&(xn=Lr(Sr,or)),Ar.push(xn),Jr=sn+1);return Ar.push(lr.slice(Jr,sn)),Ar.join("")}}function dt(lr,Or){return function(Sr){var Ar=t(1900,void 0,1),sn=bt(Ar,lr,Sr+="",0),Jr,bn;if(sn!=Sr.length)return null;if("Q"in Ar)return new Date(Ar.Q);if("s"in Ar)return new Date(Ar.s*1e3+("L"in Ar?Ar.L:0));if(Or&&!("Z"in Ar)&&(Ar.Z=0),"p"in Ar&&(Ar.H=Ar.H%12+Ar.p*12),Ar.m===void 0&&(Ar.m="q"in Ar?Ar.q:0),"V"in Ar){if(Ar.V<1||Ar.V>53)return null;"w"in Ar||(Ar.w=1),"Z"in Ar?(Jr=r(t(Ar.y,0,1)),bn=Jr.getUTCDay(),Jr=bn>4||bn===0?A.ot.ceil(Jr):(0,A.ot)(Jr),Jr=P.c.offset(Jr,(Ar.V-1)*7),Ar.y=Jr.getUTCFullYear(),Ar.m=Jr.getUTCMonth(),Ar.d=Jr.getUTCDate()+(Ar.w+6)%7):(Jr=g(t(Ar.y,0,1)),bn=Jr.getDay(),Jr=bn>4||bn===0?o.qT.ceil(Jr):(0,o.qT)(Jr),Jr=L.c.offset(Jr,(Ar.V-1)*7),Ar.y=Jr.getFullYear(),Ar.m=Jr.getMonth(),Ar.d=Jr.getDate()+(Ar.w+6)%7)}else("W"in Ar||"U"in Ar)&&("w"in Ar||(Ar.w="u"in Ar?Ar.u%7:"W"in Ar?1:0),bn="Z"in Ar?r(t(Ar.y,0,1)).getUTCDay():g(t(Ar.y,0,1)).getDay(),Ar.m=0,Ar.d="W"in Ar?(Ar.w+6)%7+Ar.W*7-(bn+5)%7:Ar.w+Ar.U*7-(bn+6)%7);return"Z"in Ar?(Ar.H+=Ar.Z/100|0,Ar.M+=Ar.Z%100,r(Ar)):g(Ar)}}function bt(lr,Or,Sr,Ar){for(var sn=0,Jr=Or.length,bn=Sr.length,xn,or;sn<Jr;){if(Ar>=bn)return-1;if(xn=Or.charCodeAt(sn++),xn===37){if(xn=Or.charAt(sn++),or=ct[xn in a?Or.charAt(sn++):xn],!or||(Ar=or(lr,Sr,Ar))<0)return-1}else if(xn!=Sr.charCodeAt(Ar++))return-1}return Ar}function Et(lr,Or,Sr){var Ar=ut.exec(Or.slice(Sr));return Ar?(lr.p=Nt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function Mt(lr,Or,Sr){var Ar=Ct.exec(Or.slice(Sr));return Ar?(lr.w=Yt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function _t(lr,Or,Sr){var Ar=Vt.exec(Or.slice(Sr));return Ar?(lr.w=gt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function It(lr,Or,Sr){var Ar=Ht.exec(Or.slice(Sr));return Ar?(lr.m=Wt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function Gt(lr,Or,Sr){var Ar=gr.exec(Or.slice(Sr));return Ar?(lr.m=ht[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function nr(lr,Or,Sr){return bt(lr,ge,Or,Sr)}function ar(lr,Or,Sr){return bt(lr,pe,Or,Sr)}function ir(lr,Or,Sr){return bt(lr,Te,Or,Sr)}function Be(lr){return Ve[lr.getDay()]}function Fe(lr){return ke[lr.getDay()]}function Rt(lr){return at[lr.getMonth()]}function Lt(lr){return je[lr.getMonth()]}function Ut(lr){return be[+(lr.getHours()>=12)]}function Qt(lr){return 1+~~(lr.getMonth()/3)}function rr(lr){return Ve[lr.getUTCDay()]}function Kt(lr){return ke[lr.getUTCDay()]}function Dt(lr){return at[lr.getUTCMonth()]}function sr(lr){return je[lr.getUTCMonth()]}function fr(lr){return be[+(lr.getUTCHours()>=12)]}function vr(lr){return 1+~~(lr.getUTCMonth()/3)}return{format:function(lr){var Or=qe(lr+="",cr);return Or.toString=function(){return lr},Or},parse:function(lr){var Or=dt(lr+="",!1);return Or.toString=function(){return lr},Or},utcFormat:function(lr){var Or=qe(lr+="",er);return Or.toString=function(){return lr},Or},utcParse:function(lr){var Or=dt(lr+="",!0);return Or.toString=function(){return lr},Or}}}var a={"-":"",_:" ",0:"0"},c=/^\s*\d+/,u=/^%/,l=/[\\^$*+?|[\]().{}]/g;function y(Ce,ge,pe){var Te=Ce<0?"-":"",be=(Te?-Ce:Ce)+"",ke=be.length;return Te+(ke<pe?new Array(pe-ke+1).join(ge)+be:be)}function h(Ce){return Ce.replace(l,"\\$&")}function T(Ce){return new RegExp("^(?:"+Ce.map(h).join("|")+")","i")}function f(Ce){for(var ge={},pe=-1,Te=Ce.length;++pe<Te;)ge[Ce[pe].toLowerCase()]=pe;return ge}function n(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+1));return Te?(Ce.w=+Te[0],pe+Te[0].length):-1}function v(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+1));return Te?(Ce.u=+Te[0],pe+Te[0].length):-1}function m(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.U=+Te[0],pe+Te[0].length):-1}function b(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.V=+Te[0],pe+Te[0].length):-1}function E(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.W=+Te[0],pe+Te[0].length):-1}function p(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+4));return Te?(Ce.y=+Te[0],pe+Te[0].length):-1}function S(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.y=+Te[0]+(+Te[0]>68?1900:2e3),pe+Te[0].length):-1}function w(Ce,ge,pe){var Te=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ge.slice(pe,pe+6));return Te?(Ce.Z=Te[1]?0:-(Te[2]+(Te[3]||"00")),pe+Te[0].length):-1}function i(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+1));return Te?(Ce.q=Te[0]*3-3,pe+Te[0].length):-1}function C(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.m=Te[0]-1,pe+Te[0].length):-1}function x(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.d=+Te[0],pe+Te[0].length):-1}function k(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+3));return Te?(Ce.m=0,Ce.d=+Te[0],pe+Te[0].length):-1}function I(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.H=+Te[0],pe+Te[0].length):-1}function B(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.M=+Te[0],pe+Te[0].length):-1}function _(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.S=+Te[0],pe+Te[0].length):-1}function z(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+3));return Te?(Ce.L=+Te[0],pe+Te[0].length):-1}function O(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+6));return Te?(Ce.L=Math.floor(Te[0]/1e3),pe+Te[0].length):-1}function F(Ce,ge,pe){var Te=u.exec(ge.slice(pe,pe+1));return Te?pe+Te[0].length:-1}function N(Ce,ge,pe){var Te=c.exec(ge.slice(pe));return Te?(Ce.Q=+Te[0],pe+Te[0].length):-1}function V(Ce,ge,pe){var Te=c.exec(ge.slice(pe));return Te?(Ce.s=+Te[0],pe+Te[0].length):-1}function j(Ce,ge){return y(Ce.getDate(),ge,2)}function $(Ce,ge){return y(Ce.getHours(),ge,2)}function q(Ce,ge){return y(Ce.getHours()%12||12,ge,2)}function oe(Ce,ge){return y(1+L.c.count((0,M.c)(Ce),Ce),ge,3)}function Z(Ce,ge){return y(Ce.getMilliseconds(),ge,3)}function G(Ce,ge){return Z(Ce,ge)+"000"}function re(Ce,ge){return y(Ce.getMonth()+1,ge,2)}function H(Ce,ge){return y(Ce.getMinutes(),ge,2)}function J(Ce,ge){return y(Ce.getSeconds(),ge,2)}function ae(Ce){var ge=Ce.getDay();return ge===0?7:ge}function K(Ce,ge){return y(o.uU.count((0,M.c)(Ce)-1,Ce),ge,2)}function Y(Ce,ge){var pe=Ce.getDay();return Ce=pe>=4||pe===0?(0,o.kD)(Ce):o.kD.ceil(Ce),y(o.kD.count((0,M.c)(Ce),Ce)+((0,M.c)(Ce).getDay()===4),ge,2)}function ie(Ce){return Ce.getDay()}function ne(Ce,ge){return y(o.qT.count((0,M.c)(Ce)-1,Ce),ge,2)}function le(Ce,ge){return y(Ce.getFullYear()%100,ge,2)}function de(Ce,ge){return y(Ce.getFullYear()%1e4,ge,4)}function we(Ce){var ge=Ce.getTimezoneOffset();return(ge>0?"-":(ge*=-1,"+"))+y(ge/60|0,"0",2)+y(ge%60,"0",2)}function me(Ce,ge){return y(Ce.getUTCDate(),ge,2)}function Le(Ce,ge){return y(Ce.getUTCHours(),ge,2)}function ve(Ce,ge){return y(Ce.getUTCHours()%12||12,ge,2)}function Ae(Ce,ge){return y(1+P.c.count((0,d.c)(Ce),Ce),ge,3)}function ye(Ce,ge){return y(Ce.getUTCMilliseconds(),ge,3)}function Se(Ce,ge){return ye(Ce,ge)+"000"}function _e(Ce,ge){return y(Ce.getUTCMonth()+1,ge,2)}function ze(Ce,ge){return y(Ce.getUTCMinutes(),ge,2)}function Ie(Ce,ge){return y(Ce.getUTCSeconds(),ge,2)}function Ne(Ce){var ge=Ce.getUTCDay();return ge===0?7:ge}function et(Ce,ge){return y(A.EV.count((0,d.c)(Ce)-1,Ce),ge,2)}function st(Ce,ge){var pe=Ce.getUTCDay();return Ce=pe>=4||pe===0?(0,A.yA)(Ce):A.yA.ceil(Ce),y(A.yA.count((0,d.c)(Ce),Ce)+((0,d.c)(Ce).getUTCDay()===4),ge,2)}function Ze(Ce){return Ce.getUTCDay()}function Ke(Ce,ge){return y(A.ot.count((0,d.c)(Ce)-1,Ce),ge,2)}function nt(Ce,ge){return y(Ce.getUTCFullYear()%100,ge,2)}function it(Ce,ge){return y(Ce.getUTCFullYear()%1e4,ge,4)}function lt(){return"+0000"}function vt(){return"%"}function xt(Ce){return+Ce}function Je(Ce){return Math.floor(+Ce/1e3)}var Pe,Ue,He;Oe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Oe(Ce){return Pe=s(Ce),Ue=Pe.format,Pe.parse,He=Pe.utcFormat,Pe.utcParse,Pe}},68936:function(te,X,e){e.d(X,{m:function(){return L}});var A=e(81628),P=e(69792),o=(0,A.c)(function(M){M.setHours(0,0,0,0)},function(M,d){M.setDate(M.getDate()+d)},function(M,d){return(d-M-(d.getTimezoneOffset()-M.getTimezoneOffset())*P.iy)/P.SK},function(M){return M.getDate()-1});X.c=o;var L=o.range},69792:function(te,X,e){e.d(X,{KK:function(){return M},SK:function(){return L},cg:function(){return o},iy:function(){return P},yc:function(){return A}});var A=1e3,P=6e4,o=36e5,L=864e5,M=6048e5},73220:function(te,X,e){e.r(X),e.d(X,{timeDay:function(){return y.c},timeDays:function(){return y.m},timeFriday:function(){return h.iB},timeFridays:function(){return h.sJ},timeHour:function(){return u},timeHours:function(){return l},timeInterval:function(){return A.c},timeMillisecond:function(){return o},timeMilliseconds:function(){return L},timeMinute:function(){return s},timeMinutes:function(){return a},timeMonday:function(){return h.qT},timeMondays:function(){return h.QP},timeMonth:function(){return f},timeMonths:function(){return n},timeSaturday:function(){return h.Wc},timeSaturdays:function(){return h.aI},timeSecond:function(){return g},timeSeconds:function(){return r},timeSunday:function(){return h.uU},timeSundays:function(){return h.Ab},timeThursday:function(){return h.kD},timeThursdays:function(){return h.eC},timeTuesday:function(){return h.Mf},timeTuesdays:function(){return h.Oc},timeWednesday:function(){return h.eg},timeWednesdays:function(){return h.sn},timeWeek:function(){return h.uU},timeWeeks:function(){return h.Ab},timeYear:function(){return v.c},timeYears:function(){return v.Q},utcDay:function(){return i.c},utcDays:function(){return i.o},utcFriday:function(){return C.od},utcFridays:function(){return C.iG},utcHour:function(){return S},utcHours:function(){return w},utcMillisecond:function(){return o},utcMilliseconds:function(){return L},utcMinute:function(){return b},utcMinutes:function(){return E},utcMonday:function(){return C.ot},utcMondays:function(){return C.iO},utcMonth:function(){return k},utcMonths:function(){return I},utcSaturday:function(){return C.Ad},utcSaturdays:function(){return C.K8},utcSecond:function(){return g},utcSeconds:function(){return r},utcSunday:function(){return C.EV},utcSundays:function(){return C.Wq},utcThursday:function(){return C.yA},utcThursdays:function(){return C.ob},utcTuesday:function(){return C.sG},utcTuesdays:function(){return C.kl},utcWednesday:function(){return C._6},utcWednesdays:function(){return C.W_},utcWeek:function(){return C.EV},utcWeeks:function(){return C.Wq},utcYear:function(){return B.c},utcYears:function(){return B.i}});var A=e(81628),P=(0,A.c)(function(){},function(_,z){_.setTime(+_+z)},function(_,z){return z-_});P.every=function(_){return _=Math.floor(_),!isFinite(_)||!(_>0)?null:_>1?(0,A.c)(function(z){z.setTime(Math.floor(z/_)*_)},function(z,O){z.setTime(+z+O*_)},function(z,O){return(O-z)/_}):P};var o=P,L=P.range,M=e(69792),d=(0,A.c)(function(_){_.setTime(_-_.getMilliseconds())},function(_,z){_.setTime(+_+z*M.yc)},function(_,z){return(z-_)/M.yc},function(_){return _.getUTCSeconds()}),g=d,r=d.range,t=(0,A.c)(function(_){_.setTime(_-_.getMilliseconds()-_.getSeconds()*M.yc)},function(_,z){_.setTime(+_+z*M.iy)},function(_,z){return(z-_)/M.iy},function(_){return _.getMinutes()}),s=t,a=t.range,c=(0,A.c)(function(_){_.setTime(_-_.getMilliseconds()-_.getSeconds()*M.yc-_.getMinutes()*M.iy)},function(_,z){_.setTime(+_+z*M.cg)},function(_,z){return(z-_)/M.cg},function(_){return _.getHours()}),u=c,l=c.range,y=e(68936),h=e(46192),T=(0,A.c)(function(_){_.setDate(1),_.setHours(0,0,0,0)},function(_,z){_.setMonth(_.getMonth()+z)},function(_,z){return z.getMonth()-_.getMonth()+(z.getFullYear()-_.getFullYear())*12},function(_){return _.getMonth()}),f=T,n=T.range,v=e(32171),m=(0,A.c)(function(_){_.setUTCSeconds(0,0)},function(_,z){_.setTime(+_+z*M.iy)},function(_,z){return(z-_)/M.iy},function(_){return _.getUTCMinutes()}),b=m,E=m.range,p=(0,A.c)(function(_){_.setUTCMinutes(0,0,0)},function(_,z){_.setTime(+_+z*M.cg)},function(_,z){return(z-_)/M.cg},function(_){return _.getUTCHours()}),S=p,w=p.range,i=e(58931),C=e(8208),x=(0,A.c)(function(_){_.setUTCDate(1),_.setUTCHours(0,0,0,0)},function(_,z){_.setUTCMonth(_.getUTCMonth()+z)},function(_,z){return z.getUTCMonth()-_.getUTCMonth()+(z.getUTCFullYear()-_.getUTCFullYear())*12},function(_){return _.getUTCMonth()}),k=x,I=x.range,B=e(53528)},81628:function(te,X,e){e.d(X,{c:function(){return o}});var A=new Date,P=new Date;function o(L,M,d,g){function r(t){return L(t=arguments.length===0?new Date:new Date(+t)),t}return r.floor=function(t){return L(t=new Date(+t)),t},r.ceil=function(t){return L(t=new Date(t-1)),M(t,1),L(t),t},r.round=function(t){var s=r(t),a=r.ceil(t);return t-s<a-t?s:a},r.offset=function(t,s){return M(t=new Date(+t),s==null?1:Math.floor(s)),t},r.range=function(t,s,a){var c=[],u;if(t=r.ceil(t),a=a==null?1:Math.floor(a),!(t<s)||!(a>0))return c;do c.push(u=new Date(+t)),M(t,a),L(t);while(u<t&&t<s);return c},r.filter=function(t){return o(function(s){if(s>=s)for(;L(s),!t(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;M(s,-1),!t(s););else for(;--a>=0;)for(;M(s,1),!t(s););})},d&&(r.count=function(t,s){return A.setTime(+t),P.setTime(+s),L(A),L(P),Math.floor(d(A,P))},r.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?r.filter(g?function(s){return g(s)%t===0}:function(s){return r.count(0,s)%t===0}):r}),r}},58931:function(te,X,e){e.d(X,{o:function(){return L}});var A=e(81628),P=e(69792),o=(0,A.c)(function(M){M.setUTCHours(0,0,0,0)},function(M,d){M.setUTCDate(M.getUTCDate()+d)},function(M,d){return(d-M)/P.SK},function(M){return M.getUTCDate()-1});X.c=o;var L=o.range},8208:function(te,X,e){e.d(X,{Ad:function(){return s},EV:function(){return L},K8:function(){return T},W_:function(){return l},Wq:function(){return a},_6:function(){return g},iG:function(){return h},iO:function(){return c},kl:function(){return u},ob:function(){return y},od:function(){return t},ot:function(){return M},sG:function(){return d},yA:function(){return r}});var A=e(81628),P=e(69792);function o(f){return(0,A.c)(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-f)%7),n.setUTCHours(0,0,0,0)},function(n,v){n.setUTCDate(n.getUTCDate()+v*7)},function(n,v){return(v-n)/P.KK})}var L=o(0),M=o(1),d=o(2),g=o(3),r=o(4),t=o(5),s=o(6),a=L.range,c=M.range,u=d.range,l=g.range,y=r.range,h=t.range,T=s.range},53528:function(te,X,e){e.d(X,{i:function(){return o}});var A=e(81628),P=(0,A.c)(function(L){L.setUTCMonth(0,1),L.setUTCHours(0,0,0,0)},function(L,M){L.setUTCFullYear(L.getUTCFullYear()+M)},function(L,M){return M.getUTCFullYear()-L.getUTCFullYear()},function(L){return L.getUTCFullYear()});P.every=function(L){return!isFinite(L=Math.floor(L))||!(L>0)?null:(0,A.c)(function(M){M.setUTCFullYear(Math.floor(M.getUTCFullYear()/L)*L),M.setUTCMonth(0,1),M.setUTCHours(0,0,0,0)},function(M,d){M.setUTCFullYear(M.getUTCFullYear()+d*L)})},X.c=P;var o=P.range},46192:function(te,X,e){e.d(X,{Ab:function(){return a},Mf:function(){return d},Oc:function(){return u},QP:function(){return c},Wc:function(){return s},aI:function(){return T},eC:function(){return y},eg:function(){return g},iB:function(){return t},kD:function(){return r},qT:function(){return M},sJ:function(){return h},sn:function(){return l},uU:function(){return L}});var A=e(81628),P=e(69792);function o(f){return(0,A.c)(function(n){n.setDate(n.getDate()-(n.getDay()+7-f)%7),n.setHours(0,0,0,0)},function(n,v){n.setDate(n.getDate()+v*7)},function(n,v){return(v-n-(v.getTimezoneOffset()-n.getTimezoneOffset())*P.iy)/P.KK})}var L=o(0),M=o(1),d=o(2),g=o(3),r=o(4),t=o(5),s=o(6),a=L.range,c=M.range,u=d.range,l=g.range,y=r.range,h=t.range,T=s.range},32171:function(te,X,e){e.d(X,{Q:function(){return o}});var A=e(81628),P=(0,A.c)(function(L){L.setMonth(0,1),L.setHours(0,0,0,0)},function(L,M){L.setFullYear(L.getFullYear()+M)},function(L,M){return M.getFullYear()-L.getFullYear()},function(L){return L.getFullYear()});P.every=function(L){return!isFinite(L=Math.floor(L))||!(L>0)?null:(0,A.c)(function(M){M.setFullYear(Math.floor(M.getFullYear()/L)*L),M.setMonth(0,1),M.setHours(0,0,0,0)},function(M,d){M.setFullYear(M.getFullYear()+d*L)})},X.c=P;var o=P.range},64348:function(te,X,e){var A=e(39640)(),P=e(53664),o=A&&P("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch{o=!1}var L=P("%SyntaxError%"),M=P("%TypeError%"),d=e(2304);te.exports=function(r,t,s){if(!r||typeof r!="object"&&typeof r!="function")throw new M("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new M("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new M("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new M("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new M("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new M("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,y=!!d&&d(r,t);if(o)o(r,t,{configurable:u===null&&y?y.configurable:!u,enumerable:a===null&&y?y.enumerable:!a,value:s,writable:c===null&&y?y.writable:!c});else if(l||!a&&!c&&!u)r[t]=s;else throw new L("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}},81288:function(te,X,e){var A=e(41820),P=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",o=Object.prototype.toString,L=Array.prototype.concat,M=Object.defineProperty,d=function(a){return typeof a=="function"&&o.call(a)==="[object Function]"},g=e(39640)(),r=M&&g,t=function(a,c,u,l){if(c in a){if(l===!0){if(a[c]===u)return}else if(!d(l)||!l())return}r?M(a,c,{configurable:!0,enumerable:!1,value:u,writable:!0}):a[c]=u},s=function(a,c){var u=arguments.length>2?arguments[2]:{},l=A(c);P&&(l=L.call(l,Object.getOwnPropertySymbols(c)));for(var y=0;y<l.length;y+=1)t(a,l[y],c[l[y]],u[l[y]])};s.supportsDescriptors=!!r,te.exports=s},31264:function(te){te.exports=function(){for(var X=0;X<arguments.length;X++)if(arguments[X]!==void 0)return arguments[X]}},63768:function(te){te.exports=P;var X=P.canvas=document.createElement("canvas"),e=X.getContext("2d"),A=o([32,126]);P.createPairs=o,P.ascii=A;function P(L,M){Array.isArray(L)&&(L=L.join(", "));var d={},g,r=16,t=.05;M&&(M.length===2&&typeof M[0]=="number"?g=o(M):Array.isArray(M)?g=M:(M.o?g=o(M.o):M.pairs&&(g=M.pairs),M.fontSize&&(r=M.fontSize),M.threshold!=null&&(t=M.threshold))),g||(g=A),e.font=r+"px "+L;for(var s=0;s<g.length;s++){var a=g[s],c=e.measureText(a[0]).width+e.measureText(a[1]).width,u=e.measureText(a).width;if(Math.abs(c-u)>r*t){var l=(u-c)/r;d[a]=l*1e3}}return d}function o(L){for(var M=[],d=L[0];d<=L[1];d++)for(var g=String.fromCharCode(d),r=L[0];r<L[1];r++){var t=String.fromCharCode(r),s=g+t;M.push(s)}return M}},22235:function(te,X,e){var A=e(49972),P=e(48816),o={M:"moveTo",C:"bezierCurveTo"};te.exports=function(L,M){L.beginPath(),P(A(M)).forEach(function(d){var g=d[0],r=d.slice(1);L[o[g]].apply(L,r)}),L.closePath()}},72512:function(te){te.exports=function(X){switch(X){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}}},10352:function(te){function X(P,o,L){var M=P[L]|0;if(M<=0)return[];var d=new Array(M),g;if(L===P.length-1)for(g=0;g<M;++g)d[g]=o;else for(g=0;g<M;++g)d[g]=X(P,o,L+1);return d}function e(P,o){var L,M;for(L=new Array(P),M=0;M<P;++M)L[M]=o;return L}function A(P,o){switch(typeof o>"u"&&(o=0),typeof P){case"number":if(P>0)return e(P|0,o);break;case"object":if(typeof P.length=="number")return X(P,o,0);break}return[]}te.exports=A},28912:function(te){te.exports=X,te.exports.default=X;function X(I,B,_){_=_||2;var z=B&&B.length,O=z?B[0]*_:I.length,F=e(I,0,O,_,!0),N=[];if(!F||F.next===F.prev)return N;var V,j,$,q,oe,Z,G;if(z&&(F=g(I,B,F,_)),I.length>80*_){V=$=I[0],j=q=I[1];for(var re=_;re<O;re+=_)oe=I[re],Z=I[re+1],oe<V&&(V=oe),Z<j&&(j=Z),oe>$&&($=oe),Z>q&&(q=Z);G=Math.max($-V,q-j),G=G!==0?1/G:0}return P(F,N,_,V,j,G),N}function e(I,B,_,z,O){var F,N;if(O===k(I,B,_,z)>0)for(F=B;F<_;F+=z)N=i(F,I[F],I[F+1],N);else for(F=_-z;F>=B;F-=z)N=i(F,I[F],I[F+1],N);return N&&n(N,N.next)&&(C(N),N=N.next),N}function A(I,B){if(!I)return I;B||(B=I);var _=I,z;do if(z=!1,!_.steiner&&(n(_,_.next)||f(_.prev,_,_.next)===0)){if(C(_),_=B=_.prev,_===_.next)break;z=!0}else _=_.next;while(z||_!==B);return B}function P(I,B,_,z,O,F,N){if(I){!N&&F&&c(I,z,O,F);for(var V=I,j,$;I.prev!==I.next;){if(j=I.prev,$=I.next,F?L(I,z,O,F):o(I)){B.push(j.i/_),B.push(I.i/_),B.push($.i/_),C(I),I=$.next,V=$.next;continue}if(I=$,I===V){N?N===1?(I=M(A(I),B,_),P(I,B,_,z,O,F,2)):N===2&&d(I,B,_,z,O,F):P(A(I),B,_,z,O,F,1);break}}}}function o(I){var B=I.prev,_=I,z=I.next;if(f(B,_,z)>=0)return!1;for(var O=I.next.next;O!==I.prev;){if(h(B.x,B.y,_.x,_.y,z.x,z.y,O.x,O.y)&&f(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function L(I,B,_,z){var O=I.prev,F=I,N=I.next;if(f(O,F,N)>=0)return!1;for(var V=O.x<F.x?O.x<N.x?O.x:N.x:F.x<N.x?F.x:N.x,j=O.y<F.y?O.y<N.y?O.y:N.y:F.y<N.y?F.y:N.y,$=O.x>F.x?O.x>N.x?O.x:N.x:F.x>N.x?F.x:N.x,q=O.y>F.y?O.y>N.y?O.y:N.y:F.y>N.y?F.y:N.y,oe=l(V,j,B,_,z),Z=l($,q,B,_,z),G=I.prevZ,re=I.nextZ;G&&G.z>=oe&&re&&re.z<=Z;){if(G!==I.prev&&G!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,G.x,G.y)&&f(G.prev,G,G.next)>=0||(G=G.prevZ,re!==I.prev&&re!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,re.x,re.y)&&f(re.prev,re,re.next)>=0))return!1;re=re.nextZ}for(;G&&G.z>=oe;){if(G!==I.prev&&G!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,G.x,G.y)&&f(G.prev,G,G.next)>=0)return!1;G=G.prevZ}for(;re&&re.z<=Z;){if(re!==I.prev&&re!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,re.x,re.y)&&f(re.prev,re,re.next)>=0)return!1;re=re.nextZ}return!0}function M(I,B,_){var z=I;do{var O=z.prev,F=z.next.next;!n(O,F)&&v(O,z,z.next,F)&&p(O,F)&&p(F,O)&&(B.push(O.i/_),B.push(z.i/_),B.push(F.i/_),C(z),C(z.next),z=I=F),z=z.next}while(z!==I);return A(z)}function d(I,B,_,z,O,F){var N=I;do{for(var V=N.next.next;V!==N.prev;){if(N.i!==V.i&&T(N,V)){var j=w(N,V);N=A(N,N.next),j=A(j,j.next),P(N,B,_,z,O,F),P(j,B,_,z,O,F);return}V=V.next}N=N.next}while(N!==I)}function g(I,B,_,z){var O=[],F,N,V,j,$;for(F=0,N=B.length;F<N;F++)V=B[F]*z,j=F<N-1?B[F+1]*z:I.length,$=e(I,V,j,z,!1),$===$.next&&($.steiner=!0),O.push(y($));for(O.sort(r),F=0;F<O.length;F++)t(O[F],_),_=A(_,_.next);return _}function r(I,B){return I.x-B.x}function t(I,B){if(B=s(I,B),B){var _=w(B,I);A(B,B.next),A(_,_.next)}}function s(I,B){var _=B,z=I.x,O=I.y,F=-1/0,N;do{if(O<=_.y&&O>=_.next.y&&_.next.y!==_.y){var V=_.x+(O-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if(V<=z&&V>F){if(F=V,V===z){if(O===_.y)return _;if(O===_.next.y)return _.next}N=_.x<_.next.x?_:_.next}}_=_.next}while(_!==B);if(!N)return null;if(z===F)return N;var j=N,$=N.x,q=N.y,oe=1/0,Z;_=N;do z>=_.x&&_.x>=$&&z!==_.x&&h(O<q?z:F,O,$,q,O<q?F:z,O,_.x,_.y)&&(Z=Math.abs(O-_.y)/(z-_.x),p(_,I)&&(Z<oe||Z===oe&&(_.x>N.x||_.x===N.x&&a(N,_)))&&(N=_,oe=Z)),_=_.next;while(_!==j);return N}function a(I,B){return f(I.prev,I,B.prev)<0&&f(B.next,I,I.next)<0}function c(I,B,_,z){var O=I;do O.z===null&&(O.z=l(O.x,O.y,B,_,z)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==I);O.prevZ.nextZ=null,O.prevZ=null,u(O)}function u(I){var B,_,z,O,F,N,V,j,$=1;do{for(_=I,I=null,F=null,N=0;_;){for(N++,z=_,V=0,B=0;B<$&&(V++,z=z.nextZ,!!z);B++);for(j=$;V>0||j>0&&z;)V!==0&&(j===0||!z||_.z<=z.z)?(O=_,_=_.nextZ,V--):(O=z,z=z.nextZ,j--),F?F.nextZ=O:I=O,O.prevZ=F,F=O;_=z}F.nextZ=null,$*=2}while(N>1);return I}function l(I,B,_,z,O){return I=32767*(I-_)*O,B=32767*(B-z)*O,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,I|B<<1}function y(I){var B=I,_=I;do(B.x<_.x||B.x===_.x&&B.y<_.y)&&(_=B),B=B.next;while(B!==I);return _}function h(I,B,_,z,O,F,N,V){return(O-N)*(B-V)-(I-N)*(F-V)>=0&&(I-N)*(z-V)-(_-N)*(B-V)>=0&&(_-N)*(F-V)-(O-N)*(z-V)>=0}function T(I,B){return I.next.i!==B.i&&I.prev.i!==B.i&&!E(I,B)&&(p(I,B)&&p(B,I)&&S(I,B)&&(f(I.prev,I,B.prev)||f(I,B.prev,B))||n(I,B)&&f(I.prev,I,I.next)>0&&f(B.prev,B,B.next)>0)}function f(I,B,_){return(B.y-I.y)*(_.x-B.x)-(B.x-I.x)*(_.y-B.y)}function n(I,B){return I.x===B.x&&I.y===B.y}function v(I,B,_,z){var O=b(f(I,B,_)),F=b(f(I,B,z)),N=b(f(_,z,I)),V=b(f(_,z,B));return!!(O!==F&&N!==V||O===0&&m(I,_,B)||F===0&&m(I,z,B)||N===0&&m(_,I,z)||V===0&&m(_,B,z))}function m(I,B,_){return B.x<=Math.max(I.x,_.x)&&B.x>=Math.min(I.x,_.x)&&B.y<=Math.max(I.y,_.y)&&B.y>=Math.min(I.y,_.y)}function b(I){return I>0?1:I<0?-1:0}function E(I,B){var _=I;do{if(_.i!==I.i&&_.next.i!==I.i&&_.i!==B.i&&_.next.i!==B.i&&v(_,_.next,I,B))return!0;_=_.next}while(_!==I);return!1}function p(I,B){return f(I.prev,I,I.next)<0?f(I,B,I.next)>=0&&f(I,I.prev,B)>=0:f(I,B,I.prev)<0||f(I,I.next,B)<0}function S(I,B){var _=I,z=!1,O=(I.x+B.x)/2,F=(I.y+B.y)/2;do _.y>F!=_.next.y>F&&_.next.y!==_.y&&O<(_.next.x-_.x)*(F-_.y)/(_.next.y-_.y)+_.x&&(z=!z),_=_.next;while(_!==I);return z}function w(I,B){var _=new x(I.i,I.x,I.y),z=new x(B.i,B.x,B.y),O=I.next,F=B.prev;return I.next=B,B.prev=I,_.next=O,O.prev=_,z.next=_,_.prev=z,F.next=z,z.prev=F,z}function i(I,B,_,z){var O=new x(I,B,_);return z?(O.next=z.next,O.prev=z,z.next.prev=O,z.next=O):(O.prev=O,O.next=O),O}function C(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 x(I,B,_){this.i=I,this.x=B,this.y=_,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}X.deviation=function(I,B,_,z){var O=B&&B.length,F=O?B[0]*_:I.length,N=Math.abs(k(I,0,F,_));if(O)for(var V=0,j=B.length;V<j;V++){var $=B[V]*_,q=V<j-1?B[V+1]*_:I.length;N-=Math.abs(k(I,$,q,_))}var oe=0;for(V=0;V<z.length;V+=3){var Z=z[V]*_,G=z[V+1]*_,re=z[V+2]*_;oe+=Math.abs((I[Z]-I[re])*(I[G+1]-I[Z+1])-(I[Z]-I[G])*(I[re+1]-I[Z+1]))}return N===0&&oe===0?0:Math.abs((oe-N)/N)};function k(I,B,_,z){for(var O=0,F=B,N=_-z;F<_;F+=z)O+=(I[N]-I[F])*(I[F+1]+I[N+1]),N=F;return O}X.flatten=function(I){for(var B=I[0][0].length,_={vertices:[],holes:[],dimensions:B},z=0,O=0;O<I.length;O++){for(var F=0;F<I[O].length;F++)for(var N=0;N<B;N++)_.vertices.push(I[O][F][N]);O>0&&(z+=I[O-1].length,_.holes.push(z))}return _}},6688:function(te,X,e){var A=e(78484);te.exports=function(o,L){var M=[],d=[],g=[],r={},t=[],s;function a(m){g[m]=!1,r.hasOwnProperty(m)&&Object.keys(r[m]).forEach(function(b){delete r[m][b],g[b]&&a(b)})}function c(m){var b=!1;d.push(m),g[m]=!0;var E,p;for(E=0;E<t[m].length;E++)p=t[m][E],p===s?(u(s,d),b=!0):g[p]||(b=c(p));if(b)a(m);else for(E=0;E<t[m].length;E++){p=t[m][E];var S=r[p];S||(S={},r[p]=S),S[p]=!0}return d.pop(),b}function u(m,b){var E=[].concat(b).concat(m);L?L(c):M.push(E)}function l(m){for(var b=0;b<o.length;b++)b<m&&(o[b]=[]),o[b]=o[b].filter(function(E){return E>=m})}function y(m){l(m);for(var b=o,E=A(b),p=E.components.filter(function(I){return I.length>1}),S=1/0,w,i=0;i<p.length;i++)for(var C=0;C<p[i].length;C++)p[i][C]<S&&(S=p[i][C],w=i);var x=p[w];if(!x)return!1;var k=o.map(function(I,B){return x.indexOf(B)===-1?[]:I.filter(function(_){return x.indexOf(_)!==-1})});return{leastVertex:S,adjList:k}}s=0;for(var h=o.length;s<h;){var T=y(s);if(s=T.leastVertex,t=T.adjList,t){for(var f=0;f<t.length;f++)for(var n=0;n<t[f].length;n++){var v=t[f][n];g[+v]=!1,r[v]={}}c(s),s=s+1}else s=h}if(!L)return M}},41476:function(te,X,e){var A=e(9252);te.exports=function(){return A(this).length=0,this}},74772:function(te,X,e){te.exports=e(44716)()?Array.from:e(80816)},44716:function(te){te.exports=function(){var X=Array.from,e,A;return typeof X!="function"?!1:(e=["raz","dwa"],A=X(e),!!(A&&A!==e&&A[1]==="dwa"))}},80816:function(te,X,e){var A=e(92664).iterator,P=e(60948),o=e(17024),L=e(81304),M=e(34044),d=e(9252),g=e(42584),r=e(29768),t=Array.isArray,s=Function.prototype.call,a={configurable:!0,enumerable:!0,writable:!0,value:null},c=Object.defineProperty;te.exports=function(u){var l=arguments[1],y=arguments[2],h,T,f,n,v,m,b,E,p,S;if(u=Object(d(u)),g(l)&&M(l),!this||this===Array||!o(this)){if(!l){if(P(u))return v=u.length,v!==1?Array.apply(null,u):(n=new Array(1),n[0]=u[0],n);if(t(u)){for(n=new Array(v=u.length),T=0;T<v;++T)n[T]=u[T];return n}}n=[]}else h=this;if(!t(u)){if((p=u[A])!==void 0){for(b=M(p).call(u),h&&(n=new h),E=b.next(),T=0;!E.done;)S=l?s.call(l,y,E.value,T):E.value,h?(a.value=S,c(n,T,a)):n[T]=S,E=b.next(),++T;v=T}else if(r(u)){for(v=u.length,h&&(n=new h),T=0,f=0;T<v;++T)S=u[T],T+1<v&&(m=S.charCodeAt(0),m>=55296&&m<=56319&&(S+=u[++T])),S=l?s.call(l,y,S,f):S,h?(a.value=S,c(n,f,a)):n[f]=S,++f;v=f}}if(v===void 0)for(v=L(u.length),h&&(n=new h(v)),T=0;T<v;++T)S=l?s.call(l,y,u[T],T):u[T],h?(a.value=S,c(n,T,a)):n[T]=S;return h&&(a.value=null,n.length=v),n}},60948:function(te){var X=Object.prototype.toString,e=X.call(function(){return arguments}());te.exports=function(A){return X.call(A)===e}},17024:function(te){var X=Object.prototype.toString,e=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);te.exports=function(A){return typeof A=="function"&&e(X.call(A))}},33208:function(te){te.exports=function(){}},85608:function(te,X,e){te.exports=e(37328)()?Math.sign:e(92928)},37328:function(te){te.exports=function(){var X=Math.sign;return typeof X!="function"?!1:X(10)===1&&X(-20)===-1}},92928:function(te){te.exports=function(X){return X=Number(X),isNaN(X)||X===0?X:X>0?1:-1}},96936:function(te,X,e){var A=e(85608),P=Math.abs,o=Math.floor;te.exports=function(L){return isNaN(L)?0:(L=Number(L),L===0||!isFinite(L)?L:A(L)*o(P(L)))}},81304:function(te,X,e){var A=e(96936),P=Math.max;te.exports=function(o){return P(0,A(o))}},14428:function(te,X,e){var A=e(34044),P=e(9252),o=Function.prototype.bind,L=Function.prototype.call,M=Object.keys,d=Object.prototype.propertyIsEnumerable;te.exports=function(g,r){return function(t,s){var a,c=arguments[2],u=arguments[3];return t=Object(P(t)),A(s),a=M(t),u&&a.sort(typeof u=="function"?o.call(u,t):void 0),typeof g!="function"&&(g=a[g]),L.call(g,a,function(l,y){return d.call(t,l)?L.call(s,c,t[l],l,t,y):r})}}},38452:function(te,X,e){te.exports=e(96276)()?Object.assign:e(81892)},96276:function(te){te.exports=function(){var X=Object.assign,e;return typeof X!="function"?!1:(e={foo:"raz"},X(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},81892:function(te,X,e){var A=e(54768),P=e(9252),o=Math.max;te.exports=function(L,M){var d,g,r=o(arguments.length,2),t;for(L=Object(P(L)),t=function(s){try{L[s]=M[s]}catch(a){d||(d=a)}},g=1;g<r;++g)M=arguments[g],A(M).forEach(t);if(d!==void 0)throw d;return L}},95920:function(te,X,e){var A=e(74772),P=e(38452),o=e(9252);te.exports=function(L){var M=Object(o(L)),d=arguments[1],g=Object(arguments[2]);if(M!==L&&!d)return M;var r={};return d?A(d,function(t){(g.ensure||t in L)&&(r[t]=L[t])}):P(r,L),r}},14452:function(te,X,e){var A=Object.create,P;e(63092)()||(P=e(8672)),te.exports=function(){var o,L,M;return!P||P.level!==1?A:(o={},L={},M={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(d){if(d==="__proto__"){L[d]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}L[d]=M}),Object.defineProperties(o,L),Object.defineProperty(P,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:o}),function(d,g){return A(d===null?o:d,g)})}()},42748:function(te,X,e){te.exports=e(14428)("forEach")},69127:function(te,X,e){var A=e(42584),P={function:!0,object:!0};te.exports=function(o){return A(o)&&P[typeof o]||!1}},42584:function(te,X,e){var A=e(33208)();te.exports=function(P){return P!==A&&P!==null}},54768:function(te,X,e){te.exports=e(87888)()?Object.keys:e(89592)},87888:function(te){te.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}},89592:function(te,X,e){var A=e(42584),P=Object.keys;te.exports=function(o){return P(A(o)?Object(o):o)}},84323:function(te,X,e){var A=e(34044),P=e(42748),o=Function.prototype.call;te.exports=function(L,M){var d={},g=arguments[2];return A(M),P(L,function(r,t,s,a){d[t]=o.call(M,g,r,t,s,a)}),d}},50868:function(te,X,e){var A=e(42584),P=Array.prototype.forEach,o=Object.create,L=function(M,d){var g;for(g in M)d[g]=M[g]};te.exports=function(M){var d=o(null);return P.call(arguments,function(g){A(g)&&L(Object(g),d)}),d}},69932:function(te,X,e){te.exports=e(63092)()?Object.setPrototypeOf:e(8672)},63092:function(te){var X=Object.create,e=Object.getPrototypeOf,A={};te.exports=function(){var P=Object.setPrototypeOf,o=arguments[0]||X;return typeof P!="function"?!1:e(P(o(null),A))===A}},8672:function(te,X,e){var A=e(69127),P=e(9252),o=Object.prototype.isPrototypeOf,L=Object.defineProperty,M={configurable:!0,enumerable:!1,writable:!0,value:void 0},d;d=function(g,r){if(P(g),r===null||A(r))return g;throw new TypeError("Prototype must be null or an object")},te.exports=function(g){var r,t;return g?(g.level===2?g.set?(t=g.set,r=function(s,a){return t.call(d(s,a),a),s}):r=function(s,a){return d(s,a).__proto__=a,s}:r=function s(a,c){var u;return d(a,c),u=o.call(s.nullPolyfill,a),u&&delete s.nullPolyfill.__proto__,c===null&&(c=s.nullPolyfill),a.__proto__=c,u&&L(s.nullPolyfill,"__proto__",M),a},Object.defineProperty(r,"level",{configurable:!1,enumerable:!1,writable:!1,value:g.level})):null}(function(){var g=Object.create(null),r={},t,s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(s){try{t=s.set,t.call(g,r)}catch{}if(Object.getPrototypeOf(g)===r)return{set:t,level:2}}return g.__proto__=r,Object.getPrototypeOf(g)===r?{level:2}:(g={},g.__proto__=r,Object.getPrototypeOf(g)===r?{level:1}:!1)}()),e(14452)},34044:function(te){te.exports=function(X){if(typeof X!="function")throw new TypeError(X+" is not a function");return X}},92584:function(te,X,e){var A=e(69127);te.exports=function(P){if(!A(P))throw new TypeError(P+" is not an Object");return P}},9252:function(te,X,e){var A=e(42584);te.exports=function(P){if(!A(P))throw new TypeError("Cannot use null or undefined");return P}},71056:function(te,X,e){te.exports=e(42976)()?String.prototype.contains:e(93040)},42976:function(te){var X="razdwatrzy";te.exports=function(){return typeof X.contains!="function"?!1:X.contains("dwa")===!0&&X.contains("foo")===!1}},93040:function(te){var X=String.prototype.indexOf;te.exports=function(e){return X.call(this,e,arguments[1])>-1}},29768:function(te){var X=Object.prototype.toString,e=X.call("");te.exports=function(A){return typeof A=="string"||A&&typeof A=="object"&&(A instanceof String||X.call(A)===e)||!1}},82252:function(te){var X=Object.create(null),e=Math.random;te.exports=function(){var A;do A=e().toString(36).slice(2);while(X[A]);return A}},52104:function(te,X,e){var A=e(69932),P=e(71056),o=e(21092),L=e(92664),M=e(85512),d=Object.defineProperty,g;g=te.exports=function(r,t){if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");M.call(this,r),t?P.call(t,"key+value")?t="key+value":P.call(t,"key")?t="key":t="value":t="value",d(this,"__kind__",o("",t))},A&&A(g,M),delete g.prototype.constructor,g.prototype=Object.create(M.prototype,{_resolve:o(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),d(g.prototype,L.toStringTag,o("c","Array Iterator"))},76024:function(te,X,e){var A=e(60948),P=e(34044),o=e(29768),L=e(76252),M=Array.isArray,d=Function.prototype.call,g=Array.prototype.some;te.exports=function(r,t){var s,a=arguments[2],c,u,l,y,h,T,f;if(M(r)||A(r)?s="array":o(r)?s="string":r=L(r),P(t),u=function(){l=!0},s==="array"){g.call(r,function(n){return d.call(t,a,n,u),l});return}if(s==="string"){for(h=r.length,y=0;y<h&&(T=r[y],y+1<h&&(f=T.charCodeAt(0),f>=55296&&f<=56319&&(T+=r[++y])),d.call(t,a,T,u),!l);++y);return}for(c=r.next();!c.done;){if(d.call(t,a,c.value,u),l)return;c=r.next()}}},76252:function(te,X,e){var A=e(60948),P=e(29768),o=e(52104),L=e(80940),M=e(52891),d=e(92664).iterator;te.exports=function(g){return typeof M(g)[d]=="function"?g[d]():A(g)?new o(g):P(g)?new L(g):new o(g)}},85512:function(te,X,e){var A=e(41476),P=e(38452),o=e(34044),L=e(9252),M=e(21092),d=e(27940),g=e(92664),r=Object.defineProperty,t=Object.defineProperties,s;te.exports=s=function(a,c){if(!(this instanceof s))throw new TypeError("Constructor requires 'new'");t(this,{__list__:M("w",L(a)),__context__:M("w",c),__nextIndex__:M("w",0)}),c&&(o(c.on),c.on("_add",this._onAdd),c.on("_delete",this._onDelete),c.on("_clear",this._onClear))},delete s.prototype.constructor,t(s.prototype,P({_next:M(function(){var a;if(this.__list__){if(this.__redo__&&(a=this.__redo__.shift(),a!==void 0))return a;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:M(function(){return this._createResult(this._next())}),_createResult:M(function(a){return a===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(a)}}),_resolve:M(function(a){return this.__list__[a]}),_unBind:M(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:M(function(){return"[object "+(this[g.toStringTag]||"Object")+"]"})},d({_onAdd:M(function(a){if(!(a>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",M("c",[a]));return}this.__redo__.forEach(function(c,u){c>=a&&(this.__redo__[u]=++c)},this),this.__redo__.push(a)}}),_onDelete:M(function(a){var c;a>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(c=this.__redo__.indexOf(a),c!==-1&&this.__redo__.splice(c,1),this.__redo__.forEach(function(u,l){u>a&&(this.__redo__[l]=--u)},this)))}),_onClear:M(function(){this.__redo__&&A.call(this.__redo__),this.__nextIndex__=0})}))),r(s.prototype,g.iterator,M(function(){return this}))},76368:function(te,X,e){var A=e(60948),P=e(42584),o=e(29768),L=e(92664).iterator,M=Array.isArray;te.exports=function(d){return P(d)?M(d)||o(d)||A(d)?!0:typeof d[L]=="function":!1}},80940:function(te,X,e){var A=e(69932),P=e(21092),o=e(92664),L=e(85512),M=Object.defineProperty,d;d=te.exports=function(g){if(!(this instanceof d))throw new TypeError("Constructor requires 'new'");g=String(g),L.call(this,g),M(this,"__length__",P("",g.length))},A&&A(d,L),delete d.prototype.constructor,d.prototype=Object.create(L.prototype,{_next:P(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:P(function(g){var r=this.__list__[g],t;return this.__nextIndex__===this.__length__?r:(t=r.charCodeAt(0),t>=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),M(d.prototype,o.toStringTag,P("c","String Iterator"))},52891:function(te,X,e){var A=e(76368);te.exports=function(P){if(!A(P))throw new TypeError(P+" is not iterable");return P}},60964:function(te){function X(A,P){if(A==null)throw new TypeError("Cannot convert first argument to object");for(var o=Object(A),L=1;L<arguments.length;L++){var M=arguments[L];if(M!=null)for(var d=Object.keys(Object(M)),g=0,r=d.length;g<r;g++){var t=d[g],s=Object.getOwnPropertyDescriptor(M,t);s!==void 0&&s.enumerable&&(o[t]=M[t])}}return o}function e(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:X})}te.exports={assign:X,polyfill:e}},92664:function(te,X,e){te.exports=e(43580)()?e(12296).Symbol:e(18376)},43580:function(te,X,e){var A=e(12296),P={object:!0,symbol:!0};te.exports=function(){var o=A.Symbol,L;if(typeof o!="function")return!1;L=o("test symbol");try{String(L)}catch{return!1}return!(!P[typeof o.iterator]||!P[typeof o.toPrimitive]||!P[typeof o.toStringTag])}},53908:function(te){te.exports=function(X){return X?typeof X=="symbol"?!0:!X.constructor||X.constructor.name!=="Symbol"?!1:X[X.constructor.toStringTag]==="Symbol":!1}},96863:function(te,X,e){var A=e(21092),P=Object.create,o=Object.defineProperty,L=Object.prototype,M=P(null);te.exports=function(d){for(var g=0,r,t;M[d+(g||"")];)++g;return d+=g||"",M[d]=!0,r="@@"+d,o(L,r,A.gs(null,function(s){t||(t=!0,o(this,r,A(s)),t=!1)})),r}},53540:function(te,X,e){var A=e(21092),P=e(12296).Symbol;te.exports=function(o){return Object.defineProperties(o,{hasInstance:A("",P&&P.hasInstance||o("hasInstance")),isConcatSpreadable:A("",P&&P.isConcatSpreadable||o("isConcatSpreadable")),iterator:A("",P&&P.iterator||o("iterator")),match:A("",P&&P.match||o("match")),replace:A("",P&&P.replace||o("replace")),search:A("",P&&P.search||o("search")),species:A("",P&&P.species||o("species")),split:A("",P&&P.split||o("split")),toPrimitive:A("",P&&P.toPrimitive||o("toPrimitive")),toStringTag:A("",P&&P.toStringTag||o("toStringTag")),unscopables:A("",P&&P.unscopables||o("unscopables"))})}},73852:function(te,X,e){var A=e(21092),P=e(63948),o=Object.create(null);te.exports=function(L){return Object.defineProperties(L,{for:A(function(M){return o[M]?o[M]:o[M]=L(String(M))}),keyFor:A(function(M){var d;P(M);for(d in o)if(o[d]===M)return d})})}},18376:function(te,X,e){var A=e(21092),P=e(63948),o=e(12296).Symbol,L=e(96863),M=e(53540),d=e(73852),g=Object.create,r=Object.defineProperties,t=Object.defineProperty,s,a,c;if(typeof o=="function")try{String(o()),c=!0}catch{}else o=null;a=function(l){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return s(l)},te.exports=s=function u(l){var y;if(this instanceof u)throw new TypeError("Symbol is not a constructor");return c?o(l):(y=g(a.prototype),l=l===void 0?"":String(l),r(y,{__description__:A("",l),__name__:A("",L(l))}))},M(s),d(s),r(a.prototype,{constructor:A(s),toString:A("",function(){return this.__name__})}),r(s.prototype,{toString:A(function(){return"Symbol ("+P(this).__description__+")"}),valueOf:A(function(){return P(this)})}),t(s.prototype,s.toPrimitive,A("",function(){var u=P(this);return typeof u=="symbol"?u:u.toString()})),t(s.prototype,s.toStringTag,A("c","Symbol")),t(a.prototype,s.toStringTag,A("c",s.prototype[s.toStringTag])),t(a.prototype,s.toPrimitive,A("c",s.prototype[s.toPrimitive]))},63948:function(te,X,e){var A=e(53908);te.exports=function(P){if(!A(P))throw new TypeError(P+" is not a symbol");return P}},60463:function(te,X,e){te.exports=e(96979)()?WeakMap:e(64864)},96979:function(te){te.exports=function(){var X,e;if(typeof WeakMap!="function")return!1;try{X=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(X)!=="[object WeakMap]"||typeof X.set!="function"||X.set({},1)!==X||typeof X.delete!="function"||typeof X.has!="function"||X.get(e)!=="one")}},69876:function(te){te.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()},64864:function(te,X,e){var A=e(42584),P=e(69932),o=e(92584),L=e(9252),M=e(82252),d=e(21092),g=e(76252),r=e(76024),t=e(92664).toStringTag,s=e(69876),a=Array.isArray,c=Object.defineProperty,u=Object.prototype.hasOwnProperty,l=Object.getPrototypeOf,y;te.exports=y=function(){var h=arguments[0],T;if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");return T=s&&P&&WeakMap!==y?P(new WeakMap,l(this)):this,A(h)&&(a(h)||(h=g(h))),c(T,"__weakMapData__",d("c","$weakMap$"+M())),h&&r(h,function(f){L(f),T.set(f[0],f[1])}),T},s&&(P&&P(y,WeakMap),y.prototype=Object.create(WeakMap.prototype,{constructor:d(y)})),Object.defineProperties(y.prototype,{delete:d(function(h){return u.call(o(h),this.__weakMapData__)?(delete h[this.__weakMapData__],!0):!1}),get:d(function(h){if(u.call(o(h),this.__weakMapData__))return h[this.__weakMapData__]}),has:d(function(h){return u.call(o(h),this.__weakMapData__)}),set:d(function(h,T){return c(o(h),this.__weakMapData__,d("c",T)),this}),toString:d(function(){return"[object WeakMap]"})}),c(y.prototype,t,d("c","WeakMap"))},61252:function(te){var X=typeof Reflect=="object"?Reflect:null,e=X&&typeof X.apply=="function"?X.apply:function(v,m,b){return Function.prototype.apply.call(v,m,b)},A;X&&typeof X.ownKeys=="function"?A=X.ownKeys:Object.getOwnPropertySymbols?A=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:A=function(v){return Object.getOwnPropertyNames(v)};function P(n){console&&console.warn&&console.warn(n)}var o=Number.isNaN||function(v){return v!==v};function L(){L.init.call(this)}te.exports=L,te.exports.once=h,L.EventEmitter=L,L.prototype._events=void 0,L.prototype._eventsCount=0,L.prototype._maxListeners=void 0;var M=10;function d(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(L,"defaultMaxListeners",{enumerable:!0,get:function(){return M},set:function(n){if(typeof n!="number"||n<0||o(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");M=n}}),L.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},L.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||o(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function g(n){return n._maxListeners===void 0?L.defaultMaxListeners:n._maxListeners}L.prototype.getMaxListeners=function(){return g(this)},L.prototype.emit=function(v){for(var m=[],b=1;b<arguments.length;b++)m.push(arguments[b]);var E=v==="error",p=this._events;if(p!==void 0)E=E&&p.error===void 0;else if(!E)return!1;if(E){var S;if(m.length>0&&(S=m[0]),S instanceof Error)throw S;var w=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw w.context=S,w}var i=p[v];if(i===void 0)return!1;if(typeof i=="function")e(i,this,m);else for(var C=i.length,x=u(i,C),b=0;b<C;++b)e(x[b],this,m);return!0};function r(n,v,m,b){var E,p,S;if(d(m),p=n._events,p===void 0?(p=n._events=Object.create(null),n._eventsCount=0):(p.newListener!==void 0&&(n.emit("newListener",v,m.listener?m.listener:m),p=n._events),S=p[v]),S===void 0)S=p[v]=m,++n._eventsCount;else if(typeof S=="function"?S=p[v]=b?[m,S]:[S,m]:b?S.unshift(m):S.push(m),E=g(n),E>0&&S.length>E&&!S.warned){S.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=n,w.type=v,w.count=S.length,P(w)}return n}L.prototype.addListener=function(v,m){return r(this,v,m,!1)},L.prototype.on=L.prototype.addListener,L.prototype.prependListener=function(v,m){return r(this,v,m,!0)};function t(){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 s(n,v,m){var b={fired:!1,wrapFn:void 0,target:n,type:v,listener:m},E=t.bind(b);return E.listener=m,b.wrapFn=E,E}L.prototype.once=function(v,m){return d(m),this.on(v,s(this,v,m)),this},L.prototype.prependOnceListener=function(v,m){return d(m),this.prependListener(v,s(this,v,m)),this},L.prototype.removeListener=function(v,m){var b,E,p,S,w;if(d(m),E=this._events,E===void 0)return this;if(b=E[v],b===void 0)return this;if(b===m||b.listener===m)--this._eventsCount===0?this._events=Object.create(null):(delete E[v],E.removeListener&&this.emit("removeListener",v,b.listener||m));else if(typeof b!="function"){for(p=-1,S=b.length-1;S>=0;S--)if(b[S]===m||b[S].listener===m){w=b[S].listener,p=S;break}if(p<0)return this;p===0?b.shift():l(b,p),b.length===1&&(E[v]=b[0]),E.removeListener!==void 0&&this.emit("removeListener",v,w||m)}return this},L.prototype.off=L.prototype.removeListener,L.prototype.removeAllListeners=function(v){var m,b,E;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[v]),this;if(arguments.length===0){var p=Object.keys(b),S;for(E=0;E<p.length;++E)S=p[E],S!=="removeListener"&&this.removeAllListeners(S);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(m=b[v],typeof m=="function")this.removeListener(v,m);else if(m!==void 0)for(E=m.length-1;E>=0;E--)this.removeListener(v,m[E]);return this};function a(n,v,m){var b=n._events;if(b===void 0)return[];var E=b[v];return E===void 0?[]:typeof E=="function"?m?[E.listener||E]:[E]:m?y(E):u(E,E.length)}L.prototype.listeners=function(v){return a(this,v,!0)},L.prototype.rawListeners=function(v){return a(this,v,!1)},L.listenerCount=function(n,v){return typeof n.listenerCount=="function"?n.listenerCount(v):c.call(n,v)},L.prototype.listenerCount=c;function c(n){var v=this._events;if(v!==void 0){var m=v[n];if(typeof m=="function")return 1;if(m!==void 0)return m.length}return 0}L.prototype.eventNames=function(){return this._eventsCount>0?A(this._events):[]};function u(n,v){for(var m=new Array(v),b=0;b<v;++b)m[b]=n[b];return m}function l(n,v){for(;v+1<n.length;v++)n[v]=n[v+1];n.pop()}function y(n){for(var v=new Array(n.length),m=0;m<v.length;++m)v[m]=n[m].listener||n[m];return v}function h(n,v){return new Promise(function(m,b){function E(S){n.removeListener(v,p),b(S)}function p(){typeof n.removeListener=="function"&&n.removeListener("error",E),m([].slice.call(arguments))}f(n,v,p,{once:!0}),v!=="error"&&T(n,E,{once:!0})})}function T(n,v,m){typeof n.on=="function"&&f(n,"error",v,m)}function f(n,v,m,b){if(typeof n.on=="function")b.once?n.once(v,m):n.on(v,m);else if(typeof n.addEventListener=="function")n.addEventListener(v,function E(p){b.once&&n.removeEventListener(v,E),m(p)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}},39072:function(te){var X=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};te.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return X()}try{return __global__||X()}finally{delete Object.prototype.__global__}}()},12296:function(te,X,e){te.exports=e(45072)()?globalThis:e(39072)},45072:function(te){te.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}},38248:function(te,X,e){var A=e(94576);te.exports=function(P){var o=typeof P;if(o==="string"){var L=P;if(P=+P,P===0&&A(L))return!1}else if(o!=="number")return!1;return P-P<1}},47520:function(te,X,e){var A=e(72512);te.exports=P;function P(o,L,M){if(!o)throw new TypeError("must specify data as first parameter");if(M=+(M||0)|0,Array.isArray(o)&&o[0]&&typeof o[0][0]=="number"){var d=o[0].length,g=o.length*d,r,t,s,a;(!L||typeof L=="string")&&(L=new(A(L||"float32"))(g+M));var c=L.length-M;if(g!==c)throw new Error("source length "+g+" ("+d+"x"+o.length+") does not match destination length "+c);for(r=0,s=M;r<o.length;r++)for(t=0;t<d;t++)L[s++]=o[r][t]===null?NaN:o[r][t]}else if(!L||typeof L=="string"){var u=A(L||"float32");if(Array.isArray(o)||L==="array")for(L=new u(o.length+M),r=0,s=M,a=L.length;s<a;s++,r++)L[s]=o[r]===null?NaN:o[r];else M===0?L=new u(o):(L=new u(o.length+M),L.set(o,M))}else L.set(o,M);return L}},33888:function(te,X,e){var A=e(49395),P=[32,126];te.exports=o;function o(L){L=L||{};var M=L.shape?L.shape:L.canvas?[L.canvas.width,L.canvas.height]:[512,512],d=L.canvas||document.createElement("canvas"),g=L.font,r=typeof L.step=="number"?[L.step,L.step]:L.step||[32,32],t=L.chars||P;if(g&&typeof g!="string"&&(g=A(g)),!Array.isArray(t))t=String(t).split("");else if(t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"){for(var s=[],a=t[0],c=0;a<=t[1];a++)s[c++]=String.fromCharCode(a);t=s}M=M.slice(),d.width=M[0],d.height=M[1];var u=d.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,d.width,d.height),u.font=g,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var l=r[0]/2,y=r[1]/2,a=0;a<t.length;a++)u.fillText(t[a],l,y),(l+=r[0])>M[0]-r[0]/2&&(l=r[0]/2,y+=r[1]);return d}},71920:function(te){te.exports=X,X.canvas=document.createElement("canvas"),X.cache={};function X(t,L){L||(L={}),(typeof t=="string"||Array.isArray(t))&&(L.family=t);var M=Array.isArray(L.family)?L.family.join(", "):L.family;if(!M)throw Error("`family` must be defined");var d=L.size||L.fontSize||L.em||48,g=L.weight||L.fontWeight||"",r=L.style||L.fontStyle||"",t=[r,g,d].join(" ")+"px "+M,s=L.origin||"top";if(X.cache[M]&&d<=X.cache[M].em)return e(X.cache[M],s);var a=L.canvas||X.canvas,c=a.getContext("2d"),u={upper:L.upper!==void 0?L.upper:"H",lower:L.lower!==void 0?L.lower:"x",descent:L.descent!==void 0?L.descent:"p",ascent:L.ascent!==void 0?L.ascent:"h",tittle:L.tittle!==void 0?L.tittle:"i",overshoot:L.overshoot!==void 0?L.overshoot:"O"},l=Math.ceil(d*1.5);a.height=l,a.width=l*.5,c.font=t;var y="H",h={top:0};c.clearRect(0,0,l,l),c.textBaseline="top",c.fillStyle="black",c.fillText(y,0,0);var T=A(c.getImageData(0,0,l,l));c.clearRect(0,0,l,l),c.textBaseline="bottom",c.fillText(y,0,l);var f=A(c.getImageData(0,0,l,l));h.lineHeight=h.bottom=l-f+T,c.clearRect(0,0,l,l),c.textBaseline="alphabetic",c.fillText(y,0,l);var n=A(c.getImageData(0,0,l,l)),v=l-n-1+T;h.baseline=h.alphabetic=v,c.clearRect(0,0,l,l),c.textBaseline="middle",c.fillText(y,0,l*.5);var m=A(c.getImageData(0,0,l,l));h.median=h.middle=l-m-1+T-l*.5,c.clearRect(0,0,l,l),c.textBaseline="hanging",c.fillText(y,0,l*.5);var b=A(c.getImageData(0,0,l,l));h.hanging=l-b-1+T-l*.5,c.clearRect(0,0,l,l),c.textBaseline="ideographic",c.fillText(y,0,l);var E=A(c.getImageData(0,0,l,l));if(h.ideographic=l-E-1+T,u.upper&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.upper,0,0),h.upper=A(c.getImageData(0,0,l,l)),h.capHeight=h.baseline-h.upper),u.lower&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.lower,0,0),h.lower=A(c.getImageData(0,0,l,l)),h.xHeight=h.baseline-h.lower),u.tittle&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.tittle,0,0),h.tittle=A(c.getImageData(0,0,l,l))),u.ascent&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.ascent,0,0),h.ascent=A(c.getImageData(0,0,l,l))),u.descent&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.descent,0,0),h.descent=P(c.getImageData(0,0,l,l))),u.overshoot){c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.overshoot,0,0);var p=P(c.getImageData(0,0,l,l));h.overshoot=p-v}for(var S in h)h[S]/=d;return h.em=d,X.cache[M]=h,e(h,s)}function e(o,L){var M={};typeof L=="string"&&(L=o[L]);for(var d in o)d!=="em"&&(M[d]=o[d]-L);return M}function A(o){for(var L=o.height,M=o.data,d=3;d<M.length;d+=4)if(M[d]!==0)return Math.floor((d-3)*.25/L)}function P(o){for(var L=o.height,M=o.data,d=M.length-1;d>0;d-=4)if(M[d]!==0)return Math.floor((d-3)*.25/L)}},46492:function(te,X,e){var A=e(90720),P=Object.prototype.toString,o=Object.prototype.hasOwnProperty,L=function(t,s,a){for(var c=0,u=t.length;c<u;c++)o.call(t,c)&&(a==null?s(t[c],c,t):s.call(a,t[c],c,t))},M=function(t,s,a){for(var c=0,u=t.length;c<u;c++)a==null?s(t.charAt(c),c,t):s.call(a,t.charAt(c),c,t)},d=function(t,s,a){for(var c in t)o.call(t,c)&&(a==null?s(t[c],c,t):s.call(a,t[c],c,t))},g=function(t,s,a){if(!A(s))throw new TypeError("iterator must be a function");var c;arguments.length>=3&&(c=a),P.call(t)==="[object Array]"?L(t,s,c):typeof t=="string"?M(t,s,c):d(t,s,c)};te.exports=g},74336:function(te){var X="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,A=Math.max,P="[object Function]",o=function(g,r){for(var t=[],s=0;s<g.length;s+=1)t[s]=g[s];for(var a=0;a<r.length;a+=1)t[a+g.length]=r[a];return t},L=function(g,r){for(var t=[],s=r,a=0;s<g.length;s+=1,a+=1)t[a]=g[s];return t},M=function(d,g){for(var r="",t=0;t<d.length;t+=1)r+=d[t],t+1<d.length&&(r+=g);return r};te.exports=function(g){var r=this;if(typeof r!="function"||e.apply(r)!==P)throw new TypeError(X+r);for(var t=L(arguments,1),s,a=function(){if(this instanceof s){var h=r.apply(this,o(t,arguments));return Object(h)===h?h:this}return r.apply(g,o(t,arguments))},c=A(0,r.length-t.length),u=[],l=0;l<c;l++)u[l]="$"+l;if(s=Function("binder","return function ("+M(u,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var y=function(){};y.prototype=r.prototype,s.prototype=new y,y.prototype=null}return s}},8844:function(te,X,e){var A=e(74336);te.exports=Function.prototype.bind||A},13380:function(te){te.exports=X;function X(e,A){if(typeof e!="string")throw new TypeError("must specify type string");if(A=A||{},typeof document>"u"&&!A.canvas)return null;var P=A.canvas||document.createElement("canvas");typeof A.width=="number"&&(P.width=A.width),typeof A.height=="number"&&(P.height=A.height);var o=A,L;try{var M=[e];e.indexOf("webgl")===0&&M.push("experimental-"+e);for(var d=0;d<M.length;d++)if(L=P.getContext(M[d],o),L)return L}catch{L=null}return L||null}},53664:function(te,X,e){var A,P=SyntaxError,o=Function,L=TypeError,M=function(x){try{return o('"use strict"; return ('+x+").constructor;")()}catch{}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch{d=null}var g=function(){throw new L},r=d?function(){try{return arguments.callee,g}catch{try{return d(arguments,"callee").get}catch{return g}}}():g,t=e(71080)(),s=e(69572)(),a=Object.getPrototypeOf||(s?function(x){return x.__proto__}:null),c={},u=typeof Uint8Array>"u"||!a?A:a(Uint8Array),l={"%AggregateError%":typeof AggregateError>"u"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?A:ArrayBuffer,"%ArrayIteratorPrototype%":t&&a?a([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":c,"%AsyncGenerator%":c,"%AsyncGeneratorFunction%":c,"%AsyncIteratorPrototype%":c,"%Atomics%":typeof Atomics>"u"?A:Atomics,"%BigInt%":typeof BigInt>"u"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?A:Float32Array,"%Float64Array%":typeof Float64Array>"u"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?A:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":c,"%Int8Array%":typeof Int8Array>"u"?A:Int8Array,"%Int16Array%":typeof Int16Array>"u"?A:Int16Array,"%Int32Array%":typeof Int32Array>"u"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":t&&a?a(a([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map>"u"?A:Map,"%MapIteratorPrototype%":typeof Map>"u"||!t||!a?A:a(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?A:Promise,"%Proxy%":typeof Proxy>"u"?A:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?A:Set,"%SetIteratorPrototype%":typeof Set>"u"||!t||!a?A:a(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":t&&a?a(""[Symbol.iterator]()):A,"%Symbol%":t?Symbol:A,"%SyntaxError%":P,"%ThrowTypeError%":r,"%TypedArray%":u,"%TypeError%":L,"%Uint8Array%":typeof Uint8Array>"u"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?A:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?A:WeakMap,"%WeakRef%":typeof WeakRef>"u"?A:WeakRef,"%WeakSet%":typeof WeakSet>"u"?A:WeakSet};if(a)try{null.error}catch(x){var y=a(a(x));l["%Error.prototype%"]=y}var h=function x(k){var I;if(k==="%AsyncFunction%")I=M("async function () {}");else if(k==="%GeneratorFunction%")I=M("function* () {}");else if(k==="%AsyncGeneratorFunction%")I=M("async function* () {}");else if(k==="%AsyncGenerator%"){var B=x("%AsyncGeneratorFunction%");B&&(I=B.prototype)}else if(k==="%AsyncIteratorPrototype%"){var _=x("%AsyncGenerator%");_&&a&&(I=a(_.prototype))}return l[k]=I,I},T={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},f=e(8844),n=e(92064),v=f.call(Function.call,Array.prototype.concat),m=f.call(Function.apply,Array.prototype.splice),b=f.call(Function.call,String.prototype.replace),E=f.call(Function.call,String.prototype.slice),p=f.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,w=/\\(\\)?/g,i=function(k){var I=E(k,0,1),B=E(k,-1);if(I==="%"&&B!=="%")throw new P("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&I!=="%")throw new P("invalid intrinsic syntax, expected opening `%`");var _=[];return b(k,S,function(z,O,F,N){_[_.length]=F?b(N,w,"$1"):O||z}),_},C=function(k,I){var B=k,_;if(n(T,B)&&(_=T[B],B="%"+_[0]+"%"),n(l,B)){var z=l[B];if(z===c&&(z=h(B)),typeof z>"u"&&!I)throw new L("intrinsic "+k+" exists, but is not available. Please file an issue!");return{alias:_,name:B,value:z}}throw new P("intrinsic "+k+" does not exist!")};te.exports=function(k,I){if(typeof k!="string"||k.length===0)throw new L("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new L('"allowMissing" argument must be a boolean');if(p(/^%?[^%]*%?$/,k)===null)throw new P("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=i(k),_=B.length>0?B[0]:"",z=C("%"+_+"%",I),O=z.name,F=z.value,N=!1,V=z.alias;V&&(_=V[0],m(B,v([0,1],V)));for(var j=1,$=!0;j<B.length;j+=1){var q=B[j],oe=E(q,0,1),Z=E(q,-1);if((oe==='"'||oe==="'"||oe==="`"||Z==='"'||Z==="'"||Z==="`")&&oe!==Z)throw new P("property names with quotes must have matching quotes");if((q==="constructor"||!$)&&(N=!0),_+="."+q,O="%"+_+"%",n(l,O))F=l[O];else if(F!=null){if(!(q in F)){if(!I)throw new L("base intrinsic for "+k+" exists, but the property is not available.");return}if(d&&j+1>=B.length){var G=d(F,q);$=!!G,$&&"get"in G&&!("originalValue"in G.get)?F=G.get:F=F[q]}else $=n(F,q),F=F[q];$&&!N&&(l[O]=F)}}return F}},12408:function(te){te.exports=X;function X(e,A){var P=A[0],o=A[1],L=A[2],M=A[3],d=A[4],g=A[5],r=A[6],t=A[7],s=A[8],a=A[9],c=A[10],u=A[11],l=A[12],y=A[13],h=A[14],T=A[15];return e[0]=g*(c*T-u*h)-a*(r*T-t*h)+y*(r*u-t*c),e[1]=-(o*(c*T-u*h)-a*(L*T-M*h)+y*(L*u-M*c)),e[2]=o*(r*T-t*h)-g*(L*T-M*h)+y*(L*t-M*r),e[3]=-(o*(r*u-t*c)-g*(L*u-M*c)+a*(L*t-M*r)),e[4]=-(d*(c*T-u*h)-s*(r*T-t*h)+l*(r*u-t*c)),e[5]=P*(c*T-u*h)-s*(L*T-M*h)+l*(L*u-M*c),e[6]=-(P*(r*T-t*h)-d*(L*T-M*h)+l*(L*t-M*r)),e[7]=P*(r*u-t*c)-d*(L*u-M*c)+s*(L*t-M*r),e[8]=d*(a*T-u*y)-s*(g*T-t*y)+l*(g*u-t*a),e[9]=-(P*(a*T-u*y)-s*(o*T-M*y)+l*(o*u-M*a)),e[10]=P*(g*T-t*y)-d*(o*T-M*y)+l*(o*t-M*g),e[11]=-(P*(g*u-t*a)-d*(o*u-M*a)+s*(o*t-M*g)),e[12]=-(d*(a*h-c*y)-s*(g*h-r*y)+l*(g*c-r*a)),e[13]=P*(a*h-c*y)-s*(o*h-L*y)+l*(o*c-L*a),e[14]=-(P*(g*h-r*y)-d*(o*h-L*y)+l*(o*r-L*g)),e[15]=P*(g*c-r*a)-d*(o*c-L*a)+s*(o*r-L*g),e}},76860:function(te){te.exports=X;function X(e){var A=new Float32Array(16);return A[0]=e[0],A[1]=e[1],A[2]=e[2],A[3]=e[3],A[4]=e[4],A[5]=e[5],A[6]=e[6],A[7]=e[7],A[8]=e[8],A[9]=e[9],A[10]=e[10],A[11]=e[11],A[12]=e[12],A[13]=e[13],A[14]=e[14],A[15]=e[15],A}},64492:function(te){te.exports=X;function X(e,A){return e[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[8]=A[8],e[9]=A[9],e[10]=A[10],e[11]=A[11],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15],e}},54212:function(te){te.exports=X;function X(){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}},70800:function(te){te.exports=X;function X(e){var A=e[0],P=e[1],o=e[2],L=e[3],M=e[4],d=e[5],g=e[6],r=e[7],t=e[8],s=e[9],a=e[10],c=e[11],u=e[12],l=e[13],y=e[14],h=e[15],T=A*d-P*M,f=A*g-o*M,n=A*r-L*M,v=P*g-o*d,m=P*r-L*d,b=o*r-L*g,E=t*l-s*u,p=t*y-a*u,S=t*h-c*u,w=s*y-a*l,i=s*h-c*l,C=a*h-c*y;return T*C-f*i+n*w+v*S-m*p+b*E}},61784:function(te){te.exports=X;function X(e,A){var P=A[0],o=A[1],L=A[2],M=A[3],d=P+P,g=o+o,r=L+L,t=P*d,s=o*d,a=o*g,c=L*d,u=L*g,l=L*r,y=M*d,h=M*g,T=M*r;return e[0]=1-a-l,e[1]=s+T,e[2]=c-h,e[3]=0,e[4]=s-T,e[5]=1-t-l,e[6]=u+y,e[7]=0,e[8]=c+h,e[9]=u-y,e[10]=1-t-a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},91616:function(te){te.exports=X;function X(e,A,P){var o,L,M,d=P[0],g=P[1],r=P[2],t=Math.sqrt(d*d+g*g+r*r);return Math.abs(t)<1e-6?null:(t=1/t,d*=t,g*=t,r*=t,o=Math.sin(A),L=Math.cos(A),M=1-L,e[0]=d*d*M+L,e[1]=g*d*M+r*o,e[2]=r*d*M-g*o,e[3]=0,e[4]=d*g*M-r*o,e[5]=g*g*M+L,e[6]=r*g*M+d*o,e[7]=0,e[8]=d*r*M+g*o,e[9]=g*r*M-d*o,e[10]=r*r*M+L,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},51944:function(te){te.exports=X;function X(e,A,P){var o=A[0],L=A[1],M=A[2],d=A[3],g=o+o,r=L+L,t=M+M,s=o*g,a=o*r,c=o*t,u=L*r,l=L*t,y=M*t,h=d*g,T=d*r,f=d*t;return e[0]=1-(u+y),e[1]=a+f,e[2]=c-T,e[3]=0,e[4]=a-f,e[5]=1-(s+y),e[6]=l+h,e[7]=0,e[8]=c+T,e[9]=l-h,e[10]=1-(s+u),e[11]=0,e[12]=P[0],e[13]=P[1],e[14]=P[2],e[15]=1,e}},69444:function(te){te.exports=X;function X(e,A){return e[0]=A[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=A[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=A[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},48268:function(te){te.exports=X;function X(e,A){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]=A[0],e[13]=A[1],e[14]=A[2],e[15]=1,e}},21856:function(te){te.exports=X;function X(e,A){var P=Math.sin(A),o=Math.cos(A);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=P,e[7]=0,e[8]=0,e[9]=-P,e[10]=o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},79216:function(te){te.exports=X;function X(e,A){var P=Math.sin(A),o=Math.cos(A);return e[0]=o,e[1]=0,e[2]=-P,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=P,e[9]=0,e[10]=o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},57736:function(te){te.exports=X;function X(e,A){var P=Math.sin(A),o=Math.cos(A);return e[0]=o,e[1]=P,e[2]=0,e[3]=0,e[4]=-P,e[5]=o,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}},38848:function(te){te.exports=X;function X(e,A,P,o,L,M,d){var g=1/(P-A),r=1/(L-o),t=1/(M-d);return e[0]=M*2*g,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=M*2*r,e[6]=0,e[7]=0,e[8]=(P+A)*g,e[9]=(L+o)*r,e[10]=(d+M)*t,e[11]=-1,e[12]=0,e[13]=0,e[14]=d*M*2*t,e[15]=0,e}},36635:function(te){te.exports=X;function X(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]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},36524:function(te,X,e){te.exports={create:e(54212),clone:e(76860),copy:e(64492),identity:e(36635),transpose:e(86520),invert:e(4308),adjoint:e(12408),determinant:e(70800),multiply:e(80944),translate:e(35176),scale:e(68152),rotate:e(30016),rotateX:e(15456),rotateY:e(64840),rotateZ:e(4192),fromRotation:e(91616),fromRotationTranslation:e(51944),fromScaling:e(69444),fromTranslation:e(48268),fromXRotation:e(21856),fromYRotation:e(79216),fromZRotation:e(57736),fromQuat:e(61784),frustum:e(38848),perspective:e(51296),perspectiveFromFieldOfView:e(63688),ortho:e(97688),lookAt:e(56508),str:e(89412)}},4308:function(te){te.exports=X;function X(e,A){var P=A[0],o=A[1],L=A[2],M=A[3],d=A[4],g=A[5],r=A[6],t=A[7],s=A[8],a=A[9],c=A[10],u=A[11],l=A[12],y=A[13],h=A[14],T=A[15],f=P*g-o*d,n=P*r-L*d,v=P*t-M*d,m=o*r-L*g,b=o*t-M*g,E=L*t-M*r,p=s*y-a*l,S=s*h-c*l,w=s*T-u*l,i=a*h-c*y,C=a*T-u*y,x=c*T-u*h,k=f*x-n*C+v*i+m*w-b*S+E*p;return k?(k=1/k,e[0]=(g*x-r*C+t*i)*k,e[1]=(L*C-o*x-M*i)*k,e[2]=(y*E-h*b+T*m)*k,e[3]=(c*b-a*E-u*m)*k,e[4]=(r*w-d*x-t*S)*k,e[5]=(P*x-L*w+M*S)*k,e[6]=(h*v-l*E-T*n)*k,e[7]=(s*E-c*v+u*n)*k,e[8]=(d*C-g*w+t*p)*k,e[9]=(o*w-P*C-M*p)*k,e[10]=(l*b-y*v+T*f)*k,e[11]=(a*v-s*b-u*f)*k,e[12]=(g*S-d*i-r*p)*k,e[13]=(P*i-o*S+L*p)*k,e[14]=(y*n-l*m-h*f)*k,e[15]=(s*m-a*n+c*f)*k,e):null}},56508:function(te,X,e){var A=e(36635);te.exports=P;function P(o,L,M,d){var g,r,t,s,a,c,u,l,y,h,T=L[0],f=L[1],n=L[2],v=d[0],m=d[1],b=d[2],E=M[0],p=M[1],S=M[2];return Math.abs(T-E)<1e-6&&Math.abs(f-p)<1e-6&&Math.abs(n-S)<1e-6?A(o):(u=T-E,l=f-p,y=n-S,h=1/Math.sqrt(u*u+l*l+y*y),u*=h,l*=h,y*=h,g=m*y-b*l,r=b*u-v*y,t=v*l-m*u,h=Math.sqrt(g*g+r*r+t*t),h?(h=1/h,g*=h,r*=h,t*=h):(g=0,r=0,t=0),s=l*t-y*r,a=y*g-u*t,c=u*r-l*g,h=Math.sqrt(s*s+a*a+c*c),h?(h=1/h,s*=h,a*=h,c*=h):(s=0,a=0,c=0),o[0]=g,o[1]=s,o[2]=u,o[3]=0,o[4]=r,o[5]=a,o[6]=l,o[7]=0,o[8]=t,o[9]=c,o[10]=y,o[11]=0,o[12]=-(g*T+r*f+t*n),o[13]=-(s*T+a*f+c*n),o[14]=-(u*T+l*f+y*n),o[15]=1,o)}},80944:function(te){te.exports=X;function X(e,A,P){var o=A[0],L=A[1],M=A[2],d=A[3],g=A[4],r=A[5],t=A[6],s=A[7],a=A[8],c=A[9],u=A[10],l=A[11],y=A[12],h=A[13],T=A[14],f=A[15],n=P[0],v=P[1],m=P[2],b=P[3];return e[0]=n*o+v*g+m*a+b*y,e[1]=n*L+v*r+m*c+b*h,e[2]=n*M+v*t+m*u+b*T,e[3]=n*d+v*s+m*l+b*f,n=P[4],v=P[5],m=P[6],b=P[7],e[4]=n*o+v*g+m*a+b*y,e[5]=n*L+v*r+m*c+b*h,e[6]=n*M+v*t+m*u+b*T,e[7]=n*d+v*s+m*l+b*f,n=P[8],v=P[9],m=P[10],b=P[11],e[8]=n*o+v*g+m*a+b*y,e[9]=n*L+v*r+m*c+b*h,e[10]=n*M+v*t+m*u+b*T,e[11]=n*d+v*s+m*l+b*f,n=P[12],v=P[13],m=P[14],b=P[15],e[12]=n*o+v*g+m*a+b*y,e[13]=n*L+v*r+m*c+b*h,e[14]=n*M+v*t+m*u+b*T,e[15]=n*d+v*s+m*l+b*f,e}},97688:function(te){te.exports=X;function X(e,A,P,o,L,M,d){var g=1/(A-P),r=1/(o-L),t=1/(M-d);return e[0]=-2*g,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*t,e[11]=0,e[12]=(A+P)*g,e[13]=(L+o)*r,e[14]=(d+M)*t,e[15]=1,e}},51296:function(te){te.exports=X;function X(e,A,P,o,L){var M=1/Math.tan(A/2),d=1/(o-L);return e[0]=M/P,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=M,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(L+o)*d,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*L*o*d,e[15]=0,e}},63688:function(te){te.exports=X;function X(e,A,P,o){var L=Math.tan(A.upDegrees*Math.PI/180),M=Math.tan(A.downDegrees*Math.PI/180),d=Math.tan(A.leftDegrees*Math.PI/180),g=Math.tan(A.rightDegrees*Math.PI/180),r=2/(d+g),t=2/(L+M);return e[0]=r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=-((d-g)*r*.5),e[9]=(L-M)*t*.5,e[10]=o/(P-o),e[11]=-1,e[12]=0,e[13]=0,e[14]=o*P/(P-o),e[15]=0,e}},30016:function(te){te.exports=X;function X(e,A,P,o){var L=o[0],M=o[1],d=o[2],g=Math.sqrt(L*L+M*M+d*d),r,t,s,a,c,u,l,y,h,T,f,n,v,m,b,E,p,S,w,i,C,x,k,I;return Math.abs(g)<1e-6?null:(g=1/g,L*=g,M*=g,d*=g,r=Math.sin(P),t=Math.cos(P),s=1-t,a=A[0],c=A[1],u=A[2],l=A[3],y=A[4],h=A[5],T=A[6],f=A[7],n=A[8],v=A[9],m=A[10],b=A[11],E=L*L*s+t,p=M*L*s+d*r,S=d*L*s-M*r,w=L*M*s-d*r,i=M*M*s+t,C=d*M*s+L*r,x=L*d*s+M*r,k=M*d*s-L*r,I=d*d*s+t,e[0]=a*E+y*p+n*S,e[1]=c*E+h*p+v*S,e[2]=u*E+T*p+m*S,e[3]=l*E+f*p+b*S,e[4]=a*w+y*i+n*C,e[5]=c*w+h*i+v*C,e[6]=u*w+T*i+m*C,e[7]=l*w+f*i+b*C,e[8]=a*x+y*k+n*I,e[9]=c*x+h*k+v*I,e[10]=u*x+T*k+m*I,e[11]=l*x+f*k+b*I,A!==e&&(e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e)}},15456:function(te){te.exports=X;function X(e,A,P){var o=Math.sin(P),L=Math.cos(P),M=A[4],d=A[5],g=A[6],r=A[7],t=A[8],s=A[9],a=A[10],c=A[11];return A!==e&&(e[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e[4]=M*L+t*o,e[5]=d*L+s*o,e[6]=g*L+a*o,e[7]=r*L+c*o,e[8]=t*L-M*o,e[9]=s*L-d*o,e[10]=a*L-g*o,e[11]=c*L-r*o,e}},64840:function(te){te.exports=X;function X(e,A,P){var o=Math.sin(P),L=Math.cos(P),M=A[0],d=A[1],g=A[2],r=A[3],t=A[8],s=A[9],a=A[10],c=A[11];return A!==e&&(e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e[0]=M*L-t*o,e[1]=d*L-s*o,e[2]=g*L-a*o,e[3]=r*L-c*o,e[8]=M*o+t*L,e[9]=d*o+s*L,e[10]=g*o+a*L,e[11]=r*o+c*L,e}},4192:function(te){te.exports=X;function X(e,A,P){var o=Math.sin(P),L=Math.cos(P),M=A[0],d=A[1],g=A[2],r=A[3],t=A[4],s=A[5],a=A[6],c=A[7];return A!==e&&(e[8]=A[8],e[9]=A[9],e[10]=A[10],e[11]=A[11],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e[0]=M*L+t*o,e[1]=d*L+s*o,e[2]=g*L+a*o,e[3]=r*L+c*o,e[4]=t*L-M*o,e[5]=s*L-d*o,e[6]=a*L-g*o,e[7]=c*L-r*o,e}},68152:function(te){te.exports=X;function X(e,A,P){var o=P[0],L=P[1],M=P[2];return e[0]=A[0]*o,e[1]=A[1]*o,e[2]=A[2]*o,e[3]=A[3]*o,e[4]=A[4]*L,e[5]=A[5]*L,e[6]=A[6]*L,e[7]=A[7]*L,e[8]=A[8]*M,e[9]=A[9]*M,e[10]=A[10]*M,e[11]=A[11]*M,e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15],e}},89412:function(te){te.exports=X;function X(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},35176:function(te){te.exports=X;function X(e,A,P){var o=P[0],L=P[1],M=P[2],d,g,r,t,s,a,c,u,l,y,h,T;return A===e?(e[12]=A[0]*o+A[4]*L+A[8]*M+A[12],e[13]=A[1]*o+A[5]*L+A[9]*M+A[13],e[14]=A[2]*o+A[6]*L+A[10]*M+A[14],e[15]=A[3]*o+A[7]*L+A[11]*M+A[15]):(d=A[0],g=A[1],r=A[2],t=A[3],s=A[4],a=A[5],c=A[6],u=A[7],l=A[8],y=A[9],h=A[10],T=A[11],e[0]=d,e[1]=g,e[2]=r,e[3]=t,e[4]=s,e[5]=a,e[6]=c,e[7]=u,e[8]=l,e[9]=y,e[10]=h,e[11]=T,e[12]=d*o+s*L+l*M+A[12],e[13]=g*o+a*L+y*M+A[13],e[14]=r*o+c*L+h*M+A[14],e[15]=t*o+u*L+T*M+A[15]),e}},86520:function(te){te.exports=X;function X(e,A){if(e===A){var P=A[1],o=A[2],L=A[3],M=A[6],d=A[7],g=A[11];e[1]=A[4],e[2]=A[8],e[3]=A[12],e[4]=P,e[6]=A[9],e[7]=A[13],e[8]=o,e[9]=M,e[11]=A[14],e[12]=L,e[13]=d,e[14]=g}else e[0]=A[0],e[1]=A[4],e[2]=A[8],e[3]=A[12],e[4]=A[1],e[5]=A[5],e[6]=A[9],e[7]=A[13],e[8]=A[2],e[9]=A[6],e[10]=A[10],e[11]=A[14],e[12]=A[3],e[13]=A[7],e[14]=A[11],e[15]=A[15];return e}},23352:function(te,X,e){var A=e(42771),P=e(55616),o=e(28624),L=e(55212),M=e(60463),d=e(72160),g=e(33888),r=e(14144),t=e(51160),s=e(58908),a=e(65819),c=e(23464),u=e(63768),l=e(50896),y=e(71920),h=e(47520),T=e(308),f=T.nextPow2,n=new M,v=!1;if(document.body){var m=document.body.appendChild(document.createElement("div"));m.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(m).fontStretch&&(v=!0),document.body.removeChild(m)}var b=function(S){E(S)?(S={regl:S},this.gl=S.regl._gl):this.gl=L(S),this.shader=n.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=S.regl||o({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(),n.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(s(S)?S:{})};b.prototype.createShader=function(){var S=this.regl,w=S({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:S.prop("count"),offset:S.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:S.this("sizeBuffer")},width:{offset:0,stride:8,buffer:S.this("sizeBuffer")},char:S.this("charBuffer"),position:S.this("position")},uniforms:{atlasSize:function(C,x){return[x.atlas.width,x.atlas.height]},atlasDim:function(C,x){return[x.atlas.cols,x.atlas.rows]},atlas:function(C,x){return x.atlas.texture},charStep:function(C,x){return x.atlas.step},em:function(C,x){return x.atlas.em},color:S.prop("color"),opacity:S.prop("opacity"),viewport:S.this("viewportArray"),scale:S.this("scale"),align:S.prop("align"),baseline:S.prop("baseline"),translate:S.this("translate"),positionOffset:S.prop("positionOffset")},primitive:"points",viewport:S.this("viewport"),vert:`
precision highp float;
attribute float width, charOffset, char;
attribute vec2 position;
uniform float fontSize, charStep, em, align, baseline;
uniform vec4 viewport;
uniform vec4 color;
uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;
varying vec2 charCoord, charId;
varying float charWidth;
varying vec4 fontColor;
void main () {
vec2 offset = floor(em * (vec2(align + charOffset, baseline)
+ vec2(positionOffset.x, -positionOffset.y)))
/ (viewport.zw * scale.xy);
vec2 position = (position + translate) * scale;
position += offset * scale;
charCoord = position * viewport.zw + viewport.xy;
gl_Position = vec4(position * 2. - 1., 0, 1);
gl_PointSize = charStep;
charId.x = mod(char, atlasDim.x);
charId.y = floor(char / atlasDim.x);
charWidth = width * em;
fontColor = color / 255.;
}`,frag:`
precision highp float;
uniform float fontSize, charStep, opacity;
uniform vec2 atlasSize;
uniform vec4 viewport;
uniform sampler2D atlas;
varying vec4 fontColor;
varying vec2 charCoord, charId;
varying float charWidth;
float lightness(vec4 color) {
return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
}
void main () {
vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;
float halfCharStep = floor(charStep * .5 + .5);
// invert y and shift by 1px (FF expecially needs that)
uv.y = charStep - uv.y;
// ignore points outside of character bounding box
float halfCharWidth = ceil(charWidth * .5);
if (floor(uv.x) > halfCharStep + halfCharWidth ||
floor(uv.x) < halfCharStep - halfCharWidth) return;
uv += charId * charStep;
uv = uv / atlasSize;
vec4 color = fontColor;
vec4 mask = texture2D(atlas, uv);
float maskY = lightness(mask);
// float colorY = lightness(color);
color.a *= maskY;
color.a *= opacity;
// color.a += .1;
// antialiasing, see yiq color space y-channel formula
// color.rgb += (1. - color.rgb) * (1. - mask.rgb);
gl_FragColor = color;
}`}),i={};return{regl:S,draw:w,atlas:i}},b.prototype.update=function(S){var w=this;if(typeof S=="string")S={text:S};else if(!S)return;S=P(S,{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),S.opacity!=null&&(Array.isArray(S.opacity)?this.opacity=S.opacity.map(function(Ie){return parseFloat(Ie)}):this.opacity=parseFloat(S.opacity)),S.viewport!=null&&(this.viewport=t(S.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]),S.kerning!=null&&(this.kerning=S.kerning),S.offset!=null&&(typeof S.offset=="number"&&(S.offset=[S.offset,0]),this.positionOffset=h(S.offset)),S.direction&&(this.direction=S.direction),S.range&&(this.range=S.range,this.scale=[1/(S.range[2]-S.range[0]),1/(S.range[3]-S.range[1])],this.translate=[-S.range[0],-S.range[1]]),S.scale&&(this.scale=S.scale),S.translate&&(this.translate=S.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!S.font&&(S.font=b.baseFontSize+"px sans-serif");var i=!1,C=!1;if(S.font&&(Array.isArray(S.font)?S.font:[S.font]).forEach(function(Ie,Ne){if(typeof Ie=="string")try{Ie=A.parse(Ie)}catch{Ie=A.parse(b.baseFontSize+"px "+Ie)}else Ie=A.parse(A.stringify(Ie));var et=A.stringify({size:b.baseFontSize,family:Ie.family,stretch:v?Ie.stretch:void 0,variant:Ie.variant,weight:Ie.weight,style:Ie.style}),st=a(Ie.size),Ze=Math.round(st[0]*c(st[1]));if(Ze!==w.fontSize[Ne]&&(C=!0,w.fontSize[Ne]=Ze),(!w.font[Ne]||et!=w.font[Ne].baseString)&&(i=!0,w.font[Ne]=b.fonts[et],!w.font[Ne])){var Ke=Ie.family.join(", "),nt=[Ie.style];Ie.style!=Ie.variant&&nt.push(Ie.variant),Ie.variant!=Ie.weight&&nt.push(Ie.weight),v&&Ie.weight!=Ie.stretch&&nt.push(Ie.stretch),w.font[Ne]={baseString:et,family:Ke,weight:Ie.weight,stretch:Ie.stretch,style:Ie.style,variant:Ie.variant,width:{},kerning:{},metrics:y(Ke,{origin:"top",fontSize:b.baseFontSize,fontStyle:nt.join(" ")})},b.fonts[et]=w.font[Ne]}}),(i||C)&&this.font.forEach(function(Ie,Ne){var et=A.stringify({size:w.fontSize[Ne],family:Ie.family,stretch:v?Ie.stretch:void 0,variant:Ie.variant,weight:Ie.weight,style:Ie.style});if(w.fontAtlas[Ne]=w.shader.atlas[et],!w.fontAtlas[Ne]){var st=Ie.metrics;w.shader.atlas[et]=w.fontAtlas[Ne]={fontString:et,step:Math.ceil(w.fontSize[Ne]*st.bottom*.5)*2,em:w.fontSize[Ne],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:w.regl.texture()}}S.text==null&&(S.text=w.text)}),typeof S.text=="string"&&S.position&&S.position.length>2){for(var x=Array(S.position.length*.5),k=0;k<x.length;k++)x[k]=S.text;S.text=x}var I;if(S.text!=null||i){if(this.textOffsets=[0],Array.isArray(S.text)){this.count=S.text[0].length,this.counts=[this.count];for(var B=1;B<S.text.length;B++)this.textOffsets[B]=this.textOffsets[B-1]+S.text[B-1].length,this.count+=S.text[B].length,this.counts.push(S.text[B].length);this.text=S.text.join("")}else this.text=S.text,this.count=this.text.length,this.counts=[this.count];I=[],this.font.forEach(function(Ie,Ne){b.atlasContext.font=Ie.baseString;for(var et=w.fontAtlas[Ne],st=0;st<w.text.length;st++){var Ze=w.text.charAt(st);if(et.ids[Ze]==null&&(et.ids[Ze]=et.chars.length,et.chars.push(Ze),I.push(Ze)),Ie.width[Ze]==null&&(Ie.width[Ze]=b.atlasContext.measureText(Ze).width/b.baseFontSize,w.kerning)){var Ke=[];for(var nt in Ie.width)Ke.push(nt+Ze,Ze+nt);l(Ie.kerning,u(Ie.family,{pairs:Ke}))}}})}if(S.position)if(S.position.length>2){for(var _=!S.position[0].length,z=r.mallocFloat(this.count*2),O=0,F=0;O<this.counts.length;O++){var N=this.counts[O];if(_)for(var V=0;V<N;V++)z[F++]=S.position[O*2],z[F++]=S.position[O*2+1];else for(var j=0;j<N;j++)z[F++]=S.position[O][0],z[F++]=S.position[O][1]}this.position.call?this.position({type:"float",data:z}):this.position=this.regl.buffer({type:"float",data:z}),r.freeFloat(z)}else this.position.destroy&&this.position.destroy(),this.position={constant:S.position};if(S.text||i){var $=r.mallocUint8(this.count),q=r.mallocFloat(this.count*2);this.textWidth=[];for(var oe=0,Z=0;oe<this.counts.length;oe++){for(var G=this.counts[oe],re=this.font[oe]||this.font[0],H=this.fontAtlas[oe]||this.fontAtlas[0],J=0;J<G;J++){var ae=this.text.charAt(Z),K=this.text.charAt(Z-1);if($[Z]=H.ids[ae],q[Z*2]=re.width[ae],J){var Y=q[Z*2-2],ie=q[Z*2],ne=q[Z*2-1],le=ne+Y*.5+ie*.5;if(this.kerning){var de=re.kerning[K+ae];de&&(le+=de*.001)}q[Z*2+1]=le}else q[Z*2+1]=q[Z*2]*.5;Z++}this.textWidth.push(q.length?q[Z*2-2]*.5+q[Z*2-1]:0)}S.align||(S.align=this.align),this.charBuffer({data:$,type:"uint8",usage:"stream"}),this.sizeBuffer({data:q,type:"float",usage:"stream"}),r.freeUint8($),r.freeFloat(q),I.length&&this.font.forEach(function(Ie,Ne){var et=w.fontAtlas[Ne],st=et.step,Ze=Math.floor(b.maxAtlasSize/st),Ke=Math.min(Ze,et.chars.length),nt=Math.ceil(et.chars.length/Ke),it=f(Ke*st),lt=f(nt*st);et.width=it,et.height=lt,et.rows=nt,et.cols=Ke,et.em&&et.texture({data:g({canvas:b.atlasCanvas,font:et.fontString,chars:et.chars,shape:[it,lt],step:[st,st]})})})}if(S.align&&(this.align=S.align,this.alignOffset=this.textWidth.map(function(Ie,Ne){var et=Array.isArray(w.align)?w.align.length>1?w.align[Ne]:w.align[0]:w.align;if(typeof et=="number")return et;switch(et){case"right":case"end":return-Ie;case"center":case"centre":case"middle":return-Ie*.5}return 0})),this.baseline==null&&S.baseline==null&&(S.baseline=0),S.baseline!=null&&(this.baseline=S.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Ie,Ne){var et=(w.font[Ne]||w.font[0]).metrics,st=0;return st+=et.bottom*.5,typeof Ie=="number"?st+=Ie-et.baseline:st+=-et[Ie],st*=-1,st})),S.color!=null)if(S.color||(S.color="transparent"),typeof S.color=="string"||!isNaN(S.color))this.color=d(S.color,"uint8");else{var we;if(typeof S.color[0]=="number"&&S.color.length>this.counts.length){var me=S.color.length;we=r.mallocUint8(me);for(var Le=(S.color.subarray||S.color.slice).bind(S.color),ve=0;ve<me;ve+=4)we.set(d(Le(ve,ve+4),"uint8"),ve)}else{var Ae=S.color.length;we=r.mallocUint8(Ae*4);for(var ye=0;ye<Ae;ye++)we.set(d(S.color[ye]||0,"uint8"),ye*4)}this.color=we}if(S.position||S.text||S.color||S.baseline||S.align||S.font||S.offset||S.opacity){var Se=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Se){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var ze=0;ze<this.batch.length;ze++)this.batch[ze]={count:this.counts.length>1?this.counts[ze]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ze]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ze*4,ze*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ze]:this.opacity,baseline:this.baselineOffset[ze]!=null?this.baselineOffset[ze]:this.baselineOffset[0],align:this.align?this.alignOffset[ze]!=null?this.alignOffset[ze]:this.alignOffset[0]:0,atlas:this.fontAtlas[ze]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ze*2,ze*2+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=[]}},b.prototype.destroy=function(){},b.prototype.kerning=!0,b.prototype.position={constant:new Float32Array(2)},b.prototype.translate=null,b.prototype.scale=null,b.prototype.font=null,b.prototype.text="",b.prototype.positionOffset=[0,0],b.prototype.opacity=1,b.prototype.color=new Uint8Array([0,0,0,255]),b.prototype.alignOffset=[0,0],b.maxAtlasSize=1024,b.atlasCanvas=document.createElement("canvas"),b.atlasContext=b.atlasCanvas.getContext("2d",{alpha:!1}),b.baseFontSize=64,b.fonts={};function E(p){return typeof p=="function"&&p._gl&&p.prop&&p.texture&&p.buffer}te.exports=b},55212:function(te,X,e){var A=e(55616);te.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},o(r)?r={container:r}:L(r)?r={container:r}:M(r)?r={gl:r}:r=A(r,{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),r.pixelRatio||(r.pixelRatio=e.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var t=document.querySelector(r.container);if(!t)throw Error("Element "+r.container+" is not found");r.container=t}o(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=d(),r.container.appendChild(r.canvas),P(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=d(),r.container.appendChild(r.canvas),P(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(s){try{r.gl=r.canvas.getContext(s,r.attrs)}catch{}return r.gl}),r.gl};function P(g){if(g.container)if(g.container==document.body)document.body.style.width||(g.canvas.width=g.width||g.pixelRatio*e.g.innerWidth),document.body.style.height||(g.canvas.height=g.height||g.pixelRatio*e.g.innerHeight);else{var r=g.container.getBoundingClientRect();g.canvas.width=g.width||r.right-r.left,g.canvas.height=g.height||r.bottom-r.top}}function o(g){return typeof g.getContext=="function"&&"width"in g&&"height"in g}function L(g){return typeof g.nodeName=="string"&&typeof g.appendChild=="function"&&typeof g.getBoundingClientRect=="function"}function M(g){return typeof g.drawArrays=="function"||typeof g.drawElements=="function"}function d(){var g=document.createElement("canvas");return g.style.position="absolute",g.style.top=0,g.style.left=0,g}},26444:function(te){te.exports=function(X){typeof X=="string"&&(X=[X]);for(var e=[].slice.call(arguments,1),A=[],P=0;P<X.length-1;P++)A.push(X[P],e[P]||"");return A.push(X[P]),A.join("")}},2304:function(te,X,e){var A=e(53664),P=A("%Object.getOwnPropertyDescriptor%",!0);if(P)try{P([],"length")}catch{P=null}te.exports=P},52264:function(te,X,e){var A=e(24200),P;typeof e.g.matchMedia=="function"?P=!e.g.matchMedia("(hover: none)").matches:P=A,te.exports=P},89184:function(te,X,e){var A=e(24200);function P(){var o=!1;try{var L=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,L),window.removeEventListener("test",null,L)}catch{o=!1}return o}te.exports=A&&P()},39640:function(te,X,e){var A=e(53664),P=A("%Object.defineProperty%",!0),o=function(){if(P)try{return P({},"a",{value:1}),!0}catch{return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return P([],"length",{value:1}).length!==1}catch{return!0}},te.exports=o},69572:function(te){var X={foo:{}},e=Object;te.exports=function(){return{__proto__:X}.foo===X.foo&&!({__proto__:null}instanceof e)}},71080:function(te,X,e){var A=typeof Symbol<"u"&&Symbol,P=e(89320);te.exports=function(){return typeof A!="function"||typeof Symbol!="function"||typeof A("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:P()}},89320:function(te){te.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},A=Symbol("test"),P=Object(A);if(typeof A=="string"||Object.prototype.toString.call(A)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var o=42;e[A]=o;for(A in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var L=Object.getOwnPropertySymbols(e);if(L.length!==1||L[0]!==A||!Object.prototype.propertyIsEnumerable.call(e,A))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var M=Object.getOwnPropertyDescriptor(e,A);if(M.value!==o||M.enumerable!==!0)return!1}return!0}},46672:function(te,X,e){var A=e(89320);te.exports=function(){return A()&&!!Symbol.toStringTag}},92064:function(te,X,e){var A=Function.prototype.call,P=Object.prototype.hasOwnProperty,o=e(8844);te.exports=o.call(A,P)},35984:function(te,X){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */X.read=function(e,A,P,o,L){var M,d,g=L*8-o-1,r=(1<<g)-1,t=r>>1,s=-7,a=P?L-1:0,c=P?-1:1,u=e[A+a];for(a+=c,M=u&(1<<-s)-1,u>>=-s,s+=g;s>0;M=M*256+e[A+a],a+=c,s-=8);for(d=M&(1<<-s)-1,M>>=-s,s+=o;s>0;d=d*256+e[A+a],a+=c,s-=8);if(M===0)M=1-t;else{if(M===r)return d?NaN:(u?-1:1)*(1/0);d=d+Math.pow(2,o),M=M-t}return(u?-1:1)*d*Math.pow(2,M-o)},X.write=function(e,A,P,o,L,M){var d,g,r,t=M*8-L-1,s=(1<<t)-1,a=s>>1,c=L===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=o?0:M-1,l=o?1:-1,y=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(g=isNaN(A)?1:0,d=s):(d=Math.floor(Math.log(A)/Math.LN2),A*(r=Math.pow(2,-d))<1&&(d--,r*=2),d+a>=1?A+=c/r:A+=c*Math.pow(2,1-a),A*r>=2&&(d++,r/=2),d+a>=s?(g=0,d=s):d+a>=1?(g=(A*r-1)*Math.pow(2,L),d=d+a):(g=A*Math.pow(2,a-1)*Math.pow(2,L),d=0));L>=8;e[P+u]=g&255,u+=l,g/=256,L-=8);for(d=d<<L|g,t+=L;t>0;e[P+u]=d&255,u+=l,d/=256,t-=8);e[P+u-l]|=y*128}},6768:function(te){typeof Object.create=="function"?te.exports=function(e,A){A&&(e.super_=A,e.prototype=Object.create(A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:te.exports=function(e,A){if(A){e.super_=A;var P=function(){};P.prototype=A.prototype,e.prototype=new P,e.prototype.constructor=e}}},91148:function(te,X,e){var A=e(46672)(),P=e(99676),o=P("Object.prototype.toString"),L=function(r){return A&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:o(r)==="[object Arguments]"},M=function(r){return L(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&o(r)!=="[object Array]"&&o(r.callee)==="[object Function]"},d=function(){return L(arguments)}();L.isLegacyArguments=M,te.exports=d?L:M},24200:function(te){te.exports=!0},90720:function(te){var X=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,A,P;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{A=Object.defineProperty({},"length",{get:function(){throw P}}),P={},e(function(){throw 42},null,A)}catch(T){T!==P&&(e=null)}else e=null;var o=/^\s*class\b/,L=function(f){try{var n=X.call(f);return o.test(n)}catch{return!1}},M=function(f){try{return L(f)?!1:(X.call(f),!0)}catch{return!1}},d=Object.prototype.toString,g="[object Object]",r="[object Function]",t="[object GeneratorFunction]",s="[object HTMLAllCollection]",a="[object HTML document.all class]",c="[object HTMLCollection]",u=typeof Symbol=="function"&&!!Symbol.toStringTag,l=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var h=document.all;d.call(h)===d.call(document.all)&&(y=function(f){if((l||!f)&&(typeof f>"u"||typeof f=="object"))try{var n=d.call(f);return(n===s||n===a||n===c||n===g)&&f("")==null}catch{}return!1})}te.exports=e?function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;try{e(f,null,A)}catch(n){if(n!==P)return!1}return!L(f)&&M(f)}:function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;if(u)return M(f);if(L(f))return!1;var n=d.call(f);return n!==r&&n!==t&&!/^\[object HTML/.test(n)?!1:M(f)}},84420:function(te,X,e){var A=Object.prototype.toString,P=Function.prototype.toString,o=/^\s*(?:function)?\*/,L=e(46672)(),M=Object.getPrototypeOf,d=function(){if(!L)return!1;try{return Function("return function*() {}")()}catch{}},g;te.exports=function(t){if(typeof t!="function")return!1;if(o.test(P.call(t)))return!0;if(!L){var s=A.call(t);return s==="[object GeneratorFunction]"}if(!M)return!1;if(typeof g>"u"){var a=d();g=a?M(a):!1}return M(t)===g}},96604:function(te){te.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(te){te.exports=function(e){return e!==e}},1560:function(te,X,e){var A=e(57916),P=e(81288),o=e(85992),L=e(57740),M=e(59736),d=A(L(),Number);P(d,{getPolyfill:L,implementation:o,shim:M}),te.exports=d},57740:function(te,X,e){var A=e(85992);te.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:A}},59736:function(te,X,e){var A=e(81288),P=e(57740);te.exports=function(){var L=P();return A(Number,{isNaN:L},{isNaN:function(){return Number.isNaN!==L}}),L}},18400:function(te){te.exports=function(X){var e=typeof X;return X!==null&&(e==="object"||e==="function")}},58908:function(te){var X=Object.prototype.toString;te.exports=function(e){var A;return X.call(e)==="[object Object]"&&(A=Object.getPrototypeOf(e),A===null||A===Object.getPrototypeOf({}))}},94576:function(te){te.exports=function(X){for(var e=X.length,A,P=0;P<e;P++)if(A=X.charCodeAt(P),(A<9||A>13)&&A!==32&&A!==133&&A!==160&&A!==5760&&A!==6158&&(A<8192||A>8205)&&A!==8232&&A!==8233&&A!==8239&&A!==8287&&A!==8288&&A!==12288&&A!==65279)return!1;return!0}},53520:function(te){te.exports=function(e){return typeof e!="string"?!1:(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},7728:function(te,X,e){var A=e(46492),P=e(63436),o=e(99676),L=o("Object.prototype.toString"),M=e(46672)(),d=e(2304),g=typeof globalThis>"u"?e.g:globalThis,r=P(),t=o("Array.prototype.indexOf",!0)||function(y,h){for(var T=0;T<y.length;T+=1)if(y[T]===h)return T;return-1},s=o("String.prototype.slice"),a={},c=Object.getPrototypeOf;M&&d&&c&&A(r,function(l){var y=new g[l];if(Symbol.toStringTag in y){var h=c(y),T=d(h,Symbol.toStringTag);if(!T){var f=c(h);T=d(f,Symbol.toStringTag)}a[l]=T.get}});var u=function(y){var h=!1;return A(a,function(T,f){if(!h)try{h=T.call(y)===f}catch{}}),h};te.exports=function(y){if(!y||typeof y!="object")return!1;if(!M||!(Symbol.toStringTag in y)){var h=s(L(y),8,-1);return t(r,h)>-1}return d?u(y):!1}},76244:function(te){te.exports=Math.log2||function(X){return Math.log(X)*Math.LOG2E}},62644:function(te,X,e){te.exports=P;var A=e(93784);function P(o,L){L||(L=o,o=window);var M=0,d=0,g=0,r={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function s(m){var b=!1;return"altKey"in m&&(b=b||m.altKey!==r.alt,r.alt=!!m.altKey),"shiftKey"in m&&(b=b||m.shiftKey!==r.shift,r.shift=!!m.shiftKey),"ctrlKey"in m&&(b=b||m.ctrlKey!==r.control,r.control=!!m.ctrlKey),"metaKey"in m&&(b=b||m.metaKey!==r.meta,r.meta=!!m.metaKey),b}function a(m,b){var E=A.x(b),p=A.y(b);"buttons"in b&&(m=b.buttons|0),(m!==M||E!==d||p!==g||s(b))&&(M=m|0,d=E||0,g=p||0,L&&L(M,d,g,r))}function c(m){a(0,m)}function u(){(M||d||g||r.shift||r.alt||r.meta||r.control)&&(d=g=0,M=0,r.shift=r.alt=r.control=r.meta=!1,L&&L(0,0,0,r))}function l(m){s(m)&&L&&L(M,d,g,r)}function y(m){A.buttons(m)===0?a(0,m):a(M,m)}function h(m){a(M|A.buttons(m),m)}function T(m){a(M&~A.buttons(m),m)}function f(){t||(t=!0,o.addEventListener("mousemove",y),o.addEventListener("mousedown",h),o.addEventListener("mouseup",T),o.addEventListener("mouseleave",c),o.addEventListener("mouseenter",c),o.addEventListener("mouseout",c),o.addEventListener("mouseover",c),o.addEventListener("blur",u),o.addEventListener("keyup",l),o.addEventListener("keydown",l),o.addEventListener("keypress",l),o!==window&&(window.addEventListener("blur",u),window.addEventListener("keyup",l),window.addEventListener("keydown",l),window.addEventListener("keypress",l)))}function n(){t&&(t=!1,o.removeEventListener("mousemove",y),o.removeEventListener("mousedown",h),o.removeEventListener("mouseup",T),o.removeEventListener("mouseleave",c),o.removeEventListener("mouseenter",c),o.removeEventListener("mouseout",c),o.removeEventListener("mouseover",c),o.removeEventListener("blur",u),o.removeEventListener("keyup",l),o.removeEventListener("keydown",l),o.removeEventListener("keypress",l),o!==window&&(window.removeEventListener("blur",u),window.removeEventListener("keyup",l),window.removeEventListener("keydown",l),window.removeEventListener("keypress",l)))}f();var v={element:o};return Object.defineProperties(v,{enabled:{get:function(){return t},set:function(m){m?f():n()},enumerable:!0},buttons:{get:function(){return M},enumerable:!0},x:{get:function(){return d},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),v}},29128:function(te){var X={left:0,top:0};te.exports=e;function e(P,o,L){o=o||P.currentTarget||P.srcElement,Array.isArray(L)||(L=[0,0]);var M=P.clientX||0,d=P.clientY||0,g=A(o);return L[0]=M-g.left,L[1]=d-g.top,L}function A(P){return P===window||P===document||P===document.body?X:P.getBoundingClientRect()}},93784:function(te,X){function e(L){if(typeof L=="object"){if("buttons"in L)return L.buttons;if("which"in L){var M=L.which;if(M===2)return 4;if(M===3)return 2;if(M>0)return 1<<M-1}else if("button"in L){var M=L.button;if(M===1)return 4;if(M===2)return 2;if(M>=0)return 1<<M}}return 0}X.buttons=e;function A(L){return L.target||L.srcElement||window}X.element=A;function P(L){if(typeof L=="object"){if("offsetX"in L)return L.offsetX;var M=A(L),d=M.getBoundingClientRect();return L.clientX-d.left}return 0}X.x=P;function o(L){if(typeof L=="object"){if("offsetY"in L)return L.offsetY;var M=A(L),d=M.getBoundingClientRect();return L.clientY-d.top}return 0}X.y=o},97264:function(te,X,e){var A=e(23464);te.exports=P;function P(o,L,M){typeof o=="function"&&(M=!!L,L=o,o=window);var d=A("ex",o),g=function(r){M&&r.preventDefault();var t=r.deltaX||0,s=r.deltaY||0,a=r.deltaZ||0,c=r.deltaMode,u=1;switch(c){case 1:u=d;break;case 2:u=window.innerHeight;break}if(t*=u,s*=u,a*=u,t||s||a)return L(t,s,a,r)};return o.addEventListener("wheel",g),g}},88324:function(te,X,e){var A;/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/(function(o,L,M){L[o]=L[o]||M(),te.exports?te.exports=L[o]:(A=(function(){return L[o]}).call(X,e,X,te),A!==void 0&&(te.exports=A))})("Promise",typeof e.g<"u"?e.g:this,function(){var o,L,M,d=Object.prototype.toString,g=typeof setImmediate<"u"?function(v){return setImmediate(v)}:setTimeout;try{Object.defineProperty({},"x",{}),o=function(v,m,b,E){return Object.defineProperty(v,m,{value:b,writable:!0,configurable:E!==!1})}}catch{o=function(m,b,E){return m[b]=E,m}}M=function(){var v,m,b;function E(p,S){this.fn=p,this.self=S,this.next=void 0}return{add:function(S,w){b=new E(S,w),m?m.next=b:v=b,m=b,b=void 0},drain:function(){var S=v;for(v=m=L=void 0;S;)S.fn.call(S.self),S=S.next}}}();function r(n,v){M.add(n,v),L||(L=g(M.drain))}function t(n){var v,m=typeof n;return n!=null&&(m=="object"||m=="function")&&(v=n.then),typeof v=="function"?v:!1}function s(){for(var n=0;n<this.chain.length;n++)a(this,this.state===1?this.chain[n].success:this.chain[n].failure,this.chain[n]);this.chain.length=0}function a(n,v,m){var b,E;try{v===!1?m.reject(n.msg):(v===!0?b=n.msg:b=v.call(void 0,n.msg),b===m.promise?m.reject(TypeError("Promise-chain cycle")):(E=t(b))?E.call(b,m.resolve,m.reject):m.resolve(b))}catch(p){m.reject(p)}}function c(n){var v,m=this;if(!m.triggered){m.triggered=!0,m.def&&(m=m.def);try{(v=t(n))?r(function(){var b=new y(m);try{v.call(n,function(){c.apply(b,arguments)},function(){u.apply(b,arguments)})}catch(E){u.call(b,E)}}):(m.msg=n,m.state=1,m.chain.length>0&&r(s,m))}catch(b){u.call(new y(m),b)}}}function u(n){var v=this;v.triggered||(v.triggered=!0,v.def&&(v=v.def),v.msg=n,v.state=2,v.chain.length>0&&r(s,v))}function l(n,v,m,b){for(var E=0;E<v.length;E++)(function(S){n.resolve(v[S]).then(function(i){m(S,i)},b)})(E)}function y(n){this.def=n,this.triggered=!1}function h(n){this.promise=n,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function T(n){if(typeof n!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var v=new h(this);this.then=function(b,E){var p={success:typeof b=="function"?b:!0,failure:typeof E=="function"?E:!1};return p.promise=new this.constructor(function(w,i){if(typeof w!="function"||typeof i!="function")throw TypeError("Not a function");p.resolve=w,p.reject=i}),v.chain.push(p),v.state!==0&&r(s,v),p.promise},this.catch=function(b){return this.then(void 0,b)};try{n.call(void 0,function(b){c.call(v,b)},function(b){u.call(v,b)})}catch(m){u.call(v,m)}}var f=o({},"constructor",T,!1);return T.prototype=f,o(f,"__NPO__",0,!1),o(T,"resolve",function(v){var m=this;return v&&typeof v=="object"&&v.__NPO__===1?v:new m(function(E,p){if(typeof E!="function"||typeof p!="function")throw TypeError("Not a function");E(v)})}),o(T,"reject",function(v){return new this(function(b,E){if(typeof b!="function"||typeof E!="function")throw TypeError("Not a function");E(v)})}),o(T,"all",function(v){var m=this;return d.call(v)!="[object Array]"?m.reject(TypeError("Not an array")):v.length===0?m.resolve([]):new m(function(E,p){if(typeof E!="function"||typeof p!="function")throw TypeError("Not a function");var S=v.length,w=Array(S),i=0;l(m,v,function(x,k){w[x]=k,++i===S&&E(w)},p)})}),o(T,"race",function(v){var m=this;return d.call(v)!="[object Array]"?m.reject(TypeError("Not an array")):new m(function(E,p){if(typeof E!="function"||typeof p!="function")throw TypeError("Not a function");l(m,v,function(w,i){E(i)},p)})}),T})},48816:function(te){var X=Math.PI,e=d(120);te.exports=A;function A(g){for(var r,t=[],s=0,a=0,c=0,u=0,l=null,y=null,h=0,T=0,f=0,n=g.length;f<n;f++){var v=g[f],m=v[0];switch(m){case"M":c=v[1],u=v[2];break;case"A":v=L(h,T,v[1],v[2],d(v[3]),v[4],v[5],v[6],v[7]),v.unshift("C"),v.length>7&&(t.push(v.splice(0,7)),v.unshift("C"));break;case"S":var b=h,E=T;(r=="C"||r=="S")&&(b+=b-s,E+=E-a),v=["C",b,E,v[1],v[2],v[3],v[4]];break;case"T":r=="Q"||r=="T"?(l=h*2-l,y=T*2-y):(l=h,y=T),v=o(h,T,l,y,v[1],v[2]);break;case"Q":l=v[1],y=v[2],v=o(h,T,v[1],v[2],v[3],v[4]);break;case"L":v=P(h,T,v[1],v[2]);break;case"H":v=P(h,T,v[1],T);break;case"V":v=P(h,T,h,v[1]);break;case"Z":v=P(h,T,c,u);break}r=m,h=v[v.length-2],T=v[v.length-1],v.length>4?(s=v[v.length-4],a=v[v.length-3]):(s=h,a=T),t.push(v)}return t}function P(g,r,t,s){return["C",g,r,t,s,t,s]}function o(g,r,t,s,a,c){return["C",g/3+.6666666666666666*t,r/3+.6666666666666666*s,a/3+.6666666666666666*t,c/3+.6666666666666666*s,a,c]}function L(g,r,t,s,a,c,u,l,y,h){if(h)w=h[0],i=h[1],p=h[2],S=h[3];else{var T=M(g,r,-a);g=T.x,r=T.y,T=M(l,y,-a),l=T.x,y=T.y;var f=(g-l)/2,n=(r-y)/2,v=f*f/(t*t)+n*n/(s*s);v>1&&(v=Math.sqrt(v),t=v*t,s=v*s);var m=t*t,b=s*s,E=(c==u?-1:1)*Math.sqrt(Math.abs((m*b-m*n*n-b*f*f)/(m*n*n+b*f*f)));E==1/0&&(E=1);var p=E*t*n/s+(g+l)/2,S=E*-s*f/t+(r+y)/2,w=Math.asin(((r-S)/s).toFixed(9)),i=Math.asin(((y-S)/s).toFixed(9));w=g<p?X-w:w,i=l<p?X-i:i,w<0&&(w=X*2+w),i<0&&(i=X*2+i),u&&w>i&&(w=w-X*2),!u&&i>w&&(i=i-X*2)}if(Math.abs(i-w)>e){var C=i,x=l,k=y;i=w+e*(u&&i>w?1:-1),l=p+t*Math.cos(i),y=S+s*Math.sin(i);var I=L(l,y,t,s,a,0,u,x,k,[i,C,p,S])}var B=Math.tan((i-w)/4),_=4/3*t*B,z=4/3*s*B,O=[2*g-(g+_*Math.sin(w)),2*r-(r-z*Math.cos(w)),l+_*Math.sin(i),y-z*Math.cos(i),l,y];if(h)return O;I&&(O=O.concat(I));for(var F=0;F<O.length;){var N=M(O[F],O[F+1],a);O[F++]=N.x,O[F++]=N.y}return O}function M(g,r,t){return{x:g*Math.cos(t)-r*Math.sin(t),y:g*Math.sin(t)+r*Math.cos(t)}}function d(g){return g*(X/180)}},50896:function(te){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var X=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;function P(L){if(L==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(L)}function o(){try{if(!Object.assign)return!1;var L=new String("abc");if(L[5]="de",Object.getOwnPropertyNames(L)[0]==="5")return!1;for(var M={},d=0;d<10;d++)M["_"+String.fromCharCode(d)]=d;var g=Object.getOwnPropertyNames(M).map(function(t){return M[t]});if(g.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}te.exports=o()?Object.assign:function(L,M){for(var d,g=P(L),r,t=1;t<arguments.length;t++){d=Object(arguments[t]);for(var s in d)e.call(d,s)&&(g[s]=d[s]);if(X){r=X(d);for(var a=0;a<r.length;a++)A.call(d,r[a])&&(g[r[a]]=d[r[a]])}}return g}},76835:function(te){var X=function(e){return e!==e};te.exports=function(A,P){return A===0&&P===0?1/A===1/P:!!(A===P||X(A)&&X(P))}},39896:function(te,X,e){var A=e(81288),P=e(57916),o=e(76835),L=e(66148),M=e(16408),d=P(L(),Object);A(d,{getPolyfill:L,implementation:o,shim:M}),te.exports=d},66148:function(te,X,e){var A=e(76835);te.exports=function(){return typeof Object.is=="function"?Object.is:A}},16408:function(te,X,e){var A=e(66148),P=e(81288);te.exports=function(){var L=A();return P(Object,{is:L},{is:function(){return Object.is!==L}}),L}},32764:function(te,X,e){var A;if(!Object.keys){var P=Object.prototype.hasOwnProperty,o=Object.prototype.toString,L=e(97344),M=Object.prototype.propertyIsEnumerable,d=!M.call({toString:null},"toString"),g=M.call(function(){},"prototype"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],t=function(u){var l=u.constructor;return l&&l.prototype===u},s={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},a=function(){if(typeof window>"u")return!1;for(var u in window)try{if(!s["$"+u]&&P.call(window,u)&&window[u]!==null&&typeof window[u]=="object")try{t(window[u])}catch{return!0}}catch{return!0}return!1}(),c=function(u){if(typeof window>"u"||!a)return t(u);try{return t(u)}catch{return!1}};A=function(l){var y=l!==null&&typeof l=="object",h=o.call(l)==="[object Function]",T=L(l),f=y&&o.call(l)==="[object String]",n=[];if(!y&&!h&&!T)throw new TypeError("Object.keys called on a non-object");var v=g&&h;if(f&&l.length>0&&!P.call(l,0))for(var m=0;m<l.length;++m)n.push(String(m));if(T&&l.length>0)for(var b=0;b<l.length;++b)n.push(String(b));else for(var E in l)!(v&&E==="prototype")&&P.call(l,E)&&n.push(String(E));if(d)for(var p=c(l),S=0;S<r.length;++S)!(p&&r[S]==="constructor")&&P.call(l,r[S])&&n.push(r[S]);return n}}te.exports=A},41820:function(te,X,e){var A=Array.prototype.slice,P=e(97344),o=Object.keys,L=o?function(g){return o(g)}:e(32764),M=Object.keys;L.shim=function(){if(Object.keys){var g=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);g||(Object.keys=function(t){return P(t)?M(A.call(t)):M(t)})}else Object.keys=L;return Object.keys||L},te.exports=L},97344:function(te){var X=Object.prototype.toString;te.exports=function(A){var P=X.call(A),o=P==="[object Arguments]";return o||(o=P!=="[object Array]"&&A!==null&&typeof A=="object"&&typeof A.length=="number"&&A.length>=0&&X.call(A.callee)==="[object Function]"),o}},32868:function(te){function X(P,o){if(typeof P!="string")return[P];var L=[P];typeof o=="string"||Array.isArray(o)?o={brackets:o}:o||(o={});var M=o.brackets?Array.isArray(o.brackets)?o.brackets:[o.brackets]:["{}","[]","()"],d=o.escape||"___",g=!!o.flat;M.forEach(function(s){var a=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),c=[];function u(l,y,h){var T=L.push(l.slice(s[0].length,-s[1].length))-1;return c.push(T),d+T+d}L.forEach(function(l,y){for(var h,T=0;l!=h;)if(h=l,l=l.replace(a,u),T++>1e4)throw Error("References have circular dependency. Please, check them.");L[y]=l}),c=c.reverse(),L=L.map(function(l){return c.forEach(function(y){l=l.replace(new RegExp("(\\"+d+y+"\\"+d+")","g"),s[0]+"$1"+s[1])}),l})});var r=new RegExp("\\"+d+"([0-9]+)\\"+d);function t(s,a,c){for(var u=[],l,y=0;l=r.exec(s);){if(y++>1e4)throw Error("Circular references in parenthesis");u.push(s.slice(0,l.index)),u.push(t(a[l[1]],a)),s=s.slice(l.index+l[0].length)}return u.push(s),u}return g?L:t(L[0],L)}function e(P,o){if(o&&o.flat){var L=o&&o.escape||"___",M=P[0],d;if(!M)return"";for(var g=new RegExp("\\"+L+"([0-9]+)\\"+L),r=0;M!=d;){if(r++>1e4)throw Error("Circular references in "+P);d=M,M=M.replace(g,t)}return M}return P.reduce(function s(a,c){return Array.isArray(c)&&(c=c.reduce(s,"")),a+c},"");function t(s,a){if(P[a]==null)throw Error("Reference "+a+"is undefined");return P[a]}}function A(P,o){return Array.isArray(P)?e(P,o):X(P,o)}A.parse=X,A.stringify=e,te.exports=A},51160:function(te,X,e){var A=e(55616);te.exports=P;function P(o){var L;return arguments.length>1&&(o=arguments),typeof o=="string"?o=o.split(/\s/).map(parseFloat):typeof o=="number"&&(o=[o]),o.length&&typeof o[0]=="number"?o.length===1?L={width:o[0],height:o[0],x:0,y:0}:o.length===2?L={width:o[0],height:o[1],x:0,y:0}:L={x:o[0],y:o[1],width:o[2]-o[0]||0,height:o[3]-o[1]||0}:o&&(o=A(o,{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"}),L={x:o.left||0,y:o.top||0},o.width==null?o.right?L.width=o.right-L.x:L.width=0:L.width=o.width,o.height==null?o.bottom?L.height=o.bottom-L.y:L.height=0:L.height=o.height),L}},21984:function(te){te.exports=A;var X={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function A(L){var M=[];return L.replace(e,function(d,g,r){var t=g.toLowerCase();for(r=o(r),t=="m"&&r.length>2&&(M.push([g].concat(r.splice(0,2))),t="l",g=g=="m"?"l":"L");;){if(r.length==X[t])return r.unshift(g),M.push(r);if(r.length<X[t])throw new Error("malformed path data");M.push([g].concat(r.splice(0,X[t])))}}),M}var P=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(L){var M=L.match(P);return M?M.map(Number):[]}},65819:function(te){te.exports=function(e,A){A||(A=[0,""]),e=String(e);var P=parseFloat(e,10);return A[0]=P,A[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",A}},41984:function(te,X,e){var A=e(4168);(function(){var P,o,L,M,d,g;typeof performance<"u"&&performance!==null&&performance.now?te.exports=function(){return performance.now()}:typeof A<"u"&&A!==null&&A.hrtime?(te.exports=function(){return(P()-d)/1e6},o=A.hrtime,P=function(){var r;return r=o(),r[0]*1e9+r[1]},M=P(),g=A.uptime()*1e9,d=M-g):Date.now?(te.exports=function(){return Date.now()-L},L=Date.now()):(te.exports=function(){return new Date().getTime()-L},L=new Date().getTime())}).call(this)},55616:function(te){te.exports=function(P,o,L){var M={},d,g;if(typeof o=="string"&&(o=e(o)),Array.isArray(o)){var r={};for(g=0;g<o.length;g++)r[o[g]]=!0;o=r}for(d in o)o[d]=e(o[d]);var t={};for(d in o){var s=o[d];if(Array.isArray(s))for(g=0;g<s.length;g++){var a=s[g];if(L&&(t[a]=!0),a in P){if(M[d]=P[a],L)for(var c=g;c<s.length;c++)t[s[c]]=!0;break}}else d in P&&(o[d]&&(M[d]=P[d]),L&&(t[d]=!0))}if(L)for(d in P)t[d]||(M[d]=P[d]);return M};var X={};function e(A){return X[A]?X[A]:(typeof A=="string"&&(A=X[A]=A.split(/\s*,\s*|\s+/)),A)}},61456:function(te){te.exports=function(e,A,P,o){var L=e[0],M=e[1],d=!1;P===void 0&&(P=0),o===void 0&&(o=A.length);for(var g=o-P,r=0,t=g-1;r<g;t=r++){var s=A[r+P][0],a=A[r+P][1],c=A[t+P][0],u=A[t+P][1],l=a>M!=u>M&&L<(c-s)*(M-a)/(u-a)+s;l&&(d=!d)}return d}},14756:function(te,X,e){/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
* @preserve Project Home: https://github.com/voidqk/polybooljs
*/var A=e(7688),P=e(28648),o=e(72200),L=e(11403),M=e(82368),d=e(17792),g=!1,r=P(),t;t={buildLog:function(a){return a===!0?g=A():a===!1&&(g=!1),g===!1?!1:g.list},epsilon:function(a){return r.epsilon(a)},segments:function(a){var c=o(!0,r,g);return a.regions.forEach(c.addRegion),{segments:c.calculate(a.inverted),inverted:a.inverted}},combine:function(a,c){var u=o(!1,r,g);return{combined:u.calculate(a.segments,a.inverted,c.segments,c.inverted),inverted1:a.inverted,inverted2:c.inverted}},selectUnion:function(a){return{segments:M.union(a.combined,g),inverted:a.inverted1||a.inverted2}},selectIntersect:function(a){return{segments:M.intersect(a.combined,g),inverted:a.inverted1&&a.inverted2}},selectDifference:function(a){return{segments:M.difference(a.combined,g),inverted:a.inverted1&&!a.inverted2}},selectDifferenceRev:function(a){return{segments:M.differenceRev(a.combined,g),inverted:!a.inverted1&&a.inverted2}},selectXor:function(a){return{segments:M.xor(a.combined,g),inverted:a.inverted1!==a.inverted2}},polygon:function(a){return{regions:L(a.segments,r,g),inverted:a.inverted}},polygonFromGeoJSON:function(a){return d.toPolygon(t,a)},polygonToGeoJSON:function(a){return d.fromPolygon(t,r,a)},union:function(a,c){return s(a,c,t.selectUnion)},intersect:function(a,c){return s(a,c,t.selectIntersect)},difference:function(a,c){return s(a,c,t.selectDifference)},differenceRev:function(a,c){return s(a,c,t.selectDifferenceRev)},xor:function(a,c){return s(a,c,t.selectXor)}};function s(a,c,u){var l=t.segments(a),y=t.segments(c),h=t.combine(l,y),T=u(h);return t.polygon(T)}typeof window=="object"&&(window.PolyBool=t),te.exports=t},7688:function(te){function X(){var e,A=0,P=!1;function o(L,M){return e.list.push({type:L,data:M?JSON.parse(JSON.stringify(M)):void 0}),e}return e={list:[],segmentId:function(){return A++},checkIntersection:function(L,M){return o("check",{seg1:L,seg2:M})},segmentChop:function(L,M){return o("div_seg",{seg:L,pt:M}),o("chop",{seg:L,pt:M})},statusRemove:function(L){return o("pop_seg",{seg:L})},segmentUpdate:function(L){return o("seg_update",{seg:L})},segmentNew:function(L,M){return o("new_seg",{seg:L,primary:M})},segmentRemove:function(L){return o("rem_seg",{seg:L})},tempStatus:function(L,M,d){return o("temp_status",{seg:L,above:M,below:d})},rewind:function(L){return o("rewind",{seg:L})},status:function(L,M,d){return o("status",{seg:L,above:M,below:d})},vert:function(L){return L===P?e:(P=L,o("vert",{x:L}))},log:function(L){return typeof L!="string"&&(L=JSON.stringify(L,!1," ")),o("log",{txt:L})},reset:function(){return o("reset")},selected:function(L){return o("selected",{segs:L})},chainStart:function(L){return o("chain_start",{seg:L})},chainRemoveHead:function(L,M){return o("chain_rem_head",{index:L,pt:M})},chainRemoveTail:function(L,M){return o("chain_rem_tail",{index:L,pt:M})},chainNew:function(L,M){return o("chain_new",{pt1:L,pt2:M})},chainMatch:function(L){return o("chain_match",{index:L})},chainClose:function(L){return o("chain_close",{index:L})},chainAddHead:function(L,M){return o("chain_add_head",{index:L,pt:M})},chainAddTail:function(L,M){return o("chain_add_tail",{index:L,pt:M})},chainConnect:function(L,M){return o("chain_con",{index1:L,index2:M})},chainReverse:function(L){return o("chain_rev",{index:L})},chainJoin:function(L,M){return o("chain_join",{index1:L,index2:M})},done:function(){return o("done")}},e}te.exports=X},28648:function(te){function X(e){typeof e!="number"&&(e=1e-10);var A={epsilon:function(P){return typeof P=="number"&&(e=P),e},pointAboveOrOnLine:function(P,o,L){var M=o[0],d=o[1],g=L[0],r=L[1],t=P[0],s=P[1];return(g-M)*(s-d)-(r-d)*(t-M)>=-e},pointBetween:function(P,o,L){var M=P[1]-o[1],d=L[0]-o[0],g=P[0]-o[0],r=L[1]-o[1],t=g*d+M*r;if(t<e)return!1;var s=d*d+r*r;return!(t-s>-e)},pointsSameX:function(P,o){return Math.abs(P[0]-o[0])<e},pointsSameY:function(P,o){return Math.abs(P[1]-o[1])<e},pointsSame:function(P,o){return A.pointsSameX(P,o)&&A.pointsSameY(P,o)},pointsCompare:function(P,o){return A.pointsSameX(P,o)?A.pointsSameY(P,o)?0:P[1]<o[1]?-1:1:P[0]<o[0]?-1:1},pointsCollinear:function(P,o,L){var M=P[0]-o[0],d=P[1]-o[1],g=o[0]-L[0],r=o[1]-L[1];return Math.abs(M*r-g*d)<e},linesIntersect:function(P,o,L,M){var d=o[0]-P[0],g=o[1]-P[1],r=M[0]-L[0],t=M[1]-L[1],s=d*t-g*r;if(Math.abs(s)<e)return!1;var a=P[0]-L[0],c=P[1]-L[1],u=(r*c-t*a)/s,l=(d*c-g*a)/s,y={alongA:0,alongB:0,pt:[P[0]+u*d,P[1]+u*g]};return u<=-e?y.alongA=-2:u<e?y.alongA=-1:u-1<=-e?y.alongA=0:u-1<e?y.alongA=1:y.alongA=2,l<=-e?y.alongB=-2:l<e?y.alongB=-1:l-1<=-e?y.alongB=0:l-1<e?y.alongB=1:y.alongB=2,y},pointInsideRegion:function(P,o){for(var L=P[0],M=P[1],d=o[o.length-1][0],g=o[o.length-1][1],r=!1,t=0;t<o.length;t++){var s=o[t][0],a=o[t][1];a-M>e!=g-M>e&&(d-s)*(M-a)/(g-a)+s-L>e&&(r=!r),d=s,g=a}return r}};return A}te.exports=X},17792:function(te){var X={toPolygon:function(e,A){function P(M){if(M.length<=0)return e.segments({inverted:!1,regions:[]});function d(t){var s=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[s]})}for(var g=d(M[0]),r=1;r<M.length;r++)g=e.selectDifference(e.combine(g,d(M[r])));return g}if(A.type==="Polygon")return e.polygon(P(A.coordinates));if(A.type==="MultiPolygon"){for(var o=e.segments({inverted:!1,regions:[]}),L=0;L<A.coordinates.length;L++)o=e.selectUnion(e.combine(o,P(A.coordinates[L])));return e.polygon(o)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,A,P){P=e.polygon(e.segments(P));function o(u,l){return A.pointInsideRegion([(u[0][0]+u[1][0])*.5,(u[0][1]+u[1][1])*.5],l)}function L(u){return{region:u,children:[]}}var M=L(null);function d(u,l){for(var y=0;y<u.children.length;y++){var h=u.children[y];if(o(l,h.region)){d(h,l);return}}for(var T=L(l),y=0;y<u.children.length;y++){var h=u.children[y];o(h.region,l)&&(T.children.push(h),u.children.splice(y,1),y--)}u.children.push(T)}for(var g=0;g<P.regions.length;g++){var r=P.regions[g];r.length<3||d(M,r)}function t(u,l){for(var y=0,h=u[u.length-1][0],T=u[u.length-1][1],f=[],n=0;n<u.length;n++){var v=u[n][0],m=u[n][1];f.push([v,m]),y+=m*h-v*T,h=v,T=m}var b=y<0;return b!==l&&f.reverse(),f.push([f[0][0],f[0][1]]),f}var s=[];function a(u){var l=[t(u.region,!1)];s.push(l);for(var y=0;y<u.children.length;y++)l.push(c(u.children[y]))}function c(u){for(var l=0;l<u.children.length;l++)a(u.children[l]);return t(u.region,!0)}for(var g=0;g<M.children.length;g++)a(M.children[g]);return s.length<=0?{type:"Polygon",coordinates:[]}:s.length==1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s}}};te.exports=X},72200:function(te,X,e){var A=e(48088);function P(o,L,M){function d(T,f){return{id:M?M.segmentId():-1,start:T,end:f,myFill:{above:null,below:null},otherFill:null}}function g(T,f,n){return{id:M?M.segmentId():-1,start:T,end:f,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var r=A.create();function t(T,f,n,v,m,b){var E=L.pointsCompare(f,m);return E!==0?E:L.pointsSame(n,b)?0:T!==v?T?1:-1:L.pointAboveOrOnLine(n,v?m:b,v?b:m)?1:-1}function s(T,f){r.insertBefore(T,function(n){var v=t(T.isStart,T.pt,f,n.isStart,n.pt,n.other.pt);return v<0})}function a(T,f){var n=A.node({isStart:!0,pt:T.start,seg:T,primary:f,other:null,status:null});return s(n,T.end),n}function c(T,f,n){var v=A.node({isStart:!1,pt:f.end,seg:f,primary:n,other:T,status:null});T.other=v,s(v,T.pt)}function u(T,f){var n=a(T,f);return c(n,T,f),n}function l(T,f){M&&M.segmentChop(T.seg,f),T.other.remove(),T.seg.end=f,T.other.pt=f,s(T.other,T.pt)}function y(T,f){var n=g(f,T.seg.end,T.seg);return l(T,f),u(n,T.primary)}function h(T,f){var n=A.create();function v(_,z){var O=_.seg.start,F=_.seg.end,N=z.seg.start,V=z.seg.end;return L.pointsCollinear(O,N,V)?L.pointsCollinear(F,N,V)||L.pointAboveOrOnLine(F,N,V)?1:-1:L.pointAboveOrOnLine(O,N,V)?1:-1}function m(_){return n.findTransition(function(z){var O=v(_,z.ev);return O>0})}function b(_,z){var O=_.seg,F=z.seg,N=O.start,V=O.end,j=F.start,$=F.end;M&&M.checkIntersection(O,F);var q=L.linesIntersect(N,V,j,$);if(q===!1){if(!L.pointsCollinear(N,V,j)||L.pointsSame(N,$)||L.pointsSame(V,j))return!1;var oe=L.pointsSame(N,j),Z=L.pointsSame(V,$);if(oe&&Z)return z;var G=!oe&&L.pointBetween(N,j,$),re=!Z&&L.pointBetween(V,j,$);if(oe)return re?y(z,V):y(_,$),z;G&&(Z||(re?y(z,V):y(_,$)),y(z,N))}else q.alongA===0&&(q.alongB===-1?y(_,j):q.alongB===0?y(_,q.pt):q.alongB===1&&y(_,$)),q.alongB===0&&(q.alongA===-1?y(z,N):q.alongA===0?y(z,q.pt):q.alongA===1&&y(z,V));return!1}for(var E=[];!r.isEmpty();){var p=r.getHead();if(M&&M.vert(p.pt[0]),p.isStart){let _=function(){if(w){var z=b(p,w);if(z)return z}return i?b(p,i):!1};M&&M.segmentNew(p.seg,p.primary);var S=m(p),w=S.before?S.before.ev:null,i=S.after?S.after.ev:null;M&&M.tempStatus(p.seg,w?w.seg:!1,i?i.seg:!1);var C=_();if(C){if(o){var x;p.seg.myFill.below===null?x=!0:x=p.seg.myFill.above!==p.seg.myFill.below,x&&(C.seg.myFill.above=!C.seg.myFill.above)}else C.seg.otherFill=p.seg.myFill;M&&M.segmentUpdate(C.seg),p.other.remove(),p.remove()}if(r.getHead()!==p){M&&M.rewind(p.seg);continue}if(o){var x;p.seg.myFill.below===null?x=!0:x=p.seg.myFill.above!==p.seg.myFill.below,i?p.seg.myFill.below=i.seg.myFill.above:p.seg.myFill.below=T,x?p.seg.myFill.above=!p.seg.myFill.below:p.seg.myFill.above=p.seg.myFill.below}else if(p.seg.otherFill===null){var k;i?p.primary===i.primary?k=i.seg.otherFill.above:k=i.seg.myFill.above:k=p.primary?f:T,p.seg.otherFill={above:k,below:k}}M&&M.status(p.seg,w?w.seg:!1,i?i.seg:!1),p.other.status=S.insert(A.node({ev:p}))}else{var I=p.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(n.exists(I.prev)&&n.exists(I.next)&&b(I.prev.ev,I.next.ev),M&&M.statusRemove(I.ev.seg),I.remove(),!p.primary){var B=p.seg.myFill;p.seg.myFill=p.seg.otherFill,p.seg.otherFill=B}E.push(p.seg)}r.getHead().remove()}return M&&M.done(),E}return o?{addRegion:function(T){for(var f,n=T[T.length-1],v=0;v<T.length;v++){f=n,n=T[v];var m=L.pointsCompare(f,n);m!==0&&u(d(m<0?f:n,m<0?n:f),!0)}},calculate:function(T){return h(T,!1)}}:{calculate:function(T,f,n,v){return T.forEach(function(m){u(g(m.start,m.end,m),!0)}),n.forEach(function(m){u(g(m.start,m.end,m),!1)}),h(f,v)}}}te.exports=P},48088:function(te){var X={create:function(){var e={root:{root:!0,next:null},exists:function(A){return!(A===null||A===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(A,P){for(var o=e.root,L=e.root.next;L!==null;){if(P(L)){A.prev=L.prev,A.next=L,L.prev.next=A,L.prev=A;return}o=L,L=L.next}o.next=A,A.prev=o,A.next=null},findTransition:function(A){for(var P=e.root,o=e.root.next;o!==null&&!A(o);)P=o,o=o.next;return{before:P===e.root?null:P,after:o,insert:function(L){return L.prev=P,L.next=o,P.next=L,o!==null&&(o.prev=L),L}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};te.exports=X},11403:function(te){function X(e,A,P){var o=[],L=[];return e.forEach(function(M){var d=M.start,g=M.end;if(A.pointsSame(d,g)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}P&&P.chainStart(M);var r={index:0,matches_head:!1,matches_pt1:!1},t={index:0,matches_head:!1,matches_pt1:!1},s=r;function a(C,x,k){return s.index=C,s.matches_head=x,s.matches_pt1=k,s===r?(s=t,!1):(s=null,!0)}for(var c=0;c<o.length;c++){var u=o[c],l=u[0];u[1];var y=u[u.length-1];if(u[u.length-2],A.pointsSame(l,d)){if(a(c,!0,!0))break}else if(A.pointsSame(l,g)){if(a(c,!0,!1))break}else if(A.pointsSame(y,d)){if(a(c,!1,!0))break}else if(A.pointsSame(y,g)&&a(c,!1,!1))break}if(s===r){o.push([d,g]),P&&P.chainNew(d,g);return}if(s===t){P&&P.chainMatch(r.index);var h=r.index,T=r.matches_pt1?g:d,f=r.matches_head,u=o[h],n=f?u[0]:u[u.length-1],v=f?u[1]:u[u.length-2],m=f?u[u.length-1]:u[0],b=f?u[u.length-2]:u[1];if(A.pointsCollinear(v,n,T)&&(f?(P&&P.chainRemoveHead(r.index,T),u.shift()):(P&&P.chainRemoveTail(r.index,T),u.pop()),n=v),A.pointsSame(m,T)){o.splice(h,1),A.pointsCollinear(b,m,n)&&(f?(P&&P.chainRemoveTail(r.index,n),u.pop()):(P&&P.chainRemoveHead(r.index,n),u.shift())),P&&P.chainClose(r.index),L.push(u);return}f?(P&&P.chainAddHead(r.index,T),u.unshift(T)):(P&&P.chainAddTail(r.index,T),u.push(T));return}function E(C){P&&P.chainReverse(C),o[C].reverse()}function p(C,x){var k=o[C],I=o[x],B=k[k.length-1],_=k[k.length-2],z=I[0],O=I[1];A.pointsCollinear(_,B,z)&&(P&&P.chainRemoveTail(C,B),k.pop(),B=_),A.pointsCollinear(B,z,O)&&(P&&P.chainRemoveHead(x,z),I.shift()),P&&P.chainJoin(C,x),o[C]=k.concat(I),o.splice(x,1)}var S=r.index,w=t.index;P&&P.chainConnect(S,w);var i=o[S].length<o[w].length;r.matches_head?t.matches_head?i?(E(S),p(S,w)):(E(w),p(w,S)):p(w,S):t.matches_head?p(S,w):i?(E(S),p(w,S)):(E(w),p(S,w))}),L}te.exports=X},82368:function(te){function X(A,P,o){var L=[];return A.forEach(function(M){var d=(M.myFill.above?8:0)+(M.myFill.below?4:0)+(M.otherFill&&M.otherFill.above?2:0)+(M.otherFill&&M.otherFill.below?1:0);P[d]!==0&&L.push({id:o?o.segmentId():-1,start:M.start,end:M.end,myFill:{above:P[d]===1,below:P[d]===2},otherFill:null})}),o&&o.selected(L),L}var e={union:function(A,P){return X(A,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],P)},intersect:function(A,P){return X(A,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],P)},difference:function(A,P){return X(A,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],P)},differenceRev:function(A,P){return X(A,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],P)},xor:function(A,P){return X(A,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],P)}};te.exports=e},9696:function(te,X,e){var A=e(29936).Transform,P=e(55619);function o(){A.call(this,{readableObjectMode:!0})}o.prototype=Object.create(A.prototype),o.prototype.constructor=o,P(o.prototype),X.gS=function(M,d,g){for(var r=d,t=0;t<g.length;)if(M[r++]!==g[t++])return!1;return!0},X.wR=function(M,d){var g=[],r=0;if(d&&d==="hex")for(;r<M.length;)g.push(parseInt(M.slice(r,r+2),16)),r+=2;else for(;r<M.length;r++)g.push(M.charCodeAt(r)&255);return g},X.Bz=function(M,d){return M[d]|M[d+1]<<8},X.eW=function(M,d){return M[d+1]|M[d]<<8},X.st=function(M,d){return M[d]|M[d+1]<<8|M[d+2]<<16|M[d+3]*16777216},X.eI=function(M,d){return M[d+3]|M[d+2]<<8|M[d+1]<<16|M[d]*16777216};function L(M,d,g){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=M,d&&(this.code=d),g&&(this.statusCode=g)}L.prototype=Object.create(Error.prototype),L.prototype.constructor=L},11688:function(te){function X(P,o){var L=new Error(P);return L.code=o,L}function e(P){try{return decodeURIComponent(escape(P))}catch{return P}}function A(P,o,L){this.input=P.subarray(o,L),this.start=o;var M=String.fromCharCode.apply(null,this.input.subarray(0,4));if(M!=="II*\0"&&M!=="MM\0*")throw X("invalid TIFF signature","EBADDATA");this.big_endian=M[0]==="M"}A.prototype.each=function(P){this.aborted=!1;var o=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:o}];this.ifds_to_read.length>0&&!this.aborted;){var L=this.ifds_to_read.shift();L.offset&&this.scan_ifd(L.id,L.offset,P)}},A.prototype.read_uint16=function(P){var o=this.input;if(P+2>o.length)throw X("unexpected EOF","EBADDATA");return this.big_endian?o[P]*256+o[P+1]:o[P]+o[P+1]*256},A.prototype.read_uint32=function(P){var o=this.input;if(P+4>o.length)throw X("unexpected EOF","EBADDATA");return this.big_endian?o[P]*16777216+o[P+1]*65536+o[P+2]*256+o[P+3]:o[P]+o[P+1]*256+o[P+2]*65536+o[P+3]*16777216},A.prototype.is_subifd_link=function(P,o){return P===0&&o===34665||P===0&&o===34853||P===34665&&o===40965},A.prototype.exif_format_length=function(P){switch(P){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}},A.prototype.exif_format_read=function(P,o){var L;switch(P){case 1:case 2:return L=this.input[o],L;case 6:return L=this.input[o],L|(L&128)*33554430;case 3:return L=this.read_uint16(o),L;case 8:return L=this.read_uint16(o),L|(L&32768)*131070;case 4:return L=this.read_uint32(o),L;case 9:return L=this.read_uint32(o),L|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},A.prototype.scan_ifd=function(P,o,L){var M=this.read_uint16(o);o+=2;for(var d=0;d<M;d++){var g=this.read_uint16(o),r=this.read_uint16(o+2),t=this.read_uint32(o+4),s=this.exif_format_length(r),a=t*s,c=a<=4?o+8:this.read_uint32(o+8),u=!1;if(c+a>this.input.length)throw X("unexpected EOF","EBADDATA");for(var l=[],y=c,h=0;h<t;h++,y+=s){var T=this.exif_format_read(r,y);if(T===null){l=null;break}l.push(T)}Array.isArray(l)&&r===2&&(l=e(String.fromCharCode.apply(null,l)),l&&l[l.length-1]==="\0"&&(l=l.slice(0,-1))),this.is_subifd_link(P,g)&&Array.isArray(l)&&Number.isInteger(l[0])&&l[0]>0&&(this.ifds_to_read.push({id:g,offset:l[0]}),u=!0);var f={is_big_endian:this.big_endian,ifd:P,tag:g,format:r,count:t,entry_offset:o+this.start,data_length:a,data_offset:c+this.start,value:l,is_subifd_link:u};if(L(f)===!1){this.aborted=!0;return}o+=12}P===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(o)})},te.exports.ExifParser=A,te.exports.get_orientation=function(P){var o=0;try{return new A(P,0,P.length).each(function(L){if(L.ifd===0&&L.tag===274&&Array.isArray(L.value))return o=L.value[0],!1}),o}catch{return-1}}},44600:function(te,X,e){var A=e(9696).eW,P=e(9696).eI;function o(a,c){if(a.length<4+c)return null;var u=P(a,c);return a.length<u+c||u<8?null:{boxtype:String.fromCharCode.apply(null,a.slice(c+4,c+8)),data:a.slice(c+8,c+u),end:c+u}}te.exports.unbox=o;function L(a,c){for(var u=0;;){var l=o(a,u);if(!l)break;switch(l.boxtype){case"ispe":c.sizes.push({width:P(l.data,4),height:P(l.data,8)});break;case"irot":c.transforms.push({type:"irot",value:l.data[0]&3});break;case"imir":c.transforms.push({type:"imir",value:l.data[0]&1});break}u=l.end}}function M(a,c,u){for(var l=0,y=0;y<u;y++)l=l*256+(a[c+y]||0);return l}function d(a,c){for(var u=a[4]>>4&15,l=a[4]&15,y=a[5]>>4&15,h=A(a,6),T=8,f=0;f<h;f++){var n=A(a,T);T+=2;var v=A(a,T);T+=2;var m=M(a,T,y);T+=y;var b=A(a,T);if(T+=2,v===0&&b===1){var E=M(a,T,u),p=M(a,T+u,l);c.item_loc[n]={length:p,offset:E+m}}T+=b*(u+l)}}function g(a,c){for(var u=A(a,4),l=6,y=0;y<u;y++){var h=o(a,l);if(!h)break;if(h.boxtype==="infe"){for(var T=A(h.data,4),f="",n=8;n<h.data.length&&h.data[n];n++)f+=String.fromCharCode(h.data[n]);c.item_inf[f]=T}l=h.end}}function r(a,c){for(var u=0;;){var l=o(a,u);if(!l)break;l.boxtype==="ipco"&&L(l.data,c),u=l.end}}function t(a,c){for(var u=4;;){var l=o(a,u);if(!l)break;l.boxtype==="iprp"&&r(l.data,c),l.boxtype==="iloc"&&d(l.data,c),l.boxtype==="iinf"&&g(l.data,c),u=l.end}}function s(a){var c=a.reduce(function(y,h){return y.width>h.width||y.width===h.width&&y.height>h.height?y:h}),u=a.reduce(function(y,h){return y.height>h.height||y.height===h.height&&y.width>h.width?y:h}),l;return c.width>u.height||c.width===u.height&&c.height>u.width?l=c:l=u,l}te.exports.readSizeFromMeta=function(a){var c={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(t(a,c),!!c.sizes.length){var u=s(c.sizes),l=1;c.transforms.forEach(function(h){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},f={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(h.type==="imir"&&(h.value===0?l=f[l]:(l=f[l],l=T[l],l=T[l])),h.type==="irot")for(var n=0;n<h.value;n++)l=T[l]});var y=null;return c.item_inf.Exif&&(y=c.item_loc[c.item_inf.Exif]),{width:u.width,height:u.height,orientation:c.transforms.length?l:null,variants:c.sizes,exif_location:y}}},te.exports.getMimeType=function(a){var c=String.fromCharCode.apply(null,a.slice(0,4)),u={};u[c]=!0;for(var l=8;l<a.length;l+=4)u[String.fromCharCode.apply(null,a.slice(l,l+4))]=!0;if(!(!u.mif1&&!u.msf1&&!u.miaf))return c==="avif"||c==="avis"||c==="avio"?{type:"avif",mime:"image/avif"}:c==="heic"||c==="heix"?{type:"heic",mime:"image/heic"}:c==="hevc"||c==="hevx"?{type:"heic",mime:"image/heic-sequence"}:u.avif||u.avis?{type:"avif",mime:"image/avif"}:u.heic||u.heix||u.hevc||u.hevx||u.heis?u.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},40528:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).eI,L=e(44600),M=e(11688),d=A("ftyp");te.exports=function(g){if(P(g,4,d)){var r=L.unbox(g,0);if(r){var t=L.getMimeType(r.data);if(t){for(var s,a=r.end;;){var c=L.unbox(g,a);if(!c)break;if(a=c.end,c.boxtype==="mdat")return;if(c.boxtype==="meta"){s=c.data;break}}if(s){var u=L.readSizeFromMeta(s);if(u){var l={width:u.width,height:u.height,type:t.type,mime:t.mime,wUnits:"px",hUnits:"px"};if(u.variants.length>1&&(l.variants=u.variants),u.orientation&&(l.orientation=u.orientation),u.exif_location&&u.exif_location.offset+u.exif_location.length<=g.length){var y=o(g,u.exif_location.offset),h=g.slice(u.exif_location.offset+y+4,u.exif_location.offset+u.exif_location.length),T=M.get_orientation(h);T>0&&(l.orientation=T)}return l}}}}}}},38728:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).Bz,L=A("BM");te.exports=function(M){if(!(M.length<26)&&P(M,0,L))return{width:o(M,18),height:o(M,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).Bz,L=A("GIF87a"),M=A("GIF89a");te.exports=function(d){if(!(d.length<10)&&!(!P(d,0,L)&&!P(d,0,M)))return{width:o(d,6),height:o(d,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(te,X,e){var A=e(9696).Bz,P=0,o=1,L=16;te.exports=function(M){var d=A(M,0),g=A(M,2),r=A(M,4);if(!(d!==P||g!==o||!r)){for(var t=[],s={width:0,height:0},a=0;a<r;a++){var c=M[6+L*a]||256,u=M[6+L*a+1]||256,l={width:c,height:u};t.push(l),(c>s.width||u>s.height)&&(s=l)}return{width:s.width,height:s.height,variants:t,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(te,X,e){var A=e(9696).eW,P=e(9696).wR,o=e(9696).gS,L=e(11688),M=P("Exif\0\0");te.exports=function(d){if(!(d.length<2)&&!(d[0]!==255||d[1]!==216||d[2]!==255))for(var g=2;;){for(;;){if(d.length-g<2)return;if(d[g++]===255)break}for(var r=d[g++],t;r===255;)r=d[g++];if(208<=r&&r<=217||r===1)t=0;else if(192<=r&&r<=254){if(d.length-g<2)return;t=A(d,g)-2,g+=2}else return;if(r===217||r===218)return;var s;if(r===225&&t>=10&&o(d,g,M)&&(s=L.get_orientation(d.slice(g+6,g+t))),t>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(d.length-g<t)return;var a={width:A(d,g+3),height:A(d,g+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return s>0&&(a.orientation=s),a}g+=t}}},37276:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).eI,L=A(`‰PNG\r

`),M=A("IHDR");te.exports=function(d){if(!(d.length<24)&&P(d,0,L)&&P(d,12,M))return{width:o(d,16),height:o(d,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).eI,L=A("8BPS\0");te.exports=function(M){if(!(M.length<22)&&P(M,0,L))return{width:o(M,18),height:o(M,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(te){function X(s){return s===32||s===9||s===13||s===10}function e(s){return typeof s=="number"&&isFinite(s)&&s>0}function A(s){var a=0,c=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(a=3);a<c&&X(s[a]);)a++;return a===c?!1:s[a]===60}var P=/<[-_.:a-zA-Z0-9][^>]*>/,o=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,L=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,M=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,d=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,g=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(s){var a=s.match(L),c=s.match(M),u=s.match(d);return{width:a&&(a[1]||a[2]),height:c&&(c[1]||c[2]),viewbox:u&&(u[1]||u[2])}}function t(s){return g.test(s)?s.match(g)[0]:"px"}te.exports=function(s){if(A(s)){for(var a="",c=0;c<s.length;c++)a+=String.fromCharCode(s[c]);var u=(a.match(P)||[""])[0];if(o.test(u)){var l=r(u),y=parseFloat(l.width),h=parseFloat(l.height);if(l.width&&l.height)return!e(y)||!e(h)?void 0:{width:y,height:h,type:"svg",mime:"image/svg+xml",wUnits:t(l.width),hUnits:t(l.height)};var T=(l.viewbox||"").split(" "),f={width:T[2],height:T[3]},n=parseFloat(f.width),v=parseFloat(f.height);if(!(!e(n)||!e(v))&&t(f.width)===t(f.height)){var m=n/v;return l.width?e(y)?{width:y,height:y/m,type:"svg",mime:"image/svg+xml",wUnits:t(l.width),hUnits:t(l.width)}:void 0:l.height?e(h)?{width:h*m,height:h,type:"svg",mime:"image/svg+xml",wUnits:t(l.height),hUnits:t(l.height)}:void 0:{width:n,height:v,type:"svg",mime:"image/svg+xml",wUnits:t(f.width),hUnits:t(f.height)}}}}}},98792:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).Bz,L=e(9696).eW,M=e(9696).st,d=e(9696).eI,g=A("II*\0"),r=A("MM\0*");function t(c,u,l){return l?L(c,u):o(c,u)}function s(c,u,l){return l?d(c,u):M(c,u)}function a(c,u,l){var y=t(c,u+2,l),h=s(c,u+4,l);return h!==1||y!==3&&y!==4?null:y===3?t(c,u+8,l):s(c,u+8,l)}te.exports=function(c){if(!(c.length<8)&&!(!P(c,0,g)&&!P(c,0,r))){var u=c[0]===77,l=s(c,4,u)-8;if(!(l<0)){var y=l+8;if(!(c.length-y<2)){var h=t(c,y+0,u)*12;if(!(h<=0)&&(y+=2,!(c.length-y<h))){var T,f,n,v;for(T=0;T<h;T+=12)v=t(c,y+T,u),v===256?f=a(c,y+T,u):v===257&&(n=a(c,y+T,u));if(f&&n)return{width:f,height:n,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}},20704:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).Bz,L=e(9696).st,M=e(11688),d=A("RIFF"),g=A("WEBP");function r(a,c){if(!(a[c+3]!==157||a[c+4]!==1||a[c+5]!==42))return{width:o(a,c+6)&16383,height:o(a,c+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function t(a,c){if(a[c]===47){var u=L(a,c+1);return{width:(u&16383)+1,height:(u>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function s(a,c){return{width:(a[c+6]<<16|a[c+5]<<8|a[c+4])+1,height:(a[c+9]<<c|a[c+8]<<8|a[c+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}te.exports=function(a){if(!(a.length<16)&&!(!P(a,0,d)&&!P(a,8,g))){var c=12,u=null,l=0,y=L(a,4)+8;if(!(y>a.length)){for(;c+8<y;){if(a[c]===0){c++;continue}var h=String.fromCharCode.apply(null,a.slice(c,c+4)),T=L(a,c+4);h==="VP8 "&&T>=10?u=u||r(a,c+8):h==="VP8L"&&T>=9?u=u||t(a,c+8):h==="VP8X"&&T>=10?u=u||s(a,c+8):h==="EXIF"&&(l=M.get_orientation(a.slice(c+8,c+8+T)),c=1/0),c+=8+T}if(u)return l>0&&(u.orientation=l),u}}}},87480:function(te,X,e){te.exports={avif:e(40528),bmp:e(38728),gif:e(5588),ico:e(41924),jpeg:e(87968),png:e(37276),psd:e(90328),svg:e(16024),tiff:e(98792),webp:e(20704)}},19480:function(te,X,e){var A=e(87480);function P(o){for(var L=Object.keys(A),M=0;M<L.length;M++){var d=A[L[M]](o);if(d)return d}return null}te.exports=function(L){return P(L)},te.exports.parsers=A},4168:function(te){var X=te.exports={},e,A;function P(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=P}catch{e=P}try{typeof clearTimeout=="function"?A=clearTimeout:A=o}catch{A=o}})();function L(l){if(e===setTimeout)return setTimeout(l,0);if((e===P||!e)&&setTimeout)return e=setTimeout,setTimeout(l,0);try{return e(l,0)}catch{try{return e.call(null,l,0)}catch{return e.call(this,l,0)}}}function M(l){if(A===clearTimeout)return clearTimeout(l);if((A===o||!A)&&clearTimeout)return A=clearTimeout,clearTimeout(l);try{return A(l)}catch{try{return A.call(null,l)}catch{return A.call(this,l)}}}var d=[],g=!1,r,t=-1;function s(){!g||!r||(g=!1,r.length?d=r.concat(d):t=-1,d.length&&a())}function a(){if(!g){var l=L(s);g=!0;for(var y=d.length;y;){for(r=d,d=[];++t<y;)r&&r[t].run();t=-1,y=d.length}r=null,g=!1,M(l)}}X.nextTick=function(l){var y=new Array(arguments.length-1);if(arguments.length>1)for(var h=1;h<arguments.length;h++)y[h-1]=arguments[h];d.push(new c(l,y)),d.length===1&&!g&&L(a)};function c(l,y){this.fun=l,this.array=y}c.prototype.run=function(){this.fun.apply(null,this.array)},X.title="browser",X.browser=!0,X.env={},X.argv=[],X.version="",X.versions={};function u(){}X.on=u,X.addListener=u,X.once=u,X.off=u,X.removeListener=u,X.removeAllListeners=u,X.emit=u,X.prependListener=u,X.prependOnceListener=u,X.listeners=function(l){return[]},X.binding=function(l){throw new Error("process.binding is not supported")},X.cwd=function(){return"/"},X.chdir=function(l){throw new Error("process.chdir is not supported")},X.umask=function(){return 0}},3951:function(te,X,e){for(var A=e(41984),P=typeof window>"u"?e.g:window,o=["moz","webkit"],L="AnimationFrame",M=P["request"+L],d=P["cancel"+L]||P["cancelRequest"+L],g=0;!M&&g<o.length;g++)M=P[o[g]+"Request"+L],d=P[o[g]+"Cancel"+L]||P[o[g]+"CancelRequest"+L];if(!M||!d){var r=0,t=0,s=[],a=1e3/60;M=function(c){if(s.length===0){var u=A(),l=Math.max(0,a-(u-r));r=l+u,setTimeout(function(){var y=s.slice(0);s.length=0;for(var h=0;h<y.length;h++)if(!y[h].cancelled)try{y[h].callback(r)}catch(T){setTimeout(function(){throw T},0)}},Math.round(l))}return s.push({handle:++t,callback:c,cancelled:!1}),t},d=function(c){for(var u=0;u<s.length;u++)s[u].handle===c&&(s[u].cancelled=!0)}}te.exports=function(c){return M.call(P,c)},te.exports.cancel=function(){d.apply(P,arguments)},te.exports.polyfill=function(c){c||(c=P),c.requestAnimationFrame=M,c.cancelAnimationFrame=d}},24544:function(te,X,e){var A=e(76752),P=e(72160),o=e(45223),L=e(55616),M=e(50896),d=e(47520),g=e(37816),r=g.float32,t=g.fract32;te.exports=a;var s=[[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]];function a(c,u){if(typeof c=="function"?(u||(u={}),u.regl=c):u=c,u.length&&(u.positions=u),c=u.regl,!c.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var l=c._gl,y,h,T,f,n,v,m={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},b=[];return f=c.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),h=c.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),T=c.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),n=c.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=c.buffer({usage:"static",type:"float",data:s}),w(u),y=c({vert:`
precision highp float;
attribute vec2 position, positionFract;
attribute vec4 error;
attribute vec4 color;
attribute vec2 direction, lineOffset, capOffset;
uniform vec4 viewport;
uniform float lineWidth, capSize;
uniform vec2 scale, scaleFract, translate, translateFract;
varying vec4 fragColor;
void main() {
fragColor = color / 255.;
vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;
vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;
vec2 position = position + dxy;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
pos += pixelOffset / viewport.zw;
gl_Position = vec4(pos * 2. - 1., 0, 1);
}
`,frag:`
precision highp float;
varying vec4 fragColor;
uniform float opacity;
void main() {
gl_FragColor = fragColor;
gl_FragColor.a *= opacity;
}
`,uniforms:{range:c.prop("range"),lineWidth:c.prop("lineWidth"),capSize:c.prop("capSize"),opacity:c.prop("opacity"),scale:c.prop("scale"),translate:c.prop("translate"),scaleFract:c.prop("scaleFract"),translateFract:c.prop("translateFract"),viewport:function(C,x){return[x.viewport.x,x.viewport.y,C.viewportWidth,C.viewportHeight]}},attributes:{color:{buffer:f,offset:function(C,x){return x.offset*4},divisor:1},position:{buffer:h,offset:function(C,x){return x.offset*8},divisor:1},positionFract:{buffer:T,offset:function(C,x){return x.offset*8},divisor:1},error:{buffer:n,offset:function(C,x){return x.offset*16},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:c.prop("viewport")},viewport:c.prop("viewport"),stencil:!1,instances:c.prop("count"),count:s.length}),M(E,{update:w,draw:p,destroy:i,regl:c,gl:l,canvas:l.canvas,groups:b}),E;function E(C){C?w(C):C===null&&i(),p()}function p(C){if(typeof C=="number")return S(C);C&&!Array.isArray(C)&&(C=[C]),c._refresh(),b.forEach(function(x,k){if(x){if(C&&(C[k]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}S(k)}})}function S(C){typeof C=="number"&&(C=b[C]),C!=null&&C&&C.count&&C.color&&C.opacity&&C.positions&&C.positions.length>1&&(C.scaleRatio=[C.scale[0]*C.viewport.width,C.scale[1]*C.viewport.height],y(C),C.after&&C.after(C))}function w(C){if(C){C.length!=null?typeof C[0]=="number"&&(C=[{positions:C}]):Array.isArray(C)||(C=[C]);var x=0,k=0;if(E.groups=b=C.map(function(N,V){var j=b[V];if(N)typeof N=="function"?N={after:N}:typeof N[0]=="number"&&(N={positions:N});else return j;return N=L(N,{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"}),j||(b[V]=j={id:V,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},N=M({},m,N)),o(j,N,[{lineWidth:function($){return+$*.5},capSize:function($){return+$*.5},opacity:parseFloat,errors:function($){return $=d($),k+=$.length,$},positions:function($,q){return $=d($,"float64"),q.count=Math.floor($.length/2),q.bounds=A($,2),q.offset=x,x+=q.count,$}},{color:function($,q){var oe=q.count;if($||($="transparent"),!Array.isArray($)||typeof $[0]=="number"){var Z=$;$=Array(oe);for(var G=0;G<oe;G++)$[G]=Z}if($.length<oe)throw Error("Not enough colors");for(var re=new Uint8Array(oe*4),H=0;H<oe;H++){var J=P($[H],"uint8");re.set(J,H*4)}return re},range:function($,q,oe){var Z=q.bounds;return $||($=Z),q.scale=[1/($[2]-$[0]),1/($[3]-$[1])],q.translate=[-$[0],-$[1]],q.scaleFract=t(q.scale),q.translateFract=t(q.translate),$},viewport:function($){var q;return Array.isArray($)?q={x:$[0],y:$[1],width:$[2]-$[0],height:$[3]-$[1]}:$?(q={x:$.x||$.left||0,y:$.y||$.top||0},$.right?q.width=$.right-q.x:q.width=$.w||$.width||0,$.bottom?q.height=$.bottom-q.y:q.height=$.h||$.height||0):q={x:0,y:0,width:l.drawingBufferWidth,height:l.drawingBufferHeight},q}}]),j}),x||k){var I=b.reduce(function(N,V,j){return N+(V?V.count:0)},0),B=new Float64Array(I*2),_=new Uint8Array(I*4),z=new Float32Array(I*4);b.forEach(function(N,V){if(N){var j=N.positions,$=N.count,q=N.offset,oe=N.color,Z=N.errors;$&&(_.set(oe,q*4),z.set(Z,q*4),B.set(j,q*2))}});var O=r(B);h(O);var F=t(B,O);T(F),f(_),n(z)}}}function i(){h.destroy(),T.destroy(),f.destroy(),n.destroy(),v.destroy()}}},13472:function(te,X,e){var A=e(72160),P=e(76752),o=e(50896),L=e(55616),M=e(47520),d=e(28912),g=e(71152),r=e(37816),t=r.float32,s=r.fract32,a=e(60463),c=e(51160),u=e(10272),l=`
precision highp float;
attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
attribute vec4 color;
attribute float lineEnd, lineTop;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
varying vec4 fragColor;
varying vec2 tangent;
vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
// the order is important
return position * scale + translate
+ positionFract * scale + translateFract
+ position * scaleFract
+ positionFract * scaleFract;
}
void main() {
float lineStart = 1. - lineEnd;
float lineOffset = lineTop * 2. - 1.;
vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
tangent = normalize(diff * scale * viewport.zw);
vec2 normal = vec2(-tangent.y, tangent.x);
vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd
+ thickness * normal * .5 * lineOffset / viewport.zw;
gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
fragColor = color / 255.;
}
`,y=`
precision highp float;
uniform float dashLength, pixelRatio, thickness, opacity, id;
uniform sampler2D dashTexture;
varying vec4 fragColor;
varying vec2 tangent;
void main() {
float alpha = 1.;
float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
float dash = texture2D(dashTexture, vec2(t, .5)).r;
gl_FragColor = fragColor;
gl_FragColor.a *= alpha * opacity * dash;
}
`,h=`
precision highp float;
attribute vec2 position, positionFract;
uniform vec4 color;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float pixelRatio, id;
uniform vec4 viewport;
uniform float opacity;
varying vec4 fragColor;
const float MAX_LINES = 256.;
void main() {
float depth = (MAX_LINES - 4. - id) / (MAX_LINES);
vec2 position = position * scale + translate
+ positionFract * scale + translateFract
+ position * scaleFract
+ positionFract * scaleFract;
gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
fragColor = color / 255.;
fragColor.a *= opacity;
}
`,T=`
precision highp float;
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}
`,f=`
precision highp float;
attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
attribute vec4 aColor, bColor;
attribute float lineEnd, lineTop;
uniform vec2 scale, translate;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
uniform float miterLimit, miterMode;
varying vec4 fragColor;
varying vec4 startCutoff, endCutoff;
varying vec2 tangent;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;
const float REVERSE_THRESHOLD = -.875;
const float MIN_DIFF = 1e-6;
// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
// TODO: precalculate dot products, normalize things beforehead etc.
// TODO: refactor to rectangular algorithm
float distToLine(vec2 p, vec2 a, vec2 b) {
vec2 diff = b - a;
vec2 perp = normalize(vec2(-diff.y, diff.x));
return dot(p - a, perp);
}
bool isNaN( float val ){
return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
}
void main() {
vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;
vec2 adjustedScale;
adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;
vec2 scaleRatio = adjustedScale * viewport.zw;
vec2 normalWidth = thickness / scaleRatio;
float lineStart = 1. - lineEnd;
float lineBot = 1. - lineTop;
fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;
if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;
if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);
vec2 prevDiff = aCoord - prevCoord;
vec2 currDiff = bCoord - aCoord;
vec2 nextDiff = nextCoord - bCoord;
vec2 prevTangent = normalize(prevDiff * scaleRatio);
vec2 currTangent = normalize(currDiff * scaleRatio);
vec2 nextTangent = normalize(nextDiff * scaleRatio);
vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
vec2 currNormal = vec2(-currTangent.y, currTangent.x);
vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);
vec2 startJoinDirection = normalize(prevTangent - currTangent);
vec2 endJoinDirection = normalize(currTangent - nextTangent);
// collapsed/unidirectional segment cases
// FIXME: there should be more elegant solution
vec2 prevTanDiff = abs(prevTangent - currTangent);
vec2 nextTanDiff = abs(nextTangent - currTangent);
if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
startJoinDirection = currNormal;
}
if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
endJoinDirection = currNormal;
}
if (aCoord == bCoord) {
endJoinDirection = startJoinDirection;
currNormal = prevNormal;
currTangent = prevTangent;
}
tangent = currTangent;
//calculate join shifts relative to normals
float startJoinShift = dot(currNormal, startJoinDirection);
float endJoinShift = dot(currNormal, endJoinDirection);
float startMiterRatio = abs(1. / startJoinShift);
float endMiterRatio = abs(1. / endJoinShift);
vec2 startJoin = startJoinDirection * startMiterRatio;
vec2 endJoin = endJoinDirection * endMiterRatio;
vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
startTopJoin = sign(startJoinShift) * startJoin * .5;
startBotJoin = -startTopJoin;
endTopJoin = sign(endJoinShift) * endJoin * .5;
endBotJoin = -endTopJoin;
vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
vec2 bBotCoord = bCoord + normalWidth * endBotJoin;
//miter anti-clipping
float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));
//prevent close to reverse direction switch
bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);
bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);
if (prevReverse) {
//make join rectangular
vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
}
else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {
//handle miter clipping
bTopCoord -= normalWidth * endTopJoin;
bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;
}
if (nextReverse) {
//make join rectangular
vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;
float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);
bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
}
else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {
//handle miter clipping
aBotCoord -= normalWidth * startBotJoin;
aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;
}
vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;
vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;
vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;
vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;
//position is normalized 0..1 coord on the screen
vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;
startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;
endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;
gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
enableStartMiter = step(dot(currTangent, prevTangent), .5);
enableEndMiter = step(dot(currTangent, nextTangent), .5);
//bevel miter cutoffs
if (miterMode == 1.) {
if (enableStartMiter == 1.) {
vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;
startCutoff = vec4(aCoord, aCoord);
startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
startCutoff += viewport.xyxy;
startCutoff += startMiterWidth.xyxy;
}
if (enableEndMiter == 1.) {
vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;
endCutoff = vec4(bCoord, bCoord);
endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;
endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
endCutoff += viewport.xyxy;
endCutoff += endMiterWidth.xyxy;
}
}
//round miter cutoffs
else if (miterMode == 2.) {
if (enableStartMiter == 1.) {
vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;
startCutoff = vec4(aCoord, aCoord);
startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
startCutoff += viewport.xyxy;
startCutoff += startMiterWidth.xyxy;
}
if (enableEndMiter == 1.) {
vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;
endCutoff = vec4(bCoord, bCoord);
endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;
endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
endCutoff += viewport.xyxy;
endCutoff += endMiterWidth.xyxy;
}
}
}
`,n=`
precision highp float;
uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;
uniform sampler2D dashTexture;
varying vec4 fragColor;
varying vec2 tangent;
varying vec4 startCutoff, endCutoff;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;
float distToLine(vec2 p, vec2 a, vec2 b) {
vec2 diff = b - a;
vec2 perp = normalize(vec2(-diff.y, diff.x));
return dot(p - a, perp);
}
void main() {
float alpha = 1., distToStart, distToEnd;
float cutoff = thickness * .5;
//bevel miter
if (miterMode == 1.) {
if (enableStartMiter == 1.) {
distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
if (distToStart < -1.) {
discard;
return;
}
alpha *= min(max(distToStart + 1., 0.), 1.);
}
if (enableEndMiter == 1.) {
distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
if (distToEnd < -1.) {
discard;
return;
}
alpha *= min(max(distToEnd + 1., 0.), 1.);
}
}
// round miter
else if (miterMode == 2.) {
if (enableStartMiter == 1.) {
distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
if (distToStart < 0.) {
float radius = length(gl_FragCoord.xy - startCoord);
if(radius > cutoff + .5) {
discard;
return;
}
alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
}
}
if (enableEndMiter == 1.) {
distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
if (distToEnd < 0.) {
float radius = length(gl_FragCoord.xy - endCoord);
if(radius > cutoff + .5) {
discard;
return;
}
alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
}
}
}
float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
float dash = texture2D(dashTexture, vec2(t, .5)).r;
gl_FragColor = fragColor;
gl_FragColor.a *= alpha * opacity * dash;
}
`;te.exports=v;function v(m,b){if(!(this instanceof v))return new v(m,b);if(typeof m=="function"?(b||(b={}),b.regl=m):b=m,b.length&&(b.positions=b),m=b.regl,!m.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=m._gl,this.regl=m,this.passes=[],this.shaders=v.shaders.has(m)?v.shaders.get(m):v.shaders.set(m,v.createShaders(m)).get(m),this.update(b)}v.dashMult=2,v.maxPatternLength=256,v.precisionThreshold=3e6,v.maxPoints=1e4,v.maxLines=2048,v.shaders=new a,v.createShaders=function(m){var b=m.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),E={primitive:"triangle strip",instances:m.prop("count"),count:4,offset:0,uniforms:{miterMode:function(i,C){return C.join==="round"?2:1},miterLimit:m.prop("miterLimit"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translateFract:m.prop("translateFract"),translate:m.prop("translate"),thickness:m.prop("thickness"),dashTexture:m.prop("dashTexture"),opacity:m.prop("opacity"),pixelRatio:m.context("pixelRatio"),id:m.prop("id"),dashLength:m.prop("dashLength"),viewport:function(i,C){return[C.viewport.x,C.viewport.y,i.viewportWidth,i.viewportHeight]},depth:m.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(i,C){return!C.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport")},p=m(o({vert:l,frag:y,attributes:{lineEnd:{buffer:b,divisor:0,stride:8,offset:0},lineTop:{buffer:b,divisor:0,stride:8,offset:4},aCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:m.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:m.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:m.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},E)),S;try{S=m(o({cull:{enable:!0,face:"back"},vert:f,frag:n,attributes:{lineEnd:{buffer:b,divisor:0,stride:8,offset:0},lineTop:{buffer:b,divisor:0,stride:8,offset:4},aColor:{buffer:m.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:m.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},E))}catch{S=p}var w=m({primitive:"triangle",elements:function(i,C){return C.triangles},offset:0,vert:h,frag:T,uniforms:{scale:m.prop("scale"),color:m.prop("fill"),scaleFract:m.prop("scaleFract"),translateFract:m.prop("translateFract"),translate:m.prop("translate"),opacity:m.prop("opacity"),pixelRatio:m.context("pixelRatio"),id:m.prop("id"),viewport:function(i,C){return[C.viewport.x,C.viewport.y,i.viewportWidth,i.viewportHeight]}},attributes:{position:{buffer:m.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:m.prop("positionFractBuffer"),stride:8,offset:8}},blend:E.blend,depth:{enable:!1},scissor:E.scissor,stencil:E.stencil,viewport:E.viewport});return{fill:w,rect:p,miter:S}},v.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},v.prototype.render=function(){for(var m,b=[],E=arguments.length;E--;)b[E]=arguments[E];b.length&&(m=this).update.apply(m,b),this.draw()},v.prototype.draw=function(){for(var m=this,b=[],E=arguments.length;E--;)b[E]=arguments[E];return(b.length?b:this.passes).forEach(function(p,S){var w;if(p&&Array.isArray(p))return(w=m).draw.apply(w,p);typeof p=="number"&&(p=m.passes[p]),p&&p.count>1&&p.opacity&&(m.regl._refresh(),p.fill&&p.triangles&&p.triangles.length>2&&m.shaders.fill(p),p.thickness&&(p.scale[0]*p.viewport.width>v.precisionThreshold||p.scale[1]*p.viewport.height>v.precisionThreshold||p.join==="rect"||!p.join&&(p.thickness<=2||p.count>=v.maxPoints)?m.shaders.rect(p):m.shaders.miter(p)))}),this},v.prototype.update=function(m){var b=this;if(m){m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);var E=this,p=E.regl,S=E.gl;if(m.forEach(function(k,I){var B=b.passes[I];if(k!==void 0){if(k===null){b.passes[I]=null;return}if(typeof k[0]=="number"&&(k={positions:k}),k=L(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"}),B||(b.passes[I]=B={id:I,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:p.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:p.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:p.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:p.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},k=o({},v.defaults,k)),k.thickness!=null&&(B.thickness=parseFloat(k.thickness)),k.opacity!=null&&(B.opacity=parseFloat(k.opacity)),k.miterLimit!=null&&(B.miterLimit=parseFloat(k.miterLimit)),k.overlay!=null&&(B.overlay=!!k.overlay,I<v.maxLines&&(B.depth=2*(v.maxLines-1-I%v.maxLines)/v.maxLines-1)),k.join!=null&&(B.join=k.join),k.hole!=null&&(B.hole=k.hole),k.fill!=null&&(B.fill=k.fill?A(k.fill,"uint8"):null),k.viewport!=null&&(B.viewport=c(k.viewport)),B.viewport||(B.viewport=c([S.drawingBufferWidth,S.drawingBufferHeight])),k.close!=null&&(B.close=k.close),k.positions===null&&(k.positions=[]),k.positions){var _,z;if(k.positions.x&&k.positions.y){var O=k.positions.x,F=k.positions.y;z=B.count=Math.max(O.length,F.length),_=new Float64Array(z*2);for(var N=0;N<z;N++)_[N*2]=O[N],_[N*2+1]=F[N]}else _=M(k.positions,"float64"),z=B.count=Math.floor(_.length/2);var V=B.bounds=P(_,2);if(B.fill){for(var j=[],$={},q=0,oe=0,Z=0,G=B.count;oe<G;oe++){var re=_[oe*2],H=_[oe*2+1];isNaN(re)||isNaN(H)||re==null||H==null?(re=_[q*2],H=_[q*2+1],$[oe]=q):q=oe,j[Z++]=re,j[Z++]=H}if(k.splitNull){B.count-1 in $||($[B.count]=B.count-1);var J=Object.keys($).map(Number).sort(function(be,ke){return be-ke}),ae=[],K=0,Y=B.hole!=null?B.hole[0]:null;if(Y!=null){var ie=u(J,function(be){return be>=Y});J=J.slice(0,ie),J.push(Y)}for(var ne=function(be){var ke=j.slice(K*2,J[be]*2).concat(Y?j.slice(Y*2):[]),Ve=(B.hole||[]).map(function(at){return at-Y+(J[be]-K)}),je=d(ke,Ve);je=je.map(function(at){return at+K+(at+K<J[be]?0:Y-J[be])}),ae.push.apply(ae,je),K=J[be]+1},le=0;le<J.length;le++)ne(le);for(var de=0,we=ae.length;de<we;de++)$[ae[de]]!=null&&(ae[de]=$[ae[de]]);B.triangles=ae}else{for(var me=d(j,B.hole||[]),Le=0,ve=me.length;Le<ve;Le++)$[me[Le]]!=null&&(me[Le]=$[me[Le]]);B.triangles=me}}var Ae=new Float64Array(_);g(Ae,2,V);var ye=new Float64Array(z*2+6);B.close?_[0]===_[z*2-2]&&_[1]===_[z*2-1]?(ye[0]=Ae[z*2-4],ye[1]=Ae[z*2-3]):(ye[0]=Ae[z*2-2],ye[1]=Ae[z*2-1]):(ye[0]=Ae[0],ye[1]=Ae[1]),ye.set(Ae,2),B.close?_[0]===_[z*2-2]&&_[1]===_[z*2-1]?(ye[z*2+2]=Ae[2],ye[z*2+3]=Ae[3],B.count-=1):(ye[z*2+2]=Ae[0],ye[z*2+3]=Ae[1],ye[z*2+4]=Ae[2],ye[z*2+5]=Ae[3]):(ye[z*2+2]=Ae[z*2-2],ye[z*2+3]=Ae[z*2-1],ye[z*2+4]=Ae[z*2-2],ye[z*2+5]=Ae[z*2-1]);var Se=t(ye);B.positionBuffer(Se);var _e=s(ye,Se);B.positionFractBuffer(_e)}if(k.range?B.range=k.range:B.range||(B.range=B.bounds),(k.range||k.positions)&&B.count){var ze=B.bounds,Ie=ze[2]-ze[0],Ne=ze[3]-ze[1],et=B.range[2]-B.range[0],st=B.range[3]-B.range[1];B.scale=[Ie/et,Ne/st],B.translate=[-B.range[0]/et+ze[0]/et||0,-B.range[1]/st+ze[1]/st||0],B.scaleFract=s(B.scale),B.translateFract=s(B.translate)}if(k.dashes){var Ze=0,Ke;if(!k.dashes||k.dashes.length<2)Ze=1,Ke=new Uint8Array([255,255,255,255,255,255,255,255]);else{Ze=0;for(var nt=0;nt<k.dashes.length;++nt)Ze+=k.dashes[nt];Ke=new Uint8Array(Ze*v.dashMult);for(var it=0,lt=255,vt=0;vt<2;vt++)for(var xt=0;xt<k.dashes.length;++xt){for(var Je=0,Pe=k.dashes[xt]*v.dashMult*.5;Je<Pe;++Je)Ke[it++]=lt;lt^=255}}B.dashLength=Ze,B.dashTexture({channels:1,data:Ke,width:Ke.length,height:1,mag:"linear",min:"linear"},0,0)}if(k.color){var Ue=B.count,He=k.color;He||(He="transparent");var Oe=new Uint8Array(Ue*4+4);if(!Array.isArray(He)||typeof He[0]=="number")for(var Ce=A(He,"uint8"),ge=0;ge<Ue+1;ge++)Oe.set(Ce,ge*4);else{for(var pe=0;pe<Ue;pe++){var Te=A(He[pe],"uint8");Oe.set(Te,pe*4)}Oe.set(A(He[0],"uint8"),Ue*4)}B.colorBuffer({usage:"dynamic",type:"uint8",data:Oe})}}}),m.length<this.passes.length){for(var w=m.length;w<this.passes.length;w++){var i=this.passes[w];i&&(i.colorBuffer.destroy(),i.positionBuffer.destroy(),i.dashTexture.destroy())}this.passes.length=m.length}for(var C=[],x=0;x<this.passes.length;x++)this.passes[x]!==null&&C.push(this.passes[x]);return this.passes=C,this}},v.prototype.destroy=function(){return this.passes.forEach(function(m){m.colorBuffer.destroy(),m.positionBuffer.destroy(),m.dashTexture.destroy()}),this.passes.length=0,this}},38540:function(te,X,e){function A(i,C){var x=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(x!=null){var k,I,B,_,z=[],O=!0,F=!1;try{if(B=(x=x.call(i)).next,C!==0)for(;!(O=(k=B.call(x)).done)&&(z.push(k.value),z.length!==C);O=!0);}catch(N){F=!0,I=N}finally{try{if(!O&&x.return!=null&&(_=x.return(),Object(_)!==_))return}finally{if(F)throw I}}return z}}function P(i,C){return M(i)||A(i,C)||g(i,C)||s()}function o(i){return L(i)||d(i)||g(i)||t()}function L(i){if(Array.isArray(i))return r(i)}function M(i){if(Array.isArray(i))return i}function d(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function g(i,C){if(i){if(typeof i=="string")return r(i,C);var x=Object.prototype.toString.call(i).slice(8,-1);if(x==="Object"&&i.constructor&&(x=i.constructor.name),x==="Map"||x==="Set")return Array.from(i);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return r(i,C)}}function r(i,C){(C==null||C>i.length)&&(C=i.length);for(var x=0,k=new Array(C);x<C;x++)k[x]=i[x];return k}function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=e(72160),c=e(76752),u=e(3808),l=e(3108),y=e(50896),h=e(26444),T=e(55616),f=e(45223),n=e(47520),v=e(96604),m=e(37816),b=e(51160),E=p;function p(i,C){var x=this;if(!(this instanceof p))return new p(i,C);typeof i=="function"?(C||(C={}),C.regl=i):(C=i,i=null),C&&C.length&&(C.positions=C),i=C.regl;var k=i._gl,I,B=[],_={},z=[],O=[null],F=[null],N=255,V=100;this.tooManyColors=v,I=i.texture({data:new Uint8Array(N*4),width:N,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),y(this,{regl:i,gl:k,groups:z,markerCache:F,markerTextures:O,palette:B,paletteIds:_,paletteTexture:I,maxColors:N,maxSize:V,canvas:k.canvas}),this.update(C);var j={uniforms:{constPointSize:!!C.constPointSize,opacity:i.prop("opacity"),paletteSize:function(Z,G){return[x.tooManyColors?0:N,I.height]},pixelRatio:i.context("pixelRatio"),scale:i.prop("scale"),scaleFract:i.prop("scaleFract"),translate:i.prop("translate"),translateFract:i.prop("translateFract"),markerTexture:i.prop("markerTexture"),paletteTexture:I},attributes:{x:function(Z,G){return G.xAttr||{buffer:G.positionBuffer,stride:8,offset:0}},y:function(Z,G){return G.yAttr||{buffer:G.positionBuffer,stride:8,offset:4}},xFract:function(Z,G){return G.xAttr?{constant:[0,0]}:{buffer:G.positionFractBuffer,stride:8,offset:0}},yFract:function(Z,G){return G.yAttr?{constant:[0,0]}:{buffer:G.positionFractBuffer,stride:8,offset:4}},size:function(Z,G){return G.size.length?{buffer:G.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(G.size*255/x.maxSize)]}},borderSize:function(Z,G){return G.borderSize.length?{buffer:G.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(G.borderSize*255/x.maxSize)]}},colorId:function(Z,G){return G.color.length?{buffer:G.colorBuffer,stride:x.tooManyColors?8:4,offset:0}:{constant:x.tooManyColors?B.slice(G.color*4,G.color*4+4):[G.color]}},borderColorId:function(Z,G){return G.borderColor.length?{buffer:G.colorBuffer,stride:x.tooManyColors?8:4,offset:x.tooManyColors?4:2}:{constant:x.tooManyColors?B.slice(G.borderColor*4,G.borderColor*4+4):[G.borderColor]}},isActive:function(Z,G){return G.activation===!0?{constant:[1]}:G.activation?G.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:i.prop("elements"),count:i.prop("count"),offset:i.prop("offset"),primitive:"points"},$=y({},j);$.frag=h([`precision highp float;
#define GLSLIFY 1
uniform float opacity;
uniform sampler2D markerTexture;
varying vec4 fragColor, fragBorderColor;
varying float fragWidth, fragBorderColorLevel, fragColorLevel;
float smoothStep(float x, float y) {
return 1.0 / (1.0 + exp(50.0*(x - y)));
}
void main() {
float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;
// max-distance alpha
if (dist < 0.003) discard;
// null-border case
if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {
float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);
gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);
}
else {
float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);
float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);
vec4 color = fragBorderColor;
color.a *= borderColorAmt;
color = mix(color, fragColor, colorAmt);
color.a *= opacity;
gl_FragColor = color;
}
}
`]),$.vert=h([`precision highp float;
#define GLSLIFY 1
attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;
// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;
uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;
uniform sampler2D paletteTexture;
const float maxSize = 100.;
const float borderLevel = .5;
varying vec4 fragColor, fragBorderColor;
varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;
float pointSizeScale = (constPointSize) ? 2. : pixelRatio;
bool isDirect = (paletteSize.x < 1.);
vec4 getColor(vec4 id) {
return isDirect ? id / 255. : texture2D(paletteTexture,
vec2(
(id.x + .5) / paletteSize.x,
(id.y + .5) / paletteSize.y
)
);
}
void main() {
// ignore inactive points
if (isActive == 0.) return;
vec2 position = vec2(x, y);
vec2 positionFract = vec2(xFract, yFract);
vec4 color = getColor(colorId);
vec4 borderColor = getColor(borderColorId);
float size = size * maxSize / 255.;
float borderSize = borderSize * maxSize / 255.;
gl_PointSize = 2. * size * pointSizeScale;
fragPointSize = size * pixelRatio;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
gl_Position = vec4(pos * 2. - 1., 0., 1.);
fragColor = color;
fragBorderColor = borderColor;
fragWidth = 1. / gl_PointSize;
fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);
fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);
}
`]),this.drawMarker=i($);var q=y({},j);q.frag=h([`precision highp float;
#define GLSLIFY 1
varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;
uniform float opacity;
float smoothStep(float edge0, float edge1, float x) {
float t;
t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
return t * t * (3.0 - 2.0 * t);
}
void main() {
float radius, alpha = 1.0, delta = fragWidth;
radius = length(2.0 * gl_PointCoord.xy - 1.0);
if (radius > 1.0 + delta) {
discard;
}
alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);
float borderRadius = fragBorderRadius;
float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);
vec4 color = mix(fragColor, fragBorderColor, ratio);
color.a *= alpha * opacity;
gl_FragColor = color;
}
`]),q.vert=h([`precision highp float;
#define GLSLIFY 1
attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;
// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;
uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;
uniform sampler2D paletteTexture;
const float maxSize = 100.;
varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;
float pointSizeScale = (constPointSize) ? 2. : pixelRatio;
bool isDirect = (paletteSize.x < 1.);
vec4 getColor(vec4 id) {
return isDirect ? id / 255. : texture2D(paletteTexture,
vec2(
(id.x + .5) / paletteSize.x,
(id.y + .5) / paletteSize.y
)
);
}
void main() {
// ignore inactive points
if (isActive == 0.) return;
vec2 position = vec2(x, y);
vec2 positionFract = vec2(xFract, yFract);
vec4 color = getColor(colorId);
vec4 borderColor = getColor(borderColorId);
float size = size * maxSize / 255.;
float borderSize = borderSize * maxSize / 255.;
gl_PointSize = (size + borderSize) * pointSizeScale;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
gl_Position = vec4(pos * 2. - 1., 0., 1.);
fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
fragColor = color;
fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
fragWidth = 1. / gl_PointSize;
}
`]),v&&(q.frag=q.frag.replace("smoothstep","smoothStep"),$.frag=$.frag.replace("smoothstep","smoothStep")),this.drawCircle=i(q)}p.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},p.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},p.prototype.draw=function(){for(var i=this,C=arguments.length,x=new Array(C),k=0;k<C;k++)x[k]=arguments[k];var I=this.groups;if(x.length===1&&Array.isArray(x[0])&&(x[0][0]===null||Array.isArray(x[0][0]))&&(x=x[0]),this.regl._refresh(),x.length)for(var B=0;B<x.length;B++)this.drawItem(B,x[B]);else I.forEach(function(_,z){i.drawItem(z)});return this},p.prototype.drawItem=function(i,C){var x=this.groups,k=x[i];if(typeof C=="number"&&(i=C,k=x[C],C=null),!!(k&&k.count&&k.opacity)){k.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,k,C));for(var I=[],B=1;B<k.activation.length;B++)!k.activation[B]||k.activation[B]!==!0&&!k.activation[B].data.length||I.push.apply(I,o(this.getMarkerDrawOptions(B,k,C)));I.length&&this.drawMarker(I)}},p.prototype.getMarkerDrawOptions=function(i,C,x){var k=C.range,I=C.tree,B=C.viewport,_=C.activation,z=C.selectionBuffer,O=C.count;if(this.regl,!I)return x?[y({},C,{markerTexture:this.markerTextures[i],activation:_[i],count:x.length,elements:x,offset:0})]:[y({},C,{markerTexture:this.markerTextures[i],activation:_[i],offset:0})];var F=[],N=I.range(k,{lod:!0,px:[(k[2]-k[0])/B.width,(k[3]-k[1])/B.height]});if(x){for(var V=_[i],j=V.data,$=new Uint8Array(O),q=0;q<x.length;q++){var oe=x[q];$[oe]=j?j[oe]:1}z.subdata($)}for(var Z=N.length;Z--;){var G=P(N[Z],2),re=G[0],H=G[1];F.push(y({},C,{markerTexture:this.markerTextures[i],activation:x?z:_[i],offset:re,count:H-re}))}return F},p.prototype.update=function(){for(var i=this,C=arguments.length,x=new Array(C),k=0;k<C;k++)x[k]=arguments[k];if(x.length){x.length===1&&Array.isArray(x[0])&&(x=x[0]);var I=this.groups,B=this.gl,_=this.regl,z=this.maxSize,O=this.maxColors,F=this.palette;this.groups=I=x.map(function(N,V){var j=I[V];if(N===void 0)return j;N===null?N={positions:null}:typeof N=="function"?N={ondraw:N}:typeof N[0]=="number"&&(N={positions:N}),N=T(N,{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",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),N.positions===null&&(N.positions=[]),N.tooManyColors!=null&&(i.tooManyColors=N.tooManyColors),j||(I[V]=j={id:V,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:_.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:_.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:_.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:_.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:_.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},N=y({},p.defaults,N)),N.positions&&!("marker"in N)&&(N.marker=j.marker,delete j.marker),N.marker&&!("positions"in N)&&(N.positions=j.positions,delete j.positions);var $=0,q=0;if(f(j,N,[{snap:!0,size:function(ye,Se){return ye==null&&(ye=p.defaults.size),$+=ye&&ye.length?1:0,ye},borderSize:function(ye,Se){return ye==null&&(ye=p.defaults.borderSize),$+=ye&&ye.length?1:0,ye},opacity:parseFloat,color:function(ye,Se){return ye==null&&(ye=p.defaults.color),ye=i.updateColor(ye),q++,ye},borderColor:function(ye,Se){return ye==null&&(ye=p.defaults.borderColor),ye=i.updateColor(ye),q++,ye},bounds:function(ye,Se,_e){return"range"in _e||(_e.range=null),ye},positions:function(ye,Se,_e){var ze=Se.snap,Ie=Se.positionBuffer,Ne=Se.positionFractBuffer,et=Se.selectionBuffer;if(ye.x||ye.y)return ye.x.length?Se.xAttr={buffer:_.buffer(ye.x),offset:0,stride:4,count:ye.x.length}:Se.xAttr={buffer:ye.x.buffer,offset:ye.x.offset*4||0,stride:(ye.x.stride||1)*4,count:ye.x.count},ye.y.length?Se.yAttr={buffer:_.buffer(ye.y),offset:0,stride:4,count:ye.y.length}:Se.yAttr={buffer:ye.y.buffer,offset:ye.y.offset*4||0,stride:(ye.y.stride||1)*4,count:ye.y.count},Se.count=Math.max(Se.xAttr.count,Se.yAttr.count),ye;ye=n(ye,"float64");var st=Se.count=Math.floor(ye.length/2),Ze=Se.bounds=st?c(ye,2):null;if(!_e.range&&!Se.range&&(delete Se.range,_e.range=Ze),!_e.marker&&!Se.marker&&(delete Se.marker,_e.marker=null),ze&&(ze===!0||st>ze)?Se.tree=l(ye,{bounds:Ze}):ze&&ze.length&&(Se.tree=ze),Se.tree){var Ke={primitive:"points",usage:"static",data:Se.tree,type:"uint32"};Se.elements?Se.elements(Ke):Se.elements=_.elements(Ke)}var nt=m.float32(ye);Ie({data:nt,usage:"dynamic"});var it=m.fract32(ye,nt);return Ne({data:it,usage:"dynamic"}),et({data:new Uint8Array(st),type:"uint8",usage:"stream"}),ye}},{marker:function(ye,Se,_e){var ze=Se.activation;if(ze.forEach(function(it){return it&&it.destroy&&it.destroy()}),ze.length=0,!ye||typeof ye[0]=="number"){var Ie=i.addMarker(ye);ze[Ie]=!0}else{for(var Ne=[],et=0,st=Math.min(ye.length,Se.count);et<st;et++){var Ze=i.addMarker(ye[et]);Ne[Ze]||(Ne[Ze]=new Uint8Array(Se.count)),Ne[Ze][et]=1}for(var Ke=0;Ke<Ne.length;Ke++)if(Ne[Ke]){var nt={data:Ne[Ke],type:"uint8",usage:"static"};ze[Ke]?ze[Ke](nt):ze[Ke]=_.buffer(nt),ze[Ke].data=Ne[Ke]}}return ye},range:function(ye,Se,_e){var ze=Se.bounds;if(ze)return ye||(ye=ze),Se.scale=[1/(ye[2]-ye[0]),1/(ye[3]-ye[1])],Se.translate=[-ye[0],-ye[1]],Se.scaleFract=m.fract(Se.scale),Se.translateFract=m.fract(Se.translate),ye},viewport:function(ye){var Se=b(ye||[B.drawingBufferWidth,B.drawingBufferHeight]);return Se}}]),$){var oe=j,Z=oe.count,G=oe.size,re=oe.borderSize,H=oe.sizeBuffer,J=new Uint8Array(Z*2);if(G.length||re.length)for(var ae=0;ae<Z;ae++)J[ae*2]=Math.round((G[ae]==null?G:G[ae])*255/z),J[ae*2+1]=Math.round((re[ae]==null?re:re[ae])*255/z);H({data:J,usage:"dynamic"})}if(q){var K=j,Y=K.count,ie=K.color,ne=K.borderColor,le=K.colorBuffer,de;if(i.tooManyColors){if(ie.length||ne.length){de=new Uint8Array(Y*8);for(var we=0;we<Y;we++){var me=ie[we];de[we*8]=F[me*4],de[we*8+1]=F[me*4+1],de[we*8+2]=F[me*4+2],de[we*8+3]=F[me*4+3];var Le=ne[we];de[we*8+4]=F[Le*4],de[we*8+5]=F[Le*4+1],de[we*8+6]=F[Le*4+2],de[we*8+7]=F[Le*4+3]}}}else if(ie.length||ne.length){de=new Uint8Array(Y*4+2);for(var ve=0;ve<Y;ve++)ie[ve]!=null&&(de[ve*4]=ie[ve]%O,de[ve*4+1]=Math.floor(ie[ve]/O)),ne[ve]!=null&&(de[ve*4+2]=ne[ve]%O,de[ve*4+3]=Math.floor(ne[ve]/O))}le({data:de||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return j})}},p.prototype.addMarker=function(i){var C=this.markerTextures,x=this.regl,k=this.markerCache,I=i==null?0:k.indexOf(i);if(I>=0)return I;var B;if(i instanceof Uint8Array||i instanceof Uint8ClampedArray)B=i;else{B=new Uint8Array(i.length);for(var _=0,z=i.length;_<z;_++)B[_]=i[_]*255}var O=Math.floor(Math.sqrt(B.length));return I=C.length,k.push(i),C.push(x.texture({channels:1,data:B,radius:O,mag:"linear",min:"linear"})),I},p.prototype.updateColor=function(i){var C=this.paletteIds,x=this.palette,k=this.maxColors;Array.isArray(i)||(i=[i]);var I=[];if(typeof i[0]=="number"){var B=[];if(Array.isArray(i))for(var _=0;_<i.length;_+=4)B.push(i.slice(_,_+4));else for(var z=0;z<i.length;z+=4)B.push(i.subarray(z,z+4));i=B}for(var O=0;O<i.length;O++){var F=i[O];F=a(F,"uint8");var N=u(F,!1);if(C[N]==null){var V=x.length;C[N]=Math.floor(V/4),x[V]=F[0],x[V+1]=F[1],x[V+2]=F[2],x[V+3]=F[3]}I[O]=C[N]}return!this.tooManyColors&&x.length>k*4&&(this.tooManyColors=!0),this.updatePalette(x),I.length===1?I[0]:I},p.prototype.updatePalette=function(i){if(!this.tooManyColors){var C=this.maxColors,x=this.paletteTexture,k=Math.ceil(i.length*.25/C);if(k>1){i=i.slice();for(var I=i.length*.25%C;I<k*C;I++)i.push(0,0,0,0)}x.height<k&&x.resize(C,k),x.subimage({width:Math.min(i.length*.25,C),height:k,data:i},0,0)}},p.prototype.destroy=function(){return this.groups.forEach(function(i){i.sizeBuffer.destroy(),i.positionBuffer.destroy(),i.positionFractBuffer.destroy(),i.colorBuffer.destroy(),i.activation.forEach(function(C){return C&&C.destroy&&C.destroy()}),i.selectionBuffer.destroy(),i.elements&&i.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(i){return i&&i.destroy&&i.destroy()}),this};var S=e(50896),w=function(C,x){var k=new E(C,x),I=k.render.bind(k);return S(I,{render:I,update:k.update.bind(k),draw:k.draw.bind(k),destroy:k.destroy.bind(k),regl:k.regl,gl:k.gl,canvas:k.gl.canvas,groups:k.groups,markers:k.markerCache,palette:k.palette}),I};te.exports=w},55795:function(te,X,e){var A=e(38540),P=e(55616),o=e(76752),L=e(3951),M=e(67752),d=e(51160),g=e(47520);te.exports=r;function r(c,u){if(!(this instanceof r))return new r(c);this.traces=[],this.passes={},this.regl=c,this.scatter=A(c),this.canvas=this.scatter.canvas}r.prototype.render=function(){for(var c=this,u,l=[],y=arguments.length;y--;)l[y]=arguments[y];return l.length&&(u=this).update.apply(u,l),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=L(function(){c.draw(),c.dirty=!0,c.planned=null})):(this.draw(),this.dirty=!0,L(function(){c.dirty=!1})),this)},r.prototype.update=function(){for(var c,u=[],l=arguments.length;l--;)u[l]=arguments[l];if(u.length){for(var y=0;y<u.length;y++)this.updateItem(y,u[y]);this.traces=this.traces.filter(Boolean);for(var h=[],T=0,f=0;f<this.traces.length;f++){for(var n=this.traces[f],v=this.traces[f].passes,m=0;m<v.length;m++)h.push(this.passes[v[m]]);n.passOffset=T,T+=n.passes.length}return(c=this.scatter).update.apply(c,h),this}},r.prototype.updateItem=function(c,u){var l=this,y=l.regl;if(u===null)return this.traces[c]=null,this;if(!u)return this;var h=P(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"}),T=this.traces[c]||(this.traces[c]={id:c,buffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:d([y._gl.drawingBufferWidth,y._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(h.color!=null&&(T.color=h.color),h.size!=null&&(T.size=h.size),h.marker!=null&&(T.marker=h.marker),h.borderColor!=null&&(T.borderColor=h.borderColor),h.borderSize!=null&&(T.borderSize=h.borderSize),h.opacity!=null&&(T.opacity=h.opacity),h.viewport&&(T.viewport=d(h.viewport)),h.diagonal!=null&&(T.diagonal=h.diagonal),h.upper!=null&&(T.upper=h.upper),h.lower!=null&&(T.lower=h.lower),h.data){T.buffer(g(h.data)),T.columns=h.data.length,T.count=h.data[0].length,T.bounds=[];for(var f=0;f<T.columns;f++)T.bounds[f]=o(h.data[f],1)}var n;h.range&&(T.range=h.range,n=T.range&&typeof T.range[0]!="number"),h.domain&&(T.domain=h.domain);var v=!1;h.padding!=null&&(Array.isArray(h.padding)&&h.padding.length===T.columns&&typeof h.padding[h.padding.length-1]=="number"?(T.padding=h.padding.map(a),v=!0):T.padding=a(h.padding));var m=T.columns,b=T.count,E=T.viewport.width,p=T.viewport.height,S=T.viewport.x,w=T.viewport.y,i=E/m,C=p/m;T.passes=[];for(var x=0;x<m;x++)for(var k=0;k<m;k++)if(!(!T.diagonal&&k===x)&&!(!T.upper&&x>k)&&!(!T.lower&&x<k)){var I=t(T.id,x,k),B=this.passes[I]||(this.passes[I]={});if(h.data&&(h.transpose?B.positions={x:{buffer:T.buffer,offset:k,count:b,stride:m},y:{buffer:T.buffer,offset:x,count:b,stride:m}}:B.positions={x:{buffer:T.buffer,offset:k*b,count:b},y:{buffer:T.buffer,offset:x*b,count:b}},B.bounds=s(T.bounds,x,k)),h.domain||h.viewport||h.data){var _=v?s(T.padding,x,k):T.padding;if(T.domain){var z=s(T.domain,x,k),O=z[0],F=z[1],N=z[2],V=z[3];B.viewport=[S+O*E+_[0],w+F*p+_[1],S+N*E-_[2],w+V*p-_[3]]}else B.viewport=[S+k*i+i*_[0],w+x*C+C*_[1],S+(k+1)*i-i*_[2],w+(x+1)*C-C*_[3]]}h.color&&(B.color=T.color),h.size&&(B.size=T.size),h.marker&&(B.marker=T.marker),h.borderSize&&(B.borderSize=T.borderSize),h.borderColor&&(B.borderColor=T.borderColor),h.opacity&&(B.opacity=T.opacity),h.range&&(B.range=n?s(T.range,x,k):T.range||B.bounds),T.passes.push(I)}return this},r.prototype.draw=function(){for(var c,u=[],l=arguments.length;l--;)u[l]=arguments[l];if(!u.length)this.scatter.draw();else{for(var y=[],h=0;h<u.length;h++)if(typeof u[h]=="number"){var T=this.traces[u[h]],f=T.passes,n=T.passOffset;y.push.apply(y,M(n,n+f.length))}else if(u[h].length){var v=u[h],m=this.traces[h],b=m.passes,E=m.passOffset;b=b.map(function(p,S){y[E+S]=v})}(c=this.scatter).draw.apply(c,y)}return this},r.prototype.destroy=function(){return this.traces.forEach(function(c){c.buffer&&c.buffer.destroy&&c.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function t(c,u,l){var y=c.id!=null?c.id:c,h=u,T=l,f=y<<16|(h&255)<<8|T&255;return f}function s(c,u,l){var y,h,T,f,n=c[u],v=c[l];return n.length>2?(n[0],n[2],y=n[1],h=n[3]):n.length?(y=n[0],h=n[1]):(n.x,y=n.y,n.x+n.width,h=n.y+n.height),v.length>2?(T=v[0],f=v[2],v[1],v[3]):v.length?(T=v[0],f=v[1]):(T=v.x,v.y,f=v.x+v.width,v.y+v.height),[T,y,f,h]}function a(c){if(typeof c=="number")return[c,c,c,c];if(c.length===2)return[c[0],c[1],c[0],c[1]];var u=d(c);return[u.x,u.y,u.x+u.width,u.y+u.height]}},28624:function(te){(function(X,e){te.exports=e()})(this,function(){function X(ht,Ht){this.id=le++,this.type=ht,this.data=Ht}function e(ht){if(ht.length===0)return[];var Ht=ht.charAt(0),Wt=ht.charAt(ht.length-1);if(1<ht.length&&Ht===Wt&&(Ht==='"'||Ht==="'"))return['"'+ht.substr(1,ht.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(Ht=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(ht))return e(ht.substr(0,Ht.index)).concat(e(Ht[1])).concat(e(ht.substr(Ht.index+Ht[0].length)));if(Ht=ht.split("."),Ht.length===1)return['"'+ht.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(ht=[],Wt=0;Wt<Ht.length;++Wt)ht=ht.concat(e(Ht[Wt]));return ht}function A(ht){return"["+e(ht).join("][")+"]"}function P(ht,Ht){if(typeof ht=="function")return new X(0,ht);if(typeof ht=="number"||typeof ht=="boolean")return new X(5,ht);if(Array.isArray(ht))return new X(6,ht.map(function(Wt,cr){return P(Wt)}));if(ht instanceof X)return ht}function o(){var ht={"":0},Ht=[""];return{id:function(Wt){var cr=ht[Wt];return cr||(cr=ht[Wt]=Ht.length,Ht.push(Wt),cr)},str:function(Wt){return Ht[Wt]}}}function L(ht,Ht,Wt){function cr(){var qe=window.innerWidth,dt=window.innerHeight;ht!==document.body&&(dt=er.getBoundingClientRect(),qe=dt.right-dt.left,dt=dt.bottom-dt.top),er.width=Wt*qe,er.height=Wt*dt}var er=document.createElement("canvas");ne(er.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),ht.appendChild(er),ht===document.body&&(er.style.position="absolute",ne(ht.style,{margin:0,padding:0}));var ct;return ht!==document.body&&typeof ResizeObserver=="function"?(ct=new ResizeObserver(function(){setTimeout(cr)}),ct.observe(ht)):window.addEventListener("resize",cr,!1),cr(),{canvas:er,onDestroy:function(){ct?ct.disconnect():window.removeEventListener("resize",cr),ht.removeChild(er)}}}function M(ht,Ht){function Wt(cr){try{return ht.getContext(cr,Ht)}catch{return null}}return Wt("webgl")||Wt("experimental-webgl")||Wt("webgl-experimental")}function d(ht){return typeof ht=="string"?ht.split():ht}function g(ht){return typeof ht=="string"?document.querySelector(ht):ht}function r(ht){var Ht=ht||{},Wt,cr,er,ct;ht={};var qe=[],dt=[],bt=typeof window>"u"?1:window.devicePixelRatio,Et=!1,Mt={},_t=function(Gt){},It=function(){};if(typeof Ht=="string"?Wt=document.querySelector(Ht):typeof Ht=="object"&&(typeof Ht.nodeName=="string"&&typeof Ht.appendChild=="function"&&typeof Ht.getBoundingClientRect=="function"?Wt=Ht:typeof Ht.drawArrays=="function"||typeof Ht.drawElements=="function"?(ct=Ht,er=ct.canvas):("gl"in Ht?ct=Ht.gl:"canvas"in Ht?er=g(Ht.canvas):"container"in Ht&&(cr=g(Ht.container)),"attributes"in Ht&&(ht=Ht.attributes),"extensions"in Ht&&(qe=d(Ht.extensions)),"optionalExtensions"in Ht&&(dt=d(Ht.optionalExtensions)),"onDone"in Ht&&(_t=Ht.onDone),"profile"in Ht&&(Et=!!Ht.profile),"pixelRatio"in Ht&&(bt=+Ht.pixelRatio),"cachedCode"in Ht&&(Mt=Ht.cachedCode))),Wt&&(Wt.nodeName.toLowerCase()==="canvas"?er=Wt:cr=Wt),!ct){if(!er){if(Wt=L(cr||document.body,_t,bt),!Wt)return null;er=Wt.canvas,It=Wt.onDestroy}ht.premultipliedAlpha===void 0&&(ht.premultipliedAlpha=!0),ct=M(er,ht)}return ct?{gl:ct,canvas:er,container:cr,extensions:qe,optionalExtensions:dt,pixelRatio:bt,profile:Et,cachedCode:Mt,onDone:_t,onDestroy:It}:(It(),_t("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function t(ht,Ht){function Wt(qe){qe=qe.toLowerCase();var dt;try{dt=cr[qe]=ht.getExtension(qe)}catch{}return!!dt}for(var cr={},er=0;er<Ht.extensions.length;++er){var ct=Ht.extensions[er];if(!Wt(ct))return Ht.onDestroy(),Ht.onDone('"'+ct+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Ht.optionalExtensions.forEach(Wt),{extensions:cr,restore:function(){Object.keys(cr).forEach(function(qe){if(cr[qe]&&!Wt(qe))throw Error("(regl): error restoring extension "+qe)})}}}function s(ht,Ht){for(var Wt=Array(ht),cr=0;cr<ht;++cr)Wt[cr]=Ht(cr);return Wt}function a(ht){var Ht,Wt;return Ht=(65535<ht)<<4,ht>>>=Ht,Wt=(255<ht)<<3,ht>>>=Wt,Ht|=Wt,Wt=(15<ht)<<2,ht>>>=Wt,Ht|=Wt,Wt=(3<ht)<<1,Ht|Wt|ht>>>Wt>>1}function c(){function ht(cr){e:{for(var er=16;268435456>=er;er*=16)if(cr<=er){cr=er;break e}cr=0}return er=Wt[a(cr)>>2],0<er.length?er.pop():new ArrayBuffer(cr)}function Ht(cr){Wt[a(cr.byteLength)>>2].push(cr)}var Wt=s(8,function(){return[]});return{alloc:ht,free:Ht,allocType:function(cr,er){var ct=null;switch(cr){case 5120:ct=new Int8Array(ht(er),0,er);break;case 5121:ct=new Uint8Array(ht(er),0,er);break;case 5122:ct=new Int16Array(ht(2*er),0,er);break;case 5123:ct=new Uint16Array(ht(2*er),0,er);break;case 5124:ct=new Int32Array(ht(4*er),0,er);break;case 5125:ct=new Uint32Array(ht(4*er),0,er);break;case 5126:ct=new Float32Array(ht(4*er),0,er);break;default:return null}return ct.length!==er?ct.subarray(0,er):ct},freeType:function(cr){Ht(cr.buffer)}}}function u(ht){return!!ht&&typeof ht=="object"&&Array.isArray(ht.shape)&&Array.isArray(ht.stride)&&typeof ht.offset=="number"&&ht.shape.length===ht.stride.length&&(Array.isArray(ht.data)||Ae(ht.data))}function l(ht,Ht,Wt,cr,er,ct){for(var qe=0;qe<Ht;++qe)for(var dt=ht[qe],bt=0;bt<Wt;++bt)for(var Et=dt[bt],Mt=0;Mt<cr;++Mt)er[ct++]=Et[Mt]}function y(ht,Ht,Wt,cr,er){for(var ct=1,qe=Wt+1;qe<Ht.length;++qe)ct*=Ht[qe];var dt=Ht[Wt];if(Ht.length-Wt===4){var bt=Ht[Wt+1],Et=Ht[Wt+2];for(Ht=Ht[Wt+3],qe=0;qe<dt;++qe)l(ht[qe],bt,Et,Ht,cr,er),er+=ct}else for(qe=0;qe<dt;++qe)y(ht[qe],Ht,Wt+1,cr,er),er+=ct}function h(ht){return _e[Object.prototype.toString.call(ht)]|0}function T(ht,Ht){for(var Wt=0;Wt<Ht.length;++Wt)ht[Wt]=Ht[Wt]}function f(ht,Ht,Wt,cr,er,ct,qe){for(var dt=0,bt=0;bt<Wt;++bt)for(var Et=0;Et<cr;++Et)ht[dt++]=Ht[er*bt+ct*Et+qe]}function n(ht,Ht,Wt,cr){function er(_t){this.id=bt++,this.buffer=ht.createBuffer(),this.type=_t,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,Wt.profile&&(this.stats={size:0})}function ct(_t,It,Gt){_t.byteLength=It.byteLength,ht.bufferData(_t.type,It,Gt)}function qe(_t,It,Gt,nr,ar,ir){if(_t.usage=Gt,Array.isArray(It)){if(_t.dtype=nr||5126,0<It.length)if(Array.isArray(It[0])){ar=et(It);for(var Be=nr=1;Be<ar.length;++Be)nr*=ar[Be];_t.dimension=nr,It=Ne(It,ar,_t.dtype),ct(_t,It,Gt),ir?_t.persistentData=It:Le.freeType(It)}else typeof It[0]=="number"?(_t.dimension=ar,ar=Le.allocType(_t.dtype,It.length),T(ar,It),ct(_t,ar,Gt),ir?_t.persistentData=ar:Le.freeType(ar)):Ae(It[0])&&(_t.dimension=It[0].length,_t.dtype=nr||h(It[0])||5126,It=Ne(It,[It.length,It[0].length],_t.dtype),ct(_t,It,Gt),ir?_t.persistentData=It:Le.freeType(It))}else if(Ae(It))_t.dtype=nr||h(It),_t.dimension=ar,ct(_t,It,Gt),ir&&(_t.persistentData=new Uint8Array(new Uint8Array(It.buffer)));else if(u(It)){ar=It.shape;var Fe=It.stride,Be=It.offset,Rt=0,Lt=0,Ut=0,Qt=0;ar.length===1?(Rt=ar[0],Lt=1,Ut=Fe[0],Qt=0):ar.length===2&&(Rt=ar[0],Lt=ar[1],Ut=Fe[0],Qt=Fe[1]),_t.dtype=nr||h(It.data)||5126,_t.dimension=Lt,ar=Le.allocType(_t.dtype,Rt*Lt),f(ar,It.data,Rt,Lt,Ut,Qt,Be),ct(_t,ar,Gt),ir?_t.persistentData=ar:Le.freeType(ar)}else It instanceof ArrayBuffer&&(_t.dtype=5121,_t.dimension=ar,ct(_t,It,Gt),ir&&(_t.persistentData=new Uint8Array(new Uint8Array(It))))}function dt(_t){Ht.bufferCount--,cr(_t),ht.deleteBuffer(_t.buffer),_t.buffer=null,delete Et[_t.id]}var bt=0,Et={};er.prototype.bind=function(){ht.bindBuffer(this.type,this.buffer)},er.prototype.destroy=function(){dt(this)};var Mt=[];return Wt.profile&&(Ht.getTotalBufferSize=function(){var _t=0;return Object.keys(Et).forEach(function(It){_t+=Et[It].stats.size}),_t}),{create:function(_t,It,Gt,nr){function ar(Be){var Fe=35044,Rt=null,Lt=0,Ut=0,Qt=1;return Array.isArray(Be)||Ae(Be)||u(Be)||Be instanceof ArrayBuffer?Rt=Be:typeof Be=="number"?Lt=Be|0:Be&&("data"in Be&&(Rt=Be.data),"usage"in Be&&(Fe=Ie[Be.usage]),"type"in Be&&(Ut=ze[Be.type]),"dimension"in Be&&(Qt=Be.dimension|0),"length"in Be&&(Lt=Be.length|0)),ir.bind(),Rt?qe(ir,Rt,Fe,Ut,Qt,nr):(Lt&&ht.bufferData(ir.type,Lt,Fe),ir.dtype=Ut||5121,ir.usage=Fe,ir.dimension=Qt,ir.byteLength=Lt),Wt.profile&&(ir.stats.size=ir.byteLength*st[ir.dtype]),ar}Ht.bufferCount++;var ir=new er(It);return Et[ir.id]=ir,Gt||ar(_t),ar._reglType="buffer",ar._buffer=ir,ar.subdata=function(Be,Fe){var Rt=(Fe||0)|0,Lt;if(ir.bind(),Ae(Be)||Be instanceof ArrayBuffer)ht.bufferSubData(ir.type,Rt,Be);else if(Array.isArray(Be)){if(0<Be.length)if(typeof Be[0]=="number"){var Ut=Le.allocType(ir.dtype,Be.length);T(Ut,Be),ht.bufferSubData(ir.type,Rt,Ut),Le.freeType(Ut)}else(Array.isArray(Be[0])||Ae(Be[0]))&&(Lt=et(Be),Ut=Ne(Be,Lt,ir.dtype),ht.bufferSubData(ir.type,Rt,Ut),Le.freeType(Ut))}else if(u(Be)){Lt=Be.shape;var Qt=Be.stride,rr=Ut=0,Kt=0,Dt=0;Lt.length===1?(Ut=Lt[0],rr=1,Kt=Qt[0],Dt=0):Lt.length===2&&(Ut=Lt[0],rr=Lt[1],Kt=Qt[0],Dt=Qt[1]),Lt=Array.isArray(Be.data)?ir.dtype:h(Be.data),Lt=Le.allocType(Lt,Ut*rr),f(Lt,Be.data,Ut,rr,Kt,Dt,Be.offset),ht.bufferSubData(ir.type,Rt,Lt),Le.freeType(Lt)}return ar},Wt.profile&&(ar.stats=ir.stats),ar.destroy=function(){dt(ir)},ar},createStream:function(_t,It){var Gt=Mt.pop();return Gt||(Gt=new er(_t)),Gt.bind(),qe(Gt,It,35040,0,1,!1),Gt},destroyStream:function(_t){Mt.push(_t)},clear:function(){ye(Et).forEach(dt),Mt.forEach(dt)},getBuffer:function(_t){return _t&&_t._buffer instanceof er?_t._buffer:null},restore:function(){ye(Et).forEach(function(_t){_t.buffer=ht.createBuffer(),ht.bindBuffer(_t.type,_t.buffer),ht.bufferData(_t.type,_t.persistentData||_t.byteLength,_t.usage)})},_initBuffer:qe}}function v(ht,Ht,Wt,cr){function er(_t){this.id=bt++,dt[this.id]=this,this.buffer=_t,this.primType=4,this.type=this.vertCount=0}function ct(_t,It,Gt,nr,ar,ir,Be){_t.buffer.bind();var Fe;if(It?((Fe=Be)||Ae(It)&&(!u(It)||Ae(It.data))||(Fe=Ht.oes_element_index_uint?5125:5123),Wt._initBuffer(_t.buffer,It,Gt,Fe,3)):(ht.bufferData(34963,ir,Gt),_t.buffer.dtype=Fe||5121,_t.buffer.usage=Gt,_t.buffer.dimension=3,_t.buffer.byteLength=ir),Fe=Be,!Be){switch(_t.buffer.dtype){case 5121:case 5120:Fe=5121;break;case 5123:case 5122:Fe=5123;break;case 5125:case 5124:Fe=5125}_t.buffer.dtype=Fe}_t.type=Fe,It=ar,0>It&&(It=_t.buffer.byteLength,Fe===5123?It>>=1:Fe===5125&&(It>>=2)),_t.vertCount=It,It=nr,0>nr&&(It=4,nr=_t.buffer.dimension,nr===1&&(It=0),nr===2&&(It=1),nr===3&&(It=4)),_t.primType=It}function qe(_t){cr.elementsCount--,delete dt[_t.id],_t.buffer.destroy(),_t.buffer=null}var dt={},bt=0,Et={uint8:5121,uint16:5123};Ht.oes_element_index_uint&&(Et.uint32=5125),er.prototype.bind=function(){this.buffer.bind()};var Mt=[];return{create:function(_t,It){function Gt(ir){if(ir)if(typeof ir=="number")nr(ir),ar.primType=4,ar.vertCount=ir|0,ar.type=5121;else{var Be=null,Fe=35044,Rt=-1,Lt=-1,Ut=0,Qt=0;Array.isArray(ir)||Ae(ir)||u(ir)?Be=ir:("data"in ir&&(Be=ir.data),"usage"in ir&&(Fe=Ie[ir.usage]),"primitive"in ir&&(Rt=Ze[ir.primitive]),"count"in ir&&(Lt=ir.count|0),"type"in ir&&(Qt=Et[ir.type]),"length"in ir?Ut=ir.length|0:(Ut=Lt,Qt===5123||Qt===5122?Ut*=2:(Qt===5125||Qt===5124)&&(Ut*=4))),ct(ar,Be,Fe,Rt,Lt,Ut,Qt)}else nr(),ar.primType=4,ar.vertCount=0,ar.type=5121;return Gt}var nr=Wt.create(null,34963,!0),ar=new er(nr._buffer);return cr.elementsCount++,Gt(_t),Gt._reglType="elements",Gt._elements=ar,Gt.subdata=function(ir,Be){return nr.subdata(ir,Be),Gt},Gt.destroy=function(){qe(ar)},Gt},createStream:function(_t){var It=Mt.pop();return It||(It=new er(Wt.create(null,34963,!0,!1)._buffer)),ct(It,_t,35040,-1,-1,0,0),It},destroyStream:function(_t){Mt.push(_t)},getElements:function(_t){return typeof _t=="function"&&_t._elements instanceof er?_t._elements:null},clear:function(){ye(dt).forEach(qe)}}}function m(ht){for(var Ht=Le.allocType(5123,ht.length),Wt=0;Wt<ht.length;++Wt)if(isNaN(ht[Wt]))Ht[Wt]=65535;else if(ht[Wt]===1/0)Ht[Wt]=31744;else if(ht[Wt]===-1/0)Ht[Wt]=64512;else{Ke[0]=ht[Wt];var ct=nt[0],cr=ct>>>31<<15,er=(ct<<1>>>24)-127,ct=ct>>13&1023;Ht[Wt]=-24>er?cr:-14>er?cr+(ct+1024>>-14-er):15<er?cr+31744:cr+(er+15<<10)+ct}return Ht}function b(ht){return Array.isArray(ht)||Ae(ht)}function E(ht){return"[object "+ht+"]"}function p(ht){return Array.isArray(ht)&&(ht.length===0||typeof ht[0]=="number")}function S(ht){return!!(Array.isArray(ht)&&ht.length!==0&&b(ht[0]))}function w(ht){return Object.prototype.toString.call(ht)}function i(ht){if(!ht)return!1;var Ht=w(ht);return 0<=Ce.indexOf(Ht)?!0:p(ht)||S(ht)||u(ht)}function C(ht,Ht){ht.type===36193?(ht.data=m(Ht),Le.freeType(Ht)):ht.data=Ht}function x(ht,Ht,Wt,cr,er,ct){if(ht=typeof pe[ht]<"u"?pe[ht]:vt[ht]*ge[Ht],ct&&(ht*=6),er){for(cr=0;1<=Wt;)cr+=ht*Wt*Wt,Wt/=2;return cr}return ht*Wt*cr}function k(ht,Ht,Wt,cr,er,ct,qe){function dt(){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 bt(pr,$r){pr.internalformat=$r.internalformat,pr.format=$r.format,pr.type=$r.type,pr.compressed=$r.compressed,pr.premultiplyAlpha=$r.premultiplyAlpha,pr.flipY=$r.flipY,pr.unpackAlignment=$r.unpackAlignment,pr.colorSpace=$r.colorSpace,pr.width=$r.width,pr.height=$r.height,pr.channels=$r.channels}function Et(pr,$r){if(typeof $r=="object"&&$r){"premultiplyAlpha"in $r&&(pr.premultiplyAlpha=$r.premultiplyAlpha),"flipY"in $r&&(pr.flipY=$r.flipY),"alignment"in $r&&(pr.unpackAlignment=$r.alignment),"colorSpace"in $r&&(pr.colorSpace=sn[$r.colorSpace]),"type"in $r&&(pr.type=Jr[$r.type]);var Xr=pr.width,fn=pr.height,zn=pr.channels,pn=!1;"shape"in $r?(Xr=$r.shape[0],fn=$r.shape[1],$r.shape.length===3&&(zn=$r.shape[2],pn=!0)):("radius"in $r&&(Xr=fn=$r.radius),"width"in $r&&(Xr=$r.width),"height"in $r&&(fn=$r.height),"channels"in $r&&(zn=$r.channels,pn=!0)),pr.width=Xr|0,pr.height=fn|0,pr.channels=zn|0,Xr=!1,"format"in $r&&(Xr=$r.format,fn=pr.internalformat=bn[Xr],pr.format=Mn[fn],Xr in Jr&&!("type"in $r)&&(pr.type=Jr[Xr]),Xr in xn&&(pr.compressed=!0),Xr=!0),!pn&&Xr?pr.channels=vt[pr.format]:pn&&!Xr&&pr.channels!==lt[pr.format]&&(pr.format=pr.internalformat=lt[pr.channels])}}function Mt(pr){ht.pixelStorei(37440,pr.flipY),ht.pixelStorei(37441,pr.premultiplyAlpha),ht.pixelStorei(37443,pr.colorSpace),ht.pixelStorei(3317,pr.unpackAlignment)}function _t(){dt.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function It(pr,$r){var Xr=null;if(i($r)?Xr=$r:$r&&(Et(pr,$r),"x"in $r&&(pr.xOffset=$r.x|0),"y"in $r&&(pr.yOffset=$r.y|0),i($r.data)&&(Xr=$r.data)),$r.copy){var fn=er.viewportWidth,zn=er.viewportHeight;pr.width=pr.width||fn-pr.xOffset,pr.height=pr.height||zn-pr.yOffset,pr.needsCopy=!0}else if(!Xr)pr.width=pr.width||1,pr.height=pr.height||1,pr.channels=pr.channels||4;else if(Ae(Xr))pr.channels=pr.channels||4,pr.data=Xr,"type"in $r||pr.type!==5121||(pr.type=_e[Object.prototype.toString.call(Xr)]|0);else if(p(Xr)){switch(pr.channels=pr.channels||4,fn=Xr,zn=fn.length,pr.type){case 5121:case 5123:case 5125:case 5126:zn=Le.allocType(pr.type,zn),zn.set(fn),pr.data=zn;break;case 36193:pr.data=m(fn)}pr.alignment=1,pr.needsFree=!0}else if(u(Xr)){fn=Xr.data,Array.isArray(fn)||pr.type!==5121||(pr.type=_e[Object.prototype.toString.call(fn)]|0);var zn=Xr.shape,pn=Xr.stride,gn,In,Gn,ua;zn.length===3?(Gn=zn[2],ua=pn[2]):ua=Gn=1,gn=zn[0],In=zn[1],zn=pn[0],pn=pn[1],pr.alignment=1,pr.width=gn,pr.height=In,pr.channels=Gn,pr.format=pr.internalformat=lt[Gn],pr.needsFree=!0,gn=ua,Xr=Xr.offset,Gn=pr.width,ua=pr.height,In=pr.channels;for(var Ma=Le.allocType(pr.type===36193?5126:pr.type,Gn*ua*In),xr=0,Rr=0;Rr<ua;++Rr)for(var yr=0;yr<Gn;++yr)for(var Dr=0;Dr<In;++Dr)Ma[xr++]=fn[zn*yr+pn*Rr+gn*Dr+Xr];C(pr,Ma)}else if(w(Xr)===xt||w(Xr)===Je||w(Xr)===Pe)w(Xr)===xt||w(Xr)===Je?pr.element=Xr:pr.element=Xr.canvas,pr.width=pr.element.width,pr.height=pr.element.height,pr.channels=4;else if(w(Xr)===Ue)pr.element=Xr,pr.width=Xr.width,pr.height=Xr.height,pr.channels=4;else if(w(Xr)===He)pr.element=Xr,pr.width=Xr.naturalWidth,pr.height=Xr.naturalHeight,pr.channels=4;else if(w(Xr)===Oe)pr.element=Xr,pr.width=Xr.videoWidth,pr.height=Xr.videoHeight,pr.channels=4;else if(S(Xr)){for(fn=pr.width||Xr[0].length,zn=pr.height||Xr.length,pn=pr.channels,pn=b(Xr[0][0])?pn||Xr[0][0].length:pn||1,gn=Se.shape(Xr),Gn=1,ua=0;ua<gn.length;++ua)Gn*=gn[ua];Gn=Le.allocType(pr.type===36193?5126:pr.type,Gn),Se.flatten(Xr,gn,"",Gn),C(pr,Gn),pr.alignment=1,pr.width=fn,pr.height=zn,pr.channels=pn,pr.format=pr.internalformat=lt[pn],pr.needsFree=!0}}function Gt(pr,$r,Xr,fn,zn){var pn=pr.element,gn=pr.data,In=pr.internalformat,Gn=pr.format,ua=pr.type,Ma=pr.width,xr=pr.height;Mt(pr),pn?ht.texSubImage2D($r,zn,Xr,fn,Gn,ua,pn):pr.compressed?ht.compressedTexSubImage2D($r,zn,Xr,fn,In,Ma,xr,gn):pr.needsCopy?(cr(),ht.copyTexSubImage2D($r,zn,Xr,fn,pr.xOffset,pr.yOffset,Ma,xr)):ht.texSubImage2D($r,zn,Xr,fn,Ma,xr,Gn,ua,gn)}function nr(){return Dn.pop()||new _t}function ar(pr){pr.needsFree&&Le.freeType(pr.data),_t.call(pr),Dn.push(pr)}function ir(){dt.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function Be(pr,$r,Xr){var fn=pr.images[0]=nr();pr.mipmask=1,fn.width=pr.width=$r,fn.height=pr.height=Xr,fn.channels=pr.channels=4}function Fe(pr,$r){var Xr=null;if(i($r))Xr=pr.images[0]=nr(),bt(Xr,pr),It(Xr,$r),pr.mipmask=1;else if(Et(pr,$r),Array.isArray($r.mipmap))for(var fn=$r.mipmap,zn=0;zn<fn.length;++zn)Xr=pr.images[zn]=nr(),bt(Xr,pr),Xr.width>>=zn,Xr.height>>=zn,It(Xr,fn[zn]),pr.mipmask|=1<<zn;else Xr=pr.images[0]=nr(),bt(Xr,pr),It(Xr,$r),pr.mipmask=1;bt(pr,pr.images[0])}function Rt(pr,$r){for(var Xr=pr.images,fn=0;fn<Xr.length&&Xr[fn];++fn){var zn=Xr[fn],pn=$r,gn=fn,In=zn.element,Gn=zn.data,ua=zn.internalformat,Ma=zn.format,xr=zn.type,Rr=zn.width,yr=zn.height;Mt(zn),In?ht.texImage2D(pn,gn,Ma,Ma,xr,In):zn.compressed?ht.compressedTexImage2D(pn,gn,ua,Rr,yr,0,Gn):zn.needsCopy?(cr(),ht.copyTexImage2D(pn,gn,Ma,zn.xOffset,zn.yOffset,Rr,yr,0)):ht.texImage2D(pn,gn,Ma,Rr,yr,0,Ma,xr,Gn||null)}}function Lt(){var pr=Kn.pop()||new ir;dt.call(pr);for(var $r=pr.mipmask=0;16>$r;++$r)pr.images[$r]=null;return pr}function Ut(pr){for(var $r=pr.images,Xr=0;Xr<$r.length;++Xr)$r[Xr]&&ar($r[Xr]),$r[Xr]=null;Kn.push(pr)}function Qt(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function rr(pr,$r){"min"in $r&&(pr.minFilter=Ar[$r.min],0<=it.indexOf(pr.minFilter)&&!("faces"in $r)&&(pr.genMipmaps=!0)),"mag"in $r&&(pr.magFilter=Sr[$r.mag]);var Xr=pr.wrapS,fn=pr.wrapT;if("wrap"in $r){var zn=$r.wrap;typeof zn=="string"?Xr=fn=Or[zn]:Array.isArray(zn)&&(Xr=Or[zn[0]],fn=Or[zn[1]])}else"wrapS"in $r&&(Xr=Or[$r.wrapS]),"wrapT"in $r&&(fn=Or[$r.wrapT]);if(pr.wrapS=Xr,pr.wrapT=fn,"anisotropic"in $r&&(pr.anisotropic=$r.anisotropic),"mipmap"in $r){switch(Xr=!1,typeof $r.mipmap){case"string":pr.mipmapHint=lr[$r.mipmap],Xr=pr.genMipmaps=!0;break;case"boolean":Xr=pr.genMipmaps=$r.mipmap;break;case"object":pr.genMipmaps=!1,Xr=!0}!Xr||"min"in $r||(pr.minFilter=9984)}}function Kt(pr,$r){ht.texParameteri($r,10241,pr.minFilter),ht.texParameteri($r,10240,pr.magFilter),ht.texParameteri($r,10242,pr.wrapS),ht.texParameteri($r,10243,pr.wrapT),Ht.ext_texture_filter_anisotropic&&ht.texParameteri($r,34046,pr.anisotropic),pr.genMipmaps&&(ht.hint(33170,pr.mipmapHint),ht.generateMipmap($r))}function Dt(pr){dt.call(this),this.mipmask=0,this.internalformat=6408,this.id=sa++,this.refCount=1,this.target=pr,this.texture=ht.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Qt,qe.profile&&(this.stats={size:0})}function sr(pr){ht.activeTexture(33984),ht.bindTexture(pr.target,pr.texture)}function fr(){var pr=aa[0];pr?ht.bindTexture(pr.target,pr.texture):ht.bindTexture(3553,null)}function vr(pr){var $r=pr.texture,Xr=pr.unit,fn=pr.target;0<=Xr&&(ht.activeTexture(33984+Xr),ht.bindTexture(fn,null),aa[Xr]=null),ht.deleteTexture($r),pr.texture=null,pr.params=null,pr.pixels=null,pr.refCount=0,delete na[pr.id],ct.textureCount--}var lr={"don't care":4352,"dont care":4352,nice:4354,fast:4353},Or={repeat:10497,clamp:33071,mirror:33648},Sr={nearest:9728,linear:9729},Ar=ne({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},Sr),sn={none:0,browser:37444},Jr={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},bn={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},xn={};Ht.ext_srgb&&(bn.srgb=35904,bn.srgba=35906),Ht.oes_texture_float&&(Jr.float32=Jr.float=5126),Ht.oes_texture_half_float&&(Jr.float16=Jr["half float"]=36193),Ht.webgl_depth_texture&&(ne(bn,{depth:6402,"depth stencil":34041}),ne(Jr,{uint16:5123,uint32:5125,"depth stencil":34042})),Ht.webgl_compressed_texture_s3tc&&ne(xn,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),Ht.webgl_compressed_texture_atc&&ne(xn,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),Ht.webgl_compressed_texture_pvrtc&&ne(xn,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),Ht.webgl_compressed_texture_etc1&&(xn["rgb etc1"]=36196);var or=Array.prototype.slice.call(ht.getParameter(34467));Object.keys(xn).forEach(function(pr){var $r=xn[pr];0<=or.indexOf($r)&&(bn[pr]=$r)});var Lr=Object.keys(bn);Wt.textureFormats=Lr;var Br=[];Object.keys(bn).forEach(function(pr){Br[bn[pr]]=pr});var _r=[];Object.keys(Jr).forEach(function(pr){_r[Jr[pr]]=pr});var Qr=[];Object.keys(Sr).forEach(function(pr){Qr[Sr[pr]]=pr});var un=[];Object.keys(Ar).forEach(function(pr){un[Ar[pr]]=pr});var ln=[];Object.keys(Or).forEach(function(pr){ln[Or[pr]]=pr});var Mn=Lr.reduce(function(pr,$r){var Xr=bn[$r];return Xr===6409||Xr===6406||Xr===6409||Xr===6410||Xr===6402||Xr===34041||Ht.ext_srgb&&(Xr===35904||Xr===35906)?pr[Xr]=Xr:Xr===32855||0<=$r.indexOf("rgba")?pr[Xr]=6408:pr[Xr]=6407,pr},{}),Dn=[],Kn=[],sa=0,na={},Jn=Wt.maxTextureUnits,aa=Array(Jn).map(function(){return null});return ne(Dt.prototype,{bind:function(){this.bindCount+=1;var pr=this.unit;if(0>pr){for(var $r=0;$r<Jn;++$r){var Xr=aa[$r];if(Xr){if(0<Xr.bindCount)continue;Xr.unit=-1}aa[$r]=this,pr=$r;break}qe.profile&&ct.maxTextureUnits<pr+1&&(ct.maxTextureUnits=pr+1),this.unit=pr,ht.activeTexture(33984+pr),ht.bindTexture(this.target,this.texture)}return pr},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&vr(this)}}),qe.profile&&(ct.getTotalTextureSize=function(){var pr=0;return Object.keys(na).forEach(function($r){pr+=na[$r].stats.size}),pr}),{create2D:function(pr,$r){function Xr(zn,pn){var gn=fn.texInfo;Qt.call(gn);var In=Lt();return typeof zn=="number"?typeof pn=="number"?Be(In,zn|0,pn|0):Be(In,zn|0,zn|0):zn?(rr(gn,zn),Fe(In,zn)):Be(In,1,1),gn.genMipmaps&&(In.mipmask=(In.width<<1)-1),fn.mipmask=In.mipmask,bt(fn,In),fn.internalformat=In.internalformat,Xr.width=In.width,Xr.height=In.height,sr(fn),Rt(In,3553),Kt(gn,3553),fr(),Ut(In),qe.profile&&(fn.stats.size=x(fn.internalformat,fn.type,In.width,In.height,gn.genMipmaps,!1)),Xr.format=Br[fn.internalformat],Xr.type=_r[fn.type],Xr.mag=Qr[gn.magFilter],Xr.min=un[gn.minFilter],Xr.wrapS=ln[gn.wrapS],Xr.wrapT=ln[gn.wrapT],Xr}var fn=new Dt(3553);return na[fn.id]=fn,ct.textureCount++,Xr(pr,$r),Xr.subimage=function(zn,pn,gn,In){pn|=0,gn|=0,In|=0;var Gn=nr();return bt(Gn,fn),Gn.width=0,Gn.height=0,It(Gn,zn),Gn.width=Gn.width||(fn.width>>In)-pn,Gn.height=Gn.height||(fn.height>>In)-gn,sr(fn),Gt(Gn,3553,pn,gn,In),fr(),ar(Gn),Xr},Xr.resize=function(zn,pn){var gn=zn|0,In=pn|0||gn;if(gn===fn.width&&In===fn.height)return Xr;Xr.width=fn.width=gn,Xr.height=fn.height=In,sr(fn);for(var Gn=0;fn.mipmask>>Gn;++Gn){var ua=gn>>Gn,Ma=In>>Gn;if(!ua||!Ma)break;ht.texImage2D(3553,Gn,fn.format,ua,Ma,0,fn.format,fn.type,null)}return fr(),qe.profile&&(fn.stats.size=x(fn.internalformat,fn.type,gn,In,!1,!1)),Xr},Xr._reglType="texture2d",Xr._texture=fn,qe.profile&&(Xr.stats=fn.stats),Xr.destroy=function(){fn.decRef()},Xr},createCube:function(pr,$r,Xr,fn,zn,pn){function gn(ua,Ma,xr,Rr,yr,Dr){var vn,En=In.texInfo;for(Qt.call(En),vn=0;6>vn;++vn)Gn[vn]=Lt();if(typeof ua=="number"||!ua)for(ua=ua|0||1,vn=0;6>vn;++vn)Be(Gn[vn],ua,ua);else if(typeof ua=="object")if(Ma)Fe(Gn[0],ua),Fe(Gn[1],Ma),Fe(Gn[2],xr),Fe(Gn[3],Rr),Fe(Gn[4],yr),Fe(Gn[5],Dr);else if(rr(En,ua),Et(In,ua),"faces"in ua)for(ua=ua.faces,vn=0;6>vn;++vn)bt(Gn[vn],In),Fe(Gn[vn],ua[vn]);else for(vn=0;6>vn;++vn)Fe(Gn[vn],ua);for(bt(In,Gn[0]),In.mipmask=En.genMipmaps?(Gn[0].width<<1)-1:Gn[0].mipmask,In.internalformat=Gn[0].internalformat,gn.width=Gn[0].width,gn.height=Gn[0].height,sr(In),vn=0;6>vn;++vn)Rt(Gn[vn],34069+vn);for(Kt(En,34067),fr(),qe.profile&&(In.stats.size=x(In.internalformat,In.type,gn.width,gn.height,En.genMipmaps,!0)),gn.format=Br[In.internalformat],gn.type=_r[In.type],gn.mag=Qr[En.magFilter],gn.min=un[En.minFilter],gn.wrapS=ln[En.wrapS],gn.wrapT=ln[En.wrapT],vn=0;6>vn;++vn)Ut(Gn[vn]);return gn}var In=new Dt(34067);na[In.id]=In,ct.cubeCount++;var Gn=Array(6);return gn(pr,$r,Xr,fn,zn,pn),gn.subimage=function(ua,Ma,xr,Rr,yr){xr|=0,Rr|=0,yr|=0;var Dr=nr();return bt(Dr,In),Dr.width=0,Dr.height=0,It(Dr,Ma),Dr.width=Dr.width||(In.width>>yr)-xr,Dr.height=Dr.height||(In.height>>yr)-Rr,sr(In),Gt(Dr,34069+ua,xr,Rr,yr),fr(),ar(Dr),gn},gn.resize=function(ua){if(ua|=0,ua!==In.width){gn.width=In.width=ua,gn.height=In.height=ua,sr(In);for(var Ma=0;6>Ma;++Ma)for(var xr=0;In.mipmask>>xr;++xr)ht.texImage2D(34069+Ma,xr,In.format,ua>>xr,ua>>xr,0,In.format,In.type,null);return fr(),qe.profile&&(In.stats.size=x(In.internalformat,In.type,gn.width,gn.height,!1,!0)),gn}},gn._reglType="textureCube",gn._texture=In,qe.profile&&(gn.stats=In.stats),gn.destroy=function(){In.decRef()},gn},clear:function(){for(var pr=0;pr<Jn;++pr)ht.activeTexture(33984+pr),ht.bindTexture(3553,null),aa[pr]=null;ye(na).forEach(vr),ct.cubeCount=0,ct.textureCount=0},getTexture:function(pr){return null},restore:function(){for(var pr=0;pr<Jn;++pr){var $r=aa[pr];$r&&($r.bindCount=0,$r.unit=-1,aa[pr]=null)}ye(na).forEach(function(Xr){Xr.texture=ht.createTexture(),ht.bindTexture(Xr.target,Xr.texture);for(var fn=0;32>fn;++fn)if(Xr.mipmask&1<<fn)if(Xr.target===3553)ht.texImage2D(3553,fn,Xr.internalformat,Xr.width>>fn,Xr.height>>fn,0,Xr.internalformat,Xr.type,null);else for(var zn=0;6>zn;++zn)ht.texImage2D(34069+zn,fn,Xr.internalformat,Xr.width>>fn,Xr.height>>fn,0,Xr.internalformat,Xr.type,null);Kt(Xr.texInfo,Xr.target)})},refresh:function(){for(var pr=0;pr<Jn;++pr){var $r=aa[pr];$r&&($r.bindCount=0,$r.unit=-1,aa[pr]=null),ht.activeTexture(33984+pr),ht.bindTexture(3553,null),ht.bindTexture(34067,null)}}}}function I(ht,Ht,Wt,cr,er,ct){function qe(Dt,sr,fr){this.target=Dt,this.texture=sr,this.renderbuffer=fr;var vr=Dt=0;sr?(Dt=sr.width,vr=sr.height):fr&&(Dt=fr.width,vr=fr.height),this.width=Dt,this.height=vr}function dt(Dt){Dt&&(Dt.texture&&Dt.texture._texture.decRef(),Dt.renderbuffer&&Dt.renderbuffer._renderbuffer.decRef())}function bt(Dt,sr,fr){Dt&&(Dt.texture?Dt.texture._texture.refCount+=1:Dt.renderbuffer._renderbuffer.refCount+=1)}function Et(Dt,sr){sr&&(sr.texture?ht.framebufferTexture2D(36160,Dt,sr.target,sr.texture._texture.texture,0):ht.framebufferRenderbuffer(36160,Dt,36161,sr.renderbuffer._renderbuffer.renderbuffer))}function Mt(Dt){var sr=3553,fr=null,vr=null,lr=Dt;return typeof Dt=="object"&&(lr=Dt.data,"target"in Dt&&(sr=Dt.target|0)),Dt=lr._reglType,Dt==="texture2d"||Dt==="textureCube"?fr=lr:Dt==="renderbuffer"&&(vr=lr,sr=36161),new qe(sr,fr,vr)}function _t(Dt,sr,fr,vr,lr){return fr?(Dt=cr.create2D({width:Dt,height:sr,format:vr,type:lr}),Dt._texture.refCount=0,new qe(3553,Dt,null)):(Dt=er.create({width:Dt,height:sr,format:vr}),Dt._renderbuffer.refCount=0,new qe(36161,null,Dt))}function It(Dt){return Dt&&(Dt.texture||Dt.renderbuffer)}function Gt(Dt,sr,fr){Dt&&(Dt.texture?Dt.texture.resize(sr,fr):Dt.renderbuffer&&Dt.renderbuffer.resize(sr,fr),Dt.width=sr,Dt.height=fr)}function nr(){this.id=rr++,Kt[this.id]=this,this.framebuffer=ht.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function ar(Dt){Dt.colorAttachments.forEach(dt),dt(Dt.depthAttachment),dt(Dt.stencilAttachment),dt(Dt.depthStencilAttachment)}function ir(Dt){ht.deleteFramebuffer(Dt.framebuffer),Dt.framebuffer=null,ct.framebufferCount--,delete Kt[Dt.id]}function Be(Dt){var sr;ht.bindFramebuffer(36160,Dt.framebuffer);var fr=Dt.colorAttachments;for(sr=0;sr<fr.length;++sr)Et(36064+sr,fr[sr]);for(sr=fr.length;sr<Wt.maxColorAttachments;++sr)ht.framebufferTexture2D(36160,36064+sr,3553,null,0);ht.framebufferTexture2D(36160,33306,3553,null,0),ht.framebufferTexture2D(36160,36096,3553,null,0),ht.framebufferTexture2D(36160,36128,3553,null,0),Et(36096,Dt.depthAttachment),Et(36128,Dt.stencilAttachment),Et(33306,Dt.depthStencilAttachment),ht.checkFramebufferStatus(36160),ht.isContextLost(),ht.bindFramebuffer(36160,Rt.next?Rt.next.framebuffer:null),Rt.cur=Rt.next,ht.getError()}function Fe(Dt,sr){function fr(lr,Or){var Sr,Ar=0,sn=0,Jr=!0,bn=!0;Sr=null;var xn=!0,or="rgba",Lr="uint8",Br=1,_r=null,Qr=null,un=null,ln=!1;typeof lr=="number"?(Ar=lr|0,sn=Or|0||Ar):lr?("shape"in lr?(sn=lr.shape,Ar=sn[0],sn=sn[1]):("radius"in lr&&(Ar=sn=lr.radius),"width"in lr&&(Ar=lr.width),"height"in lr&&(sn=lr.height)),("color"in lr||"colors"in lr)&&(Sr=lr.color||lr.colors),Sr||("colorCount"in lr&&(Br=lr.colorCount|0),"colorTexture"in lr&&(xn=!!lr.colorTexture,or="rgba4"),"colorType"in lr&&(Lr=lr.colorType,!xn)&&(Lr==="half float"||Lr==="float16"?or="rgba16f":(Lr==="float"||Lr==="float32")&&(or="rgba32f")),"colorFormat"in lr&&(or=lr.colorFormat,0<=Lt.indexOf(or)?xn=!0:0<=Ut.indexOf(or)&&(xn=!1))),("depthTexture"in lr||"depthStencilTexture"in lr)&&(ln=!(!lr.depthTexture&&!lr.depthStencilTexture)),"depth"in lr&&(typeof lr.depth=="boolean"?Jr=lr.depth:(_r=lr.depth,bn=!1)),"stencil"in lr&&(typeof lr.stencil=="boolean"?bn=lr.stencil:(Qr=lr.stencil,Jr=!1)),"depthStencil"in lr&&(typeof lr.depthStencil=="boolean"?Jr=bn=lr.depthStencil:(un=lr.depthStencil,bn=Jr=!1))):Ar=sn=1;var Mn=null,Dn=null,Kn=null,sa=null;if(Array.isArray(Sr))Mn=Sr.map(Mt);else if(Sr)Mn=[Mt(Sr)];else for(Mn=Array(Br),Sr=0;Sr<Br;++Sr)Mn[Sr]=_t(Ar,sn,xn,or,Lr);for(Ar=Ar||Mn[0].width,sn=sn||Mn[0].height,_r?Dn=Mt(_r):Jr&&!bn&&(Dn=_t(Ar,sn,ln,"depth","uint32")),Qr?Kn=Mt(Qr):bn&&!Jr&&(Kn=_t(Ar,sn,!1,"stencil","uint8")),un?sa=Mt(un):!_r&&!Qr&&bn&&Jr&&(sa=_t(Ar,sn,ln,"depth stencil","depth stencil")),Jr=null,Sr=0;Sr<Mn.length;++Sr)bt(Mn[Sr]),Mn[Sr]&&Mn[Sr].texture&&(bn=ke[Mn[Sr].texture._texture.format]*Ve[Mn[Sr].texture._texture.type],Jr===null&&(Jr=bn));return bt(Dn),bt(Kn),bt(sa),ar(vr),vr.width=Ar,vr.height=sn,vr.colorAttachments=Mn,vr.depthAttachment=Dn,vr.stencilAttachment=Kn,vr.depthStencilAttachment=sa,fr.color=Mn.map(It),fr.depth=It(Dn),fr.stencil=It(Kn),fr.depthStencil=It(sa),fr.width=vr.width,fr.height=vr.height,Be(vr),fr}var vr=new nr;return ct.framebufferCount++,fr(Dt,sr),ne(fr,{resize:function(lr,Or){var Sr=Math.max(lr|0,1),Ar=Math.max(Or|0||Sr,1);if(Sr===vr.width&&Ar===vr.height)return fr;for(var sn=vr.colorAttachments,Jr=0;Jr<sn.length;++Jr)Gt(sn[Jr],Sr,Ar);return Gt(vr.depthAttachment,Sr,Ar),Gt(vr.stencilAttachment,Sr,Ar),Gt(vr.depthStencilAttachment,Sr,Ar),vr.width=fr.width=Sr,vr.height=fr.height=Ar,Be(vr),fr},_reglType:"framebuffer",_framebuffer:vr,destroy:function(){ir(vr),ar(vr)},use:function(lr){Rt.setFBO({framebuffer:fr},lr)}})}var Rt={cur:null,next:null,dirty:!1,setFBO:null},Lt=["rgba"],Ut=["rgba4","rgb565","rgb5 a1"];Ht.ext_srgb&&Ut.push("srgba"),Ht.ext_color_buffer_half_float&&Ut.push("rgba16f","rgb16f"),Ht.webgl_color_buffer_float&&Ut.push("rgba32f");var Qt=["uint8"];Ht.oes_texture_half_float&&Qt.push("half float","float16"),Ht.oes_texture_float&&Qt.push("float","float32");var rr=0,Kt={};return ne(Rt,{getFramebuffer:function(Dt){return typeof Dt=="function"&&Dt._reglType==="framebuffer"&&(Dt=Dt._framebuffer,Dt instanceof nr)?Dt:null},create:Fe,createCube:function(Dt){function sr(vr){var lr,Or={color:null},Sr=0,Ar=null;lr="rgba";var sn="uint8",Jr=1;if(typeof vr=="number"?Sr=vr|0:vr?("shape"in vr?Sr=vr.shape[0]:("radius"in vr&&(Sr=vr.radius|0),"width"in vr?Sr=vr.width|0:"height"in vr&&(Sr=vr.height|0)),("color"in vr||"colors"in vr)&&(Ar=vr.color||vr.colors),Ar||("colorCount"in vr&&(Jr=vr.colorCount|0),"colorType"in vr&&(sn=vr.colorType),"colorFormat"in vr&&(lr=vr.colorFormat)),"depth"in vr&&(Or.depth=vr.depth),"stencil"in vr&&(Or.stencil=vr.stencil),"depthStencil"in vr&&(Or.depthStencil=vr.depthStencil)):Sr=1,Ar)if(Array.isArray(Ar))for(vr=[],lr=0;lr<Ar.length;++lr)vr[lr]=Ar[lr];else vr=[Ar];else for(vr=Array(Jr),Ar={radius:Sr,format:lr,type:sn},lr=0;lr<Jr;++lr)vr[lr]=cr.createCube(Ar);for(Or.color=Array(vr.length),lr=0;lr<vr.length;++lr)Jr=vr[lr],Sr=Sr||Jr.width,Or.color[lr]={target:34069,data:vr[lr]};for(lr=0;6>lr;++lr){for(Jr=0;Jr<vr.length;++Jr)Or.color[Jr].target=34069+lr;0<lr&&(Or.depth=fr[0].depth,Or.stencil=fr[0].stencil,Or.depthStencil=fr[0].depthStencil),fr[lr]?fr[lr](Or):fr[lr]=Fe(Or)}return ne(sr,{width:Sr,height:Sr,color:vr})}var fr=Array(6);return sr(Dt),ne(sr,{faces:fr,resize:function(vr){var lr=vr|0;if(lr===sr.width)return sr;var Or=sr.color;for(vr=0;vr<Or.length;++vr)Or[vr].resize(lr);for(vr=0;6>vr;++vr)fr[vr].resize(lr);return sr.width=sr.height=lr,sr},_reglType:"framebufferCube",destroy:function(){fr.forEach(function(vr){vr.destroy()})}})},clear:function(){ye(Kt).forEach(ir)},restore:function(){Rt.cur=null,Rt.next=null,Rt.dirty=!0,ye(Kt).forEach(function(Dt){Dt.framebuffer=ht.createFramebuffer(),Be(Dt)})}})}function B(){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 _(ht,Ht,Wt,cr,er,ct,qe){function dt(Be){if(Be!==ir.currentVAO){var Fe=Ht.oes_vertex_array_object;Be?Fe.bindVertexArrayOES(Be.vao):Fe.bindVertexArrayOES(null),ir.currentVAO=Be}}function bt(Be){if(Be!==ir.currentVAO){if(Be)Be.bindAttrs();else{for(var Fe=Ht.angle_instanced_arrays,Rt=0;Rt<Gt.length;++Rt){var Lt=Gt[Rt];Lt.buffer?(ht.enableVertexAttribArray(Rt),Lt.buffer.bind(),ht.vertexAttribPointer(Rt,Lt.size,Lt.type,Lt.normalized,Lt.stride,Lt.offfset),Fe&&Lt.divisor&&Fe.vertexAttribDivisorANGLE(Rt,Lt.divisor)):(ht.disableVertexAttribArray(Rt),ht.vertexAttrib4f(Rt,Lt.x,Lt.y,Lt.z,Lt.w))}qe.elements?ht.bindBuffer(34963,qe.elements.buffer.buffer):ht.bindBuffer(34963,null)}ir.currentVAO=Be}}function Et(){ye(ar).forEach(function(Be){Be.destroy()})}function Mt(){this.id=++nr,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var Be=Ht.oes_vertex_array_object;this.vao=Be?Be.createVertexArrayOES():null,ar[this.id]=this,this.buffers=[]}function _t(){Ht.oes_vertex_array_object&&ye(ar).forEach(function(Be){Be.refresh()})}var It=Wt.maxAttributes,Gt=Array(It);for(Wt=0;Wt<It;++Wt)Gt[Wt]=new B;var nr=0,ar={},ir={Record:B,scope:{},state:Gt,currentVAO:null,targetVAO:null,restore:Ht.oes_vertex_array_object?_t:function(){},createVAO:function(Be){function Fe(Lt){var Ut;Array.isArray(Lt)?(Ut=Lt,Rt.elements&&Rt.ownsElements&&Rt.elements.destroy(),Rt.elements=null,Rt.ownsElements=!1,Rt.offset=0,Rt.count=0,Rt.instances=-1,Rt.primitive=4):(Lt.elements?(Ut=Lt.elements,Rt.ownsElements?(typeof Ut=="function"&&Ut._reglType==="elements"?Rt.elements.destroy():Rt.elements(Ut),Rt.ownsElements=!1):ct.getElements(Lt.elements)?(Rt.elements=Lt.elements,Rt.ownsElements=!1):(Rt.elements=ct.create(Lt.elements),Rt.ownsElements=!0)):(Rt.elements=null,Rt.ownsElements=!1),Ut=Lt.attributes,Rt.offset=0,Rt.count=-1,Rt.instances=-1,Rt.primitive=4,Rt.elements&&(Rt.count=Rt.elements._elements.vertCount,Rt.primitive=Rt.elements._elements.primType),"offset"in Lt&&(Rt.offset=Lt.offset|0),"count"in Lt&&(Rt.count=Lt.count|0),"instances"in Lt&&(Rt.instances=Lt.instances|0),"primitive"in Lt&&(Rt.primitive=Ze[Lt.primitive])),Lt={};var Qt=Rt.attributes;Qt.length=Ut.length;for(var rr=0;rr<Ut.length;++rr){var Kt=Ut[rr],Dt=Qt[rr]=new B,sr=Kt.data||Kt;if(Array.isArray(sr)||Ae(sr)||u(sr)){var fr;Rt.buffers[rr]&&(fr=Rt.buffers[rr],Ae(sr)&&fr._buffer.byteLength>=sr.byteLength?fr.subdata(sr):(fr.destroy(),Rt.buffers[rr]=null)),Rt.buffers[rr]||(fr=Rt.buffers[rr]=er.create(Kt,34962,!1,!0)),Dt.buffer=er.getBuffer(fr),Dt.size=Dt.buffer.dimension|0,Dt.normalized=!1,Dt.type=Dt.buffer.dtype,Dt.offset=0,Dt.stride=0,Dt.divisor=0,Dt.state=1,Lt[rr]=1}else er.getBuffer(Kt)?(Dt.buffer=er.getBuffer(Kt),Dt.size=Dt.buffer.dimension|0,Dt.normalized=!1,Dt.type=Dt.buffer.dtype,Dt.offset=0,Dt.stride=0,Dt.divisor=0,Dt.state=1):er.getBuffer(Kt.buffer)?(Dt.buffer=er.getBuffer(Kt.buffer),Dt.size=(+Kt.size||Dt.buffer.dimension)|0,Dt.normalized=!!Kt.normalized||!1,Dt.type="type"in Kt?ze[Kt.type]:Dt.buffer.dtype,Dt.offset=(Kt.offset||0)|0,Dt.stride=(Kt.stride||0)|0,Dt.divisor=(Kt.divisor||0)|0,Dt.state=1):"x"in Kt&&(Dt.x=+Kt.x||0,Dt.y=+Kt.y||0,Dt.z=+Kt.z||0,Dt.w=+Kt.w||0,Dt.state=2)}for(fr=0;fr<Rt.buffers.length;++fr)!Lt[fr]&&Rt.buffers[fr]&&(Rt.buffers[fr].destroy(),Rt.buffers[fr]=null);return Rt.refresh(),Fe}var Rt=new Mt;return cr.vaoCount+=1,Fe.destroy=function(){for(var Lt=0;Lt<Rt.buffers.length;++Lt)Rt.buffers[Lt]&&Rt.buffers[Lt].destroy();Rt.buffers.length=0,Rt.ownsElements&&(Rt.elements.destroy(),Rt.elements=null,Rt.ownsElements=!1),Rt.destroy()},Fe._vao=Rt,Fe._reglType="vao",Fe(Be)},getVAO:function(Be){return typeof Be=="function"&&Be._vao?Be._vao:null},destroyBuffer:function(Be){for(var Fe=0;Fe<Gt.length;++Fe){var Rt=Gt[Fe];Rt.buffer===Be&&(ht.disableVertexAttribArray(Fe),Rt.buffer=null)}},setVAO:Ht.oes_vertex_array_object?dt:bt,clear:Ht.oes_vertex_array_object?Et:function(){}};return Mt.prototype.bindAttrs=function(){for(var Be=Ht.angle_instanced_arrays,Fe=this.attributes,Rt=0;Rt<Fe.length;++Rt){var Lt=Fe[Rt];Lt.buffer?(ht.enableVertexAttribArray(Rt),ht.bindBuffer(34962,Lt.buffer.buffer),ht.vertexAttribPointer(Rt,Lt.size,Lt.type,Lt.normalized,Lt.stride,Lt.offset),Be&&Lt.divisor&&Be.vertexAttribDivisorANGLE(Rt,Lt.divisor)):(ht.disableVertexAttribArray(Rt),ht.vertexAttrib4f(Rt,Lt.x,Lt.y,Lt.z,Lt.w))}for(Be=Fe.length;Be<It;++Be)ht.disableVertexAttribArray(Be);(Be=ct.getElements(this.elements))?ht.bindBuffer(34963,Be.buffer.buffer):ht.bindBuffer(34963,null)},Mt.prototype.refresh=function(){var Be=Ht.oes_vertex_array_object;Be&&(Be.bindVertexArrayOES(this.vao),this.bindAttrs(),ir.currentVAO=null,Be.bindVertexArrayOES(null))},Mt.prototype.destroy=function(){if(this.vao){var Be=Ht.oes_vertex_array_object;this===ir.currentVAO&&(ir.currentVAO=null,Be.bindVertexArrayOES(null)),Be.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),ar[this.id]&&(delete ar[this.id],--cr.vaoCount)},ir}function z(ht,Ht,Wt,cr){function er(nr,ar,ir,Be){this.name=nr,this.id=ar,this.location=ir,this.info=Be}function ct(nr,ar){for(var ir=0;ir<nr.length;++ir)if(nr[ir].id===ar.id){nr[ir].location=ar.location;return}nr.push(ar)}function qe(nr,ar,ir){ir=nr===35632?Et:Mt;var Be=ir[ar];if(!Be){var Fe=Ht.str(ar),Be=ht.createShader(nr);ht.shaderSource(Be,Fe),ht.compileShader(Be),ir[ar]=Be}return Be}function dt(nr,ar){this.id=Gt++,this.fragId=nr,this.vertId=ar,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,cr.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function bt(nr,ar,ir){var Be;Be=qe(35632,nr.fragId);var Fe=qe(35633,nr.vertId);if(ar=nr.program=ht.createProgram(),ht.attachShader(ar,Be),ht.attachShader(ar,Fe),ir)for(Be=0;Be<ir.length;++Be)Fe=ir[Be],ht.bindAttribLocation(ar,Fe[0],Fe[1]);ht.linkProgram(ar),Fe=ht.getProgramParameter(ar,35718),cr.profile&&(nr.stats.uniformsCount=Fe);var Rt=nr.uniforms;for(Be=0;Be<Fe;++Be)if(ir=ht.getActiveUniform(ar,Be))if(1<ir.size)for(var Lt=0;Lt<ir.size;++Lt){var Ut=ir.name.replace("[0]","["+Lt+"]");ct(Rt,new er(Ut,Ht.id(Ut),ht.getUniformLocation(ar,Ut),ir))}else ct(Rt,new er(ir.name,Ht.id(ir.name),ht.getUniformLocation(ar,ir.name),ir));for(Fe=ht.getProgramParameter(ar,35721),cr.profile&&(nr.stats.attributesCount=Fe),nr=nr.attributes,Be=0;Be<Fe;++Be)(ir=ht.getActiveAttrib(ar,Be))&&ct(nr,new er(ir.name,Ht.id(ir.name),ht.getAttribLocation(ar,ir.name),ir))}var Et={},Mt={},_t={},It=[],Gt=0;return cr.profile&&(Wt.getMaxUniformsCount=function(){var nr=0;return It.forEach(function(ar){ar.stats.uniformsCount>nr&&(nr=ar.stats.uniformsCount)}),nr},Wt.getMaxAttributesCount=function(){var nr=0;return It.forEach(function(ar){ar.stats.attributesCount>nr&&(nr=ar.stats.attributesCount)}),nr}),{clear:function(){var nr=ht.deleteShader.bind(ht);ye(Et).forEach(nr),Et={},ye(Mt).forEach(nr),Mt={},It.forEach(function(ar){ht.deleteProgram(ar.program)}),It.length=0,_t={},Wt.shaderCount=0},program:function(nr,ar,ir,Be){var Fe=_t[ar];Fe||(Fe=_t[ar]={});var Rt=Fe[nr];if(Rt&&(Rt.refCount++,!Be))return Rt;var Lt=new dt(ar,nr);return Wt.shaderCount++,bt(Lt,ir,Be),Rt||(Fe[nr]=Lt),It.push(Lt),ne(Lt,{destroy:function(){if(Lt.refCount--,0>=Lt.refCount){ht.deleteProgram(Lt.program);var Ut=It.indexOf(Lt);It.splice(Ut,1),Wt.shaderCount--}0>=Fe[Lt.vertId].refCount&&(ht.deleteShader(Mt[Lt.vertId]),delete Mt[Lt.vertId],delete _t[Lt.fragId][Lt.vertId]),Object.keys(_t[Lt.fragId]).length||(ht.deleteShader(Et[Lt.fragId]),delete Et[Lt.fragId],delete _t[Lt.fragId])}})},restore:function(){Et={},Mt={};for(var nr=0;nr<It.length;++nr)bt(It[nr],null,It[nr].attributes.map(function(ar){return[ar.location,ar.name]}))},shader:qe,frag:-1,vert:-1}}function O(ht,Ht,Wt,cr,er,ct,qe){function dt(Et){var Mt;Mt=Ht.next===null?5121:Ht.next.colorAttachments[0].texture._texture.type;var _t=0,It=0,Gt=cr.framebufferWidth,nr=cr.framebufferHeight,ar=null;return Ae(Et)?ar=Et:Et&&(_t=Et.x|0,It=Et.y|0,Gt=(Et.width||cr.framebufferWidth-_t)|0,nr=(Et.height||cr.framebufferHeight-It)|0,ar=Et.data||null),Wt(),Et=Gt*nr*4,ar||(Mt===5121?ar=new Uint8Array(Et):Mt===5126&&(ar=ar||new Float32Array(Et))),ht.pixelStorei(3333,4),ht.readPixels(_t,It,Gt,nr,6408,Mt,ar),ar}function bt(Et){var Mt;return Ht.setFBO({framebuffer:Et.framebuffer},function(){Mt=dt(Et)}),Mt}return function(Et){return Et&&"framebuffer"in Et?bt(Et):dt(Et)}}function F(ht){for(var Ht=Array(ht.length>>2),cr=0;cr<Ht.length;cr++)Ht[cr]=0;for(cr=0;cr<8*ht.length;cr+=8)Ht[cr>>5]|=(ht.charCodeAt(cr/8)&255)<<24-cr%32;var Wt=8*ht.length;ht=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var cr=Array(64),er,ct,qe,dt,bt,Et,Mt,_t,It,Gt,nr;for(Ht[Wt>>5]|=128<<24-Wt%32,Ht[(Wt+64>>9<<4)+15]=Wt,_t=0;_t<Ht.length;_t+=16){for(Wt=ht[0],er=ht[1],ct=ht[2],qe=ht[3],dt=ht[4],bt=ht[5],Et=ht[6],Mt=ht[7],It=0;64>It;It++){if(16>It)cr[It]=Ht[It+_t];else{Gt=It,nr=cr[It-2],nr=j(nr,17)^j(nr,19)^nr>>>10,nr=$(nr,cr[It-7]);var ar;ar=cr[It-15],ar=j(ar,7)^j(ar,18)^ar>>>3,cr[Gt]=$($(nr,ar),cr[It-16])}Gt=dt,Gt=j(Gt,6)^j(Gt,11)^j(Gt,25),Gt=$($($($(Mt,Gt),dt&bt^~dt&Et),je[It]),cr[It]),Mt=Wt,Mt=j(Mt,2)^j(Mt,13)^j(Mt,22),nr=$(Mt,Wt&er^Wt&ct^er&ct),Mt=Et,Et=bt,bt=dt,dt=$(qe,Gt),qe=ct,ct=er,er=Wt,Wt=$(Gt,nr)}ht[0]=$(Wt,ht[0]),ht[1]=$(er,ht[1]),ht[2]=$(ct,ht[2]),ht[3]=$(qe,ht[3]),ht[4]=$(dt,ht[4]),ht[5]=$(bt,ht[5]),ht[6]=$(Et,ht[6]),ht[7]=$(Mt,ht[7])}for(Ht="",cr=0;cr<32*ht.length;cr+=8)Ht+=String.fromCharCode(ht[cr>>5]>>>24-cr%32&255);return Ht}function N(ht){for(var Ht="",Wt,cr=0;cr<ht.length;cr++)Wt=ht.charCodeAt(cr),Ht+="0123456789abcdef".charAt(Wt>>>4&15)+"0123456789abcdef".charAt(Wt&15);return Ht}function V(ht){for(var Ht="",Wt=-1,cr,er;++Wt<ht.length;)cr=ht.charCodeAt(Wt),er=Wt+1<ht.length?ht.charCodeAt(Wt+1):0,55296<=cr&&56319>=cr&&56320<=er&&57343>=er&&(cr=65536+((cr&1023)<<10)+(er&1023),Wt++),127>=cr?Ht+=String.fromCharCode(cr):2047>=cr?Ht+=String.fromCharCode(192|cr>>>6&31,128|cr&63):65535>=cr?Ht+=String.fromCharCode(224|cr>>>12&15,128|cr>>>6&63,128|cr&63):2097151>=cr&&(Ht+=String.fromCharCode(240|cr>>>18&7,128|cr>>>12&63,128|cr>>>6&63,128|cr&63));return Ht}function j(ht,Ht){return ht>>>Ht|ht<<32-Ht}function $(ht,Ht){var Wt=(ht&65535)+(Ht&65535);return(ht>>16)+(Ht>>16)+(Wt>>16)<<16|Wt&65535}function q(ht){return Array.prototype.slice.call(ht)}function oe(ht){return q(ht).join("")}function Z(ht){function Ht(){var Mt=[],_t=[];return ne(function(){Mt.push.apply(Mt,q(arguments))},{def:function(){var It="v"+er++;return _t.push(It),0<arguments.length&&(Mt.push(It,"="),Mt.push.apply(Mt,q(arguments)),Mt.push(";")),It},toString:function(){return oe([0<_t.length?"var "+_t.join(",")+";":"",oe(Mt)])}})}function Wt(){function Mt(ar,ir){It(ar,ir,"=",_t.def(ar,ir),";")}var _t=Ht(),It=Ht(),Gt=_t.toString,nr=It.toString;return ne(function(){_t.apply(_t,q(arguments))},{def:_t.def,entry:_t,exit:It,save:Mt,set:function(ar,ir,Be){Mt(ar,ir),_t(ar,ir,"=",Be,";")},toString:function(){return Gt()+nr()}})}var cr=ht.cache,er=0,ct=[],qe=[],dt=[],bt=Ht(),Et={};return{global:bt,link:function(Mt,_t){var It=_t&&_t.stable;if(!It){for(var Gt=0;Gt<qe.length;++Gt)if(qe[Gt]===Mt&&!dt[Gt])return ct[Gt]}return Gt="g"+er++,ct.push(Gt),qe.push(Mt),dt.push(It),Gt},block:Ht,proc:function(Mt,_t){function It(){var ir="a"+Gt.length;return Gt.push(ir),ir}var Gt=[];_t=_t||0;for(var nr=0;nr<_t;++nr)It();var nr=Wt(),ar=nr.toString;return Et[Mt]=ne(nr,{arg:It,toString:function(){return oe(["function(",Gt.join(),"){",ar(),"}"])}})},scope:Wt,cond:function(){var Mt=oe(arguments),_t=Wt(),It=Wt(),Gt=_t.toString,nr=It.toString;return ne(_t,{then:function(){return _t.apply(_t,q(arguments)),this},else:function(){return It.apply(It,q(arguments)),this},toString:function(){var ar=nr();return ar&&(ar="else{"+ar+"}"),oe(["if(",Mt,"){",Gt(),"}",ar])}})},compile:function(){var Mt=['"use strict";',bt,"return {"];Object.keys(Et).forEach(function(Gt){Mt.push('"',Gt,'":',Et[Gt].toString(),",")}),Mt.push("}");var _t=oe(Mt).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),It;return cr&&(It=N(F(V(_t))),cr[It])?cr[It].apply(null,qe):(_t=Function.apply(null,ct.concat(_t)),cr&&(cr[It]=_t),_t.apply(null,qe))}}}function G(ht){return Array.isArray(ht)||Ae(ht)||u(ht)}function re(ht){return ht.sort(function(Ht,Wt){return Ht==="viewport"?-1:Wt==="viewport"?1:Ht<Wt?-1:1})}function H(ht,Ht,Wt,cr){this.thisDep=ht,this.contextDep=Ht,this.propDep=Wt,this.append=cr}function J(ht){return ht&&!(ht.thisDep||ht.contextDep||ht.propDep)}function ae(ht){return new H(!1,!1,!1,ht)}function K(ht,Ht){var Wt=ht.type;if(Wt===0)return Wt=ht.data.length,new H(!0,1<=Wt,2<=Wt,Ht);if(Wt===4)return Wt=ht.data,new H(Wt.thisDep,Wt.contextDep,Wt.propDep,Ht);if(Wt===5)return new H(!1,!1,!1,Ht);if(Wt===6){for(var cr=Wt=!1,er=!1,ct=0;ct<ht.data.length;++ct){var qe=ht.data[ct];qe.type===1?er=!0:qe.type===2?cr=!0:qe.type===3?Wt=!0:qe.type===0?(Wt=!0,qe=qe.data,1<=qe&&(cr=!0),2<=qe&&(er=!0)):qe.type===4&&(Wt=Wt||qe.data.thisDep,cr=cr||qe.data.contextDep,er=er||qe.data.propDep)}return new H(Wt,cr,er,Ht)}return new H(Wt===3,Wt===2,Wt===1,Ht)}function Y(ht,Ht,Wt,cr,er,ct,qe,dt,bt,Et,Mt,_t,It,Gt,nr,ar){function ir(xr){return xr.replace(".","_")}function Be(xr,Rr,yr){var Dr=ir(xr);pn.push(xr),zn[Dr]=fn[Dr]=!!yr,gn[Dr]=Rr}function Fe(xr,Rr,yr){var Dr=ir(xr);pn.push(xr),Array.isArray(yr)?(fn[Dr]=yr.slice(),zn[Dr]=yr.slice()):fn[Dr]=zn[Dr]=yr,In[Dr]=Rr}function Rt(){var xr=Z({cache:nr}),Rr=xr.link,yr=xr.global;xr.id=Ma++,xr.batchId="0";var Dr=Rr(Gn),vn=xr.shared={props:"a0"};Object.keys(Gn).forEach(function(Vr){vn[Vr]=yr.def(Dr,".",Vr)});var En=xr.next={},an=xr.current={};Object.keys(In).forEach(function(Vr){Array.isArray(fn[Vr])&&(En[Vr]=yr.def(vn.next,".",Vr),an[Vr]=yr.def(vn.current,".",Vr))});var en=xr.constants={};Object.keys(ua).forEach(function(Vr){en[Vr]=yr.def(JSON.stringify(ua[Vr]))}),xr.invoke=function(Vr,zr){switch(zr.type){case 0:var Yr=["this",vn.context,vn.props,xr.batchId];return Vr.def(Rr(zr.data),".call(",Yr.slice(0,Math.max(zr.data.length+1,4)),")");case 1:return Vr.def(vn.props,zr.data);case 2:return Vr.def(vn.context,zr.data);case 3:return Vr.def("this",zr.data);case 4:return zr.data.append(xr,Vr),zr.data.ref;case 5:return zr.data.toString();case 6:return zr.data.map(function(dn){return xr.invoke(Vr,dn)})}},xr.attribCache={};var br={};return xr.scopeAttrib=function(Vr){if(Vr=Ht.id(Vr),Vr in br)return br[Vr];var zr=Et.scope[Vr];return zr||(zr=Et.scope[Vr]=new Jn),br[Vr]=Rr(zr)},xr}function Lt(xr){var Rr=xr.static;xr=xr.dynamic;var yr;if("profile"in Rr){var Dr=!!Rr.profile;yr=ae(function(En,an){return Dr}),yr.enable=Dr}else if("profile"in xr){var vn=xr.profile;yr=K(vn,function(En,an){return En.invoke(an,vn)})}return yr}function Ut(xr,Rr){var yr=xr.static,Dr=xr.dynamic;if("framebuffer"in yr){var vn=yr.framebuffer;return vn?(vn=dt.getFramebuffer(vn),ae(function(an,en){var br=an.link(vn),Vr=an.shared;return en.set(Vr.framebuffer,".next",br),Vr=Vr.context,en.set(Vr,".framebufferWidth",br+".width"),en.set(Vr,".framebufferHeight",br+".height"),br})):ae(function(an,en){var br=an.shared;return en.set(br.framebuffer,".next","null"),br=br.context,en.set(br,".framebufferWidth",br+".drawingBufferWidth"),en.set(br,".framebufferHeight",br+".drawingBufferHeight"),"null"})}if("framebuffer"in Dr){var En=Dr.framebuffer;return K(En,function(an,en){var zr=an.invoke(en,En),br=an.shared,Vr=br.framebuffer,zr=en.def(Vr,".getFramebuffer(",zr,")");return en.set(Vr,".next",zr),br=br.context,en.set(br,".framebufferWidth",zr+"?"+zr+".width:"+br+".drawingBufferWidth"),en.set(br,".framebufferHeight",zr+"?"+zr+".height:"+br+".drawingBufferHeight"),zr})}return null}function Qt(xr,Rr,yr){function Dr(en){if(en in vn){var br=vn[en];en=!0;var Vr=br.x|0,zr=br.y|0,Yr,dn;return"width"in br?Yr=br.width|0:en=!1,"height"in br?dn=br.height|0:en=!1,new H(!en&&Rr&&Rr.thisDep,!en&&Rr&&Rr.contextDep,!en&&Rr&&Rr.propDep,function(Tn,kn){var Pn=Tn.shared.context,fa=Yr;"width"in br||(fa=kn.def(Pn,".","framebufferWidth","-",Vr));var $n=dn;return"height"in br||($n=kn.def(Pn,".","framebufferHeight","-",zr)),[Vr,zr,fa,$n]})}if(en in En){var wn=En[en];return en=K(wn,function(Tn,kn){var ba=Tn.invoke(kn,wn),Pn=Tn.shared.context,fa=kn.def(ba,".x|0"),$n=kn.def(ba,".y|0"),la=kn.def('"width" in ',ba,"?",ba,".width|0:","(",Pn,".","framebufferWidth","-",fa,")"),ba=kn.def('"height" in ',ba,"?",ba,".height|0:","(",Pn,".","framebufferHeight","-",$n,")");return[fa,$n,la,ba]}),Rr&&(en.thisDep=en.thisDep||Rr.thisDep,en.contextDep=en.contextDep||Rr.contextDep,en.propDep=en.propDep||Rr.propDep),en}return Rr?new H(Rr.thisDep,Rr.contextDep,Rr.propDep,function(Tn,kn){var Pn=Tn.shared.context;return[0,0,kn.def(Pn,".","framebufferWidth"),kn.def(Pn,".","framebufferHeight")]}):null}var vn=xr.static,En=xr.dynamic;if(xr=Dr("viewport")){var an=xr;xr=new H(xr.thisDep,xr.contextDep,xr.propDep,function(en,br){var Vr=an.append(en,br),zr=en.shared.context;return br.set(zr,".viewportWidth",Vr[2]),br.set(zr,".viewportHeight",Vr[3]),Vr})}return{viewport:xr,scissor_box:Dr("scissor.box")}}function rr(xr,Rr){var yr=xr.static;if(typeof yr.frag=="string"&&typeof yr.vert=="string"){if(0<Object.keys(Rr.dynamic).length)return null;var yr=Rr.static,Dr=Object.keys(yr);if(0<Dr.length&&typeof yr[Dr[0]]=="number"){for(var vn=[],En=0;En<Dr.length;++En)vn.push([yr[Dr[En]]|0,Dr[En]]);return vn}}return null}function Kt(xr,Rr,yr){function Dr(Vr){if(Vr in vn){var zr=Ht.id(vn[Vr]);return Vr=ae(function(){return zr}),Vr.id=zr,Vr}if(Vr in En){var Yr=En[Vr];return K(Yr,function(dn,wn){var Tn=dn.invoke(wn,Yr);return wn.def(dn.shared.strings,".id(",Tn,")")})}return null}var vn=xr.static,En=xr.dynamic,an=Dr("frag"),en=Dr("vert"),br=null;return J(an)&&J(en)?(br=Mt.program(en.id,an.id,null,yr),xr=ae(function(Vr,zr){return Vr.link(br)})):xr=new H(an&&an.thisDep||en&&en.thisDep,an&&an.contextDep||en&&en.contextDep,an&&an.propDep||en&&en.propDep,function(Vr,zr){var Yr=Vr.shared.shader,dn;dn=an?an.append(Vr,zr):zr.def(Yr,".","frag");var wn;return wn=en?en.append(Vr,zr):zr.def(Yr,".","vert"),zr.def(Yr+".program("+wn+","+dn+")")}),{frag:an,vert:en,progVar:xr,program:br}}function Dt(xr,Rr){function yr(Tn,kn){if(Tn in Dr){var Pn=Dr[Tn]|0;return kn?En.offset=Pn:En.instances=Pn,ae(function($n,la){return kn&&($n.OFFSET=Pn),Pn})}if(Tn in vn){var fa=vn[Tn];return K(fa,function($n,la){var ba=$n.invoke(la,fa);return kn&&($n.OFFSET=ba),ba})}if(kn){if(br)return ae(function($n,la){return $n.OFFSET=0});if(an)return new H(en.thisDep,en.contextDep,en.propDep,function($n,la){return la.def($n.shared.vao+".currentVAO?"+$n.shared.vao+".currentVAO.offset:0")})}else if(an)return new H(en.thisDep,en.contextDep,en.propDep,function($n,la){return la.def($n.shared.vao+".currentVAO?"+$n.shared.vao+".currentVAO.instances:-1")});return null}var Dr=xr.static,vn=xr.dynamic,En={},an=!1,en=function(){if("vao"in Dr){var Tn=Dr.vao;return Tn!==null&&Et.getVAO(Tn)===null&&(Tn=Et.createVAO(Tn)),an=!0,En.vao=Tn,ae(function(Pn){var fa=Et.getVAO(Tn);return fa?Pn.link(fa):"null"})}if("vao"in vn){an=!0;var kn=vn.vao;return K(kn,function(Pn,fa){var $n=Pn.invoke(fa,kn);return fa.def(Pn.shared.vao+".getVAO("+$n+")")})}return null}(),br=!1,Vr=function(){if("elements"in Dr){var Tn=Dr.elements;if(En.elements=Tn,G(Tn)){var kn=En.elements=ct.create(Tn,!0),Tn=ct.getElements(kn);br=!0}else Tn&&(Tn=ct.getElements(Tn),br=!0);return kn=ae(function(fa,$n){if(Tn){var la=fa.link(Tn);return fa.ELEMENTS=la}return fa.ELEMENTS=null}),kn.value=Tn,kn}if("elements"in vn){br=!0;var Pn=vn.elements;return K(Pn,function(fa,$n){var la=fa.shared,ni=la.isBufferArgs,la=la.elements,Xa=fa.invoke($n,Pn),ba=$n.def("null"),ni=$n.def(ni,"(",Xa,")"),Xa=fa.cond(ni).then(ba,"=",la,".createStream(",Xa,");").else(ba,"=",la,".getElements(",Xa,");");return $n.entry(Xa),$n.exit(fa.cond(ni).then(la,".destroyStream(",ba,");")),fa.ELEMENTS=ba})}return an?new H(en.thisDep,en.contextDep,en.propDep,function(fa,$n){return $n.def(fa.shared.vao+".currentVAO?"+fa.shared.elements+".getElements("+fa.shared.vao+".currentVAO.elements):null")}):null}(),zr=yr("offset",!0),Yr=function(){if("primitive"in Dr){var Tn=Dr.primitive;return En.primitive=Tn,ae(function(Pn,fa){return Ze[Tn]})}if("primitive"in vn){var kn=vn.primitive;return K(kn,function(Pn,fa){var $n=Pn.constants.primTypes,la=Pn.invoke(fa,kn);return fa.def($n,"[",la,"]")})}return br?J(Vr)?Vr.value?ae(function(Pn,fa){return fa.def(Pn.ELEMENTS,".primType")}):ae(function(){return 4}):new H(Vr.thisDep,Vr.contextDep,Vr.propDep,function(Pn,fa){var $n=Pn.ELEMENTS;return fa.def($n,"?",$n,".primType:",4)}):an?new H(en.thisDep,en.contextDep,en.propDep,function(Pn,fa){return fa.def(Pn.shared.vao+".currentVAO?"+Pn.shared.vao+".currentVAO.primitive:4")}):null}(),dn=function(){if("count"in Dr){var Tn=Dr.count|0;return En.count=Tn,ae(function(){return Tn})}if("count"in vn){var kn=vn.count;return K(kn,function(Pn,fa){return Pn.invoke(fa,kn)})}return br?J(Vr)?Vr?zr?new H(zr.thisDep,zr.contextDep,zr.propDep,function(Pn,fa){return fa.def(Pn.ELEMENTS,".vertCount-",Pn.OFFSET)}):ae(function(Pn,fa){return fa.def(Pn.ELEMENTS,".vertCount")}):ae(function(){return-1}):new H(Vr.thisDep||zr.thisDep,Vr.contextDep||zr.contextDep,Vr.propDep||zr.propDep,function(Pn,fa){var $n=Pn.ELEMENTS;return Pn.OFFSET?fa.def($n,"?",$n,".vertCount-",Pn.OFFSET,":-1"):fa.def($n,"?",$n,".vertCount:-1")}):an?new H(en.thisDep,en.contextDep,en.propDep,function(Pn,fa){return fa.def(Pn.shared.vao,".currentVAO?",Pn.shared.vao,".currentVAO.count:-1")}):null}(),wn=yr("instances",!1);return{elements:Vr,primitive:Yr,count:dn,instances:wn,offset:zr,vao:en,vaoActive:an,elementsActive:br,static:En}}function sr(xr,Rr){var yr=xr.static,Dr=xr.dynamic,vn={};return pn.forEach(function(En){function an(br,Vr){if(En in yr){var zr=br(yr[En]);vn[en]=ae(function(){return zr})}else if(En in Dr){var Yr=Dr[En];vn[en]=K(Yr,function(dn,wn){return Vr(dn,wn,dn.invoke(wn,Yr))})}}var en=ir(En);switch(En){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 an(function(br){return br},function(br,Vr,zr){return zr});case"depth.func":return an(function(br){return Vt[br]},function(br,Vr,zr){return Vr.def(br.constants.compareFuncs,"[",zr,"]")});case"depth.range":return an(function(br){return br},function(br,Vr,zr){return br=Vr.def("+",zr,"[0]"),Vr=Vr.def("+",zr,"[1]"),[br,Vr]});case"blend.func":return an(function(br){return[Nt["srcRGB"in br?br.srcRGB:br.src],Nt["dstRGB"in br?br.dstRGB:br.dst],Nt["srcAlpha"in br?br.srcAlpha:br.src],Nt["dstAlpha"in br?br.dstAlpha:br.dst]]},function(br,Vr,zr){function Yr(kn,Pn){return Vr.def('"',kn,Pn,'" in ',zr,"?",zr,".",kn,Pn,":",zr,".",kn)}br=br.constants.blendFuncs;var dn=Yr("src","RGB"),Tn=Yr("dst","RGB"),dn=Vr.def(br,"[",dn,"]"),wn=Vr.def(br,"[",Yr("src","Alpha"),"]"),Tn=Vr.def(br,"[",Tn,"]");return br=Vr.def(br,"[",Yr("dst","Alpha"),"]"),[dn,Tn,wn,br]});case"blend.equation":return an(function(br){if(typeof br=="string")return[aa[br],aa[br]];if(typeof br=="object")return[aa[br.rgb],aa[br.alpha]]},function(br,Vr,zr){var Yr=br.constants.blendEquations,dn=Vr.def(),wn=Vr.def();return br=br.cond("typeof ",zr,'==="string"'),br.then(dn,"=",wn,"=",Yr,"[",zr,"];"),br.else(dn,"=",Yr,"[",zr,".rgb];",wn,"=",Yr,"[",zr,".alpha];"),Vr(br),[dn,wn]});case"blend.color":return an(function(br){return s(4,function(Vr){return+br[Vr]})},function(br,Vr,zr){return s(4,function(Yr){return Vr.def("+",zr,"[",Yr,"]")})});case"stencil.mask":return an(function(br){return br|0},function(br,Vr,zr){return Vr.def(zr,"|0")});case"stencil.func":return an(function(br){return[Vt[br.cmp||"keep"],br.ref||0,"mask"in br?br.mask:-1]},function(br,Vr,zr){br=Vr.def('"cmp" in ',zr,"?",br.constants.compareFuncs,"[",zr,".cmp]",":",7680);var Yr=Vr.def(zr,".ref|0");return Vr=Vr.def('"mask" in ',zr,"?",zr,".mask|0:-1"),[br,Yr,Vr]});case"stencil.opFront":case"stencil.opBack":return an(function(br){return[En==="stencil.opBack"?1029:1028,gt[br.fail||"keep"],gt[br.zfail||"keep"],gt[br.zpass||"keep"]]},function(br,Vr,zr){function Yr(wn){return Vr.def('"',wn,'" in ',zr,"?",dn,"[",zr,".",wn,"]:",7680)}var dn=br.constants.stencilOps;return[En==="stencil.opBack"?1029:1028,Yr("fail"),Yr("zfail"),Yr("zpass")]});case"polygonOffset.offset":return an(function(br){return[br.factor|0,br.units|0]},function(br,Vr,zr){return br=Vr.def(zr,".factor|0"),Vr=Vr.def(zr,".units|0"),[br,Vr]});case"cull.face":return an(function(br){var Vr=0;return br==="front"?Vr=1028:br==="back"&&(Vr=1029),Vr},function(br,Vr,zr){return Vr.def(zr,'==="front"?',1028,":",1029)});case"lineWidth":return an(function(br){return br},function(br,Vr,zr){return zr});case"frontFace":return an(function(br){return Ct[br]},function(br,Vr,zr){return Vr.def(zr+'==="cw"?2304:2305')});case"colorMask":return an(function(br){return br.map(function(Vr){return!!Vr})},function(br,Vr,zr){return s(4,function(Yr){return"!!"+zr+"["+Yr+"]"})});case"sample.coverage":return an(function(br){return["value"in br?br.value:1,!!br.invert]},function(br,Vr,zr){return br=Vr.def('"value" in ',zr,"?+",zr,".value:1"),Vr=Vr.def("!!",zr,".invert"),[br,Vr]})}}),vn}function fr(xr,Rr){var yr=xr.static,Dr=xr.dynamic,vn={};return Object.keys(yr).forEach(function(En){var an=yr[En],en;if(typeof an=="number"||typeof an=="boolean")en=ae(function(){return an});else if(typeof an=="function"){var br=an._reglType;br==="texture2d"||br==="textureCube"?en=ae(function(Vr){return Vr.link(an)}):(br==="framebuffer"||br==="framebufferCube")&&(en=ae(function(Vr){return Vr.link(an.color[0])}))}else b(an)&&(en=ae(function(Vr){return Vr.global.def("[",s(an.length,function(zr){return an[zr]}),"]")}));en.value=an,vn[En]=en}),Object.keys(Dr).forEach(function(En){var an=Dr[En];vn[En]=K(an,function(en,br){return en.invoke(br,an)})}),vn}function vr(xr,Rr){var yr=xr.static,Dr=xr.dynamic,vn={};return Object.keys(yr).forEach(function(En){var an=yr[En],en=Ht.id(En),br=new Jn;if(G(an))br.state=1,br.buffer=er.getBuffer(er.create(an,34962,!1,!0)),br.type=0;else{var Vr=er.getBuffer(an);if(Vr)br.state=1,br.buffer=Vr,br.type=0;else if("constant"in an){var zr=an.constant;br.buffer="null",br.state=2,typeof zr=="number"?br.x=zr:at.forEach(function(Pn,fa){fa<zr.length&&(br[Pn]=zr[fa])})}else{var Vr=G(an.buffer)?er.getBuffer(er.create(an.buffer,34962,!1,!0)):er.getBuffer(an.buffer),Yr=an.offset|0,dn=an.stride|0,wn=an.size|0,Tn=!!an.normalized,kn=0;"type"in an&&(kn=ze[an.type]),an=an.divisor|0,br.buffer=Vr,br.state=1,br.size=wn,br.normalized=Tn,br.type=kn||Vr.dtype,br.offset=Yr,br.stride=dn,br.divisor=an}}vn[En]=ae(function(Pn,fa){var $n=Pn.attribCache;if(en in $n)return $n[en];var la={isStream:!1};return Object.keys(br).forEach(function(ba){la[ba]=br[ba]}),br.buffer&&(la.buffer=Pn.link(br.buffer),la.type=la.type||la.buffer+".dtype"),$n[en]=la})}),Object.keys(Dr).forEach(function(En){var an=Dr[En];vn[En]=K(an,function(en,br){function Vr($n){br(Tn[$n],"=",zr,".",$n,"|0;")}var zr=en.invoke(br,an),wn=en.shared,Yr=en.constants,dn=wn.isBufferArgs,wn=wn.buffer,Tn={isStream:br.def(!1)},kn=new Jn;kn.state=1,Object.keys(kn).forEach(function($n){Tn[$n]=br.def(""+kn[$n])});var Pn=Tn.buffer,fa=Tn.type;return br("if(",dn,"(",zr,")){",Tn.isStream,"=true;",Pn,"=",wn,".createStream(",34962,",",zr,");",fa,"=",Pn,".dtype;","}else{",Pn,"=",wn,".getBuffer(",zr,");","if(",Pn,"){",fa,"=",Pn,".dtype;",'}else if("constant" in ',zr,"){",Tn.state,"=",2,";","if(typeof "+zr+'.constant === "number"){',Tn[at[0]],"=",zr,".constant;",at.slice(1).map(function($n){return Tn[$n]}).join("="),"=0;","}else{",at.map(function($n,la){return Tn[$n]+"="+zr+".constant.length>"+la+"?"+zr+".constant["+la+"]:0;"}).join(""),"}}else{","if(",dn,"(",zr,".buffer)){",Pn,"=",wn,".createStream(",34962,",",zr,".buffer);","}else{",Pn,"=",wn,".getBuffer(",zr,".buffer);","}",fa,'="type" in ',zr,"?",Yr.glTypes,"[",zr,".type]:",Pn,".dtype;",Tn.normalized,"=!!",zr,".normalized;"),Vr("size"),Vr("offset"),Vr("stride"),Vr("divisor"),br("}}"),br.exit("if(",Tn.isStream,"){",wn,".destroyStream(",Pn,");","}"),Tn})}),vn}function lr(xr){var Rr=xr.static,yr=xr.dynamic,Dr={};return Object.keys(Rr).forEach(function(vn){var En=Rr[vn];Dr[vn]=ae(function(an,en){return typeof En=="number"||typeof En=="boolean"?""+En:an.link(En)})}),Object.keys(yr).forEach(function(vn){var En=yr[vn];Dr[vn]=K(En,function(an,en){return an.invoke(en,En)})}),Dr}function Or(xr,Rr,yr,Dr,vn){function En(kn){var Pn=en[kn];Pn&&(Vr[kn]=Pn)}var an=rr(xr,Rr),dn=Ut(xr),en=Qt(xr,dn),br=Dt(xr),Vr=sr(xr),zr=Kt(xr,vn,an);En("viewport"),En(ir("scissor.box"));var Yr=0<Object.keys(Vr).length,dn={framebuffer:dn,draw:br,shader:zr,state:Vr,dirty:Yr,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(dn.profile=Lt(xr),dn.uniforms=fr(yr),dn.drawVAO=dn.scopeVAO=br.vao,!dn.drawVAO&&zr.program&&!an&&Wt.angle_instanced_arrays&&br.static.elements){var wn=!0;if(xr=zr.program.attributes.map(function(kn){return kn=Rr.static[kn],wn=wn&&!!kn,kn}),wn&&0<xr.length){var Tn=Et.getVAO(Et.createVAO({attributes:xr,elements:br.static.elements}));dn.drawVAO=new H(null,null,null,function(kn,Pn){return kn.link(Tn)}),dn.useVAO=!0}}return an?dn.useVAO=!0:dn.attributes=vr(Rr),dn.context=lr(Dr),dn}function Sr(xr,Rr,yr){var Dr=xr.shared.context,vn=xr.scope();Object.keys(yr).forEach(function(En){Rr.save(Dr,"."+En);var an=yr[En].append(xr,Rr);Array.isArray(an)?vn(Dr,".",En,"=[",an.join(),"];"):vn(Dr,".",En,"=",an,";")}),Rr(vn)}function Ar(xr,Rr,yr,Dr){var en=xr.shared,vn=en.gl,En=en.framebuffer,an;$r&&(an=Rr.def(en.extensions,".webgl_draw_buffers"));var br=xr.constants,en=br.drawBuffer,br=br.backBuffer;xr=yr?yr.append(xr,Rr):Rr.def(En,".next"),Dr||Rr("if(",xr,"!==",En,".cur){"),Rr("if(",xr,"){",vn,".bindFramebuffer(",36160,",",xr,".framebuffer);"),$r&&Rr(an,".drawBuffersWEBGL(",en,"[",xr,".colorAttachments.length]);"),Rr("}else{",vn,".bindFramebuffer(",36160,",null);"),$r&&Rr(an,".drawBuffersWEBGL(",br,");"),Rr("}",En,".cur=",xr,";"),Dr||Rr("}")}function sn(xr,Rr,yr){var Dr=xr.shared,vn=Dr.gl,En=xr.current,an=xr.next,en=Dr.current,br=Dr.next,Vr=xr.cond(en,".dirty");pn.forEach(function(zr){if(zr=ir(zr),!(zr in yr.state)){var Yr,dn;if(zr in an){Yr=an[zr],dn=En[zr];var wn=s(fn[zr].length,function(Tn){return Vr.def(Yr,"[",Tn,"]")});Vr(xr.cond(wn.map(function(Tn,kn){return Tn+"!=="+dn+"["+kn+"]"}).join("||")).then(vn,".",In[zr],"(",wn,");",wn.map(function(Tn,kn){return dn+"["+kn+"]="+Tn}).join(";"),";"))}else Yr=Vr.def(br,".",zr),wn=xr.cond(Yr,"!==",en,".",zr),Vr(wn),zr in gn?wn(xr.cond(Yr).then(vn,".enable(",gn[zr],");").else(vn,".disable(",gn[zr],");"),en,".",zr,"=",Yr,";"):wn(vn,".",In[zr],"(",Yr,");",en,".",zr,"=",Yr,";")}}),Object.keys(yr.state).length===0&&Vr(en,".dirty=false;"),Rr(Vr)}function Jr(xr,Rr,yr,Dr){var vn=xr.shared,En=xr.current,an=vn.current,en=vn.gl,br;re(Object.keys(yr)).forEach(function(Vr){var zr=yr[Vr];if(!Dr||Dr(zr)){var Yr=zr.append(xr,Rr);if(gn[Vr]){var dn=gn[Vr];J(zr)?(br=xr.link(Yr,{stable:!0}),Rr(xr.cond(br).then(en,".enable(",dn,");").else(en,".disable(",dn,");")),Rr(an,".",Vr,"=",br,";")):(Rr(xr.cond(Yr).then(en,".enable(",dn,");").else(en,".disable(",dn,");")),Rr(an,".",Vr,"=",Yr,";"))}else if(b(Yr)){var wn=En[Vr];Rr(en,".",In[Vr],"(",Yr,");",Yr.map(function(Tn,kn){return wn+"["+kn+"]="+Tn}).join(";"),";")}else J(zr)?(br=xr.link(Yr,{stable:!0}),Rr(en,".",In[Vr],"(",br,");",an,".",Vr,"=",br,";")):Rr(en,".",In[Vr],"(",Yr,");",an,".",Vr,"=",Yr,";")}})}function bn(xr,Rr){pr&&(xr.instancing=Rr.def(xr.shared.extensions,".angle_instanced_arrays"))}function xn(xr,Rr,yr,Dr,vn){function En(){return typeof performance>"u"?"Date.now()":"performance.now()"}function an(kn){wn=Rr.def(),kn(wn,"=",En(),";"),typeof vn=="string"?kn(zr,".count+=",vn,";"):kn(zr,".count++;"),Gt&&(Dr?(Tn=Rr.def(),kn(Tn,"=",dn,".getNumPendingQueries();")):kn(dn,".beginQuery(",zr,");"))}function en(kn){kn(zr,".cpuTime+=",En(),"-",wn,";"),Gt&&(Dr?kn(dn,".pushScopeStats(",Tn,",",dn,".getNumPendingQueries(),",zr,");"):kn(dn,".endQuery();"))}function br(kn){var Pn=Rr.def(Yr,".profile");Rr(Yr,".profile=",kn,";"),Rr.exit(Yr,".profile=",Pn,";")}var Vr=xr.shared,zr=xr.stats,Yr=Vr.current,dn=Vr.timer;yr=yr.profile;var wn,Tn;if(yr){if(J(yr)){yr.enable?(an(Rr),en(Rr.exit),br("true")):br("false");return}yr=yr.append(xr,Rr),br(yr)}else yr=Rr.def(Yr,".profile");Vr=xr.block(),an(Vr),Rr("if(",yr,"){",Vr,"}"),xr=xr.block(),en(xr),Rr.exit("if(",yr,"){",xr,"}")}function or(xr,Rr,yr,Dr,vn){function En(br){switch(br){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}}function an(br,Vr,zr){function Yr(){Rr("if(!",kn,".buffer){",wn,".enableVertexAttribArray(",Tn,");}");var la=zr.type,ba;ba=zr.size?Rr.def(zr.size,"||",Vr):Vr,Rr("if(",kn,".type!==",la,"||",kn,".size!==",ba,"||",$n.map(function(ni){return kn+"."+ni+"!=="+zr[ni]}).join("||"),"){",wn,".bindBuffer(",34962,",",Pn,".buffer);",wn,".vertexAttribPointer(",[Tn,ba,la,zr.normalized,zr.stride,zr.offset],");",kn,".type=",la,";",kn,".size=",ba,";",$n.map(function(ni){return kn+"."+ni+"="+zr[ni]+";"}).join(""),"}"),pr&&(la=zr.divisor,Rr("if(",kn,".divisor!==",la,"){",xr.instancing,".vertexAttribDivisorANGLE(",[Tn,la],");",kn,".divisor=",la,";}"))}function dn(){Rr("if(",kn,".buffer){",wn,".disableVertexAttribArray(",Tn,");",kn,".buffer=null;","}if(",at.map(function(la,ba){return kn+"."+la+"!=="+fa[ba]}).join("||"),"){",wn,".vertexAttrib4f(",Tn,",",fa,");",at.map(function(la,ba){return kn+"."+la+"="+fa[ba]+";"}).join(""),"}")}var wn=en.gl,Tn=Rr.def(br,".location"),kn=Rr.def(en.attributes,"[",Tn,"]");br=zr.state;var Pn=zr.buffer,fa=[zr.x,zr.y,zr.z,zr.w],$n=["buffer","normalized","offset","stride"];br===1?Yr():br===2?dn():(Rr("if(",br,"===",1,"){"),Yr(),Rr("}else{"),dn(),Rr("}"))}var en=xr.shared;Dr.forEach(function(br){var Vr=br.name,zr=yr.attributes[Vr],Yr;if(zr){if(!vn(zr))return;Yr=zr.append(xr,Rr)}else{if(!vn(Yt))return;var dn=xr.scopeAttrib(Vr);Yr={},Object.keys(new Jn).forEach(function(wn){Yr[wn]=Rr.def(dn,".",wn)})}an(xr.link(br),En(br.info.type),Yr)})}function Lr(xr,Rr,yr,Dr,vn,En){for(var an=xr.shared,en=an.gl,br,Vr=0;Vr<Dr.length;++Vr){var wn=Dr[Vr],zr=wn.name,Yr=wn.info.type,dn=yr.uniforms[zr],wn=xr.link(wn)+".location",Tn;if(dn){if(!vn(dn))continue;if(J(dn)){if(zr=dn.value,Yr===35678||Yr===35680)Yr=xr.link(zr._texture||zr.color[0]._texture),Rr(en,".uniform1i(",wn,",",Yr+".bind());"),Rr.exit(Yr,".unbind();");else if(Yr===35674||Yr===35675||Yr===35676)zr=xr.global.def("new Float32Array(["+Array.prototype.slice.call(zr)+"])"),dn=2,Yr===35675?dn=3:Yr===35676&&(dn=4),Rr(en,".uniformMatrix",dn,"fv(",wn,",false,",zr,");");else{switch(Yr){case 5126:br="1f";break;case 35664:br="2f";break;case 35665:br="3f";break;case 35666:br="4f";break;case 35670:br="1i";break;case 5124:br="1i";break;case 35671:br="2i";break;case 35667:br="2i";break;case 35672:br="3i";break;case 35668:br="3i";break;case 35673:br="4i";break;case 35669:br="4i"}Rr(en,".uniform",br,"(",wn,",",b(zr)?Array.prototype.slice.call(zr):zr,");")}continue}else Tn=dn.append(xr,Rr)}else{if(!vn(Yt))continue;Tn=Rr.def(an.uniforms,"[",Ht.id(zr),"]")}switch(Yr===35678?Rr("if(",Tn,"&&",Tn,'._reglType==="framebuffer"){',Tn,"=",Tn,".color[0];","}"):Yr===35680&&Rr("if(",Tn,"&&",Tn,'._reglType==="framebufferCube"){',Tn,"=",Tn,".color[0];","}"),zr=1,Yr){case 35678:case 35680:Yr=Rr.def(Tn,"._texture"),Rr(en,".uniform1i(",wn,",",Yr,".bind());"),Rr.exit(Yr,".unbind();");continue;case 5124:case 35670:br="1i";break;case 35667:case 35671:br="2i",zr=2;break;case 35668:case 35672:br="3i",zr=3;break;case 35669:case 35673:br="4i",zr=4;break;case 5126:br="1f";break;case 35664:br="2f",zr=2;break;case 35665:br="3f",zr=3;break;case 35666:br="4f",zr=4;break;case 35674:br="Matrix2fv";break;case 35675:br="Matrix3fv";break;case 35676:br="Matrix4fv"}if(br.charAt(0)==="M"){Rr(en,".uniform",br,"(",wn,",");var wn=Math.pow(Yr-35674+2,2),kn=xr.global.def("new Float32Array(",wn,")");Array.isArray(Tn)?Rr("false,(",s(wn,function($n){return kn+"["+$n+"]="+Tn[$n]}),",",kn,")"):Rr("false,(Array.isArray(",Tn,")||",Tn," instanceof Float32Array)?",Tn,":(",s(wn,function($n){return kn+"["+$n+"]="+Tn+"["+$n+"]"}),",",kn,")"),Rr(");")}else{if(1<zr){for(var Yr=[],Pn=[],dn=0;dn<zr;++dn)Array.isArray(Tn)?Pn.push(Tn[dn]):Pn.push(Rr.def(Tn+"["+dn+"]")),En&&Yr.push(Rr.def());En&&Rr("if(!",xr.batchId,"||",Yr.map(function(fa,$n){return fa+"!=="+Pn[$n]}).join("||"),"){",Yr.map(function(fa,$n){return fa+"="+Pn[$n]+";"}).join("")),Rr(en,".uniform",br,"(",wn,",",Pn.join(","),");")}else En&&(Yr=Rr.def(),Rr("if(!",xr.batchId,"||",Yr,"!==",Tn,"){",Yr,"=",Tn,";")),Rr(en,".uniform",br,"(",wn,",",Tn,");");En&&Rr("}")}}}function Br(xr,Rr,yr,Dr){function vn(la){var ba=zr[la];return ba?ba.contextDep&&Dr.contextDynamic||ba.propDep?ba.append(xr,yr):ba.append(xr,Rr):Rr.def(Vr,".",la)}function En(){function la(){yr(Pn,".drawElementsInstancedANGLE(",[dn,Tn,fa,wn+"<<(("+fa+"-5121)>>1)",kn],");")}function ba(){yr(Pn,".drawArraysInstancedANGLE(",[dn,wn,Tn,kn],");")}Yr&&Yr!=="null"?$n?la():(yr("if(",Yr,"){"),la(),yr("}else{"),ba(),yr("}")):ba()}function an(){function la(){yr(br+".drawElements("+[dn,Tn,fa,wn+"<<(("+fa+"-5121)>>1)"]+");")}function ba(){yr(br+".drawArrays("+[dn,wn,Tn]+");")}Yr&&Yr!=="null"?$n?la():(yr("if(",Yr,"){"),la(),yr("}else{"),ba(),yr("}")):ba()}var en=xr.shared,br=en.gl,Vr=en.draw,zr=Dr.draw,Yr=function(){var la=zr.elements,ba=Rr;return la?((la.contextDep&&Dr.contextDynamic||la.propDep)&&(ba=yr),la=la.append(xr,ba),zr.elementsActive&&ba("if("+la+")"+br+".bindBuffer(34963,"+la+".buffer.buffer);")):(la=ba.def(),ba(la,"=",Vr,".","elements",";","if(",la,"){",br,".bindBuffer(",34963,",",la,".buffer.buffer);}","else if(",en.vao,".currentVAO){",la,"=",xr.shared.elements+".getElements("+en.vao,".currentVAO.elements);",Xr?"":"if("+la+")"+br+".bindBuffer(34963,"+la+".buffer.buffer);","}")),la}(),dn=vn("primitive"),wn=vn("offset"),Tn=function(){var la=zr.count,ba=Rr;return la?((la.contextDep&&Dr.contextDynamic||la.propDep)&&(ba=yr),la=la.append(xr,ba)):la=ba.def(Vr,".","count"),la}();if(typeof Tn=="number"){if(Tn===0)return}else yr("if(",Tn,"){"),yr.exit("}");var kn,Pn;pr&&(kn=vn("instances"),Pn=xr.instancing);var fa=Yr+".type",$n=zr.elements&&J(zr.elements)&&!zr.vaoActive;pr&&(typeof kn!="number"||0<=kn)?typeof kn=="string"?(yr("if(",kn,">0){"),En(),yr("}else if(",kn,"<0){"),an(),yr("}")):En():an()}function _r(xr,Rr,yr,Dr,vn){return Rr=Rt(),vn=Rr.proc("body",vn),pr&&(Rr.instancing=vn.def(Rr.shared.extensions,".angle_instanced_arrays")),xr(Rr,vn,yr,Dr),Rr.compile().body}function Qr(xr,Rr,yr,Dr){bn(xr,Rr),yr.useVAO?yr.drawVAO?Rr(xr.shared.vao,".setVAO(",yr.drawVAO.append(xr,Rr),");"):Rr(xr.shared.vao,".setVAO(",xr.shared.vao,".targetVAO);"):(Rr(xr.shared.vao,".setVAO(null);"),or(xr,Rr,yr,Dr.attributes,function(){return!0})),Lr(xr,Rr,yr,Dr.uniforms,function(){return!0},!1),Br(xr,Rr,Rr,yr)}function un(xr,Rr){var yr=xr.proc("draw",1);bn(xr,yr),Sr(xr,yr,Rr.context),Ar(xr,yr,Rr.framebuffer),sn(xr,yr,Rr),Jr(xr,yr,Rr.state),xn(xr,yr,Rr,!1,!0);var Dr=Rr.shader.progVar.append(xr,yr);if(yr(xr.shared.gl,".useProgram(",Dr,".program);"),Rr.shader.program)Qr(xr,yr,Rr,Rr.shader.program);else{yr(xr.shared.vao,".setVAO(null);");var vn=xr.global.def("{}"),En=yr.def(Dr,".id"),an=yr.def(vn,"[",En,"]");yr(xr.cond(an).then(an,".call(this,a0);").else(an,"=",vn,"[",En,"]=",xr.link(function(en){return _r(Qr,xr,Rr,en,1)}),"(",Dr,");",an,".call(this,a0);"))}0<Object.keys(Rr.state).length&&yr(xr.shared.current,".dirty=true;"),xr.shared.vao&&yr(xr.shared.vao,".setVAO(null);")}function ln(xr,Rr,yr,Dr){function vn(){return!0}xr.batchId="a1",bn(xr,Rr),or(xr,Rr,yr,Dr.attributes,vn),Lr(xr,Rr,yr,Dr.uniforms,vn,!1),Br(xr,Rr,Rr,yr)}function Mn(xr,Rr,yr,Dr){function vn(Yr){return Yr.contextDep&&an||Yr.propDep}function En(Yr){return!vn(Yr)}bn(xr,Rr);var an=yr.contextDep,en=Rr.def(),br=Rr.def();xr.shared.props=br,xr.batchId=en;var Vr=xr.scope(),zr=xr.scope();Rr(Vr.entry,"for(",en,"=0;",en,"<","a1",";++",en,"){",br,"=","a0","[",en,"];",zr,"}",Vr.exit),yr.needsContext&&Sr(xr,zr,yr.context),yr.needsFramebuffer&&Ar(xr,zr,yr.framebuffer),Jr(xr,zr,yr.state,vn),yr.profile&&vn(yr.profile)&&xn(xr,zr,yr,!1,!0),Dr?(yr.useVAO?yr.drawVAO?vn(yr.drawVAO)?zr(xr.shared.vao,".setVAO(",yr.drawVAO.append(xr,zr),");"):Vr(xr.shared.vao,".setVAO(",yr.drawVAO.append(xr,Vr),");"):Vr(xr.shared.vao,".setVAO(",xr.shared.vao,".targetVAO);"):(Vr(xr.shared.vao,".setVAO(null);"),or(xr,Vr,yr,Dr.attributes,En),or(xr,zr,yr,Dr.attributes,vn)),Lr(xr,Vr,yr,Dr.uniforms,En,!1),Lr(xr,zr,yr,Dr.uniforms,vn,!0),Br(xr,Vr,zr,yr)):(Rr=xr.global.def("{}"),Dr=yr.shader.progVar.append(xr,zr),br=zr.def(Dr,".id"),Vr=zr.def(Rr,"[",br,"]"),zr(xr.shared.gl,".useProgram(",Dr,".program);","if(!",Vr,"){",Vr,"=",Rr,"[",br,"]=",xr.link(function(Yr){return _r(ln,xr,yr,Yr,2)}),"(",Dr,");}",Vr,".call(this,a0[",en,"],",en,");"))}function Dn(xr,Rr){function yr(Vr){return Vr.contextDep&&vn||Vr.propDep}var Dr=xr.proc("batch",2);xr.batchId="0",bn(xr,Dr);var vn=!1,En=!0;Object.keys(Rr.context).forEach(function(Vr){vn=vn||Rr.context[Vr].propDep}),vn||(Sr(xr,Dr,Rr.context),En=!1);var an=Rr.framebuffer,en=!1;if(an?(an.propDep?vn=en=!0:an.contextDep&&vn&&(en=!0),en||Ar(xr,Dr,an)):Ar(xr,Dr,null),Rr.state.viewport&&Rr.state.viewport.propDep&&(vn=!0),sn(xr,Dr,Rr),Jr(xr,Dr,Rr.state,function(Vr){return!yr(Vr)}),Rr.profile&&yr(Rr.profile)||xn(xr,Dr,Rr,!1,"a1"),Rr.contextDep=vn,Rr.needsContext=En,Rr.needsFramebuffer=en,En=Rr.shader.progVar,En.contextDep&&vn||En.propDep)Mn(xr,Dr,Rr,null);else if(En=En.append(xr,Dr),Dr(xr.shared.gl,".useProgram(",En,".program);"),Rr.shader.program)Mn(xr,Dr,Rr,Rr.shader.program);else{Dr(xr.shared.vao,".setVAO(null);");var an=xr.global.def("{}"),en=Dr.def(En,".id"),br=Dr.def(an,"[",en,"]");Dr(xr.cond(br).then(br,".call(this,a0,a1);").else(br,"=",an,"[",en,"]=",xr.link(function(Yr){return _r(Mn,xr,Rr,Yr,2)}),"(",En,");",br,".call(this,a0,a1);"))}0<Object.keys(Rr.state).length&&Dr(xr.shared.current,".dirty=true;"),xr.shared.vao&&Dr(xr.shared.vao,".setVAO(null);")}function Kn(xr,Rr){function yr(en){var br=Rr.shader[en];br&&(br=br.append(xr,Dr),isNaN(br)?Dr.set(vn.shader,"."+en,br):Dr.set(vn.shader,"."+en,xr.link(br,{stable:!0})))}var Dr=xr.proc("scope",3);xr.batchId="a2";var vn=xr.shared,En=vn.current;if(Sr(xr,Dr,Rr.context),Rr.framebuffer&&Rr.framebuffer.append(xr,Dr),re(Object.keys(Rr.state)).forEach(function(en){var br=Rr.state[en],Vr=br.append(xr,Dr);b(Vr)?Vr.forEach(function(zr,Yr){isNaN(zr)?Dr.set(xr.next[en],"["+Yr+"]",zr):Dr.set(xr.next[en],"["+Yr+"]",xr.link(zr,{stable:!0}))}):J(br)?Dr.set(vn.next,"."+en,xr.link(Vr,{stable:!0})):Dr.set(vn.next,"."+en,Vr)}),xn(xr,Dr,Rr,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(en){var br=Rr.draw[en];br&&(br=br.append(xr,Dr),isNaN(br)?Dr.set(vn.draw,"."+en,br):Dr.set(vn.draw,"."+en,xr.link(br),{stable:!0}))}),Object.keys(Rr.uniforms).forEach(function(en){var br=Rr.uniforms[en].append(xr,Dr);Array.isArray(br)&&(br="["+br.map(function(Vr){return isNaN(Vr)?Vr:xr.link(Vr,{stable:!0})})+"]"),Dr.set(vn.uniforms,"["+xr.link(Ht.id(en),{stable:!0})+"]",br)}),Object.keys(Rr.attributes).forEach(function(en){var br=Rr.attributes[en].append(xr,Dr),Vr=xr.scopeAttrib(en);Object.keys(new Jn).forEach(function(zr){Dr.set(Vr,"."+zr,br[zr])})}),Rr.scopeVAO){var an=Rr.scopeVAO.append(xr,Dr);isNaN(an)?Dr.set(vn.vao,".targetVAO",an):Dr.set(vn.vao,".targetVAO",xr.link(an,{stable:!0}))}yr("vert"),yr("frag"),0<Object.keys(Rr.state).length&&(Dr(En,".dirty=true;"),Dr.exit(En,".dirty=true;")),Dr("a1(",xr.shared.context,",a0,",xr.batchId,");")}function sa(xr){if(typeof xr=="object"&&!b(xr)){for(var Rr=Object.keys(xr),yr=0;yr<Rr.length;++yr)if(de.isDynamic(xr[Rr[yr]]))return!0;return!1}}function na(xr,Rr,yr){function Dr(Yr,dn){an.forEach(function(wn){var Tn=vn[wn];de.isDynamic(Tn)&&(Tn=Yr.invoke(dn,Tn),dn(zr,".",wn,"=",Tn,";"))})}var vn=Rr.static[yr];if(vn&&sa(vn)){var En=xr.global,an=Object.keys(vn),en=!1,br=!1,Vr=!1,zr=xr.global.def("{}");an.forEach(function(Yr){var dn=vn[Yr];if(de.isDynamic(dn))typeof dn=="function"&&(dn=vn[Yr]=de.unbox(dn)),Yr=K(dn,null),en=en||Yr.thisDep,Vr=Vr||Yr.propDep,br=br||Yr.contextDep;else{switch(En(zr,".",Yr,"="),typeof dn){case"number":En(dn);break;case"string":En('"',dn,'"');break;case"object":Array.isArray(dn)&&En("[",dn.join(),"]");break;default:En(xr.link(dn))}En(";")}}),Rr.dynamic[yr]=new de.DynamicVariable(4,{thisDep:en,contextDep:br,propDep:Vr,ref:zr,append:Dr}),delete Rr.static[yr]}}var Jn=Et.Record,aa={add:32774,subtract:32778,"reverse subtract":32779};Wt.ext_blend_minmax&&(aa.min=32775,aa.max=32776);var pr=Wt.angle_instanced_arrays,$r=Wt.webgl_draw_buffers,Xr=Wt.oes_vertex_array_object,fn={dirty:!0,profile:ar.profile},zn={},pn=[],gn={},In={};Be("dither",3024),Be("blend.enable",3042),Fe("blend.color","blendColor",[0,0,0,0]),Fe("blend.equation","blendEquationSeparate",[32774,32774]),Fe("blend.func","blendFuncSeparate",[1,0,1,0]),Be("depth.enable",2929,!0),Fe("depth.func","depthFunc",513),Fe("depth.range","depthRange",[0,1]),Fe("depth.mask","depthMask",!0),Fe("colorMask","colorMask",[!0,!0,!0,!0]),Be("cull.enable",2884),Fe("cull.face","cullFace",1029),Fe("frontFace","frontFace",2305),Fe("lineWidth","lineWidth",1),Be("polygonOffset.enable",32823),Fe("polygonOffset.offset","polygonOffset",[0,0]),Be("sample.alpha",32926),Be("sample.enable",32928),Fe("sample.coverage","sampleCoverage",[1,!1]),Be("stencil.enable",2960),Fe("stencil.mask","stencilMask",-1),Fe("stencil.func","stencilFunc",[519,0,-1]),Fe("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),Fe("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),Be("scissor.enable",3089),Fe("scissor.box","scissor",[0,0,ht.drawingBufferWidth,ht.drawingBufferHeight]),Fe("viewport","viewport",[0,0,ht.drawingBufferWidth,ht.drawingBufferHeight]);var Gn={gl:ht,context:It,strings:Ht,next:zn,current:fn,draw:_t,elements:ct,buffer:er,shader:Mt,attributes:Et.state,vao:Et,uniforms:bt,framebuffer:dt,extensions:Wt,timer:Gt,isBufferArgs:G},ua={primTypes:Ze,compareFuncs:Vt,blendFuncs:Nt,blendEquations:aa,stencilOps:gt,glTypes:ze,orientationType:Ct};$r&&(ua.backBuffer=[1029],ua.drawBuffer=s(cr.maxDrawbuffers,function(xr){return xr===0?[0]:s(xr,function(Rr){return 36064+Rr})}));var Ma=0;return{next:zn,current:fn,procs:function(){var xr=Rt(),Rr=xr.proc("poll"),yr=xr.proc("refresh"),Dr=xr.block();Rr(Dr),yr(Dr);var br=xr.shared,vn=br.gl,En=br.next,an=br.current;Dr(an,".dirty=false;"),Ar(xr,Rr),Ar(xr,yr,null,!0);var en;pr&&(en=xr.link(pr)),Wt.oes_vertex_array_object&&yr(xr.link(Wt.oes_vertex_array_object),".bindVertexArrayOES(null);");var br=yr.def(br.attributes),Vr=yr.def(0),zr=xr.cond(Vr,".buffer");zr.then(vn,".enableVertexAttribArray(i);",vn,".bindBuffer(",34962,",",Vr,".buffer.buffer);",vn,".vertexAttribPointer(i,",Vr,".size,",Vr,".type,",Vr,".normalized,",Vr,".stride,",Vr,".offset);").else(vn,".disableVertexAttribArray(i);",vn,".vertexAttrib4f(i,",Vr,".x,",Vr,".y,",Vr,".z,",Vr,".w);",Vr,".buffer=null;");var Yr=xr.link(cr.maxAttributes,{stable:!0});return yr("for(var i=0;i<",Yr,";++i){",Vr,"=",br,"[i];",zr,"}"),pr&&yr("for(var i=0;i<",Yr,";++i){",en,".vertexAttribDivisorANGLE(i,",br,"[i].divisor);","}"),yr(xr.shared.vao,".currentVAO=null;",xr.shared.vao,".setVAO(",xr.shared.vao,".targetVAO);"),Object.keys(gn).forEach(function(dn){var wn=gn[dn],Tn=Dr.def(En,".",dn),kn=xr.block();kn("if(",Tn,"){",vn,".enable(",wn,")}else{",vn,".disable(",wn,")}",an,".",dn,"=",Tn,";"),yr(kn),Rr("if(",Tn,"!==",an,".",dn,"){",kn,"}")}),Object.keys(In).forEach(function(dn){var wn=In[dn],Tn=fn[dn],kn,Pn,fa=xr.block();fa(vn,".",wn,"("),b(Tn)?(wn=Tn.length,kn=xr.global.def(En,".",dn),Pn=xr.global.def(an,".",dn),fa(s(wn,function($n){return kn+"["+$n+"]"}),");",s(wn,function($n){return Pn+"["+$n+"]="+kn+"["+$n+"];"}).join("")),Rr("if(",s(wn,function($n){return kn+"["+$n+"]!=="+Pn+"["+$n+"]"}).join("||"),"){",fa,"}")):(kn=Dr.def(En,".",dn),Pn=Dr.def(an,".",dn),fa(kn,");",an,".",dn,"=",kn,";"),Rr("if(",kn,"!==",Pn,"){",fa,"}")),yr(fa)}),xr.compile()}(),compile:function(xr,Rr,yr,Dr,vn){var En=Rt();En.stats=En.link(vn),Object.keys(Rr.static).forEach(function(en){na(En,Rr,en)}),ut.forEach(function(en){na(En,xr,en)});var an=Or(xr,Rr,yr,Dr,En);return an.shader.program&&(an.shader.program.attributes.sort(function(en,br){return en.name<br.name?-1:1}),an.shader.program.uniforms.sort(function(en,br){return en.name<br.name?-1:1})),un(En,an),Kn(En,an),Dn(En,an),ne(En.compile(),{destroy:function(){an.shader.program.destroy()}})}}}function ie(ht,Ht){for(var Wt=0;Wt<ht.length;++Wt)if(ht[Wt]===Ht)return Wt;return-1}var ne=function(ht,Ht){for(var Wt=Object.keys(Ht),cr=0;cr<Wt.length;++cr)ht[Wt[cr]]=Ht[Wt[cr]];return ht},le=0,de={DynamicVariable:X,define:function(ht,Ht){return new X(ht,A(Ht+""))},isDynamic:function(ht){return typeof ht=="function"&&!ht._reglType||ht instanceof X},unbox:P,accessor:A},we={next:typeof requestAnimationFrame=="function"?function(ht){return requestAnimationFrame(ht)}:function(ht){return setTimeout(ht,16)},cancel:typeof cancelAnimationFrame=="function"?function(ht){return cancelAnimationFrame(ht)}:clearTimeout},me=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date},Le=c();Le.zero=c();var ve=function(ht,Ht){var Wt=1;Ht.ext_texture_filter_anisotropic&&(Wt=ht.getParameter(34047));var cr=1,er=1;Ht.webgl_draw_buffers&&(cr=ht.getParameter(34852),er=ht.getParameter(36063));var ct=!!Ht.oes_texture_float;if(ct){ct=ht.createTexture(),ht.bindTexture(3553,ct),ht.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var qe=ht.createFramebuffer();if(ht.bindFramebuffer(36160,qe),ht.framebufferTexture2D(36160,36064,3553,ct,0),ht.bindTexture(3553,null),ht.checkFramebufferStatus(36160)!==36053)ct=!1;else{ht.viewport(0,0,1,1),ht.clearColor(1,0,0,1),ht.clear(16384);var dt=Le.allocType(5126,4);ht.readPixels(0,0,1,1,6408,5126,dt),ht.getError()?ct=!1:(ht.deleteFramebuffer(qe),ht.deleteTexture(ct),ct=dt[0]===1),Le.freeType(dt)}}return dt=!0,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(dt=ht.createTexture(),qe=Le.allocType(5121,36),ht.activeTexture(33984),ht.bindTexture(34067,dt),ht.texImage2D(34069,0,6408,3,3,0,6408,5121,qe),Le.freeType(qe),ht.bindTexture(34067,null),ht.deleteTexture(dt),dt=!ht.getError()),{colorBits:[ht.getParameter(3410),ht.getParameter(3411),ht.getParameter(3412),ht.getParameter(3413)],depthBits:ht.getParameter(3414),stencilBits:ht.getParameter(3415),subpixelBits:ht.getParameter(3408),extensions:Object.keys(Ht).filter(function(bt){return!!Ht[bt]}),maxAnisotropic:Wt,maxDrawbuffers:cr,maxColorAttachments:er,pointSizeDims:ht.getParameter(33901),lineWidthDims:ht.getParameter(33902),maxViewportDims:ht.getParameter(3386),maxCombinedTextureUnits:ht.getParameter(35661),maxCubeMapSize:ht.getParameter(34076),maxRenderbufferSize:ht.getParameter(34024),maxTextureUnits:ht.getParameter(34930),maxTextureSize:ht.getParameter(3379),maxAttributes:ht.getParameter(34921),maxVertexUniforms:ht.getParameter(36347),maxVertexTextureUnits:ht.getParameter(35660),maxVaryingVectors:ht.getParameter(36348),maxFragmentUniforms:ht.getParameter(36349),glsl:ht.getParameter(35724),renderer:ht.getParameter(7937),vendor:ht.getParameter(7936),version:ht.getParameter(7938),readFloat:ct,npotTextureCube:dt}},Ae=function(ht){return ht instanceof Uint8Array||ht instanceof Uint16Array||ht instanceof Uint32Array||ht instanceof Int8Array||ht instanceof Int16Array||ht instanceof Int32Array||ht instanceof Float32Array||ht instanceof Float64Array||ht instanceof Uint8ClampedArray},ye=function(ht){return Object.keys(ht).map(function(Ht){return ht[Ht]})},Se={shape:function(ht){for(var Ht=[];ht.length;ht=ht[0])Ht.push(ht.length);return Ht},flatten:function(ht,Ht,Wt,cr){var er=1;if(Ht.length)for(var ct=0;ct<Ht.length;++ct)er*=Ht[ct];else er=0;switch(Wt=cr||Le.allocType(Wt,er),Ht.length){case 0:break;case 1:for(cr=Ht[0],Ht=0;Ht<cr;++Ht)Wt[Ht]=ht[Ht];break;case 2:for(cr=Ht[0],Ht=Ht[1],ct=er=0;ct<cr;++ct)for(var qe=ht[ct],dt=0;dt<Ht;++dt)Wt[er++]=qe[dt];break;case 3:l(ht,Ht[0],Ht[1],Ht[2],Wt,0);break;default:y(ht,Ht,0,Wt,0)}return Wt}},_e={"[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},ze={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ie={dynamic:35048,stream:35040,static:35044},Ne=Se.flatten,et=Se.shape,st=[];st[5120]=1,st[5122]=2,st[5124]=4,st[5121]=1,st[5123]=2,st[5125]=4,st[5126]=4;var Ze={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ke=new Float32Array(1),nt=new Uint32Array(Ke.buffer),it=[9984,9986,9985,9987],lt=[0,6409,6410,6407,6408],vt={};vt[6409]=vt[6406]=vt[6402]=1,vt[34041]=vt[6410]=2,vt[6407]=vt[35904]=3,vt[6408]=vt[35906]=4;var xt=E("HTMLCanvasElement"),Je=E("OffscreenCanvas"),Pe=E("CanvasRenderingContext2D"),Ue=E("ImageBitmap"),He=E("HTMLImageElement"),Oe=E("HTMLVideoElement"),Ce=Object.keys(_e).concat([xt,Je,Pe,Ue,He,Oe]),ge=[];ge[5121]=1,ge[5126]=4,ge[36193]=2,ge[5123]=2,ge[5125]=4;var pe=[];pe[32854]=2,pe[32855]=2,pe[36194]=2,pe[34041]=4,pe[33776]=.5,pe[33777]=.5,pe[33778]=1,pe[33779]=1,pe[35986]=.5,pe[35987]=1,pe[34798]=1,pe[35840]=.5,pe[35841]=.25,pe[35842]=.5,pe[35843]=.25,pe[36196]=.5;var Te=[];Te[32854]=2,Te[32855]=2,Te[36194]=2,Te[33189]=2,Te[36168]=1,Te[34041]=4,Te[35907]=4,Te[34836]=16,Te[34842]=8,Te[34843]=6;var be=function(ht,Ht,Wt,cr,er){function ct(_t){this.id=Et++,this.refCount=1,this.renderbuffer=_t,this.format=32854,this.height=this.width=0,er.profile&&(this.stats={size:0})}function qe(_t){var It=_t.renderbuffer;ht.bindRenderbuffer(36161,null),ht.deleteRenderbuffer(It),_t.renderbuffer=null,_t.refCount=0,delete Mt[_t.id],cr.renderbufferCount--}var dt={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};Ht.ext_srgb&&(dt.srgba=35907),Ht.ext_color_buffer_half_float&&(dt.rgba16f=34842,dt.rgb16f=34843),Ht.webgl_color_buffer_float&&(dt.rgba32f=34836);var bt=[];Object.keys(dt).forEach(function(_t){bt[dt[_t]]=_t});var Et=0,Mt={};return ct.prototype.decRef=function(){0>=--this.refCount&&qe(this)},er.profile&&(cr.getTotalRenderbufferSize=function(){var _t=0;return Object.keys(Mt).forEach(function(It){_t+=Mt[It].stats.size}),_t}),{create:function(_t,It){function Gt(ar,ir){var Be=0,Fe=0,Rt=32854;if(typeof ar=="object"&&ar?("shape"in ar?(Fe=ar.shape,Be=Fe[0]|0,Fe=Fe[1]|0):("radius"in ar&&(Be=Fe=ar.radius|0),"width"in ar&&(Be=ar.width|0),"height"in ar&&(Fe=ar.height|0)),"format"in ar&&(Rt=dt[ar.format])):typeof ar=="number"?(Be=ar|0,Fe=typeof ir=="number"?ir|0:Be):ar||(Be=Fe=1),Be!==nr.width||Fe!==nr.height||Rt!==nr.format)return Gt.width=nr.width=Be,Gt.height=nr.height=Fe,nr.format=Rt,ht.bindRenderbuffer(36161,nr.renderbuffer),ht.renderbufferStorage(36161,Rt,Be,Fe),er.profile&&(nr.stats.size=Te[nr.format]*nr.width*nr.height),Gt.format=bt[nr.format],Gt}var nr=new ct(ht.createRenderbuffer());return Mt[nr.id]=nr,cr.renderbufferCount++,Gt(_t,It),Gt.resize=function(ar,ir){var Be=ar|0,Fe=ir|0||Be;return Be===nr.width&&Fe===nr.height||(Gt.width=nr.width=Be,Gt.height=nr.height=Fe,ht.bindRenderbuffer(36161,nr.renderbuffer),ht.renderbufferStorage(36161,nr.format,Be,Fe),er.profile&&(nr.stats.size=Te[nr.format]*nr.width*nr.height)),Gt},Gt._reglType="renderbuffer",Gt._renderbuffer=nr,er.profile&&(Gt.stats=nr.stats),Gt.destroy=function(){nr.decRef()},Gt},clear:function(){ye(Mt).forEach(qe)},restore:function(){ye(Mt).forEach(function(_t){_t.renderbuffer=ht.createRenderbuffer(),ht.bindRenderbuffer(36161,_t.renderbuffer),ht.renderbufferStorage(36161,_t.format,_t.width,_t.height)}),ht.bindRenderbuffer(36161,null)}}},ke=[];ke[6408]=4,ke[6407]=3;var Ve=[];Ve[5121]=1,Ve[5126]=4,Ve[36193]=2;var je=[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],at=["x","y","z","w"],ut="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Nt={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},Vt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ct={cw:2304,ccw:2305},Yt=new H(!1,!1,!1,function(){}),gr=function(ht,Ht){function Wt(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function cr(Mt,_t,It){var Gt=qe.pop()||new Wt;Gt.startQueryIndex=Mt,Gt.endQueryIndex=_t,Gt.sum=0,Gt.stats=It,dt.push(Gt)}if(!Ht.ext_disjoint_timer_query)return null;var er=[],ct=[],qe=[],dt=[],bt=[],Et=[];return{beginQuery:function(Mt){var _t=er.pop()||Ht.ext_disjoint_timer_query.createQueryEXT();Ht.ext_disjoint_timer_query.beginQueryEXT(35007,_t),ct.push(_t),cr(ct.length-1,ct.length,Mt)},endQuery:function(){Ht.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:cr,update:function(){var Mt,_t;if(Mt=ct.length,Mt!==0){Et.length=Math.max(Et.length,Mt+1),bt.length=Math.max(bt.length,Mt+1),bt[0]=0;var It=Et[0]=0;for(_t=Mt=0;_t<ct.length;++_t){var Gt=ct[_t];Ht.ext_disjoint_timer_query.getQueryObjectEXT(Gt,34919)?(It+=Ht.ext_disjoint_timer_query.getQueryObjectEXT(Gt,34918),er.push(Gt)):ct[Mt++]=Gt,bt[_t+1]=It,Et[_t+1]=Mt}for(ct.length=Mt,_t=Mt=0;_t<dt.length;++_t){var It=dt[_t],nr=It.startQueryIndex,Gt=It.endQueryIndex;It.sum+=bt[Gt]-bt[nr],nr=Et[nr],Gt=Et[Gt],Gt===nr?(It.stats.gpuTime+=It.sum/1e6,qe.push(It)):(It.startQueryIndex=nr,It.endQueryIndex=Gt,dt[Mt++]=It)}dt.length=Mt}},getNumPendingQueries:function(){return ct.length},clear:function(){er.push.apply(er,ct);for(var Mt=0;Mt<er.length;Mt++)Ht.ext_disjoint_timer_query.deleteQueryEXT(er[Mt]);ct.length=0,er.length=0},restore:function(){ct.length=0,er.length=0}}};return function(ht){function Ht(){if(xn.length===0)Rt&&Rt.update(),_r=null;else{_r=we.next(Ht),Mt();for(var un=xn.length-1;0<=un;--un){var ln=xn[un];ln&&ln(Qt,null,0)}Gt.flush(),Rt&&Rt.update()}}function Wt(){!_r&&0<xn.length&&(_r=we.next(Ht))}function cr(){_r&&(we.cancel(Ht),_r=null)}function er(un){un.preventDefault(),cr(),or.forEach(function(ln){ln()})}function ct(un){Gt.getError(),ar.restore(),vr.restore(),Dt.restore(),lr.restore(),Or.restore(),Sr.restore(),fr.restore(),Rt&&Rt.restore(),Ar.procs.refresh(),Wt(),Lr.forEach(function(ln){ln()})}function qe(un){function ln(fn,zn){var pn={},gn={};return Object.keys(fn).forEach(function(In){var Gn=fn[In];if(de.isDynamic(Gn))gn[In]=de.unbox(Gn,In);else{if(zn&&Array.isArray(Gn)){for(var ua=0;ua<Gn.length;++ua)if(de.isDynamic(Gn[ua])){gn[In]=de.unbox(Gn,In);return}}pn[In]=Gn}}),{dynamic:gn,static:pn}}function Mn(fn){for(;Xr.length<fn;)Xr.push(null);return Xr}var Dn=ln(un.context||{},!0),Kn=ln(un.uniforms||{},!0),sa=ln(un.attributes||{},!1);un=ln(function(fn){function zn(gn){if(gn in pn){var In=pn[gn];delete pn[gn],Object.keys(In).forEach(function(Gn){pn[gn+"."+Gn]=In[Gn]})}}var pn=ne({},fn);return delete pn.uniforms,delete pn.attributes,delete pn.context,delete pn.vao,"stencil"in pn&&pn.stencil.op&&(pn.stencil.opBack=pn.stencil.opFront=pn.stencil.op,delete pn.stencil.op),zn("blend"),zn("depth"),zn("cull"),zn("stencil"),zn("polygonOffset"),zn("scissor"),zn("sample"),"vao"in fn&&(pn.vao=fn.vao),pn}(un),!1);var na={gpuTime:0,cpuTime:0,count:0},Jn=Ar.compile(un,sa,Kn,Dn,na),aa=Jn.draw,pr=Jn.batch,$r=Jn.scope,Xr=[];return ne(function(fn,zn){var pn;if(typeof fn=="function")return $r.call(this,null,fn,0);if(typeof zn=="function")if(typeof fn=="number")for(pn=0;pn<fn;++pn)$r.call(this,null,zn,pn);else if(Array.isArray(fn))for(pn=0;pn<fn.length;++pn)$r.call(this,fn[pn],zn,pn);else return $r.call(this,fn,zn,0);else if(typeof fn=="number"){if(0<fn)return pr.call(this,Mn(fn|0),fn|0)}else if(Array.isArray(fn)){if(fn.length)return pr.call(this,fn,fn.length)}else return aa.call(this,fn)},{stats:na,destroy:function(){Jn.destroy()}})}function dt(un,ln){var Mn=0;Ar.procs.poll();var Dn=ln.color;Dn&&(Gt.clearColor(+Dn[0]||0,+Dn[1]||0,+Dn[2]||0,+Dn[3]||0),Mn|=16384),"depth"in ln&&(Gt.clearDepth(+ln.depth),Mn|=256),"stencil"in ln&&(Gt.clearStencil(ln.stencil|0),Mn|=1024),Gt.clear(Mn)}function bt(un){return xn.push(un),Wt(),{cancel:function(){function ln(){var Dn=ie(xn,ln);xn[Dn]=xn[xn.length-1],--xn.length,0>=xn.length&&cr()}var Mn=ie(xn,un);xn[Mn]=ln}}}function Et(){var un=Jr.viewport,ln=Jr.scissor_box;un[0]=un[1]=ln[0]=ln[1]=0,Qt.viewportWidth=Qt.framebufferWidth=Qt.drawingBufferWidth=un[2]=ln[2]=Gt.drawingBufferWidth,Qt.viewportHeight=Qt.framebufferHeight=Qt.drawingBufferHeight=un[3]=ln[3]=Gt.drawingBufferHeight}function Mt(){Qt.tick+=1,Qt.time=It(),Et(),Ar.procs.poll()}function _t(){lr.refresh(),Et(),Ar.procs.refresh(),Rt&&Rt.update()}function It(){return(me()-Lt)/1e3}if(ht=r(ht),!ht)return null;var Gt=ht.gl,nr=Gt.getContextAttributes();Gt.isContextLost();var ar=t(Gt,ht);if(!ar)return null;var sn=o(),ir={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Be=ht.cachedCode||{},Fe=ar.extensions,Rt=gr(Gt,Fe),Lt=me(),rr=Gt.drawingBufferWidth,Ut=Gt.drawingBufferHeight,Qt={tick:0,time:0,viewportWidth:rr,viewportHeight:Ut,framebufferWidth:rr,framebufferHeight:Ut,drawingBufferWidth:rr,drawingBufferHeight:Ut,pixelRatio:ht.pixelRatio},rr={elements:null,primitive:4,count:-1,offset:0,instances:-1},Kt=ve(Gt,Fe),Dt=n(Gt,ir,ht,function(un){return fr.destroyBuffer(un)}),sr=v(Gt,Fe,Dt,ir),fr=_(Gt,Fe,Kt,ir,Dt,sr,rr),vr=z(Gt,sn,ir,ht),lr=k(Gt,Fe,Kt,function(){Ar.procs.poll()},Qt,ir,ht),Or=be(Gt,Fe,Kt,ir,ht),Sr=I(Gt,Fe,Kt,lr,Or,ir),Ar=Y(Gt,sn,Fe,Kt,Dt,sr,lr,Sr,{},fr,vr,rr,Qt,Rt,Be,ht),sn=O(Gt,Sr,Ar.procs.poll,Qt),Jr=Ar.next,bn=Gt.canvas,xn=[],or=[],Lr=[],Br=[ht.onDestroy],_r=null;bn&&(bn.addEventListener("webglcontextlost",er,!1),bn.addEventListener("webglcontextrestored",ct,!1));var Qr=Sr.setFBO=qe({framebuffer:de.define.call(null,1,"framebuffer")});return _t(),nr=ne(qe,{clear:function(un){if("framebuffer"in un)if(un.framebuffer&&un.framebuffer_reglType==="framebufferCube")for(var ln=0;6>ln;++ln)Qr(ne({framebuffer:un.framebuffer.faces[ln]},un),dt);else Qr(un,dt);else dt(null,un)},prop:de.define.bind(null,1),context:de.define.bind(null,2),this:de.define.bind(null,3),draw:qe({}),buffer:function(un){return Dt.create(un,34962,!1,!1)},elements:function(un){return sr.create(un,!1)},texture:lr.create2D,cube:lr.createCube,renderbuffer:Or.create,framebuffer:Sr.create,framebufferCube:Sr.createCube,vao:fr.createVAO,attributes:nr,frame:bt,on:function(un,ln){var Mn;switch(un){case"frame":return bt(ln);case"lost":Mn=or;break;case"restore":Mn=Lr;break;case"destroy":Mn=Br}return Mn.push(ln),{cancel:function(){for(var Dn=0;Dn<Mn.length;++Dn)if(Mn[Dn]===ln){Mn[Dn]=Mn[Mn.length-1],Mn.pop();break}}}},limits:Kt,hasExtension:function(un){return 0<=Kt.extensions.indexOf(un.toLowerCase())},read:sn,destroy:function(){xn.length=0,cr(),bn&&(bn.removeEventListener("webglcontextlost",er),bn.removeEventListener("webglcontextrestored",ct)),vr.clear(),Sr.clear(),Or.clear(),fr.clear(),lr.clear(),sr.clear(),Dt.clear(),Rt&&Rt.clear(),Br.forEach(function(un){un()})},_gl:Gt,_refresh:_t,poll:function(){Mt(),Rt&&Rt.update()},now:It,stats:ir,getCachedCode:function(){return Be},preloadCachedCode:function(un){Object.entries(un).forEach(function(ln){Be[ln[0]]=ln[1]})}}),ht.onDone(null,nr),nr}})},30456:function(te,X,e){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var A=e(33576),P=A.Buffer;function o(M,d){for(var g in M)d[g]=M[g]}P.from&&P.alloc&&P.allocUnsafe&&P.allocUnsafeSlow?te.exports=A:(o(A,X),X.Buffer=L);function L(M,d,g){return P(M,d,g)}L.prototype=Object.create(P.prototype),o(P,L),L.from=function(M,d,g){if(typeof M=="number")throw new TypeError("Argument must not be a number");return P(M,d,g)},L.alloc=function(M,d,g){if(typeof M!="number")throw new TypeError("Argument must be a number");var r=P(M);return d!==void 0?typeof g=="string"?r.fill(d,g):r.fill(d):r.fill(0),r},L.allocUnsafe=function(M){if(typeof M!="number")throw new TypeError("Argument must be a number");return P(M)},L.allocUnsafeSlow=function(M){if(typeof M!="number")throw new TypeError("Argument must be a number");return A.SlowBuffer(M)}},14500:function(te,X,e){var A=e(53664),P=e(64348),o=e(39640)(),L=e(2304),M=A("%TypeError%"),d=A("%Math.floor%");te.exports=function(r,t){if(typeof r!="function")throw new M("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||d(t)!==t)throw new M("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],a=!0,c=!0;if("length"in r&&L){var u=L(r,"length");u&&!u.configurable&&(a=!1),u&&!u.writable&&(c=!1)}return(a||c||!s)&&(o?P(r,"length",t,!0,!0):P(r,"length",t)),r}},29936:function(te,X,e){te.exports=o;var A=e(61252).EventEmitter,P=e(6768);P(o,A),o.Readable=e(12348),o.Writable=e(11288),o.Duplex=e(15316),o.Transform=e(22477),o.PassThrough=e(27136),o.finished=e(15932),o.pipeline=e(38180),o.Stream=o;function o(){A.call(this)}o.prototype.pipe=function(L,M){var d=this;function g(l){L.writable&&L.write(l)===!1&&d.pause&&d.pause()}d.on("data",g);function r(){d.readable&&d.resume&&d.resume()}L.on("drain",r),!L._isStdio&&(!M||M.end!==!1)&&(d.on("end",s),d.on("close",a));var t=!1;function s(){t||(t=!0,L.end())}function a(){t||(t=!0,typeof L.destroy=="function"&&L.destroy())}function c(l){if(u(),A.listenerCount(this,"error")===0)throw l}d.on("error",c),L.on("error",c);function u(){d.removeListener("data",g),L.removeListener("drain",r),d.removeListener("end",s),d.removeListener("close",a),d.removeListener("error",c),L.removeListener("error",c),d.removeListener("end",u),d.removeListener("close",u),L.removeListener("close",u)}return d.on("end",u),d.on("close",u),L.on("close",u),L.emit("pipe",d),L}},92784:function(te){function X(d,g){d.prototype=Object.create(g.prototype),d.prototype.constructor=d,d.__proto__=g}var e={};function A(d,g,r){r||(r=Error);function t(a,c,u){return typeof g=="string"?g:g(a,c,u)}var s=function(a){X(c,a);function c(u,l,y){return a.call(this,t(u,l,y))||this}return c}(r);s.prototype.name=r.name,s.prototype.code=d,e[d]=s}function P(d,g){if(Array.isArray(d)){var r=d.length;return d=d.map(function(t){return String(t)}),r>2?"one of ".concat(g," ").concat(d.slice(0,r-1).join(", "),", or ")+d[r-1]:r===2?"one of ".concat(g," ").concat(d[0]," or ").concat(d[1]):"of ".concat(g," ").concat(d[0])}else return"of ".concat(g," ").concat(String(d))}function o(d,g,r){return d.substr(0,g.length)===g}function L(d,g,r){return(r===void 0||r>d.length)&&(r=d.length),d.substring(r-g.length,r)===g}function M(d,g,r){return typeof r!="number"&&(r=0),r+g.length>d.length?!1:d.indexOf(g,r)!==-1}A("ERR_INVALID_OPT_VALUE",function(d,g){return'The value "'+g+'" is invalid for option "'+d+'"'},TypeError),A("ERR_INVALID_ARG_TYPE",function(d,g,r){var t;typeof g=="string"&&o(g,"not ")?(t="must not be",g=g.replace(/^not /,"")):t="must be";var s;if(L(d," argument"))s="The ".concat(d," ").concat(t," ").concat(P(g,"type"));else{var a=M(d,".")?"property":"argument";s='The "'.concat(d,'" ').concat(a," ").concat(t," ").concat(P(g,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),A("ERR_METHOD_NOT_IMPLEMENTED",function(d){return"The "+d+" method is not implemented"}),A("ERR_STREAM_PREMATURE_CLOSE","Premature close"),A("ERR_STREAM_DESTROYED",function(d){return"Cannot call "+d+" after a stream was destroyed"}),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),A("ERR_STREAM_WRITE_AFTER_END","write after end"),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_UNKNOWN_ENCODING",function(d){return"Unknown encoding: "+d},TypeError),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),te.exports.i=e},15316:function(te,X,e){var A=e(4168),P=Object.keys||function(a){var c=[];for(var u in a)c.push(u);return c};te.exports=r;var o=e(12348),L=e(11288);e(6768)(r,o);for(var M=P(L.prototype),d=0;d<M.length;d++){var g=M[d];r.prototype[g]||(r.prototype[g]=L.prototype[g])}function r(a){if(!(this instanceof r))return new r(a);o.call(this,a),L.call(this,a),this.allowHalfOpen=!0,a&&(a.readable===!1&&(this.readable=!1),a.writable===!1&&(this.writable=!1),a.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",t)))}Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(r.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function t(){this._writableState.ended||A.nextTick(s,this)}function s(a){a.end()}Object.defineProperty(r.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}})},27136:function(te,X,e){te.exports=P;var A=e(22477);e(6768)(P,A);function P(o){if(!(this instanceof P))return new P(o);A.call(this,o)}P.prototype._transform=function(o,L,M){M(null,o)}},12348:function(te,X,e){var A=e(4168);te.exports=i;var P;i.ReadableState=w,e(61252).EventEmitter;var o=function(Y,ie){return Y.listeners(ie).length},L=e(4776),M=e(33576).Buffer,d=e.g.Uint8Array||function(){};function g(K){return M.from(K)}function r(K){return M.isBuffer(K)||K instanceof d}var t=e(19768),s;t&&t.debuglog?s=t.debuglog("stream"):s=function(){};var a=e(47264),c=e(55324),u=e(24888),l=u.getHighWaterMark,y=e(92784).i,h=y.ERR_INVALID_ARG_TYPE,T=y.ERR_STREAM_PUSH_AFTER_EOF,f=y.ERR_METHOD_NOT_IMPLEMENTED,n=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,v,m,b;e(6768)(i,L);var E=c.errorOrDestroy,p=["error","close","destroy","pause","resume"];function S(K,Y,ie){if(typeof K.prependListener=="function")return K.prependListener(Y,ie);!K._events||!K._events[Y]?K.on(Y,ie):Array.isArray(K._events[Y])?K._events[Y].unshift(ie):K._events[Y]=[ie,K._events[Y]]}function w(K,Y,ie){P=P||e(15316),K=K||{},typeof ie!="boolean"&&(ie=Y instanceof P),this.objectMode=!!K.objectMode,ie&&(this.objectMode=this.objectMode||!!K.readableObjectMode),this.highWaterMark=l(this,K,"readableHighWaterMark",ie),this.buffer=new a,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=K.emitClose!==!1,this.autoDestroy=!!K.autoDestroy,this.destroyed=!1,this.defaultEncoding=K.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,K.encoding&&(v||(v=e(86032).o),this.decoder=new v(K.encoding),this.encoding=K.encoding)}function i(K){if(P=P||e(15316),!(this instanceof i))return new i(K);var Y=this instanceof P;this._readableState=new w(K,this,Y),this.readable=!0,K&&(typeof K.read=="function"&&(this._read=K.read),typeof K.destroy=="function"&&(this._destroy=K.destroy)),L.call(this)}Object.defineProperty(i.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Y){this._readableState&&(this._readableState.destroyed=Y)}}),i.prototype.destroy=c.destroy,i.prototype._undestroy=c.undestroy,i.prototype._destroy=function(K,Y){Y(K)},i.prototype.push=function(K,Y){var ie=this._readableState,ne;return ie.objectMode?ne=!0:typeof K=="string"&&(Y=Y||ie.defaultEncoding,Y!==ie.encoding&&(K=M.from(K,Y),Y=""),ne=!0),C(this,K,Y,!1,ne)},i.prototype.unshift=function(K){return C(this,K,null,!0,!1)};function C(K,Y,ie,ne,le){s("readableAddChunk",Y);var de=K._readableState;if(Y===null)de.reading=!1,z(K,de);else{var we;if(le||(we=k(de,Y)),we)E(K,we);else if(de.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!de.objectMode&&Object.getPrototypeOf(Y)!==M.prototype&&(Y=g(Y)),ne)de.endEmitted?E(K,new n):x(K,de,Y,!0);else if(de.ended)E(K,new T);else{if(de.destroyed)return!1;de.reading=!1,de.decoder&&!ie?(Y=de.decoder.write(Y),de.objectMode||Y.length!==0?x(K,de,Y,!1):N(K,de)):x(K,de,Y,!1)}else ne||(de.reading=!1,N(K,de))}return!de.ended&&(de.length<de.highWaterMark||de.length===0)}function x(K,Y,ie,ne){Y.flowing&&Y.length===0&&!Y.sync?(Y.awaitDrain=0,K.emit("data",ie)):(Y.length+=Y.objectMode?1:ie.length,ne?Y.buffer.unshift(ie):Y.buffer.push(ie),Y.needReadable&&O(K)),N(K,Y)}function k(K,Y){var ie;return!r(Y)&&typeof Y!="string"&&Y!==void 0&&!K.objectMode&&(ie=new h("chunk",["string","Buffer","Uint8Array"],Y)),ie}i.prototype.isPaused=function(){return this._readableState.flowing===!1},i.prototype.setEncoding=function(K){v||(v=e(86032).o);var Y=new v(K);this._readableState.decoder=Y,this._readableState.encoding=this._readableState.decoder.encoding;for(var ie=this._readableState.buffer.head,ne="";ie!==null;)ne+=Y.write(ie.data),ie=ie.next;return this._readableState.buffer.clear(),ne!==""&&this._readableState.buffer.push(ne),this._readableState.length=ne.length,this};var I=1073741824;function B(K){return K>=I?K=I:(K--,K|=K>>>1,K|=K>>>2,K|=K>>>4,K|=K>>>8,K|=K>>>16,K++),K}function _(K,Y){return K<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:K!==K?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(K>Y.highWaterMark&&(Y.highWaterMark=B(K)),K<=Y.length?K:Y.ended?Y.length:(Y.needReadable=!0,0))}i.prototype.read=function(K){s("read",K),K=parseInt(K,10);var Y=this._readableState,ie=K;if(K!==0&&(Y.emittedReadable=!1),K===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return s("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?H(this):O(this),null;if(K=_(K,Y),K===0&&Y.ended)return Y.length===0&&H(this),null;var ne=Y.needReadable;s("need readable",ne),(Y.length===0||Y.length-K<Y.highWaterMark)&&(ne=!0,s("length less than watermark",ne)),Y.ended||Y.reading?(ne=!1,s("reading or ended",ne)):ne&&(s("do read"),Y.reading=!0,Y.sync=!0,Y.length===0&&(Y.needReadable=!0),this._read(Y.highWaterMark),Y.sync=!1,Y.reading||(K=_(ie,Y)));var le;return K>0?le=re(K,Y):le=null,le===null?(Y.needReadable=Y.length<=Y.highWaterMark,K=0):(Y.length-=K,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ie!==K&&Y.ended&&H(this)),le!==null&&this.emit("data",le),le};function z(K,Y){if(s("onEofChunk"),!Y.ended){if(Y.decoder){var ie=Y.decoder.end();ie&&ie.length&&(Y.buffer.push(ie),Y.length+=Y.objectMode?1:ie.length)}Y.ended=!0,Y.sync?O(K):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,F(K)))}}function O(K){var Y=K._readableState;s("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(s("emitReadable",Y.flowing),Y.emittedReadable=!0,A.nextTick(F,K))}function F(K){var Y=K._readableState;s("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(K.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,G(K)}function N(K,Y){Y.readingMore||(Y.readingMore=!0,A.nextTick(V,K,Y))}function V(K,Y){for(;!Y.reading&&!Y.ended&&(Y.length<Y.highWaterMark||Y.flowing&&Y.length===0);){var ie=Y.length;if(s("maybeReadMore read 0"),K.read(0),ie===Y.length)break}Y.readingMore=!1}i.prototype._read=function(K){E(this,new f("_read()"))},i.prototype.pipe=function(K,Y){var ie=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=K;break;case 1:ne.pipes=[ne.pipes,K];break;default:ne.pipes.push(K);break}ne.pipesCount+=1,s("pipe count=%d opts=%j",ne.pipesCount,Y);var le=(!Y||Y.end!==!1)&&K!==A.stdout&&K!==A.stderr,de=le?me:Ie;ne.endEmitted?A.nextTick(de):ie.once("end",de),K.on("unpipe",we);function we(Ne,et){s("onunpipe"),Ne===ie&&et&&et.hasUnpiped===!1&&(et.hasUnpiped=!0,Ae())}function me(){s("onend"),K.end()}var Le=j(ie);K.on("drain",Le);var ve=!1;function Ae(){s("cleanup"),K.removeListener("close",_e),K.removeListener("finish",ze),K.removeListener("drain",Le),K.removeListener("error",Se),K.removeListener("unpipe",we),ie.removeListener("end",me),ie.removeListener("end",Ie),ie.removeListener("data",ye),ve=!0,ne.awaitDrain&&(!K._writableState||K._writableState.needDrain)&&Le()}ie.on("data",ye);function ye(Ne){s("ondata");var et=K.write(Ne);s("dest.write",et),et===!1&&((ne.pipesCount===1&&ne.pipes===K||ne.pipesCount>1&&ae(ne.pipes,K)!==-1)&&!ve&&(s("false write response, pause",ne.awaitDrain),ne.awaitDrain++),ie.pause())}function Se(Ne){s("onerror",Ne),Ie(),K.removeListener("error",Se),o(K,"error")===0&&E(K,Ne)}S(K,"error",Se);function _e(){K.removeListener("finish",ze),Ie()}K.once("close",_e);function ze(){s("onfinish"),K.removeListener("close",_e),Ie()}K.once("finish",ze);function Ie(){s("unpipe"),ie.unpipe(K)}return K.emit("pipe",ie),ne.flowing||(s("pipe resume"),ie.resume()),K};function j(K){return function(){var ie=K._readableState;s("pipeOnDrain",ie.awaitDrain),ie.awaitDrain&&ie.awaitDrain--,ie.awaitDrain===0&&o(K,"data")&&(ie.flowing=!0,G(K))}}i.prototype.unpipe=function(K){var Y=this._readableState,ie={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return K&&K!==Y.pipes?this:(K||(K=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,K&&K.emit("unpipe",this,ie),this);if(!K){var ne=Y.pipes,le=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var de=0;de<le;de++)ne[de].emit("unpipe",this,{hasUnpiped:!1});return this}var we=ae(Y.pipes,K);return we===-1?this:(Y.pipes.splice(we,1),Y.pipesCount-=1,Y.pipesCount===1&&(Y.pipes=Y.pipes[0]),K.emit("unpipe",this,ie),this)},i.prototype.on=function(K,Y){var ie=L.prototype.on.call(this,K,Y),ne=this._readableState;return K==="data"?(ne.readableListening=this.listenerCount("readable")>0,ne.flowing!==!1&&this.resume()):K==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,s("on readable",ne.length,ne.reading),ne.length?O(this):ne.reading||A.nextTick(q,this)),ie},i.prototype.addListener=i.prototype.on,i.prototype.removeListener=function(K,Y){var ie=L.prototype.removeListener.call(this,K,Y);return K==="readable"&&A.nextTick($,this),ie},i.prototype.removeAllListeners=function(K){var Y=L.prototype.removeAllListeners.apply(this,arguments);return(K==="readable"||K===void 0)&&A.nextTick($,this),Y};function $(K){var Y=K._readableState;Y.readableListening=K.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:K.listenerCount("data")>0&&K.resume()}function q(K){s("readable nexttick read 0"),K.read(0)}i.prototype.resume=function(){var K=this._readableState;return K.flowing||(s("resume"),K.flowing=!K.readableListening,oe(this,K)),K.paused=!1,this};function oe(K,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,A.nextTick(Z,K,Y))}function Z(K,Y){s("resume",Y.reading),Y.reading||K.read(0),Y.resumeScheduled=!1,K.emit("resume"),G(K),Y.flowing&&!Y.reading&&K.read(0)}i.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function G(K){var Y=K._readableState;for(s("flow",Y.flowing);Y.flowing&&K.read()!==null;);}i.prototype.wrap=function(K){var Y=this,ie=this._readableState,ne=!1;K.on("end",function(){if(s("wrapped end"),ie.decoder&&!ie.ended){var we=ie.decoder.end();we&&we.length&&Y.push(we)}Y.push(null)}),K.on("data",function(we){if(s("wrapped data"),ie.decoder&&(we=ie.decoder.write(we)),!(ie.objectMode&&we==null)&&!(!ie.objectMode&&(!we||!we.length))){var me=Y.push(we);me||(ne=!0,K.pause())}});for(var le in K)this[le]===void 0&&typeof K[le]=="function"&&(this[le]=function(me){return function(){return K[me].apply(K,arguments)}}(le));for(var de=0;de<p.length;de++)K.on(p[de],this.emit.bind(this,p[de]));return this._read=function(we){s("wrapped _read",we),ne&&(ne=!1,K.resume())},this},typeof Symbol=="function"&&(i.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=e(60328)),m(this)}),Object.defineProperty(i.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(i.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(i.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){this._readableState&&(this._readableState.flowing=Y)}}),i._fromList=re,Object.defineProperty(i.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function re(K,Y){if(Y.length===0)return null;var ie;return Y.objectMode?ie=Y.buffer.shift():!K||K>=Y.length?(Y.decoder?ie=Y.buffer.join(""):Y.buffer.length===1?ie=Y.buffer.first():ie=Y.buffer.concat(Y.length),Y.buffer.clear()):ie=Y.buffer.consume(K,Y.decoder),ie}function H(K){var Y=K._readableState;s("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,A.nextTick(J,Y,K))}function J(K,Y){if(s("endReadableNT",K.endEmitted,K.length),!K.endEmitted&&K.length===0&&(K.endEmitted=!0,Y.readable=!1,Y.emit("end"),K.autoDestroy)){var ie=Y._writableState;(!ie||ie.autoDestroy&&ie.finished)&&Y.destroy()}}typeof Symbol=="function"&&(i.from=function(K,Y){return b===void 0&&(b=e(90555)),b(i,K,Y)});function ae(K,Y){for(var ie=0,ne=K.length;ie<ne;ie++)if(K[ie]===Y)return ie;return-1}},22477:function(te,X,e){te.exports=r;var A=e(92784).i,P=A.ERR_METHOD_NOT_IMPLEMENTED,o=A.ERR_MULTIPLE_CALLBACK,L=A.ERR_TRANSFORM_ALREADY_TRANSFORMING,M=A.ERR_TRANSFORM_WITH_LENGTH_0,d=e(15316);e(6768)(r,d);function g(a,c){var u=this._transformState;u.transforming=!1;var l=u.writecb;if(l===null)return this.emit("error",new o);u.writechunk=null,u.writecb=null,c!=null&&this.push(c),l(a);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function r(a){if(!(this instanceof r))return new r(a);d.call(this,a),this._transformState={afterTransform:g.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",t)}function t(){var a=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(c,u){s(a,c,u)}):s(this,null,null)}r.prototype.push=function(a,c){return this._transformState.needTransform=!1,d.prototype.push.call(this,a,c)},r.prototype._transform=function(a,c,u){u(new P("_transform()"))},r.prototype._write=function(a,c,u){var l=this._transformState;if(l.writecb=u,l.writechunk=a,l.writeencoding=c,!l.transforming){var y=this._readableState;(l.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},r.prototype._read=function(a){var c=this._transformState;c.writechunk!==null&&!c.transforming?(c.transforming=!0,this._transform(c.writechunk,c.writeencoding,c.afterTransform)):c.needTransform=!0},r.prototype._destroy=function(a,c){d.prototype._destroy.call(this,a,function(u){c(u)})};function s(a,c,u){if(c)return a.emit("error",c);if(u!=null&&a.push(u),a._writableState.length)throw new M;if(a._transformState.transforming)throw new L;return a.push(null)}},11288:function(te,X,e){var A=e(4168);te.exports=w;function P(G){var re=this;this.next=null,this.entry=null,this.finish=function(){Z(re,G)}}var o;w.WritableState=p;var L={deprecate:e(96656)},M=e(4776),d=e(33576).Buffer,g=e.g.Uint8Array||function(){};function r(G){return d.from(G)}function t(G){return d.isBuffer(G)||G instanceof g}var s=e(55324),a=e(24888),c=a.getHighWaterMark,u=e(92784).i,l=u.ERR_INVALID_ARG_TYPE,y=u.ERR_METHOD_NOT_IMPLEMENTED,h=u.ERR_MULTIPLE_CALLBACK,T=u.ERR_STREAM_CANNOT_PIPE,f=u.ERR_STREAM_DESTROYED,n=u.ERR_STREAM_NULL_VALUES,v=u.ERR_STREAM_WRITE_AFTER_END,m=u.ERR_UNKNOWN_ENCODING,b=s.errorOrDestroy;e(6768)(w,M);function E(){}function p(G,re,H){o=o||e(15316),G=G||{},typeof H!="boolean"&&(H=re instanceof o),this.objectMode=!!G.objectMode,H&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=c(this,G,"writableHighWaterMark",H),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=G.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ae){z(re,ae)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new P(this)}p.prototype.getBuffer=function(){for(var re=this.bufferedRequest,H=[];re;)H.push(re),re=re.next;return H},function(){try{Object.defineProperty(p.prototype,"buffer",{get:L.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(re){return S.call(this,re)?!0:this!==w?!1:re&&re._writableState instanceof p}})):S=function(re){return re instanceof this};function w(G){o=o||e(15316);var re=this instanceof o;if(!re&&!S.call(w,this))return new w(G);this._writableState=new p(G,this,re),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),M.call(this)}w.prototype.pipe=function(){b(this,new T)};function i(G,re){var H=new v;b(G,H),A.nextTick(re,H)}function C(G,re,H,J){var ae;return H===null?ae=new n:typeof H!="string"&&!re.objectMode&&(ae=new l("chunk",["string","Buffer"],H)),ae?(b(G,ae),A.nextTick(J,ae),!1):!0}w.prototype.write=function(G,re,H){var J=this._writableState,ae=!1,K=!J.objectMode&&t(G);return K&&!d.isBuffer(G)&&(G=r(G)),typeof re=="function"&&(H=re,re=null),K?re="buffer":re||(re=J.defaultEncoding),typeof H!="function"&&(H=E),J.ending?i(this,H):(K||C(this,J,G,H))&&(J.pendingcb++,ae=k(this,J,K,G,re,H)),ae},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&N(this,G))},w.prototype.setDefaultEncoding=function(re){if(typeof re=="string"&&(re=re.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((re+"").toLowerCase())>-1))throw new m(re);return this._writableState.defaultEncoding=re,this},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(G,re,H){return!G.objectMode&&G.decodeStrings!==!1&&typeof re=="string"&&(re=d.from(re,H)),re}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function k(G,re,H,J,ae,K){if(!H){var Y=x(re,J,ae);J!==Y&&(H=!0,ae="buffer",J=Y)}var ie=re.objectMode?1:J.length;re.length+=ie;var ne=re.length<re.highWaterMark;if(ne||(re.needDrain=!0),re.writing||re.corked){var le=re.lastBufferedRequest;re.lastBufferedRequest={chunk:J,encoding:ae,isBuf:H,callback:K,next:null},le?le.next=re.lastBufferedRequest:re.bufferedRequest=re.lastBufferedRequest,re.bufferedRequestCount+=1}else I(G,re,!1,ie,J,ae,K);return ne}function I(G,re,H,J,ae,K,Y){re.writelen=J,re.writecb=Y,re.writing=!0,re.sync=!0,re.destroyed?re.onwrite(new f("write")):H?G._writev(ae,re.onwrite):G._write(ae,K,re.onwrite),re.sync=!1}function B(G,re,H,J,ae){--re.pendingcb,H?(A.nextTick(ae,J),A.nextTick(q,G,re),G._writableState.errorEmitted=!0,b(G,J)):(ae(J),G._writableState.errorEmitted=!0,b(G,J),q(G,re))}function _(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}function z(G,re){var H=G._writableState,J=H.sync,ae=H.writecb;if(typeof ae!="function")throw new h;if(_(H),re)B(G,H,J,re,ae);else{var K=V(H)||G.destroyed;!K&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&N(G,H),J?A.nextTick(O,G,H,K,ae):O(G,H,K,ae)}}function O(G,re,H,J){H||F(G,re),re.pendingcb--,J(),q(G,re)}function F(G,re){re.length===0&&re.needDrain&&(re.needDrain=!1,G.emit("drain"))}function N(G,re){re.bufferProcessing=!0;var H=re.bufferedRequest;if(G._writev&&H&&H.next){var J=re.bufferedRequestCount,ae=new Array(J),K=re.corkedRequestsFree;K.entry=H;for(var Y=0,ie=!0;H;)ae[Y]=H,H.isBuf||(ie=!1),H=H.next,Y+=1;ae.allBuffers=ie,I(G,re,!0,re.length,ae,"",K.finish),re.pendingcb++,re.lastBufferedRequest=null,K.next?(re.corkedRequestsFree=K.next,K.next=null):re.corkedRequestsFree=new P(re),re.bufferedRequestCount=0}else{for(;H;){var ne=H.chunk,le=H.encoding,de=H.callback,we=re.objectMode?1:ne.length;if(I(G,re,!1,we,ne,le,de),H=H.next,re.bufferedRequestCount--,re.writing)break}H===null&&(re.lastBufferedRequest=null)}re.bufferedRequest=H,re.bufferProcessing=!1}w.prototype._write=function(G,re,H){H(new y("_write()"))},w.prototype._writev=null,w.prototype.end=function(G,re,H){var J=this._writableState;return typeof G=="function"?(H=G,G=null,re=null):typeof re=="function"&&(H=re,re=null),G!=null&&this.write(G,re),J.corked&&(J.corked=1,this.uncork()),J.ending||oe(this,J,H),this},Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function V(G){return G.ending&&G.length===0&&G.bufferedRequest===null&&!G.finished&&!G.writing}function j(G,re){G._final(function(H){re.pendingcb--,H&&b(G,H),re.prefinished=!0,G.emit("prefinish"),q(G,re)})}function $(G,re){!re.prefinished&&!re.finalCalled&&(typeof G._final=="function"&&!re.destroyed?(re.pendingcb++,re.finalCalled=!0,A.nextTick(j,G,re)):(re.prefinished=!0,G.emit("prefinish")))}function q(G,re){var H=V(re);if(H&&($(G,re),re.pendingcb===0&&(re.finished=!0,G.emit("finish"),re.autoDestroy))){var J=G._readableState;(!J||J.autoDestroy&&J.endEmitted)&&G.destroy()}return H}function oe(G,re,H){re.ending=!0,q(G,re),H&&(re.finished?A.nextTick(H):G.once("finish",H)),re.ended=!0,G.writable=!1}function Z(G,re,H){var J=G.entry;for(G.entry=null;J;){var ae=J.callback;re.pendingcb--,ae(H),J=J.next}re.corkedRequestsFree.next=G}Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(re){this._writableState&&(this._writableState.destroyed=re)}}),w.prototype.destroy=s.destroy,w.prototype._undestroy=s.undestroy,w.prototype._destroy=function(G,re){re(G)}},60328:function(te,X,e){var A=e(4168),P;function o(n,v,m){return v in n?Object.defineProperty(n,v,{value:m,enumerable:!0,configurable:!0,writable:!0}):n[v]=m,n}var L=e(15932),M=Symbol("lastResolve"),d=Symbol("lastReject"),g=Symbol("error"),r=Symbol("ended"),t=Symbol("lastPromise"),s=Symbol("handlePromise"),a=Symbol("stream");function c(n,v){return{value:n,done:v}}function u(n){var v=n[M];if(v!==null){var m=n[a].read();m!==null&&(n[t]=null,n[M]=null,n[d]=null,v(c(m,!1)))}}function l(n){A.nextTick(u,n)}function y(n,v){return function(m,b){n.then(function(){if(v[r]){m(c(void 0,!0));return}v[s](m,b)},b)}}var h=Object.getPrototypeOf(function(){}),T=Object.setPrototypeOf((P={get stream(){return this[a]},next:function(){var v=this,m=this[g];if(m!==null)return Promise.reject(m);if(this[r])return Promise.resolve(c(void 0,!0));if(this[a].destroyed)return new Promise(function(S,w){A.nextTick(function(){v[g]?w(v[g]):S(c(void 0,!0))})});var b=this[t],E;if(b)E=new Promise(y(b,this));else{var p=this[a].read();if(p!==null)return Promise.resolve(c(p,!1));E=new Promise(this[s])}return this[t]=E,E}},o(P,Symbol.asyncIterator,function(){return this}),o(P,"return",function(){var v=this;return new Promise(function(m,b){v[a].destroy(null,function(E){if(E){b(E);return}m(c(void 0,!0))})})}),P),h),f=function(v){var m,b=Object.create(T,(m={},o(m,a,{value:v,writable:!0}),o(m,M,{value:null,writable:!0}),o(m,d,{value:null,writable:!0}),o(m,g,{value:null,writable:!0}),o(m,r,{value:v._readableState.endEmitted,writable:!0}),o(m,s,{value:function(p,S){var w=b[a].read();w?(b[t]=null,b[M]=null,b[d]=null,p(c(w,!1))):(b[M]=p,b[d]=S)},writable:!0}),m));return b[t]=null,L(v,function(E){if(E&&E.code!=="ERR_STREAM_PREMATURE_CLOSE"){var p=b[d];p!==null&&(b[t]=null,b[M]=null,b[d]=null,p(E)),b[g]=E;return}var S=b[M];S!==null&&(b[t]=null,b[M]=null,b[d]=null,S(c(void 0,!0))),b[r]=!0}),v.on("readable",l.bind(null,b)),b};te.exports=f},47264:function(te,X,e){function A(u,l){var y=Object.keys(u);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(u);l&&(h=h.filter(function(T){return Object.getOwnPropertyDescriptor(u,T).enumerable})),y.push.apply(y,h)}return y}function P(u){for(var l=1;l<arguments.length;l++){var y=arguments[l]!=null?arguments[l]:{};l%2?A(Object(y),!0).forEach(function(h){o(u,h,y[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(y)):A(Object(y)).forEach(function(h){Object.defineProperty(u,h,Object.getOwnPropertyDescriptor(y,h))})}return u}function o(u,l,y){return l in u?Object.defineProperty(u,l,{value:y,enumerable:!0,configurable:!0,writable:!0}):u[l]=y,u}function L(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function M(u,l){for(var y=0;y<l.length;y++){var h=l[y];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(u,h.key,h)}}function d(u,l,y){return M(u.prototype,l),u}var g=e(33576),r=g.Buffer,t=e(21576),s=t.inspect,a=s&&s.custom||"inspect";function c(u,l,y){r.prototype.copy.call(u,l,y)}te.exports=function(){function u(){L(this,u),this.head=null,this.tail=null,this.length=0}return d(u,[{key:"push",value:function(y){var h={data:y,next:null};this.length>0?this.tail.next=h:this.head=h,this.tail=h,++this.length}},{key:"unshift",value:function(y){var h={data:y,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var h=this.head,T=""+h.data;h=h.next;)T+=y+h.data;return T}},{key:"concat",value:function(y){if(this.length===0)return r.alloc(0);for(var h=r.allocUnsafe(y>>>0),T=this.head,f=0;T;)c(T.data,h,f),f+=T.data.length,T=T.next;return h}},{key:"consume",value:function(y,h){var T;return y<this.head.data.length?(T=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?T=this.shift():T=h?this._getString(y):this._getBuffer(y),T}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var h=this.head,T=1,f=h.data;for(y-=f.length;h=h.next;){var n=h.data,v=y>n.length?n.length:y;if(v===n.length?f+=n:f+=n.slice(0,y),y-=v,y===0){v===n.length?(++T,h.next?this.head=h.next:this.head=this.tail=null):(this.head=h,h.data=n.slice(v));break}++T}return this.length-=T,f}},{key:"_getBuffer",value:function(y){var h=r.allocUnsafe(y),T=this.head,f=1;for(T.data.copy(h),y-=T.data.length;T=T.next;){var n=T.data,v=y>n.length?n.length:y;if(n.copy(h,h.length-y,0,v),y-=v,y===0){v===n.length?(++f,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=n.slice(v));break}++f}return this.length-=f,h}},{key:a,value:function(y,h){return s(this,P({},h,{depth:0,customInspect:!1}))}}]),u}()},55324:function(te,X,e){var A=e(4168);function P(r,t){var s=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(t?t(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,A.nextTick(d,this,r)):A.nextTick(d,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(u){!t&&u?s._writableState?s._writableState.errorEmitted?A.nextTick(L,s):(s._writableState.errorEmitted=!0,A.nextTick(o,s,u)):A.nextTick(o,s,u):t?(A.nextTick(L,s),t(u)):A.nextTick(L,s)}),this)}function o(r,t){d(r,t),L(r)}function L(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function M(){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)}function d(r,t){r.emit("error",t)}function g(r,t){var s=r._readableState,a=r._writableState;s&&s.autoDestroy||a&&a.autoDestroy?r.destroy(t):r.emit("error",t)}te.exports={destroy:P,undestroy:M,errorOrDestroy:g}},15932:function(te,X,e){var A=e(92784).i.ERR_STREAM_PREMATURE_CLOSE;function P(d){var g=!1;return function(){if(!g){g=!0;for(var r=arguments.length,t=new Array(r),s=0;s<r;s++)t[s]=arguments[s];d.apply(this,t)}}}function o(){}function L(d){return d.setHeader&&typeof d.abort=="function"}function M(d,g,r){if(typeof g=="function")return M(d,null,g);g||(g={}),r=P(r||o);var t=g.readable||g.readable!==!1&&d.readable,s=g.writable||g.writable!==!1&&d.writable,a=function(){d.writable||u()},c=d._writableState&&d._writableState.finished,u=function(){s=!1,c=!0,t||r.call(d)},l=d._readableState&&d._readableState.endEmitted,y=function(){t=!1,l=!0,s||r.call(d)},h=function(v){r.call(d,v)},T=function(){var v;if(t&&!l)return(!d._readableState||!d._readableState.ended)&&(v=new A),r.call(d,v);if(s&&!c)return(!d._writableState||!d._writableState.ended)&&(v=new A),r.call(d,v)},f=function(){d.req.on("finish",u)};return L(d)?(d.on("complete",u),d.on("abort",T),d.req?f():d.on("request",f)):s&&!d._writableState&&(d.on("end",a),d.on("close",a)),d.on("end",y),d.on("finish",u),g.error!==!1&&d.on("error",h),d.on("close",T),function(){d.removeListener("complete",u),d.removeListener("abort",T),d.removeListener("request",f),d.req&&d.req.removeListener("finish",u),d.removeListener("end",a),d.removeListener("close",a),d.removeListener("finish",u),d.removeListener("end",y),d.removeListener("error",h),d.removeListener("close",T)}}te.exports=M},90555:function(te){te.exports=function(){throw new Error("Readable.from is not available in the browser")}},38180:function(te,X,e){var A;function P(u){var l=!1;return function(){l||(l=!0,u.apply(void 0,arguments))}}var o=e(92784).i,L=o.ERR_MISSING_ARGS,M=o.ERR_STREAM_DESTROYED;function d(u){if(u)throw u}function g(u){return u.setHeader&&typeof u.abort=="function"}function r(u,l,y,h){h=P(h);var T=!1;u.on("close",function(){T=!0}),A===void 0&&(A=e(15932)),A(u,{readable:l,writable:y},function(n){if(n)return h(n);T=!0,h()});var f=!1;return function(n){if(!T&&!f){if(f=!0,g(u))return u.abort();if(typeof u.destroy=="function")return u.destroy();h(n||new M("pipe"))}}}function t(u){u()}function s(u,l){return u.pipe(l)}function a(u){return!u.length||typeof u[u.length-1]!="function"?d:u.pop()}function c(){for(var u=arguments.length,l=new Array(u),y=0;y<u;y++)l[y]=arguments[y];var h=a(l);if(Array.isArray(l[0])&&(l=l[0]),l.length<2)throw new L("streams");var T,f=l.map(function(n,v){var m=v<l.length-1,b=v>0;return r(n,m,b,function(E){T||(T=E),E&&f.forEach(t),!m&&(f.forEach(t),h(T))})});return l.reduce(s)}te.exports=c},24888:function(te,X,e){var A=e(92784).i.ERR_INVALID_OPT_VALUE;function P(L,M,d){return L.highWaterMark!=null?L.highWaterMark:M?L[d]:null}function o(L,M,d,g){var r=P(M,g,d);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var t=g?d:"highWaterMark";throw new A(t,r)}return Math.floor(r)}return L.objectMode?16:16384}te.exports={getHighWaterMark:o}},4776:function(te,X,e){te.exports=e(61252).EventEmitter},86032:function(te,X,e){var A=e(30456).Buffer,P=A.isEncoding||function(f){switch(f=""+f,f&&f.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 o(f){if(!f)return"utf8";for(var n;;)switch(f){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 f;default:if(n)return;f=(""+f).toLowerCase(),n=!0}}function L(f){var n=o(f);if(typeof n!="string"&&(A.isEncoding===P||!P(f)))throw new Error("Unknown encoding: "+f);return n||f}X.o=M;function M(f){this.encoding=L(f);var n;switch(this.encoding){case"utf16le":this.text=c,this.end=u,n=4;break;case"utf8":this.fillLast=t,n=4;break;case"base64":this.text=l,this.end=y,n=3;break;default:this.write=h,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(n)}M.prototype.write=function(f){if(f.length===0)return"";var n,v;if(this.lastNeed){if(n=this.fillLast(f),n===void 0)return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v<f.length?n?n+this.text(f,v):this.text(f,v):n||""},M.prototype.end=a,M.prototype.text=s,M.prototype.fillLast=function(f){if(this.lastNeed<=f.length)return f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,f.length),this.lastNeed-=f.length};function d(f){return f<=127?0:f>>5===6?2:f>>4===14?3:f>>3===30?4:f>>6===2?-1:-2}function g(f,n,v){var m=n.length-1;if(m<v)return 0;var b=d(n[m]);return b>=0?(b>0&&(f.lastNeed=b-1),b):--m<v||b===-2?0:(b=d(n[m]),b>=0?(b>0&&(f.lastNeed=b-2),b):--m<v||b===-2?0:(b=d(n[m]),b>=0?(b>0&&(b===2?b=0:f.lastNeed=b-3),b):0))}function r(f,n,v){if((n[0]&192)!==128)return f.lastNeed=0,"<22>";if(f.lastNeed>1&&n.length>1){if((n[1]&192)!==128)return f.lastNeed=1,"<22>";if(f.lastNeed>2&&n.length>2&&(n[2]&192)!==128)return f.lastNeed=2,"<22>"}}function t(f){var n=this.lastTotal-this.lastNeed,v=r(this,f);if(v!==void 0)return v;if(this.lastNeed<=f.length)return f.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,n,0,f.length),this.lastNeed-=f.length}function s(f,n){var v=g(this,f,n);if(!this.lastNeed)return f.toString("utf8",n);this.lastTotal=v;var m=f.length-(v-this.lastNeed);return f.copy(this.lastChar,0,m),f.toString("utf8",n,m)}function a(f){var n=f&&f.length?this.write(f):"";return this.lastNeed?n+"<22>":n}function c(f,n){if((f.length-n)%2===0){var v=f.toString("utf16le",n);if(v){var m=v.charCodeAt(v.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",n,f.length-1)}function u(f){var n=f&&f.length?this.write(f):"";if(this.lastNeed){var v=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,v)}return n}function l(f,n){var v=(f.length-n)%3;return v===0?f.toString("base64",n):(this.lastNeed=3-v,this.lastTotal=3,v===1?this.lastChar[0]=f[f.length-1]:(this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1]),f.toString("base64",n,f.length-v))}function y(f){var n=f&&f.length?this.write(f):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function h(f){return f.toString(this.encoding)}function T(f){return f&&f.length?this.write(f):""}},55619:function(te,X,e){var A=e(45408),P=e(86844)("stream-parser");te.exports=g;var o=-1,L=0,M=1,d=2;function g(f){var n=f&&typeof f._transform=="function",v=f&&typeof f._write=="function";if(!n&&!v)throw new Error("must pass a Writable or Transform stream in");P("extending Parser into stream"),f._bytes=t,f._skipBytes=s,n&&(f._passthrough=a),n?f._transform=u:f._write=c}function r(f){P("initializing parser stream"),f._parserBytesLeft=0,f._parserBuffers=[],f._parserBuffered=0,f._parserState=o,f._parserCallback=null,typeof f.push=="function"&&(f._parserOutput=f.push.bind(f)),f._parserInit=!0}function t(f,n){A(!this._parserCallback,'there is already a "callback" set!'),A(isFinite(f)&&f>0,'can only buffer a finite number of bytes > 0, got "'+f+'"'),this._parserInit||r(this),P("buffering %o bytes",f),this._parserBytesLeft=f,this._parserCallback=n,this._parserState=L}function s(f,n){A(!this._parserCallback,'there is already a "callback" set!'),A(f>0,'can only skip > 0 bytes, got "'+f+'"'),this._parserInit||r(this),P("skipping %o bytes",f),this._parserBytesLeft=f,this._parserCallback=n,this._parserState=M}function a(f,n){A(!this._parserCallback,'There is already a "callback" set!'),A(f>0,'can only pass through > 0 bytes, got "'+f+'"'),this._parserInit||r(this),P("passing through %o bytes",f),this._parserBytesLeft=f,this._parserCallback=n,this._parserState=d}function c(f,n,v){this._parserInit||r(this),P("write(%o bytes)",f.length),typeof n=="function"&&(v=n),h(this,f,null,v)}function u(f,n,v){this._parserInit||r(this),P("transform(%o bytes)",f.length),typeof n!="function"&&(n=this._parserOutput),h(this,f,n,v)}function l(f,n,v,m){return f._parserBytesLeft<=0?m(new Error("got data but not currently parsing anything")):n.length<=f._parserBytesLeft?function(){return y(f,n,v,m)}:function(){var b=n.slice(0,f._parserBytesLeft);return y(f,b,v,function(E){if(E)return m(E);if(n.length>b.length)return function(){return l(f,n.slice(b.length),v,m)}})}}function y(f,n,v,m){if(f._parserBytesLeft-=n.length,P("%o bytes left for stream piece",f._parserBytesLeft),f._parserState===L?(f._parserBuffers.push(n),f._parserBuffered+=n.length):f._parserState===d&&v(n),f._parserBytesLeft===0){var b=f._parserCallback;if(b&&f._parserState===L&&f._parserBuffers.length>1&&(n=Buffer.concat(f._parserBuffers,f._parserBuffered)),f._parserState!==L&&(n=null),f._parserCallback=null,f._parserBuffered=0,f._parserState=o,f._parserBuffers.splice(0),b){var E=[];n&&E.push(n),v&&E.push(v);var p=b.length>E.length;p&&E.push(T(m));var S=b.apply(f,E);if(!p||m===S)return m}}else return m}var h=T(l);function T(f){return function(){for(var n=f.apply(this,arguments);typeof n=="function";)n=n();return n}}},86844:function(te,X,e){var A=e(4168);X=te.exports=e(89416),X.log=L,X.formatArgs=o,X.save=M,X.load=d,X.useColors=P,X.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:g(),X.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function P(){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+)/)}X.formatters.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function o(r){var t=this.useColors;if(r[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+r[0]+(t?"%c ":" ")+"+"+X.humanize(this.diff),!!t){var s="color: "+this.color;r.splice(1,0,s,"color: inherit");var a=0,c=0;r[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(a++,u==="%c"&&(c=a))}),r.splice(c,0,s)}}function L(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function M(r){try{r==null?X.storage.removeItem("debug"):X.storage.debug=r}catch{}}function d(){var r;try{r=X.storage.debug}catch{}return!r&&typeof A<"u"&&"env"in A&&(r=A.env.DEBUG),r}X.enable(d());function g(){try{return window.localStorage}catch{}}},89416:function(te,X,e){X=te.exports=o.debug=o.default=o,X.coerce=g,X.disable=M,X.enable=L,X.enabled=d,X.humanize=e(93744),X.names=[],X.skips=[],X.formatters={};var A;function P(r){var t=0,s;for(s in r)t=(t<<5)-t+r.charCodeAt(s),t|=0;return X.colors[Math.abs(t)%X.colors.length]}function o(r){function t(){if(t.enabled){var s=t,a=+new Date,c=a-(A||a);s.diff=c,s.prev=A,s.curr=a,A=a;for(var u=new Array(arguments.length),l=0;l<u.length;l++)u[l]=arguments[l];u[0]=X.coerce(u[0]),typeof u[0]!="string"&&u.unshift("%O");var y=0;u[0]=u[0].replace(/%([a-zA-Z%])/g,function(T,f){if(T==="%%")return T;y++;var n=X.formatters[f];if(typeof n=="function"){var v=u[y];T=n.call(s,v),u.splice(y,1),y--}return T}),X.formatArgs.call(s,u);var h=t.log||X.log||console.log.bind(console);h.apply(s,u)}}return t.namespace=r,t.enabled=X.enabled(r),t.useColors=X.useColors(),t.color=P(r),typeof X.init=="function"&&X.init(t),t}function L(r){X.save(r),X.names=[],X.skips=[];for(var t=(typeof r=="string"?r:"").split(/[\s,]+/),s=t.length,a=0;a<s;a++)t[a]&&(r=t[a].replace(/\*/g,".*?"),r[0]==="-"?X.skips.push(new RegExp("^"+r.substr(1)+"$")):X.names.push(new RegExp("^"+r+"$")))}function M(){X.enable("")}function d(r){var t,s;for(t=0,s=X.skips.length;t<s;t++)if(X.skips[t].test(r))return!1;for(t=0,s=X.names.length;t<s;t++)if(X.names[t].test(r))return!0;return!1}function g(r){return r instanceof Error?r.stack||r.message:r}},93744:function(te){var X=1e3,e=X*60,A=e*60,P=A*24,o=P*365.25;te.exports=function(r,t){t=t||{};var s=typeof r;if(s==="string"&&r.length>0)return L(r);if(s==="number"&&isNaN(r)===!1)return t.long?d(r):M(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function L(r){if(r=String(r),!(r.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(t){var s=parseFloat(t[1]),a=(t[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"days":case"day":case"d":return s*P;case"hours":case"hour":case"hrs":case"hr":case"h":return s*A;case"minutes":case"minute":case"mins":case"min":case"m":return s*e;case"seconds":case"second":case"secs":case"sec":case"s":return s*X;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function M(r){return r>=P?Math.round(r/P)+"d":r>=A?Math.round(r/A)+"h":r>=e?Math.round(r/e)+"m":r>=X?Math.round(r/X)+"s":r+"ms"}function d(r){return g(r,P,"day")||g(r,A,"hour")||g(r,e,"minute")||g(r,X,"second")||r+" ms"}function g(r,t,s){if(!(r<t))return r<t*1.5?Math.floor(r/t)+" "+s:Math.ceil(r/t)+" "+s+"s"}},39956:function(te,X,e){var A=e(32868);te.exports=function(o,L,M){if(o==null)throw Error("First argument should be a string");if(L==null)throw Error("Separator should be a string or a RegExp");M?(typeof M=="string"||Array.isArray(M))&&(M={ignore:M}):M={},M.escape==null&&(M.escape=!0),M.ignore==null?M.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof M.ignore=="string"&&(M.ignore=[M.ignore]),M.ignore=M.ignore.map(function(u){return u.length===1&&(u=u+u),u}));var d=A.parse(o,{flat:!0,brackets:M.ignore}),g=d[0],r=g.split(L);if(M.escape){for(var t=[],s=0;s<r.length;s++){var a=r[s],c=r[s+1];a[a.length-1]==="\\"&&a[a.length-2]!=="\\"?(t.push(a+L+c),s++):t.push(a)}r=t}for(var s=0;s<r.length;s++)d[0]=r[s],r[s]=A.stringify(d,{flat:!0});return r}},78484:function(te){te.exports=X;function X(e){for(var A=e.length,P=new Array(A),o=new Array(A),L=new Array(A),M=new Array(A),d=new Array(A),g=new Array(A),r=0;r<A;++r)P[r]=-1,o[r]=0,L[r]=!1,M[r]=0,d[r]=-1,g[r]=[];var t=0,s=[],a=[];function c(h){var T=[h],f=[h];for(P[h]=o[h]=t,L[h]=!0,t+=1;f.length>0;){h=f[f.length-1];var n=e[h];if(M[h]<n.length){for(var v=M[h];v<n.length;++v){var m=n[v];if(P[m]<0){P[m]=o[m]=t,L[m]=!0,t+=1,T.push(m),f.push(m);break}else L[m]&&(o[h]=Math.min(o[h],o[m])|0);d[m]>=0&&g[h].push(d[m])}M[h]=v}else{if(o[h]===P[h]){for(var b=[],E=[],p=0,v=T.length-1;v>=0;--v){var S=T[v];if(L[S]=!1,b.push(S),E.push(g[S]),p+=g[S].length,d[S]=s.length,S===h){T.length=v;break}}s.push(b);for(var w=new Array(p),v=0;v<E.length;v++)for(var i=0;i<E[v].length;i++)w[--p]=E[v][i];a.push(w)}f.pop()}}}for(var r=0;r<A;++r)P[r]<0&&c(r);for(var u,r=0;r<a.length;r++){var l=a[r];if(l.length!==0){l.sort(function(T,f){return T-f}),u=[l[0]];for(var y=1;y<l.length;y++)l[y]!==l[y-1]&&u.push(l[y]);a[r]=u}}return{components:s,adjacencyList:a}}},92848:function(te,X,e){e.r(X);var A=function(){function r(t,s){var a=[],c=!0,u=!1,l=void 0;try{for(var y=t[Symbol.iterator](),h;!(c=(h=y.next()).done)&&(a.push(h.value),!(s&&a.length===s));c=!0);}catch(T){u=!0,l=T}finally{try{!c&&y.return&&y.return()}finally{if(u)throw l}}return a}return function(t,s){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=Math.PI*2,o=function(t,s,a,c,u,l,y){var h=t.x,T=t.y;h*=s,T*=a;var f=c*h-u*T,n=u*h+c*T;return{x:f+l,y:n+y}},L=function(t,s){var a=s===1.5707963267948966?.551915024494:s===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(s/4),c=Math.cos(t),u=Math.sin(t),l=Math.cos(t+s),y=Math.sin(t+s);return[{x:c-u*a,y:u+c*a},{x:l+y*a,y:y-l*a},{x:l,y}]},M=function(t,s,a,c){var u=t*c-s*a<0?-1:1,l=t*a+s*c;return l>1&&(l=1),l<-1&&(l=-1),u*Math.acos(l)},d=function(t,s,a,c,u,l,y,h,T,f,n,v){var m=Math.pow(u,2),b=Math.pow(l,2),E=Math.pow(n,2),p=Math.pow(v,2),S=m*b-m*p-b*E;S<0&&(S=0),S/=m*p+b*E,S=Math.sqrt(S)*(y===h?-1:1);var w=S*u/l*v,i=S*-l/u*n,C=f*w-T*i+(t+a)/2,x=T*w+f*i+(s+c)/2,k=(n-w)/u,I=(v-i)/l,B=(-n-w)/u,_=(-v-i)/l,z=M(1,0,k,I),O=M(k,I,B,_);return h===0&&O>0&&(O-=P),h===1&&O<0&&(O+=P),[C,x,z,O]},g=function(t){var s=t.px,a=t.py,c=t.cx,u=t.cy,l=t.rx,y=t.ry,h=t.xAxisRotation,T=h===void 0?0:h,f=t.largeArcFlag,n=f===void 0?0:f,v=t.sweepFlag,m=v===void 0?0:v,b=[];if(l===0||y===0)return[];var E=Math.sin(T*P/360),p=Math.cos(T*P/360),S=p*(s-c)/2+E*(a-u)/2,w=-E*(s-c)/2+p*(a-u)/2;if(S===0&&w===0)return[];l=Math.abs(l),y=Math.abs(y);var i=Math.pow(S,2)/Math.pow(l,2)+Math.pow(w,2)/Math.pow(y,2);i>1&&(l*=Math.sqrt(i),y*=Math.sqrt(i));var C=d(s,a,c,u,l,y,n,m,E,p,S,w),x=A(C,4),k=x[0],I=x[1],B=x[2],_=x[3],z=Math.abs(_)/(P/4);Math.abs(1-z)<1e-7&&(z=1);var O=Math.max(Math.ceil(z),1);_/=O;for(var F=0;F<O;F++)b.push(L(B,_)),B+=_;return b.map(function(N){var V=o(N[0],l,y,p,E,k,I),j=V.x,$=V.y,q=o(N[1],l,y,p,E,k,I),oe=q.x,Z=q.y,G=o(N[2],l,y,p,E,k,I),re=G.x,H=G.y;return{x1:j,y1:$,x2:oe,y2:Z,x:re,y:H}})};X.default=g},74840:function(te,X,e){var A=e(21984),P=e(49972),o=e(41976),L=e(53520),M=e(45408);te.exports=d;function d(g){if(Array.isArray(g)&&g.length===1&&typeof g[0]=="string"&&(g=g[0]),typeof g=="string"&&(M(L(g),"String is not an SVG path."),g=A(g)),M(Array.isArray(g),"Argument should be a string or an array of path segments."),g=P(g),g=o(g),!g.length)return[0,0,0,0];for(var r=[1/0,1/0,-1/0,-1/0],t=0,s=g.length;t<s;t++)for(var a=g[t].slice(1),c=0;c<a.length;c+=2)a[c+0]<r[0]&&(r[0]=a[c+0]),a[c+1]<r[1]&&(r[1]=a[c+1]),a[c+0]>r[2]&&(r[2]=a[c+0]),a[c+1]>r[3]&&(r[3]=a[c+1]);return r}},41976:function(te,X,e){te.exports=P;var A=e(92848);function P(M){for(var d,g=[],r=0,t=0,s=0,a=0,c=null,u=null,l=0,y=0,h=0,T=M.length;h<T;h++){var f=M[h],n=f[0];switch(n){case"M":s=f[1],a=f[2];break;case"A":var v=A({px:l,py:y,cx:f[6],cy:f[7],rx:f[1],ry:f[2],xAxisRotation:f[3],largeArcFlag:f[4],sweepFlag:f[5]});if(!v.length)continue;for(var m=0,b;m<v.length;m++)b=v[m],f=["C",b.x1,b.y1,b.x2,b.y2,b.x,b.y],m<v.length-1&&g.push(f);break;case"S":var E=l,p=y;(d=="C"||d=="S")&&(E+=E-r,p+=p-t),f=["C",E,p,f[1],f[2],f[3],f[4]];break;case"T":d=="Q"||d=="T"?(c=l*2-c,u=y*2-u):(c=l,u=y),f=L(l,y,c,u,f[1],f[2]);break;case"Q":c=f[1],u=f[2],f=L(l,y,f[1],f[2],f[3],f[4]);break;case"L":f=o(l,y,f[1],f[2]);break;case"H":f=o(l,y,f[1],y);break;case"V":f=o(l,y,l,f[1]);break;case"Z":f=o(l,y,s,a);break}d=n,l=f[f.length-2],y=f[f.length-1],f.length>4?(r=f[f.length-4],t=f[f.length-3]):(r=l,t=y),g.push(f)}return g}function o(M,d,g,r){return["C",M,d,g,r,g,r]}function L(M,d,g,r,t,s){return["C",M/3+.6666666666666666*g,d/3+.6666666666666666*r,t/3+.6666666666666666*g,s/3+.6666666666666666*r,t,s]}},20472:function(te,X,e){var A=e(74840),P=e(21984),o=e(22235),L=e(53520),M=e(29620),d=document.createElement("canvas"),g=d.getContext("2d");te.exports=r;function r(a,c){if(!L(a))throw Error("Argument should be valid svg path string");c||(c={});var u,l;c.shape?(u=c.shape[0],l=c.shape[1]):(u=d.width=c.w||c.width||200,l=d.height=c.h||c.height||200);var y=Math.min(u,l),h=c.stroke||0,T=c.viewbox||c.viewBox||A(a),f=[u/(T[2]-T[0]),l/(T[3]-T[1])],n=Math.min(f[0]||0,f[1]||0)/2;if(g.fillStyle="black",g.fillRect(0,0,u,l),g.fillStyle="white",h&&(typeof h!="number"&&(h=1),h>0?g.strokeStyle="white":g.strokeStyle="black",g.lineWidth=Math.abs(h)),g.translate(u*.5,l*.5),g.scale(n,n),s()){var v=new Path2D(a);g.fill(v),h&&g.stroke(v)}else{var m=P(a);o(g,m),g.fill(),h&&g.stroke()}g.setTransform(1,0,0,1,0,0);var b=M(g,{cutoff:c.cutoff!=null?c.cutoff:.5,radius:c.radius!=null?c.radius:y*.5});return b}var t;function s(){if(t!=null)return t;var a=document.createElement("canvas").getContext("2d");if(a.canvas.width=a.canvas.height=1,!window.Path2D)return t=!1;var c=new Path2D("M0,0h1v1h-1v-1Z");a.fillStyle="black",a.fill(c);var u=a.getImageData(0,0,1,1);return t=u&&u.data&&u.data[3]===255}},49760:function(te,X,e){var A;(function(P){var o=/^\s+/,L=/\s+$/,M=0,d=P.round,g=P.min,r=P.max,t=P.random;function s(Y,ie){if(Y=Y||"",ie=ie||{},Y instanceof s)return Y;if(!(this instanceof s))return new s(Y,ie);var ne=a(Y);this._originalInput=Y,this._r=ne.r,this._g=ne.g,this._b=ne.b,this._a=ne.a,this._roundA=d(100*this._a)/100,this._format=ie.format||ne.format,this._gradientType=ie.gradientType,this._r<1&&(this._r=d(this._r)),this._g<1&&(this._g=d(this._g)),this._b<1&&(this._b=d(this._b)),this._ok=ne.ok,this._tc_id=M++}s.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 Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ie,ne,le,de,we,me;return ie=Y.r/255,ne=Y.g/255,le=Y.b/255,ie<=.03928?de=ie/12.92:de=P.pow((ie+.055)/1.055,2.4),ne<=.03928?we=ne/12.92:we=P.pow((ne+.055)/1.055,2.4),le<=.03928?me=le/12.92:me=P.pow((le+.055)/1.055,2.4),.2126*de+.7152*we+.0722*me},setAlpha:function(Y){return this._a=F(Y),this._roundA=d(100*this._a)/100,this},toHsv:function(){var Y=y(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=y(this._r,this._g,this._b),ie=d(Y.h*360),ne=d(Y.s*100),le=d(Y.v*100);return this._a==1?"hsv("+ie+", "+ne+"%, "+le+"%)":"hsva("+ie+", "+ne+"%, "+le+"%, "+this._roundA+")"},toHsl:function(){var Y=u(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=u(this._r,this._g,this._b),ie=d(Y.h*360),ne=d(Y.s*100),le=d(Y.l*100);return this._a==1?"hsl("+ie+", "+ne+"%, "+le+"%)":"hsla("+ie+", "+ne+"%, "+le+"%, "+this._roundA+")"},toHex:function(Y){return T(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return f(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:d(this._r),g:d(this._g),b:d(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+d(this._r)+", "+d(this._g)+", "+d(this._b)+")":"rgba("+d(this._r)+", "+d(this._g)+", "+d(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:d(N(this._r,255)*100)+"%",g:d(N(this._g,255)*100)+"%",b:d(N(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+d(N(this._r,255)*100)+"%, "+d(N(this._g,255)*100)+"%, "+d(N(this._b,255)*100)+"%)":"rgba("+d(N(this._r,255)*100)+"%, "+d(N(this._g,255)*100)+"%, "+d(N(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[T(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ie="#"+n(this._r,this._g,this._b,this._a),ne=ie,le=this._gradientType?"GradientType = 1, ":"";if(Y){var de=s(Y);ne="#"+n(de._r,de._g,de._b,de._a)}return"progid:DXImageTransform.Microsoft.gradient("+le+"startColorstr="+ie+",endColorstr="+ne+")"},toString:function(Y){var ie=!!Y;Y=Y||this._format;var ne=!1,le=this._a<1&&this._a>=0,de=!ie&&le&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return de?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ne=this.toRgbString()),Y==="prgb"&&(ne=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ne=this.toHexString()),Y==="hex3"&&(ne=this.toHexString(!0)),Y==="hex4"&&(ne=this.toHex8String(!0)),Y==="hex8"&&(ne=this.toHex8String()),Y==="name"&&(ne=this.toName()),Y==="hsl"&&(ne=this.toHslString()),Y==="hsv"&&(ne=this.toHsvString()),ne||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Y,ie){var ne=Y.apply(null,[this].concat([].slice.call(ie)));return this._r=ne._r,this._g=ne._g,this._b=ne._b,this.setAlpha(ne._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(Y,ie){return Y.apply(null,[this].concat([].slice.call(ie)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(i,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},s.fromRatio=function(Y,ie){if(typeof Y=="object"){var ne={};for(var le in Y)Y.hasOwnProperty(le)&&(le==="a"?ne[le]=Y[le]:ne[le]=Z(Y[le]));Y=ne}return s(Y,ie)};function a(Y){var ie={r:0,g:0,b:0},ne=1,le=null,de=null,we=null,me=!1,Le=!1;return typeof Y=="string"&&(Y=ae(Y)),typeof Y=="object"&&(J(Y.r)&&J(Y.g)&&J(Y.b)?(ie=c(Y.r,Y.g,Y.b),me=!0,Le=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):J(Y.h)&&J(Y.s)&&J(Y.v)?(le=Z(Y.s),de=Z(Y.v),ie=h(Y.h,le,de),me=!0,Le="hsv"):J(Y.h)&&J(Y.s)&&J(Y.l)&&(le=Z(Y.s),we=Z(Y.l),ie=l(Y.h,le,we),me=!0,Le="hsl"),Y.hasOwnProperty("a")&&(ne=Y.a)),ne=F(ne),{ok:me,format:Y.format||Le,r:g(255,r(ie.r,0)),g:g(255,r(ie.g,0)),b:g(255,r(ie.b,0)),a:ne}}function c(Y,ie,ne){return{r:N(Y,255)*255,g:N(ie,255)*255,b:N(ne,255)*255}}function u(Y,ie,ne){Y=N(Y,255),ie=N(ie,255),ne=N(ne,255);var le=r(Y,ie,ne),de=g(Y,ie,ne),we,me,Le=(le+de)/2;if(le==de)we=me=0;else{var ve=le-de;switch(me=Le>.5?ve/(2-le-de):ve/(le+de),le){case Y:we=(ie-ne)/ve+(ie<ne?6:0);break;case ie:we=(ne-Y)/ve+2;break;case ne:we=(Y-ie)/ve+4;break}we/=6}return{h:we,s:me,l:Le}}function l(Y,ie,ne){var le,de,we;Y=N(Y,360),ie=N(ie,100),ne=N(ne,100);function me(Ae,ye,Se){return Se<0&&(Se+=1),Se>1&&(Se-=1),Se<.16666666666666666?Ae+(ye-Ae)*6*Se:Se<.5?ye:Se<.6666666666666666?Ae+(ye-Ae)*(.6666666666666666-Se)*6:Ae}if(ie===0)le=de=we=ne;else{var Le=ne<.5?ne*(1+ie):ne+ie-ne*ie,ve=2*ne-Le;le=me(ve,Le,Y+.3333333333333333),de=me(ve,Le,Y),we=me(ve,Le,Y-.3333333333333333)}return{r:le*255,g:de*255,b:we*255}}function y(Y,ie,ne){Y=N(Y,255),ie=N(ie,255),ne=N(ne,255);var le=r(Y,ie,ne),de=g(Y,ie,ne),we,me,Le=le,ve=le-de;if(me=le===0?0:ve/le,le==de)we=0;else{switch(le){case Y:we=(ie-ne)/ve+(ie<ne?6:0);break;case ie:we=(ne-Y)/ve+2;break;case ne:we=(Y-ie)/ve+4;break}we/=6}return{h:we,s:me,v:Le}}function h(Y,ie,ne){Y=N(Y,360)*6,ie=N(ie,100),ne=N(ne,100);var le=P.floor(Y),de=Y-le,we=ne*(1-ie),me=ne*(1-de*ie),Le=ne*(1-(1-de)*ie),ve=le%6,Ae=[ne,me,we,we,Le,ne][ve],ye=[Le,ne,ne,me,we,we][ve],Se=[we,we,Le,ne,ne,me][ve];return{r:Ae*255,g:ye*255,b:Se*255}}function T(Y,ie,ne,le){var de=[oe(d(Y).toString(16)),oe(d(ie).toString(16)),oe(d(ne).toString(16))];return le&&de[0].charAt(0)==de[0].charAt(1)&&de[1].charAt(0)==de[1].charAt(1)&&de[2].charAt(0)==de[2].charAt(1)?de[0].charAt(0)+de[1].charAt(0)+de[2].charAt(0):de.join("")}function f(Y,ie,ne,le,de){var we=[oe(d(Y).toString(16)),oe(d(ie).toString(16)),oe(d(ne).toString(16)),oe(G(le))];return de&&we[0].charAt(0)==we[0].charAt(1)&&we[1].charAt(0)==we[1].charAt(1)&&we[2].charAt(0)==we[2].charAt(1)&&we[3].charAt(0)==we[3].charAt(1)?we[0].charAt(0)+we[1].charAt(0)+we[2].charAt(0)+we[3].charAt(0):we.join("")}function n(Y,ie,ne,le){var de=[oe(G(le)),oe(d(Y).toString(16)),oe(d(ie).toString(16)),oe(d(ne).toString(16))];return de.join("")}s.equals=function(Y,ie){return!Y||!ie?!1:s(Y).toRgbString()==s(ie).toRgbString()},s.random=function(){return s.fromRatio({r:t(),g:t(),b:t()})};function v(Y,ie){ie=ie===0?0:ie||10;var ne=s(Y).toHsl();return ne.s-=ie/100,ne.s=V(ne.s),s(ne)}function m(Y,ie){ie=ie===0?0:ie||10;var ne=s(Y).toHsl();return ne.s+=ie/100,ne.s=V(ne.s),s(ne)}function b(Y){return s(Y).desaturate(100)}function E(Y,ie){ie=ie===0?0:ie||10;var ne=s(Y).toHsl();return ne.l+=ie/100,ne.l=V(ne.l),s(ne)}function p(Y,ie){ie=ie===0?0:ie||10;var ne=s(Y).toRgb();return ne.r=r(0,g(255,ne.r-d(255*-(ie/100)))),ne.g=r(0,g(255,ne.g-d(255*-(ie/100)))),ne.b=r(0,g(255,ne.b-d(255*-(ie/100)))),s(ne)}function S(Y,ie){ie=ie===0?0:ie||10;var ne=s(Y).toHsl();return ne.l-=ie/100,ne.l=V(ne.l),s(ne)}function w(Y,ie){var ne=s(Y).toHsl(),le=(ne.h+ie)%360;return ne.h=le<0?360+le:le,s(ne)}function i(Y){var ie=s(Y).toHsl();return ie.h=(ie.h+180)%360,s(ie)}function C(Y){var ie=s(Y).toHsl(),ne=ie.h;return[s(Y),s({h:(ne+120)%360,s:ie.s,l:ie.l}),s({h:(ne+240)%360,s:ie.s,l:ie.l})]}function x(Y){var ie=s(Y).toHsl(),ne=ie.h;return[s(Y),s({h:(ne+90)%360,s:ie.s,l:ie.l}),s({h:(ne+180)%360,s:ie.s,l:ie.l}),s({h:(ne+270)%360,s:ie.s,l:ie.l})]}function k(Y){var ie=s(Y).toHsl(),ne=ie.h;return[s(Y),s({h:(ne+72)%360,s:ie.s,l:ie.l}),s({h:(ne+216)%360,s:ie.s,l:ie.l})]}function I(Y,ie,ne){ie=ie||6,ne=ne||30;var le=s(Y).toHsl(),de=360/ne,we=[s(Y)];for(le.h=(le.h-(de*ie>>1)+720)%360;--ie;)le.h=(le.h+de)%360,we.push(s(le));return we}function B(Y,ie){ie=ie||6;for(var ne=s(Y).toHsv(),le=ne.h,de=ne.s,we=ne.v,me=[],Le=1/ie;ie--;)me.push(s({h:le,s:de,v:we})),we=(we+Le)%1;return me}s.mix=function(Y,ie,ne){ne=ne===0?0:ne||50;var le=s(Y).toRgb(),de=s(ie).toRgb(),we=ne/100,me={r:(de.r-le.r)*we+le.r,g:(de.g-le.g)*we+le.g,b:(de.b-le.b)*we+le.b,a:(de.a-le.a)*we+le.a};return s(me)},s.readability=function(Y,ie){var ne=s(Y),le=s(ie);return(P.max(ne.getLuminance(),le.getLuminance())+.05)/(P.min(ne.getLuminance(),le.getLuminance())+.05)},s.isReadable=function(Y,ie,ne){var le=s.readability(Y,ie),de,we;switch(we=!1,de=K(ne),de.level+de.size){case"AAsmall":case"AAAlarge":we=le>=4.5;break;case"AAlarge":we=le>=3;break;case"AAAsmall":we=le>=7;break}return we},s.mostReadable=function(Y,ie,ne){var le=null,de=0,we,me,Le,ve;ne=ne||{},me=ne.includeFallbackColors,Le=ne.level,ve=ne.size;for(var Ae=0;Ae<ie.length;Ae++)we=s.readability(Y,ie[Ae]),we>de&&(de=we,le=s(ie[Ae]));return s.isReadable(Y,le,{level:Le,size:ve})||!me?le:(ne.includeFallbackColors=!1,s.mostReadable(Y,["#fff","#000"],ne))};var _=s.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z=s.hexNames=O(_);function O(Y){var ie={};for(var ne in Y)Y.hasOwnProperty(ne)&&(ie[Y[ne]]=ne);return ie}function F(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function N(Y,ie){$(Y)&&(Y="100%");var ne=q(Y);return Y=g(ie,r(0,parseFloat(Y))),ne&&(Y=parseInt(Y*ie,10)/100),P.abs(Y-ie)<1e-6?1:Y%ie/parseFloat(ie)}function V(Y){return g(1,r(0,Y))}function j(Y){return parseInt(Y,16)}function $(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function q(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function oe(Y){return Y.length==1?"0"+Y:""+Y}function Z(Y){return Y<=1&&(Y=Y*100+"%"),Y}function G(Y){return P.round(parseFloat(Y)*255).toString(16)}function re(Y){return j(Y)/255}var H=function(){var Y="[-\\+]?\\d+%?",ie="[-\\+]?\\d*\\.\\d+%?",ne="(?:"+ie+")|(?:"+Y+")",le="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?",de="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?";return{CSS_UNIT:new RegExp(ne),rgb:new RegExp("rgb"+le),rgba:new RegExp("rgba"+de),hsl:new RegExp("hsl"+le),hsla:new RegExp("hsla"+de),hsv:new RegExp("hsv"+le),hsva:new RegExp("hsva"+de),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 J(Y){return!!H.CSS_UNIT.exec(Y)}function ae(Y){Y=Y.replace(o,"").replace(L,"").toLowerCase();var ie=!1;if(_[Y])Y=_[Y],ie=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ne;return(ne=H.rgb.exec(Y))?{r:ne[1],g:ne[2],b:ne[3]}:(ne=H.rgba.exec(Y))?{r:ne[1],g:ne[2],b:ne[3],a:ne[4]}:(ne=H.hsl.exec(Y))?{h:ne[1],s:ne[2],l:ne[3]}:(ne=H.hsla.exec(Y))?{h:ne[1],s:ne[2],l:ne[3],a:ne[4]}:(ne=H.hsv.exec(Y))?{h:ne[1],s:ne[2],v:ne[3]}:(ne=H.hsva.exec(Y))?{h:ne[1],s:ne[2],v:ne[3],a:ne[4]}:(ne=H.hex8.exec(Y))?{r:j(ne[1]),g:j(ne[2]),b:j(ne[3]),a:re(ne[4]),format:ie?"name":"hex8"}:(ne=H.hex6.exec(Y))?{r:j(ne[1]),g:j(ne[2]),b:j(ne[3]),format:ie?"name":"hex"}:(ne=H.hex4.exec(Y))?{r:j(ne[1]+""+ne[1]),g:j(ne[2]+""+ne[2]),b:j(ne[3]+""+ne[3]),a:re(ne[4]+""+ne[4]),format:ie?"name":"hex8"}:(ne=H.hex3.exec(Y))?{r:j(ne[1]+""+ne[1]),g:j(ne[2]+""+ne[2]),b:j(ne[3]+""+ne[3]),format:ie?"name":"hex"}:!1}function K(Y){var ie,ne;return Y=Y||{level:"AA",size:"small"},ie=(Y.level||"AA").toUpperCase(),ne=(Y.size||"small").toLowerCase(),ie!=="AA"&&ie!=="AAA"&&(ie="AA"),ne!=="small"&&ne!=="large"&&(ne="small"),{level:ie,size:ne}}te.exports?te.exports=s:(A=(function(){return s}).call(X,e,X,te),A!==void 0&&(te.exports=A))})(Math)},37816:function(te){te.exports=A,te.exports.float32=te.exports.float=A,te.exports.fract32=te.exports.fract=e;var X=new Float32Array(1);function e(P,o){if(P.length){if(P instanceof Float32Array)return new Float32Array(P.length);o instanceof Float32Array||(o=A(P));for(var L=0,M=o.length;L<M;L++)o[L]=P[L]-o[L];return o}return A(P-A(P))}function A(P){return P.length?P instanceof Float32Array?P:new Float32Array(P):(X[0]=P,X[0])}},23464:function(te,X,e){var A=e(65819);te.exports=M;var P=96;function o(d,g){var r=A(getComputedStyle(d).getPropertyValue(g));return r[0]*M(r[1],d)}function L(d,g){var r=document.createElement("div");r.style["font-size"]="128"+d,g.appendChild(r);var t=o(r,"font-size")/128;return g.removeChild(r),t}function M(d,g){switch(g=g||document.body,d=(d||"px").trim().toLowerCase(),(g===window||g===document)&&(g=document.body),d){case"%":return g.clientHeight/100;case"ch":case"ex":return L(d,g);case"em":return o(g,"font-size");case"rem":return o(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 P;case"cm":return P/2.54;case"mm":return P/25.4;case"pt":return P/72;case"pc":return P/6}return 1}},55712:function(te,X,e){e.d(X,{NO:function(){return L}});function A(g,r){for(var t,s=g.length,a=s-r;a<--s;)t=g[a],g[a++]=g[s],g[s]=t}function P(g){return g}function o(g){if(g==null)return P;var r,t,s=g.scale[0],a=g.scale[1],c=g.translate[0],u=g.translate[1];return function(l,y){y||(r=t=0);var h=2,T=l.length,f=new Array(T);for(f[0]=(r+=l[0])*s+c,f[1]=(t+=l[1])*a+u;h<T;)f[h]=l[h],++h;return f}}function L(g,r){return typeof r=="string"&&(r=g.objects[r]),r.type==="GeometryCollection"?{type:"FeatureCollection",features:r.geometries.map(function(t){return M(g,t)})}:M(g,r)}function M(g,r){var t=r.id,s=r.bbox,a=r.properties==null?{}:r.properties,c=d(g,r);return t==null&&s==null?{type:"Feature",properties:a,geometry:c}:s==null?{type:"Feature",id:t,properties:a,geometry:c}:{type:"Feature",id:t,bbox:s,properties:a,geometry:c}}function d(g,r){var t=o(g.transform),s=g.arcs;function a(T,f){f.length&&f.pop();for(var n=s[T<0?~T:T],v=0,m=n.length;v<m;++v)f.push(t(n[v],v));T<0&&A(f,m)}function c(T){return t(T)}function u(T){for(var f=[],n=0,v=T.length;n<v;++n)a(T[n],f);return f.length<2&&f.push(f[0]),f}function l(T){for(var f=u(T);f.length<4;)f.push(f[0]);return f}function y(T){return T.map(l)}function h(T){var f=T.type,n;switch(f){case"GeometryCollection":return{type:f,geometries:T.geometries.map(h)};case"Point":n=c(T.coordinates);break;case"MultiPoint":n=T.coordinates.map(c);break;case"LineString":n=u(T.arcs);break;case"MultiLineString":n=T.arcs.map(u);break;case"Polygon":n=y(T.arcs);break;case"MultiPolygon":n=T.arcs.map(y);break;default:return null}return{type:f,coordinates:n}}return h(r)}},73384:function(te,X,e){var A=e(54612);te.exports=function(P){if(typeof P!="function"||!hasOwnProperty.call(P,"length"))return!1;try{if(typeof P.length!="number"||typeof P.call!="function"||typeof P.apply!="function")return!1}catch{return!1}return!A(P)}},57980:function(te,X,e){var A=e(81680),P=e(7328),o=e(33940),L=e(18856),M=function(d,g){return d.replace("%v",L(g))};te.exports=function(d,g,r){if(!P(r))throw new TypeError(M(g,d));if(!A(d)){if("default"in r)return r.default;if(r.isOptional)return null}var t=o(r.errorMessage);throw A(t)||(t=g),new TypeError(M(t,d))}},32336:function(te){te.exports=function(X){try{return X.toString()}catch{try{return String(X)}catch{return null}}}},18856:function(te,X,e){var A=e(32336),P=/[\n\r\u2028\u2029]/g;te.exports=function(o){var L=A(o);return L===null?"<Non-coercible to string value>":(L.length>100&&(L=L.slice(0,99)+"…"),L=L.replace(P,function(M){switch(M){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),L)}},7328:function(te,X,e){var A=e(81680),P={object:!0,function:!0,undefined:!0};te.exports=function(o){return A(o)?hasOwnProperty.call(P,typeof o):!1}},87396:function(te,X,e){var A=e(57980),P=e(85488);te.exports=function(o){return P(o)?o:A(o,"%v is not a plain function",arguments[1])}},85488:function(te,X,e){var A=e(73384),P=/^\s*class[\s{/}]/,o=Function.prototype.toString;te.exports=function(L){return!(!A(L)||P.test(o.call(L)))}},54612:function(te,X,e){var A=e(7328);te.exports=function(P){if(!A(P))return!1;try{return P.constructor?P.constructor.prototype===P:!1}catch{return!1}}},33940:function(te,X,e){var A=e(81680),P=e(7328),o=Object.prototype.toString;te.exports=function(L){if(!A(L))return null;if(P(L)){var M=L.toString;if(typeof M!="function"||M===o)return null}try{return""+L}catch{return null}}},18496:function(te,X,e){var A=e(57980),P=e(81680);te.exports=function(o){return P(o)?o:A(o,"Cannot use %v",arguments[1])}},81680:function(te){var X=void 0;te.exports=function(e){return e!==X&&e!==null}},14144:function(te,X,e){var A=e(308),P=e(10352),o=e(33576).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:P([32,0]),UINT16:P([32,0]),UINT32:P([32,0]),BIGUINT64:P([32,0]),INT8:P([32,0]),INT16:P([32,0]),INT32:P([32,0]),BIGINT64:P([32,0]),FLOAT:P([32,0]),DOUBLE:P([32,0]),DATA:P([32,0]),UINT8C:P([32,0]),BUFFER:P([32,0])});var L=typeof Uint8ClampedArray<"u",M=typeof BigUint64Array<"u",d=typeof BigInt64Array<"u",g=e.g.__TYPEDARRAY_POOL;g.UINT8C||(g.UINT8C=P([32,0])),g.BIGUINT64||(g.BIGUINT64=P([32,0])),g.BIGINT64||(g.BIGINT64=P([32,0])),g.BUFFER||(g.BUFFER=P([32,0]));var r=g.DATA,t=g.BUFFER;X.free=function(i){if(o.isBuffer(i))t[A.log2(i.length)].push(i);else{if(Object.prototype.toString.call(i)!=="[object ArrayBuffer]"&&(i=i.buffer),!i)return;var C=i.length||i.byteLength,x=A.log2(C)|0;r[x].push(i)}};function s(w){if(w){var i=w.length||w.byteLength,C=A.log2(i);r[C].push(w)}}function a(w){s(w.buffer)}X.freeUint8=X.freeUint16=X.freeUint32=X.freeBigUint64=X.freeInt8=X.freeInt16=X.freeInt32=X.freeBigInt64=X.freeFloat32=X.freeFloat=X.freeFloat64=X.freeDouble=X.freeUint8Clamped=X.freeDataView=a,X.freeArrayBuffer=s,X.freeBuffer=function(i){t[A.log2(i.length)].push(i)},X.malloc=function(i,C){if(C===void 0||C==="arraybuffer")return c(i);switch(C){case"uint8":return u(i);case"uint16":return l(i);case"uint32":return y(i);case"int8":return h(i);case"int16":return T(i);case"int32":return f(i);case"float":case"float32":return n(i);case"double":case"float64":return v(i);case"uint8_clamped":return m(i);case"bigint64":return E(i);case"biguint64":return b(i);case"buffer":return S(i);case"data":case"dataview":return p(i);default:return null}return null};function c(i){var i=A.nextPow2(i),C=A.log2(i),x=r[C];return x.length>0?x.pop():new ArrayBuffer(i)}X.mallocArrayBuffer=c;function u(w){return new Uint8Array(c(w),0,w)}X.mallocUint8=u;function l(w){return new Uint16Array(c(2*w),0,w)}X.mallocUint16=l;function y(w){return new Uint32Array(c(4*w),0,w)}X.mallocUint32=y;function h(w){return new Int8Array(c(w),0,w)}X.mallocInt8=h;function T(w){return new Int16Array(c(2*w),0,w)}X.mallocInt16=T;function f(w){return new Int32Array(c(4*w),0,w)}X.mallocInt32=f;function n(w){return new Float32Array(c(4*w),0,w)}X.mallocFloat32=X.mallocFloat=n;function v(w){return new Float64Array(c(8*w),0,w)}X.mallocFloat64=X.mallocDouble=v;function m(w){return L?new Uint8ClampedArray(c(w),0,w):u(w)}X.mallocUint8Clamped=m;function b(w){return M?new BigUint64Array(c(8*w),0,w):null}X.mallocBigUint64=b;function E(w){return d?new BigInt64Array(c(8*w),0,w):null}X.mallocBigInt64=E;function p(w){return new DataView(c(w),0,w)}X.mallocDataView=p;function S(w){w=A.nextPow2(w);var i=A.log2(w),C=t[i];return C.length>0?C.pop():new o(w)}X.mallocBuffer=S,X.clearCache=function(){for(var i=0;i<32;++i)g.UINT8[i].length=0,g.UINT16[i].length=0,g.UINT32[i].length=0,g.INT8[i].length=0,g.INT16[i].length=0,g.INT32[i].length=0,g.FLOAT[i].length=0,g.DOUBLE[i].length=0,g.BIGUINT64[i].length=0,g.BIGINT64[i].length=0,g.UINT8C[i].length=0,r[i].length=0,t[i].length=0}},92384:function(te){var X=/[\'\"]/;te.exports=function(A){return A?(X.test(A.charAt(0))&&(A=A.substr(1)),X.test(A.charAt(A.length-1))&&(A=A.substr(0,A.length-1)),A):""}},45223:function(te){te.exports=function(e,A,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var o=0,L=P.length;o<L;o++){var M=P[o];for(var d in M)if(!(A[d]!==void 0&&!Array.isArray(A[d])&&e[d]===A[d])&&d in A){var g;if(M[d]===!0)g=A[d];else{if(M[d]===!1)continue;if(typeof M[d]=="function"&&(g=M[d](A[d],e,A),g===void 0))continue}e[d]=g}}return e}},96656:function(te,X,e){te.exports=A;function A(o,L){if(P("noDeprecation"))return o;var M=!1;function d(){if(!M){if(P("throwDeprecation"))throw new Error(L);P("traceDeprecation")?console.trace(L):console.warn(L),M=!0}return o.apply(this,arguments)}return d}function P(o){try{if(!e.g.localStorage)return!1}catch{return!1}var L=e.g.localStorage[o];return L==null?!1:String(L).toLowerCase()==="true"}},75272:function(te){te.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}},41088:function(te,X,e){var A=e(91148),P=e(84420),o=e(96632),L=e(7728);function M(we){return we.call.bind(we)}var d=typeof BigInt<"u",g=typeof Symbol<"u",r=M(Object.prototype.toString),t=M(Number.prototype.valueOf),s=M(String.prototype.valueOf),a=M(Boolean.prototype.valueOf);if(d)var c=M(BigInt.prototype.valueOf);if(g)var u=M(Symbol.prototype.valueOf);function l(we,me){if(typeof we!="object")return!1;try{return me(we),!0}catch{return!1}}X.isArgumentsObject=A,X.isGeneratorFunction=P,X.isTypedArray=L;function y(we){return typeof Promise<"u"&&we instanceof Promise||we!==null&&typeof we=="object"&&typeof we.then=="function"&&typeof we.catch=="function"}X.isPromise=y;function h(we){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(we):L(we)||j(we)}X.isArrayBufferView=h;function T(we){return o(we)==="Uint8Array"}X.isUint8Array=T;function f(we){return o(we)==="Uint8ClampedArray"}X.isUint8ClampedArray=f;function n(we){return o(we)==="Uint16Array"}X.isUint16Array=n;function v(we){return o(we)==="Uint32Array"}X.isUint32Array=v;function m(we){return o(we)==="Int8Array"}X.isInt8Array=m;function b(we){return o(we)==="Int16Array"}X.isInt16Array=b;function E(we){return o(we)==="Int32Array"}X.isInt32Array=E;function p(we){return o(we)==="Float32Array"}X.isFloat32Array=p;function S(we){return o(we)==="Float64Array"}X.isFloat64Array=S;function w(we){return o(we)==="BigInt64Array"}X.isBigInt64Array=w;function i(we){return o(we)==="BigUint64Array"}X.isBigUint64Array=i;function C(we){return r(we)==="[object Map]"}C.working=typeof Map<"u"&&C(new Map);function x(we){return typeof Map>"u"?!1:C.working?C(we):we instanceof Map}X.isMap=x;function k(we){return r(we)==="[object Set]"}k.working=typeof Set<"u"&&k(new Set);function I(we){return typeof Set>"u"?!1:k.working?k(we):we instanceof Set}X.isSet=I;function B(we){return r(we)==="[object WeakMap]"}B.working=typeof WeakMap<"u"&&B(new WeakMap);function _(we){return typeof WeakMap>"u"?!1:B.working?B(we):we instanceof WeakMap}X.isWeakMap=_;function z(we){return r(we)==="[object WeakSet]"}z.working=typeof WeakSet<"u"&&z(new WeakSet);function O(we){return z(we)}X.isWeakSet=O;function F(we){return r(we)==="[object ArrayBuffer]"}F.working=typeof ArrayBuffer<"u"&&F(new ArrayBuffer);function N(we){return typeof ArrayBuffer>"u"?!1:F.working?F(we):we instanceof ArrayBuffer}X.isArrayBuffer=N;function V(we){return r(we)==="[object DataView]"}V.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&V(new DataView(new ArrayBuffer(1),0,1));function j(we){return typeof DataView>"u"?!1:V.working?V(we):we instanceof DataView}X.isDataView=j;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function q(we){return r(we)==="[object SharedArrayBuffer]"}function oe(we){return typeof $>"u"?!1:(typeof q.working>"u"&&(q.working=q(new $)),q.working?q(we):we instanceof $)}X.isSharedArrayBuffer=oe;function Z(we){return r(we)==="[object AsyncFunction]"}X.isAsyncFunction=Z;function G(we){return r(we)==="[object Map Iterator]"}X.isMapIterator=G;function re(we){return r(we)==="[object Set Iterator]"}X.isSetIterator=re;function H(we){return r(we)==="[object Generator]"}X.isGeneratorObject=H;function J(we){return r(we)==="[object WebAssembly.Module]"}X.isWebAssemblyCompiledModule=J;function ae(we){return l(we,t)}X.isNumberObject=ae;function K(we){return l(we,s)}X.isStringObject=K;function Y(we){return l(we,a)}X.isBooleanObject=Y;function ie(we){return d&&l(we,c)}X.isBigIntObject=ie;function ne(we){return g&&l(we,u)}X.isSymbolObject=ne;function le(we){return ae(we)||K(we)||Y(we)||ie(we)||ne(we)}X.isBoxedPrimitive=le;function de(we){return typeof Uint8Array<"u"&&(N(we)||oe(we))}X.isAnyArrayBuffer=de,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(X,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})},35840:function(te,X,e){var A=e(4168),P=Object.getOwnPropertyDescriptors||function($){for(var q=Object.keys($),oe={},Z=0;Z<q.length;Z++)oe[q[Z]]=Object.getOwnPropertyDescriptor($,q[Z]);return oe},o=/%[sdj%]/g;X.format=function(j){if(!b(j)){for(var $=[],q=0;q<arguments.length;q++)$.push(g(arguments[q]));return $.join(" ")}for(var q=1,oe=arguments,Z=oe.length,G=String(j).replace(o,function(H){if(H==="%%")return"%";if(q>=Z)return H;switch(H){case"%s":return String(oe[q++]);case"%d":return Number(oe[q++]);case"%j":try{return JSON.stringify(oe[q++])}catch{return"[Circular]"}default:return H}}),re=oe[q];q<Z;re=oe[++q])n(re)||!w(re)?G+=" "+re:G+=" "+g(re);return G},X.deprecate=function(j,$){if(typeof A<"u"&&A.noDeprecation===!0)return j;if(typeof A>"u")return function(){return X.deprecate(j,$).apply(this,arguments)};var q=!1;function oe(){if(!q){if(A.throwDeprecation)throw new Error($);A.traceDeprecation?console.trace($):console.error($),q=!0}return j.apply(this,arguments)}return oe};var L={},M=/^$/;if(A.env.NODE_DEBUG){var d=A.env.NODE_DEBUG;d=d.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),M=new RegExp("^"+d+"$","i")}X.debuglog=function(j){if(j=j.toUpperCase(),!L[j])if(M.test(j)){var $=A.pid;L[j]=function(){var q=X.format.apply(X,arguments);console.error("%s %d: %s",j,$,q)}}else L[j]=function(){};return L[j]};function g(j,$){var q={seen:[],stylize:t};return arguments.length>=3&&(q.depth=arguments[2]),arguments.length>=4&&(q.colors=arguments[3]),f($)?q.showHidden=$:$&&X._extend(q,$),p(q.showHidden)&&(q.showHidden=!1),p(q.depth)&&(q.depth=2),p(q.colors)&&(q.colors=!1),p(q.customInspect)&&(q.customInspect=!0),q.colors&&(q.stylize=r),a(q,j,q.depth)}X.inspect=g,g.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]},g.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(j,$){var q=g.styles[$];return q?"\x1B["+g.colors[q][0]+"m"+j+"\x1B["+g.colors[q][1]+"m":j}function t(j,$){return j}function s(j){var $={};return j.forEach(function(q,oe){$[q]=!0}),$}function a(j,$,q){if(j.customInspect&&$&&x($.inspect)&&$.inspect!==X.inspect&&!($.constructor&&$.constructor.prototype===$)){var oe=$.inspect(q,j);return b(oe)||(oe=a(j,oe,q)),oe}var Z=c(j,$);if(Z)return Z;var G=Object.keys($),re=s(G);if(j.showHidden&&(G=Object.getOwnPropertyNames($)),C($)&&(G.indexOf("message")>=0||G.indexOf("description")>=0))return u($);if(G.length===0){if(x($)){var H=$.name?": "+$.name:"";return j.stylize("[Function"+H+"]","special")}if(S($))return j.stylize(RegExp.prototype.toString.call($),"regexp");if(i($))return j.stylize(Date.prototype.toString.call($),"date");if(C($))return u($)}var J="",ae=!1,K=["{","}"];if(T($)&&(ae=!0,K=["[","]"]),x($)){var Y=$.name?": "+$.name:"";J=" [Function"+Y+"]"}if(S($)&&(J=" "+RegExp.prototype.toString.call($)),i($)&&(J=" "+Date.prototype.toUTCString.call($)),C($)&&(J=" "+u($)),G.length===0&&(!ae||$.length==0))return K[0]+J+K[1];if(q<0)return S($)?j.stylize(RegExp.prototype.toString.call($),"regexp"):j.stylize("[Object]","special");j.seen.push($);var ie;return ae?ie=l(j,$,q,re,G):ie=G.map(function(ne){return y(j,$,q,re,ne,ae)}),j.seen.pop(),h(ie,J,K)}function c(j,$){if(p($))return j.stylize("undefined","undefined");if(b($)){var q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(q,"string")}if(m($))return j.stylize(""+$,"number");if(f($))return j.stylize(""+$,"boolean");if(n($))return j.stylize("null","null")}function u(j){return"["+Error.prototype.toString.call(j)+"]"}function l(j,$,q,oe,Z){for(var G=[],re=0,H=$.length;re<H;++re)O($,String(re))?G.push(y(j,$,q,oe,String(re),!0)):G.push("");return Z.forEach(function(J){J.match(/^\d+$/)||G.push(y(j,$,q,oe,J,!0))}),G}function y(j,$,q,oe,Z,G){var re,H,J;if(J=Object.getOwnPropertyDescriptor($,Z)||{value:$[Z]},J.get?J.set?H=j.stylize("[Getter/Setter]","special"):H=j.stylize("[Getter]","special"):J.set&&(H=j.stylize("[Setter]","special")),O(oe,Z)||(re="["+Z+"]"),H||(j.seen.indexOf(J.value)<0?(n(q)?H=a(j,J.value,null):H=a(j,J.value,q-1),H.indexOf(`
`)>-1&&(G?H=H.split(`
`).map(function(ae){return" "+ae}).join(`
`).slice(2):H=`
`+H.split(`
`).map(function(ae){return" "+ae}).join(`
`))):H=j.stylize("[Circular]","special")),p(re)){if(G&&Z.match(/^\d+$/))return H;re=JSON.stringify(""+Z),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.slice(1,-1),re=j.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=j.stylize(re,"string"))}return re+": "+H}function h(j,$,q){var oe=j.reduce(function(Z,G){return G.indexOf(`
`)>=0,Z+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return oe>60?q[0]+($===""?"":$+`
`)+" "+j.join(`,
`)+" "+q[1]:q[0]+$+" "+j.join(", ")+" "+q[1]}X.types=e(41088);function T(j){return Array.isArray(j)}X.isArray=T;function f(j){return typeof j=="boolean"}X.isBoolean=f;function n(j){return j===null}X.isNull=n;function v(j){return j==null}X.isNullOrUndefined=v;function m(j){return typeof j=="number"}X.isNumber=m;function b(j){return typeof j=="string"}X.isString=b;function E(j){return typeof j=="symbol"}X.isSymbol=E;function p(j){return j===void 0}X.isUndefined=p;function S(j){return w(j)&&I(j)==="[object RegExp]"}X.isRegExp=S,X.types.isRegExp=S;function w(j){return typeof j=="object"&&j!==null}X.isObject=w;function i(j){return w(j)&&I(j)==="[object Date]"}X.isDate=i,X.types.isDate=i;function C(j){return w(j)&&(I(j)==="[object Error]"||j instanceof Error)}X.isError=C,X.types.isNativeError=C;function x(j){return typeof j=="function"}X.isFunction=x;function k(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j>"u"}X.isPrimitive=k,X.isBuffer=e(75272);function I(j){return Object.prototype.toString.call(j)}function B(j){return j<10?"0"+j.toString(10):j.toString(10)}var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(){var j=new Date,$=[B(j.getHours()),B(j.getMinutes()),B(j.getSeconds())].join(":");return[j.getDate(),_[j.getMonth()],$].join(" ")}X.log=function(){console.log("%s - %s",z(),X.format.apply(X,arguments))},X.inherits=e(6768),X._extend=function(j,$){if(!$||!w($))return j;for(var q=Object.keys($),oe=q.length;oe--;)j[q[oe]]=$[q[oe]];return j};function O(j,$){return Object.prototype.hasOwnProperty.call(j,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;X.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var q=$[F];if(typeof q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(q,F,{value:q,enumerable:!1,writable:!1,configurable:!0}),q}function q(){for(var oe,Z,G=new Promise(function(J,ae){oe=J,Z=ae}),re=[],H=0;H<arguments.length;H++)re.push(arguments[H]);re.push(function(J,ae){J?Z(J):oe(ae)});try{$.apply(this,re)}catch(J){Z(J)}return G}return Object.setPrototypeOf(q,Object.getPrototypeOf($)),F&&Object.defineProperty(q,F,{value:q,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(q,P($))},X.promisify.custom=F;function N(j,$){if(!j){var q=new Error("Promise was rejected with a falsy value");q.reason=j,j=q}return $(j)}function V(j){if(typeof j!="function")throw new TypeError('The "original" argument must be of type Function');function $(){for(var q=[],oe=0;oe<arguments.length;oe++)q.push(arguments[oe]);var Z=q.pop();if(typeof Z!="function")throw new TypeError("The last argument must be of type Function");var G=this,re=function(){return Z.apply(G,arguments)};j.apply(this,q).then(function(H){A.nextTick(re.bind(null,null,H))},function(H){A.nextTick(N.bind(null,H,re))})}return Object.setPrototypeOf($,Object.getPrototypeOf(j)),Object.defineProperties($,P(j)),$}X.callbackify=V},5408:function(te,X,e){var A=e(13380);te.exports=function(o){return A("webgl",o)}},96632:function(te,X,e){var A=e(46492),P=e(63436),o=e(57916),L=e(99676),M=e(2304),d=L("Object.prototype.toString"),g=e(46672)(),r=typeof globalThis>"u"?e.g:globalThis,t=P(),s=L("String.prototype.slice"),a=Object.getPrototypeOf,c=L("Array.prototype.indexOf",!0)||function(T,f){for(var n=0;n<T.length;n+=1)if(T[n]===f)return n;return-1},u={__proto__:null};g&&M&&a?A(t,function(h){var T=new r[h];if(Symbol.toStringTag in T){var f=a(T),n=M(f,Symbol.toStringTag);if(!n){var v=a(f);n=M(v,Symbol.toStringTag)}u["$"+h]=o(n.get)}}):A(t,function(h){var T=new r[h],f=T.slice||T.set;f&&(u["$"+h]=o(f))});var l=function(T){var f=!1;return A(u,function(n,v){if(!f)try{"$"+n(T)===v&&(f=s(v,1))}catch{}}),f},y=function(T){var f=!1;return A(u,function(n,v){if(!f)try{n(T),f=s(v,1)}catch{}}),f};te.exports=function(T){if(!T||typeof T!="object")return!1;if(!g){var f=s(d(T),8,-1);return c(t,f)>-1?f:f!=="Object"?!1:y(T)}return M?l(T):null}},67020:function(te,X,e){var A=e(38700),P=e(50896),o=A.instance();function L(u){this.local=this.regionalOptions[u||""]||this.regionalOptions[""]}L.prototype=new A.baseCalendar,P(L.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(u,l){if(typeof u=="string"){var y=u.match(d);return y?y[0]:""}var h=this._validateYear(u),T=u.month(),f=""+this.toChineseMonth(h,T);return l&&f.length<2&&(f="0"+f),this.isIntercalaryMonth(h,T)&&(f+="i"),f},monthNames:function(u){if(typeof u=="string"){var l=u.match(g);return l?l[0]:""}var y=this._validateYear(u),h=u.month(),T=this.toChineseMonth(y,h),f=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][T-1];return this.isIntercalaryMonth(y,h)&&(f="闰"+f),f},monthNamesShort:function(u){if(typeof u=="string"){var l=u.match(r);return l?l[0]:""}var y=this._validateYear(u),h=u.month(),T=this.toChineseMonth(y,h),f=["一","二","三","四","五","六","七","八","九","十","十一","十二"][T-1];return this.isIntercalaryMonth(y,h)&&(f="闰"+f),f},parseMonth:function(u,l){u=this._validateYear(u);var y=parseInt(l),h;if(isNaN(y))l[0]==="闰"&&(h=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),y=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var T=l[l.length-1];h=T==="i"||T==="I"}var f=this.toMonthIndex(u,y,h);return f},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(u,l){if(u.year&&(u=u.year()),typeof u!="number"||u<1888||u>2111)throw l.replace(/\{0\}/,this.local.name);return u},toMonthIndex:function(u,l,y){var h=this.intercalaryMonth(u),T=y&&l!==h;if(T||l<1||l>12)throw A.local.invalidMonth.replace(/\{0\}/,this.local.name);var f;return h?!y&&l<=h?f=l-1:f=l:f=l-1,f},toChineseMonth:function(u,l){u.year&&(u=u.year(),l=u.month());var y=this.intercalaryMonth(u),h=y?12:11;if(l<0||l>h)throw A.local.invalidMonth.replace(/\{0\}/,this.local.name);var T;return y?l<y?T=l+1:T=l:T=l+1,T},intercalaryMonth:function(u){u=this._validateYear(u);var l=t[u-t[0]],y=l>>13;return y},isIntercalaryMonth:function(u,l){u.year&&(u=u.year(),l=u.month());var y=this.intercalaryMonth(u);return!!y&&y===l},leapYear:function(u){return this.intercalaryMonth(u)!==0},weekOfYear:function(u,l,y){var h=this._validateYear(u,A.local.invalidyear),T=s[h-s[0]],f=T>>9&4095,n=T>>5&15,v=T&31,m;m=o.newDate(f,n,v),m.add(4-(m.dayOfWeek()||7),"d");var b=this.toJD(u,l,y)-m.toJD();return 1+Math.floor(b/7)},monthsInYear:function(u){return this.leapYear(u)?13:12},daysInMonth:function(u,l){u.year&&(l=u.month(),u=u.year()),u=this._validateYear(u);var y=t[u-t[0]],h=y>>13,T=h?12:11;if(l>T)throw A.local.invalidMonth.replace(/\{0\}/,this.local.name);var f=y&1<<12-l?30:29;return f},weekDay:function(u,l,y){return(this.dayOfWeek(u,l,y)||7)<6},toJD:function(u,l,y){var h=this._validate(u,f,y,A.local.invalidDate);u=this._validateYear(h.year()),l=h.month(),y=h.day();var T=this.isIntercalaryMonth(u,l),f=this.toChineseMonth(u,l),n=c(u,f,y,T);return o.toJD(n.year,n.month,n.day)},fromJD:function(u){var l=o.fromJD(u),y=a(l.year(),l.month(),l.day()),h=this.toMonthIndex(y.year,y.month,y.isIntercalary);return this.newDate(y.year,h,y.day)},fromString:function(u){var l=u.match(M),y=this._validateYear(+l[1]),h=+l[2],T=!!l[3],f=this.toMonthIndex(y,h,T),n=+l[4];return this.newDate(y,f,n)},add:function(u,l,y){var h=u.year(),T=u.month(),f=this.isIntercalaryMonth(h,T),n=this.toChineseMonth(h,T),v=Object.getPrototypeOf(L.prototype).add.call(this,u,l,y);if(y==="y"){var m=v.year(),b=v.month(),E=this.isIntercalaryMonth(m,n),p=f&&E?this.toMonthIndex(m,n,!0):this.toMonthIndex(m,n,!1);p!==b&&v.month(p)}return v}});var M=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,d=/^\d?\d[iI]?/m,g=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;A.calendars.chinese=L;var t=[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],s=[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];function a(u,l,y,h){var T,f;if(typeof u=="object")T=u,f=l||{};else{var n=typeof u=="number"&&u>=1888&&u<=2111;if(!n)throw new Error("Solar year outside range 1888-2111");var v=typeof l=="number"&&l>=1&&l<=12;if(!v)throw new Error("Solar month outside range 1 - 12");var m=typeof y=="number"&&y>=1&&y<=31;if(!m)throw new Error("Solar day outside range 1 - 31");T={year:u,month:l,day:y},f={}}var b=s[T.year-s[0]],E=T.year<<9|T.month<<5|T.day;f.year=E>=b?T.year:T.year-1,b=s[f.year-s[0]];var p=b>>9&4095,S=b>>5&15,w=b&31,i,C=new Date(p,S-1,w),x=new Date(T.year,T.month-1,T.day);i=Math.round((x-C)/864e5);var k=t[f.year-t[0]],I;for(I=0;I<13;I++){var B=k&1<<12-I?30:29;if(i<B)break;i-=B}var _=k>>13;return!_||I<_?(f.isIntercalary=!1,f.month=1+I):I===_?(f.isIntercalary=!0,f.month=I):(f.isIntercalary=!1,f.month=I),f.day=1+i,f}function c(u,l,y,h,T){var f,n;if(typeof u=="object")n=u,f=l||{};else{var v=typeof u=="number"&&u>=1888&&u<=2111;if(!v)throw new Error("Lunar year outside range 1888-2111");var m=typeof l=="number"&&l>=1&&l<=12;if(!m)throw new Error("Lunar month outside range 1 - 12");var b=typeof y=="number"&&y>=1&&y<=30;if(!b)throw new Error("Lunar day outside range 1 - 30");var E;typeof h=="object"?(E=!1,f=h):(E=!!h,f={}),n={year:u,month:l,day:y,isIntercalary:E}}var p;p=n.day-1;var S=t[n.year-t[0]],w=S>>13,i;w&&(n.month>w||n.isIntercalary)?i=n.month:i=n.month-1;for(var C=0;C<i;C++){var x=S&1<<12-C?30:29;p+=x}var k=s[n.year-s[0]],I=k>>9&4095,B=k>>5&15,_=k&31,z=new Date(I,B-1,_+p);return f.year=z.getFullYear(),f.month=1+z.getMonth(),f.day=z.getDate(),f}},89792:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.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","Pi 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(d){var M=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),d=M.year()+(M.year()<0?1:0);return d%4===3||d%4===-1},monthsInYear:function(L){return this._validate(L,this.minMonth,this.minDay,A.local.invalidYear||A.regionalOptions[""].invalidYear),13},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===13&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return(this.dayOfWeek(L,M,d)||7)<6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),L<0&&L++,g.day()+(g.month()-1)*30+(L-1)*365+Math.floor(L/4)+this.jdEpoch-1},fromJD:function(L){var M=Math.floor(L)+.5-this.jdEpoch,d=Math.floor((M-Math.floor((M+366)/1461))/365)+1;d<=0&&d--,M=Math.floor(L)+.5-this.newDate(d,1,1).toJD();var g=Math.floor(M/30)+1,r=M-(g-1)*30+1;return this.newDate(d,g,r)}}),A.calendars.coptic=o},55668:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.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(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),!1},monthsInYear:function(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),13},daysInYear:function(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),400},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return(r.day()+1)%8},weekDay:function(M,d,g){var r=this.dayOfWeek(M,d,g);return r>=2&&r<=6},extraInfo:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return{century:L[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return M=r.year()+(r.year()<0?1:0),d=r.month(),g=r.day(),g+(d>1?16:0)+(d>2?(d-2)*32:0)+(M-1)*400+this.jdEpoch-1},fromJD:function(M){M=Math.floor(M+.5)-Math.floor(this.jdEpoch)-1;var d=Math.floor(M/400)+1;M-=(d-1)*400,M+=M>15?16:0;var g=Math.floor(M/32)+1,r=M-(g-1)*32+1;return this.newDate(d<=0?d-1:d,g,r)}});var L={20:"Fruitbat",21:"Anchovy"};A.calendars.discworld=o},65168:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(d){var M=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),d=M.year()+(M.year()<0?1:0);return d%4===3||d%4===-1},monthsInYear:function(L){return this._validate(L,this.minMonth,this.minDay,A.local.invalidYear||A.regionalOptions[""].invalidYear),13},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===13&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return(this.dayOfWeek(L,M,d)||7)<6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),L<0&&L++,g.day()+(g.month()-1)*30+(L-1)*365+Math.floor(L/4)+this.jdEpoch-1},fromJD:function(L){var M=Math.floor(L)+.5-this.jdEpoch,d=Math.floor((M-Math.floor((M+366)/1461))/365)+1;d<=0&&d--,M=Math.floor(L)+.5-this.newDate(d,1,1).toJD();var g=Math.floor(M/30)+1,r=M-(g-1)*30+1;return this.newDate(d,g,r)}}),A.calendars.ethiopian=o},2084:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.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(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return this._leapYear(d.year())},_leapYear:function(M){return M=M<0?M+1:M,L(M*7+1,19)<7},monthsInYear:function(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),this._leapYear(M.year?M.year():M)?13:12},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return M=d.year(),this.toJD(M===-1?1:M+1,7,1)-this.toJD(M,7,1)},daysInMonth:function(M,d){return M.year&&(d=M.month(),M=M.year()),this._validate(M,d,this.minDay,A.local.invalidMonth),d===12&&this.leapYear(M)||d===8&&L(this.daysInYear(M),10)===5?30:d===9&&L(this.daysInYear(M),10)===3?29:this.daysPerMonth[d-1]},weekDay:function(M,d,g){return this.dayOfWeek(M,d,g)!==6},extraInfo:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);M=r.year(),d=r.month(),g=r.day();var t=M<=0?M+1:M,s=this.jdEpoch+this._delay1(t)+this._delay2(t)+g+1;if(d<7){for(var a=7;a<=this.monthsInYear(M);a++)s+=this.daysInMonth(M,a);for(var a=1;a<d;a++)s+=this.daysInMonth(M,a)}else for(var a=7;a<d;a++)s+=this.daysInMonth(M,a);return s},_delay1:function(M){var d=Math.floor((235*M-234)/19),g=12084+13753*d,r=d*29+Math.floor(g/25920);return L(3*(r+1),7)<3&&r++,r},_delay2:function(M){var d=this._delay1(M-1),g=this._delay1(M),r=this._delay1(M+1);return r-g===356?2:g-d===382?1:0},fromJD:function(M){M=Math.floor(M)+.5;for(var d=Math.floor((M-this.jdEpoch)*98496/35975351)-1;M>=this.toJD(d===-1?1:d+1,7,1);)d++;for(var g=M<this.toJD(d,1,1)?7:1;M>this.toJD(d,g,this.daysInMonth(d,g));)g++;var r=M-this.toJD(d,g,1)+1;return this.newDate(d,g,r)}});function L(M,d){return M-d*Math.floor(M/d)}A.calendars.hebrew=o},26368:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(L){var M=this._validate(L,this.minMonth,this.minDay,A.local.invalidYear);return(M.year()*11+14)%30<11},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInYear:function(L){return this.leapYear(L)?355:354},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===12&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return this.dayOfWeek(L,M,d)!==5},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),M=g.month(),d=g.day(),L=L<=0?L+1:L,d+Math.ceil(29.5*(M-1))+(L-1)*354+Math.floor((3+11*L)/30)+this.jdEpoch-1},fromJD:function(L){L=Math.floor(L)+.5;var M=Math.floor((30*(L-this.jdEpoch)+10646)/10631);M=M<=0?M-1:M;var d=Math.min(12,Math.ceil((L-29-this.toJD(M,1,1))/29.5)+1),g=L-this.toJD(M,d,1)+1;return this.newDate(M,d,g)}}),A.calendars.islamic=o},24747:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.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}},leapYear:function(d){var M=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),d=M.year()<0?M.year()+1:M.year();return d%4===0},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(4-(g.dayOfWeek()||7),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===2&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return(this.dayOfWeek(L,M,d)||7)<6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),M=g.month(),d=g.day(),L<0&&L++,M<=2&&(L--,M+=12),Math.floor(365.25*(L+4716))+Math.floor(30.6001*(M+1))+d-1524.5},fromJD:function(L){var M=Math.floor(L+.5),d=M+1524,g=Math.floor((d-122.1)/365.25),r=Math.floor(365.25*g),t=Math.floor((d-r)/30.6001),s=t-Math.floor(t<14?1:13),a=g-Math.floor(s>2?4716:4715),c=d-r-Math.floor(30.6001*t);return a<=0&&a--,this.newDate(a,s,c)}}),A.calendars.julian=o},65616:function(te,X,e){var A=e(38700),P=e(50896);function o(d){this.local=this.regionalOptions[d||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.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(d){return this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),!1},formatYear:function(d){var g=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear);d=g.year();var r=Math.floor(d/400);d=d%400,d+=d<0?400:0;var t=Math.floor(d/20);return r+"."+t+"."+d%20},forYear:function(d){if(d=d.split("."),d.length<3)throw"Invalid Mayan year";for(var g=0,r=0;r<d.length;r++){var t=parseInt(d[r],10);if(Math.abs(t)>19||r>0&&t<0)throw"Invalid Mayan year";g=g*20+t}return g},monthsInYear:function(d){return this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),18},weekOfYear:function(d,g,r){return this._validate(d,g,r,A.local.invalidDate),0},daysInYear:function(d){return this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),360},daysInMonth:function(d,g){return this._validate(d,g,this.minDay,A.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(d,g,r){var t=this._validate(d,g,r,A.local.invalidDate);return t.day()},weekDay:function(d,g,r){return this._validate(d,g,r,A.local.invalidDate),!0},extraInfo:function(d,g,r){var t=this._validate(d,g,r,A.local.invalidDate),s=t.toJD(),a=this._toHaab(s),c=this._toTzolkin(s);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[c[0]-1],tzolkinDay:c[0],tzolkinTrecena:c[1]}},_toHaab:function(d){d-=this.jdEpoch;var g=L(d+8+17*20,365);return[Math.floor(g/20)+1,L(g,20)]},_toTzolkin:function(d){return d-=this.jdEpoch,[M(d+20,20),M(d+4,13)]},toJD:function(d,g,r){var t=this._validate(d,g,r,A.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(d){d=Math.floor(d)+.5-this.jdEpoch;var g=Math.floor(d/360);d=d%360,d+=d<0?360:0;var r=Math.floor(d/20),t=d%20;return this.newDate(g,r,t)}});function L(d,g){return d-g*Math.floor(d/g)}function M(d,g){return L(d-1,g)+1}A.calendars.mayan=o},30632:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar;var L=A.instance("gregorian");P(o.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(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear||A.regionalOptions[""].invalidYear);return L.leapYear(d.year()+(d.year()<1?1:0)+1469)},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===12&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return(this.dayOfWeek(M,d,g)||7)<6},toJD:function(t,d,g){var r=this._validate(t,d,g,A.local.invalidMonth),t=r.year();t<0&&t++;for(var s=r.day(),a=1;a<r.month();a++)s+=this.daysPerMonth[a-1];return s+L.toJD(t+1468,3,13)},fromJD:function(M){M=Math.floor(M+.5);for(var d=Math.floor((M-(this.jdEpoch-1))/366);M>=this.toJD(d+1,1,1);)d++;for(var g=M-Math.floor(this.toJD(d,1,1)+.5)+1,r=1;g>this.daysInMonth(d,r);)g-=this.daysInMonth(d,r),r++;return this.newDate(d,r,g)}}),A.calendars.nanakshahi=o},73040:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.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(L){return this.daysInYear(L)!==this.daysPerYear},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInYear:function(L){var M=this._validate(L,this.minMonth,this.minDay,A.local.invalidYear);if(L=M.year(),typeof this.NEPALI_CALENDAR_DATA[L]>"u")return this.daysPerYear;for(var d=0,g=this.minMonth;g<=12;g++)d+=this.NEPALI_CALENDAR_DATA[L][g];return d},daysInMonth:function(L,M){return L.year&&(M=L.month(),L=L.year()),this._validate(L,M,this.minDay,A.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[L]>"u"?this.daysPerMonth[M-1]:this.NEPALI_CALENDAR_DATA[L][M]},weekDay:function(L,M,d){return this.dayOfWeek(L,M,d)!==6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);L=g.year(),M=g.month(),d=g.day();var r=A.instance(),t=0,s=M,a=L;this._createMissingCalendarData(L);var c=L-(s>9||s===9&&d>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(M!==9&&(t=d,s--);s!==9;)s<=0&&(s=12,a--),t+=this.NEPALI_CALENDAR_DATA[a][s],s--;return M===9?(t+=d-this.NEPALI_CALENDAR_DATA[a][0],t<0&&(t+=r.daysInYear(c))):t+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],r.newDate(c,1,1).add(t,"d").toJD()},fromJD:function(L){var M=A.instance(),d=M.fromJD(L),g=d.year(),r=d.dayOfYear(),t=g+56;this._createMissingCalendarData(t);for(var s=9,a=this.NEPALI_CALENDAR_DATA[t][0],c=this.NEPALI_CALENDAR_DATA[t][s]-a+1;r>c;)s++,s>12&&(s=1,t++),c+=this.NEPALI_CALENDAR_DATA[t][s];var u=this.NEPALI_CALENDAR_DATA[t][s]-(c-r);return this.newDate(t,s,u)},_createMissingCalendarData:function(L){var M=this.daysPerMonth.slice(0);M.unshift(17);for(var d=L-1;d<L+2;d++)typeof this.NEPALI_CALENDAR_DATA[d]>"u"&&(this.NEPALI_CALENDAR_DATA[d]=M)},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:[18,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]}}),A.calendars.nepali=o},1104:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return((d.year()-(d.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===12&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return this.dayOfWeek(M,d,g)!==5},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);M=r.year(),d=r.month(),g=r.day();var t=M-(M>=0?474:473),s=474+L(t,2820);return g+(d<=7?(d-1)*31:(d-1)*30+6)+Math.floor((s*682-110)/2816)+(s-1)*365+Math.floor(t/2820)*1029983+this.jdEpoch-1},fromJD:function(M){M=Math.floor(M)+.5;var d=M-this.toJD(475,1,1),g=Math.floor(d/1029983),r=L(d,1029983),t=2820;if(r!==1029982){var s=Math.floor(r/366),a=L(r,366);t=Math.floor((2134*s+2816*a+2815)/1028522)+s+1}var c=t+2820*g+474;c=c<=0?c-1:c;var u=M-this.toJD(c,1,1)+1,l=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),y=M-this.toJD(c,l,1)+1;return this.newDate(c,l,y)}});function L(M,d){return M-d*Math.floor(M/d)}A.calendars.persian=o,A.calendars.jalali=o},51456:function(te,X,e){var A=e(38700),P=e(50896),o=A.instance();function L(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}L.prototype=new A.baseCalendar,P(L.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(g){var d=this._validate(g,this.minMonth,this.minDay,A.local.invalidYear),g=this._t2gYear(d.year());return o.leapYear(g)},weekOfYear:function(t,d,g){var r=this._validate(t,this.minMonth,this.minDay,A.local.invalidYear),t=this._t2gYear(r.year());return o.weekOfYear(t,r.month(),r.day())},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===2&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return(this.dayOfWeek(M,d,g)||7)<6},toJD:function(t,d,g){var r=this._validate(t,d,g,A.local.invalidDate),t=this._t2gYear(r.year());return o.toJD(t,r.month(),r.day())},fromJD:function(M){var d=o.fromJD(M),g=this._g2tYear(d.year());return this.newDate(g,d.month(),d.day())},_t2gYear:function(M){return M+this.yearsOffset+(M>=-this.yearsOffset&&M<=-1?1:0)},_g2tYear:function(M){return M-this.yearsOffset-(M>=1&&M<=this.yearsOffset?1:0)}}),A.calendars.taiwan=L},4592:function(te,X,e){var A=e(38700),P=e(50896),o=A.instance();function L(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}L.prototype=new A.baseCalendar,P(L.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(g){var d=this._validate(g,this.minMonth,this.minDay,A.local.invalidYear),g=this._t2gYear(d.year());return o.leapYear(g)},weekOfYear:function(t,d,g){var r=this._validate(t,this.minMonth,this.minDay,A.local.invalidYear),t=this._t2gYear(r.year());return o.weekOfYear(t,r.month(),r.day())},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===2&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return(this.dayOfWeek(M,d,g)||7)<6},toJD:function(t,d,g){var r=this._validate(t,d,g,A.local.invalidDate),t=this._t2gYear(r.year());return o.toJD(t,r.month(),r.day())},fromJD:function(M){var d=o.fromJD(M),g=this._g2tYear(d.year());return this.newDate(g,d.month(),d.day())},_t2gYear:function(M){return M-this.yearsOffset-(M>=1&&M<=this.yearsOffset?1:0)},_g2tYear:function(M){return M+this.yearsOffset+(M>=-this.yearsOffset&&M<=-1?1:0)}}),A.calendars.thai=L},45348:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā","Yawm al-Arbaā","Yawm al-Khamīs","Yawm al-Juma","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return this.daysInYear(d.year())===355},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(M){for(var d=0,g=1;g<=12;g++)d+=this.daysInMonth(M,g);return d},daysInMonth:function(M,d){for(var g=this._validate(M,d,this.minDay,A.local.invalidMonth),r=g.toJD()-24e5+.5,t=0,s=0;s<L.length;s++){if(L[s]>r)return L[t]-L[t-1];t++}return 30},weekDay:function(M,d,g){return this.dayOfWeek(M,d,g)!==5},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate),t=12*(r.year()-1)+r.month()-15292,s=r.day()+L[t-1]-1;return s+24e5-.5},fromJD:function(M){for(var d=M-24e5+.5,g=0,r=0;r<L.length&&!(L[r]>d);r++)g++;var t=g+15292,s=Math.floor((t-1)/12),a=s+1,c=t-12*s,u=d-L[g-1]+1;return this.newDate(a,c,u)},isValid:function(M,d,g){var r=A.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(M=M.year!=null?M.year:M,r=M>=1276&&M<=1500),r},_validate:function(M,d,g,r){var t=A.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw r.replace(/\{0\}/,this.local.name);return t}}),A.calendars.ummalqura=o;var L=[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]},38700:function(te,X,e){var A=e(50896);function P(){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={}}A(P.prototype,{instance:function(r,t){r=(r||"gregorian").toLowerCase(),t=t||"";var s=this._localCals[r+"-"+t];if(!s&&this.calendars[r]&&(s=new this.calendars[r](t),this._localCals[r+"-"+t]=s),!s)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return s},newDate:function(r,t,s,a,c){return a=(r!=null&&r.year?r.calendar():typeof a=="string"?this.instance(a,c):a)||this.instance(),a.newDate(r,t,s)},substituteDigits:function(r){return function(t){return(t+"").replace(/[0-9]/g,function(s){return r[s]})}},substituteChineseDigits:function(r,t){return function(s){for(var a="",c=0;s>0;){var u=s%10;a=(u===0?"":r[u]+t[c])+a,c++,s=Math.floor(s/10)}return a.indexOf(r[1]+t[1])===0&&(a=a.substr(1)),a||r[0]}}});function o(r,t,s,a){if(this._calendar=r,this._year=t,this._month=s,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(g.local.invalidDate||g.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function L(r,t){return r=""+r,"000000".substring(0,t-r.length)+r}A(o.prototype,{newDate:function(r,t,s){return this._calendar.newDate(r??this,t,s)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,t,s){if(!this._calendar.isValid(r,t,s))throw(g.local.invalidDate||g.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=t,this._day=s,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(r,t){return this._calendar.add(this,r,t)},set:function(r,t){return this._calendar.set(this,r,t)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(g.local.differentCalendars||g.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var t=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+L(Math.abs(this.year()),4)+"-"+L(this.month(),2)+"-"+L(this.day(),2)}});function M(){this.shortYearCutoff="+10"}A(M.prototype,{_validateLevel:0,newDate:function(r,t,s){return r==null?this.today():(r.year&&(this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate),s=r.day(),t=r.month(),r=r.year()),new o(this,r,t,s))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var t=this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+L(Math.abs(t.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),12},monthOfYear:function(r,t){var s=this._validate(r,t,this.minDay,g.local.invalidMonth||g.regionalOptions[""].invalidMonth);return(s.month()+this.monthsInYear(s)-this.firstMonth)%this.monthsInYear(s)+this.minMonth},fromMonthOfYear:function(r,t){var s=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,s,this.minDay,g.local.invalidMonth||g.regionalOptions[""].invalidMonth),s},daysInYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(r,t,s){return this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate),{}},add:function(r,t,s){return this._validate(r,this.minMonth,this.minDay,g.local.invalidDate||g.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,t,s),t,s)},_add:function(r,t,s){if(this._validateLevel++,s==="d"||s==="w"){var a=r.toJD()+t*(s==="w"?this.daysInWeek():1),c=r.calendar().fromJD(a);return this._validateLevel--,[c.year(),c.month(),c.day()]}try{var u=r.year()+(s==="y"?t:0),l=r.monthOfYear()+(s==="m"?t:0),c=r.day(),y=function(f){for(;l<f.minMonth;)u--,l+=f.monthsInYear(u);for(var n=f.monthsInYear(u);l>n-1+f.minMonth;)u++,l-=n,n=f.monthsInYear(u)};s==="y"?(r.month()!==this.fromMonthOfYear(u,l)&&(l=this.newDate(u,r.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(u)),c=Math.min(c,this.daysInMonth(u,this.fromMonthOfYear(u,l)))):s==="m"&&(y(this),c=Math.min(c,this.daysInMonth(u,this.fromMonthOfYear(u,l))));var h=[u,this.fromMonthOfYear(u,l),c];return this._validateLevel--,h}catch(T){throw this._validateLevel--,T}},_correctAdd:function(r,t,s,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(t[0]===0||r.year()>0!=t[0]>0)){var c={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],u=s<0?-1:1;t=this._add(r,s*c[0]+u*c[1],c[2])}return r.date(t[0],t[1],t[2])},set:function(r,t,s){this._validate(r,this.minMonth,this.minDay,g.local.invalidDate||g.regionalOptions[""].invalidDate);var a=s==="y"?t:r.year(),c=s==="m"?t:r.month(),u=s==="d"?t:r.day();return(s==="y"||s==="m")&&(u=Math.min(u,this.daysInMonth(a,c))),r.date(a,c,u)},isValid:function(r,t,s){this._validateLevel++;var a=this.hasYearZero||r!==0;if(a){var c=this.newDate(r,t,this.minDay);a=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(c)&&s>=this.minDay&&s-this.minDay<this.daysInMonth(c)}return this._validateLevel--,a},toJSDate:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate);return g.instance().fromJD(this.toJD(a)).toJSDate()},fromJSDate:function(r){return this.fromJD(g.instance().fromJSDate(r).toJD())},_validate:function(r,t,s,a){if(r.year){if(this._validateLevel===0&&this.name!==r.calendar().name)throw(g.local.differentCalendars||g.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,r.calendar().local.name);return r}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(r,t,s))throw a.replace(/\{0\}/,this.local.name);var c=this.newDate(r,t,s);return this._validateLevel--,c}catch(u){throw this._validateLevel--,u}}});function d(r){this.local=this.regionalOptions[r]||this.regionalOptions[""]}d.prototype=new M,A(d.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(s){var t=this._validate(s,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),s=t.year()+(t.year()<0?1:0);return s%4===0&&(s%100!==0||s%400===0)},weekOfYear:function(r,t,s){var a=this.newDate(r,t,s);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(r,t){var s=this._validate(r,t,this.minDay,g.local.invalidMonth||g.regionalOptions[""].invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(r,t,s){return(this.dayOfWeek(r,t,s)||7)<6},toJD:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate);r=a.year(),t=a.month(),s=a.day(),r<0&&r++,t<3&&(t+=12,r--);var c=Math.floor(r/100),u=2-c+Math.floor(c/4);return Math.floor(365.25*(r+4716))+Math.floor(30.6001*(t+1))+s+u-1524.5},fromJD:function(r){var t=Math.floor(r+.5),s=Math.floor((t-186721625e-2)/36524.25);s=t+1+s-Math.floor(s/4);var a=s+1524,c=Math.floor((a-122.1)/365.25),u=Math.floor(365.25*c),l=Math.floor((a-u)/30.6001),y=a-u-Math.floor(l*30.6001),h=l-(l>13.5?13:1),T=c-(h>2.5?4716:4715);return T<=0&&T--,this.newDate(T,h,y)},toJSDate:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate),c=new Date(a.year(),a.month()-1,a.day());return c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0),c.setHours(c.getHours()>12?c.getHours()+2:0),c},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var g=te.exports=new P;g.cdate=o,g.baseCalendar=M,g.calendars.gregorian=d},15168:function(te,X,e){var A=e(50896),P=e(38700);A(P.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"}),P.local=P.regionalOptions[""],A(P.cdate.prototype,{formatDate:function(o,L){return typeof o!="string"&&(L=o,o=""),this._calendar.formatDate(o||"",this,L)}}),A(P.baseCalendar.prototype,{UNIX_EPOCH:P.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:P.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(o,L,M){if(typeof o!="string"&&(M=L,L=o,o=""),!L)return"";if(L.calendar()!==this)throw P.local.invalidFormat||P.regionalOptions[""].invalidFormat;o=o||this.local.dateFormat,M=M||{};var d=M.dayNamesShort||this.local.dayNamesShort,g=M.dayNames||this.local.dayNames,r=M.monthNumbers||this.local.monthNumbers,t=M.monthNamesShort||this.local.monthNamesShort,s=M.monthNames||this.local.monthNames;M.calculateWeek||this.local.calculateWeek;for(var a=function(b,E){for(var p=1;m+p<o.length&&o.charAt(m+p)===b;)p++;return m+=p-1,Math.floor(p/(E||1))>1},c=function(b,E,p,S){var w=""+E;if(a(b,S))for(;w.length<p;)w="0"+w;return w},u=function(b,E,p,S){return a(b)?S[E]:p[E]},l=this,y=function(b){return typeof r=="function"?r.call(l,b,a("m")):f(c("m",b.month(),2))},h=function(b,E){return E?typeof s=="function"?s.call(l,b):s[b.month()-l.minMonth]:typeof t=="function"?t.call(l,b):t[b.month()-l.minMonth]},T=this.local.digits,f=function(b){return M.localNumbers&&T?T(b):b},n="",v=!1,m=0;m<o.length;m++)if(v)o.charAt(m)==="'"&&!a("'")?v=!1:n+=o.charAt(m);else switch(o.charAt(m)){case"d":n+=f(c("d",L.day(),2));break;case"D":n+=u("D",L.dayOfWeek(),d,g);break;case"o":n+=c("o",L.dayOfYear(),3);break;case"w":n+=c("w",L.weekOfYear(),2);break;case"m":n+=y(L);break;case"M":n+=h(L,a("M"));break;case"y":n+=a("y",2)?L.year():(L.year()%100<10?"0":"")+L.year()%100;break;case"Y":a("Y",2),n+=L.formatYear();break;case"J":n+=L.toJD();break;case"@":n+=(L.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":n+=(L.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":a("'")?n+="'":v=!0;break;default:n+=o.charAt(m)}return n},parseDate:function(o,L,M){if(L==null)throw P.local.invalidArguments||P.regionalOptions[""].invalidArguments;if(L=typeof L=="object"?L.toString():L+"",L==="")return null;o=o||this.local.dateFormat,M=M||{};var d=M.shortYearCutoff||this.shortYearCutoff;d=typeof d!="string"?d:this.today().year()%100+parseInt(d,10);for(var g=M.dayNamesShort||this.local.dayNamesShort,r=M.dayNames||this.local.dayNames,t=M.parseMonth||this.local.parseMonth,s=M.monthNumbers||this.local.monthNumbers,a=M.monthNamesShort||this.local.monthNamesShort,c=M.monthNames||this.local.monthNames,u=-1,l=-1,y=-1,h=-1,T=-1,f=!1,n=!1,v=function(I,B){for(var _=1;C+_<o.length&&o.charAt(C+_)===I;)_++;return C+=_-1,Math.floor(_/(B||1))>1},m=function(I,B){var _=v(I,B),z=[2,3,_?4:2,_?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],O=new RegExp("^-?\\d{1,"+z+"}"),F=L.substring(i).match(O);if(!F)throw(P.local.missingNumberAt||P.regionalOptions[""].missingNumberAt).replace(/\{0\}/,i);return i+=F[0].length,parseInt(F[0],10)},b=this,E=function(){if(typeof s=="function"){v("m");var I=s.call(b,L.substring(i));return i+=I.length,I}return m("m")},p=function(I,B,_,z){for(var O=v(I,z)?_:B,F=0;F<O.length;F++)if(L.substr(i,O[F].length).toLowerCase()===O[F].toLowerCase())return i+=O[F].length,F+b.minMonth;throw(P.local.unknownNameAt||P.regionalOptions[""].unknownNameAt).replace(/\{0\}/,i)},S=function(){if(typeof c=="function"){var I=v("M")?c.call(b,L.substring(i)):a.call(b,L.substring(i));return i+=I.length,I}return p("M",a,c)},w=function(){if(L.charAt(i)!==o.charAt(C))throw(P.local.unexpectedLiteralAt||P.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,i);i++},i=0,C=0;C<o.length;C++)if(n)o.charAt(C)==="'"&&!v("'")?n=!1:w();else switch(o.charAt(C)){case"d":h=m("d");break;case"D":p("D",g,r);break;case"o":T=m("o");break;case"w":m("w");break;case"m":y=E();break;case"M":y=S();break;case"y":var x=C;f=!v("y",2),C=x,l=m("y",2);break;case"Y":l=m("Y",2);break;case"J":u=m("J")+.5,L.charAt(i)==="."&&(i++,m("J"));break;case"@":u=m("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":u=m("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":i=L.length;break;case"'":v("'")?w():n=!0;break;default:w()}if(i<L.length)throw P.local.unexpectedText||P.regionalOptions[""].unexpectedText;if(l===-1?l=this.today().year():l<100&&f&&(l+=d===-1?1900:this.today().year()-this.today().year()%100-(l<=d?0:100)),typeof y=="string"&&(y=t.call(this,l,y)),T>-1){y=1,h=T;for(var k=this.daysInMonth(l,y);h>k;k=this.daysInMonth(l,y))y++,h-=k}return u>-1?this.fromJD(u):this.newDate(l,y,h)},determineDate:function(o,L,M,d,g){M&&typeof M!="object"&&(g=d,d=M,M=null),typeof d!="string"&&(g=d,d="");var r=this,t=function(s){try{return r.parseDate(d,s,g)}catch{}s=s.toLowerCase();for(var a=(s.match(/^c/)&&M?M.newDate():null)||r.today(),c=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,u=c.exec(s);u;)a.add(parseInt(u[1],10),u[2]||"d"),u=c.exec(s);return a};return L=L?L.newDate():null,o=o==null?L:typeof o=="string"?t(o):typeof o=="number"?isNaN(o)||o===1/0||o===-1/0?L:r.today().add(o,"d"):r.newDate(o),o}})},21576:function(){},19768:function(){},63436:function(te,X,e){var A=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],P=typeof globalThis>"u"?e.g:globalThis;te.exports=function(){for(var L=[],M=0;M<A.length;M++)typeof P[A[M]]=="function"&&(L[L.length]=A[M]);return L}},67756:function(te,X,e){e.d(X,{qy:function(){return Ae},Gz:function(){return ae}});function A(ye,Se,_e){ye.prototype=Se.prototype=_e,_e.constructor=ye}function P(ye,Se){var _e=Object.create(ye.prototype);for(var ze in Se)_e[ze]=Se[ze];return _e}function o(){}var L=.7,M=1/L,d="\\s*([+-]?\\d+)\\s*",g="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",t=/^#([0-9a-f]{3,8})$/,s=new RegExp("^rgb\\(".concat(d,",").concat(d,",").concat(d,"\\)$")),a=new RegExp("^rgb\\(".concat(r,",").concat(r,",").concat(r,"\\)$")),c=new RegExp("^rgba\\(".concat(d,",").concat(d,",").concat(d,",").concat(g,"\\)$")),u=new RegExp("^rgba\\(".concat(r,",").concat(r,",").concat(r,",").concat(g,"\\)$")),l=new RegExp("^hsl\\(".concat(g,",").concat(r,",").concat(r,"\\)$")),y=new RegExp("^hsla\\(".concat(g,",").concat(r,",").concat(r,",").concat(g,"\\)$")),h={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};A(o,m,{copy:function(Se){return Object.assign(new this.constructor,this,Se)},displayable:function(){return this.rgb().displayable()},hex:T,formatHex:T,formatHex8:f,formatHsl:n,formatRgb:v,toString:v});function T(){return this.rgb().formatHex()}function f(){return this.rgb().formatHex8()}function n(){return z(this).formatHsl()}function v(){return this.rgb().formatRgb()}function m(ye){var Se,_e;return ye=(ye+"").trim().toLowerCase(),(Se=t.exec(ye))?(_e=Se[1].length,Se=parseInt(Se[1],16),_e===6?b(Se):_e===3?new w(Se>>8&15|Se>>4&240,Se>>4&15|Se&240,(Se&15)<<4|Se&15,1):_e===8?E(Se>>24&255,Se>>16&255,Se>>8&255,(Se&255)/255):_e===4?E(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|Se&240,((Se&15)<<4|Se&15)/255):null):(Se=s.exec(ye))?new w(Se[1],Se[2],Se[3],1):(Se=a.exec(ye))?new w(Se[1]*255/100,Se[2]*255/100,Se[3]*255/100,1):(Se=c.exec(ye))?E(Se[1],Se[2],Se[3],Se[4]):(Se=u.exec(ye))?E(Se[1]*255/100,Se[2]*255/100,Se[3]*255/100,Se[4]):(Se=l.exec(ye))?_(Se[1],Se[2]/100,Se[3]/100,1):(Se=y.exec(ye))?_(Se[1],Se[2]/100,Se[3]/100,Se[4]):h.hasOwnProperty(ye)?b(h[ye]):ye==="transparent"?new w(NaN,NaN,NaN,0):null}function b(ye){return new w(ye>>16&255,ye>>8&255,ye&255,1)}function E(ye,Se,_e,ze){return ze<=0&&(ye=Se=_e=NaN),new w(ye,Se,_e,ze)}function p(ye){return ye instanceof o||(ye=m(ye)),ye?(ye=ye.rgb(),new w(ye.r,ye.g,ye.b,ye.opacity)):new w}function S(ye,Se,_e,ze){return arguments.length===1?p(ye):new w(ye,Se,_e,ze??1)}function w(ye,Se,_e,ze){this.r=+ye,this.g=+Se,this.b=+_e,this.opacity=+ze}A(w,S,P(o,{brighter:function(Se){return Se=Se==null?M:Math.pow(M,Se),new w(this.r*Se,this.g*Se,this.b*Se,this.opacity)},darker:function(Se){return Se=Se==null?L:Math.pow(L,Se),new w(this.r*Se,this.g*Se,this.b*Se,this.opacity)},rgb:function(){return this},clamp:function(){return new w(I(this.r),I(this.g),I(this.b),k(this.opacity))},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:i,formatHex:i,formatHex8:C,formatRgb:x,toString:x}));function i(){return"#".concat(B(this.r)).concat(B(this.g)).concat(B(this.b))}function C(){return"#".concat(B(this.r)).concat(B(this.g)).concat(B(this.b)).concat(B((isNaN(this.opacity)?1:this.opacity)*255))}function x(){var ye=k(this.opacity);return"".concat(ye===1?"rgb(":"rgba(").concat(I(this.r),", ").concat(I(this.g),", ").concat(I(this.b)).concat(ye===1?")":", ".concat(ye,")"))}function k(ye){return isNaN(ye)?1:Math.max(0,Math.min(1,ye))}function I(ye){return Math.max(0,Math.min(255,Math.round(ye)||0))}function B(ye){return ye=I(ye),(ye<16?"0":"")+ye.toString(16)}function _(ye,Se,_e,ze){return ze<=0?ye=Se=_e=NaN:_e<=0||_e>=1?ye=Se=NaN:Se<=0&&(ye=NaN),new F(ye,Se,_e,ze)}function z(ye){if(ye instanceof F)return new F(ye.h,ye.s,ye.l,ye.opacity);if(ye instanceof o||(ye=m(ye)),!ye)return new F;if(ye instanceof F)return ye;ye=ye.rgb();var Se=ye.r/255,_e=ye.g/255,ze=ye.b/255,Ie=Math.min(Se,_e,ze),Ne=Math.max(Se,_e,ze),et=NaN,st=Ne-Ie,Ze=(Ne+Ie)/2;return st?(Se===Ne?et=(_e-ze)/st+(_e<ze)*6:_e===Ne?et=(ze-Se)/st+2:et=(Se-_e)/st+4,st/=Ze<.5?Ne+Ie:2-Ne-Ie,et*=60):st=Ze>0&&Ze<1?0:et,new F(et,st,Ze,ye.opacity)}function O(ye,Se,_e,ze){return arguments.length===1?z(ye):new F(ye,Se,_e,ze??1)}function F(ye,Se,_e,ze){this.h=+ye,this.s=+Se,this.l=+_e,this.opacity=+ze}A(F,O,P(o,{brighter:function(Se){return Se=Se==null?M:Math.pow(M,Se),new F(this.h,this.s,this.l*Se,this.opacity)},darker:function(Se){return Se=Se==null?L:Math.pow(L,Se),new F(this.h,this.s,this.l*Se,this.opacity)},rgb:function(){var Se=this.h%360+(this.h<0)*360,_e=isNaN(Se)||isNaN(this.s)?0:this.s,ze=this.l,Ie=ze+(ze<.5?ze:1-ze)*_e,Ne=2*ze-Ie;return new w(j(Se>=240?Se-240:Se+120,Ne,Ie),j(Se,Ne,Ie),j(Se<120?Se+240:Se-120,Ne,Ie),this.opacity)},clamp:function(){return new F(N(this.h),V(this.s),V(this.l),k(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 Se=k(this.opacity);return"".concat(Se===1?"hsl(":"hsla(").concat(N(this.h),", ").concat(V(this.s)*100,"%, ").concat(V(this.l)*100,"%").concat(Se===1?")":", ".concat(Se,")"))}}));function N(ye){return ye=(ye||0)%360,ye<0?ye+360:ye}function V(ye){return Math.max(0,Math.min(1,ye||0))}function j(ye,Se,_e){return(ye<60?Se+(_e-Se)*ye/60:ye<180?_e:ye<240?Se+(_e-Se)*(240-ye)/60:Se)*255}var $=function(ye){return function(){return ye}};function q(ye,Se){return function(_e){return ye+_e*Se}}function oe(ye,Se,_e){return ye=Math.pow(ye,_e),Se=Math.pow(Se,_e)-ye,_e=1/_e,function(ze){return Math.pow(ye+ze*Se,_e)}}function Z(ye){return(ye=+ye)==1?G:function(Se,_e){return _e-Se?oe(Se,_e,ye):$(isNaN(Se)?_e:Se)}}function G(ye,Se){var _e=Se-ye;return _e?q(ye,_e):$(isNaN(ye)?Se:ye)}var re=function ye(Se){var _e=Z(Se);function ze(Ie,Ne){var et=_e((Ie=S(Ie)).r,(Ne=S(Ne)).r),st=_e(Ie.g,Ne.g),Ze=_e(Ie.b,Ne.b),Ke=G(Ie.opacity,Ne.opacity);return function(nt){return Ie.r=et(nt),Ie.g=st(nt),Ie.b=Ze(nt),Ie.opacity=Ke(nt),Ie+""}}return ze.gamma=ye,ze}(1);function H(ye,Se){var _e=Se?Se.length:0,ze=ye?Math.min(_e,ye.length):0,Ie=new Array(ze),Ne=new Array(_e),et;for(et=0;et<ze;++et)Ie[et]=Ae(ye[et],Se[et]);for(;et<_e;++et)Ne[et]=Se[et];return function(st){for(et=0;et<ze;++et)Ne[et]=Ie[et](st);return Ne}}function J(ye,Se){var _e=new Date;return ye=+ye,Se=+Se,function(ze){return _e.setTime(ye*(1-ze)+Se*ze),_e}}function ae(ye,Se){return ye=+ye,Se=+Se,function(_e){return ye*(1-_e)+Se*_e}}function K(ye){"@babel/helpers - typeof";return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},K(ye)}function Y(ye,Se){var _e={},ze={},Ie;(ye===null||K(ye)!=="object")&&(ye={}),(Se===null||K(Se)!=="object")&&(Se={});for(Ie in Se)Ie in ye?_e[Ie]=Ae(ye[Ie],Se[Ie]):ze[Ie]=Se[Ie];return function(Ne){for(Ie in _e)ze[Ie]=_e[Ie](Ne);return ze}}var ie=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ie.source,"g");function le(ye){return function(){return ye}}function de(ye){return function(Se){return ye(Se)+""}}function we(ye,Se){var _e=ie.lastIndex=ne.lastIndex=0,ze,Ie,Ne,et=-1,st=[],Ze=[];for(ye=ye+"",Se=Se+"";(ze=ie.exec(ye))&&(Ie=ne.exec(Se));)(Ne=Ie.index)>_e&&(Ne=Se.slice(_e,Ne),st[et]?st[et]+=Ne:st[++et]=Ne),(ze=ze[0])===(Ie=Ie[0])?st[et]?st[et]+=Ie:st[++et]=Ie:(st[++et]=null,Ze.push({i:et,x:ae(ze,Ie)})),_e=ne.lastIndex;return _e<Se.length&&(Ne=Se.slice(_e),st[et]?st[et]+=Ne:st[++et]=Ne),st.length<2?Ze[0]?de(Ze[0].x):le(Se):(Se=Ze.length,function(Ke){for(var nt=0,it;nt<Se;++nt)st[(it=Ze[nt]).i]=it.x(Ke);return st.join("")})}function me(ye,Se){Se||(Se=[]);var _e=ye?Math.min(Se.length,ye.length):0,ze=Se.slice(),Ie;return function(Ne){for(Ie=0;Ie<_e;++Ie)ze[Ie]=ye[Ie]*(1-Ne)+Se[Ie]*Ne;return ze}}function Le(ye){return ArrayBuffer.isView(ye)&&!(ye instanceof DataView)}function ve(ye){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},ve(ye)}function Ae(ye,Se){var _e=ve(Se),ze;return Se==null||_e==="boolean"?$(Se):(_e==="number"?ae:_e==="string"?(ze=m(Se))?(Se=ze,re):we:Se instanceof m?re:Se instanceof Date?J:Le(Se)?me:Array.isArray(Se)?H:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?Y:ae)(ye,Se)}},30584:function(te){te.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},7294:function(te){te.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},47916:function(te){te.exports=JSON.parse('["normal","italic","oblique"]')},2904:function(te){te.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},68194:function(te){te.exports=JSON.parse('["inherit","initial","unset"]')},3748:function(te){te.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},di={};function Zi(te){var X=di[te];if(X!==void 0)return X.exports;var e=di[te]={exports:{}};return $s[te].call(e.exports,e,e.exports,Zi),e.exports}(function(){Zi.n=function(te){var X=te&&te.__esModule?function(){return te.default}:function(){return te};return Zi.d(X,{a:X}),X}})(),function(){Zi.d=function(te,X){for(var e in X)Zi.o(X,e)&&!Zi.o(te,e)&&Object.defineProperty(te,e,{enumerable:!0,get:X[e]})}}(),function(){Zi.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){Zi.o=function(te,X){return Object.prototype.hasOwnProperty.call(te,X)}}(),function(){Zi.r=function(te){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(te,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(te,"__esModule",{value:!0})}}();var Cl=Zi(13792);return Cl}()})})(Bv);var V0=Bv.exports;(function(Cs){Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=void 0;var El=di(Ov),$s=di(V0);function di(te){return te&&te.__esModule?te:{default:te}}var Zi=(0,El.default)($s.default),Cl=Zi;Cs.default=Cl})(Ph);const H0=N0(Ph),W0=U0({__proto__:null,default:H0},[Ph]);export{W0 as r};
//# sourceMappingURL=react-plotly-X7Qwg0tb.js.map