file-viewer-demo/public/dist/assets/PptxRender-5a3debe6.js
2024-01-30 08:54:29 +08:00

48 lines
408 KiB
JavaScript
Raw Permalink 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{c as cf,g as lf,d as uf,r as ff,o as df,a as hf,b as gf,_ as pf}from"./index-be50c070.js";import{r as vf}from"./worker-ref-b3abaee8.js";var Rc={exports:{}};/*!
* jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-08-28T13:37Z
*/(function(t){(function(e,n){t.exports=e.document?n(e,!0):function(i){if(!i.document)throw new Error("jQuery requires a window with a document");return n(i)}})(typeof window<"u"?window:cf,function(e,n){var i=[],r=Object.getPrototypeOf,a=i.slice,o=i.flat?function(c){return i.flat.call(c)}:function(c){return i.concat.apply([],c)},s=i.push,l=i.indexOf,u={},d=u.toString,h=u.hasOwnProperty,g=h.toString,x=g.call(Object),_={},T=function(f){return typeof f=="function"&&typeof f.nodeType!="number"&&typeof f.item!="function"},A=function(f){return f!=null&&f===f.window},$=e.document,S={type:!0,src:!0,nonce:!0,noModule:!0};function M(c,f,v){v=v||$;var y,m,b=v.createElement("script");if(b.text=c,f)for(y in S)m=f[y]||f.getAttribute&&f.getAttribute(y),m&&b.setAttribute(y,m);v.head.appendChild(b).parentNode.removeChild(b)}function k(c){return c==null?c+"":typeof c=="object"||typeof c=="function"?u[d.call(c)]||"object":typeof c}var P="3.7.1",D=/HTML$/i,p=function(c,f){return new p.fn.init(c,f)};p.fn=p.prototype={jquery:P,constructor:p,length:0,toArray:function(){return a.call(this)},get:function(c){return c==null?a.call(this):c<0?this[c+this.length]:this[c]},pushStack:function(c){var f=p.merge(this.constructor(),c);return f.prevObject=this,f},each:function(c){return p.each(this,c)},map:function(c){return this.pushStack(p.map(this,function(f,v){return c.call(f,v,f)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(p.grep(this,function(c,f){return(f+1)%2}))},odd:function(){return this.pushStack(p.grep(this,function(c,f){return f%2}))},eq:function(c){var f=this.length,v=+c+(c<0?f:0);return this.pushStack(v>=0&&v<f?[this[v]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:i.sort,splice:i.splice},p.extend=p.fn.extend=function(){var c,f,v,y,m,b,w=arguments[0]||{},R=1,E=arguments.length,I=!1;for(typeof w=="boolean"&&(I=w,w=arguments[R]||{},R++),typeof w!="object"&&!T(w)&&(w={}),R===E&&(w=this,R--);R<E;R++)if((c=arguments[R])!=null)for(f in c)y=c[f],!(f==="__proto__"||w===y)&&(I&&y&&(p.isPlainObject(y)||(m=Array.isArray(y)))?(v=w[f],m&&!Array.isArray(v)?b=[]:!m&&!p.isPlainObject(v)?b={}:b=v,m=!1,w[f]=p.extend(I,b,y)):y!==void 0&&(w[f]=y));return w},p.extend({expando:"jQuery"+(P+Math.random()).replace(/\D/g,""),isReady:!0,error:function(c){throw new Error(c)},noop:function(){},isPlainObject:function(c){var f,v;return!c||d.call(c)!=="[object Object]"?!1:(f=r(c),f?(v=h.call(f,"constructor")&&f.constructor,typeof v=="function"&&g.call(v)===x):!0)},isEmptyObject:function(c){var f;for(f in c)return!1;return!0},globalEval:function(c,f,v){M(c,{nonce:f&&f.nonce},v)},each:function(c,f){var v,y=0;if(j(c))for(v=c.length;y<v&&f.call(c[y],y,c[y])!==!1;y++);else for(y in c)if(f.call(c[y],y,c[y])===!1)break;return c},text:function(c){var f,v="",y=0,m=c.nodeType;if(!m)for(;f=c[y++];)v+=p.text(f);return m===1||m===11?c.textContent:m===9?c.documentElement.textContent:m===3||m===4?c.nodeValue:v},makeArray:function(c,f){var v=f||[];return c!=null&&(j(Object(c))?p.merge(v,typeof c=="string"?[c]:c):s.call(v,c)),v},inArray:function(c,f,v){return f==null?-1:l.call(f,c,v)},isXMLDoc:function(c){var f=c&&c.namespaceURI,v=c&&(c.ownerDocument||c).documentElement;return!D.test(f||v&&v.nodeName||"HTML")},merge:function(c,f){for(var v=+f.length,y=0,m=c.length;y<v;y++)c[m++]=f[y];return c.length=m,c},grep:function(c,f,v){for(var y,m=[],b=0,w=c.length,R=!v;b<w;b++)y=!f(c[b],b),y!==R&&m.push(c[b]);return m},map:function(c,f,v){var y,m,b=0,w=[];if(j(c))for(y=c.length;b<y;b++)m=f(c[b],b,v),m!=null&&w.push(m);else for(b in c)m=f(c[b],b,v),m!=null&&w.push(m);return o(w)},guid:1,support:_}),typeof Symbol=="function"&&(p.fn[Symbol.iterator]=i[Symbol.iterator]),p.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(c,f){u["[object "+f+"]"]=f.toLowerCase()});function j(c){var f=!!c&&"length"in c&&c.length,v=k(c);return T(c)||A(c)?!1:v==="array"||f===0||typeof f=="number"&&f>0&&f-1 in c}function U(c,f){return c.nodeName&&c.nodeName.toLowerCase()===f.toLowerCase()}var G=i.pop,X=i.sort,Q=i.splice,z="[\\x20\\t\\r\\n\\f]",q=new RegExp("^"+z+"+|((?:^|[^\\\\])(?:\\\\.)*)"+z+"+$","g");p.contains=function(c,f){var v=f&&f.parentNode;return c===v||!!(v&&v.nodeType===1&&(c.contains?c.contains(v):c.compareDocumentPosition&&c.compareDocumentPosition(v)&16))};var Mt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function it(c,f){return f?c==="\0"?"<22>":c.slice(0,-1)+"\\"+c.charCodeAt(c.length-1).toString(16)+" ":"\\"+c}p.escapeSelector=function(c){return(c+"").replace(Mt,it)};var K=$,ft=s;(function(){var c,f,v,y,m,b=ft,w,R,E,I,B,Y=p.expando,O=0,W=0,ut=qi(),wt=qi(),gt=qi(),se=qi(),Kt=function(C,L){return C===L&&(m=!0),0},ze="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",He="(?:\\\\[\\da-fA-F]{1,6}"+z+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",bt="\\["+z+"*("+He+")(?:"+z+"*([*^$|!~]?=)"+z+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+He+"))|)"+z+"*\\]",An=":("+He+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+bt+")*)|.*)\\)|)",At=new RegExp(z+"+","g"),Vt=new RegExp("^"+z+"*,"+z+"*"),_i=new RegExp("^"+z+"*([>+~]|"+z+")"+z+"*"),ca=new RegExp(z+"|>"),Ye=new RegExp(An),mi=new RegExp("^"+He+"$"),Ue={ID:new RegExp("^#("+He+")"),CLASS:new RegExp("^\\.("+He+")"),TAG:new RegExp("^("+He+"|[*])"),ATTR:new RegExp("^"+bt),PSEUDO:new RegExp("^"+An),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+z+"*(even|odd|(([+-]|)(\\d*)n|)"+z+"*(?:([+-]|)"+z+"*(\\d+)|))"+z+"*\\)|)","i"),bool:new RegExp("^(?:"+ze+")$","i"),needsContext:new RegExp("^"+z+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+z+"*((?:-\\d)?\\d*)"+z+"*\\)|)(?=[^-]|$)","i")},gn=/^(?:input|select|textarea|button)$/i,pn=/^h\d$/i,ke=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,la=/[+~]/,nn=new RegExp("\\\\[\\da-fA-F]{1,6}"+z+"?|\\\\([^\\r\\n\\f])","g"),rn=function(C,L){var N="0x"+C.slice(1)-65536;return L||(N<0?String.fromCharCode(N+65536):String.fromCharCode(N>>10|55296,N&1023|56320))},tf=function(){vn()},ef=Ki(function(C){return C.disabled===!0&&U(C,"fieldset")},{dir:"parentNode",next:"legend"});function nf(){try{return w.activeElement}catch{}}try{b.apply(i=a.call(K.childNodes),K.childNodes),i[K.childNodes.length].nodeType}catch{b={apply:function(L,N){ft.apply(L,a.call(N))},call:function(L){ft.apply(L,a.call(arguments,1))}}}function Rt(C,L,N,F){var H,Z,tt,nt,et,xt,ct,dt=L&&L.ownerDocument,yt=L?L.nodeType:9;if(N=N||[],typeof C!="string"||!C||yt!==1&&yt!==9&&yt!==11)return N;if(!F&&(vn(L),L=L||w,E)){if(yt!==11&&(et=ke.exec(C)))if(H=et[1]){if(yt===9)if(tt=L.getElementById(H)){if(tt.id===H)return b.call(N,tt),N}else return N;else if(dt&&(tt=dt.getElementById(H))&&Rt.contains(L,tt)&&tt.id===H)return b.call(N,tt),N}else{if(et[2])return b.apply(N,L.getElementsByTagName(C)),N;if((H=et[3])&&L.getElementsByClassName)return b.apply(N,L.getElementsByClassName(H)),N}if(!se[C+" "]&&(!I||!I.test(C))){if(ct=C,dt=L,yt===1&&(ca.test(C)||_i.test(C))){for(dt=la.test(C)&&ua(L.parentNode)||L,(dt!=L||!_.scope)&&((nt=L.getAttribute("id"))?nt=p.escapeSelector(nt):L.setAttribute("id",nt=Y)),xt=bi(C),Z=xt.length;Z--;)xt[Z]=(nt?"#"+nt:":scope")+" "+Zi(xt[Z]);ct=xt.join(",")}try{return b.apply(N,dt.querySelectorAll(ct)),N}catch{se(C,!0)}finally{nt===Y&&L.removeAttribute("id")}}}return xs(C.replace(q,"$1"),L,N,F)}function qi(){var C=[];function L(N,F){return C.push(N+" ")>f.cacheLength&&delete L[C.shift()],L[N+" "]=F}return L}function De(C){return C[Y]=!0,C}function Vn(C){var L=w.createElement("fieldset");try{return!!C(L)}catch{return!1}finally{L.parentNode&&L.parentNode.removeChild(L),L=null}}function rf(C){return function(L){return U(L,"input")&&L.type===C}}function af(C){return function(L){return(U(L,"input")||U(L,"button"))&&L.type===C}}function ps(C){return function(L){return"form"in L?L.parentNode&&L.disabled===!1?"label"in L?"label"in L.parentNode?L.parentNode.disabled===C:L.disabled===C:L.isDisabled===C||L.isDisabled!==!C&&ef(L)===C:L.disabled===C:"label"in L?L.disabled===C:!1}}function Cn(C){return De(function(L){return L=+L,De(function(N,F){for(var H,Z=C([],N.length,L),tt=Z.length;tt--;)N[H=Z[tt]]&&(N[H]=!(F[H]=N[H]))})})}function ua(C){return C&&typeof C.getElementsByTagName<"u"&&C}function vn(C){var L,N=C?C.ownerDocument||C:K;return N==w||N.nodeType!==9||!N.documentElement||(w=N,R=w.documentElement,E=!p.isXMLDoc(w),B=R.matches||R.webkitMatchesSelector||R.msMatchesSelector,R.msMatchesSelector&&K!=w&&(L=w.defaultView)&&L.top!==L&&L.addEventListener("unload",tf),_.getById=Vn(function(F){return R.appendChild(F).id=p.expando,!w.getElementsByName||!w.getElementsByName(p.expando).length}),_.disconnectedMatch=Vn(function(F){return B.call(F,"*")}),_.scope=Vn(function(){return w.querySelectorAll(":scope")}),_.cssHas=Vn(function(){try{return w.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),_.getById?(f.filter.ID=function(F){var H=F.replace(nn,rn);return function(Z){return Z.getAttribute("id")===H}},f.find.ID=function(F,H){if(typeof H.getElementById<"u"&&E){var Z=H.getElementById(F);return Z?[Z]:[]}}):(f.filter.ID=function(F){var H=F.replace(nn,rn);return function(Z){var tt=typeof Z.getAttributeNode<"u"&&Z.getAttributeNode("id");return tt&&tt.value===H}},f.find.ID=function(F,H){if(typeof H.getElementById<"u"&&E){var Z,tt,nt,et=H.getElementById(F);if(et){if(Z=et.getAttributeNode("id"),Z&&Z.value===F)return[et];for(nt=H.getElementsByName(F),tt=0;et=nt[tt++];)if(Z=et.getAttributeNode("id"),Z&&Z.value===F)return[et]}return[]}}),f.find.TAG=function(F,H){return typeof H.getElementsByTagName<"u"?H.getElementsByTagName(F):H.querySelectorAll(F)},f.find.CLASS=function(F,H){if(typeof H.getElementsByClassName<"u"&&E)return H.getElementsByClassName(F)},I=[],Vn(function(F){var H;R.appendChild(F).innerHTML="<a id='"+Y+"' href='' disabled='disabled'></a><select id='"+Y+"-\r\\' disabled='disabled'><option selected=''></option></select>",F.querySelectorAll("[selected]").length||I.push("\\["+z+"*(?:value|"+ze+")"),F.querySelectorAll("[id~="+Y+"-]").length||I.push("~="),F.querySelectorAll("a#"+Y+"+*").length||I.push(".#.+[+~]"),F.querySelectorAll(":checked").length||I.push(":checked"),H=w.createElement("input"),H.setAttribute("type","hidden"),F.appendChild(H).setAttribute("name","D"),R.appendChild(F).disabled=!0,F.querySelectorAll(":disabled").length!==2&&I.push(":enabled",":disabled"),H=w.createElement("input"),H.setAttribute("name",""),F.appendChild(H),F.querySelectorAll("[name='']").length||I.push("\\["+z+"*name"+z+"*="+z+`*(?:''|"")`)}),_.cssHas||I.push(":has"),I=I.length&&new RegExp(I.join("|")),Kt=function(F,H){if(F===H)return m=!0,0;var Z=!F.compareDocumentPosition-!H.compareDocumentPosition;return Z||(Z=(F.ownerDocument||F)==(H.ownerDocument||H)?F.compareDocumentPosition(H):1,Z&1||!_.sortDetached&&H.compareDocumentPosition(F)===Z?F===w||F.ownerDocument==K&&Rt.contains(K,F)?-1:H===w||H.ownerDocument==K&&Rt.contains(K,H)?1:y?l.call(y,F)-l.call(y,H):0:Z&4?-1:1)}),w}Rt.matches=function(C,L){return Rt(C,null,null,L)},Rt.matchesSelector=function(C,L){if(vn(C),E&&!se[L+" "]&&(!I||!I.test(L)))try{var N=B.call(C,L);if(N||_.disconnectedMatch||C.document&&C.document.nodeType!==11)return N}catch{se(L,!0)}return Rt(L,w,null,[C]).length>0},Rt.contains=function(C,L){return(C.ownerDocument||C)!=w&&vn(C),p.contains(C,L)},Rt.attr=function(C,L){(C.ownerDocument||C)!=w&&vn(C);var N=f.attrHandle[L.toLowerCase()],F=N&&h.call(f.attrHandle,L.toLowerCase())?N(C,L,!E):void 0;return F!==void 0?F:C.getAttribute(L)},Rt.error=function(C){throw new Error("Syntax error, unrecognized expression: "+C)},p.uniqueSort=function(C){var L,N=[],F=0,H=0;if(m=!_.sortStable,y=!_.sortStable&&a.call(C,0),X.call(C,Kt),m){for(;L=C[H++];)L===C[H]&&(F=N.push(H));for(;F--;)Q.call(C,N[F],1)}return y=null,C},p.fn.uniqueSort=function(){return this.pushStack(p.uniqueSort(a.apply(this)))},f=p.expr={cacheLength:50,createPseudo:De,match:Ue,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(C){return C[1]=C[1].replace(nn,rn),C[3]=(C[3]||C[4]||C[5]||"").replace(nn,rn),C[2]==="~="&&(C[3]=" "+C[3]+" "),C.slice(0,4)},CHILD:function(C){return C[1]=C[1].toLowerCase(),C[1].slice(0,3)==="nth"?(C[3]||Rt.error(C[0]),C[4]=+(C[4]?C[5]+(C[6]||1):2*(C[3]==="even"||C[3]==="odd")),C[5]=+(C[7]+C[8]||C[3]==="odd")):C[3]&&Rt.error(C[0]),C},PSEUDO:function(C){var L,N=!C[6]&&C[2];return Ue.CHILD.test(C[0])?null:(C[3]?C[2]=C[4]||C[5]||"":N&&Ye.test(N)&&(L=bi(N,!0))&&(L=N.indexOf(")",N.length-L)-N.length)&&(C[0]=C[0].slice(0,L),C[2]=N.slice(0,L)),C.slice(0,3))}},filter:{TAG:function(C){var L=C.replace(nn,rn).toLowerCase();return C==="*"?function(){return!0}:function(N){return U(N,L)}},CLASS:function(C){var L=ut[C+" "];return L||(L=new RegExp("(^|"+z+")"+C+"("+z+"|$)"))&&ut(C,function(N){return L.test(typeof N.className=="string"&&N.className||typeof N.getAttribute<"u"&&N.getAttribute("class")||"")})},ATTR:function(C,L,N){return function(F){var H=Rt.attr(F,C);return H==null?L==="!=":L?(H+="",L==="="?H===N:L==="!="?H!==N:L==="^="?N&&H.indexOf(N)===0:L==="*="?N&&H.indexOf(N)>-1:L==="$="?N&&H.slice(-N.length)===N:L==="~="?(" "+H.replace(At," ")+" ").indexOf(N)>-1:L==="|="?H===N||H.slice(0,N.length+1)===N+"-":!1):!0}},CHILD:function(C,L,N,F,H){var Z=C.slice(0,3)!=="nth",tt=C.slice(-4)!=="last",nt=L==="of-type";return F===1&&H===0?function(et){return!!et.parentNode}:function(et,xt,ct){var dt,yt,st,Ot,be,ue=Z!==tt?"nextSibling":"previousSibling",Ee=et.parentNode,Ve=nt&&et.nodeName.toLowerCase(),jn=!ct&&!nt,pe=!1;if(Ee){if(Z){for(;ue;){for(st=et;st=st[ue];)if(nt?U(st,Ve):st.nodeType===1)return!1;be=ue=C==="only"&&!be&&"nextSibling"}return!0}if(be=[tt?Ee.firstChild:Ee.lastChild],tt&&jn){for(yt=Ee[Y]||(Ee[Y]={}),dt=yt[C]||[],Ot=dt[0]===O&&dt[1],pe=Ot&&dt[2],st=Ot&&Ee.childNodes[Ot];st=++Ot&&st&&st[ue]||(pe=Ot=0)||be.pop();)if(st.nodeType===1&&++pe&&st===et){yt[C]=[O,Ot,pe];break}}else if(jn&&(yt=et[Y]||(et[Y]={}),dt=yt[C]||[],Ot=dt[0]===O&&dt[1],pe=Ot),pe===!1)for(;(st=++Ot&&st&&st[ue]||(pe=Ot=0)||be.pop())&&!((nt?U(st,Ve):st.nodeType===1)&&++pe&&(jn&&(yt=st[Y]||(st[Y]={}),yt[C]=[O,pe]),st===et)););return pe-=H,pe===F||pe%F===0&&pe/F>=0}}},PSEUDO:function(C,L){var N,F=f.pseudos[C]||f.setFilters[C.toLowerCase()]||Rt.error("unsupported pseudo: "+C);return F[Y]?F(L):F.length>1?(N=[C,C,"",L],f.setFilters.hasOwnProperty(C.toLowerCase())?De(function(H,Z){for(var tt,nt=F(H,L),et=nt.length;et--;)tt=l.call(H,nt[et]),H[tt]=!(Z[tt]=nt[et])}):function(H){return F(H,0,N)}):F}},pseudos:{not:De(function(C){var L=[],N=[],F=ga(C.replace(q,"$1"));return F[Y]?De(function(H,Z,tt,nt){for(var et,xt=F(H,null,nt,[]),ct=H.length;ct--;)(et=xt[ct])&&(H[ct]=!(Z[ct]=et))}):function(H,Z,tt){return L[0]=H,F(L,null,tt,N),L[0]=null,!N.pop()}}),has:De(function(C){return function(L){return Rt(C,L).length>0}}),contains:De(function(C){return C=C.replace(nn,rn),function(L){return(L.textContent||p.text(L)).indexOf(C)>-1}}),lang:De(function(C){return mi.test(C||"")||Rt.error("unsupported lang: "+C),C=C.replace(nn,rn).toLowerCase(),function(L){var N;do if(N=E?L.lang:L.getAttribute("xml:lang")||L.getAttribute("lang"))return N=N.toLowerCase(),N===C||N.indexOf(C+"-")===0;while((L=L.parentNode)&&L.nodeType===1);return!1}}),target:function(C){var L=e.location&&e.location.hash;return L&&L.slice(1)===C.id},root:function(C){return C===R},focus:function(C){return C===nf()&&w.hasFocus()&&!!(C.type||C.href||~C.tabIndex)},enabled:ps(!1),disabled:ps(!0),checked:function(C){return U(C,"input")&&!!C.checked||U(C,"option")&&!!C.selected},selected:function(C){return C.parentNode&&C.parentNode.selectedIndex,C.selected===!0},empty:function(C){for(C=C.firstChild;C;C=C.nextSibling)if(C.nodeType<6)return!1;return!0},parent:function(C){return!f.pseudos.empty(C)},header:function(C){return pn.test(C.nodeName)},input:function(C){return gn.test(C.nodeName)},button:function(C){return U(C,"input")&&C.type==="button"||U(C,"button")},text:function(C){var L;return U(C,"input")&&C.type==="text"&&((L=C.getAttribute("type"))==null||L.toLowerCase()==="text")},first:Cn(function(){return[0]}),last:Cn(function(C,L){return[L-1]}),eq:Cn(function(C,L,N){return[N<0?N+L:N]}),even:Cn(function(C,L){for(var N=0;N<L;N+=2)C.push(N);return C}),odd:Cn(function(C,L){for(var N=1;N<L;N+=2)C.push(N);return C}),lt:Cn(function(C,L,N){var F;for(N<0?F=N+L:N>L?F=L:F=N;--F>=0;)C.push(F);return C}),gt:Cn(function(C,L,N){for(var F=N<0?N+L:N;++F<L;)C.push(F);return C})}},f.pseudos.nth=f.pseudos.eq;for(c in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})f.pseudos[c]=rf(c);for(c in{submit:!0,reset:!0})f.pseudos[c]=af(c);function vs(){}vs.prototype=f.filters=f.pseudos,f.setFilters=new vs;function bi(C,L){var N,F,H,Z,tt,nt,et,xt=wt[C+" "];if(xt)return L?0:xt.slice(0);for(tt=C,nt=[],et=f.preFilter;tt;){(!N||(F=Vt.exec(tt)))&&(F&&(tt=tt.slice(F[0].length)||tt),nt.push(H=[])),N=!1,(F=_i.exec(tt))&&(N=F.shift(),H.push({value:N,type:F[0].replace(q," ")}),tt=tt.slice(N.length));for(Z in f.filter)(F=Ue[Z].exec(tt))&&(!et[Z]||(F=et[Z](F)))&&(N=F.shift(),H.push({value:N,type:Z,matches:F}),tt=tt.slice(N.length));if(!N)break}return L?tt.length:tt?Rt.error(C):wt(C,nt).slice(0)}function Zi(C){for(var L=0,N=C.length,F="";L<N;L++)F+=C[L].value;return F}function Ki(C,L,N){var F=L.dir,H=L.next,Z=H||F,tt=N&&Z==="parentNode",nt=W++;return L.first?function(et,xt,ct){for(;et=et[F];)if(et.nodeType===1||tt)return C(et,xt,ct);return!1}:function(et,xt,ct){var dt,yt,st=[O,nt];if(ct){for(;et=et[F];)if((et.nodeType===1||tt)&&C(et,xt,ct))return!0}else for(;et=et[F];)if(et.nodeType===1||tt)if(yt=et[Y]||(et[Y]={}),H&&U(et,H))et=et[F]||et;else{if((dt=yt[Z])&&dt[0]===O&&dt[1]===nt)return st[2]=dt[2];if(yt[Z]=st,st[2]=C(et,xt,ct))return!0}return!1}}function fa(C){return C.length>1?function(L,N,F){for(var H=C.length;H--;)if(!C[H](L,N,F))return!1;return!0}:C[0]}function of(C,L,N){for(var F=0,H=L.length;F<H;F++)Rt(C,L[F],N);return N}function Qi(C,L,N,F,H){for(var Z,tt=[],nt=0,et=C.length,xt=L!=null;nt<et;nt++)(Z=C[nt])&&(!N||N(Z,F,H))&&(tt.push(Z),xt&&L.push(nt));return tt}function da(C,L,N,F,H,Z){return F&&!F[Y]&&(F=da(F)),H&&!H[Y]&&(H=da(H,Z)),De(function(tt,nt,et,xt){var ct,dt,yt,st,Ot=[],be=[],ue=nt.length,Ee=tt||of(L||"*",et.nodeType?[et]:et,[]),Ve=C&&(tt||!L)?Qi(Ee,Ot,C,et,xt):Ee;if(N?(st=H||(tt?C:ue||F)?[]:nt,N(Ve,st,et,xt)):st=Ve,F)for(ct=Qi(st,be),F(ct,[],et,xt),dt=ct.length;dt--;)(yt=ct[dt])&&(st[be[dt]]=!(Ve[be[dt]]=yt));if(tt){if(H||C){if(H){for(ct=[],dt=st.length;dt--;)(yt=st[dt])&&ct.push(Ve[dt]=yt);H(null,st=[],ct,xt)}for(dt=st.length;dt--;)(yt=st[dt])&&(ct=H?l.call(tt,yt):Ot[dt])>-1&&(tt[ct]=!(nt[ct]=yt))}}else st=Qi(st===nt?st.splice(ue,st.length):st),H?H(null,nt,st,xt):b.apply(nt,st)})}function ha(C){for(var L,N,F,H=C.length,Z=f.relative[C[0].type],tt=Z||f.relative[" "],nt=Z?1:0,et=Ki(function(dt){return dt===L},tt,!0),xt=Ki(function(dt){return l.call(L,dt)>-1},tt,!0),ct=[function(dt,yt,st){var Ot=!Z&&(st||yt!=v)||((L=yt).nodeType?et(dt,yt,st):xt(dt,yt,st));return L=null,Ot}];nt<H;nt++)if(N=f.relative[C[nt].type])ct=[Ki(fa(ct),N)];else{if(N=f.filter[C[nt].type].apply(null,C[nt].matches),N[Y]){for(F=++nt;F<H&&!f.relative[C[F].type];F++);return da(nt>1&&fa(ct),nt>1&&Zi(C.slice(0,nt-1).concat({value:C[nt-2].type===" "?"*":""})).replace(q,"$1"),N,nt<F&&ha(C.slice(nt,F)),F<H&&ha(C=C.slice(F)),F<H&&Zi(C))}ct.push(N)}return fa(ct)}function sf(C,L){var N=L.length>0,F=C.length>0,H=function(Z,tt,nt,et,xt){var ct,dt,yt,st=0,Ot="0",be=Z&&[],ue=[],Ee=v,Ve=Z||F&&f.find.TAG("*",xt),jn=O+=Ee==null?1:Math.random()||.1,pe=Ve.length;for(xt&&(v=tt==w||tt||xt);Ot!==pe&&(ct=Ve[Ot])!=null;Ot++){if(F&&ct){for(dt=0,!tt&&ct.ownerDocument!=w&&(vn(ct),nt=!E);yt=C[dt++];)if(yt(ct,tt||w,nt)){b.call(et,ct);break}xt&&(O=jn)}N&&((ct=!yt&&ct)&&st--,Z&&be.push(ct))}if(st+=Ot,N&&Ot!==st){for(dt=0;yt=L[dt++];)yt(be,ue,tt,nt);if(Z){if(st>0)for(;Ot--;)be[Ot]||ue[Ot]||(ue[Ot]=G.call(et));ue=Qi(ue)}b.apply(et,ue),xt&&!Z&&ue.length>0&&st+L.length>1&&p.uniqueSort(et)}return xt&&(O=jn,v=Ee),be};return N?De(H):H}function ga(C,L){var N,F=[],H=[],Z=gt[C+" "];if(!Z){for(L||(L=bi(C)),N=L.length;N--;)Z=ha(L[N]),Z[Y]?F.push(Z):H.push(Z);Z=gt(C,sf(H,F)),Z.selector=C}return Z}function xs(C,L,N,F){var H,Z,tt,nt,et,xt=typeof C=="function"&&C,ct=!F&&bi(C=xt.selector||C);if(N=N||[],ct.length===1){if(Z=ct[0]=ct[0].slice(0),Z.length>2&&(tt=Z[0]).type==="ID"&&L.nodeType===9&&E&&f.relative[Z[1].type]){if(L=(f.find.ID(tt.matches[0].replace(nn,rn),L)||[])[0],L)xt&&(L=L.parentNode);else return N;C=C.slice(Z.shift().value.length)}for(H=Ue.needsContext.test(C)?0:Z.length;H--&&(tt=Z[H],!f.relative[nt=tt.type]);)if((et=f.find[nt])&&(F=et(tt.matches[0].replace(nn,rn),la.test(Z[0].type)&&ua(L.parentNode)||L))){if(Z.splice(H,1),C=F.length&&Zi(Z),!C)return b.apply(N,F),N;break}}return(xt||ga(C,ct))(F,L,!E,N,!L||la.test(C)&&ua(L.parentNode)||L),N}_.sortStable=Y.split("").sort(Kt).join("")===Y,vn(),_.sortDetached=Vn(function(C){return C.compareDocumentPosition(w.createElement("fieldset"))&1}),p.find=Rt,p.expr[":"]=p.expr.pseudos,p.unique=p.uniqueSort,Rt.compile=ga,Rt.select=xs,Rt.setDocument=vn,Rt.tokenize=bi,Rt.escape=p.escapeSelector,Rt.getText=p.text,Rt.isXML=p.isXMLDoc,Rt.selectors=p.expr,Rt.support=p.support,Rt.uniqueSort=p.uniqueSort})();var rt=function(c,f,v){for(var y=[],m=v!==void 0;(c=c[f])&&c.nodeType!==9;)if(c.nodeType===1){if(m&&p(c).is(v))break;y.push(c)}return y},Lt=function(c,f){for(var v=[];c;c=c.nextSibling)c.nodeType===1&&c!==f&&v.push(c);return v},Ht=p.expr.match.needsContext,ie=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function le(c,f,v){return T(f)?p.grep(c,function(y,m){return!!f.call(y,m,y)!==v}):f.nodeType?p.grep(c,function(y){return y===f!==v}):typeof f!="string"?p.grep(c,function(y){return l.call(f,y)>-1!==v}):p.filter(f,c,v)}p.filter=function(c,f,v){var y=f[0];return v&&(c=":not("+c+")"),f.length===1&&y.nodeType===1?p.find.matchesSelector(y,c)?[y]:[]:p.find.matches(c,p.grep(f,function(m){return m.nodeType===1}))},p.fn.extend({find:function(c){var f,v,y=this.length,m=this;if(typeof c!="string")return this.pushStack(p(c).filter(function(){for(f=0;f<y;f++)if(p.contains(m[f],this))return!0}));for(v=this.pushStack([]),f=0;f<y;f++)p.find(c,m[f],v);return y>1?p.uniqueSort(v):v},filter:function(c){return this.pushStack(le(this,c||[],!1))},not:function(c){return this.pushStack(le(this,c||[],!0))},is:function(c){return!!le(this,typeof c=="string"&&Ht.test(c)?p(c):c||[],!1).length}});var Tt,Ut=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,ge=p.fn.init=function(c,f,v){var y,m;if(!c)return this;if(v=v||Tt,typeof c=="string")if(c[0]==="<"&&c[c.length-1]===">"&&c.length>=3?y=[null,c,null]:y=Ut.exec(c),y&&(y[1]||!f))if(y[1]){if(f=f instanceof p?f[0]:f,p.merge(this,p.parseHTML(y[1],f&&f.nodeType?f.ownerDocument||f:$,!0)),ie.test(y[1])&&p.isPlainObject(f))for(y in f)T(this[y])?this[y](f[y]):this.attr(y,f[y]);return this}else return m=$.getElementById(y[2]),m&&(this[0]=m,this.length=1),this;else return!f||f.jquery?(f||v).find(c):this.constructor(f).find(c);else{if(c.nodeType)return this[0]=c,this.length=1,this;if(T(c))return v.ready!==void 0?v.ready(c):c(p)}return p.makeArray(c,this)};ge.prototype=p.fn,Tt=p($);var re=/^(?:parents|prev(?:Until|All))/,tn={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({has:function(c){var f=p(c,this),v=f.length;return this.filter(function(){for(var y=0;y<v;y++)if(p.contains(this,f[y]))return!0})},closest:function(c,f){var v,y=0,m=this.length,b=[],w=typeof c!="string"&&p(c);if(!Ht.test(c)){for(;y<m;y++)for(v=this[y];v&&v!==f;v=v.parentNode)if(v.nodeType<11&&(w?w.index(v)>-1:v.nodeType===1&&p.find.matchesSelector(v,c))){b.push(v);break}}return this.pushStack(b.length>1?p.uniqueSort(b):b)},index:function(c){return c?typeof c=="string"?l.call(p(c),this[0]):l.call(this,c.jquery?c[0]:c):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(c,f){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(c,f))))},addBack:function(c){return this.add(c==null?this.prevObject:this.prevObject.filter(c))}});function J(c,f){for(;(c=c[f])&&c.nodeType!==1;);return c}p.each({parent:function(c){var f=c.parentNode;return f&&f.nodeType!==11?f:null},parents:function(c){return rt(c,"parentNode")},parentsUntil:function(c,f,v){return rt(c,"parentNode",v)},next:function(c){return J(c,"nextSibling")},prev:function(c){return J(c,"previousSibling")},nextAll:function(c){return rt(c,"nextSibling")},prevAll:function(c){return rt(c,"previousSibling")},nextUntil:function(c,f,v){return rt(c,"nextSibling",v)},prevUntil:function(c,f,v){return rt(c,"previousSibling",v)},siblings:function(c){return Lt((c.parentNode||{}).firstChild,c)},children:function(c){return Lt(c.firstChild)},contents:function(c){return c.contentDocument!=null&&r(c.contentDocument)?c.contentDocument:(U(c,"template")&&(c=c.content||c),p.merge([],c.childNodes))}},function(c,f){p.fn[c]=function(v,y){var m=p.map(this,f,v);return c.slice(-5)!=="Until"&&(y=v),y&&typeof y=="string"&&(m=p.filter(y,m)),this.length>1&&(tn[c]||p.uniqueSort(m),re.test(c)&&m.reverse()),this.pushStack(m)}});var ot=/[^\x20\t\r\n\f]+/g;function vt(c){var f={};return p.each(c.match(ot)||[],function(v,y){f[y]=!0}),f}p.Callbacks=function(c){c=typeof c=="string"?vt(c):p.extend({},c);var f,v,y,m,b=[],w=[],R=-1,E=function(){for(m=m||c.once,y=f=!0;w.length;R=-1)for(v=w.shift();++R<b.length;)b[R].apply(v[0],v[1])===!1&&c.stopOnFalse&&(R=b.length,v=!1);c.memory||(v=!1),f=!1,m&&(v?b=[]:b="")},I={add:function(){return b&&(v&&!f&&(R=b.length-1,w.push(v)),function B(Y){p.each(Y,function(O,W){T(W)?(!c.unique||!I.has(W))&&b.push(W):W&&W.length&&k(W)!=="string"&&B(W)})}(arguments),v&&!f&&E()),this},remove:function(){return p.each(arguments,function(B,Y){for(var O;(O=p.inArray(Y,b,O))>-1;)b.splice(O,1),O<=R&&R--}),this},has:function(B){return B?p.inArray(B,b)>-1:b.length>0},empty:function(){return b&&(b=[]),this},disable:function(){return m=w=[],b=v="",this},disabled:function(){return!b},lock:function(){return m=w=[],!v&&!f&&(b=v=""),this},locked:function(){return!!m},fireWith:function(B,Y){return m||(Y=Y||[],Y=[B,Y.slice?Y.slice():Y],w.push(Y),f||E()),this},fire:function(){return I.fireWith(this,arguments),this},fired:function(){return!!y}};return I};function V(c){return c}function Zt(c){throw c}function St(c,f,v,y){var m;try{c&&T(m=c.promise)?m.call(c).done(f).fail(v):c&&T(m=c.then)?m.call(c,f,v):f.apply(void 0,[c].slice(y))}catch(b){v.apply(void 0,[b])}}p.extend({Deferred:function(c){var f=[["notify","progress",p.Callbacks("memory"),p.Callbacks("memory"),2],["resolve","done",p.Callbacks("once memory"),p.Callbacks("once memory"),0,"resolved"],["reject","fail",p.Callbacks("once memory"),p.Callbacks("once memory"),1,"rejected"]],v="pending",y={state:function(){return v},always:function(){return m.done(arguments).fail(arguments),this},catch:function(b){return y.then(null,b)},pipe:function(){var b=arguments;return p.Deferred(function(w){p.each(f,function(R,E){var I=T(b[E[4]])&&b[E[4]];m[E[1]](function(){var B=I&&I.apply(this,arguments);B&&T(B.promise)?B.promise().progress(w.notify).done(w.resolve).fail(w.reject):w[E[0]+"With"](this,I?[B]:arguments)})}),b=null}).promise()},then:function(b,w,R){var E=0;function I(B,Y,O,W){return function(){var ut=this,wt=arguments,gt=function(){var Kt,ze;if(!(B<E)){if(Kt=O.apply(ut,wt),Kt===Y.promise())throw new TypeError("Thenable self-resolution");ze=Kt&&(typeof Kt=="object"||typeof Kt=="function")&&Kt.then,T(ze)?W?ze.call(Kt,I(E,Y,V,W),I(E,Y,Zt,W)):(E++,ze.call(Kt,I(E,Y,V,W),I(E,Y,Zt,W),I(E,Y,V,Y.notifyWith))):(O!==V&&(ut=void 0,wt=[Kt]),(W||Y.resolveWith)(ut,wt))}},se=W?gt:function(){try{gt()}catch(Kt){p.Deferred.exceptionHook&&p.Deferred.exceptionHook(Kt,se.error),B+1>=E&&(O!==Zt&&(ut=void 0,wt=[Kt]),Y.rejectWith(ut,wt))}};B?se():(p.Deferred.getErrorHook?se.error=p.Deferred.getErrorHook():p.Deferred.getStackHook&&(se.error=p.Deferred.getStackHook()),e.setTimeout(se))}}return p.Deferred(function(B){f[0][3].add(I(0,B,T(R)?R:V,B.notifyWith)),f[1][3].add(I(0,B,T(b)?b:V)),f[2][3].add(I(0,B,T(w)?w:Zt))}).promise()},promise:function(b){return b!=null?p.extend(b,y):y}},m={};return p.each(f,function(b,w){var R=w[2],E=w[5];y[w[1]]=R.add,E&&R.add(function(){v=E},f[3-b][2].disable,f[3-b][3].disable,f[0][2].lock,f[0][3].lock),R.add(w[3].fire),m[w[0]]=function(){return m[w[0]+"With"](this===m?void 0:this,arguments),this},m[w[0]+"With"]=R.fireWith}),y.promise(m),c&&c.call(m,m),m},when:function(c){var f=arguments.length,v=f,y=Array(v),m=a.call(arguments),b=p.Deferred(),w=function(R){return function(E){y[R]=this,m[R]=arguments.length>1?a.call(arguments):E,--f||b.resolveWith(y,m)}};if(f<=1&&(St(c,b.done(w(v)).resolve,b.reject,!f),b.state()==="pending"||T(m[v]&&m[v].then)))return b.then();for(;v--;)St(m[v],w(v),b.reject);return b.promise()}});var ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(c,f){e.console&&e.console.warn&&c&&ae.test(c.name)&&e.console.warn("jQuery.Deferred exception: "+c.message,c.stack,f)},p.readyException=function(c){e.setTimeout(function(){throw c})};var oe=p.Deferred();p.fn.ready=function(c){return oe.then(c).catch(function(f){p.readyException(f)}),this},p.extend({isReady:!1,readyWait:1,ready:function(c){(c===!0?--p.readyWait:p.isReady)||(p.isReady=!0,!(c!==!0&&--p.readyWait>0)&&oe.resolveWith($,[p]))}}),p.ready.then=oe.then;function Ae(){$.removeEventListener("DOMContentLoaded",Ae),e.removeEventListener("load",Ae),p.ready()}$.readyState==="complete"||$.readyState!=="loading"&&!$.documentElement.doScroll?e.setTimeout(p.ready):($.addEventListener("DOMContentLoaded",Ae),e.addEventListener("load",Ae));var Ce=function(c,f,v,y,m,b,w){var R=0,E=c.length,I=v==null;if(k(v)==="object"){m=!0;for(R in v)Ce(c,f,R,v[R],!0,b,w)}else if(y!==void 0&&(m=!0,T(y)||(w=!0),I&&(w?(f.call(c,y),f=null):(I=f,f=function(B,Y,O){return I.call(p(B),O)})),f))for(;R<E;R++)f(c[R],v,w?y:y.call(c[R],R,f(c[R],v)));return m?c:I?f.call(c):E?f(c[0],v):b},du=/^-ms-/,hu=/-([a-z])/g;function gu(c,f){return f.toUpperCase()}function Xe(c){return c.replace(du,"ms-").replace(hu,gu)}var fi=function(c){return c.nodeType===1||c.nodeType===9||!+c.nodeType};function di(){this.expando=p.expando+di.uid++}di.uid=1,di.prototype={cache:function(c){var f=c[this.expando];return f||(f={},fi(c)&&(c.nodeType?c[this.expando]=f:Object.defineProperty(c,this.expando,{value:f,configurable:!0}))),f},set:function(c,f,v){var y,m=this.cache(c);if(typeof f=="string")m[Xe(f)]=v;else for(y in f)m[Xe(y)]=f[y];return m},get:function(c,f){return f===void 0?this.cache(c):c[this.expando]&&c[this.expando][Xe(f)]},access:function(c,f,v){return f===void 0||f&&typeof f=="string"&&v===void 0?this.get(c,f):(this.set(c,f,v),v!==void 0?v:f)},remove:function(c,f){var v,y=c[this.expando];if(y!==void 0){if(f!==void 0)for(Array.isArray(f)?f=f.map(Xe):(f=Xe(f),f=f in y?[f]:f.match(ot)||[]),v=f.length;v--;)delete y[f[v]];(f===void 0||p.isEmptyObject(y))&&(c.nodeType?c[this.expando]=void 0:delete c[this.expando])}},hasData:function(c){var f=c[this.expando];return f!==void 0&&!p.isEmptyObject(f)}};var at=new di,ye=new di,pu=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,vu=/[A-Z]/g;function xu(c){return c==="true"?!0:c==="false"?!1:c==="null"?null:c===+c+""?+c:pu.test(c)?JSON.parse(c):c}function Fo(c,f,v){var y;if(v===void 0&&c.nodeType===1)if(y="data-"+f.replace(vu,"-$&").toLowerCase(),v=c.getAttribute(y),typeof v=="string"){try{v=xu(v)}catch{}ye.set(c,f,v)}else v=void 0;return v}p.extend({hasData:function(c){return ye.hasData(c)||at.hasData(c)},data:function(c,f,v){return ye.access(c,f,v)},removeData:function(c,f){ye.remove(c,f)},_data:function(c,f,v){return at.access(c,f,v)},_removeData:function(c,f){at.remove(c,f)}}),p.fn.extend({data:function(c,f){var v,y,m,b=this[0],w=b&&b.attributes;if(c===void 0){if(this.length&&(m=ye.get(b),b.nodeType===1&&!at.get(b,"hasDataAttrs"))){for(v=w.length;v--;)w[v]&&(y=w[v].name,y.indexOf("data-")===0&&(y=Xe(y.slice(5)),Fo(b,y,m[y])));at.set(b,"hasDataAttrs",!0)}return m}return typeof c=="object"?this.each(function(){ye.set(this,c)}):Ce(this,function(R){var E;if(b&&R===void 0)return E=ye.get(b,c),E!==void 0||(E=Fo(b,c),E!==void 0)?E:void 0;this.each(function(){ye.set(this,c,R)})},null,f,arguments.length>1,null,!0)},removeData:function(c){return this.each(function(){ye.remove(this,c)})}}),p.extend({queue:function(c,f,v){var y;if(c)return f=(f||"fx")+"queue",y=at.get(c,f),v&&(!y||Array.isArray(v)?y=at.access(c,f,p.makeArray(v)):y.push(v)),y||[]},dequeue:function(c,f){f=f||"fx";var v=p.queue(c,f),y=v.length,m=v.shift(),b=p._queueHooks(c,f),w=function(){p.dequeue(c,f)};m==="inprogress"&&(m=v.shift(),y--),m&&(f==="fx"&&v.unshift("inprogress"),delete b.stop,m.call(c,w,b)),!y&&b&&b.empty.fire()},_queueHooks:function(c,f){var v=f+"queueHooks";return at.get(c,v)||at.access(c,v,{empty:p.Callbacks("once memory").add(function(){at.remove(c,[f+"queue",v])})})}}),p.fn.extend({queue:function(c,f){var v=2;return typeof c!="string"&&(f=c,c="fx",v--),arguments.length<v?p.queue(this[0],c):f===void 0?this:this.each(function(){var y=p.queue(this,c,f);p._queueHooks(this,c),c==="fx"&&y[0]!=="inprogress"&&p.dequeue(this,c)})},dequeue:function(c){return this.each(function(){p.dequeue(this,c)})},clearQueue:function(c){return this.queue(c||"fx",[])},promise:function(c,f){var v,y=1,m=p.Deferred(),b=this,w=this.length,R=function(){--y||m.resolveWith(b,[b])};for(typeof c!="string"&&(f=c,c=void 0),c=c||"fx";w--;)v=at.get(b[w],c+"queueHooks"),v&&v.empty&&(y++,v.empty.add(R));return R(),m.promise(f)}});var Bo=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,hi=new RegExp("^(?:([+-])=|)("+Bo+")([a-z%]*)$","i"),en=["Top","Right","Bottom","Left"],Tn=$.documentElement,Bn=function(c){return p.contains(c.ownerDocument,c)},yu={composed:!0};Tn.getRootNode&&(Bn=function(c){return p.contains(c.ownerDocument,c)||c.getRootNode(yu)===c.ownerDocument});var Ui=function(c,f){return c=f||c,c.style.display==="none"||c.style.display===""&&Bn(c)&&p.css(c,"display")==="none"};function Xo(c,f,v,y){var m,b,w=20,R=y?function(){return y.cur()}:function(){return p.css(c,f,"")},E=R(),I=v&&v[3]||(p.cssNumber[f]?"":"px"),B=c.nodeType&&(p.cssNumber[f]||I!=="px"&&+E)&&hi.exec(p.css(c,f));if(B&&B[3]!==I){for(E=E/2,I=I||B[3],B=+E||1;w--;)p.style(c,f,B+I),(1-b)*(1-(b=R()/E||.5))<=0&&(w=0),B=B/b;B=B*2,p.style(c,f,B+I),v=v||[]}return v&&(B=+B||+E||0,m=v[1]?B+(v[1]+1)*v[2]:+v[2],y&&(y.unit=I,y.start=B,y.end=m)),m}var zo={};function _u(c){var f,v=c.ownerDocument,y=c.nodeName,m=zo[y];return m||(f=v.body.appendChild(v.createElement(y)),m=p.css(f,"display"),f.parentNode.removeChild(f),m==="none"&&(m="block"),zo[y]=m,m)}function Xn(c,f){for(var v,y,m=[],b=0,w=c.length;b<w;b++)y=c[b],y.style&&(v=y.style.display,f?(v==="none"&&(m[b]=at.get(y,"display")||null,m[b]||(y.style.display="")),y.style.display===""&&Ui(y)&&(m[b]=_u(y))):v!=="none"&&(m[b]="none",at.set(y,"display",v)));for(b=0;b<w;b++)m[b]!=null&&(c[b].style.display=m[b]);return c}p.fn.extend({show:function(){return Xn(this,!0)},hide:function(){return Xn(this)},toggle:function(c){return typeof c=="boolean"?c?this.show():this.hide():this.each(function(){Ui(this)?p(this).show():p(this).hide()})}});var gi=/^(?:checkbox|radio)$/i,Ho=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Yo=/^$|^module$|\/(?:java|ecma)script/i;(function(){var c=$.createDocumentFragment(),f=c.appendChild($.createElement("div")),v=$.createElement("input");v.setAttribute("type","radio"),v.setAttribute("checked","checked"),v.setAttribute("name","t"),f.appendChild(v),_.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,f.innerHTML="<textarea>x</textarea>",_.noCloneChecked=!!f.cloneNode(!0).lastChild.defaultValue,f.innerHTML="<option></option>",_.option=!!f.lastChild})();var Se={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Se.tbody=Se.tfoot=Se.colgroup=Se.caption=Se.thead,Se.th=Se.td,_.option||(Se.optgroup=Se.option=[1,"<select multiple='multiple'>","</select>"]);function _e(c,f){var v;return typeof c.getElementsByTagName<"u"?v=c.getElementsByTagName(f||"*"):typeof c.querySelectorAll<"u"?v=c.querySelectorAll(f||"*"):v=[],f===void 0||f&&U(c,f)?p.merge([c],v):v}function Wr(c,f){for(var v=0,y=c.length;v<y;v++)at.set(c[v],"globalEval",!f||at.get(f[v],"globalEval"))}var mu=/<|&#?\w+;/;function Uo(c,f,v,y,m){for(var b,w,R,E,I,B,Y=f.createDocumentFragment(),O=[],W=0,ut=c.length;W<ut;W++)if(b=c[W],b||b===0)if(k(b)==="object")p.merge(O,b.nodeType?[b]:b);else if(!mu.test(b))O.push(f.createTextNode(b));else{for(w=w||Y.appendChild(f.createElement("div")),R=(Ho.exec(b)||["",""])[1].toLowerCase(),E=Se[R]||Se._default,w.innerHTML=E[1]+p.htmlPrefilter(b)+E[2],B=E[0];B--;)w=w.lastChild;p.merge(O,w.childNodes),w=Y.firstChild,w.textContent=""}for(Y.textContent="",W=0;b=O[W++];){if(y&&p.inArray(b,y)>-1){m&&m.push(b);continue}if(I=Bn(b),w=_e(Y.appendChild(b),"script"),I&&Wr(w),v)for(B=0;b=w[B++];)Yo.test(b.type||"")&&v.push(b)}return Y}var Vo=/^([^.]*)(?:\.(.+)|)/;function zn(){return!0}function Hn(){return!1}function qr(c,f,v,y,m,b){var w,R;if(typeof f=="object"){typeof v!="string"&&(y=y||v,v=void 0);for(R in f)qr(c,R,v,y,f[R],b);return c}if(y==null&&m==null?(m=v,y=v=void 0):m==null&&(typeof v=="string"?(m=y,y=void 0):(m=y,y=v,v=void 0)),m===!1)m=Hn;else if(!m)return c;return b===1&&(w=m,m=function(E){return p().off(E),w.apply(this,arguments)},m.guid=w.guid||(w.guid=p.guid++)),c.each(function(){p.event.add(this,f,m,y,v)})}p.event={global:{},add:function(c,f,v,y,m){var b,w,R,E,I,B,Y,O,W,ut,wt,gt=at.get(c);if(fi(c))for(v.handler&&(b=v,v=b.handler,m=b.selector),m&&p.find.matchesSelector(Tn,m),v.guid||(v.guid=p.guid++),(E=gt.events)||(E=gt.events=Object.create(null)),(w=gt.handle)||(w=gt.handle=function(se){return typeof p<"u"&&p.event.triggered!==se.type?p.event.dispatch.apply(c,arguments):void 0}),f=(f||"").match(ot)||[""],I=f.length;I--;)R=Vo.exec(f[I])||[],W=wt=R[1],ut=(R[2]||"").split(".").sort(),W&&(Y=p.event.special[W]||{},W=(m?Y.delegateType:Y.bindType)||W,Y=p.event.special[W]||{},B=p.extend({type:W,origType:wt,data:y,handler:v,guid:v.guid,selector:m,needsContext:m&&p.expr.match.needsContext.test(m),namespace:ut.join(".")},b),(O=E[W])||(O=E[W]=[],O.delegateCount=0,(!Y.setup||Y.setup.call(c,y,ut,w)===!1)&&c.addEventListener&&c.addEventListener(W,w)),Y.add&&(Y.add.call(c,B),B.handler.guid||(B.handler.guid=v.guid)),m?O.splice(O.delegateCount++,0,B):O.push(B),p.event.global[W]=!0)},remove:function(c,f,v,y,m){var b,w,R,E,I,B,Y,O,W,ut,wt,gt=at.hasData(c)&&at.get(c);if(!(!gt||!(E=gt.events))){for(f=(f||"").match(ot)||[""],I=f.length;I--;){if(R=Vo.exec(f[I])||[],W=wt=R[1],ut=(R[2]||"").split(".").sort(),!W){for(W in E)p.event.remove(c,W+f[I],v,y,!0);continue}for(Y=p.event.special[W]||{},W=(y?Y.delegateType:Y.bindType)||W,O=E[W]||[],R=R[2]&&new RegExp("(^|\\.)"+ut.join("\\.(?:.*\\.|)")+"(\\.|$)"),w=b=O.length;b--;)B=O[b],(m||wt===B.origType)&&(!v||v.guid===B.guid)&&(!R||R.test(B.namespace))&&(!y||y===B.selector||y==="**"&&B.selector)&&(O.splice(b,1),B.selector&&O.delegateCount--,Y.remove&&Y.remove.call(c,B));w&&!O.length&&((!Y.teardown||Y.teardown.call(c,ut,gt.handle)===!1)&&p.removeEvent(c,W,gt.handle),delete E[W])}p.isEmptyObject(E)&&at.remove(c,"handle events")}},dispatch:function(c){var f,v,y,m,b,w,R=new Array(arguments.length),E=p.event.fix(c),I=(at.get(this,"events")||Object.create(null))[E.type]||[],B=p.event.special[E.type]||{};for(R[0]=E,f=1;f<arguments.length;f++)R[f]=arguments[f];if(E.delegateTarget=this,!(B.preDispatch&&B.preDispatch.call(this,E)===!1)){for(w=p.event.handlers.call(this,E,I),f=0;(m=w[f++])&&!E.isPropagationStopped();)for(E.currentTarget=m.elem,v=0;(b=m.handlers[v++])&&!E.isImmediatePropagationStopped();)(!E.rnamespace||b.namespace===!1||E.rnamespace.test(b.namespace))&&(E.handleObj=b,E.data=b.data,y=((p.event.special[b.origType]||{}).handle||b.handler).apply(m.elem,R),y!==void 0&&(E.result=y)===!1&&(E.preventDefault(),E.stopPropagation()));return B.postDispatch&&B.postDispatch.call(this,E),E.result}},handlers:function(c,f){var v,y,m,b,w,R=[],E=f.delegateCount,I=c.target;if(E&&I.nodeType&&!(c.type==="click"&&c.button>=1)){for(;I!==this;I=I.parentNode||this)if(I.nodeType===1&&!(c.type==="click"&&I.disabled===!0)){for(b=[],w={},v=0;v<E;v++)y=f[v],m=y.selector+" ",w[m]===void 0&&(w[m]=y.needsContext?p(m,this).index(I)>-1:p.find(m,this,null,[I]).length),w[m]&&b.push(y);b.length&&R.push({elem:I,handlers:b})}}return I=this,E<f.length&&R.push({elem:I,handlers:f.slice(E)}),R},addProp:function(c,f){Object.defineProperty(p.Event.prototype,c,{enumerable:!0,configurable:!0,get:T(f)?function(){if(this.originalEvent)return f(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[c]},set:function(v){Object.defineProperty(this,c,{enumerable:!0,configurable:!0,writable:!0,value:v})}})},fix:function(c){return c[p.expando]?c:new p.Event(c)},special:{load:{noBubble:!0},click:{setup:function(c){var f=this||c;return gi.test(f.type)&&f.click&&U(f,"input")&&Vi(f,"click",!0),!1},trigger:function(c){var f=this||c;return gi.test(f.type)&&f.click&&U(f,"input")&&Vi(f,"click"),!0},_default:function(c){var f=c.target;return gi.test(f.type)&&f.click&&U(f,"input")&&at.get(f,"click")||U(f,"a")}},beforeunload:{postDispatch:function(c){c.result!==void 0&&c.originalEvent&&(c.originalEvent.returnValue=c.result)}}}};function Vi(c,f,v){if(!v){at.get(c,f)===void 0&&p.event.add(c,f,zn);return}at.set(c,f,!1),p.event.add(c,f,{namespace:!1,handler:function(y){var m,b=at.get(this,f);if(y.isTrigger&1&&this[f]){if(b)(p.event.special[f]||{}).delegateType&&y.stopPropagation();else if(b=a.call(arguments),at.set(this,f,b),this[f](),m=at.get(this,f),at.set(this,f,!1),b!==m)return y.stopImmediatePropagation(),y.preventDefault(),m}else b&&(at.set(this,f,p.event.trigger(b[0],b.slice(1),this)),y.stopPropagation(),y.isImmediatePropagationStopped=zn)}})}p.removeEvent=function(c,f,v){c.removeEventListener&&c.removeEventListener(f,v)},p.Event=function(c,f){if(!(this instanceof p.Event))return new p.Event(c,f);c&&c.type?(this.originalEvent=c,this.type=c.type,this.isDefaultPrevented=c.defaultPrevented||c.defaultPrevented===void 0&&c.returnValue===!1?zn:Hn,this.target=c.target&&c.target.nodeType===3?c.target.parentNode:c.target,this.currentTarget=c.currentTarget,this.relatedTarget=c.relatedTarget):this.type=c,f&&p.extend(this,f),this.timeStamp=c&&c.timeStamp||Date.now(),this[p.expando]=!0},p.Event.prototype={constructor:p.Event,isDefaultPrevented:Hn,isPropagationStopped:Hn,isImmediatePropagationStopped:Hn,isSimulated:!1,preventDefault:function(){var c=this.originalEvent;this.isDefaultPrevented=zn,c&&!this.isSimulated&&c.preventDefault()},stopPropagation:function(){var c=this.originalEvent;this.isPropagationStopped=zn,c&&!this.isSimulated&&c.stopPropagation()},stopImmediatePropagation:function(){var c=this.originalEvent;this.isImmediatePropagationStopped=zn,c&&!this.isSimulated&&c.stopImmediatePropagation(),this.stopPropagation()}},p.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},p.event.addProp),p.each({focus:"focusin",blur:"focusout"},function(c,f){function v(y){if($.documentMode){var m=at.get(this,"handle"),b=p.event.fix(y);b.type=y.type==="focusin"?"focus":"blur",b.isSimulated=!0,m(y),b.target===b.currentTarget&&m(b)}else p.event.simulate(f,y.target,p.event.fix(y))}p.event.special[c]={setup:function(){var y;if(Vi(this,c,!0),$.documentMode)y=at.get(this,f),y||this.addEventListener(f,v),at.set(this,f,(y||0)+1);else return!1},trigger:function(){return Vi(this,c),!0},teardown:function(){var y;if($.documentMode)y=at.get(this,f)-1,y?at.set(this,f,y):(this.removeEventListener(f,v),at.remove(this,f));else return!1},_default:function(y){return at.get(y.target,c)},delegateType:f},p.event.special[f]={setup:function(){var y=this.ownerDocument||this.document||this,m=$.documentMode?this:y,b=at.get(m,f);b||($.documentMode?this.addEventListener(f,v):y.addEventListener(c,v,!0)),at.set(m,f,(b||0)+1)},teardown:function(){var y=this.ownerDocument||this.document||this,m=$.documentMode?this:y,b=at.get(m,f)-1;b?at.set(m,f,b):($.documentMode?this.removeEventListener(f,v):y.removeEventListener(c,v,!0),at.remove(m,f))}}}),p.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(c,f){p.event.special[c]={delegateType:f,bindType:f,handle:function(v){var y,m=this,b=v.relatedTarget,w=v.handleObj;return(!b||b!==m&&!p.contains(m,b))&&(v.type=w.origType,y=w.handler.apply(this,arguments),v.type=f),y}}}),p.fn.extend({on:function(c,f,v,y){return qr(this,c,f,v,y)},one:function(c,f,v,y){return qr(this,c,f,v,y,1)},off:function(c,f,v){var y,m;if(c&&c.preventDefault&&c.handleObj)return y=c.handleObj,p(c.delegateTarget).off(y.namespace?y.origType+"."+y.namespace:y.origType,y.selector,y.handler),this;if(typeof c=="object"){for(m in c)this.off(m,f,c[m]);return this}return(f===!1||typeof f=="function")&&(v=f,f=void 0),v===!1&&(v=Hn),this.each(function(){p.event.remove(this,c,v,f)})}});var bu=/<script|<style|<link/i,Tu=/checked\s*(?:[^=]|=\s*.checked.)/i,wu=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function jo(c,f){return U(c,"table")&&U(f.nodeType!==11?f:f.firstChild,"tr")&&p(c).children("tbody")[0]||c}function $u(c){return c.type=(c.getAttribute("type")!==null)+"/"+c.type,c}function Au(c){return(c.type||"").slice(0,5)==="true/"?c.type=c.type.slice(5):c.removeAttribute("type"),c}function Go(c,f){var v,y,m,b,w,R,E;if(f.nodeType===1){if(at.hasData(c)&&(b=at.get(c),E=b.events,E)){at.remove(f,"handle events");for(m in E)for(v=0,y=E[m].length;v<y;v++)p.event.add(f,m,E[m][v])}ye.hasData(c)&&(w=ye.access(c),R=p.extend({},w),ye.set(f,R))}}function Cu(c,f){var v=f.nodeName.toLowerCase();v==="input"&&gi.test(c.type)?f.checked=c.checked:(v==="input"||v==="textarea")&&(f.defaultValue=c.defaultValue)}function Yn(c,f,v,y){f=o(f);var m,b,w,R,E,I,B=0,Y=c.length,O=Y-1,W=f[0],ut=T(W);if(ut||Y>1&&typeof W=="string"&&!_.checkClone&&Tu.test(W))return c.each(function(wt){var gt=c.eq(wt);ut&&(f[0]=W.call(this,wt,gt.html())),Yn(gt,f,v,y)});if(Y&&(m=Uo(f,c[0].ownerDocument,!1,c,y),b=m.firstChild,m.childNodes.length===1&&(m=b),b||y)){for(w=p.map(_e(m,"script"),$u),R=w.length;B<Y;B++)E=m,B!==O&&(E=p.clone(E,!0,!0),R&&p.merge(w,_e(E,"script"))),v.call(c[B],E,B);if(R)for(I=w[w.length-1].ownerDocument,p.map(w,Au),B=0;B<R;B++)E=w[B],Yo.test(E.type||"")&&!at.access(E,"globalEval")&&p.contains(I,E)&&(E.src&&(E.type||"").toLowerCase()!=="module"?p._evalUrl&&!E.noModule&&p._evalUrl(E.src,{nonce:E.nonce||E.getAttribute("nonce")},I):M(E.textContent.replace(wu,""),E,I))}return c}function Wo(c,f,v){for(var y,m=f?p.filter(f,c):c,b=0;(y=m[b])!=null;b++)!v&&y.nodeType===1&&p.cleanData(_e(y)),y.parentNode&&(v&&Bn(y)&&Wr(_e(y,"script")),y.parentNode.removeChild(y));return c}p.extend({htmlPrefilter:function(c){return c},clone:function(c,f,v){var y,m,b,w,R=c.cloneNode(!0),E=Bn(c);if(!_.noCloneChecked&&(c.nodeType===1||c.nodeType===11)&&!p.isXMLDoc(c))for(w=_e(R),b=_e(c),y=0,m=b.length;y<m;y++)Cu(b[y],w[y]);if(f)if(v)for(b=b||_e(c),w=w||_e(R),y=0,m=b.length;y<m;y++)Go(b[y],w[y]);else Go(c,R);return w=_e(R,"script"),w.length>0&&Wr(w,!E&&_e(c,"script")),R},cleanData:function(c){for(var f,v,y,m=p.event.special,b=0;(v=c[b])!==void 0;b++)if(fi(v)){if(f=v[at.expando]){if(f.events)for(y in f.events)m[y]?p.event.remove(v,y):p.removeEvent(v,y,f.handle);v[at.expando]=void 0}v[ye.expando]&&(v[ye.expando]=void 0)}}}),p.fn.extend({detach:function(c){return Wo(this,c,!0)},remove:function(c){return Wo(this,c)},text:function(c){return Ce(this,function(f){return f===void 0?p.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=f)})},null,c,arguments.length)},append:function(){return Yn(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=jo(this,c);f.appendChild(c)}})},prepend:function(){return Yn(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=jo(this,c);f.insertBefore(c,f.firstChild)}})},before:function(){return Yn(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this)})},after:function(){return Yn(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this.nextSibling)})},empty:function(){for(var c,f=0;(c=this[f])!=null;f++)c.nodeType===1&&(p.cleanData(_e(c,!1)),c.textContent="");return this},clone:function(c,f){return c=c??!1,f=f??c,this.map(function(){return p.clone(this,c,f)})},html:function(c){return Ce(this,function(f){var v=this[0]||{},y=0,m=this.length;if(f===void 0&&v.nodeType===1)return v.innerHTML;if(typeof f=="string"&&!bu.test(f)&&!Se[(Ho.exec(f)||["",""])[1].toLowerCase()]){f=p.htmlPrefilter(f);try{for(;y<m;y++)v=this[y]||{},v.nodeType===1&&(p.cleanData(_e(v,!1)),v.innerHTML=f);v=0}catch{}}v&&this.empty().append(f)},null,c,arguments.length)},replaceWith:function(){var c=[];return Yn(this,arguments,function(f){var v=this.parentNode;p.inArray(this,c)<0&&(p.cleanData(_e(this)),v&&v.replaceChild(f,this))},c)}}),p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,f){p.fn[c]=function(v){for(var y,m=[],b=p(v),w=b.length-1,R=0;R<=w;R++)y=R===w?this:this.clone(!0),p(b[R])[f](y),s.apply(m,y.get());return this.pushStack(m)}});var Zr=new RegExp("^("+Bo+")(?!px)[a-z%]+$","i"),Kr=/^--/,ji=function(c){var f=c.ownerDocument.defaultView;return(!f||!f.opener)&&(f=e),f.getComputedStyle(c)},qo=function(c,f,v){var y,m,b={};for(m in f)b[m]=c.style[m],c.style[m]=f[m];y=v.call(c);for(m in f)c.style[m]=b[m];return y},Su=new RegExp(en.join("|"),"i");(function(){function c(){if(I){E.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",I.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Tn.appendChild(E).appendChild(I);var B=e.getComputedStyle(I);v=B.top!=="1%",R=f(B.marginLeft)===12,I.style.right="60%",b=f(B.right)===36,y=f(B.width)===36,I.style.position="absolute",m=f(I.offsetWidth/3)===12,Tn.removeChild(E),I=null}}function f(B){return Math.round(parseFloat(B))}var v,y,m,b,w,R,E=$.createElement("div"),I=$.createElement("div");I.style&&(I.style.backgroundClip="content-box",I.cloneNode(!0).style.backgroundClip="",_.clearCloneStyle=I.style.backgroundClip==="content-box",p.extend(_,{boxSizingReliable:function(){return c(),y},pixelBoxStyles:function(){return c(),b},pixelPosition:function(){return c(),v},reliableMarginLeft:function(){return c(),R},scrollboxSize:function(){return c(),m},reliableTrDimensions:function(){var B,Y,O,W;return w==null&&(B=$.createElement("table"),Y=$.createElement("tr"),O=$.createElement("div"),B.style.cssText="position:absolute;left:-11111px;border-collapse:separate",Y.style.cssText="box-sizing:content-box;border:1px solid",Y.style.height="1px",O.style.height="9px",O.style.display="block",Tn.appendChild(B).appendChild(Y).appendChild(O),W=e.getComputedStyle(Y),w=parseInt(W.height,10)+parseInt(W.borderTopWidth,10)+parseInt(W.borderBottomWidth,10)===Y.offsetHeight,Tn.removeChild(B)),w}}))})();function pi(c,f,v){var y,m,b,w,R=Kr.test(f),E=c.style;return v=v||ji(c),v&&(w=v.getPropertyValue(f)||v[f],R&&w&&(w=w.replace(q,"$1")||void 0),w===""&&!Bn(c)&&(w=p.style(c,f)),!_.pixelBoxStyles()&&Zr.test(w)&&Su.test(f)&&(y=E.width,m=E.minWidth,b=E.maxWidth,E.minWidth=E.maxWidth=E.width=w,w=v.width,E.width=y,E.minWidth=m,E.maxWidth=b)),w!==void 0?w+"":w}function Zo(c,f){return{get:function(){if(c()){delete this.get;return}return(this.get=f).apply(this,arguments)}}}var Ko=["Webkit","Moz","ms"],Qo=$.createElement("div").style,Jo={};function ku(c){for(var f=c[0].toUpperCase()+c.slice(1),v=Ko.length;v--;)if(c=Ko[v]+f,c in Qo)return c}function Qr(c){var f=p.cssProps[c]||Jo[c];return f||(c in Qo?c:Jo[c]=ku(c)||c)}var Eu=/^(none|table(?!-c[ea]).+)/,Ru={position:"absolute",visibility:"hidden",display:"block"},ts={letterSpacing:"0",fontWeight:"400"};function es(c,f,v){var y=hi.exec(f);return y?Math.max(0,y[2]-(v||0))+(y[3]||"px"):f}function Jr(c,f,v,y,m,b){var w=f==="width"?1:0,R=0,E=0,I=0;if(v===(y?"border":"content"))return 0;for(;w<4;w+=2)v==="margin"&&(I+=p.css(c,v+en[w],!0,m)),y?(v==="content"&&(E-=p.css(c,"padding"+en[w],!0,m)),v!=="margin"&&(E-=p.css(c,"border"+en[w]+"Width",!0,m))):(E+=p.css(c,"padding"+en[w],!0,m),v!=="padding"?E+=p.css(c,"border"+en[w]+"Width",!0,m):R+=p.css(c,"border"+en[w]+"Width",!0,m));return!y&&b>=0&&(E+=Math.max(0,Math.ceil(c["offset"+f[0].toUpperCase()+f.slice(1)]-b-E-R-.5))||0),E+I}function ns(c,f,v){var y=ji(c),m=!_.boxSizingReliable()||v,b=m&&p.css(c,"boxSizing",!1,y)==="border-box",w=b,R=pi(c,f,y),E="offset"+f[0].toUpperCase()+f.slice(1);if(Zr.test(R)){if(!v)return R;R="auto"}return(!_.boxSizingReliable()&&b||!_.reliableTrDimensions()&&U(c,"tr")||R==="auto"||!parseFloat(R)&&p.css(c,"display",!1,y)==="inline")&&c.getClientRects().length&&(b=p.css(c,"boxSizing",!1,y)==="border-box",w=E in c,w&&(R=c[E])),R=parseFloat(R)||0,R+Jr(c,f,v||(b?"border":"content"),w,y,R)+"px"}p.extend({cssHooks:{opacity:{get:function(c,f){if(f){var v=pi(c,"opacity");return v===""?"1":v}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(c,f,v,y){if(!(!c||c.nodeType===3||c.nodeType===8||!c.style)){var m,b,w,R=Xe(f),E=Kr.test(f),I=c.style;if(E||(f=Qr(R)),w=p.cssHooks[f]||p.cssHooks[R],v!==void 0){if(b=typeof v,b==="string"&&(m=hi.exec(v))&&m[1]&&(v=Xo(c,f,m),b="number"),v==null||v!==v)return;b==="number"&&!E&&(v+=m&&m[3]||(p.cssNumber[R]?"":"px")),!_.clearCloneStyle&&v===""&&f.indexOf("background")===0&&(I[f]="inherit"),(!w||!("set"in w)||(v=w.set(c,v,y))!==void 0)&&(E?I.setProperty(f,v):I[f]=v)}else return w&&"get"in w&&(m=w.get(c,!1,y))!==void 0?m:I[f]}},css:function(c,f,v,y){var m,b,w,R=Xe(f),E=Kr.test(f);return E||(f=Qr(R)),w=p.cssHooks[f]||p.cssHooks[R],w&&"get"in w&&(m=w.get(c,!0,v)),m===void 0&&(m=pi(c,f,y)),m==="normal"&&f in ts&&(m=ts[f]),v===""||v?(b=parseFloat(m),v===!0||isFinite(b)?b||0:m):m}}),p.each(["height","width"],function(c,f){p.cssHooks[f]={get:function(v,y,m){if(y)return Eu.test(p.css(v,"display"))&&(!v.getClientRects().length||!v.getBoundingClientRect().width)?qo(v,Ru,function(){return ns(v,f,m)}):ns(v,f,m)},set:function(v,y,m){var b,w=ji(v),R=!_.scrollboxSize()&&w.position==="absolute",E=R||m,I=E&&p.css(v,"boxSizing",!1,w)==="border-box",B=m?Jr(v,f,m,I,w):0;return I&&R&&(B-=Math.ceil(v["offset"+f[0].toUpperCase()+f.slice(1)]-parseFloat(w[f])-Jr(v,f,"border",!1,w)-.5)),B&&(b=hi.exec(y))&&(b[3]||"px")!=="px"&&(v.style[f]=y,y=p.css(v,f)),es(v,y,B)}}}),p.cssHooks.marginLeft=Zo(_.reliableMarginLeft,function(c,f){if(f)return(parseFloat(pi(c,"marginLeft"))||c.getBoundingClientRect().left-qo(c,{marginLeft:0},function(){return c.getBoundingClientRect().left}))+"px"}),p.each({margin:"",padding:"",border:"Width"},function(c,f){p.cssHooks[c+f]={expand:function(v){for(var y=0,m={},b=typeof v=="string"?v.split(" "):[v];y<4;y++)m[c+en[y]+f]=b[y]||b[y-2]||b[0];return m}},c!=="margin"&&(p.cssHooks[c+f].set=es)}),p.fn.extend({css:function(c,f){return Ce(this,function(v,y,m){var b,w,R={},E=0;if(Array.isArray(y)){for(b=ji(v),w=y.length;E<w;E++)R[y[E]]=p.css(v,y[E],!1,b);return R}return m!==void 0?p.style(v,y,m):p.css(v,y)},c,f,arguments.length>1)}});function me(c,f,v,y,m){return new me.prototype.init(c,f,v,y,m)}p.Tween=me,me.prototype={constructor:me,init:function(c,f,v,y,m,b){this.elem=c,this.prop=v,this.easing=m||p.easing._default,this.options=f,this.start=this.now=this.cur(),this.end=y,this.unit=b||(p.cssNumber[v]?"":"px")},cur:function(){var c=me.propHooks[this.prop];return c&&c.get?c.get(this):me.propHooks._default.get(this)},run:function(c){var f,v=me.propHooks[this.prop];return this.options.duration?this.pos=f=p.easing[this.easing](c,this.options.duration*c,0,1,this.options.duration):this.pos=f=c,this.now=(this.end-this.start)*f+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),v&&v.set?v.set(this):me.propHooks._default.set(this),this}},me.prototype.init.prototype=me.prototype,me.propHooks={_default:{get:function(c){var f;return c.elem.nodeType!==1||c.elem[c.prop]!=null&&c.elem.style[c.prop]==null?c.elem[c.prop]:(f=p.css(c.elem,c.prop,""),!f||f==="auto"?0:f)},set:function(c){p.fx.step[c.prop]?p.fx.step[c.prop](c):c.elem.nodeType===1&&(p.cssHooks[c.prop]||c.elem.style[Qr(c.prop)]!=null)?p.style(c.elem,c.prop,c.now+c.unit):c.elem[c.prop]=c.now}}},me.propHooks.scrollTop=me.propHooks.scrollLeft={set:function(c){c.elem.nodeType&&c.elem.parentNode&&(c.elem[c.prop]=c.now)}},p.easing={linear:function(c){return c},swing:function(c){return .5-Math.cos(c*Math.PI)/2},_default:"swing"},p.fx=me.prototype.init,p.fx.step={};var Un,Gi,Mu=/^(?:toggle|show|hide)$/,Lu=/queueHooks$/;function ta(){Gi&&($.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(ta):e.setTimeout(ta,p.fx.interval),p.fx.tick())}function is(){return e.setTimeout(function(){Un=void 0}),Un=Date.now()}function Wi(c,f){var v,y=0,m={height:c};for(f=f?1:0;y<4;y+=2-f)v=en[y],m["margin"+v]=m["padding"+v]=c;return f&&(m.opacity=m.width=c),m}function rs(c,f,v){for(var y,m=(Le.tweeners[f]||[]).concat(Le.tweeners["*"]),b=0,w=m.length;b<w;b++)if(y=m[b].call(v,f,c))return y}function Du(c,f,v){var y,m,b,w,R,E,I,B,Y="width"in f||"height"in f,O=this,W={},ut=c.style,wt=c.nodeType&&Ui(c),gt=at.get(c,"fxshow");v.queue||(w=p._queueHooks(c,"fx"),w.unqueued==null&&(w.unqueued=0,R=w.empty.fire,w.empty.fire=function(){w.unqueued||R()}),w.unqueued++,O.always(function(){O.always(function(){w.unqueued--,p.queue(c,"fx").length||w.empty.fire()})}));for(y in f)if(m=f[y],Mu.test(m)){if(delete f[y],b=b||m==="toggle",m===(wt?"hide":"show"))if(m==="show"&&gt&&gt[y]!==void 0)wt=!0;else continue;W[y]=gt&&gt[y]||p.style(c,y)}if(E=!p.isEmptyObject(f),!(!E&&p.isEmptyObject(W))){Y&&c.nodeType===1&&(v.overflow=[ut.overflow,ut.overflowX,ut.overflowY],I=gt&&gt.display,I==null&&(I=at.get(c,"display")),B=p.css(c,"display"),B==="none"&&(I?B=I:(Xn([c],!0),I=c.style.display||I,B=p.css(c,"display"),Xn([c]))),(B==="inline"||B==="inline-block"&&I!=null)&&p.css(c,"float")==="none"&&(E||(O.done(function(){ut.display=I}),I==null&&(B=ut.display,I=B==="none"?"":B)),ut.display="inline-block")),v.overflow&&(ut.overflow="hidden",O.always(function(){ut.overflow=v.overflow[0],ut.overflowX=v.overflow[1],ut.overflowY=v.overflow[2]})),E=!1;for(y in W)E||(gt?"hidden"in gt&&(wt=gt.hidden):gt=at.access(c,"fxshow",{display:I}),b&&(gt.hidden=!wt),wt&&Xn([c],!0),O.done(function(){wt||Xn([c]),at.remove(c,"fxshow");for(y in W)p.style(c,y,W[y])})),E=rs(wt?gt[y]:0,y,O),y in gt||(gt[y]=E.start,wt&&(E.end=E.start,E.start=0))}}function Iu(c,f){var v,y,m,b,w;for(v in c)if(y=Xe(v),m=f[y],b=c[v],Array.isArray(b)&&(m=b[1],b=c[v]=b[0]),v!==y&&(c[y]=b,delete c[v]),w=p.cssHooks[y],w&&"expand"in w){b=w.expand(b),delete c[y];for(v in b)v in c||(c[v]=b[v],f[v]=m)}else f[y]=m}function Le(c,f,v){var y,m,b=0,w=Le.prefilters.length,R=p.Deferred().always(function(){delete E.elem}),E=function(){if(m)return!1;for(var Y=Un||is(),O=Math.max(0,I.startTime+I.duration-Y),W=O/I.duration||0,ut=1-W,wt=0,gt=I.tweens.length;wt<gt;wt++)I.tweens[wt].run(ut);return R.notifyWith(c,[I,ut,O]),ut<1&&gt?O:(gt||R.notifyWith(c,[I,1,0]),R.resolveWith(c,[I]),!1)},I=R.promise({elem:c,props:p.extend({},f),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},v),originalProperties:f,originalOptions:v,startTime:Un||is(),duration:v.duration,tweens:[],createTween:function(Y,O){var W=p.Tween(c,I.opts,Y,O,I.opts.specialEasing[Y]||I.opts.easing);return I.tweens.push(W),W},stop:function(Y){var O=0,W=Y?I.tweens.length:0;if(m)return this;for(m=!0;O<W;O++)I.tweens[O].run(1);return Y?(R.notifyWith(c,[I,1,0]),R.resolveWith(c,[I,Y])):R.rejectWith(c,[I,Y]),this}}),B=I.props;for(Iu(B,I.opts.specialEasing);b<w;b++)if(y=Le.prefilters[b].call(I,c,B,I.opts),y)return T(y.stop)&&(p._queueHooks(I.elem,I.opts.queue).stop=y.stop.bind(y)),y;return p.map(B,rs,I),T(I.opts.start)&&I.opts.start.call(c,I),I.progress(I.opts.progress).done(I.opts.done,I.opts.complete).fail(I.opts.fail).always(I.opts.always),p.fx.timer(p.extend(E,{elem:c,anim:I,queue:I.opts.queue})),I}p.Animation=p.extend(Le,{tweeners:{"*":[function(c,f){var v=this.createTween(c,f);return Xo(v.elem,c,hi.exec(f),v),v}]},tweener:function(c,f){T(c)?(f=c,c=["*"]):c=c.match(ot);for(var v,y=0,m=c.length;y<m;y++)v=c[y],Le.tweeners[v]=Le.tweeners[v]||[],Le.tweeners[v].unshift(f)},prefilters:[Du],prefilter:function(c,f){f?Le.prefilters.unshift(c):Le.prefilters.push(c)}}),p.speed=function(c,f,v){var y=c&&typeof c=="object"?p.extend({},c):{complete:v||!v&&f||T(c)&&c,duration:c,easing:v&&f||f&&!T(f)&&f};return p.fx.off?y.duration=0:typeof y.duration!="number"&&(y.duration in p.fx.speeds?y.duration=p.fx.speeds[y.duration]:y.duration=p.fx.speeds._default),(y.queue==null||y.queue===!0)&&(y.queue="fx"),y.old=y.complete,y.complete=function(){T(y.old)&&y.old.call(this),y.queue&&p.dequeue(this,y.queue)},y},p.fn.extend({fadeTo:function(c,f,v,y){return this.filter(Ui).css("opacity",0).show().end().animate({opacity:f},c,v,y)},animate:function(c,f,v,y){var m=p.isEmptyObject(c),b=p.speed(f,v,y),w=function(){var R=Le(this,p.extend({},c),b);(m||at.get(this,"finish"))&&R.stop(!0)};return w.finish=w,m||b.queue===!1?this.each(w):this.queue(b.queue,w)},stop:function(c,f,v){var y=function(m){var b=m.stop;delete m.stop,b(v)};return typeof c!="string"&&(v=f,f=c,c=void 0),f&&this.queue(c||"fx",[]),this.each(function(){var m=!0,b=c!=null&&c+"queueHooks",w=p.timers,R=at.get(this);if(b)R[b]&&R[b].stop&&y(R[b]);else for(b in R)R[b]&&R[b].stop&&Lu.test(b)&&y(R[b]);for(b=w.length;b--;)w[b].elem===this&&(c==null||w[b].queue===c)&&(w[b].anim.stop(v),m=!1,w.splice(b,1));(m||!v)&&p.dequeue(this,c)})},finish:function(c){return c!==!1&&(c=c||"fx"),this.each(function(){var f,v=at.get(this),y=v[c+"queue"],m=v[c+"queueHooks"],b=p.timers,w=y?y.length:0;for(v.finish=!0,p.queue(this,c,[]),m&&m.stop&&m.stop.call(this,!0),f=b.length;f--;)b[f].elem===this&&b[f].queue===c&&(b[f].anim.stop(!0),b.splice(f,1));for(f=0;f<w;f++)y[f]&&y[f].finish&&y[f].finish.call(this);delete v.finish})}}),p.each(["toggle","show","hide"],function(c,f){var v=p.fn[f];p.fn[f]=function(y,m,b){return y==null||typeof y=="boolean"?v.apply(this,arguments):this.animate(Wi(f,!0),y,m,b)}}),p.each({slideDown:Wi("show"),slideUp:Wi("hide"),slideToggle:Wi("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(c,f){p.fn[c]=function(v,y,m){return this.animate(f,v,y,m)}}),p.timers=[],p.fx.tick=function(){var c,f=0,v=p.timers;for(Un=Date.now();f<v.length;f++)c=v[f],!c()&&v[f]===c&&v.splice(f--,1);v.length||p.fx.stop(),Un=void 0},p.fx.timer=function(c){p.timers.push(c),p.fx.start()},p.fx.interval=13,p.fx.start=function(){Gi||(Gi=!0,ta())},p.fx.stop=function(){Gi=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fn.delay=function(c,f){return c=p.fx&&p.fx.speeds[c]||c,f=f||"fx",this.queue(f,function(v,y){var m=e.setTimeout(v,c);y.stop=function(){e.clearTimeout(m)}})},function(){var c=$.createElement("input"),f=$.createElement("select"),v=f.appendChild($.createElement("option"));c.type="checkbox",_.checkOn=c.value!=="",_.optSelected=v.selected,c=$.createElement("input"),c.value="t",c.type="radio",_.radioValue=c.value==="t"}();var as,vi=p.expr.attrHandle;p.fn.extend({attr:function(c,f){return Ce(this,p.attr,c,f,arguments.length>1)},removeAttr:function(c){return this.each(function(){p.removeAttr(this,c)})}}),p.extend({attr:function(c,f,v){var y,m,b=c.nodeType;if(!(b===3||b===8||b===2)){if(typeof c.getAttribute>"u")return p.prop(c,f,v);if((b!==1||!p.isXMLDoc(c))&&(m=p.attrHooks[f.toLowerCase()]||(p.expr.match.bool.test(f)?as:void 0)),v!==void 0){if(v===null){p.removeAttr(c,f);return}return m&&"set"in m&&(y=m.set(c,v,f))!==void 0?y:(c.setAttribute(f,v+""),v)}return m&&"get"in m&&(y=m.get(c,f))!==null?y:(y=p.find.attr(c,f),y??void 0)}},attrHooks:{type:{set:function(c,f){if(!_.radioValue&&f==="radio"&&U(c,"input")){var v=c.value;return c.setAttribute("type",f),v&&(c.value=v),f}}}},removeAttr:function(c,f){var v,y=0,m=f&&f.match(ot);if(m&&c.nodeType===1)for(;v=m[y++];)c.removeAttribute(v)}}),as={set:function(c,f,v){return f===!1?p.removeAttr(c,v):c.setAttribute(v,v),v}},p.each(p.expr.match.bool.source.match(/\w+/g),function(c,f){var v=vi[f]||p.find.attr;vi[f]=function(y,m,b){var w,R,E=m.toLowerCase();return b||(R=vi[E],vi[E]=w,w=v(y,m,b)!=null?E:null,vi[E]=R),w}});var Nu=/^(?:input|select|textarea|button)$/i,Pu=/^(?:a|area)$/i;p.fn.extend({prop:function(c,f){return Ce(this,p.prop,c,f,arguments.length>1)},removeProp:function(c){return this.each(function(){delete this[p.propFix[c]||c]})}}),p.extend({prop:function(c,f,v){var y,m,b=c.nodeType;if(!(b===3||b===8||b===2))return(b!==1||!p.isXMLDoc(c))&&(f=p.propFix[f]||f,m=p.propHooks[f]),v!==void 0?m&&"set"in m&&(y=m.set(c,v,f))!==void 0?y:c[f]=v:m&&"get"in m&&(y=m.get(c,f))!==null?y:c[f]},propHooks:{tabIndex:{get:function(c){var f=p.find.attr(c,"tabindex");return f?parseInt(f,10):Nu.test(c.nodeName)||Pu.test(c.nodeName)&&c.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(p.propHooks.selected={get:function(c){var f=c.parentNode;return f&&f.parentNode&&f.parentNode.selectedIndex,null},set:function(c){var f=c.parentNode;f&&(f.selectedIndex,f.parentNode&&f.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){p.propFix[this.toLowerCase()]=this});function wn(c){var f=c.match(ot)||[];return f.join(" ")}function $n(c){return c.getAttribute&&c.getAttribute("class")||""}function ea(c){return Array.isArray(c)?c:typeof c=="string"?c.match(ot)||[]:[]}p.fn.extend({addClass:function(c){var f,v,y,m,b,w;return T(c)?this.each(function(R){p(this).addClass(c.call(this,R,$n(this)))}):(f=ea(c),f.length?this.each(function(){if(y=$n(this),v=this.nodeType===1&&" "+wn(y)+" ",v){for(b=0;b<f.length;b++)m=f[b],v.indexOf(" "+m+" ")<0&&(v+=m+" ");w=wn(v),y!==w&&this.setAttribute("class",w)}}):this)},removeClass:function(c){var f,v,y,m,b,w;return T(c)?this.each(function(R){p(this).removeClass(c.call(this,R,$n(this)))}):arguments.length?(f=ea(c),f.length?this.each(function(){if(y=$n(this),v=this.nodeType===1&&" "+wn(y)+" ",v){for(b=0;b<f.length;b++)for(m=f[b];v.indexOf(" "+m+" ")>-1;)v=v.replace(" "+m+" "," ");w=wn(v),y!==w&&this.setAttribute("class",w)}}):this):this.attr("class","")},toggleClass:function(c,f){var v,y,m,b,w=typeof c,R=w==="string"||Array.isArray(c);return T(c)?this.each(function(E){p(this).toggleClass(c.call(this,E,$n(this),f),f)}):typeof f=="boolean"&&R?f?this.addClass(c):this.removeClass(c):(v=ea(c),this.each(function(){if(R)for(b=p(this),m=0;m<v.length;m++)y=v[m],b.hasClass(y)?b.removeClass(y):b.addClass(y);else(c===void 0||w==="boolean")&&(y=$n(this),y&&at.set(this,"__className__",y),this.setAttribute&&this.setAttribute("class",y||c===!1?"":at.get(this,"__className__")||""))}))},hasClass:function(c){var f,v,y=0;for(f=" "+c+" ";v=this[y++];)if(v.nodeType===1&&(" "+wn($n(v))+" ").indexOf(f)>-1)return!0;return!1}});var Ou=/\r/g;p.fn.extend({val:function(c){var f,v,y,m=this[0];return arguments.length?(y=T(c),this.each(function(b){var w;this.nodeType===1&&(y?w=c.call(this,b,p(this).val()):w=c,w==null?w="":typeof w=="number"?w+="":Array.isArray(w)&&(w=p.map(w,function(R){return R==null?"":R+""})),f=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()],(!f||!("set"in f)||f.set(this,w,"value")===void 0)&&(this.value=w))})):m?(f=p.valHooks[m.type]||p.valHooks[m.nodeName.toLowerCase()],f&&"get"in f&&(v=f.get(m,"value"))!==void 0?v:(v=m.value,typeof v=="string"?v.replace(Ou,""):v??"")):void 0}}),p.extend({valHooks:{option:{get:function(c){var f=p.find.attr(c,"value");return f??wn(p.text(c))}},select:{get:function(c){var f,v,y,m=c.options,b=c.selectedIndex,w=c.type==="select-one",R=w?null:[],E=w?b+1:m.length;for(b<0?y=E:y=w?b:0;y<E;y++)if(v=m[y],(v.selected||y===b)&&!v.disabled&&(!v.parentNode.disabled||!U(v.parentNode,"optgroup"))){if(f=p(v).val(),w)return f;R.push(f)}return R},set:function(c,f){for(var v,y,m=c.options,b=p.makeArray(f),w=m.length;w--;)y=m[w],(y.selected=p.inArray(p.valHooks.option.get(y),b)>-1)&&(v=!0);return v||(c.selectedIndex=-1),b}}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]={set:function(c,f){if(Array.isArray(f))return c.checked=p.inArray(p(c).val(),f)>-1}},_.checkOn||(p.valHooks[this].get=function(c){return c.getAttribute("value")===null?"on":c.value})});var xi=e.location,os={guid:Date.now()},na=/\?/;p.parseXML=function(c){var f,v;if(!c||typeof c!="string")return null;try{f=new e.DOMParser().parseFromString(c,"text/xml")}catch{}return v=f&&f.getElementsByTagName("parsererror")[0],(!f||v)&&p.error("Invalid XML: "+(v?p.map(v.childNodes,function(y){return y.textContent}).join(`
`):c)),f};var ss=/^(?:focusinfocus|focusoutblur)$/,cs=function(c){c.stopPropagation()};p.extend(p.event,{trigger:function(c,f,v,y){var m,b,w,R,E,I,B,Y,O=[v||$],W=h.call(c,"type")?c.type:c,ut=h.call(c,"namespace")?c.namespace.split("."):[];if(b=Y=w=v=v||$,!(v.nodeType===3||v.nodeType===8)&&!ss.test(W+p.event.triggered)&&(W.indexOf(".")>-1&&(ut=W.split("."),W=ut.shift(),ut.sort()),E=W.indexOf(":")<0&&"on"+W,c=c[p.expando]?c:new p.Event(W,typeof c=="object"&&c),c.isTrigger=y?2:3,c.namespace=ut.join("."),c.rnamespace=c.namespace?new RegExp("(^|\\.)"+ut.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=void 0,c.target||(c.target=v),f=f==null?[c]:p.makeArray(f,[c]),B=p.event.special[W]||{},!(!y&&B.trigger&&B.trigger.apply(v,f)===!1))){if(!y&&!B.noBubble&&!A(v)){for(R=B.delegateType||W,ss.test(R+W)||(b=b.parentNode);b;b=b.parentNode)O.push(b),w=b;w===(v.ownerDocument||$)&&O.push(w.defaultView||w.parentWindow||e)}for(m=0;(b=O[m++])&&!c.isPropagationStopped();)Y=b,c.type=m>1?R:B.bindType||W,I=(at.get(b,"events")||Object.create(null))[c.type]&&at.get(b,"handle"),I&&I.apply(b,f),I=E&&b[E],I&&I.apply&&fi(b)&&(c.result=I.apply(b,f),c.result===!1&&c.preventDefault());return c.type=W,!y&&!c.isDefaultPrevented()&&(!B._default||B._default.apply(O.pop(),f)===!1)&&fi(v)&&E&&T(v[W])&&!A(v)&&(w=v[E],w&&(v[E]=null),p.event.triggered=W,c.isPropagationStopped()&&Y.addEventListener(W,cs),v[W](),c.isPropagationStopped()&&Y.removeEventListener(W,cs),p.event.triggered=void 0,w&&(v[E]=w)),c.result}},simulate:function(c,f,v){var y=p.extend(new p.Event,v,{type:c,isSimulated:!0});p.event.trigger(y,null,f)}}),p.fn.extend({trigger:function(c,f){return this.each(function(){p.event.trigger(c,f,this)})},triggerHandler:function(c,f){var v=this[0];if(v)return p.event.trigger(c,f,v,!0)}});var Fu=/\[\]$/,ls=/\r?\n/g,Bu=/^(?:submit|button|image|reset|file)$/i,Xu=/^(?:input|select|textarea|keygen)/i;function ia(c,f,v,y){var m;if(Array.isArray(f))p.each(f,function(b,w){v||Fu.test(c)?y(c,w):ia(c+"["+(typeof w=="object"&&w!=null?b:"")+"]",w,v,y)});else if(!v&&k(f)==="object")for(m in f)ia(c+"["+m+"]",f[m],v,y);else y(c,f)}p.param=function(c,f){var v,y=[],m=function(b,w){var R=T(w)?w():w;y[y.length]=encodeURIComponent(b)+"="+encodeURIComponent(R??"")};if(c==null)return"";if(Array.isArray(c)||c.jquery&&!p.isPlainObject(c))p.each(c,function(){m(this.name,this.value)});else for(v in c)ia(v,c[v],f,m);return y.join("&")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var c=p.prop(this,"elements");return c?p.makeArray(c):this}).filter(function(){var c=this.type;return this.name&&!p(this).is(":disabled")&&Xu.test(this.nodeName)&&!Bu.test(c)&&(this.checked||!gi.test(c))}).map(function(c,f){var v=p(this).val();return v==null?null:Array.isArray(v)?p.map(v,function(y){return{name:f.name,value:y.replace(ls,`\r
`)}}):{name:f.name,value:v.replace(ls,`\r
`)}}).get()}});var zu=/%20/g,Hu=/#.*$/,Yu=/([?&])_=[^&]*/,Uu=/^(.*?):[ \t]*([^\r\n]*)$/mg,Vu=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ju=/^(?:GET|HEAD)$/,Gu=/^\/\//,us={},ra={},fs="*/".concat("*"),aa=$.createElement("a");aa.href=xi.href;function ds(c){return function(f,v){typeof f!="string"&&(v=f,f="*");var y,m=0,b=f.toLowerCase().match(ot)||[];if(T(v))for(;y=b[m++];)y[0]==="+"?(y=y.slice(1)||"*",(c[y]=c[y]||[]).unshift(v)):(c[y]=c[y]||[]).push(v)}}function hs(c,f,v,y){var m={},b=c===ra;function w(R){var E;return m[R]=!0,p.each(c[R]||[],function(I,B){var Y=B(f,v,y);if(typeof Y=="string"&&!b&&!m[Y])return f.dataTypes.unshift(Y),w(Y),!1;if(b)return!(E=Y)}),E}return w(f.dataTypes[0])||!m["*"]&&w("*")}function oa(c,f){var v,y,m=p.ajaxSettings.flatOptions||{};for(v in f)f[v]!==void 0&&((m[v]?c:y||(y={}))[v]=f[v]);return y&&p.extend(!0,c,y),c}function Wu(c,f,v){for(var y,m,b,w,R=c.contents,E=c.dataTypes;E[0]==="*";)E.shift(),y===void 0&&(y=c.mimeType||f.getResponseHeader("Content-Type"));if(y){for(m in R)if(R[m]&&R[m].test(y)){E.unshift(m);break}}if(E[0]in v)b=E[0];else{for(m in v){if(!E[0]||c.converters[m+" "+E[0]]){b=m;break}w||(w=m)}b=b||w}if(b)return b!==E[0]&&E.unshift(b),v[b]}function qu(c,f,v,y){var m,b,w,R,E,I={},B=c.dataTypes.slice();if(B[1])for(w in c.converters)I[w.toLowerCase()]=c.converters[w];for(b=B.shift();b;)if(c.responseFields[b]&&(v[c.responseFields[b]]=f),!E&&y&&c.dataFilter&&(f=c.dataFilter(f,c.dataType)),E=b,b=B.shift(),b){if(b==="*")b=E;else if(E!=="*"&&E!==b){if(w=I[E+" "+b]||I["* "+b],!w){for(m in I)if(R=m.split(" "),R[1]===b&&(w=I[E+" "+R[0]]||I["* "+R[0]],w)){w===!0?w=I[m]:I[m]!==!0&&(b=R[0],B.unshift(R[1]));break}}if(w!==!0)if(w&&c.throws)f=w(f);else try{f=w(f)}catch(Y){return{state:"parsererror",error:w?Y:"No conversion from "+E+" to "+b}}}}return{state:"success",data:f}}p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xi.href,type:"GET",isLocal:Vu.test(xi.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":fs,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(c,f){return f?oa(oa(c,p.ajaxSettings),f):oa(p.ajaxSettings,c)},ajaxPrefilter:ds(us),ajaxTransport:ds(ra),ajax:function(c,f){typeof c=="object"&&(f=c,c=void 0),f=f||{};var v,y,m,b,w,R,E,I,B,Y,O=p.ajaxSetup({},f),W=O.context||O,ut=O.context&&(W.nodeType||W.jquery)?p(W):p.event,wt=p.Deferred(),gt=p.Callbacks("once memory"),se=O.statusCode||{},Kt={},ze={},He="canceled",bt={readyState:0,getResponseHeader:function(At){var Vt;if(E){if(!b)for(b={};Vt=Uu.exec(m);)b[Vt[1].toLowerCase()+" "]=(b[Vt[1].toLowerCase()+" "]||[]).concat(Vt[2]);Vt=b[At.toLowerCase()+" "]}return Vt==null?null:Vt.join(", ")},getAllResponseHeaders:function(){return E?m:null},setRequestHeader:function(At,Vt){return E==null&&(At=ze[At.toLowerCase()]=ze[At.toLowerCase()]||At,Kt[At]=Vt),this},overrideMimeType:function(At){return E==null&&(O.mimeType=At),this},statusCode:function(At){var Vt;if(At)if(E)bt.always(At[bt.status]);else for(Vt in At)se[Vt]=[se[Vt],At[Vt]];return this},abort:function(At){var Vt=At||He;return v&&v.abort(Vt),An(0,Vt),this}};if(wt.promise(bt),O.url=((c||O.url||xi.href)+"").replace(Gu,xi.protocol+"//"),O.type=f.method||f.type||O.method||O.type,O.dataTypes=(O.dataType||"*").toLowerCase().match(ot)||[""],O.crossDomain==null){R=$.createElement("a");try{R.href=O.url,R.href=R.href,O.crossDomain=aa.protocol+"//"+aa.host!=R.protocol+"//"+R.host}catch{O.crossDomain=!0}}if(O.data&&O.processData&&typeof O.data!="string"&&(O.data=p.param(O.data,O.traditional)),hs(us,O,f,bt),E)return bt;I=p.event&&O.global,I&&p.active++===0&&p.event.trigger("ajaxStart"),O.type=O.type.toUpperCase(),O.hasContent=!ju.test(O.type),y=O.url.replace(Hu,""),O.hasContent?O.data&&O.processData&&(O.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(O.data=O.data.replace(zu,"+")):(Y=O.url.slice(y.length),O.data&&(O.processData||typeof O.data=="string")&&(y+=(na.test(y)?"&":"?")+O.data,delete O.data),O.cache===!1&&(y=y.replace(Yu,"$1"),Y=(na.test(y)?"&":"?")+"_="+os.guid+++Y),O.url=y+Y),O.ifModified&&(p.lastModified[y]&&bt.setRequestHeader("If-Modified-Since",p.lastModified[y]),p.etag[y]&&bt.setRequestHeader("If-None-Match",p.etag[y])),(O.data&&O.hasContent&&O.contentType!==!1||f.contentType)&&bt.setRequestHeader("Content-Type",O.contentType),bt.setRequestHeader("Accept",O.dataTypes[0]&&O.accepts[O.dataTypes[0]]?O.accepts[O.dataTypes[0]]+(O.dataTypes[0]!=="*"?", "+fs+"; q=0.01":""):O.accepts["*"]);for(B in O.headers)bt.setRequestHeader(B,O.headers[B]);if(O.beforeSend&&(O.beforeSend.call(W,bt,O)===!1||E))return bt.abort();if(He="abort",gt.add(O.complete),bt.done(O.success),bt.fail(O.error),v=hs(ra,O,f,bt),!v)An(-1,"No Transport");else{if(bt.readyState=1,I&&ut.trigger("ajaxSend",[bt,O]),E)return bt;O.async&&O.timeout>0&&(w=e.setTimeout(function(){bt.abort("timeout")},O.timeout));try{E=!1,v.send(Kt,An)}catch(At){if(E)throw At;An(-1,At)}}function An(At,Vt,_i,ca){var Ye,mi,Ue,gn,pn,ke=Vt;E||(E=!0,w&&e.clearTimeout(w),v=void 0,m=ca||"",bt.readyState=At>0?4:0,Ye=At>=200&&At<300||At===304,_i&&(gn=Wu(O,bt,_i)),!Ye&&p.inArray("script",O.dataTypes)>-1&&p.inArray("json",O.dataTypes)<0&&(O.converters["text script"]=function(){}),gn=qu(O,gn,bt,Ye),Ye?(O.ifModified&&(pn=bt.getResponseHeader("Last-Modified"),pn&&(p.lastModified[y]=pn),pn=bt.getResponseHeader("etag"),pn&&(p.etag[y]=pn)),At===204||O.type==="HEAD"?ke="nocontent":At===304?ke="notmodified":(ke=gn.state,mi=gn.data,Ue=gn.error,Ye=!Ue)):(Ue=ke,(At||!ke)&&(ke="error",At<0&&(At=0))),bt.status=At,bt.statusText=(Vt||ke)+"",Ye?wt.resolveWith(W,[mi,ke,bt]):wt.rejectWith(W,[bt,ke,Ue]),bt.statusCode(se),se=void 0,I&&ut.trigger(Ye?"ajaxSuccess":"ajaxError",[bt,O,Ye?mi:Ue]),gt.fireWith(W,[bt,ke]),I&&(ut.trigger("ajaxComplete",[bt,O]),--p.active||p.event.trigger("ajaxStop")))}return bt},getJSON:function(c,f,v){return p.get(c,f,v,"json")},getScript:function(c,f){return p.get(c,void 0,f,"script")}}),p.each(["get","post"],function(c,f){p[f]=function(v,y,m,b){return T(y)&&(b=b||m,m=y,y=void 0),p.ajax(p.extend({url:v,type:f,dataType:b,data:y,success:m},p.isPlainObject(v)&&v))}}),p.ajaxPrefilter(function(c){var f;for(f in c.headers)f.toLowerCase()==="content-type"&&(c.contentType=c.headers[f]||"")}),p._evalUrl=function(c,f,v){return p.ajax({url:c,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(y){p.globalEval(y,f,v)}})},p.fn.extend({wrapAll:function(c){var f;return this[0]&&(T(c)&&(c=c.call(this[0])),f=p(c,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&f.insertBefore(this[0]),f.map(function(){for(var v=this;v.firstElementChild;)v=v.firstElementChild;return v}).append(this)),this},wrapInner:function(c){return T(c)?this.each(function(f){p(this).wrapInner(c.call(this,f))}):this.each(function(){var f=p(this),v=f.contents();v.length?v.wrapAll(c):f.append(c)})},wrap:function(c){var f=T(c);return this.each(function(v){p(this).wrapAll(f?c.call(this,v):c)})},unwrap:function(c){return this.parent(c).not("body").each(function(){p(this).replaceWith(this.childNodes)}),this}}),p.expr.pseudos.hidden=function(c){return!p.expr.pseudos.visible(c)},p.expr.pseudos.visible=function(c){return!!(c.offsetWidth||c.offsetHeight||c.getClientRects().length)},p.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch{}};var Zu={0:200,1223:204},yi=p.ajaxSettings.xhr();_.cors=!!yi&&"withCredentials"in yi,_.ajax=yi=!!yi,p.ajaxTransport(function(c){var f,v;if(_.cors||yi&&!c.crossDomain)return{send:function(y,m){var b,w=c.xhr();if(w.open(c.type,c.url,c.async,c.username,c.password),c.xhrFields)for(b in c.xhrFields)w[b]=c.xhrFields[b];c.mimeType&&w.overrideMimeType&&w.overrideMimeType(c.mimeType),!c.crossDomain&&!y["X-Requested-With"]&&(y["X-Requested-With"]="XMLHttpRequest");for(b in y)w.setRequestHeader(b,y[b]);f=function(R){return function(){f&&(f=v=w.onload=w.onerror=w.onabort=w.ontimeout=w.onreadystatechange=null,R==="abort"?w.abort():R==="error"?typeof w.status!="number"?m(0,"error"):m(w.status,w.statusText):m(Zu[w.status]||w.status,w.statusText,(w.responseType||"text")!=="text"||typeof w.responseText!="string"?{binary:w.response}:{text:w.responseText},w.getAllResponseHeaders()))}},w.onload=f(),v=w.onerror=w.ontimeout=f("error"),w.onabort!==void 0?w.onabort=v:w.onreadystatechange=function(){w.readyState===4&&e.setTimeout(function(){f&&v()})},f=f("abort");try{w.send(c.hasContent&&c.data||null)}catch(R){if(f)throw R}},abort:function(){f&&f()}}}),p.ajaxPrefilter(function(c){c.crossDomain&&(c.contents.script=!1)}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(c){return p.globalEval(c),c}}}),p.ajaxPrefilter("script",function(c){c.cache===void 0&&(c.cache=!1),c.crossDomain&&(c.type="GET")}),p.ajaxTransport("script",function(c){if(c.crossDomain||c.scriptAttrs){var f,v;return{send:function(y,m){f=p("<script>").attr(c.scriptAttrs||{}).prop({charset:c.scriptCharset,src:c.url}).on("load error",v=function(b){f.remove(),v=null,b&&m(b.type==="error"?404:200,b.type)}),$.head.appendChild(f[0])},abort:function(){v&&v()}}}});var gs=[],sa=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var c=gs.pop()||p.expando+"_"+os.guid++;return this[c]=!0,c}}),p.ajaxPrefilter("json jsonp",function(c,f,v){var y,m,b,w=c.jsonp!==!1&&(sa.test(c.url)?"url":typeof c.data=="string"&&(c.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&sa.test(c.data)&&"data");if(w||c.dataTypes[0]==="jsonp")return y=c.jsonpCallback=T(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,w?c[w]=c[w].replace(sa,"$1"+y):c.jsonp!==!1&&(c.url+=(na.test(c.url)?"&":"?")+c.jsonp+"="+y),c.converters["script json"]=function(){return b||p.error(y+" was not called"),b[0]},c.dataTypes[0]="json",m=e[y],e[y]=function(){b=arguments},v.always(function(){m===void 0?p(e).removeProp(y):e[y]=m,c[y]&&(c.jsonpCallback=f.jsonpCallback,gs.push(y)),b&&T(m)&&m(b[0]),b=m=void 0}),"script"}),_.createHTMLDocument=function(){var c=$.implementation.createHTMLDocument("").body;return c.innerHTML="<form></form><form></form>",c.childNodes.length===2}(),p.parseHTML=function(c,f,v){if(typeof c!="string")return[];typeof f=="boolean"&&(v=f,f=!1);var y,m,b;return f||(_.createHTMLDocument?(f=$.implementation.createHTMLDocument(""),y=f.createElement("base"),y.href=$.location.href,f.head.appendChild(y)):f=$),m=ie.exec(c),b=!v&&[],m?[f.createElement(m[1])]:(m=Uo([c],f,b),b&&b.length&&p(b).remove(),p.merge([],m.childNodes))},p.fn.load=function(c,f,v){var y,m,b,w=this,R=c.indexOf(" ");return R>-1&&(y=wn(c.slice(R)),c=c.slice(0,R)),T(f)?(v=f,f=void 0):f&&typeof f=="object"&&(m="POST"),w.length>0&&p.ajax({url:c,type:m||"GET",dataType:"html",data:f}).done(function(E){b=arguments,w.html(y?p("<div>").append(p.parseHTML(E)).find(y):E)}).always(v&&function(E,I){w.each(function(){v.apply(this,b||[E.responseText,I,E])})}),this},p.expr.pseudos.animated=function(c){return p.grep(p.timers,function(f){return c===f.elem}).length},p.offset={setOffset:function(c,f,v){var y,m,b,w,R,E,I,B=p.css(c,"position"),Y=p(c),O={};B==="static"&&(c.style.position="relative"),R=Y.offset(),b=p.css(c,"top"),E=p.css(c,"left"),I=(B==="absolute"||B==="fixed")&&(b+E).indexOf("auto")>-1,I?(y=Y.position(),w=y.top,m=y.left):(w=parseFloat(b)||0,m=parseFloat(E)||0),T(f)&&(f=f.call(c,v,p.extend({},R))),f.top!=null&&(O.top=f.top-R.top+w),f.left!=null&&(O.left=f.left-R.left+m),"using"in f?f.using.call(c,O):Y.css(O)}},p.fn.extend({offset:function(c){if(arguments.length)return c===void 0?this:this.each(function(m){p.offset.setOffset(this,c,m)});var f,v,y=this[0];if(y)return y.getClientRects().length?(f=y.getBoundingClientRect(),v=y.ownerDocument.defaultView,{top:f.top+v.pageYOffset,left:f.left+v.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var c,f,v,y=this[0],m={top:0,left:0};if(p.css(y,"position")==="fixed")f=y.getBoundingClientRect();else{for(f=this.offset(),v=y.ownerDocument,c=y.offsetParent||v.documentElement;c&&(c===v.body||c===v.documentElement)&&p.css(c,"position")==="static";)c=c.parentNode;c&&c!==y&&c.nodeType===1&&(m=p(c).offset(),m.top+=p.css(c,"borderTopWidth",!0),m.left+=p.css(c,"borderLeftWidth",!0))}return{top:f.top-m.top-p.css(y,"marginTop",!0),left:f.left-m.left-p.css(y,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent;c&&p.css(c,"position")==="static";)c=c.offsetParent;return c||Tn})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(c,f){var v=f==="pageYOffset";p.fn[c]=function(y){return Ce(this,function(m,b,w){var R;if(A(m)?R=m:m.nodeType===9&&(R=m.defaultView),w===void 0)return R?R[f]:m[b];R?R.scrollTo(v?R.pageXOffset:w,v?w:R.pageYOffset):m[b]=w},c,y,arguments.length)}}),p.each(["top","left"],function(c,f){p.cssHooks[f]=Zo(_.pixelPosition,function(v,y){if(y)return y=pi(v,f),Zr.test(y)?p(v).position()[f]+"px":y})}),p.each({Height:"height",Width:"width"},function(c,f){p.each({padding:"inner"+c,content:f,"":"outer"+c},function(v,y){p.fn[y]=function(m,b){var w=arguments.length&&(v||typeof m!="boolean"),R=v||(m===!0||b===!0?"margin":"border");return Ce(this,function(E,I,B){var Y;return A(E)?y.indexOf("outer")===0?E["inner"+c]:E.document.documentElement["client"+c]:E.nodeType===9?(Y=E.documentElement,Math.max(E.body["scroll"+c],Y["scroll"+c],E.body["offset"+c],Y["offset"+c],Y["client"+c])):B===void 0?p.css(E,I,R):p.style(E,I,B,R)},f,w?m:void 0,w)}})}),p.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(c,f){p.fn[f]=function(v){return this.on(f,v)}}),p.fn.extend({bind:function(c,f,v){return this.on(c,null,f,v)},unbind:function(c,f){return this.off(c,null,f)},delegate:function(c,f,v,y){return this.on(f,c,v,y)},undelegate:function(c,f,v){return arguments.length===1?this.off(c,"**"):this.off(f,c||"**",v)},hover:function(c,f){return this.on("mouseenter",c).on("mouseleave",f||c)}}),p.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(c,f){p.fn[f]=function(v,y){return arguments.length>0?this.on(f,null,v,y):this.trigger(f)}});var Ku=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;p.proxy=function(c,f){var v,y,m;if(typeof f=="string"&&(v=c[f],f=c,c=v),!!T(c))return y=a.call(arguments,2),m=function(){return c.apply(f||this,y.concat(a.call(arguments)))},m.guid=c.guid=c.guid||p.guid++,m},p.holdReady=function(c){c?p.readyWait++:p.ready(!0)},p.isArray=Array.isArray,p.parseJSON=JSON.parse,p.nodeName=U,p.isFunction=T,p.isWindow=A,p.camelCase=Xe,p.type=k,p.now=Date.now,p.isNumeric=function(c){var f=p.type(c);return(f==="number"||f==="string")&&!isNaN(c-parseFloat(c))},p.trim=function(c){return c==null?"":(c+"").replace(Ku,"$1")};var Qu=e.jQuery,Ju=e.$;return p.noConflict=function(c){return e.$===p&&(e.$=Ju),c&&e.jQuery===p&&(e.jQuery=Qu),p},typeof n>"u"&&(e.jQuery=e.$=p),p})})(Rc);var xf=Rc.exports;const We=lf(xf),yf=()=>({slidesScale:"",slideMode:!1,slideType:"divs2slidesjs",revealjsPath:"",keyBoardShortCut:!1,mediaProcess:!0,jsZipV2:!1,themeProcess:!0,incSlide:{width:0,height:0},slideModeConfig:{first:1,nav:!0,navTxtColor:"black",keyBoardShortCut:!0,showSlideNum:!0,showTotalSlideNum:!0,autoSlide:!0,randomAutoSlide:!1,loop:!1,background:!1,transition:"default",transitionTime:1},revealjsConfig:{}});function sr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _f(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ao(t){let e,n,i;t.length!==2?(e=sr,n=(s,l)=>sr(t(s),l),i=(s,l)=>t(s)-l):(e=t===sr||t===_f?t:mf,n=t,i=t);function r(s,l,u=0,d=s.length){if(u<d){if(e(l,l)!==0)return d;do{const h=u+d>>>1;n(s[h],l)<0?u=h+1:d=h}while(u<d)}return u}function a(s,l,u=0,d=s.length){if(u<d){if(e(l,l)!==0)return d;do{const h=u+d>>>1;n(s[h],l)<=0?u=h+1:d=h}while(u<d)}return u}function o(s,l,u=0,d=s.length){const h=r(s,l,u,d-1);return h>u&&i(s[h-1],l)>-i(s[h],l)?h-1:h}return{left:r,center:o,right:a}}function mf(){return 0}function bf(t){return t===null?NaN:+t}const Tf=ao(sr),wf=Tf.right;ao(bf).center;const $f=wf;class ys extends Map{constructor(e,n=Sf){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(_s(this,e))}has(e){return super.has(_s(this,e))}set(e,n){return super.set(Af(this,e),n)}delete(e){return super.delete(Cf(this,e))}}function _s({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function Af({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Cf({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Sf(t){return t!==null&&typeof t=="object"?t.valueOf():t}const kf=Math.sqrt(50),Ef=Math.sqrt(10),Rf=Math.sqrt(2);function vr(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=kf?10:a>=Ef?5:a>=Rf?2:1;let s,l,u;return r<0?(u=Math.pow(10,-r)/o,s=Math.round(t*u),l=Math.round(e*u),s/u<t&&++s,l/u>e&&--l,u=-u):(u=Math.pow(10,r)*o,s=Math.round(t/u),l=Math.round(e/u),s*u<t&&++s,l*u>e&&--l),l<s&&.5<=n&&n<2?vr(t,e,n*2):[s,l,u]}function Pa(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,a,o]=i?vr(e,t,n):vr(t,e,n);if(!(a>=r))return[];const s=a-r+1,l=new Array(s);if(i)if(o<0)for(let u=0;u<s;++u)l[u]=(a-u)/-o;else for(let u=0;u<s;++u)l[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(r+u)/-o;else for(let u=0;u<s;++u)l[u]=(r+u)*o;return l}function Oa(t,e,n){return e=+e,t=+t,n=+n,vr(t,e,n)[2]}function Fa(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?Oa(e,t,n):Oa(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function Mf(t){return t}var cr=1,lr=2,Ba=3,ki=4,ms=1e-6;function Lf(t){return"translate("+t+",0)"}function Df(t){return"translate(0,"+t+")"}function If(t){return e=>+t(e)}function Nf(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Pf(){return!this.__axis}function Pr(t,e){var n=[],i=null,r=null,a=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===cr||t===ki?-1:1,d=t===ki||t===lr?"x":"y",h=t===cr||t===Ba?Lf:Df;function g(x){var _=i??(e.ticks?e.ticks.apply(e,n):e.domain()),T=r??(e.tickFormat?e.tickFormat.apply(e,n):Mf),A=Math.max(a,0)+s,$=e.range(),S=+$[0]+l,M=+$[$.length-1]+l,k=(e.bandwidth?Nf:If)(e.copy(),l),P=x.selection?x.selection():x,D=P.selectAll(".domain").data([null]),p=P.selectAll(".tick").data(_,e).order(),j=p.exit(),U=p.enter().append("g").attr("class","tick"),G=p.select("line"),X=p.select("text");D=D.merge(D.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(U),G=G.merge(U.append("line").attr("stroke","currentColor").attr(d+"2",u*a)),X=X.merge(U.append("text").attr("fill","currentColor").attr(d,u*A).attr("dy",t===cr?"0em":t===Ba?"0.71em":"0.32em")),x!==P&&(D=D.transition(x),p=p.transition(x),G=G.transition(x),X=X.transition(x),j=j.transition(x).attr("opacity",ms).attr("transform",function(Q){return isFinite(Q=k(Q))?h(Q+l):this.getAttribute("transform")}),U.attr("opacity",ms).attr("transform",function(Q){var z=this.parentNode.__axis;return h((z&&isFinite(z=z(Q))?z:k(Q))+l)})),j.remove(),D.attr("d",t===ki||t===lr?o?"M"+u*o+","+S+"H"+l+"V"+M+"H"+u*o:"M"+l+","+S+"V"+M:o?"M"+S+","+u*o+"V"+l+"H"+M+"V"+u*o:"M"+S+","+l+"H"+M),p.attr("opacity",1).attr("transform",function(Q){return h(k(Q)+l)}),G.attr(d+"2",u*a),X.attr(d,u*A).text(T),P.filter(Pf).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===lr?"start":t===ki?"end":"middle"),P.each(function(){this.__axis=k})}return g.scale=function(x){return arguments.length?(e=x,g):e},g.ticks=function(){return n=Array.from(arguments),g},g.tickArguments=function(x){return arguments.length?(n=x==null?[]:Array.from(x),g):n.slice()},g.tickValues=function(x){return arguments.length?(i=x==null?null:Array.from(x),g):i&&i.slice()},g.tickFormat=function(x){return arguments.length?(r=x,g):r},g.tickSize=function(x){return arguments.length?(a=o=+x,g):a},g.tickSizeInner=function(x){return arguments.length?(a=+x,g):a},g.tickSizeOuter=function(x){return arguments.length?(o=+x,g):o},g.tickPadding=function(x){return arguments.length?(s=+x,g):s},g.offset=function(x){return arguments.length?(l=+x,g):l},g}function Of(t){return Pr(cr,t)}function Ff(t){return Pr(lr,t)}function bs(t){return Pr(Ba,t)}function Ts(t){return Pr(ki,t)}var Bf={value:()=>{}};function oo(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ur(n)}function ur(t){this._=t}function Xf(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ur.prototype=oo.prototype={constructor:ur,on:function(t,e){var n=this._,i=Xf(t+"",n),r,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((r=(t=i[a]).type)&&(r=zf(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(r=(t=i[a]).type)n[r]=ws(n[r],t.name,e);else if(e==null)for(r in n)n[r]=ws(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ur(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,a;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],i=0,r=a.length;i<r;++i)a[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};function zf(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function ws(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Bf,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xa="http://www.w3.org/1999/xhtml";const ti={svg:"http://www.w3.org/2000/svg",xhtml:Xa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Or(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),ti.hasOwnProperty(e)?{space:ti[e],local:t}:t}function Hf(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xa&&e.documentElement.namespaceURI===Xa?e.createElement(t):e.createElementNS(n,t)}}function Yf(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Mc(t){var e=Or(t);return(e.local?Yf:Hf)(e)}function Uf(){}function so(t){return t==null?Uf:function(){return this.querySelector(t)}}function Vf(t){typeof t!="function"&&(t=so(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a=e[r],o=a.length,s=i[r]=new Array(o),l,u,d=0;d<o;++d)(l=a[d])&&(u=t.call(l,l.__data__,d,a))&&("__data__"in l&&(u.__data__=l.__data__),s[d]=u);return new xe(i,this._parents)}function Lc(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function jf(){return[]}function Dc(t){return t==null?jf:function(){return this.querySelectorAll(t)}}function Gf(t){return function(){return Lc(t.apply(this,arguments))}}function Wf(t){typeof t=="function"?t=Gf(t):t=Dc(t);for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var o=e[a],s=o.length,l,u=0;u<s;++u)(l=o[u])&&(i.push(t.call(l,l.__data__,u,o)),r.push(l));return new xe(i,r)}function Ic(t){return function(){return this.matches(t)}}function Nc(t){return function(e){return e.matches(t)}}var qf=Array.prototype.find;function Zf(t){return function(){return qf.call(this.children,t)}}function Kf(){return this.firstElementChild}function Qf(t){return this.select(t==null?Kf:Zf(typeof t=="function"?t:Nc(t)))}var Jf=Array.prototype.filter;function td(){return Array.from(this.children)}function ed(t){return function(){return Jf.call(this.children,t)}}function nd(t){return this.selectAll(t==null?td:ed(typeof t=="function"?t:Nc(t)))}function id(t){typeof t!="function"&&(t=Ic(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a=e[r],o=a.length,s=i[r]=[],l,u=0;u<o;++u)(l=a[u])&&t.call(l,l.__data__,u,a)&&s.push(l);return new xe(i,this._parents)}function Pc(t){return new Array(t.length)}function rd(){return new xe(this._enter||this._groups.map(Pc),this._parents)}function xr(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}xr.prototype={constructor:xr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ad(t){return function(){return t}}function od(t,e,n,i,r,a){for(var o=0,s,l=e.length,u=a.length;o<u;++o)(s=e[o])?(s.__data__=a[o],i[o]=s):n[o]=new xr(t,a[o]);for(;o<l;++o)(s=e[o])&&(r[o]=s)}function sd(t,e,n,i,r,a,o){var s,l,u=new Map,d=e.length,h=a.length,g=new Array(d),x;for(s=0;s<d;++s)(l=e[s])&&(g[s]=x=o.call(l,l.__data__,s,e)+"",u.has(x)?r[s]=l:u.set(x,l));for(s=0;s<h;++s)x=o.call(t,a[s],s,a)+"",(l=u.get(x))?(i[s]=l,l.__data__=a[s],u.delete(x)):n[s]=new xr(t,a[s]);for(s=0;s<d;++s)(l=e[s])&&u.get(g[s])===l&&(r[s]=l)}function cd(t){return t.__data__}function ld(t,e){if(!arguments.length)return Array.from(this,cd);var n=e?sd:od,i=this._parents,r=this._groups;typeof t!="function"&&(t=ad(t));for(var a=r.length,o=new Array(a),s=new Array(a),l=new Array(a),u=0;u<a;++u){var d=i[u],h=r[u],g=h.length,x=ud(t.call(d,d&&d.__data__,u,i)),_=x.length,T=s[u]=new Array(_),A=o[u]=new Array(_),$=l[u]=new Array(g);n(d,h,T,A,$,x,e);for(var S=0,M=0,k,P;S<_;++S)if(k=T[S]){for(S>=M&&(M=S+1);!(P=A[M])&&++M<_;);k._next=P||null}}return o=new xe(o,i),o._enter=s,o._exit=l,o}function ud(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function fd(){return new xe(this._exit||this._groups.map(Pc),this._parents)}function dd(t,e,n){var i=this.enter(),r=this,a=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?a.remove():n(a),i&&r?i.merge(r).order():r}function hd(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,a=i.length,o=Math.min(r,a),s=new Array(r),l=0;l<o;++l)for(var u=n[l],d=i[l],h=u.length,g=s[l]=new Array(h),x,_=0;_<h;++_)(x=u[_]||d[_])&&(g[_]=x);for(;l<r;++l)s[l]=n[l];return new xe(s,this._parents)}function gd(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,a=i[r],o;--r>=0;)(o=i[r])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function pd(t){t||(t=vd);function e(h,g){return h&&g?t(h.__data__,g.__data__):!h-!g}for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var o=n[a],s=o.length,l=r[a]=new Array(s),u,d=0;d<s;++d)(u=o[d])&&(l[d]=u);l.sort(e)}return new xe(r,this._parents).order()}function vd(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function xd(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function yd(){return Array.from(this)}function _d(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length;r<a;++r){var o=i[r];if(o)return o}return null}function md(){let t=0;for(const e of this)++t;return t}function bd(){return!this.node()}function Td(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],a=0,o=r.length,s;a<o;++a)(s=r[a])&&t.call(s,s.__data__,a,r);return this}function wd(t){return function(){this.removeAttribute(t)}}function $d(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ad(t,e){return function(){this.setAttribute(t,e)}}function Cd(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Sd(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function kd(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ed(t,e){var n=Or(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?$d:wd:typeof e=="function"?n.local?kd:Sd:n.local?Cd:Ad)(n,e))}function Oc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Rd(t){return function(){this.style.removeProperty(t)}}function Md(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ld(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Dd(t,e,n){return arguments.length>1?this.each((e==null?Rd:typeof e=="function"?Ld:Md)(t,e,n??"")):ei(this.node(),t)}function ei(t,e){return t.style.getPropertyValue(e)||Oc(t).getComputedStyle(t,null).getPropertyValue(e)}function Id(t){return function(){delete this[t]}}function Nd(t,e){return function(){this[t]=e}}function Pd(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Od(t,e){return arguments.length>1?this.each((e==null?Id:typeof e=="function"?Pd:Nd)(t,e)):this.node()[t]}function Fc(t){return t.trim().split(/^|\s+/)}function co(t){return t.classList||new Bc(t)}function Bc(t){this._node=t,this._names=Fc(t.getAttribute("class")||"")}Bc.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Xc(t,e){for(var n=co(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function zc(t,e){for(var n=co(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Fd(t){return function(){Xc(this,t)}}function Bd(t){return function(){zc(this,t)}}function Xd(t,e){return function(){(e.apply(this,arguments)?Xc:zc)(this,t)}}function zd(t,e){var n=Fc(t+"");if(arguments.length<2){for(var i=co(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Xd:e?Fd:Bd)(n,e))}function Hd(){this.textContent=""}function Yd(t){return function(){this.textContent=t}}function Ud(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Vd(t){return arguments.length?this.each(t==null?Hd:(typeof t=="function"?Ud:Yd)(t)):this.node().textContent}function jd(){this.innerHTML=""}function Gd(t){return function(){this.innerHTML=t}}function Wd(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function qd(t){return arguments.length?this.each(t==null?jd:(typeof t=="function"?Wd:Gd)(t)):this.node().innerHTML}function Zd(){this.nextSibling&&this.parentNode.appendChild(this)}function Kd(){return this.each(Zd)}function Qd(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jd(){return this.each(Qd)}function th(t){var e=typeof t=="function"?t:Mc(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function eh(){return null}function nh(t,e){var n=typeof t=="function"?t:Mc(t),i=e==null?eh:typeof e=="function"?e:so(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function ih(){var t=this.parentNode;t&&t.removeChild(this)}function rh(){return this.each(ih)}function ah(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oh(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function sh(t){return this.select(t?oh:ah)}function ch(t){return arguments.length?this.property("__data__",t):this.node().__data__}function lh(t){return function(e){t.call(this,e,this.__data__)}}function uh(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function fh(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,a;n<r;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++i]=a;++i?e.length=i:delete this.__on}}}function dh(t,e,n){return function(){var i=this.__on,r,a=lh(e);if(i){for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=e;return}}this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function hh(t,e,n){var i=uh(t+""),r,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,d;l<u;++l)for(r=0,d=s[l];r<a;++r)if((o=i[r]).type===d.type&&o.name===d.name)return d.value}return}for(s=e?dh:fh,r=0;r<a;++r)this.each(s(i[r],e,n));return this}function Hc(t,e,n){var i=Oc(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function gh(t,e){return function(){return Hc(this,t,e)}}function ph(t,e){return function(){return Hc(this,t,e.apply(this,arguments))}}function vh(t,e){return this.each((typeof e=="function"?ph:gh)(t,e))}function*xh(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length,o;r<a;++r)(o=i[r])&&(yield o)}var lo=[null];function xe(t,e){this._groups=t,this._parents=e}function li(){return new xe([[document.documentElement]],lo)}function yh(){return this}xe.prototype=li.prototype={constructor:xe,select:Vf,selectAll:Wf,selectChild:Qf,selectChildren:nd,filter:id,data:ld,enter:rd,exit:fd,join:dd,merge:hd,selection:yh,order:gd,sort:pd,call:xd,nodes:yd,node:_d,size:md,empty:bd,each:Td,attr:Ed,style:Dd,property:Od,classed:zd,text:Vd,html:qd,raise:Kd,lower:Jd,append:th,insert:nh,remove:rh,clone:sh,datum:ch,on:hh,dispatch:vh,[Symbol.iterator]:xh};function lt(t){return typeof t=="string"?new xe([[document.querySelector(t)]],[document.documentElement]):new xe([[t]],lo)}function _h(t){let e;for(;e=t.sourceEvent;)t=e;return t}function za(t,e){if(t=_h(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}function Yc(t){return typeof t=="string"?new xe([document.querySelectorAll(t)],[document.documentElement]):new xe([Lc(t)],lo)}const mh={passive:!1},Li={capture:!0,passive:!1};function pa(t){t.stopImmediatePropagation()}function Qn(t){t.preventDefault(),t.stopImmediatePropagation()}function bh(t){var e=t.document.documentElement,n=lt(t).on("dragstart.drag",Qn,Li);"onselectstart"in e?n.on("selectstart.drag",Qn,Li):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Th(t,e){var n=t.document.documentElement,i=lt(t).on("dragstart.drag",null);e&&(i.on("click.drag",Qn,Li),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ji=t=>()=>t;function Ha(t,{sourceEvent:e,subject:n,target:i,identifier:r,active:a,x:o,y:s,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Ha.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function wh(t){return!t.ctrlKey&&!t.button}function $h(){return this.parentNode}function Ah(t,e){return e??{x:t.x,y:t.y}}function Ch(){return navigator.maxTouchPoints||"ontouchstart"in this}function Sh(){var t=wh,e=$h,n=Ah,i=Ch,r={},a=oo("start","drag","end"),o=0,s,l,u,d,h=0;function g(k){k.on("mousedown.drag",x).filter(i).on("touchstart.drag",A).on("touchmove.drag",$,mh).on("touchend.drag touchcancel.drag",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(k,P){if(!(d||!t.call(this,k,P))){var D=M(this,e.call(this,k,P),k,P,"mouse");D&&(lt(k.view).on("mousemove.drag",_,Li).on("mouseup.drag",T,Li),bh(k.view),pa(k),u=!1,s=k.clientX,l=k.clientY,D("start",k))}}function _(k){if(Qn(k),!u){var P=k.clientX-s,D=k.clientY-l;u=P*P+D*D>h}r.mouse("drag",k)}function T(k){lt(k.view).on("mousemove.drag mouseup.drag",null),Th(k.view,u),Qn(k),r.mouse("end",k)}function A(k,P){if(t.call(this,k,P)){var D=k.changedTouches,p=e.call(this,k,P),j=D.length,U,G;for(U=0;U<j;++U)(G=M(this,p,k,P,D[U].identifier,D[U]))&&(pa(k),G("start",k,D[U]))}}function $(k){var P=k.changedTouches,D=P.length,p,j;for(p=0;p<D;++p)(j=r[P[p].identifier])&&(Qn(k),j("drag",k,P[p]))}function S(k){var P=k.changedTouches,D=P.length,p,j;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),p=0;p<D;++p)(j=r[P[p].identifier])&&(pa(k),j("end",k,P[p]))}function M(k,P,D,p,j,U){var G=a.copy(),X=za(U||D,P),Q,z,q;if((q=n.call(k,new Ha("beforestart",{sourceEvent:D,target:g,identifier:j,active:o,x:X[0],y:X[1],dx:0,dy:0,dispatch:G}),p))!=null)return Q=q.x-X[0]||0,z=q.y-X[1]||0,function Mt(it,K,ft){var rt=X,Lt;switch(it){case"start":r[j]=Mt,Lt=o++;break;case"end":delete r[j],--o;case"drag":X=za(ft||K,P),Lt=o;break}G.call(it,k,new Ha(it,{sourceEvent:K,subject:q,target:g,identifier:j,active:Lt,x:X[0]+Q,y:X[1]+z,dx:X[0]-rt[0],dy:X[1]-rt[1],dispatch:G}),p)}}return g.filter=function(k){return arguments.length?(t=typeof k=="function"?k:Ji(!!k),g):t},g.container=function(k){return arguments.length?(e=typeof k=="function"?k:Ji(k),g):e},g.subject=function(k){return arguments.length?(n=typeof k=="function"?k:Ji(k),g):n},g.touchable=function(k){return arguments.length?(i=typeof k=="function"?k:Ji(!!k),g):i},g.on=function(){var k=a.on.apply(a,arguments);return k===a?g:k},g.clickDistance=function(k){return arguments.length?(h=(k=+k)*k,g):Math.sqrt(h)},g}function uo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Uc(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Xi(){}var Di=.7,yr=1/Di,Jn="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ze="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kh=/^#([0-9a-f]{3,8})$/,Eh=new RegExp(`^rgb\\(${Jn},${Jn},${Jn}\\)$`),Rh=new RegExp(`^rgb\\(${Ze},${Ze},${Ze}\\)$`),Mh=new RegExp(`^rgba\\(${Jn},${Jn},${Jn},${Ii}\\)$`),Lh=new RegExp(`^rgba\\(${Ze},${Ze},${Ze},${Ii}\\)$`),Dh=new RegExp(`^hsl\\(${Ii},${Ze},${Ze}\\)$`),Ih=new RegExp(`^hsla\\(${Ii},${Ze},${Ze},${Ii}\\)$`),$s={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};uo(Xi,Dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:As,formatHex:As,formatHex8:Nh,formatHsl:Ph,formatRgb:Cs,toString:Cs});function As(){return this.rgb().formatHex()}function Nh(){return this.rgb().formatHex8()}function Ph(){return Vc(this).formatHsl()}function Cs(){return this.rgb().formatRgb()}function Dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=kh.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ss(e):n===3?new $e(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?tr(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?tr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Eh.exec(t))?new $e(e[1],e[2],e[3],1):(e=Rh.exec(t))?new $e(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Mh.exec(t))?tr(e[1],e[2],e[3],e[4]):(e=Lh.exec(t))?tr(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Dh.exec(t))?Rs(e[1],e[2]/100,e[3]/100,1):(e=Ih.exec(t))?Rs(e[1],e[2]/100,e[3]/100,e[4]):$s.hasOwnProperty(t)?Ss($s[t]):t==="transparent"?new $e(NaN,NaN,NaN,0):null}function Ss(t){return new $e(t>>16&255,t>>8&255,t&255,1)}function tr(t,e,n,i){return i<=0&&(t=e=n=NaN),new $e(t,e,n,i)}function Oh(t){return t instanceof Xi||(t=Dn(t)),t?(t=t.rgb(),new $e(t.r,t.g,t.b,t.opacity)):new $e}function Ya(t,e,n,i){return arguments.length===1?Oh(t):new $e(t,e,n,i??1)}function $e(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}uo($e,Ya,Uc(Xi,{brighter(t){return t=t==null?yr:Math.pow(yr,t),new $e(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new $e(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new $e(Ln(this.r),Ln(this.g),Ln(this.b),_r(this.opacity))},displayable(){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:ks,formatHex:ks,formatHex8:Fh,formatRgb:Es,toString:Es}));function ks(){return`#${Rn(this.r)}${Rn(this.g)}${Rn(this.b)}`}function Fh(){return`#${Rn(this.r)}${Rn(this.g)}${Rn(this.b)}${Rn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Es(){const t=_r(this.opacity);return`${t===1?"rgb(":"rgba("}${Ln(this.r)}, ${Ln(this.g)}, ${Ln(this.b)}${t===1?")":`, ${t})`}`}function _r(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ln(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Rn(t){return t=Ln(t),(t<16?"0":"")+t.toString(16)}function Rs(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Oe(t,e,n,i)}function Vc(t){if(t instanceof Oe)return new Oe(t.h,t.s,t.l,t.opacity);if(t instanceof Xi||(t=Dn(t)),!t)return new Oe;if(t instanceof Oe)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,l=(a+r)/2;return s?(e===a?o=(n-i)/s+(n<i)*6:n===a?o=(i-e)/s+2:o=(e-n)/s+4,s/=l<.5?a+r:2-a-r,o*=60):s=l>0&&l<1?0:o,new Oe(o,s,l,t.opacity)}function Bh(t,e,n,i){return arguments.length===1?Vc(t):new Oe(t,e,n,i??1)}function Oe(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}uo(Oe,Bh,Uc(Xi,{brighter(t){return t=t==null?yr:Math.pow(yr,t),new Oe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new Oe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new $e(va(t>=240?t-240:t+120,r,i),va(t,r,i),va(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Oe(Ms(this.h),er(this.s),er(this.l),_r(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_r(this.opacity);return`${t===1?"hsl(":"hsla("}${Ms(this.h)}, ${er(this.s)*100}%, ${er(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ms(t){return t=(t||0)%360,t<0?t+360:t}function er(t){return Math.max(0,Math.min(1,t||0))}function va(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const fo=t=>()=>t;function Xh(t,e){return function(n){return t+n*e}}function zh(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Hh(t){return(t=+t)==1?jc:function(e,n){return n-e?zh(e,n,t):fo(isNaN(e)?n:e)}}function jc(t,e){var n=e-t;return n?Xh(t,n):fo(isNaN(t)?e:t)}const mr=function t(e){var n=Hh(e);function i(r,a){var o=n((r=Ya(r)).r,(a=Ya(a)).r),s=n(r.g,a.g),l=n(r.b,a.b),u=jc(r.opacity,a.opacity);return function(d){return r.r=o(d),r.g=s(d),r.b=l(d),r.opacity=u(d),r+""}}return i.gamma=t,i}(1);function Yh(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(a){for(r=0;r<n;++r)i[r]=t[r]*(1-a)+e[r]*a;return i}}function Uh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Vh(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),a=new Array(n),o;for(o=0;o<i;++o)r[o]=zi(t[o],e[o]);for(;o<n;++o)a[o]=e[o];return function(s){for(o=0;o<i;++o)a[o]=r[o](s);return a}}function jh(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Pe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Gh(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=zi(t[r],e[r]):i[r]=e[r];return function(a){for(r in n)i[r]=n[r](a);return i}}var Ua=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xa=new RegExp(Ua.source,"g");function Wh(t){return function(){return t}}function qh(t){return function(e){return t(e)+""}}function Gc(t,e){var n=Ua.lastIndex=xa.lastIndex=0,i,r,a,o=-1,s=[],l=[];for(t=t+"",e=e+"";(i=Ua.exec(t))&&(r=xa.exec(e));)(a=r.index)>n&&(a=e.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:Pe(i,r)})),n=xa.lastIndex;return n<e.length&&(a=e.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?qh(l[0].x):Wh(e):(e=l.length,function(u){for(var d=0,h;d<e;++d)s[(h=l[d]).i]=h.x(u);return s.join("")})}function zi(t,e){var n=typeof e,i;return e==null||n==="boolean"?fo(e):(n==="number"?Pe:n==="string"?(i=Dn(e))?(e=i,mr):Gc:e instanceof Dn?mr:e instanceof Date?jh:Uh(e)?Yh:Array.isArray(e)?Vh:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Gh:Pe)(t,e)}function Zh(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ls=180/Math.PI,Va={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wc(t,e,n,i,r,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),t*i<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*Ls,skewX:Math.atan(l)*Ls,scaleX:o,scaleY:s}}var nr;function Kh(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Va:Wc(e.a,e.b,e.c,e.d,e.e,e.f)}function Qh(t){return t==null||(nr||(nr=document.createElementNS("http://www.w3.org/2000/svg","g")),nr.setAttribute("transform",t),!(t=nr.transform.baseVal.consolidate()))?Va:(t=t.matrix,Wc(t.a,t.b,t.c,t.d,t.e,t.f))}function qc(t,e,n,i){function r(u){return u.length?u.pop()+" ":""}function a(u,d,h,g,x,_){if(u!==h||d!==g){var T=x.push("translate(",null,e,null,n);_.push({i:T-4,x:Pe(u,h)},{i:T-2,x:Pe(d,g)})}else(h||g)&&x.push("translate("+h+e+g+n)}function o(u,d,h,g){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),g.push({i:h.push(r(h)+"rotate(",null,i)-2,x:Pe(u,d)})):d&&h.push(r(h)+"rotate("+d+i)}function s(u,d,h,g){u!==d?g.push({i:h.push(r(h)+"skewX(",null,i)-2,x:Pe(u,d)}):d&&h.push(r(h)+"skewX("+d+i)}function l(u,d,h,g,x,_){if(u!==h||d!==g){var T=x.push(r(x)+"scale(",null,",",null,")");_.push({i:T-4,x:Pe(u,h)},{i:T-2,x:Pe(d,g)})}else(h!==1||g!==1)&&x.push(r(x)+"scale("+h+","+g+")")}return function(u,d){var h=[],g=[];return u=t(u),d=t(d),a(u.translateX,u.translateY,d.translateX,d.translateY,h,g),o(u.rotate,d.rotate,h,g),s(u.skewX,d.skewX,h,g),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,h,g),u=d=null,function(x){for(var _=-1,T=g.length,A;++_<T;)h[(A=g[_]).i]=A.x(x);return h.join("")}}}var Jh=qc(Kh,"px, ","px)","deg)"),tg=qc(Qh,", ",")",")"),ni=0,Ei=0,Ti=0,Zc=1e3,br,Ri,Tr=0,In=0,Fr=0,Ni=typeof performance=="object"&&performance.now?performance:Date,Kc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ho(){return In||(Kc(eg),In=Ni.now()+Fr)}function eg(){In=0}function wr(){this._call=this._time=this._next=null}wr.prototype=Qc.prototype={constructor:wr,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ho():+n)+(e==null?0:+e),!this._next&&Ri!==this&&(Ri?Ri._next=this:br=this,Ri=this),this._call=t,this._time=n,ja()},stop:function(){this._call&&(this._call=null,this._time=1/0,ja())}};function Qc(t,e,n){var i=new wr;return i.restart(t,e,n),i}function ng(){ho(),++ni;for(var t=br,e;t;)(e=In-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ni}function Ds(){In=(Tr=Ni.now())+Fr,ni=Ei=0;try{ng()}finally{ni=0,rg(),In=0}}function ig(){var t=Ni.now(),e=t-Tr;e>Zc&&(Fr-=e,Tr=t)}function rg(){for(var t,e=br,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:br=n);Ri=t,ja(i)}function ja(t){if(!ni){Ei&&(Ei=clearTimeout(Ei));var e=t-In;e>24?(t<1/0&&(Ei=setTimeout(Ds,t-Ni.now()-Fr)),Ti&&(Ti=clearInterval(Ti))):(Ti||(Tr=Ni.now(),Ti=setInterval(ig,Zc)),ni=1,Kc(Ds))}}function Is(t,e,n){var i=new wr;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var ag=oo("start","end","cancel","interrupt"),og=[],Jc=0,Ns=1,Ga=2,fr=3,Ps=4,Wa=5,dr=6;function Br(t,e,n,i,r,a){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;sg(t,n,{name:e,index:i,group:r,on:ag,tween:og,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Jc})}function go(t,e){var n=Be(t,e);if(n.state>Jc)throw new Error("too late; already scheduled");return n}function Je(t,e){var n=Be(t,e);if(n.state>fr)throw new Error("too late; already running");return n}function Be(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function sg(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=Qc(a,0,n.time);function a(u){n.state=Ns,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var d,h,g,x;if(n.state!==Ns)return l();for(d in i)if(x=i[d],x.name===n.name){if(x.state===fr)return Is(o);x.state===Ps?(x.state=dr,x.timer.stop(),x.on.call("interrupt",t,t.__data__,x.index,x.group),delete i[d]):+d<e&&(x.state=dr,x.timer.stop(),x.on.call("cancel",t,t.__data__,x.index,x.group),delete i[d])}if(Is(function(){n.state===fr&&(n.state=Ps,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Ga,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ga){for(n.state=fr,r=new Array(g=n.tween.length),d=0,h=-1;d<g;++d)(x=n.tween[d].value.call(t,t.__data__,n.index,n.group))&&(r[++h]=x);r.length=h+1}}function s(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Wa,1),h=-1,g=r.length;++h<g;)r[h].call(t,d);n.state===Wa&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=dr,n.timer.stop(),delete i[e];for(var u in i)return;delete t.__transition}}function cg(t,e){var n=t.__transition,i,r,a=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((i=n[o]).name!==e){a=!1;continue}r=i.state>Ga&&i.state<Wa,i.state=dr,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[o]}a&&delete t.__transition}}function lg(t){return this.each(function(){cg(this,t)})}function ug(t,e){var n,i;return function(){var r=Je(this,t),a=r.tween;if(a!==n){i=n=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}r.tween=i}}function fg(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var a=Je(this,t),o=a.tween;if(o!==i){r=(i=o).slice();for(var s={name:e,value:n},l=0,u=r.length;l<u;++l)if(r[l].name===e){r[l]=s;break}l===u&&r.push(s)}a.tween=r}}function dg(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=Be(this.node(),n).tween,r=0,a=i.length,o;r<a;++r)if((o=i[r]).name===t)return o.value;return null}return this.each((e==null?ug:fg)(n,t,e))}function po(t,e,n){var i=t._id;return t.each(function(){var r=Je(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return Be(r,i).value[e]}}function tl(t,e){var n;return(typeof e=="number"?Pe:e instanceof Dn?mr:(n=Dn(e))?(e=n,mr):Gc)(t,e)}function hg(t){return function(){this.removeAttribute(t)}}function gg(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pg(t,e,n){var i,r=n+"",a;return function(){var o=this.getAttribute(t);return o===r?null:o===i?a:a=e(i=o,n)}}function vg(t,e,n){var i,r=n+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===r?null:o===i?a:a=e(i=o,n)}}function xg(t,e,n){var i,r,a;return function(){var o,s=n(this),l;return s==null?void this.removeAttribute(t):(o=this.getAttribute(t),l=s+"",o===l?null:o===i&&l===r?a:(r=l,a=e(i=o,s)))}}function yg(t,e,n){var i,r,a;return function(){var o,s=n(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),l=s+"",o===l?null:o===i&&l===r?a:(r=l,a=e(i=o,s)))}}function _g(t,e){var n=Or(t),i=n==="transform"?tg:tl;return this.attrTween(t,typeof e=="function"?(n.local?yg:xg)(n,i,po(this,"attr."+t,e)):e==null?(n.local?gg:hg)(n):(n.local?vg:pg)(n,i,e))}function mg(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function bg(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Tg(t,e){var n,i;function r(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&bg(t,a)),n}return r._value=e,r}function wg(t,e){var n,i;function r(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&mg(t,a)),n}return r._value=e,r}function $g(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=Or(t);return this.tween(n,(i.local?Tg:wg)(i,e))}function Ag(t,e){return function(){go(this,t).delay=+e.apply(this,arguments)}}function Cg(t,e){return e=+e,function(){go(this,t).delay=e}}function Sg(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ag:Cg)(e,t)):Be(this.node(),e).delay}function kg(t,e){return function(){Je(this,t).duration=+e.apply(this,arguments)}}function Eg(t,e){return e=+e,function(){Je(this,t).duration=e}}function Rg(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?kg:Eg)(e,t)):Be(this.node(),e).duration}function Mg(t,e){if(typeof e!="function")throw new Error;return function(){Je(this,t).ease=e}}function Lg(t){var e=this._id;return arguments.length?this.each(Mg(e,t)):Be(this.node(),e).ease}function Dg(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Je(this,t).ease=n}}function Ig(t){if(typeof t!="function")throw new Error;return this.each(Dg(this._id,t))}function Ng(t){typeof t!="function"&&(t=Ic(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a=e[r],o=a.length,s=i[r]=[],l,u=0;u<o;++u)(l=a[u])&&t.call(l,l.__data__,u,a)&&s.push(l);return new ln(i,this._parents,this._name,this._id)}function Pg(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=new Array(i),s=0;s<a;++s)for(var l=e[s],u=n[s],d=l.length,h=o[s]=new Array(d),g,x=0;x<d;++x)(g=l[x]||u[x])&&(h[x]=g);for(;s<i;++s)o[s]=e[s];return new ln(o,this._parents,this._name,this._id)}function Og(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Fg(t,e,n){var i,r,a=Og(e)?go:Je;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}function Bg(t,e){var n=this._id;return arguments.length<2?Be(this.node(),n).on.on(t):this.each(Fg(n,t,e))}function Xg(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function zg(){return this.on("end.remove",Xg(this._id))}function Hg(t){var e=this._name,n=this._id;typeof t!="function"&&(t=so(t));for(var i=this._groups,r=i.length,a=new Array(r),o=0;o<r;++o)for(var s=i[o],l=s.length,u=a[o]=new Array(l),d,h,g=0;g<l;++g)(d=s[g])&&(h=t.call(d,d.__data__,g,s))&&("__data__"in d&&(h.__data__=d.__data__),u[g]=h,Br(u[g],e,n,g,u,Be(d,n)));return new ln(a,this._parents,e,n)}function Yg(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Dc(t));for(var i=this._groups,r=i.length,a=[],o=[],s=0;s<r;++s)for(var l=i[s],u=l.length,d,h=0;h<u;++h)if(d=l[h]){for(var g=t.call(d,d.__data__,h,l),x,_=Be(d,n),T=0,A=g.length;T<A;++T)(x=g[T])&&Br(x,e,n,T,g,_);a.push(g),o.push(d)}return new ln(a,o,e,n)}var Ug=li.prototype.constructor;function Vg(){return new Ug(this._groups,this._parents)}function jg(t,e){var n,i,r;return function(){var a=ei(this,t),o=(this.style.removeProperty(t),ei(this,t));return a===o?null:a===n&&o===i?r:r=e(n=a,i=o)}}function el(t){return function(){this.style.removeProperty(t)}}function Gg(t,e,n){var i,r=n+"",a;return function(){var o=ei(this,t);return o===r?null:o===i?a:a=e(i=o,n)}}function Wg(t,e,n){var i,r,a;return function(){var o=ei(this,t),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),ei(this,t))),o===l?null:o===i&&l===r?a:(r=l,a=e(i=o,s))}}function qg(t,e){var n,i,r,a="style."+e,o="end."+a,s;return function(){var l=Je(this,t),u=l.on,d=l.value[a]==null?s||(s=el(e)):void 0;(u!==n||r!==d)&&(i=(n=u).copy()).on(o,r=d),l.on=i}}function Zg(t,e,n){var i=(t+="")=="transform"?Jh:tl;return e==null?this.styleTween(t,jg(t,i)).on("end.style."+t,el(t)):typeof e=="function"?this.styleTween(t,Wg(t,i,po(this,"style."+t,e))).each(qg(this._id,t)):this.styleTween(t,Gg(t,i,e),n).on("end.style."+t,null)}function Kg(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Qg(t,e,n){var i,r;function a(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&Kg(t,o,n)),i}return a._value=e,a}function Jg(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Qg(t,e,n??""))}function tp(t){return function(){this.textContent=t}}function ep(t){return function(){var e=t(this);this.textContent=e??""}}function np(t){return this.tween("text",typeof t=="function"?ep(po(this,"text",t)):tp(t==null?"":t+""))}function ip(t){return function(e){this.textContent=t.call(this,e)}}function rp(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&ip(r)),e}return i._value=t,i}function ap(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,rp(t))}function op(){for(var t=this._name,e=this._id,n=il(),i=this._groups,r=i.length,a=0;a<r;++a)for(var o=i[a],s=o.length,l,u=0;u<s;++u)if(l=o[u]){var d=Be(l,e);Br(l,t,n,u,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ln(i,this._parents,t,n)}function sp(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(a,o){var s={value:o},l={value:function(){--r===0&&a()}};n.each(function(){var u=Je(this,i),d=u.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),u.on=e}),r===0&&a()})}var cp=0;function ln(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function nl(t){return li().transition(t)}function il(){return++cp}var an=li.prototype;ln.prototype=nl.prototype={constructor:ln,select:Hg,selectAll:Yg,selectChild:an.selectChild,selectChildren:an.selectChildren,filter:Ng,merge:Pg,selection:Vg,transition:op,call:an.call,nodes:an.nodes,node:an.node,size:an.size,empty:an.empty,each:an.each,on:Bg,attr:_g,attrTween:$g,style:Zg,styleTween:Jg,text:np,textTween:ap,remove:zg,tween:dg,delay:Sg,duration:Rg,ease:Lg,easeVarying:Ig,end:sp,[Symbol.iterator]:an[Symbol.iterator]};const lp=t=>+t;function up(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var fp={time:null,delay:0,duration:250,ease:up};function dp(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function hp(t){var e,n;t instanceof ln?(e=t._id,t=t._name):(e=il(),(n=fp).time=ho(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var o=i[a],s=o.length,l,u=0;u<s;++u)(l=o[u])&&Br(l,t,e,u,o,n||dp(l,e));return new ln(i,this._parents,t,e)}li.prototype.interrupt=lg;li.prototype.transition=hp;function gp(t){var e=t.__brush;return e?e.dim.output(e.selection):null}const qa=Math.PI,Za=2*qa,kn=1e-6,pp=Za-kn;function rl(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function vp(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return rl;const n=10**e;return function(i){this._+=i[0];for(let r=1,a=i.length;r<a;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class xp{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?rl:vp(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,a,o){this._append`C${+e},${+n},${+i},${+r},${this._x1=+a},${this._y1=+o}`}arcTo(e,n,i,r,a){if(e=+e,n=+n,i=+i,r=+r,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=i-e,u=r-n,d=o-e,h=s-n,g=d*d+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(g>kn)if(!(Math.abs(h*l-u*d)>kn)||!a)this._append`L${this._x1=e},${this._y1=n}`;else{let x=i-o,_=r-s,T=l*l+u*u,A=x*x+_*_,$=Math.sqrt(T),S=Math.sqrt(g),M=a*Math.tan((qa-Math.acos((T+g-A)/(2*$*S)))/2),k=M/S,P=M/$;Math.abs(k-1)>kn&&this._append`L${e+k*d},${n+k*h}`,this._append`A${a},${a},0,0,${+(h*x>d*_)},${this._x1=e+P*l},${this._y1=n+P*u}`}}arc(e,n,i,r,a,o){if(e=+e,n=+n,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(r),l=i*Math.sin(r),u=e+s,d=n+l,h=1^o,g=o?r-a:a-r;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>kn||Math.abs(this._y1-d)>kn)&&this._append`L${u},${d}`,i&&(g<0&&(g=g%Za+Za),g>pp?this._append`A${i},${i},0,1,${h},${e-s},${n-l}A${i},${i},0,1,${h},${this._x1=u},${this._y1=d}`:g>kn&&this._append`A${i},${i},0,${+(g>=qa)},${h},${this._x1=e+i*Math.cos(a)},${this._y1=n+i*Math.sin(a)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}var Os={},ya={},_a=34,wi=10,ma=13;function al(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function yp(t,e){var n=al(t);return function(i,r){return e(n(i),r,t)}}function Fs(t){var e=Object.create(null),n=[];return t.forEach(function(i){for(var r in i)r in e||n.push(e[r]=r)}),n}function Te(t,e){var n=t+"",i=n.length;return i<e?new Array(e-i+1).join(0)+n:n}function _p(t){return t<0?"-"+Te(-t,6):t>9999?"+"+Te(t,6):Te(t,4)}function mp(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),i=t.getUTCSeconds(),r=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":_p(t.getUTCFullYear())+"-"+Te(t.getUTCMonth()+1,2)+"-"+Te(t.getUTCDate(),2)+(r?"T"+Te(e,2)+":"+Te(n,2)+":"+Te(i,2)+"."+Te(r,3)+"Z":i?"T"+Te(e,2)+":"+Te(n,2)+":"+Te(i,2)+"Z":n||e?"T"+Te(e,2)+":"+Te(n,2)+"Z":"")}function ol(t){var e=new RegExp('["'+t+`
\r]`),n=t.charCodeAt(0);function i(h,g){var x,_,T=r(h,function(A,$){if(x)return x(A,$-1);_=A,x=g?yp(A,g):al(A)});return T.columns=_||[],T}function r(h,g){var x=[],_=h.length,T=0,A=0,$,S=_<=0,M=!1;h.charCodeAt(_-1)===wi&&--_,h.charCodeAt(_-1)===ma&&--_;function k(){if(S)return ya;if(M)return M=!1,Os;var D,p=T,j;if(h.charCodeAt(p)===_a){for(;T++<_&&h.charCodeAt(T)!==_a||h.charCodeAt(++T)===_a;);return(D=T)>=_?S=!0:(j=h.charCodeAt(T++))===wi?M=!0:j===ma&&(M=!0,h.charCodeAt(T)===wi&&++T),h.slice(p+1,D-1).replace(/""/g,'"')}for(;T<_;){if((j=h.charCodeAt(D=T++))===wi)M=!0;else if(j===ma)M=!0,h.charCodeAt(T)===wi&&++T;else if(j!==n)continue;return h.slice(p,D)}return S=!0,h.slice(p,_)}for(;($=k())!==ya;){for(var P=[];$!==Os&&$!==ya;)P.push($),$=k();g&&(P=g(P,A++))==null||x.push(P)}return x}function a(h,g){return h.map(function(x){return g.map(function(_){return d(x[_])}).join(t)})}function o(h,g){return g==null&&(g=Fs(h)),[g.map(d).join(t)].concat(a(h,g)).join(`
`)}function s(h,g){return g==null&&(g=Fs(h)),a(h,g).join(`
`)}function l(h){return h.map(u).join(`
`)}function u(h){return h.map(d).join(t)}function d(h){return h==null?"":h instanceof Date?mp(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:i,parseRows:r,format:o,formatBody:s,formatRows:l,formatRow:u,formatValue:d}}var sl=ol(","),bp=sl.parse,Tp=sl.parseRows,cl=ol(" "),wp=cl.parse,$p=cl.parseRows;function Ap(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function $r(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function ii(t){return t=$r(Math.abs(t)),t?t[1]:NaN}function Cp(t,e){return function(n,i){for(var r=n.length,a=[],o=0,s=t[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(n.substring(r-=s,r+s)),!((l+=s+1)>i));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Sp(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var kp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pi(t){if(!(e=kp.exec(t)))throw new Error("invalid format: "+t);var e;return new vo({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Pi.prototype=vo.prototype;function vo(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}vo.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 Ep(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var ll;function Rp(t,e){var n=$r(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(ll=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+$r(t,Math.max(0,e+a-1))[0]}function Bs(t,e){var n=$r(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Xs={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Ap,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Bs(t*100,e),r:Bs,s:Rp,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zs(t){return t}var Hs=Array.prototype.map,Ys=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Mp(t){var e=t.grouping===void 0||t.thousands===void 0?zs:Cp(Hs.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?zs:Sp(Hs.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(h){h=Pi(h);var g=h.fill,x=h.align,_=h.sign,T=h.symbol,A=h.zero,$=h.width,S=h.comma,M=h.precision,k=h.trim,P=h.type;P==="n"?(S=!0,P="g"):Xs[P]||(M===void 0&&(M=12),k=!0,P="g"),(A||g==="0"&&x==="=")&&(A=!0,g="0",x="=");var D=T==="$"?n:T==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",p=T==="$"?i:/[%p]/.test(P)?o:"",j=Xs[P],U=/[defgprs%]/.test(P);M=M===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function G(X){var Q=D,z=p,q,Mt,it;if(P==="c")z=j(X)+z,X="";else{X=+X;var K=X<0||1/X<0;if(X=isNaN(X)?l:j(Math.abs(X),M),k&&(X=Ep(X)),K&&+X==0&&_!=="+"&&(K=!1),Q=(K?_==="("?_:s:_==="-"||_==="("?"":_)+Q,z=(P==="s"?Ys[8+ll/3]:"")+z+(K&&_==="("?")":""),U){for(q=-1,Mt=X.length;++q<Mt;)if(it=X.charCodeAt(q),48>it||it>57){z=(it===46?r+X.slice(q+1):X.slice(q))+z,X=X.slice(0,q);break}}}S&&!A&&(X=e(X,1/0));var ft=Q.length+X.length+z.length,rt=ft<$?new Array($-ft+1).join(g):"";switch(S&&A&&(X=e(rt+X,rt.length?$-z.length:1/0),rt=""),x){case"<":X=Q+X+z+rt;break;case"=":X=Q+rt+X+z;break;case"^":X=rt.slice(0,ft=rt.length>>1)+Q+X+z+rt.slice(ft);break;default:X=rt+Q+X+z;break}return a(X)}return G.toString=function(){return h+""},G}function d(h,g){var x=u((h=Pi(h),h.type="f",h)),_=Math.max(-8,Math.min(8,Math.floor(ii(g)/3)))*3,T=Math.pow(10,-_),A=Ys[8+_/3];return function($){return x(T*$)+A}}return{format:u,formatPrefix:d}}var ir,Oi,ul;Lp({thousands:",",grouping:[3],currency:["$",""]});function Lp(t){return ir=Mp(t),Oi=ir.format,ul=ir.formatPrefix,ir}function Dp(t){return Math.max(0,-ii(Math.abs(t)))}function Ip(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ii(e)/3)))*3-ii(Math.abs(t)))}function Np(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ii(e)-ii(t))+1}function ui(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Us=Symbol("implicit");function fl(){var t=new ys,e=[],n=[],i=Us;function r(a){let o=t.get(a);if(o===void 0){if(i!==Us)return i;t.set(a,o=e.push(a)-1)}return n[o%n.length]}return r.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new ys;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return r},r.range=function(a){return arguments.length?(n=Array.from(a),r):n.slice()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return fl(e,n).unknown(i)},ui.apply(r,arguments),r}function Pp(t){return function(){return t}}function Op(t){return+t}var Vs=[0,1];function qn(t){return t}function Ka(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Pp(isNaN(e)?NaN:.5)}function Fp(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function Bp(t,e,n){var i=t[0],r=t[1],a=e[0],o=e[1];return r<i?(i=Ka(r,i),a=n(o,a)):(i=Ka(i,r),a=n(a,o)),function(s){return a(i(s))}}function Xp(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),a=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=Ka(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(s){var l=$f(t,s,1,i)-1;return a[l](r[l](s))}}function Xr(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function xo(){var t=Vs,e=Vs,n=zi,i,r,a,o=qn,s,l,u;function d(){var g=Math.min(t.length,e.length);return o!==qn&&(o=Fp(t[0],t[g-1])),s=g>2?Xp:Bp,l=u=null,h}function h(g){return g==null||isNaN(g=+g)?a:(l||(l=s(t.map(i),e,n)))(i(o(g)))}return h.invert=function(g){return o(r((u||(u=s(e,t.map(i),Pe)))(g)))},h.domain=function(g){return arguments.length?(t=Array.from(g,Op),d()):t.slice()},h.range=function(g){return arguments.length?(e=Array.from(g),d()):e.slice()},h.rangeRound=function(g){return e=Array.from(g),n=Zh,d()},h.clamp=function(g){return arguments.length?(o=g?!0:qn,d()):o!==qn},h.interpolate=function(g){return arguments.length?(n=g,d()):n},h.unknown=function(g){return arguments.length?(a=g,h):a},function(g,x){return i=g,r=x,d()}}function dl(){return xo()(qn,qn)}function zp(t,e,n,i){var r=Fa(t,e,n),a;switch(i=Pi(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(a=Ip(r,o))&&(i.precision=a),ul(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Np(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Dp(r))&&(i.precision=a-(i.type==="%")*2);break}}return Oi(i)}function hl(t){var e=t.domain;return t.ticks=function(n){var i=e();return Pa(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return zp(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,a=i.length-1,o=i[r],s=i[a],l,u,d=10;for(s<o&&(u=o,o=s,s=u,u=r,r=a,a=u);d-- >0;){if(u=Oa(o,s,n),u===l)return i[r]=o,i[a]=s,e(i);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function Ar(){var t=dl();return t.copy=function(){return Xr(t,Ar())},ui.apply(t,arguments),hl(t)}function gl(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],a=t[i],o;return a<r&&(o=n,n=i,i=o,o=r,r=a,a=o),t[n]=e.floor(r),t[i]=e.ceil(a),t}function js(t){return Math.log(t)}function Gs(t){return Math.exp(t)}function Hp(t){return-Math.log(-t)}function Yp(t){return-Math.exp(-t)}function Up(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Vp(t){return t===10?Up:t===Math.E?Math.exp:e=>Math.pow(t,e)}function jp(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Ws(t){return(e,n)=>-t(-e,n)}function Gp(t){const e=t(js,Gs),n=e.domain;let i=10,r,a;function o(){return r=jp(i),a=Vp(i),n()[0]<0?(r=Ws(r),a=Ws(a),t(Hp,Yp)):t(js,Gs),e}return e.base=function(s){return arguments.length?(i=+s,o()):i},e.domain=function(s){return arguments.length?(n(s),o()):n()},e.ticks=s=>{const l=n();let u=l[0],d=l[l.length-1];const h=d<u;h&&([u,d]=[d,u]);let g=r(u),x=r(d),_,T;const A=s==null?10:+s;let $=[];if(!(i%1)&&x-g<A){if(g=Math.floor(g),x=Math.ceil(x),u>0){for(;g<=x;++g)for(_=1;_<i;++_)if(T=g<0?_/a(-g):_*a(g),!(T<u)){if(T>d)break;$.push(T)}}else for(;g<=x;++g)for(_=i-1;_>=1;--_)if(T=g>0?_/a(-g):_*a(g),!(T<u)){if(T>d)break;$.push(T)}$.length*2<A&&($=Pa(u,d,A))}else $=Pa(g,x,Math.min(x-g,A)).map(a);return h?$.reverse():$},e.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Pi(l)).precision==null&&(l.trim=!0),l=Oi(l)),s===1/0)return l;const u=Math.max(1,i*s/e.ticks().length);return d=>{let h=d/a(Math.round(r(d)));return h*i<i-.5&&(h*=i),h<=u?l(d):""}},e.nice=()=>n(gl(n(),{floor:s=>a(Math.floor(r(s))),ceil:s=>a(Math.ceil(r(s)))})),e}function pl(){const t=Gp(xo()).domain([1,10]);return t.copy=()=>Xr(t,pl()).base(t.base()),ui.apply(t,arguments),t}function qs(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Zs(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Wp(t){var e=1,n=t(qs(e),Zs(e));return n.constant=function(i){return arguments.length?t(qs(e=+i),Zs(e)):e},hl(n)}function vl(){var t=Wp(xo());return t.copy=function(){return Xr(t,vl()).constant(t.constant())},ui.apply(t,arguments)}const ba=new Date,Ta=new Date;function Jt(t,e,n,i){function r(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(t(a=new Date(+a)),a),r.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),r.round=a=>{const o=r(a),s=r.ceil(a);return a-o<s-a?o:s},r.offset=(a,o)=>(e(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,s)=>{const l=[];if(a=r.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let u;do l.push(u=new Date(+a)),e(a,s),t(a);while(u<a&&a<o);return l},r.filter=a=>Jt(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!a(o););else for(;--s>=0;)for(;e(o,1),!a(o););}),n&&(r.count=(a,o)=>(ba.setTime(+a),Ta.setTime(+o),t(ba),t(Ta),Math.floor(n(ba,Ta))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const Cr=Jt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Cr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Jt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Cr);Cr.range;const on=1e3,Re=on*60,sn=Re*60,un=sn*24,yo=un*7,Ks=un*30,wa=un*365,Mn=Jt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCSeconds());Mn.range;const _o=Jt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*on)},(t,e)=>{t.setTime(+t+e*Re)},(t,e)=>(e-t)/Re,t=>t.getMinutes());_o.range;const mo=Jt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Re)},(t,e)=>(e-t)/Re,t=>t.getUTCMinutes());mo.range;const bo=Jt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*on-t.getMinutes()*Re)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getHours());bo.range;const To=Jt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getUTCHours());To.range;const Hi=Jt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Re)/un,t=>t.getDate()-1);Hi.range;const zr=Jt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/un,t=>t.getUTCDate()-1);zr.range;const xl=Jt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/un,t=>Math.floor(t/un));xl.range;function Pn(t){return Jt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Re)/yo)}const Hr=Pn(0),Sr=Pn(1),qp=Pn(2),Zp=Pn(3),ri=Pn(4),Kp=Pn(5),Qp=Pn(6);Hr.range;Sr.range;qp.range;Zp.range;ri.range;Kp.range;Qp.range;function On(t){return Jt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/yo)}const Yr=On(0),kr=On(1),Jp=On(2),tv=On(3),ai=On(4),ev=On(5),nv=On(6);Yr.range;kr.range;Jp.range;tv.range;ai.range;ev.range;nv.range;const wo=Jt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());wo.range;const $o=Jt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());$o.range;const fn=Jt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());fn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Jt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});fn.range;const dn=Jt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());dn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Jt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});dn.range;function yl(t,e,n,i,r,a){const o=[[Mn,1,on],[Mn,5,5*on],[Mn,15,15*on],[Mn,30,30*on],[a,1,Re],[a,5,5*Re],[a,15,15*Re],[a,30,30*Re],[r,1,sn],[r,3,3*sn],[r,6,6*sn],[r,12,12*sn],[i,1,un],[i,2,2*un],[n,1,yo],[e,1,Ks],[e,3,3*Ks],[t,1,wa]];function s(u,d,h){const g=d<u;g&&([u,d]=[d,u]);const x=h&&typeof h.range=="function"?h:l(u,d,h),_=x?x.range(u,+d+1):[];return g?_.reverse():_}function l(u,d,h){const g=Math.abs(d-u)/h,x=ao(([,,A])=>A).right(o,g);if(x===o.length)return t.every(Fa(u/wa,d/wa,h));if(x===0)return Cr.every(Math.max(Fa(u,d,h),1));const[_,T]=o[g/o[x-1][2]<o[x][2]/g?x-1:x];return _.every(T)}return[s,l]}const[iv,rv]=yl(dn,$o,Yr,xl,To,mo),[av,ov]=yl(fn,wo,Hr,Hi,bo,_o);function $a(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Aa(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $i(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function sv(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,a=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,u=Ai(r),d=Ci(r),h=Ai(a),g=Ci(a),x=Ai(o),_=Ci(o),T=Ai(s),A=Ci(s),$=Ai(l),S=Ci(l),M={a:K,A:ft,b:rt,B:Lt,c:null,d:ic,e:ic,f:Rv,g:Xv,G:Hv,H:Sv,I:kv,j:Ev,L:_l,m:Mv,M:Lv,p:Ht,q:ie,Q:oc,s:sc,S:Dv,u:Iv,U:Nv,V:Pv,w:Ov,W:Fv,x:null,X:null,y:Bv,Y:zv,Z:Yv,"%":ac},k={a:le,A:Tt,b:Ut,B:ge,c:null,d:rc,e:rc,f:Gv,g:ix,G:ax,H:Uv,I:Vv,j:jv,L:bl,m:Wv,M:qv,p:re,q:tn,Q:oc,s:sc,S:Zv,u:Kv,U:Qv,V:Jv,w:tx,W:ex,x:null,X:null,y:nx,Y:rx,Z:ox,"%":ac},P={a:G,A:X,b:Q,B:z,c:q,d:ec,e:ec,f:wv,g:tc,G:Js,H:nc,I:nc,j:_v,L:Tv,m:yv,M:mv,p:U,q:xv,Q:Av,s:Cv,S:bv,u:dv,U:hv,V:gv,w:fv,W:pv,x:Mt,X:it,y:tc,Y:Js,Z:vv,"%":$v};M.x=D(n,M),M.X=D(i,M),M.c=D(e,M),k.x=D(n,k),k.X=D(i,k),k.c=D(e,k);function D(J,ot){return function(vt){var V=[],Zt=-1,St=0,ae=J.length,oe,Ae,Ce;for(vt instanceof Date||(vt=new Date(+vt));++Zt<ae;)J.charCodeAt(Zt)===37&&(V.push(J.slice(St,Zt)),(Ae=Qs[oe=J.charAt(++Zt)])!=null?oe=J.charAt(++Zt):Ae=oe==="e"?" ":"0",(Ce=ot[oe])&&(oe=Ce(vt,Ae)),V.push(oe),St=Zt+1);return V.push(J.slice(St,Zt)),V.join("")}}function p(J,ot){return function(vt){var V=$i(1900,void 0,1),Zt=j(V,J,vt+="",0),St,ae;if(Zt!=vt.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(ot&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(St=Aa($i(V.y,0,1)),ae=St.getUTCDay(),St=ae>4||ae===0?kr.ceil(St):kr(St),St=zr.offset(St,(V.V-1)*7),V.y=St.getUTCFullYear(),V.m=St.getUTCMonth(),V.d=St.getUTCDate()+(V.w+6)%7):(St=$a($i(V.y,0,1)),ae=St.getDay(),St=ae>4||ae===0?Sr.ceil(St):Sr(St),St=Hi.offset(St,(V.V-1)*7),V.y=St.getFullYear(),V.m=St.getMonth(),V.d=St.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),ae="Z"in V?Aa($i(V.y,0,1)).getUTCDay():$a($i(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(ae+5)%7:V.w+V.U*7-(ae+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Aa(V)):$a(V)}}function j(J,ot,vt,V){for(var Zt=0,St=ot.length,ae=vt.length,oe,Ae;Zt<St;){if(V>=ae)return-1;if(oe=ot.charCodeAt(Zt++),oe===37){if(oe=ot.charAt(Zt++),Ae=P[oe in Qs?ot.charAt(Zt++):oe],!Ae||(V=Ae(J,vt,V))<0)return-1}else if(oe!=vt.charCodeAt(V++))return-1}return V}function U(J,ot,vt){var V=u.exec(ot.slice(vt));return V?(J.p=d.get(V[0].toLowerCase()),vt+V[0].length):-1}function G(J,ot,vt){var V=x.exec(ot.slice(vt));return V?(J.w=_.get(V[0].toLowerCase()),vt+V[0].length):-1}function X(J,ot,vt){var V=h.exec(ot.slice(vt));return V?(J.w=g.get(V[0].toLowerCase()),vt+V[0].length):-1}function Q(J,ot,vt){var V=$.exec(ot.slice(vt));return V?(J.m=S.get(V[0].toLowerCase()),vt+V[0].length):-1}function z(J,ot,vt){var V=T.exec(ot.slice(vt));return V?(J.m=A.get(V[0].toLowerCase()),vt+V[0].length):-1}function q(J,ot,vt){return j(J,e,ot,vt)}function Mt(J,ot,vt){return j(J,n,ot,vt)}function it(J,ot,vt){return j(J,i,ot,vt)}function K(J){return o[J.getDay()]}function ft(J){return a[J.getDay()]}function rt(J){return l[J.getMonth()]}function Lt(J){return s[J.getMonth()]}function Ht(J){return r[+(J.getHours()>=12)]}function ie(J){return 1+~~(J.getMonth()/3)}function le(J){return o[J.getUTCDay()]}function Tt(J){return a[J.getUTCDay()]}function Ut(J){return l[J.getUTCMonth()]}function ge(J){return s[J.getUTCMonth()]}function re(J){return r[+(J.getUTCHours()>=12)]}function tn(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var ot=D(J+="",M);return ot.toString=function(){return J},ot},parse:function(J){var ot=p(J+="",!1);return ot.toString=function(){return J},ot},utcFormat:function(J){var ot=D(J+="",k);return ot.toString=function(){return J},ot},utcParse:function(J){var ot=p(J+="",!0);return ot.toString=function(){return J},ot}}}var Qs={"-":"",_:" ",0:"0"},ne=/^\s*\d+/,cv=/^%/,lv=/[\\^$*+?|[\]().{}]/g;function kt(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",a=r.length;return i+(a<n?new Array(n-a+1).join(e)+r:r)}function uv(t){return t.replace(lv,"\\$&")}function Ai(t){return new RegExp("^(?:"+t.map(uv).join("|")+")","i")}function Ci(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function fv(t,e,n){var i=ne.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function dv(t,e,n){var i=ne.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function hv(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function gv(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function pv(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Js(t,e,n){var i=ne.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function tc(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function vv(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function xv(t,e,n){var i=ne.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function yv(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ec(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function _v(t,e,n){var i=ne.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function nc(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function mv(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function bv(t,e,n){var i=ne.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Tv(t,e,n){var i=ne.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function wv(t,e,n){var i=ne.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function $v(t,e,n){var i=cv.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Av(t,e,n){var i=ne.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Cv(t,e,n){var i=ne.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function ic(t,e){return kt(t.getDate(),e,2)}function Sv(t,e){return kt(t.getHours(),e,2)}function kv(t,e){return kt(t.getHours()%12||12,e,2)}function Ev(t,e){return kt(1+Hi.count(fn(t),t),e,3)}function _l(t,e){return kt(t.getMilliseconds(),e,3)}function Rv(t,e){return _l(t,e)+"000"}function Mv(t,e){return kt(t.getMonth()+1,e,2)}function Lv(t,e){return kt(t.getMinutes(),e,2)}function Dv(t,e){return kt(t.getSeconds(),e,2)}function Iv(t){var e=t.getDay();return e===0?7:e}function Nv(t,e){return kt(Hr.count(fn(t)-1,t),e,2)}function ml(t){var e=t.getDay();return e>=4||e===0?ri(t):ri.ceil(t)}function Pv(t,e){return t=ml(t),kt(ri.count(fn(t),t)+(fn(t).getDay()===4),e,2)}function Ov(t){return t.getDay()}function Fv(t,e){return kt(Sr.count(fn(t)-1,t),e,2)}function Bv(t,e){return kt(t.getFullYear()%100,e,2)}function Xv(t,e){return t=ml(t),kt(t.getFullYear()%100,e,2)}function zv(t,e){return kt(t.getFullYear()%1e4,e,4)}function Hv(t,e){var n=t.getDay();return t=n>=4||n===0?ri(t):ri.ceil(t),kt(t.getFullYear()%1e4,e,4)}function Yv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+kt(e/60|0,"0",2)+kt(e%60,"0",2)}function rc(t,e){return kt(t.getUTCDate(),e,2)}function Uv(t,e){return kt(t.getUTCHours(),e,2)}function Vv(t,e){return kt(t.getUTCHours()%12||12,e,2)}function jv(t,e){return kt(1+zr.count(dn(t),t),e,3)}function bl(t,e){return kt(t.getUTCMilliseconds(),e,3)}function Gv(t,e){return bl(t,e)+"000"}function Wv(t,e){return kt(t.getUTCMonth()+1,e,2)}function qv(t,e){return kt(t.getUTCMinutes(),e,2)}function Zv(t,e){return kt(t.getUTCSeconds(),e,2)}function Kv(t){var e=t.getUTCDay();return e===0?7:e}function Qv(t,e){return kt(Yr.count(dn(t)-1,t),e,2)}function Tl(t){var e=t.getUTCDay();return e>=4||e===0?ai(t):ai.ceil(t)}function Jv(t,e){return t=Tl(t),kt(ai.count(dn(t),t)+(dn(t).getUTCDay()===4),e,2)}function tx(t){return t.getUTCDay()}function ex(t,e){return kt(kr.count(dn(t)-1,t),e,2)}function nx(t,e){return kt(t.getUTCFullYear()%100,e,2)}function ix(t,e){return t=Tl(t),kt(t.getUTCFullYear()%100,e,2)}function rx(t,e){return kt(t.getUTCFullYear()%1e4,e,4)}function ax(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ai(t):ai.ceil(t),kt(t.getUTCFullYear()%1e4,e,4)}function ox(){return"+0000"}function ac(){return"%"}function oc(t){return+t}function sc(t){return Math.floor(+t/1e3)}var Gn,Ao,wl,Co,$l;sx({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 sx(t){return Gn=sv(t),Ao=Gn.format,wl=Gn.parse,Co=Gn.utcFormat,$l=Gn.utcParse,Gn}function cx(t){return new Date(t)}function lx(t){return t instanceof Date?+t:+new Date(+t)}function So(t,e,n,i,r,a,o,s,l,u){var d=dl(),h=d.invert,g=d.domain,x=u(".%L"),_=u(":%S"),T=u("%I:%M"),A=u("%I %p"),$=u("%a %d"),S=u("%b %d"),M=u("%B"),k=u("%Y");function P(D){return(l(D)<D?x:s(D)<D?_:o(D)<D?T:a(D)<D?A:i(D)<D?r(D)<D?$:S:n(D)<D?M:k)(D)}return d.invert=function(D){return new Date(h(D))},d.domain=function(D){return arguments.length?g(Array.from(D,lx)):g().map(cx)},d.ticks=function(D){var p=g();return t(p[0],p[p.length-1],D??10)},d.tickFormat=function(D,p){return p==null?P:u(p)},d.nice=function(D){var p=g();return(!D||typeof D.range!="function")&&(D=e(p[0],p[p.length-1],D??10)),D?g(gl(p,D)):d},d.copy=function(){return Xr(d,So(t,e,n,i,r,a,o,s,l,u))},d}function ux(){return ui.apply(So(av,ov,fn,wo,Hr,Hi,bo,_o,Mn,Ao).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function fx(){return ui.apply(So(iv,rv,dn,$o,Yr,zr,To,mo,Mn,Co).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ct(t){return function(){return t}}const cc=Math.abs,fe=Math.atan2,Sn=Math.cos,dx=Math.max,Ca=Math.min,je=Math.sin,Zn=Math.sqrt,de=1e-12,Fi=Math.PI,Er=Fi/2,hr=2*Fi;function hx(t){return t>1?0:t<-1?Fi:Math.acos(t)}function lc(t){return t>=1?Er:t<=-1?-Er:Math.asin(t)}function ko(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new xp(e)}function gx(t){return t.innerRadius}function px(t){return t.outerRadius}function vx(t){return t.startAngle}function xx(t){return t.endAngle}function yx(t){return t&&t.padAngle}function _x(t,e,n,i,r,a,o,s){var l=n-t,u=i-e,d=o-r,h=s-a,g=h*l-d*u;if(!(g*g<de))return g=(d*(e-a)-h*(t-r))/g,[t+g*l,e+g*u]}function rr(t,e,n,i,r,a,o){var s=t-n,l=e-i,u=(o?a:-a)/Zn(s*s+l*l),d=u*l,h=-u*s,g=t+d,x=e+h,_=n+d,T=i+h,A=(g+_)/2,$=(x+T)/2,S=_-g,M=T-x,k=S*S+M*M,P=r-a,D=g*T-_*x,p=(M<0?-1:1)*Zn(dx(0,P*P*k-D*D)),j=(D*M-S*p)/k,U=(-D*S-M*p)/k,G=(D*M+S*p)/k,X=(-D*S+M*p)/k,Q=j-A,z=U-$,q=G-A,Mt=X-$;return Q*Q+z*z>q*q+Mt*Mt&&(j=G,U=X),{cx:j,cy:U,x01:-d,y01:-h,x11:j*(r/P-1),y11:U*(r/P-1)}}function uc(){var t=gx,e=px,n=Ct(0),i=null,r=vx,a=xx,o=yx,s=null,l=ko(u);function u(){var d,h,g=+t.apply(this,arguments),x=+e.apply(this,arguments),_=r.apply(this,arguments)-Er,T=a.apply(this,arguments)-Er,A=cc(T-_),$=T>_;if(s||(s=d=l()),x<g&&(h=x,x=g,g=h),!(x>de))s.moveTo(0,0);else if(A>hr-de)s.moveTo(x*Sn(_),x*je(_)),s.arc(0,0,x,_,T,!$),g>de&&(s.moveTo(g*Sn(T),g*je(T)),s.arc(0,0,g,T,_,$));else{var S=_,M=T,k=_,P=T,D=A,p=A,j=o.apply(this,arguments)/2,U=j>de&&(i?+i.apply(this,arguments):Zn(g*g+x*x)),G=Ca(cc(x-g)/2,+n.apply(this,arguments)),X=G,Q=G,z,q;if(U>de){var Mt=lc(U/g*je(j)),it=lc(U/x*je(j));(D-=Mt*2)>de?(Mt*=$?1:-1,k+=Mt,P-=Mt):(D=0,k=P=(_+T)/2),(p-=it*2)>de?(it*=$?1:-1,S+=it,M-=it):(p=0,S=M=(_+T)/2)}var K=x*Sn(S),ft=x*je(S),rt=g*Sn(P),Lt=g*je(P);if(G>de){var Ht=x*Sn(M),ie=x*je(M),le=g*Sn(k),Tt=g*je(k),Ut;if(A<Fi)if(Ut=_x(K,ft,le,Tt,Ht,ie,rt,Lt)){var ge=K-Ut[0],re=ft-Ut[1],tn=Ht-Ut[0],J=ie-Ut[1],ot=1/je(hx((ge*tn+re*J)/(Zn(ge*ge+re*re)*Zn(tn*tn+J*J)))/2),vt=Zn(Ut[0]*Ut[0]+Ut[1]*Ut[1]);X=Ca(G,(g-vt)/(ot-1)),Q=Ca(G,(x-vt)/(ot+1))}else X=Q=0}p>de?Q>de?(z=rr(le,Tt,K,ft,x,Q,$),q=rr(Ht,ie,rt,Lt,x,Q,$),s.moveTo(z.cx+z.x01,z.cy+z.y01),Q<G?s.arc(z.cx,z.cy,Q,fe(z.y01,z.x01),fe(q.y01,q.x01),!$):(s.arc(z.cx,z.cy,Q,fe(z.y01,z.x01),fe(z.y11,z.x11),!$),s.arc(0,0,x,fe(z.cy+z.y11,z.cx+z.x11),fe(q.cy+q.y11,q.cx+q.x11),!$),s.arc(q.cx,q.cy,Q,fe(q.y11,q.x11),fe(q.y01,q.x01),!$))):(s.moveTo(K,ft),s.arc(0,0,x,S,M,!$)):s.moveTo(K,ft),!(g>de)||!(D>de)?s.lineTo(rt,Lt):X>de?(z=rr(rt,Lt,Ht,ie,g,-X,$),q=rr(K,ft,le,Tt,g,-X,$),s.lineTo(z.cx+z.x01,z.cy+z.y01),X<G?s.arc(z.cx,z.cy,X,fe(z.y01,z.x01),fe(q.y01,q.x01),!$):(s.arc(z.cx,z.cy,X,fe(z.y01,z.x01),fe(z.y11,z.x11),!$),s.arc(0,0,g,fe(z.cy+z.y11,z.cx+z.x11),fe(q.cy+q.y11,q.cx+q.x11),$),s.arc(q.cx,q.cy,X,fe(q.y11,q.x11),fe(q.y01,q.x01),!$))):s.arc(0,0,g,P,k,$)}if(s.closePath(),d)return s=null,d+""||null}return u.centroid=function(){var d=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-Fi/2;return[Sn(h)*d,je(h)*d]},u.innerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:Ct(+d),u):t},u.outerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:Ct(+d),u):e},u.cornerRadius=function(d){return arguments.length?(n=typeof d=="function"?d:Ct(+d),u):n},u.padRadius=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Ct(+d),u):i},u.startAngle=function(d){return arguments.length?(r=typeof d=="function"?d:Ct(+d),u):r},u.endAngle=function(d){return arguments.length?(a=typeof d=="function"?d:Ct(+d),u):a},u.padAngle=function(d){return arguments.length?(o=typeof d=="function"?d:Ct(+d),u):o},u.context=function(d){return arguments.length?(s=d??null,u):s},u}function Eo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Al(t){this._context=t}Al.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ro(t){return new Al(t)}function Cl(t){return t[0]}function Sl(t){return t[1]}function kl(t,e){var n=Ct(!0),i=null,r=Ro,a=null,o=ko(s);t=typeof t=="function"?t:t===void 0?Cl:Ct(t),e=typeof e=="function"?e:e===void 0?Sl:Ct(e);function s(l){var u,d=(l=Eo(l)).length,h,g=!1,x;for(i==null&&(a=r(x=o())),u=0;u<=d;++u)!(u<d&&n(h=l[u],u,l))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+t(h,u,l),+e(h,u,l));if(x)return a=null,x+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:Ct(+l),s):t},s.y=function(l){return arguments.length?(e=typeof l=="function"?l:Ct(+l),s):e},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Ct(!!l),s):n},s.curve=function(l){return arguments.length?(r=l,i!=null&&(a=r(i)),s):r},s.context=function(l){return arguments.length?(l==null?i=a=null:a=r(i=l),s):i},s}function mx(t,e,n){var i=null,r=Ct(!0),a=null,o=Ro,s=null,l=ko(u);t=typeof t=="function"?t:t===void 0?Cl:Ct(+t),e=typeof e=="function"?e:Ct(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Sl:Ct(+n);function u(h){var g,x,_,T=(h=Eo(h)).length,A,$=!1,S,M=new Array(T),k=new Array(T);for(a==null&&(s=o(S=l())),g=0;g<=T;++g){if(!(g<T&&r(A=h[g],g,h))===$)if($=!$)x=g,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),_=g-1;_>=x;--_)s.point(M[_],k[_]);s.lineEnd(),s.areaEnd()}$&&(M[g]=+t(A,g,h),k[g]=+e(A,g,h),s.point(i?+i(A,g,h):M[g],n?+n(A,g,h):k[g]))}if(S)return s=null,S+""||null}function d(){return kl().defined(r).curve(o).context(a)}return u.x=function(h){return arguments.length?(t=typeof h=="function"?h:Ct(+h),i=null,u):t},u.x0=function(h){return arguments.length?(t=typeof h=="function"?h:Ct(+h),u):t},u.x1=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:Ct(+h),u):i},u.y=function(h){return arguments.length?(e=typeof h=="function"?h:Ct(+h),n=null,u):e},u.y0=function(h){return arguments.length?(e=typeof h=="function"?h:Ct(+h),u):e},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Ct(+h),u):n},u.lineX0=u.lineY0=function(){return d().x(t).y(e)},u.lineY1=function(){return d().x(t).y(n)},u.lineX1=function(){return d().x(i).y(e)},u.defined=function(h){return arguments.length?(r=typeof h=="function"?h:Ct(!!h),u):r},u.curve=function(h){return arguments.length?(o=h,a!=null&&(s=o(a)),u):o},u.context=function(h){return arguments.length?(h==null?a=s=null:s=o(a=h),u):a},u}function bx(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Tx(t){return t}function wx(){var t=Tx,e=bx,n=null,i=Ct(0),r=Ct(hr),a=Ct(0);function o(s){var l,u=(s=Eo(s)).length,d,h,g=0,x=new Array(u),_=new Array(u),T=+i.apply(this,arguments),A=Math.min(hr,Math.max(-hr,r.apply(this,arguments)-T)),$,S=Math.min(Math.abs(A)/u,a.apply(this,arguments)),M=S*(A<0?-1:1),k;for(l=0;l<u;++l)(k=_[x[l]=l]=+t(s[l],l,s))>0&&(g+=k);for(e!=null?x.sort(function(P,D){return e(_[P],_[D])}):n!=null&&x.sort(function(P,D){return n(s[P],s[D])}),l=0,h=g?(A-u*M)/g:0;l<u;++l,T=$)d=x[l],k=_[d],$=T+(k>0?k*h:0)+M,_[d]={data:s[d],index:l,value:k,startAngle:T,endAngle:$,padAngle:S};return _}return o.value=function(s){return arguments.length?(t=typeof s=="function"?s:Ct(+s),o):t},o.sortValues=function(s){return arguments.length?(e=s,n=null,o):e},o.sort=function(s){return arguments.length?(n=s,e=null,o):n},o.startAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Ct(+s),o):i},o.endAngle=function(s){return arguments.length?(r=typeof s=="function"?s:Ct(+s),o):r},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Ct(+s),o):a},o}function bn(){}function Rr(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Ur(t){this._context=t}Ur.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Rr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Rr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function $x(t){return new Ur(t)}function El(t){this._context=t}El.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Rr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ax(t){return new El(t)}function Rl(t){this._context=t}Rl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Rr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Cx(t){return new Rl(t)}function Ml(t,e){this._basis=new Ur(t),this._beta=e}Ml.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],a=t[n]-i,o=e[n]-r,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+l*a),this._beta*e[s]+(1-this._beta)*(r+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Sx=function t(e){function n(i){return e===1?new Ur(i):new Ml(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function Mr(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Mo(t,e){this._context=t,this._k=(1-e)/6}Mo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Mr(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Mr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kx=function t(e){function n(i){return new Mo(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Lo(t,e){this._context=t,this._k=(1-e)/6}Lo.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Mr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ex=function t(e){function n(i){return new Lo(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Do(t,e){this._context=t,this._k=(1-e)/6}Do.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Rx=function t(e){function n(i){return new Do(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Io(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>de){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>de){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/d,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/d}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function Ll(t,e){this._context=t,this._alpha=e}Ll.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Io(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mx=function t(e){function n(i){return e?new Ll(i,e):new Mo(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Dl(t,e){this._context=t,this._alpha=e}Dl.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Io(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Lx=function t(e){function n(i){return e?new Dl(i,e):new Lo(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Il(t,e){this._context=t,this._alpha=e}Il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Io(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Dx=function t(e){function n(i){return e?new Il(i,e):new Do(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Nl(t){this._context=t}Nl.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Ix(t){return new Nl(t)}function fc(t){return t<0?-1:1}function dc(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),s=(a*r+o*i)/(i+r);return(fc(a)+fc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function hc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Sa(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o)}function Lr(t){this._context=t}Lr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Sa(this,this._t0,hc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Sa(this,hc(this,n=dc(this,t,e)),n);break;default:Sa(this,this._t0,n=dc(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Pl(t){this._context=new Ol(t)}(Pl.prototype=Object.create(Lr.prototype)).point=function(t,e){Lr.prototype.point.call(this,e,t)};function Ol(t){this._context=t}Ol.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,a){this._context.bezierCurveTo(e,t,i,n,a,r)}};function Nx(t){return new Lr(t)}function Px(t){return new Pl(t)}function Fl(t){this._context=t}Fl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=gc(t),r=gc(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],t[o],e[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function gc(t){var e,n=t.length-1,i,r=new Array(n),a=new Array(n),o=new Array(n);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,a[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/a[e-1],a[e]-=i,o[e]-=i*o[e-1];for(r[n-1]=o[n-1]/a[n-1],e=n-2;e>=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)a[e]=2*t[e+1]-r[e+1];return[r,a]}function Ox(t){return new Fl(t)}function Vr(t,e){this._context=t,this._t=e}Vr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function Fx(t){return new Vr(t,.5)}function Bx(t){return new Vr(t,0)}function Xx(t){return new Vr(t,1)}function Kn(t,e,n){this.k=t,this.x=e,this.y=n}Kn.prototype={constructor:Kn,scale:function(t){return t===1?this:new Kn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Kn(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zx=new Kn(1,0,0);Kn.prototype;/*!
* Copyright (c) 2017 ~ present NAVER Corp.
* billboard.js project is licensed under the MIT license
*
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.10.3
*/function Hx(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function Yx(t){var e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",i=function(a){return setTimeout(a,1)},r=function(a){return clearTimeout(a)};return[e?t.requestAnimationFrame:i,e?t.cancelAnimationFrame:r,n?t.requestIdleCallback:i,n?t.cancelIdleCallback:r]}var It=Hx(),zt=It==null?void 0:It.document,Bl=Yx(It),Ux=Bl[0],Xl=Bl[2],_t={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},ka={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},xn={Area:[_t.AREA,_t.AREA_SPLINE,_t.AREA_SPLINE_RANGE,_t.AREA_LINE_RANGE,_t.AREA_STEP],AreaRange:[_t.AREA_SPLINE_RANGE,_t.AREA_LINE_RANGE],Arc:[_t.PIE,_t.DONUT,_t.GAUGE,_t.POLAR,_t.RADAR],Line:[_t.LINE,_t.SPLINE,_t.AREA,_t.AREA_SPLINE,_t.AREA_SPLINE_RANGE,_t.AREA_LINE_RANGE,_t.STEP,_t.AREA_STEP],Step:[_t.STEP,_t.AREA_STEP],Spline:[_t.SPLINE,_t.AREA_SPLINE,_t.AREA_SPLINE_RANGE]},mt=function(){return mt=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},mt.apply(this,arguments)};function qt(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,a;i<r;i++)(a||!(i in e))&&(a||(a=Array.prototype.slice.call(e,0,i)),a[i]=e[i]);return t.concat(a||Array.prototype.slice.call(e))}var $t=function(t){return t||t===0},pt=function(t){return typeof t=="function"},Pt=function(t){return typeof t=="string"},ht=function(t){return typeof t=="number"},ee=function(t){return typeof t>"u"},Ft=function(t){return typeof t<"u"},zl=function(t){return typeof t=="boolean"},Vx=function(t){return Math.ceil(t/10)*10},Si=function(t){return Math.ceil(t)+.5},Mi=function(t){return t[1]-t[0]},Ke=function(t){return typeof t=="object"},Qe=function(t){return ee(t)||t===null||Pt(t)&&t.length===0||Ke(t)&&!(t instanceof Date)&&Object.keys(t).length===0||ht(t)&&isNaN(t)},Wt=function(t){return!Qe(t)},Dt=function(t){return Array.isArray(t)},Bt=function(t){return t&&!(t!=null&&t.nodeType)&&Ke(t)&&!Dt(t)};function mn(t,e,n){return Ft(t[e])?t[e]:n}function jx(t,e){var n=!1;return Object.keys(t).forEach(function(i){return t[i]===e&&(n=!0)}),n}function Gt(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=pt(t);return r&&t.call.apply(t,qt([e],n,!1)),r}function Dr(t,e){var n=0,i=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];!--n&&e.apply.apply(e,qt([this],r,!1))};"duration"in t?t.each(function(){return++n}).on("end",i):(++n,t.call(i))}function Ea(t){return Pt(t)?t.replace(/<(script|img)?/ig,"&lt;").replace(/(script)?>/ig,"&gt;"):t}function Ir(t,e,n,i){if(n===void 0&&(n=[-1,1]),i===void 0&&(i=!1),!(!t||!Pt(e)))if(e.indexOf(`
`)===-1)t.text(e);else{var r=[t.text(),e].map(function(s){return s.replace(/[\s\n]/g,"")});if(r[0]!==r[1]){var a=e.split(`
`),o=i?a.length-1:1;t.html(""),a.forEach(function(s,l){t.append("tspan").attr("x",0).attr("dy","".concat(l===0?n[0]*o:n[1],"em")).text(s)})}}}function Hl(t){var e=t.getBBox(),n=e.x,i=e.y,r=e.width,a=e.height;return[{x:n,y:i+a},{x:n,y:i},{x:n+r,y:i},{x:n+r,y:i+a}]}function Gx(t){var e=t.getBoundingClientRect(),n=e.width,i=e.height,r=Hl(t),a=r[0].x,o=Math.min(r[0].y,r[1].y);return{x:a,y:o,width:n,height:i}}function cn(t,e){var n,i=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)===null||n===void 0?void 0:n[0]),r=[0,0];try{r=za(i||t,e)}catch{}return r.map(function(a){return isNaN(a)?0:a})}function Yl(t){var e=t.event,n=t.$el,i=n.subchart.main||n.main,r;return e&&e.type==="brush"?r=e.selection:i&&(r=i.select(".bb-brush").node())&&(r=gp(r)),r}function gr(t){var e=!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width");return e?t.rect=t.getBoundingClientRect():t.rect}function Fn(t,e,n){t===void 0&&(t=!0),e===void 0&&(e=0),n===void 0&&(n=1e4);var i=It.crypto||It.msCrypto,r=i?e+i.getRandomValues(new Uint32Array(1))[0]%(n-e+1):Math.floor(Math.random()*(n-e)+e);return t?String(r):r}function Qa(t,e,n,i,r){if(n>i)return-1;var a=Math.floor((n+i)/2),o=t[a],s=o.x,l=o.w,u=l===void 0?0:l;return r&&(s=t[a].y,u=t[a].h),e>=s&&e<=s+u?a:e<s?Qa(t,e,n,a-1,r):Qa(t,e,a+1,i,r)}function Wx(t){var e=Yl(t);return e?e[0]===e[1]:!0}function qx(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(i){if(Bt(i)&&i.constructor){var r=new i.constructor;for(var a in i)r[a]=n(i[a]);return r}return i};return t.map(function(i){return n(i)}).reduce(function(i,r){return mt(mt({},i),r)})}function Me(t,e){t===void 0&&(t={}),Dt(e)&&e.forEach(function(i){return Me(t,i)});for(var n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}var hn=function(t){return t.charAt(0).toUpperCase()+t.slice(1)};function Zx(t,e){return e===void 0&&(e="-"),t.split(e).map(function(n,i){return i?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}).join("")}var oi=function(t){return[].slice.call(t)};function Kx(t,e,n){var i=t.rootSelctor,r=t.sheet,a=function(s){return s.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")},o="".concat(i," ").concat(a(e)," {").concat(n.join(";"),"}");return r[r.insertRule?"insertRule":"addRule"](o,r.cssRules.length)}function Qx(t){var e=[];return t.forEach(function(n){var i;try{n.cssRules&&n.cssRules.length&&(e=e.concat(oi(n.cssRules)))}catch(r){(i=It.console)===null||i===void 0||i.warn("Error while reading rules from ".concat(n.href,": ").concat(r.toString()))}}),e}function pc(t){var e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Ja(t){var e=t[0]instanceof Date,n=(e?t.map(Number):t).filter(function(i,r,a){return a.indexOf(i)===r});return e?n.map(function(i){return new Date(i)}):n}function Ra(t){return t&&t.length?t.reduce(function(e,n){return e.concat(n)}):[]}function si(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!e.length||e.length===1&&!e[0])return t;var i=e.shift();return Bt(t)&&Bt(i)&&Object.keys(i).forEach(function(r){var a=i[r];Bt(a)?(!t[r]&&(t[r]={}),t[r]=si(t[r],a)):t[r]=Dt(a)?a.concat():a}),si.apply(void 0,qt([t],e,!1))}function ci(t,e){e===void 0&&(e=!0);var n;return t[0]instanceof Date?n=e?function(i,r){return i-r}:function(i,r){return r-i}:e&&!t.every(isNaN)?n=function(i,r){return i-r}:e||(n=function(i,r){return i>r&&-1||i<r&&1||i===r&&0}),t.concat().sort(n)}function yn(t,e){var n=e.filter(function(i){return Wt(i)});return n.length?ht(n[0])?n=Math[t].apply(Math,n):n[0]instanceof Date&&(n=ci(n,t==="min")[0]):n=void 0,n}var Jx={mouse:function(){var t=function(){return{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}};try{return new MouseEvent("t"),function(e,n,i){i===void 0&&(i=t()),e.dispatchEvent(new MouseEvent(n,i))}}catch{return function(n,i,r){r===void 0&&(r=t());var a=zt.createEvent("MouseEvent");a.initMouseEvent(i,r.bubbles,r.cancelable,It,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(a)}}}(),touch:function(t,e,n){var i=new Touch(si({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[i],targetTouches:[],changedTouches:[i]}))}};function Nr(t,e){var n=t;for(var i in e)n=n.replace(new RegExp("{=".concat(i,"}"),"g"),e[i]);return n}function Fe(t){var e,n;if(t instanceof Date)n=t;else if(Pt(t)){var i=this,r=i.config,a=i.format;n=(e=a.dataTime(r.data_xFormat)(t))!==null&&e!==void 0?e:new Date(t)}else ht(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error("Failed to parse x '".concat(t,"' to Date object")),n}function Yi(){return(zt==null?void 0:zt.hidden)===!1||(zt==null?void 0:zt.visibilityState)==="visible"}function t0(t,e){var n=It.DocumentTouch,i=It.matchMedia,r=It.navigator,a=!1;if(e)if(r&&"maxTouchPoints"in r)a=r.maxTouchPoints>0;else if("ontouchmove"in It||n&&zt instanceof n)a=!0;else if(i!=null&&i("(pointer:coarse)").matches)a=!0;else{var o=r.userAgent;a=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(o)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(o)}var s=t&&["any-hover:hover","any-pointer:fine"].some(function(l){return i==null?void 0:i("(".concat(l,")")).matches});return s&&"mouse"||a&&"touch"||"mouse"}function Ul(t,e){e()===!1?Ux(function(){return Ul(t,e)}):t()}function e0(t){var e=t,n=e.config,i="";if(Qe(n.data_type||n.data_types)&&!e[ka.LINE])i="line";else for(var r in ka){var a=_t[r];if(e.hasType(a)&&!e[ka[r]]){i=a;break}}i&&n0("Please, make sure if %c".concat(Zx(i)),"module has been imported and specified correctly.")}function n0(t,e){var n,i="[billboard.js]",r="https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality",a=(n=It.console)===null||n===void 0?void 0:n.error;throw a&&(console.error("❌ ".concat(i," ").concat(t),"background:red;color:white;display:block;font-size:15px",e),console.info("%c","font-size:15px",r)),Error("".concat(i," ").concat(t.replace(/\%c([a-z-]+)/i,"'$1' ")," ").concat(e))}var Et={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},Yt={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},to={area:"bb-area",areas:"bb-areas"},te={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"},Ne={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"},eo={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},he={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},no={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},En={dragarea:"bb-dragarea",INCLUDED:"_included_"},Ge={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},Nt={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},_n={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},Ie={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},Xt={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"},jt={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},i0={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},Bi={region:"bb-region",regions:"bb-regions"},Qt={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},ve={shape:"bb-shape",shapes:"bb-shapes"},Vl={brush:"bb-brush",subchart:"bb-subchart"},we={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"},pr={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},jl={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},r0={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"},ce=mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt(mt({},Et),Yt),to),te),Ne),eo),he),no),En),Ge),Nt),_n),Ie),Xt),jt),i0),Bi),Qt),ve),Vl),we),pr),jl),r0),a0=function(){function t(){var e={chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null};return e}return t}(),o0=function(){function t(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasRadar:!1,hasTreemap:!1,cssRule:{},current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:[],hiddenLegendIds:[],focusedTargetIds:[],defocusedTargetIds:[],radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null}}}return t}(),vc={element:a0,state:o0},s0=function(){function t(){var e=this;Object.keys(vc).forEach(function(n){e[n]=new vc[n]})}return t.prototype.getStore=function(e){return this[e]},t}(),c0={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},regions:[]},l0={boost_useCssRule:!1,boost_useWorker:!1},u0={data_x:void 0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_hide:!1,data_filter:void 0,data_onclick:function(){},data_onover:function(){},data_onout:function(){},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},f0={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},d0={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{}},h0={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},g0={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},p0={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){},tooltip_onhide:function(){},tooltip_onshown:function(){},tooltip_onhidden:function(){},tooltip_order:null},jr=function(){function t(){return qx(c0,l0,u0,f0,d0,h0,g0,p0,t.data)}return t.setOptions=function(e){this.data=e.reduce(function(n,i){return mt(mt({},n),i)},this.data)},t.data={},t}(),qe={bubbleBaseLength:"$baseLength",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",legendItemTextBox:"legendItemTextBox",radarPoints:"$radarPoints",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect"},v0=function(){function t(){this.cache={}}return t.prototype.add=function(e,n,i){return i===void 0&&(i=!1),this.cache[e]=i?this.cloneTarget(n):n,this.cache[e]},t.prototype.remove=function(e){var n=this;(Pt(e)?[e]:e).forEach(function(i){return delete n.cache[i]})},t.prototype.get=function(e,n){if(n===void 0&&(n=!1),n&&Array.isArray(e)){for(var i=[],r=0,a=void 0;a=e[r];r++)a in this.cache&&i.push(this.cloneTarget(this.cache[a]));return i}else{var o=this.cache[e];return $t(o)?o:null}},t.prototype.reset=function(e){var n=this;for(var i in n.cache)(e||/^\$/.test(i))&&(n.cache[i]=null)},t.prototype.cloneTarget=function(e){return{id:e.id,id_org:e.id_org,values:e.values.map(function(n){return{x:n.x,value:n.value,id:n.id}})}},t}(),x0=It.setTimeout,y0=It.clearTimeout;function _0(t){var e=[],n,i=function(){i.clear(),t===!1?Xl(function(){e.forEach(function(r){return r()})},{timeout:200}):n=x0(function(){e.forEach(function(r){return r()})},ht(t)?t:200)};return i.clear=function(){n&&(y0(n),n=null)},i.add=function(r){return e.push(r)},i.remove=function(r){return e.splice(e.indexOf(r),1)},i}function Gl(){var t=[],e=function(n,i){function r(){for(var a,o=0,s=0,l=void 0;l=t[s];s++){if(l===!0||!((a=l.empty)===null||a===void 0)&&a.call(l)){o++;continue}if(Yi()===!1){o=t.length;break}try{l.transition()}catch{o++}}return o===t.length}Ul(function(){i==null||i()},r)};return e.add=function(n){Dt(n)?t=t.concat(n):t.push(n)},e}var Ma={};function m0(t,e){var n,i=t.toString(),r=i.replace(/(function|[\s\W\n])/g,"").substring(0,15);return r in Ma||(Ma[r]=new It.Blob(["".concat((n=e==null?void 0:e.map(String).join(";"))!==null&&n!==void 0?n:"",`
self.onmessage=function({data}) {
const result = (`).concat(i,`).apply(null, data);
self.postMessage(result);
};`)],{type:"text/javascript"})),It.URL.createObjectURL(Ma[r])}function b0(t){var e=new It.Worker(t);return e.onerror=function(n){console.error?console.error(n):console.log(n)},e}function La(t,e,n,i){t===void 0&&(t=!0);var r=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var u=e.apply(void 0,s);n(u)};if(It.Worker&&t){var a=m0(e,i),o=b0(a);r=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];o.postMessage(s),o.onmessage=function(u){return It.URL.revokeObjectURL(a),n(u.data)}}}return r}function io(t){var e=[];return t.forEach(function(n,i){var r=n[0];n.forEach(function(a,o){if(o>0){if(typeof e[o-1]>"u"&&(e[o-1]={}),typeof a>"u")throw new Error("Source data is missing a component at (".concat(i,", ").concat(o,")!"));e[o-1][r]=a}})}),e}function ro(t){var e=t[0],n=[];return t.forEach(function(i,r){if(r>0){var a={};i.forEach(function(o,s){if(typeof o>"u")throw new Error("Source data is missing a component at (".concat(r,", ").concat(s,")!"));a[e[s]]=o}),n.push(a)}}),n}function Wl(t,e){var n=[],i,r;if(Array.isArray(t)){var a=function(o,s){if(o[s]!==void 0)return o[s];var l=s.replace(/\[(\w+)\]/g,".$1"),u=l.replace(/^\./,"").split("."),d=o;return u.some(function(h){return!(d=d&&h in d?d[h]:void 0)}),d};e.x?i=e.value.concat(e.x):i=e.value,n.push(i),t.forEach(function(o){var s=i.map(function(l){var u=a(o,l);return typeof u>"u"&&(u=null),u});n.push(s)}),r=ro(n)}else Object.keys(t).forEach(function(o){var s,l=t[o].concat();(s=l.unshift)===null||s===void 0||s.call(l,o),n.push(l)}),r=io(n);return r}function T0(t,e,n,i,r){e===void 0&&(e="csv");var a=new XMLHttpRequest,o={csv:w0,tsv:$0,json:Wl};a.open("GET",t),n&&Object.keys(n).forEach(function(s){a.setRequestHeader(s,n[s])}),a.onreadystatechange=function(){if(a.readyState===4)if(a.status===200){var s=a.responseText;s&&r.call(this,o[e](e==="json"?JSON.parse(s):s,i))}else throw new Error("".concat(t,": Something went wrong loading!"))},a.send()}function ql(t,e){var n=t.rows(e),i;return n.length===1?(i=[{}],n[0].forEach(function(r){i[0][r]=null})):i=t.parse(e),i}function w0(t){return ql({rows:Tp,parse:bp},t)}function $0(t){return ql({rows:$p,parse:wp},t)}function xc(t,e){var n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}var A0={convertData:function(t,e){var n=this.config,i=n.boost_useWorker,r=t;if(t.bindto&&(r={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(a){var o="data_".concat(a);o in t&&(r[a]=t[o])})),r.url&&e)T0(r.url,r.mimeType,r.headers,xc(r.keys,n),e);else if(r.json)La(i,Wl,e,[io,ro])(r.json,xc(r.keys,n));else if(r.rows)La(i,ro,e)(r.rows);else if(r.columns)La(i,io,e)(r.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this,i=this,r=i.axis,a=i.config,o=i.state,s=a.data_type,l=!1,u=!1,d=!1;r&&(l=r.isCategorized(),u=r.isTimeSeries(),d=r.isCustomX());var h=Object.keys(t[0]||{}),g=h.length?h.filter(i.isNotX,i):[],x=h.length?h.filter(i.isX,i):[],_;g.forEach(function($){var S=n.getXKey($);d||u?x.indexOf(S)>=0?_=(e&&i.data.xs[$]||[]).concat(t.map(function(M){return M[S]}).filter($t).map(function(M,k){return i.generateTargetX(M,$,k)})):a.data_x?_=n.getOtherTargetXs():Wt(a.data_xs)&&(_=i.getXValuesOfXKey(S,i.data.targets)):_=t.map(function(M,k){return k}),_&&(n.data.xs[$]=_)}),g.forEach(function($){if(!n.data.xs[$])throw new Error('x is not defined for id = "'.concat($,'".'))});var T=g.map(function($,S){var M=a.data_idConverter.bind(i.api)($),k=i.getXKey($),P=d&&l,D=P&&t.map(function(U){return U.x}).every(function(U){return a.axis_x_categories.indexOf(U)>-1}),p=t.__append__,j=k===null&&p?i.api.data.values($).length:0;return{id:M,id_org:$,values:t.map(function(U,G){var X=U[k],Q=U[$],z;return Q=Q!==null&&!isNaN(Q)&&!Bt(Q)?+Q:Dt(Q)||Bt(Q)?Q:null,(P||o.hasRadar)&&S===0&&!ee(X)?(!D&&S===0&&G===0&&!p&&(a.axis_x_categories=[]),z=a.axis_x_categories.indexOf(X),z===-1&&(z=a.axis_x_categories.length,a.axis_x_categories.push(X))):z=i.generateTargetX(X,$,j+G),(ee(Q)||i.data.xs[$].length<=G)&&(z=void 0),{x:z,value:Q,id:M,index:-1}}).filter(function(U){return Ft(U.x)})}});if(T.forEach(function($){var S;a.data_xSort&&($.values=$.values.sort(function(M,k){var P=M.x||M.x===0?M.x:1/0,D=k.x||k.x===0?k.x:1/0;return P-D})),$.values.forEach(function(M,k){return M.index=k}),(S=i.data.xs[$.id])===null||S===void 0||S.sort(function(M,k){return M-k})}),o.hasNegativeValue=i.hasNegativeValueInTargets(T),o.hasPositiveValue=i.hasPositiveValueInTargets(T),s&&i.isValidChartType(s)){var A=i.mapToIds(T).filter(function($){return!($ in a.data_types)||!i.isValidChartType(a.data_types[$])});i.setTargetType(A,s)}return T.forEach(function($){return i.cache.add($.id_org,$,!0)}),T}},C0={isX:function(t){var e=this,n=e.config,i=n.data_x&&t===n.data_x,r=Wt(n.data_xs)&&jx(n.data_xs,t);return i||r},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){var t=this.config;return!!(t.data_stack_normalize&&t.data_groups.length)},isGrouped:function(t){var e=this.config.data_groups;return t?e.some(function(n){return n.indexOf(t)>=0&&n.length>1}):e.length>0},getXKey:function(t){var e=this,n=e.config;return n.data_x?n.data_x:Wt(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n=this,i=e&&Wt(e)?n.mapToIds(e):[],r;return i.forEach(function(a){n.getXKey(a)===t&&(r=n.data.xs[a])}),r},getIndexByX:function(t,e){var n=this;return e?e.indexOf(Pt(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){var n=this;return t in n.data.xs&&n.data.xs[t]&&$t(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs:function(){var t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX:function(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs:function(t){var e=this,n=e.config;Object.keys(t).forEach(function(i){n.data_xs[i]=t[i]})},isMultipleX:function(){return Wt(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter")},addName:function(t){var e=this,n=e.config,i;return t&&(i=n.data_names[t.id],t.name=i!==void 0?i:t.id),t},getAllValuesOnIndex:function(t,e){e===void 0&&(e=!1);var n=this,i=n.filterTargetsToShow(n.data.targets).map(function(r){return n.addName(n.getValueOnIndex(r.values,t))});return e&&(i=i.filter(function(r){return r&&"value"in r&&$t(r.value)})),i},getValueOnIndex:function(t,e){var n=t.filter(function(i){return i.index===e});return n.length?n[0]:null},updateTargetX:function(t,e){var n=this;t.forEach(function(i){i.values.forEach(function(r,a){r.x=n.generateTargetX(e[a],i.id,a)}),n.data.xs[i.id]=e})},updateTargetXs:function(t,e){var n=this;t.forEach(function(i){e[i.id]&&n.updateTargetX([i],e[i.id])})},generateTargetX:function(t,e,n){var i=this,r=i.axis,a=r!=null&&r.isCategorized()?n:t||n;if(r!=null&&r.isTimeSeries()){var o=Fe.bind(i);a=o(t||i.getXValue(e,n))}else r!=null&&r.isCustomX()&&!(r!=null&&r.isCategorized())&&(a=$t(t)?+t:i.getXValue(e,n));return a},updateXs:function(t){t.length&&(this.axis.xs=t.map(function(e){return e.x}))},getPrevX:function(t){var e=this.axis.xs[t-1];return Ft(e)?e:null},getNextX:function(t){var e=this.axis.xs[t+1];return Ft(e)?e:null},getBaseValue:function(t){var e=this,n=e.state.hasAxis,i=t.value;return i&&n&&(e.isAreaRangeType(t)?i=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(i=e.getBubbleZData(i,"y"))),i},getMinMaxValue:function(t){var e=this.getBaseValue.bind(this),n,i;return(t||this.data.targets.map(function(r){return r.values})).forEach(function(r,a){var o=r.map(e).filter(ht);n=Math.min.apply(Math,qt([a?n:1/0],o,!1)),i=Math.max.apply(Math,qt([a?i:-1/0],o,!1))}),{min:n,max:i}},getMinMaxData:function(){var t=this,e=qe.dataMinMax,n=t.cache.get(e);if(!n){var i=t.data.targets.map(function(s){return s.values}),r=t.getMinMaxValue(i),a=[],o=[];i.forEach(function(s){var l=t.getFilteredDataByValue(s,r.min),u=t.getFilteredDataByValue(s,r.max);l.length&&(a=a.concat(l)),u.length&&(o=o.concat(u))}),t.cache.add(e,n={min:a,max:o})}return n},getTotalPerIndex:function(){var t=this,e=qe.dataTotalPerIndex,n=t.cache.get(e);return(t.config.data_groups.length||t.isStackNormalized())&&!n&&(n=[],t.data.targets.forEach(function(i){i.values.forEach(function(r,a){n[a]||(n[a]=0),n[a]+=ht(r.value)?r.value:0})})),n},getTotalDataSum:function(t){var e=this,n=qe.dataTotalSum,i=e.cache.get(n);if(!ht(i)){var r=Ra(e.data.targets.map(function(a){return a.values})).map(function(a){return a.value});i=r.length?r.reduce(function(a,o){return a+o}):0,e.cache.add(n,i)}return t&&(i-=e.getHiddenTotalDataSum()),i},getHiddenTotalDataSum:function(){var t=this,e=t.api,n=t.state.hiddenTargetIds,i=0;return n.length&&(i=e.data.values.bind(e)(n).reduce(function(r,a){return r+a})),i},getFilteredDataByValue:function(t,e){var n=this;return t.filter(function(i){return n.getBaseValue(i)===e})},getMaxDataCount:function(){return Math.max.apply(Math,qt(qt([],this.data.targets.map(function(t){return t.values.length}),!1),[0],!1))},getMaxDataCountTarget:function(){var t=this.filterTargetsToShow()||[],e=t.length,n=this.config.axis_x_inverted;return e>1?(t=t.map(function(i){return i.values}).reduce(function(i,r){return i.concat(r)}).map(function(i){return i.x}),t=ci(Ja(t)).map(function(i,r,a){return{x:i,index:n?a.length-r-1:r}})):e&&(t=t[0].values.concat()),t},mapToIds:function(t){return t.map(function(e){return e.id})},mapToTargetIds:function(t){var e=this;return t?Dt(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget:function(t,e){for(var n=this.mapToIds(t),i=0,r=void 0;r=n[i];i++)if(r===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this;return(t||e.data.targets).filter(function(n){return e.isTargetToShow(n.id)})},mapTargetsToUniqueXs:function(t){var e=this,n=e.axis,i=[];return t!=null&&t.length&&(i=Ja(Ra(t.map(function(r){return r.values.map(function(a){return+a.x})}))),i=n!=null&&n.isTimeSeries()?i.map(function(r){return new Date(+r)}):i.map(Number)),ci(i)},addTargetIds:function(t,e){var n=this.state,i=Dt(e)?e:[e];i.forEach(function(r){n[t].indexOf(r)<0&&n[t].push(r)})},removeTargetIds:function(t,e){var n=this.state,i=Dt(e)?e:[e];i.forEach(function(r){var a=n[t].indexOf(r);a>=0&&n[t].splice(a,1)})},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this,n=e.state.hasAxis,i={},r=e.isMultipleX(),a=r?e.mapTargetsToUniqueXs(t).map(function(o){return Pt(o)?o:+o}):null;return t.forEach(function(o){var s=[];o.values.filter(function(l){var u=l.value;return $t(u)||u===null}).forEach(function(l){var u=l.value;u!==null&&e.isCandlestickType(l)&&(u=Dt(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),Dt(u)?s.push.apply(s,u):Bt(u)&&"high"in u?s.push.apply(s,Object.values(u)):e.isBubbleZType(l)?s.push(n&&e.getBubbleZData(u,"y")):r?s[e.getIndexByX(l.x,a)]=u:s.push(u)}),i[o.id]=s}),i},checkValueInTargets:function(t,e){for(var n=Object.keys(t),i,r=0;r<n.length;r++){i=t[n[r]].values;for(var a=0;a<i.length;a++)if(e(i[a].value))return!0}return!1},hasMultiTargets:function(){return this.filterTargetsToShow().length>1},hasNegativeValueInTargets:function(t){return this.checkValueInTargets(t,function(e){return e<0})},hasPositiveValueInTargets:function(t){return this.checkValueInTargets(t,function(e){return e>0})},orderTargets:function(t){var e=this,n=qt([],t,!0),i=e.getSortCompareFn();return i&&n.sort(i),n},getSortCompareFn:function(t){t===void 0&&(t=!1);var e=this,n=e.config,i=n.data_order,r=/asc/i.test(i),a=/desc/i.test(i),o;if(r||a){var s=function(l,u){return l+Math.abs(u.value)};o=function(l,u){var d="values"in l?l.values.reduce(s,0):l.value,h="values"in u?u.values.reduce(s,0):u.value;return t?r?d-h:h-d:r?h-d:d-h}}else pt(i)&&(o=i.bind(e.api));return o||null},filterByX:function(t,e){return Ra(t.map(function(n){return n.values})).filter(function(n){return n.x-e===0})},filterRemoveNull:function(t){var e=this;return t.filter(function(n){return $t(e.getBaseValue(n))})},filterByXDomain:function(t,e){return t.map(function(n){return{id:n.id,id_org:n.id_org,values:n.values.filter(function(i){return e[0]<=i.x&&i.x<=e[1]})}})},hasDataLabel:function(){var t=this.config.data_labels;return zl(t)&&t||Ke(t)&&Wt(t)},getDataIndexFromEvent:function(t){var e=this,n=e.config,i=e.state,r=i.hasRadar,a=i.inputType,o=i.eventReceiver,s=o.coords,l=o.rect,u;if(r){var d=t.target;/tspan/i.test(d.tagName)&&(d=d.parentNode);var h=lt(d).datum();u=h&&Object.keys(h).length===1?h.index:void 0}else{var g=n.axis_rotated,x=a==="touch"&&t.changedTouches?t.changedTouches[0]:t;u=Qa(s,g?x.clientY-l.top:x.clientX-l.left,0,s.length-1,g)}return u},getDataLabelLength:function(t,e,n){var i=this,r=[0,0],a=1.3;return i.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(o){return i.dataLabelFormat(o.id)(o)}).each(function(o,s){r[s]=this.getBoundingClientRect()[n]*a}).remove(),r},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){var n=t[e].x,i=[],r;for(r=e-1;r>=0&&n===t[r].x;r--)i.push(t[r]);for(r=e;r<t.length&&n===t[r].x;r++)i.push(t[r]);return i},findClosestFromTargets:function(t,e){var n=this,i=t.map(function(r){return n.findClosest(r.values,e)});return n.findClosest(i,e)},findClosest:function(t,e){var n=this,i=n.$el.main,r=t.filter(function(s){return s&&$t(s.value)}),a,o;return r.filter(function(s){return n.isBarType(s.id)||n.isCandlestickType(s.id)}).forEach(function(s){var l=n.isBarType(s.id)?".".concat(Ne.chartBar,".").concat(Et.target).concat(n.getTargetSelectorSuffix(s.id)," .").concat(Ne.bar,"-").concat(s.index):".".concat(eo.chartCandlestick,".").concat(Et.target).concat(n.getTargetSelectorSuffix(s.id)," .").concat(eo.candlestick,"-").concat(s.index," path");!o&&n.isWithinBar(i.select(l).node())&&(o=s)}),r.filter(function(s){return!n.isBarType(s.id)&&!n.isCandlestickType(s.id)}).forEach(function(s){var l=n.dist(s,e);a=n.getPointSensitivity(s),l<a&&(a=l,o=s)}),o},dist:function(t,e){var n=this,i=n.config.axis_rotated,r=n.scale,a=+i,o=+!i,s=n.circleY(t,t.index),l=(r.zoom||r.x)(t.x);return Math.sqrt(Math.pow(l-e[a],2)+Math.pow(s-e[o],2))},convertValuesToStep:function(t){var e=this,n=e.axis,i=e.config,r=i.line_step_type,a=n?n.isCategorized():!1,o=Dt(t)?t.concat():[t];if(!(a||/step\-(after|before)/.test(r)))return t;if(o.length){var s=o[0],l=o[o.length-1],u=s.id,d=s.x;o.unshift({x:--d,value:s.value,id:u}),a&&r==="step-after"&&o.unshift({x:--d,value:s.value,id:u}),d=l.x,o.push({x:++d,value:l.value,id:u}),a&&r==="step-before"&&o.push({x:++d,value:l.value,id:u})}return o},convertValuesToRange:function(t){var e=Dt(t)?t.concat():[t],n=[];return e.forEach(function(i){var r=i.x,a=i.id;n.push({x:r,id:a,value:i.value[0]}),n.push({x:r,id:a,value:i.value[2]})}),n},updateDataAttributes:function(t,e){var n=this,i=n.config,r=i["data_".concat(t)];return ee(e)||(Object.keys(e).forEach(function(a){r[a]=e[a]}),n.redraw({withLegend:!0})),r},getRangedData:function(t,e,n){e===void 0&&(e=""),n===void 0&&(n="areaRange");var i=t==null?void 0:t.value;if(Dt(i)){if(n==="bar")return i.reduce(function(a,o){return o-a});var r={areaRange:["high","mid","low"],candlestick:["open","high","low","close","volume"]}[n].indexOf(e);return r>=0&&i?i[r]:void 0}else if(i&&e)return i[e];return i},setRatioForGroupedData:function(t){var e=this,n=e.config;if(n.data_groups.length&&t.some(function(r){return e.isGrouped(r.id)})){var i=function(r){return e.getRatio("index",r,!0)};t.forEach(function(r){"values"in r?r.values.forEach(i):i(r)})}},getRatio:function(t,e,n){n===void 0&&(n=!1);var i=this,r=i.config,a=i.state,o=i.api,s=0;if(e&&o.data.shown().length)if(s=e.ratio||e.value,t==="arc")if(i.pie.padAngle()())s=e.value/i.getTotalDataSum(!0);else{var l=r.gauge_fullCircle?i.getArcLength():i.getGaugeStartAngle()*-2,u=i.hasType("gauge")?l:Math.PI*2;s=(e.endAngle-e.startAngle)/u}else if(t==="index"){var d=o.data.values.bind(o),h=this.getTotalPerIndex();if(a.hiddenTargetIds.length){var g=d(a.hiddenTargetIds,!1);g.length&&(g=g.reduce(function(A,$){return A.map(function(S,M){return(ht(S)?S:0)+$[M]})}),h=h.map(function(A,$){return A-g[$]}))}var x=h[e.index];e.ratio=ht(e.value)&&h&&x?e.value/x:0,s=e.ratio}else if(t==="radar")s=parseFloat(String(Math.max(e.value,0)))/a.current.dataMax*r.radar_size_ratio;else if(t==="bar"){var _=i.getYScaleById.bind(i)(e.id),T=_.domain().reduce(function(A,$){return $-A});s=T===0?0:Math.abs(i.getRangedData(e,null,t)/T)}else t==="treemap"&&(s/=i.getTotalDataSum(!0));return n&&s?s*100:s},updateDataIndexByX:function(t){var e=this,n=t.reduce(function(i,r,a){return i[Number(r.x)]=a,i},{});e.data.targets.forEach(function(i){i.values.forEach(function(r,a){var o=n[Number(r.x)];o===void 0&&(o=a),r.index=o})})},isBubbleZType:function(t){var e=this;return e.isBubbleType(t)&&(Bt(t.value)&&("z"in t.value||"y"in t.value)||Dt(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this,n=t.value;return e.isBarType(t)&&Dt(n)&&n.length>=2&&n.every(function(i){return ht(i)})},getDataById:function(t){var e,n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!==null&&e!==void 0?e:n}};function Zl(t,e){e===void 0&&(e=!1);var n=this,i=n.api;e&&n.api.flush(!0),t==null||t.call(i)}var S0={load:function(t,e){var n=this,i=n.data,r=e.append,a=t;a&&(e.filter&&(a=a.filter(e.filter)),(e.type||e.types)&&a.forEach(function(o){var s,l=((s=e.types)===null||s===void 0?void 0:s[o.id])||e.type;n.setTargetType(o.id,l)}),i.targets.forEach(function(o){for(var s=0;s<a.length;s++)if(o.id===a[s].id){o.values=r?o.values.concat(a[s].values):a[s].values,a.splice(s,1);break}}),i.targets=i.targets.concat(a)),n.updateTargets(i.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),Zl.call(n,e.done,e.resizeAfter)},loadFromArgs:function(t){var e=this;e.config&&(e.cache.reset(),e.convertData(t,function(n){var i=t.data||n;t.append&&(i.__append__=!0),i&&e.load(e.convertDataToTargets(i),t)}))},unload:function(t,e){var n=this,i=n.state,r=n.$el,a=n.$T,o=e,s=t;if(n.cache.reset(),o||(o=function(){}),s=s.filter(function(u){return n.hasTarget(n.data.targets,u)}),!s||s.length===0){o();return}var l=r.svg.selectAll(s.map(function(u){return n.selectorTarget(u)}));a(l).style("opacity","0").remove().call(Dr,o),s.forEach(function(u){i.withoutFadeIn[u]=!1,r.legend&&r.legend.selectAll(".".concat(Nt.legendItem).concat(n.getTargetSelectorSuffix(u))).remove(),n.data.targets=n.data.targets.filter(function(d){return d.id!==u})}),i.hasTreemap&&n.updateTargetsForTreemap(n.data.targets),n.updateTypesElements()}},k0={setExpand:function(t,e,n){var i=this,r=i.config,a=i.$el.circle;a&&r.point_focus_expand_enabled&&i.expandCircles(t,e,n),i.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes:function(t,e,n,i){t===void 0&&(t=!0);var r=this;["bar","candlestick"].filter(function(a){return r.$el[a]}).forEach(function(a){i&&r.$el[a].classed(Et.EXPANDED,!1),r.getShapeByIndex(a,e,n).classed(Et.EXPANDED,t)})},setOverOut:function(t,e){var n=this,i=n.config,r=n.state,a=r.hasRadar,o=r.hasTreemap,s=n.$el.main,l=Bt(e);if(l||e!==-1){var u=i[t?"data_onover":"data_onout"].bind(n.api);if(i.color_onover&&n.setOverColor(t,e,l),l){var d=o?jl.treemap:Yt.arc;u(e,s.select(".".concat(d).concat(n.getTargetSelectorSuffix(e.id))).node())}else if(i.tooltip_grouped)t&&(a&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&s.selectAll(".".concat(ve.shape,"-").concat(e)).each(function(T){u(T,this)});else{var h=n.cache.get(qe.setOverOut)||[],g=s.selectAll(".".concat(ve.shape,"-").concat(e)).filter(function(T){return n.isWithinShape(this,T)}),x=g.filter(function(){var T=this;return h.every(function(A){return A!==T})});if(!t||g.empty()||h.length===x.size()&&x.nodes().every(function(T,A){return T!==h[A]}))for(;h.length;){var _=h.pop();i.data_onout.bind(n.api)(lt(_).datum(),_)}x.each(function(){t&&(u(lt(this).datum(),this),h.push(this))}),n.cache.add(qe.setOverOut,h)}}},callOverOutForTouch:function(t){var e=this,n=e.cache.get(qe.callOverOutForTouch);(Bt(t)&&n?t.id!==n.id:t!==n)&&((n||ht(n))&&e.setOverOut(!1,n),(t||ht(t))&&e.setOverOut(!0,t),e.cache.add(qe.callOverOutForTouch,t))},getDraggableSelection:function(){var t=this,e=t.config,n=t.state;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Sh().on("drag",function(i){n.event=i,t.drag(cn(i,this))}).on("start",function(i){n.event=i,t.dragstart(cn(i,this))}).on("end",function(i){n.event=i,t.dragend()}):function(){}},dispatchEvent:function(t,e,n){var i,r,a=this,o=a.config,s=a.state,l=s.eventReceiver,u=s.hasAxis,d=s.hasRadar,h=s.hasTreemap,g=a.$el,x=g.eventRect,_=g.radar,T=g.treemap,A=(r=h&&l.rect||d&&_.axes.select(".".concat(te.axis,"-").concat(e," text"))||x||((i=a.getArcElementByIdOrIndex)===null||i===void 0?void 0:i.call(a,e)))===null||r===void 0?void 0:r.node();if(A){var $=a.isMultipleX(),S=o.axis_rotated,M=A.getBoundingClientRect(),k=M.width,P=M.left,D=M.top;if(u&&!d&&!$){var p=l.coords[e];p?(k=p.w,P+=p.x,D+=p.y):(k=0,P=0,D=0)}var j=P+(n?n[0]:0)+($||S?0:k/2),U=D+(n?n[1]:0)+(S?4:0),G={screenX:j,screenY:U,clientX:j,clientY:U};Jx[/^(mouse|click)/.test(t)?"mouse":"touch"](h?T.node():A,t,G)}},setDragStatus:function(t){this.state.dragging=t},unbindZoomEvent:function(){var t=this,e=t.$el,n=e.eventRect,i=e.zoomResetBtn;n==null||n.on(".zoom wheel.zoom .drag",null),i==null||i.on("click",null).style("display","none")},unbindAllEvents:function(){var t,e=this,n=e.$el,i=n.arcs,r=n.eventRect,a=n.legend,o=n.region,s=n.svg,l=n.treemap,u=e.brush,d=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[s,r,o==null?void 0:o.list,u==null?void 0:u.getSelection(),i==null?void 0:i.selectAll("path"),a==null?void 0:a.selectAll("g"),l].forEach(function(h){return h==null?void 0:h.on(d,null)}),(t=e.unbindZoomEvent)===null||t===void 0||t.call(e)}},E0={generateClass:function(t,e){return" ".concat(t," ").concat(t+this.getTargetSelectorSuffix(e))},getClass:function(t,e){var n=this,i=/s$/.test(t),r=/^(area|arc|line|treemap)s?$/.test(t),a=i?"id":"index";return function(o){var s=o.data||o,l=(e?n.generateClass(ce[i?"shapes":"shape"],s[a]):"")+n.generateClass(ce[t],s[r?"id":a]);return l.trim()}},getChartClass:function(t){var e=this;return function(n){return ce["chart".concat(t)]+e.classTarget((n.data?n.data:n).id)}},generateExtraLineClass:function(){var t=this,e=t.config.line_classes||[],n=[];return function(i){var r,a=i.id||((r=i.data)===null||r===void 0?void 0:r.id)||i;return n.indexOf(a)<0&&n.push(a),e[n.indexOf(a)%e.length]}},classRegion:function(t,e){return"".concat(this.generateClass(ce.region,e)," ").concat("class"in t?t.class:"")},classTarget:function(t){var e=this.config.data_classes[t],n="";return e&&(n=" ".concat(ce.target,"-").concat(e)),this.generateClass(ce.target,t)+n},classFocus:function(t){return this.classFocused(t)+this.classDefocused(t)},classFocused:function(t){return" ".concat(this.state.focusedTargetIds.indexOf(t.id)>=0?ce.focused:"")},classDefocused:function(t){return" ".concat(this.state.defocusedTargetIds.indexOf(t.id)>=0?ce.defocused:"")},getTargetSelectorSuffix:function(t){var e=t||t===0?"-".concat(t):"";return e.replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,n){e===void 0&&(e=""),n===void 0&&(n="");var i=this.getTargetSelectorSuffix(t);return"".concat(e,".").concat(ce.target+i," ").concat(n,", ").concat(e,".").concat(ce.circles+i," ").concat(n)},selectorTargets:function(t,e){var n=this,i=t||[];return i.length?i.map(function(r){return n.selectorTarget(r,e)}):null},selectorLegend:function(t){return".".concat(ce.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return t!=null&&t.length?t.map(function(n){return e.selectorLegend(n)}):null}},R0={categoryName:function(t){var e,n=this.config.axis_x_categories;return(e=n==null?void 0:n[t])!==null&&e!==void 0?e:t}},M0=function(t,e,n){var i=lt(t.cloneNode(!0));return i.attr("id",n).insert("rect",":first-child").attr("width",i.attr("width")).attr("height",i.attr("height")).style("fill",e),{id:n,node:i.node()}};function L0(t){var e=qe.colorPattern,n=zt.body,i=n[e];if(!i){var r=";",a=t.classed(no.colorPattern,!0).style("background-image");t.classed(no.colorPattern,!1),a.indexOf(r)>-1&&(i=a.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(r).map(function(o){return o.trim().replace(/[\"'\s]/g,"")}).filter(Boolean),n[e]=i)}return i}var D0=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],I0={generateColor:function(){var t=this,e=t.$el,n=t.config,i=n.data_colors,r=n.data_color,a=[],o=Wt(n.color_pattern)?n.color_pattern:fl(L0(e.chart)||D0).range(),s=o;if(pt(n.color_tiles)){var l=n.color_tiles.bind(t.api)(),u=o.map(function(d,h){var g=d.replace(/[#\(\)\s,]/g,""),x="".concat(t.state.datetimeId,"-pattern-").concat(g,"-").concat(h);return M0(l[h%l.length],d,x)});o=u.map(function(d){return"url(#".concat(d.id,")")}),t.patterns=u}return function(d){var h,g=d.id||((h=d.data)===null||h===void 0?void 0:h.id)||d,x=t.isTypeOf(g,["line","spline","step"])||!n.data_types[g],_;return pt(i[g])?_=i[g].bind(t.api)(d):i[g]?_=i[g]:(a.indexOf(g)<0&&a.push(g),_=x?s[a.indexOf(g)%s.length]:o[a.indexOf(g)%o.length],i[g]=_),pt(r)?r.bind(t.api)(_,d):_}},generateLevelColor:function(){var t=this,e=t.config,n=e.color_pattern,i=e.color_threshold,r=i.unit==="value",a=i.max||100,o=i.values&&i.values.length?i.values:[];return Wt(i)?function(s){for(var l=r?s:s*100/a,u=n[n.length-1],d=0,h=o.length;d<h;d++)if(l<=o[d]){u=n[d];break}return u}:null},generateDataLabelBackgroundColorFilter:function(t){var e=this,n=e.$el,i=e.config,r=e.state,a=t||i.data_labels_backgroundColors;if(a){var o=[];Pt(a)?o.push(""):Bt(a)&&(o=Object.keys(a)),o.forEach(function(s){var l="".concat(r.datetimeId,"-labels-bg").concat(e.getTargetSelectorSuffix(s)).concat(t?e.getTargetSelectorSuffix(t):"");n.defs.append("filter").attr("x","0").attr("y","0").attr("width","1").attr("height","1").attr("id",l).html('<feFlood flood-color="'.concat(s===""?a:a[s],'" /><feComposite in="SourceGraphic"/>'))})}},getGradienColortUrl:function(t){return"url(#".concat(this.state.datetimeId,"-gradient").concat(this.getTargetSelectorSuffix(t),")")},updateLinearGradient:function(){var t=this,e=t.config,n=t.data.targets,i=t.state.datetimeId,r=t.$el.defs;n.forEach(function(a){var o="".concat(i,"-gradient").concat(t.getTargetSelectorSuffix(a.id)),s=t.hasPointType()&&e.point_radialGradient,l=t.isAreaType(a)&&"area"||t.isBarType(a)&&"bar";if((s||l)&&r.select("#".concat(o)).empty()){var u=t.color(a),d={defs:null,stops:[]};if(s){var h=s.cx,g=h===void 0?.3:h,x=s.cy,_=x===void 0?.3:x,T=s.r,A=T===void 0?.7:T,$=s.stops,S=$===void 0?[[.1,u,0],[.9,u,1]]:$;d.stops=S,d.defs=r.append("radialGradient").attr("id","".concat(o)).attr("cx",g).attr("cy",_).attr("r",A)}else{var M=e.axis_rotated,k=e["".concat(l,"_linearGradient")],P=k.x,D=P===void 0?M?[1,0]:[0,0]:P,p=k.y,j=p===void 0?M?[0,0]:[0,1]:p,U=k.stops,S=U===void 0?[[0,u,1],[1,u,0]]:U;d.stops=S,d.defs=r.append("linearGradient").attr("id","".concat(o)).attr("x1",D[0]).attr("x2",D[1]).attr("y1",j[0]).attr("y2",j[1])}d.stops.forEach(function(G){var X=G[0],Q=G[1],z=G[2],q=pt(Q)?Q.bind(t.api)(a.id):Q;d.defs&&d.defs.append("stop").attr("offset",X).attr("stop-color",q||u).attr("stop-opacity",z)})}})},setOverColor:function(t,e){var n=this,i=n.config,r=n.$el.main,a=i.color_onover,o=t?a:n.color;Bt(o)?o=function(s){var l=s.id;return l in a?a[l]:n.color(l)}:Pt(o)?o=function(){return a}:pt(a)&&(o=o.bind(n.api)),r.selectAll(Bt(e)?".".concat(Yt.arc).concat(n.getTargetSelectorSuffix(e.id)):".".concat(ve.shape,"-").concat(e)).style("fill",o)}},N0={getYDomainMinMax:function(t,e){var n=this,i=n.axis,r=n.config,a=e==="min",o=r.data_groups,s=n.mapToIds(t),l=n.getValuesAsIdKeyed(t);if(o.length>0){var u=n["has".concat(a?"Negative":"Positive","ValueInTargets")](t);o.forEach(function(d){var h=d.filter(function(_){return s.indexOf(_)>=0});if(h.length){var g=h[0],x=i.getId(g);u&&l[g]&&(l[g]=l[g].map(function(_){return(a?_<0:_>0)?_:0})),h.filter(function(_,T){return T>0}).forEach(function(_){if(l[_]){var T=i.getId(_);l[_].forEach(function(A,$){var S=+A,M=a?S>0:S<0;T===x&&!(u&&M)&&(l[g][$]+=S)})}})}})}return yn(e,Object.keys(l).map(function(d){return yn(e,l[d])}))},isHiddenTargetWithYDomain:function(t){var e=this;return e.state.hiddenTargetIds.some(function(n){return e.axis.getId(n)===t})},getYDomain:function(t,e,n){var i=this,r=i.axis,a=i.config,o=i.scale,s="axis_".concat(e);if(i.isStackNormalized())return[0,100];var l=(o==null?void 0:o[e])&&o[e].type==="log",u=t.filter(function(q){return r.getId(q.id)===e}),d=n?i.filterByXDomain(u,n):u;if(d.length===0)return i.isHiddenTargetWithYDomain(e)?o[e].domain():e==="y2"?o.y.domain():i.getYDomain(t,"y2",n);var h=a["".concat(s,"_min")],g=a["".concat(s,"_max")],x=a["".concat(s,"_center")],_=a["".concat(s,"_inverted")],T=i.hasDataLabel()&&a.axis_rotated,A=i.hasDataLabel()&&!a.axis_rotated,$=i.getYDomainMinMax(d,"min"),S=i.getYDomainMinMax(d,"max"),M=qt([_t.BAR,_t.BUBBLE,_t.SCATTER],xn.Line,!0).some(function(q){var Mt=q.indexOf("area")>-1?"area":q;return i.hasType(q,d,!0)&&a["".concat(Mt,"_zerobased")]});$=$t(h)?h:$t(g)?$<=g?$:g-10:$,S=$t(g)?g:$t(h)?h<=S?S:h+10:S,isNaN($)&&($=0),isNaN(S)&&(S=$),$===S&&($<0?S=0:$=0);var k=$>=0&&S>=0,P=$<=0&&S<=0;($t(h)&&k||$t(g)&&P)&&(M=!1),M&&(k&&($=0),P&&(S=0));var D=Math.abs(S-$),p={top:D*.1,bottom:D*.1};if(Ft(x)){var j=Math.max(Math.abs($),Math.abs(S));S=x+j,$=x-j}if(T){var U=Mi(o.y.range()),G=i.getDataLabelLength($,S,"width").map(function(q){return q/U});["bottom","top"].forEach(function(q,Mt){p[q]+=D*(G[Mt]/(1-G[0]-G[1]))})}else if(A){var X=i.getDataLabelLength($,S,"height");["bottom","top"].forEach(function(q,Mt){p[q]+=i.convertPixelToScale("y",X[Mt],D)})}p=i.getResettedPadding(p);var Q=a["".concat(s,"_padding")];Wt(Q)&&["bottom","top"].forEach(function(q){p[q]=r.getPadding(Q,q,p[q],D)}),M&&(k&&(p.bottom=$),P&&(p.top=-S));var z=l?[$,S].map(function(q){return q<0?0:q}):[$-p.bottom,S+p.top];return _?z.reverse():z},getXDomainMinMax:function(t,e){var n,i=this,r=i.config["axis_x_".concat(e)],a=yn(e,t.map(function(s){return yn(e,s.values.map(function(l){return l.x}))})),o=Bt(r)?r.value:r;return o=Ft(o)&&(!((n=i.axis)===null||n===void 0)&&n.isTimeSeries())?Fe.bind(this)(o):o,Bt(r)&&r.fit&&(e==="min"&&o<a||e==="max"&&o>a)&&(o=void 0),Ft(o)?o:a},getXDomainPadding:function(t,e){var n=this,i=n.axis,r=n.config,a=r.axis_x_padding,o=i.isTimeSeries()&&e,s=Mi(t),l;if(i.isCategorized()||o)l=0;else if(n.hasType("bar")){var u=n.getMaxDataCount();l=u>1?s/(u-1)/2:.5}else l=n.getResettedPadding(s*.01);var d=ht(a)?{left:a,right:a}:a,h=d.left,g=h===void 0?l:h,x=d.right,_=x===void 0?l:x;if(a.unit==="px"){var T=Math.abs(s+s*.2);g=i.getPadding(a,"left",l,T),_=i.getPadding(a,"right",l,T)}else{var A=s+g+_;if(o&&A){var $=s/e/A;g=g/A/$,_=_/A/$}}return{left:g,right:_}},getXDomain:function(t){var e=this,n=e.axis,i=e.config,r=e.scale.x,a=i.axis_x_inverted,o=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],s=o[0],l=s===void 0?0:s,u=o[1],d=u===void 0?0:u;if(r.type!=="log"){var h=n.isCategorized(),g=n.isTimeSeries(),x=e.getXDomainPadding(o),_=o[0],T=o[1];_-T===0&&!h&&(g?(_=new Date(_.getTime()*.5),T=new Date(T.getTime()*1.5)):(_=_===0?1:_*.5,T=T===0?-1:T*1.5)),(_||_===0)&&(l=g?new Date(_.getTime()-x.left):_-x.left),(T||T===0)&&(d=g?new Date(T.getTime()+x.right):T+x.right)}return a?[d,l]:[l,d]},updateXDomain:function(t,e,n,i,r){var a,o=this,s=o.config,l=o.org,u=o.scale,d=u.x,h=u.subX,g=s.zoom_enabled;if(n&&(d.domain(r||ci(o.getXDomain(t),!s.axis_x_inverted)),l.xDomain=d.domain(),h.domain(d.domain()),(a=o.brush)===null||a===void 0||a.scale(h)),e){var x=r||!o.brush||Wx(o)?l.xDomain:Yl(o).map(h.invert);d.domain(x)}return(n||e)&&g&&o.zoom.updateScaleExtent(),i&&d.domain(o.trimXDomain(d.orgDomain())),d.domain()},trimXDomain:function(t){var e=this,n=e.config.axis_x_inverted,i=e.getZoomDomain(),r=i[0],a=i[1];return(n?t[0]>=r:t[0]<=r)&&(t[1]=+t[1]+(r-t[0]),t[0]=r),(n?t[1]<=a:t[1]>=a)&&(t[0]=+t[0]-(t[1]-a),t[1]=a),t},getZoomDomain:function(t,e){t===void 0&&(t="zoom"),e===void 0&&(e=!1);var n=this,i=n.config,r=n.scale,a=n.org,o=e&&r[t]?r[t].domain():a.xDomain,s=o[0],l=o[1];return t==="zoom"&&(Ft(i.zoom_x_min)&&(s=yn("min",[s,i.zoom_x_min])),Ft(i.zoom_x_max)&&(l=yn("max",[l,i.zoom_x_max]))),[s,l]},convertPixelToScale:function(t,e,n){var i=this,r=i.config,a=i.state,o=r.axis_rotated,s;return t==="x"?s=o?"height":"width":s=o?"width":"height",n*(e/a[s])},withinRange:function(t,e,n){var i=this,r=i.config.axis_x_inverted,a=n,o=a[0],s=a[1];if(Array.isArray(t)){var l=qt([],t,!0);if(r&&l.reverse(),l[0]<l[1])return t.every(function(u,d){return(d===0?r?+u<=o:+u>=o:r?+u>=s:+u<=s)&&!t.every(function(h,g){return h===e[g]})})}return!1}};function yc(t,e,n){var i=t.config,r="axis_".concat(e,"_tick_format"),a=i[r]?i[r]:t.defaultValueFormat;return a.call(t.api,n)}var P0={yFormat:function(t){return yc(this,"y",t)},y2Format:function(t){return yc(this,"y2",t)},getDefaultValueFormat:function(){var t=this,e=t.defaultArcValueFormat,n=t.yFormat,i=t.y2Format,r=t.hasArcType(null,["gauge","polar","radar"]);return function(a,o,s){var l=r?e:t.axis&&t.axis.getId(s)==="y2"?i:n;return l.call(t,a,o)}},defaultValueFormat:function(t){return Dt(t)?t.join("~"):$t(t)?+t:""},defaultArcValueFormat:function(t,e){return"".concat((e*100).toFixed(1),"%")},defaultPolarValueFormat:function(t){return"".concat(t)},dataLabelFormat:function(t){var e=this,n=e.config.data_labels,i=function(a){var o="~",s=a;return Dt(a)?s=a.join(o):Bt(a)&&(s=Object.values(a).join(o)),s},r=i;return pt(n.format)?r=n.format:Ke(n.format)&&(n.format[t]?r=n.format[t]===!0?i:n.format[t]:r=function(){return""}),r.bind(e.api)}};function ar(t){var e=this,n=e.getDataById(t),i=e.levelColor?e.levelColor(n.values[0].value):e.color(n);return i}var O0={initLegend:function(){var t=this,e=t.config,n=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(n.legend=t.$el.svg.append("g").classed(Nt.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,n){var i,r=this,a=r.config,o=r.state,s=r.scale,l=r.$el,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=mn(u,"withTransition",!0),u.withTransitionForTransform=mn(u,"withTransitionForTransform",!0),a.legend_contents_bindto&&a.legend_contents_template?r.updateLegendTemplate():o.hasTreemap||r.updateLegendElement(t||r.mapToIds(r.data.targets),u,n),(i=l.legend)===null||i===void 0||i.selectAll(".".concat(Nt.legendItem)).classed(Nt.legendItemHidden,function(d){var h=!r.isTargetToShow(d);return h&&(this.style.opacity=null),h}),r.updateScales(!1,!s.zoom),r.updateSvgSize(),r.transformAll(u.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate:function(){var t=this,e=t.config,n=t.$el,i=lt(e.legend_contents_bindto),r=e.legend_contents_template;if(!i.empty()){var a=t.mapToIds(t.data.targets),o=[],s="";a.forEach(function(u){var d=pt(r)?r.bind(t.api)(u,t.color(u),t.api.data(u)[0].values):Nr(r,{COLOR:t.color(u),TITLE:u});d&&(o.push(u),s+=d)});var l=i.html(s).selectAll(function(){return this.childNodes}).data(o);t.setLegendItem(l),n.legend=i}},updateSizeForLegend:function(t){var e=this,n=e.config,i=e.state,r=i.isLegendTop,a=i.isLegendLeft,o=i.isLegendRight,s=i.isLegendInset,l=i.current,u=t.width,d=t.height,h={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-d-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:a?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-u-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?h.top:l.height-d,right:NaN,bottom:0,left:o?l.width-u:s?h.left:0}},transformLegend:function(t){var e=this,n=e.$el.legend,i=e.$T;i(n,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){var n=this.$el.legend;n&&n.select(".".concat(Nt.legendItem,"-").concat(t," line")).style("stroke",e)},getLegendWidth:function(){var t=this,e=t.state,n=e.current.width,i=e.isLegendRight,r=e.isLegendInset,a=e.legendItemWidth,o=e.legendStep;return t.config.legend_show?i||r?a*(o+1):n:0},getLegendHeight:function(){var t,e=this,n=e.state,i=n.current,r=n.isLegendRight,a=n.legendItemHeight,o=n.legendStep,s=((t=e.config.padding)===null||t===void 0?void 0:t.mode)==="fit";return e.config.legend_show?r?i.height:(s?10:Math.max(20,a))*(o+1):0},opacityForUnfocusedLegend:function(t){return t.classed(Nt.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,i=n.$el.legend,r=n.$T,a=n.mapToTargetIds(t);i&&r(i.selectAll(".".concat(Nt.legendItem)).filter(function(o){return a.indexOf(o)>=0}).classed(Xt.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,lt(this))})},revertLegend:function(){var t=this,e=t.$el.legend,n=t.$T;e&&n(e.selectAll(".".concat(Nt.legendItem)).classed(Xt.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){var e=this,n=e.config,i=e.$el,r=e.$T;n.legend_show||(n.legend_show=!0,i.legend?i.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),r(i.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){var e=this,n=e.config,i=e.$el.legend;n.legend_show&&Qe(t)&&(n.legend_show=!1,i.style("visibility","hidden")),e.addHiddenLegendIds(t),i.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){var n=this,i=n.cache,r=n.state,a,o=qe.legendItemTextBox;return t&&(a=!r.redrawing&&i.get(o)||{},a[t]||(a[t]=n.getTextRect(e,Nt.legendItem),i.add(o,a)),a=a[t]),a},setLegendItem:function(t){var e=this,n=e.$el,i=e.api,r=e.config,a=e.state,o=a.inputType==="touch",s=e.hasType("gauge"),l=r.boost_useCssRule,u=r.legend_item_interaction;t.attr("class",function(d){var h=lt(this),g=!h.empty()&&h.attr("class")||"";return g+e.generateClass(Nt.legendItem,d)}).style("visibility",function(d){return e.isLegendToShow(d)?null:"hidden"}),r.interaction_enabled&&(l&&[[".".concat(Nt.legendItem),"cursor:pointer"],[".".concat(Nt.legendItem," text"),"pointer-events:none"],[".".concat(Nt.legendItemPoint," text"),"pointer-events:none"],[".".concat(Nt.legendItemTile),"pointer-events:none"],[".".concat(Nt.legendItemEvent),"fill-opacity:0"]].forEach(function(d){var h=d[0],g=d[1];e.setCssRule(!1,h,[g])(n.legend)}),t.on(u.dblclick?"dblclick":"click",u||pt(r.legend_item_onclick)?function(d,h){if(!Gt(r.legend_item_onclick,i,h)){var g=d.altKey,x=d.target,_=d.type;_==="dblclick"||g?a.hiddenTargetIds.length&&x.parentNode.getAttribute("class").indexOf(Nt.legendItemHidden)===-1?i.show():(i.hide(),i.show(h)):(i.toggle(h),lt(this).classed(Xt.legendItemFocused,!1))}o&&e.hideTooltip()}:null),!o&&t.on("mouseout",u||pt(r.legend_item_onout)?function(d,h){Gt(r.legend_item_onout,i,h)||(lt(this).classed(Xt.legendItemFocused,!1),s&&e.undoMarkOverlapped(e,".".concat(Ge.gaugeValue)),e.api.revert())}:null).on("mouseover",u||pt(r.legend_item_onover)?function(d,h){Gt(r.legend_item_onover,i,h)||(lt(this).classed(Xt.legendItemFocused,!0),s&&e.markOverlapped(h,e,".".concat(Ge.gaugeValue)),!a.transiting&&e.isTargetToShow(h)&&i.focus(h))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n=this,i=n.config,r=n.state,a=n.$el.legend,o=n.$T,s=i.legend_item_tile_type,l=s!=="circle",u=i.legend_item_tile_r,d={width:l?i.legend_item_tile_width:u*2,height:l?i.legend_item_tile_height:u*2},h={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:d.width+5,totalLength:0},g={offsets:{},widths:{},heights:{},margins:[0],steps:{}},x,_,T,A=t.filter(function(D){return!Ft(i.data_names[D])||i.data_names[D]!==null}),$=e.withTransition,S=n.getUpdateLegendPositions(A,h,g);r.isLegendInset&&(h.step=i.legend_inset_step?i.legend_inset_step:A.length,n.updateLegendStep(h.step)),r.isLegendRight?(x=function(D){return h.max.width*g.steps[D]},_=function(D){return g.margins[g.steps[D]]+g.offsets[D]}):r.isLegendInset?(x=function(D){return h.max.width*g.steps[D]+10},_=function(D){return g.margins[g.steps[D]]+g.offsets[D]}):(x=function(D){return g.margins[g.steps[D]]+g.offsets[D]},_=function(D){return h.max.height*g.steps[D]});var M={xText:function(D,p){return x(D,p)+4+d.width},xRect:function(D,p){return x(D,p)},x1Tile:function(D,p){return x(D,p)-2},x2Tile:function(D,p){return x(D,p)-2+d.width},yText:function(D,p){return _(D,p)+9},yRect:function(D,p){return _(D,p)-5},yTile:function(D,p){return _(D,p)+4}};n.generateLegendItem(A,d,S,M),T=a.select(".".concat(Nt.legendBackground," rect")),r.isLegendInset&&h.max.width>0&&T.size()===0&&(T=a.insert("g",".".concat(Nt.legendItem)).attr("class",Nt.legendBackground).append("rect"));var k=a.selectAll("text").data(A).text(function(D){return Ft(i.data_names[D])?i.data_names[D]:D}).each(function(D,p){S(this,D,p)});o(k,$).attr("x",M.xText).attr("y",M.yText);var P=a.selectAll("rect.".concat(Nt.legendItemEvent)).data(A);o(P,$).attr("width",function(D){return g.widths[D]}).attr("height",function(D){return g.heights[D]}).attr("x",M.xRect).attr("y",M.yRect),n.updateLegendItemPos(A,$,M),T&&o(T,$).attr("height",n.getLegendHeight()-12).attr("width",h.max.width*(h.step+1)+10),n.updateLegendItemWidth(h.max.width),n.updateLegendItemHeight(h.max.height),n.updateLegendStep(h.step)},getUpdateLegendPositions:function(t,e,n){var i=this,r=i.config,a=i.state,o=a.isLegendRight||a.isLegendInset;return function(s,l,u){var d=u===0,h=u===t.length-1,g=i.getLegendItemTextBox(l,s),x=g.width+e.tileWidth+(h&&!o?0:e.padding.right)+r.legend_padding,_=g.height+e.padding.top,T=o?_:x,A=o?i.getLegendHeight():i.getLegendWidth(),$,S=function(k,P){P||($=(A-e.totalLength-T)/2,$<e.posMin&&($=(A-T)/2,e.totalLength=0,e.step++)),n.steps[k]=e.step,n.margins[e.step]=a.isLegendInset?10:$,n.offsets[k]=e.totalLength,e.totalLength+=T};if(d&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),r.legend_show&&!i.isLegendToShow(l)){n.widths[l]=0,n.heights[l]=0,n.steps[l]=0,n.offsets[l]=0;return}n.widths[l]=x,n.heights[l]=_,(!e.max.width||x>=e.max.width)&&(e.max.width=x),(!e.max.height||_>=e.max.height)&&(e.max.height=_);var M=o?e.max.height:e.max.width;r.legend_equally?(Object.keys(n.widths).forEach(function(k){return n.widths[k]=e.max.width}),Object.keys(n.heights).forEach(function(k){return n.heights[k]=e.max.height}),$=(A-M*t.length)/2,$<e.posMin?(e.totalLength=0,e.step=0,t.forEach(function(k){return S(k)})):S(l,!0)):S(l)}},generateLegendItem:function(t,e,n,i){var r=this,a=r.config,o=r.state,s=r.$el.legend,l=a.legend_usePoint,u=a.legend_item_tile_r,d=a.legend_item_tile_type,h=d!=="circle",g=o.isLegendRight||o.isLegendInset,x=-200,_=s.selectAll(".".concat(Nt.legendItem)).data(t).enter().append("g");if(r.setLegendItem(_),_.append("text").text(function(A){return Ft(a.data_names[A])?a.data_names[A]:A}).each(function(A,$){n(this,A,$)}).style("pointer-events",r.getStylePropValue("none")).attr("x",g?i.xText:x).attr("y",g?x:i.yText),_.append("rect").attr("class",Nt.legendItemEvent).style("fill-opacity",r.getStylePropValue("0")).attr("x",g?i.xRect:x).attr("y",g?x:i.yRect),l){var T=[];_.append(function(A){var $=Wt(a.point_pattern)?a.point_pattern:[a.point_type];T.indexOf(A)===-1&&T.push(A);var S=$[T.indexOf(A)%$.length];return S==="rectangle"&&(S="rect"),zt.createElementNS(ti.svg,"hasValidPointType"in r&&r.hasValidPointType(S)?S:"use")}).attr("class",Nt.legendItemPoint).style("fill",ar.bind(r)).style("pointer-events",r.getStylePropValue("none")).attr("href",function(A,$,S){var M=S[$],k=M.nodeName.toLowerCase(),P=r.getTargetSelectorSuffix(A);return k==="use"?"#".concat(o.datetimeId,"-point").concat(P):void 0})}else _.append(h?"line":d).attr("class",Nt.legendItemTile).style("stroke",ar.bind(r)).style("pointer-events",r.getStylePropValue("none")).call(function(A){d==="circle"?A.attr("r",u).style("fill",ar.bind(r)).attr("cx",g?i.x2Tile:x).attr("cy",g?x:i.yTile):h&&A.attr("stroke-width",e.height).attr("x1",g?i.x1Tile:x).attr("y1",g?x:i.yTile).attr("x2",g?i.x2Tile:x).attr("y2",g?x:i.yTile)})},updateLegendItemPos:function(t,e,n){var i=this,r=i.config,a=i.$el.legend,o=i.$T,s=r.legend_usePoint,l=r.legend_item_tile_type,u=l!=="circle";if(s){var d=a.selectAll(".".concat(Nt.legendItemPoint)).data(t);o(d,e).each(function(){var h=this.nodeName.toLowerCase(),g=r.point_r,x="x",_="y",T=2,A=2.5,$=null,S=null,M=null;if(h==="circle"){var k=g*.2;x="cx",_="cy",$=g+k,T=g*2,A=-k}else if(h==="rect"){var k=g*2.5;S=k,M=k,A=3}lt(this).attr(x,function(P){return n.x1Tile(P)+T}).attr(_,function(P){return n.yTile(P)-A}).attr("r",$).attr("width",S).attr("height",M)})}else{var d=a.selectAll(".".concat(Nt.legendItemTile)).data(t);o(d,e).style("stroke",ar.bind(i)).call(function(g){l==="circle"?g.attr("cx",function(x){var _=n.x2Tile(x);return _-(_-n.x1Tile(x))/2}).attr("cy",n.yTile):u&&g.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},F0={redraw:function(t){var e,n,i;t===void 0&&(t={});var r=this,a=r.config,o=r.state,s=r.$el,l=s.main,u=s.treemap;o.redrawing=!0;var d=r.filterTargetsToShow(r.data.targets),h=t.flow,g=t.initializing,x=r.getWithOption(t),_=x.Transition?a.transition_duration:0,T=x.TransitionForExit?_:0,A=x.TransitionForAxis?_:0,$=(e=r.axis)===null||e===void 0?void 0:e.generateTransitions(A);r.updateSizes(g),x.Legend&&a.legend_show?(t.withTransition=!!_,!u&&r.updateLegend(r.mapToIds(r.data.targets),t,$)):x.Dimension&&r.updateDimension(!0),a.data_empty_label_text&&l.select("text.".concat(we.text,".").concat(Et.empty)).attr("x",o.width/2).attr("y",o.height/2).text(a.data_empty_label_text).style("display",d.length?"none":null),o.hasAxis?(r.axis.redrawAxis(d,x,$,h,g),r.hasGrid()&&r.updateGrid(),a.regions.length&&r.updateRegion(),["bar","candlestick","line","area"].forEach(function(S){var M=hn(S);(/^(line|area)$/.test(S)&&r.hasTypeOf(M)||r.hasType(S))&&r["update".concat(M)](x.TransitionForExit)}),s.text&&l.selectAll(".".concat(Qt.selectedCircles)).filter(r.isBarType.bind(r)).selectAll("circle").remove(),a.interaction_enabled&&!h&&x.EventRect&&(r.redrawEventRect(),(n=r.bindZoomEvent)===null||n===void 0||n.call(r))):(s.arcs&&r.redrawArc(_,T,x.Transform),s.radar&&r.redrawRadar(),s.polar&&r.redrawPolar(),u&&r.updateTreemap(T)),!o.resizing&&!u&&(r.hasPointType()||o.hasRadar)&&r.updateCircle(),r.hasDataLabel()&&!r.hasArcType(null,["radar"])&&r.updateText(),(i=r.redrawTitle)===null||i===void 0||i.call(r),g&&r.updateTypesElements(),r.generateRedrawList(d,h,_,x.Subchart),r.updateTooltipOnRedraw(),r.callPluginHook("$redraw",t,_)},generateRedrawList:function(t,e,n,i){var r=this,a=r.config,o=r.state,s=r.getDrawShape();o.hasAxis&&a.subchart_show&&r.redrawSubchart(i,n,s);var l=e&&r.generateFlow({targets:t,flow:e,duration:e.duration,shape:s,xv:r.xv.bind(r)}),u=(n||l)&&Yi(),d=r.getRedrawList(s,e,l,u),h=function(){l&&l(),o.redrawing=!1,Gt(a.onrendered,r.api)};if(h)if(u&&d.length){var g=Gl();nl().duration(n).each(function(){d.reduce(function(x,_){return x.concat(_)},[]).forEach(function(x){return g.add(x)})}).call(g,h)}else o.transiting||h();r.mapToIds(r.data.targets).forEach(function(x){o.withoutFadeIn[x]=!0})},getRedrawList:function(t,e,n,i){var r=this,a=r.config,o=r.state,s=o.hasAxis,l=o.hasRadar,u=o.hasTreemap,d=r.$el.grid,h=t.pos,g=h.cx,x=h.cy,_=h.xForText,T=h.yForText,A=[];return s&&((a.grid_x_lines.length||a.grid_y_lines.length)&&A.push(r.redrawGrid(i)),a.regions.length&&A.push(r.redrawRegion(i)),Object.keys(t.type).forEach(function($){var S=hn($),M=t.type[$];(/^(area|line)$/.test($)&&r.hasTypeOf(S)||r.hasType($))&&A.push(r["redraw".concat(S)](M,i))}),!e&&d.main&&A.push(r.updateGridFocus())),(!r.hasArcType()||l)&&Wt(a.data_labels)&&a.data_labels!==!1&&A.push(r.redrawText(_,T,e,i)),(r.hasPointType()||l)&&!r.isPointFocusOnly()&&r.redrawCircle&&A.push(r.redrawCircle(g,x,i,n)),u&&A.push(r.redrawTreemap(i)),A},updateAndRedraw:function(t){t===void 0&&(t={});var e=this,n=e.config,i=e.state,r;t.withTransition=mn(t,"withTransition",!0),t.withTransform=mn(t,"withTransform",!1),t.withLegend=mn(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=mn(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(i.hasAxis&&(r=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,r)),e.redraw(t,r)}};function Nn(t,e,n){t===void 0&&(t="linear"),e===void 0&&(e=0),n===void 0&&(n=1);var i={linear:Ar,log:vl,_log:pl,time:ux,utc:fx}[t]();return i.type=t,/_?log/.test(t)&&i.clamp(!0),i.range([e,n])}var B0={getXScale:function(t,e,n,i){var r=this,a=r.scale.zoom||Nn(r.axis.getAxisType("x"),t,e);return r.getCustomizedXScale(n?a.domain(n):a,i)},getYScale:function(t,e,n,i){var r=this,a=Nn(r.axis.getAxisType(t),e,n);return i&&a.domain(i),a},getYScaleById:function(t,e){var n;e===void 0&&(e=!1);var i=((n=this.axis)===null||n===void 0?void 0:n.getId(t))==="y2",r=e?i?"subY2":"subY":i?"y2":"y";return this.scale[r]},getCustomizedXScale:function(t,e){var n=this,i=e||function(){return n.axis.x.tickOffset()},r=n.config.axis_x_inverted,a=function(s,l){var u=t(s)+i();return l?u:Math.ceil(u)};for(var o in t)a[o]=t[o];return a.orgDomain=function(){return t.domain()},a.orgScale=function(){return t},n.axis.isCategorized()&&(a.domain=function(s){var l=s;return arguments.length?(t.domain(l),a):(l=this.orgDomain(),r?[l[0]+1,l[1]]:[l[0],l[1]+1])}),a},updateScales:function(t,e){var n,i;e===void 0&&(e=!0);var r=this,a=r.axis,o=r.config,s=r.format,l=r.org,u=r.scale,d=r.state,h=d.current,g=d.width,x=d.height,_=d.width2,T=d.height2,A=d.hasAxis,$=d.hasTreemap;if(A){var S=o.axis_rotated,M=r.getResettedPadding(1),k={x:S?M:0,y:S?0:x,subX:S?1:0,subY:S?0:T},P={x:S?x:g,y:S?g:M,subX:S?x:g,subY:S?_:1},D=e&&((n=u.x)===null||n===void 0?void 0:n.orgDomain()),p=e&&l.xDomain;u.x=r.getXScale(k.x,P.x,D,function(){return a.x.tickOffset()}),u.subX=r.getXScale(k.x,P.x,p,function(U){var G;return U%1?0:((G=a.subX)!==null&&G!==void 0?G:a.x).tickOffset()}),s.xAxisTick=a.getXAxisTickFormat(),s.subXAxisTick=a.getXAxisTickFormat(!0),a.setAxis("x",u.x,o.axis_x_tick_outer,t),o.subchart_show&&a.setAxis("subX",u.subX,o.axis_x_tick_outer,t),u.y=r.getYScale("y",k.y,P.y,u.y?u.y.domain():o.axis_y_default),u.subY=r.getYScale("y",k.subY,P.subY,u.subY?u.subY.domain():o.axis_y_default),a.setAxis("y",u.y,o.axis_y_tick_outer,t),o.axis_y2_show&&(u.y2=r.getYScale("y2",k.y,P.y,u.y2?u.y2.domain():o.axis_y2_default),u.subY2=r.getYScale("y2",k.subY,P.subY,u.subY2?u.subY2.domain():o.axis_y2_default),a.setAxis("y2",u.y2,o.axis_y2_tick_outer,t))}else if($){var j=r.getCurrentPadding();u.x=Ar().rangeRound([j.left,h.width-j.right]),u.y=Ar().rangeRound([j.top,h.height-j.bottom])}else(i=r.updateArc)===null||i===void 0||i.call(r)},xx:function(t){var e=this,n=e.config,i=e.scale,r=i.x,a=i.zoom,o=n.zoom_enabled&&a?a:r;return t?o($t(t.x)?t.x:t):null},xv:function(t){var e=this,n=e.axis,i=e.config,r=e.scale,a=r.x,o=r.zoom,s=i.zoom_enabled&&o?o:a,l=e.getBaseValue(t);return n.isTimeSeries()?l=Fe.call(e,l):n.isCategorized()&&Pt(l)&&(l=i.axis_x_categories.indexOf(l)),Math.ceil(s(l))},yv:function(t){var e=this,n=e.scale,i=n.y,r=n.y2,a=t.axis&&t.axis==="y2"?r:i;return Math.ceil(a(e.getBaseValue(t)))},subxx:function(t){return t?this.scale.subX(t.x):null}};function X0(t){var e=this,n;return e.isLineType(t)?n=e.generateGetLinePoints(e.getShapeIndices(e.isLineType)):e.isBarType(t)&&(n=e.generateGetBarPoints(e.getShapeIndices(e.isBarType))),n}var z0={getDrawShape:function(){var t=this,e=t.config.axis_rotated,n=t.state,i=n.hasRadar,r=n.hasTreemap,a={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area"].forEach(function(l){var u=hn(/^(bubble|scatter)$/.test(l)?"line":l);if(t.hasType(l)||t.hasTypeOf(u)||l==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){var d=t.getShapeIndices(t["is".concat(u,"Type")]),h=t["generateDraw".concat(u)];a.indices[l]=d,a.type[l]=h?h.bind(t)(d,!1):void 0}}),!t.hasArcType()||i||r){var o=void 0,s=void 0;r||(o=i?t.radarCircleX:e?t.circleY:t.circleX,s=i?t.radarCircleY:e?t.circleX:t.circleY),a.pos={xForText:t.generateXYForText(a.indices,!0),yForText:t.generateXYForText(a.indices,!1),cx:(o||function(){}).bind(t),cy:(s||function(){}).bind(t)}}return a},getShapeIndices:function(t){var e=this,n=e.config,i=n.data_xs,r=Wt(i),a={},o=r?{}:0;return r&&Ja(Object.keys(i).map(function(s){return i[s]})).forEach(function(s){o[s]=0,a[s]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(function(s){for(var l,u=(s.id in i)?i[s.id]:"",d=u?a[u]:a,h=0,g=void 0;g=n.data_groups[h];h++)if(!(g.indexOf(s.id)<0))for(var x=0,_=void 0;_=g[x];x++){if(_ in d){d[s.id]=d[_];break}s.id!==_&&u&&(d[_]=(l=d[s.id])!==null&&l!==void 0?l:o[u])}ee(d[s.id])&&(d[s.id]=u?o[u]++:o++,d.__max__=(u?o[u]:o)-1)}),a},getIndices:function(t,e,n){var i=this,r=i.config,a=r.data_xs,o=r.bar_indices_removeNull,s=e.id,l=e.index;if(i.isBarType(s)&&o){var u={};return i.getAllValuesOnIndex(l,!0).forEach(function(d,h){u[d.id]=h,u.__max__=h}),u}return Wt(a)?t[a[s]]:t},getIndicesMax:function(t){return Wt(this.config.data_xs)?Object.keys(t).map(function(e){return t[e].__max__||0}).reduce(function(e,n){return e+n}):t.__max__},getShapeX:function(t,e,n){var i=this,r=i.config,a=i.scale,o=n?a.subX:a.zoom||a.x,s=r.bar_overlap,l=r.bar_padding,u=function(h,g){return h+g},d=Ke(t)&&(t._$total.length?t._$total.reduce(u)/2:0);return function(h){var g=i.getIndices(e,h,"getShapeX"),x=h.id in g?g[h.id]:0,_=(g.__max__||0)+1,T=0;if(Wt(h.x)){var A=o(h.x,!0);if(d){var $=t[h.id]||t._$width;T=s?A-$/2:A-$+t._$total.slice(0,x+1).reduce(u)-d}else T=A-(ht(t)?t:t._$width)*(_/2-(s?1:x))}return t&&T&&_>1&&l&&(x&&(T+=l*x),_>2?T-=(_-1)*l/2:_===2&&(T-=l/2)),T}},getShapeY:function(t){var e=this,n=e.isStackNormalized();return function(i){var r=i.value;return ht(i)?r=i:e.isAreaRangeType(i)?r=e.getBaseValue(i,"mid"):n?r=e.getRatio("index",i,!0):e.isBubbleZType(i)?r=e.getBubbleZData(i.value,"y"):e.isBarRangeType(i)&&(r=r[1]),e.getYScaleById(i.id,t)(r)}},getShapeYMin:function(t){var e=this,n=e.axis.getId(t),i=e.scale[n],r=i.domain()[0],a=e.config["axis_".concat(n,"_inverted")];return!e.isGrouped(t)&&!a&&r>0?r:0},getShapeOffsetData:function(t){var e=this,n=e.orderTargets(e.filterTargetsToShow(e.data.targets.filter(t,e))),i=e.isStackNormalized(),r=n.map(function(o){var s=o.values,l={};e.isStepType(o)&&(s=e.convertValuesToStep(s));var u=s.reduce(function(d,h){var g=Number(h.x);return d[g]=h,l[g]=i?e.getRatio("index",h,!0):h.value,d},{});return{id:o.id,rowValues:s,rowValueMapByXValue:u,values:l}}),a=n.reduce(function(o,s,l){var u=s.id;return o[u]=l,o},{});return{indexMapByTargetId:a,shapeOffsetTargets:r}},getShapeOffset:function(t,e,n){var i=this,r=i.getShapeOffsetData(t),a=r.shapeOffsetTargets,o=r.indexMapByTargetId,s=i.config.data_groupsZeroAs;return function(l,u){var d=l.id,h=l.value,g=l.x,x=i.getIndices(e,l),_=i.getYScaleById(d,n);if(i.isBarRangeType(l))return _(h[0]);var T=Number(g),A=_(s==="zero"?0:i.getShapeYMin(d)),$=A;return a.filter(function(S){return S.id!==d&&x[S.id]===x[d]}).forEach(function(S){var M=S.id,k=S.rowValueMapByXValue,P=S.rowValues,D=S.values;if(o[M]<o[d]){var p=D[T],j=P[u];if((!j||Number(j.x)!==T)&&(j=k[T]),(j==null?void 0:j.value)*h>=0&&ht(p)){var U=h===0?s==="positive"&&p>0||s==="negative"&&p<0:!0;U&&($+=_(p)-A)}}}),$}},circleY:function(t,e){var n=this,i=t.id,r;return n.isGrouped(i)&&(r=X0.bind(n)(t)),r?r(t,e)[0][1]:n.getYScaleById(i)(n.getBaseValue(t))},getBarW:function(t,e,n){var i=this,r=i.config,a=i.org,o=i.scale,s=i.getMaxDataCount(),l=t==="bar"&&r.data_groups.length,u="".concat(t,"_width"),d=o.zoom&&!i.axis.isCategorized()?a.xDomain.map(function(x){return o.zoom(x)}).reduce(function(x,_){return Math.abs(x)+_})/s:e.tickInterval(s),h=function(x){var _=x?r[u][x]:r[u],T=x?_.ratio:r["".concat(u,"_ratio")],A=x?_.max:r["".concat(u,"_max")],$=ht(_)?_:n?d*T/n:0;return A&&$>A?A:$},g=h();return!l&&Ke(r[u])&&(g={_$width:g,_$total:[]},i.filterTargetsToShow(i.data.targets).forEach(function(x){r[u][x.id]&&(g[x.id]=h(x.id),g._$total.push(g[x.id]||g._$width))})),g},getShapeByIndex:function(t,e,n){var i=this,r=i.$el,a=$t(e)?"-".concat(e):"",o=r[t];return o&&!o.empty()?o=o.filter(function(s){return n?s.id===n:!0}).filter(function(s){return $t(e)?s.index===e:!0}):o=(n?r.main.selectAll(".".concat(ce["".concat(t,"s")]).concat(i.getTargetSelectorSuffix(n))):r.main).selectAll(".".concat(ce[t]).concat(a)),o},isWithinShape:function(t,e){var n,i=this,r=lt(t),a;return i.isTargetToShow(e.id)?!((n=i.hasValidPointType)===null||n===void 0)&&n.call(i,t.nodeName)?a=i.isStepType(e)?i.isWithinStep(t,i.getYScaleById(e.id)(e.value)):i.isWithinCircle(t,i.isBubbleType(e)?i.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(a=r.classed(ce.bar)?i.isWithinBar(t):!0):a=!1,a},getInterpolate:function(t){var e=this,n=e.getInterpolateType(t);return{basis:$x,"basis-closed":Ax,"basis-open":Cx,bundle:Sx,cardinal:kx,"cardinal-closed":Ex,"cardinal-open":Rx,"catmull-rom":Mx,"catmull-rom-closed":Lx,"catmull-rom-open":Dx,"monotone-x":Nx,"monotone-y":Px,natural:Ox,"linear-closed":Ix,linear:Ro,step:Fx,"step-after":Xx,"step-before":Bx}[n]},getInterpolateType:function(t){var e=this,n=e.config,i=n.spline_interpolation_type,r=e.isInterpolationType(i)?i:"cardinal";return e.isSplineType(t)?r:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar:function(t){var e=cn(this.state.event,t),n=Hl(t),i=n[0],r=n[1],a=Math.min(i.x,r.x),o=Math.min(i.y,r.y),s=this.config.bar_sensitivity,l=t.getBBox(),u=l.width,d=l.height,h=a-s,g=a+u+s,x=o+d+s,_=o-s,T=h<e[0]&&e[0]<g&&_<e[1]&&e[1]<x;return T}},H0={setContainerSize:function(){var t=this,e=t.state;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth:function(){var t=this;return t.config.size_width||t.getParentWidth()},getCurrentHeight:function(){var t=this,e=t.config,n=e.size_height||t.getParentHeight();return n>0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getParentRectValue:function(t){for(var e="offset".concat(hn(t)),n=this.$el.chart.node(),i=0;i<30&&n&&n.tagName!=="BODY";){try{i=n.getBoundingClientRect()[t]}catch{e in n&&(i=n[e])}n=n.parentNode}var r=zt.body[e];return i>r&&(i=r),i},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.$el.chart.style("height"),e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){var e=this,n=e.config,i=e.state.hasAxis,r=e.$el,a=n.axis_rotated,o=a||!a&&!n.axis_y_inner,s=a?te.axisX:te.axisY,l=r.main.select(".".concat(s)).node(),u=i&&n["axis_".concat(a?"x":"y","_label")],d=0;if(i&&(Pt(u)||Pt(u.text)||/^inner-/.test(u==null?void 0:u.position))){var h=r.main.select(".".concat(s,"-label"));h.empty()||(d=h.node().getBoundingClientRect().left)}var g=l&&o?l.getBoundingClientRect():{right:0},x=r.chart.node().getBoundingClientRect().left+d,_=e.hasArcType(),T=g.right-x-(_?0:e.getCurrentPaddingByDirection("left",t));return T>0?T:0},updateDimension:function(t){var e,n=this,i=n.config,r=n.state.hasAxis,a=n.$el;r&&!t&&n.axis.x&&i.axis_rotated&&((e=n.axis.subX)===null||e===void 0||e.create(a.axis.subX)),n.updateScales(t),n.updateSvgSize(),n.transformAll(!1)},updateSvgSize:function(){var t=this,e=t.state,n=e.clip,i=e.current,r=e.hasAxis,a=e.width,o=e.height,s=t.$el.svg;if(s.attr("width",i.width).attr("height",i.height),r){var l=s.select(".".concat(Vl.brush," .overlay")),u={width:0,height:0};l.size()&&(u.width=+l.attr("width"),u.height=+l.attr("height")),s.selectAll(["#".concat(n.id),"#".concat(n.idGrid)]).select("rect").attr("width",a).attr("height",o),s.select("#".concat(n.idXAxis)).select("rect").call(t.setXAxisClipPath.bind(t)),s.select("#".concat(n.idYAxis)).select("rect").call(t.setYAxisClipPath.bind(t)),n.idSubchart&&s.select("#".concat(n.idSubchart)).select("rect").attr("width",a).attr("height",u.height)}},getCurrentPaddingByDirection:function(t,e,n){var i;e===void 0&&(e=!1),n===void 0&&(n=!1);var r=this,a=r.config,o=r.$el,s=r.state.hasAxis,l=a.axis_rotated,u=((i=a.padding)===null||i===void 0?void 0:i.mode)==="fit",d=ht(a["padding_".concat(t)])?a["padding_".concat(t)]:void 0,h=s?{top:l?"y2":null,bottom:l?"y":"x",left:l?"x":"y",right:l?null:"y2"}[t]:null,g=/^(left|right)$/.test(t),x=h&&a["axis_".concat(h,"_inner")],_=h&&a["axis_".concat(h,"_show")],T=h?a["axis_".concat(h,"_axes")].length:0,A=h?g?r.getAxisWidthByAxisId(h,e):r.getHorizontalAxisHeight(h):0,$=20,S=0;!u&&g&&(A=Vx(A));var M=s&&g&&(x||ee(d)&&!_)?0:u?(_?A:0)+(d??0):ee(d)?A:d;return g&&s?(h&&(u||x)&&a["axis_".concat(h,"_label")].text&&(M+=r.axis.getAxisLabelPosition(h).isOuter?$:0),t==="right"?(M+=l?!u&&ee(d)?10:2:!_||x?u?2:1:0,M+=n?r.axis.getXAxisTickTextY2Overflow($):0):t==="left"&&l&&ee(d)&&(M=a.axis_x_show?u?A:Math.max(A,40):1)):t==="top"?(o.title&&o.title.node()&&(M+=r.getTitlePadding()),S=l&&!x?T:0):t==="bottom"&&s&&l&&!_&&(M+=1),M+A*T-S},getCurrentPadding:function(t){t===void 0&&(t=!1);var e=this,n=["top","bottom","left","right"].map(function(s){return e.getCurrentPaddingByDirection(s,null,t)}),i=n[0],r=n[1],a=n[2],o=n[3];return{top:i,bottom:r,left:a,right:o}},getResettedPadding:function(t){var e=this,n=e.config,i=ht(t),r=i?0:{};return n.padding===!1?!i&&Object.keys(t).forEach(function(a){r[a]=!Qe(n.data_labels)&&n.data_labels!==!1&&a==="top"?t[a]:0}):r=t,r},updateSizes:function(t){var e,n,i,r=this,a=r.config,o=r.state,s=r.$el.legend,l=a.axis_rotated,u=r.hasArcType()||o.hasTreemap,d=((e=a.padding)===null||e===void 0?void 0:e.mode)==="fit";!t&&r.setContainerSize();var h={width:s?r.getLegendWidth():0,height:s?r.getLegendHeight():0};!u&&a.axis_x_show&&a.axis_x_tick_autorotate&&r.updateXAxisTickClip();var g={right:a.legend_show&&o.isLegendRight?r.getLegendWidth()+(d?0:20):0,bottom:!a.legend_show||o.isLegendRight||o.isLegendInset?0:h.height},x=l||u?0:r.getHorizontalAxisHeight("x"),_=a.subchart_axis_x_show&&a.subchart_axis_x_tick_text_show?x:30,T=a.subchart_show&&!u?a.subchart_size_height+_:0,A=r.hasType("gauge")&&a.arc_needle_show&&!a.gauge_fullCircle&&!a.gauge_label_show?10:0,$=r.getCurrentPadding(!0);if(o.margin=!u&&l?{top:$.top,right:u?0:$.right+g.right,bottom:g.bottom+$.bottom,left:T+(u?0:$.left)}:{top:(d?0:4)+$.top,right:u?0:$.right+g.right,bottom:A+T+g.bottom+$.bottom,left:u?0:$.left},o.margin=r.getResettedPadding(o.margin),o.margin2=l?{top:o.margin.top,right:NaN,bottom:20+g.bottom,left:r.state.rotatedPadding.left}:{top:o.current.height-T-g.bottom,right:NaN,bottom:_+g.bottom,left:o.margin.left},o.margin3={top:0,right:NaN,bottom:0,left:0},(n=r.updateSizeForLegend)===null||n===void 0||n.call(r,h),o.width=o.current.width-o.margin.left-o.margin.right,o.height=o.current.height-o.margin.top-o.margin.bottom,o.width<0&&(o.width=0),o.height<0&&(o.height=0),o.width2=l?o.margin.left-o.rotatedPadding.left-o.rotatedPadding.right:o.width,o.height2=l?o.height:o.current.height-o.margin2.top-o.margin2.bottom,o.width2<0&&(o.width2=0),o.height2<0&&(o.height2=0),r.hasArcType()){var S=r.hasType("gauge"),M=a.legend_show&&o.isLegendRight;o.arcWidth=o.width-(M?h.width+10:0),o.arcHeight=o.height-(M&&!S?0:10),S&&!a.gauge_fullCircle&&(o.arcHeight+=o.height-r.getPaddingBottomForGauge()),(i=r.updateRadius)===null||i===void 0||i.call(r)}o.isLegendRight&&u&&(o.margin3.left=o.arcWidth/2+o.radiusExpanded*1.1)}},Y0={setCssRule:function(t,e,n,i){var r=this,a=r.config,o=r.state,s=o.cssRule,l=o.style;return a.boost_useCssRule?function(u){u.each(function(d){var h=i&&(i==null?void 0:i.call(r,d)),g="".concat(t?".".concat(ve.shapes+r.getTargetSelectorSuffix(d.id)):"").concat(e);e in s&&l.sheet.deleteRule(s[g]),r.state.cssRule[g]=Kx(l,g,n.filter(Boolean).map(function(x){return Pt(h)&&x.indexOf(":")===-1?"".concat(x,": ").concat(h):x||""}))})}:function(){}},getStylePropValue:function(t){var e=this.config.boost_useCssRule;return e?null:pt(t)?t.bind(this):t}};function U0(t){var e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function V0(t,e,n,i,r){var a,o=this,s=t.value,l=o.isCandlestickType(t),u=ht(s)&&s<0||l&&!(!((a=o.getCandlestickData(t))===null||a===void 0)&&a._isUp),d=e.x,h=e.y,g=4,x=g*2;return i?n==="start"?(d+=u?0:x,h+=g):n==="middle"?(d+=x,h-=x):n==="end"&&(u&&(d-=x),h+=g):(n==="start"?(d+=g,u&&(h+=x*2)):n==="middle"?h-=x:n==="end"&&(d-=g,u&&(h+=x*2)),r&&(h+=u?-17:l?13:7)),{x:d,y:h}}function _c(t,e){var n,i=this.config.data_labels_position,r=t.id,a=t.index,o=t.value;return(n=pt(i)?i.bind(this.api)(e,o,r,a,this.$el.text):(r in i?i[r]:i)[e])!==null&&n!==void 0?n:0}var j0={opacityForText:function(t){var e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){var t=this.$el;t.main.select(".".concat(Et.chart)).append("g").attr("class",we.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this,n=e.getChartClass("Text"),i=e.getClass("texts","id"),r=e.classFocus.bind(e),a=e.$el.main.select(".".concat(we.chartTexts)).selectAll(".".concat(we.chartText)).data(t).attr("class",function(s){return"".concat(n(s)).concat(r(s)).trim()}),o=a.enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0," .".concat(we.text),["fill","pointer-events:none"],e.updateTextColor));o.append("g").attr("class",i)},updateText:function(){var t=this,e=t.$el,n=t.$T,i=t.config,r=t.axis,a=t.getClass("text","index"),o=i.data_labels.centered,s=e.main.selectAll(".".concat(we.texts)).selectAll(".".concat(we.text)).data(t.labelishData.bind(t));n(s.exit()).style("fill-opacity","0").remove(),e.text=s.enter().append("text").merge(s).attr("class",a).attr("text-anchor",function(l){var u=i["axis_".concat(r==null?void 0:r.getId(l.id),"_inverted")],d=u?l.value>0:l.value<0;if(t.isCandlestickType(l)){var h=t.getCandlestickData(l);d=!(h!=null&&h._isUp)}else if(t.isTreemapType(l))return o?"middle":"start";return i.axis_rotated?d?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(l,u,d){var h=lt(this),g=l.value;if(t.isBubbleZType(l))g=t.getBubbleZData(g,"z");else if(t.isCandlestickType(l)){var x=t.getCandlestickData(l);x&&(g=x.close)}g=t.isTreemapType(l)?t.treemapDataLabelFormat(l)(h):t.dataLabelFormat(l.id)(g,l.id,l.index,d),ht(g)?this.textContent=g:Ir(h,g)})},updateTextColor:function(t){var e=this,n=e.config,i=n.data_labels_colors,r=e.isArcType(t)&&!e.isRadarType(t)||e.isTreemapType(t)?null:e.color(t),a;if(Pt(i))a=i;else if(Bt(i)){var o=(t.data||t).id;a=i[o]}else pt(i)&&(a=i.bind(e.api)(r,t));if(e.isCandlestickType(t)&&!pt(i)){var s=e.getCandlestickData(t);if(!(s!=null&&s._isUp)){var l=n.candlestick_color_down;a=Bt(l)?l[t.id]:l}}return a||r},updateTextBackgroundColor:function(t){var e=this,n=e.$el,i=e.config,r=i.data_labels_backgroundColors,a="";if(Pt(r)||Bt(r)){var o=Pt(r)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=n.defs.select(["filter[id*='labels-bg","']"].join(o));s.size()&&(a="url(#".concat(s.attr("id"),")"))}return a||null},redrawText:function(t,e,n,i){var r=this,a=r.$T,o=r.axis,s=r.config,l=r.state.hasTreemap,u=Fn(!0),d=s.axis_rotated,h=s.data_labels.rotate,g=U0(h),x=h?"rotate(".concat(h,")"):"";return r.$el.text.style("fill",r.getStylePropValue(r.updateTextColor)).attr("filter",r.updateTextBackgroundColor.bind(r)).style("fill-opacity",n?0:r.opacityForText.bind(r)).each(function(_,T){var A=a(l&&this.childElementCount?this.parentNode:this,!!(i&&this.getAttribute("x")),u),$=s["axis_".concat(o==null?void 0:o.getId(_.id),"_inverted")],S={x:t.bind(this)(_,T),y:e.bind(this)(_,T)};h&&(S=V0.bind(r)(_,S,g,d,$),A.attr("text-anchor",g)),this.childElementCount||h?A.attr("transform","translate(".concat(S.x," ").concat(S.y,") ").concat(x)):A.attr("x",S.x).attr("y",S.y)}),!0},getTextRect:function(t,e){var n=this,i=t.node?t.node():t;/text/i.test(i.tagName)||(i=i.querySelector("text"));var r=i.textContent,a="".concat(qe.textRect,"-").concat(r.replace(/\W/g,"_")),o=n.cache.get(a);return o||(n.$el.svg.append("text").style("visibility","hidden").style("font",lt(i).style("font")).classed(e,!0).text(r).call(function(s){o=gr(s.node())}).remove(),n.cache.add(a,o)),o},generateXYForText:function(t,e){var n=this,i=n.state,r=i.hasRadar,a=i.hasTreemap,o=Object.keys(t),s={},l=e?n.getXForText:n.getYForText;return r&&o.push("radar"),a&&o.push("treemap"),o.forEach(function(u){s[u]=n["generateGet".concat(hn(u),"Points")](t[u],!1)}),function(u,d){var h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isCandlestickType(u)&&"candlestick"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return l.call(n,s[h](u,d),u,this)}},getCenteredTextPos:function(t,e,n,i){var r=this,a=r.config,o=a.axis_rotated,s=r.isBarType(t),l=r.isTreemapType(t);if(a.data_labels.centered&&(s||l)){var u=gr(n);if(s){var d=r.getRangedData(t,null,"bar")>=0;if(o){var h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+u.width/2;return d?-h-3:h+2}else{var g=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+u.height/2;return d?g:-g-2}}else if(l)return i==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+u.height/2}return 0},getXForText:function(t,e,n){var i,r=this,a=r.config,o=a.axis_rotated,s=r.isTreemapType(e),l=t[0][0];if(r.isCandlestickType(e))o?l=!((i=r.getCandlestickData(e))===null||i===void 0)&&i._isUp?t[2][2]+4:t[2][1]-4:l+=(t[1][0]-l)/2;else if(s)l+=a.data_labels.centered?0:5;else if(o){var u=a["axis_".concat(r.axis.getId(e.id),"_inverted")],d=r.isBarType(e)?4:6,h=e.value;l=t[2][1],u?l-=d*(h>0?1:-1):l+=d*(h<0?-1:1)}else l=r.hasType("bar")?(t[2][0]+t[0][0])/2:l;return(o||s)&&(l+=r.getCenteredTextPos(e,t,n,"x")),l+_c.call(this,e,"x")},getYForText:function(t,e,n){var i=this,r=i.axis,a=i.config,o=i.state,s=a.axis_rotated,l=a["axis_".concat(r==null?void 0:r.getId(e.id),"_inverted")],u=i.isBarType(e),d=i.isTreemapType(e),h=a.point_r,g=gr(n),x=e.value,_=3,T;if(i.isCandlestickType(e))x=i.getCandlestickData(e),s?(T=t[0][0],T+=(t[1][0]-T)/2+_):(T=x&&x._isUp?t[2][2]-_:t[2][1]+_*4,l&&(T+=15*(x._isUp?1:-1)));else if(d)T=t[0][1]+(a.data_labels.centered?0:g.height+5);else if(s)T=(t[0][0]+t[2][0]+g.height*.6)/2;else if(T=t[2][1],ht(h)&&h>5&&(i.isLineType(e)||i.isScatterType(e))&&(_+=a.point_r/2.3),x<0||x===0&&!o.hasPositiveValue&&o.hasNegativeValue)T+=l?u?-3:-5:g.height+(u?-_:_);else{var A=-_*2;u?A=-_:i.isBubbleType(e)&&(A=_),l&&(A=u?10:15),T+=A}return(!s||d)&&(T+=i.getCenteredTextPos(e,t,n,"y")),T+_c.call(this,e,"y")},markOverlapped:function(t,e,n){var i=e.$el.arcs.selectAll(n),r=i.filter(function(l){return l.data.id!==t}),a=i.filter(function(l){return l.data.id===t}),o=pc(a.node()),s=function(l,u){return Math.sqrt(Math.pow(l,2)+Math.pow(u,2))};a.node()&&r.each(function(){var l=pc(this),u=lt(this),d=s(o.e,o.f)>s(l.e,l.f)?a:u,h=Math.ceil(Math.abs(o.e-l.e))<Math.ceil(d.node().getComputedTextLength()),g=Math.ceil(Math.abs(o.f-l.f))<parseInt(a.style("font-size"),10);u.classed(we.TextOverlapping,h&&g)})},undoMarkOverlapped:function(t,e){t.$el.arcs.selectAll(e).each(function(){Yc([this,this.previousSibling]).classed(we.TextOverlapping,!1)})},meetsLabelThreshold:function(t,e){t===void 0&&(t=0);var n=this,i=n.config,r=i["".concat(e,"_label_threshold")]||0;return t>=r}};function mc(t,e){t===void 0&&(t="left");var n=ht(e),i;return t.indexOf("center")>-1?i=n?e/2:"middle":t.indexOf("right")>-1?i=n?e:"end":i=n?0:"start",i}var G0={initTitle:function(){var t=this,e=t.config,n=t.$el;if(e.title_text){n.title=n.svg.append("g");var i=n.title.append("text").style("text-anchor",mc(e.title_position)).attr("class",we.title);Ir(i,e.title_text,[.3,1.5])}},redrawTitle:function(){var t=this,e=t.config,n=t.state.current,i=t.$el.title;if(i){var r=mc(e.title_position,n.width),a=(e.title_padding.top||0)+t.getTextRect(t.$el.title,we.title).height;i.attr("transform","translate(".concat(r,", ").concat(a,")"))}},getTitlePadding:function(){var t=this,e=t.$el,n=t.config;return(n.title_padding.top||0)+t.getTextRect(e.title,we.title).height+(n.title_padding.bottom||0)}},W0={initTooltip:function(){var t=this,e=t.config,n=t.$el;n.tooltip=lt(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",pr.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t,e,n=this,i=n.config,r=n.$el,a=n.state,o=a.hasAxis,s=a.hasRadar;if(i.tooltip_init_show){var l=!(o||s);!((e=n.axis)===null||e===void 0)&&e.isTimeSeries()&&Pt(i.tooltip_init_x)&&(i.tooltip_init_x=Fe.call(n,i.tooltip_init_x)),n.api.tooltip.show({data:(t={},t[l?"index":"x"]=i.tooltip_init_x,t)});var u=i.tooltip_init_position;if(!i.tooltip_contents.bindto&&!Qe(u)){var d=u.top,h=d===void 0?0:d,g=u.left,x=g===void 0?50:g;r.tooltip.style("top",Pt(h)?h:"".concat(h,"px")).style("left",Pt(x)?x:"".concat(x,"px")).style("display",null)}}},getTooltipHTML:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this,i=n.api,r=n.config;return pt(r.tooltip_contents)?r.tooltip_contents.bind(i).apply(void 0,t):n.getTooltipContent.apply(n,t)},getTooltipContent:function(t,e,n,i){var r=this,a=r.api,o=r.config,s=r.state,l=r.$el,u=["title","name","value"].map(function(it){var K=o["tooltip_format_".concat(it)];return pt(K)?K.bind(a):K}),d=u[0],h=u[1],g=u[2],x=function(){for(var it=[],K=0;K<arguments.length;K++)it[K]=arguments[K];return Ea((d||e).apply(void 0,it))},_=function(){for(var it=[],K=0;K<arguments.length;K++)it[K]=arguments[K];return Ea((h||function(ft){return ft}).apply(void 0,it))},T=function(){for(var it=[],K=0;K<arguments.length;K++)it[K]=arguments[K];var ft=g||(s.hasTreemap||r.isStackNormalized()?function(rt,Lt){return"".concat((Lt*100).toFixed(2),"%")}:n);return Ea(ft.apply(void 0,it))},A=o.tooltip_order,$=function(it){return r.axis&&r.isBubbleZType(it)?r.getBubbleZData(it.value,"z"):r.getBaseValue(it)},S=r.levelColor?function(it){return r.levelColor(it.value)}:function(it){return i(it)},M=o.tooltip_contents,k=M.template,P=r.mapToTargetIds();if(A===null&&o.data_groups.length){var D=r.orderTargets(r.data.targets).map(function(it){return it.id}).reverse();t.sort(function(it,K){var ft=it?it.value:null,rt=K?K.value:null;return ft>0&&rt>0&&(ft=it.id?D.indexOf(it.id):null,rt=K.id?D.indexOf(K.id):null),ft-rt})}else if(/^(asc|desc)$/.test(A)){var p=A==="asc";t.sort(function(it,K){var ft=it?$(it):null,rt=K?$(K):null;return p?ft-rt:rt-ft})}else pt(A)&&t.sort(A.bind(a));var j=r.getTooltipContentTemplate(k),U=t.length,G,X,Q,z,q,Mt=function(){if(X=t[q],!X||!($(X)||$(X)===0))return"continue";if(ee(G)){var it=(s.hasAxis||s.hasRadar)&&x(X.x);G=Nr(j[0],{CLASS_TOOLTIP:pr.tooltip,TITLE:$t(it)?k?it:'<tr><th colspan="2">'.concat(it,"</th></tr>"):""})}if(!X.ratio&&l.arcs&&(Q=["arc",r.$el.arcs.select("path.".concat(Yt.arc,"-").concat(X.id)).data()[0]],X.ratio=r.getRatio.apply(r,Q)),Q=[X.ratio,X.id,X.index],r.isAreaRangeType(X)){var K=["high","low"].map(function(V){return T.apply(void 0,qt([r.getRangedData(X,V)],Q,!1))}),ft=K[0],rt=K[1],Lt=T.apply(void 0,qt([$(X)],Q,!1));z="<b>Mid:</b> ".concat(Lt," <b>High:</b> ").concat(ft," <b>Low:</b> ").concat(rt)}else if(r.isCandlestickType(X)){var Ht=["open","high","low","close","volume"].map(function(St){var ae=r.getRangedData(X,St,"candlestick");return ae?T.apply(void 0,qt([r.getRangedData(X,St,"candlestick")],Q,!1)):void 0}),ie=Ht[0],ft=Ht[1],rt=Ht[2],le=Ht[3],Tt=Ht[4];z="<b>Open:</b> ".concat(ie," <b>High:</b> ").concat(ft," <b>Low:</b> ").concat(rt," <b>Close:</b> ").concat(le).concat(Tt?" <b>Volume:</b> ".concat(Tt):"")}else if(r.isBarRangeType(X)){var Ut=X.value,ge=X.id,re=X.index;z="".concat(T(Ut,void 0,ge,re))}else z=T.apply(void 0,qt([$(X)],Q,!1));if(z!==void 0){if(X.name===null)return"continue";var tn=_.apply(void 0,qt([X.name],Q,!1)),J=S(X),ot={CLASS_TOOLTIP_NAME:pr.tooltipName+r.getTargetSelectorSuffix(X.id),COLOR:k||!r.patterns?J:'<svg><rect style="fill:'.concat(J,'" width="10" height="10"></rect></svg>'),NAME:tn,VALUE:z};if(k&&Bt(M.text)){var vt=P.indexOf(X.id);Object.keys(M.text).forEach(function(V){ot[V]=M.text[V][vt]})}G+=Nr(j[1],ot)}};for(q=0;q<U;q++)Mt();return"".concat(G,"</table>")},getTooltipContentTemplate:function(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
{=TITLE}
{{<tr class="{=CLASS_TOOLTIP_NAME}">
<td class="name">`.concat(this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>',`{=NAME}</td>
<td class="value">{=VALUE}</td>
</tr>}}
</tbody></table>`)).replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n,i,r=this,a=r.config,o=r.scale,s=r.state,l=r.$el,u=l.eventRect,d=l.tooltip,h=a.tooltip_contents.bindto,g=a.axis_rotated,x=d==null?void 0:d.datum();if(!h&&x){var _=t??JSON.parse(x.current),T=cn(s.event,e??(u==null?void 0:u.node())),A=T[0],$=T[1],S={x:A,y:$};if(s.hasAxis&&o.x&&x&&"x"in x){var M=function(U,G,X){var Q;U===void 0&&(U=0),X===void 0&&(X="y");var z=o[G?(Q=r.axis)===null||Q===void 0?void 0:Q.getId(G):X];return z?z(U)+(g?s.margin.left:s.margin.top):0};S.xAxis=o.x(x.x)+(a.tooltip_position?g?s.margin.top:s.margin.left:0),_.length===1?S.yAxis=M(_[0].value,_[0].id):S.yAxis=M}var k=x.width,P=k===void 0?0:k,D=x.height,p=D===void 0?0:D,j=(i=(n=a.tooltip_position)===null||n===void 0?void 0:n.bind(r.api)(_,P,p,u==null?void 0:u.node(),S))!==null&&i!==void 0?i:r.getTooltipPosition.bind(r)(P,p,S);["top","left"].forEach(function(U){var G=j[U];d.style(U,"".concat(G,"px")),U==="left"&&!x.xPosInPercent&&(x.xPosInPercent=G/s.current.width*100)})}},getTooltipPosition:function(t,e,n){var i=this,r=i.config,a=i.scale,o=i.state,s=o.width,l=o.height,u=o.current,d=o.isLegendRight,h=o.inputType,g=i.hasType("gauge")&&!r.gauge_fullCircle,x=o.hasTreemap,_=r.axis_rotated,T=i.hasArcType(),A=i.getSvgLeft(!0),$=A+u.width-i.getCurrentPaddingByDirection("right"),S=20,M=n.x,k=n.y;if(T){var P=h==="touch"||i.hasType("radar");P||(M+=(s-(d?i.getLegendWidth():0))/2,k+=g?l:l/2)}else if(!x){var D={top:i.getCurrentPaddingByDirection("top",!0),left:i.getCurrentPaddingByDirection("left",!0)};_?(M+=A+D.left+S,k=D.top+n.xAxis+S,$-=A):(M=A+D.left+S+(a.zoom?M:n.xAxis),k+=D.top-5)}if(M+t+15>$&&(M-=t+(x||T?0:_?S*2:38)),k+e>u.height){var p=x?0:30;k-=g?e*3:e+p}var j={top:k,left:M};return Object.keys(j).forEach(function(U){j[U]<0&&(j[U]=0)}),j},showTooltip:function(t,e){var n=this,i=n.config,r=n.$el.tooltip,a=t.filter(function(h){return h&&$t(n.getBaseValue(h))});if(!(!r||a.length===0||!i.tooltip_show)){var o=r.datum(),s=JSON.stringify(t);if(!o||o.current!==s){var l=t.concat().sort()[0],u=l.index,d=l.x;Gt(i.tooltip_onshow,n.api,t),r.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null).datum(o={index:u,x:d,current:s,width:r.property("offsetWidth"),height:r.property("offsetHeight")}),Gt(i.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,u)}n.setTooltipPosition(a,e)}},bindTooltipResizePos:function(){var t=this,e=t.resizeFunction,n=t.state,i=t.$el.tooltip;e.add(function(){if(i.style("display")==="block"){var r=n.current,a=i.datum(),o=a.width,s=a.xPosInPercent,l=r.width/100*s,u=r.width-(l+o);u<0&&(l+=u),i.style("left","".concat(l,"px"))}})},hideTooltip:function(t){var e,n=this,i=n.api,r=n.config,a=n.$el.tooltip;if(a&&a.style("display")!=="none"&&(!r.tooltip_doNotHide||t)){var o=JSON.parse((e=a.datum().current)!==null&&e!==void 0?e:{});Gt(r.tooltip_onhide,i,o),a.style("display","none").style("visibility","hidden").datum(null),Gt(r.tooltip_onhidden,i,o)}},_handleLinkedCharts:function(t,e){var n=this,i=n.charts,r=n.config,a=n.state.event;if(a!=null&&a.isTrusted&&r.tooltip_linked&&i.length>1){var o=r.tooltip_linked_name;i.filter(function(s){return s!==n.api}).forEach(function(s){var l=s.internal,u=l.config,d=l.$el,h=u.tooltip_linked,g=u.tooltip_linked_name,x=zt.body.contains(d.chart.node());if(h&&o===g&&x){var _=d.tooltip.data()[0],T=e!==(_==null?void 0:_.index);try{s.tooltip[t&&T?"show":"hide"]({index:e})}catch{}}})}},updateTooltipOnRedraw:function(t,e){var n,i=this,r=i.config,a=i.$el,o=a.eventRect,s=a.svg,l=a.tooltip,u=i.state,d=u.event,h=u.hasAxis,g=u.hasRadar,x=u.hasTreemap;if((l==null?void 0:l.style("display"))==="block"&&d){var _=t??((n=g?s:o)===null||n===void 0?void 0:n.node());if(h||g)if(i.isMultipleX())i.selectRectForMultipleXs(_,!1);else{var T=e??i.getDataIndexFromEvent(d);e===-1?i.api.tooltip.hide():(i.selectRectForSingle(_,T),i.setExpand(T,null,!0))}else{var A=d.clientX,$=d.clientY;setTimeout(function(){var S=zt.elementFromPoint(A,$),M=lt(S).datum();if(M){var k=i.hasArcType()?i.convertToArcData(i.updateAngle(M)):M==null?void 0:M.data;x&&(S=s.node()),k&&i.showTooltip([k],S)}else i.api.tooltip.hide()},r.transition_duration)}}}},q0={getTranslate:function(t,e){e===void 0&&(e=0);var n=this,i=n.config,r=n.state,a=i.axis_rotated,o=0,s,l;if(e&&/^(x|y2?)$/.test(t)&&(o=n.getAxisSize(t)*e),t==="main")s=Si(r.margin.left),l=Si(r.margin.top);else if(t==="context")s=Si(r.margin2.left),l=Si(r.margin2.top);else if(t==="legend")s=r.margin3.left,l=r.margin3.top;else if(t==="x")s=a?-o:0,l=a?0:r.height+o;else if(t==="y")s=a?0:-o,l=a?r.height+o:0;else if(t==="y2")s=a?0:r.width+o,l=a?-o-1:0;else if(t==="subX")s=0,l=a?0:r.height2;else if(t==="arc")s=r.arcWidth/2,l=r.arcHeight/2;else if(t==="polar")s=r.arcWidth/2,l=r.arcHeight/2;else if(t==="radar"){var u=n.getRadarSize()[0];s=r.width/2-u,l=Si(r.margin.top)}return"translate(".concat(s,", ").concat(l,")")},transformMain:function(t,e){var n=this,i=n.$el.main,r=n.$T,a=e!=null&&e.axisX?e.axisX:r(i.select(".".concat(te.axisX)),t),o=e!=null&&e.axisY?e.axisY:r(i.select(".".concat(te.axisY)),t),s=e!=null&&e.axisY2?e.axisY2:r(i.select(".".concat(te.axisY2)),t);r(i,t).attr("transform",n.getTranslate("main")),a.attr("transform",n.getTranslate("x")),o.attr("transform",n.getTranslate("y")),s.attr("transform",n.getTranslate("y2")),i.select(".".concat(Yt.chartArcs)).attr("transform",n.getTranslate("arc"))},transformAll:function(t,e){var n=this,i=n.config,r=n.state,a=r.hasAxis,o=r.hasTreemap,s=n.$el;!o&&n.transformMain(t,e),a&&i.subchart_show&&n.transformContext(t,e),s.legend&&n.transformLegend(t)}},Z0={isValidChartType:function(t){return!!(t&&Object.values(_t).indexOf(t)>-1)},setTargetType:function(t,e){var n=this,i=n.config,r=n.state.withoutFadeIn;n.mapToTargetIds(t).forEach(function(a){r[a]=e===i.data_types[a],i.data_types[a]=e}),t||(i.data_type=e)},updateTypesElements:function(){var t=this,e=t.state.current;Object.keys(_t).forEach(function(n){var i=_t[n],r=t.hasType(i,null,!0),a=e.types.indexOf(i);a===-1&&r?e.types.push(i):a>-1&&!r&&e.types.splice(a,1)}),t.setChartElements()},hasType:function(t,e,n){var i;n===void 0&&(n=!1);var r=this,a=r.config,o=r.state.current,s=a.data_types,l=e||r.data.targets,u=!1;return!n&&((i=o.types)===null||i===void 0?void 0:i.indexOf(t))>-1?u=!0:l!=null&&l.length?l.forEach(function(d){var h=s[d.id];(h===t||!h&&t==="line")&&(u=!0)}):Object.keys(s).length?Object.keys(s).forEach(function(d){s[d]===t&&(u=!0)}):u=a.data_type===t,u},hasTypeOf:function(t,e,n){var i=this;return n===void 0&&(n=[]),t in xn?!xn[t].filter(function(r){return n.indexOf(r)===-1}).every(function(r){return!i.hasType(r,e)}):!1},isTypeOf:function(t,e){var n=Pt(t)?t:t.id,i=this.config.data_types[n]||this.config.data_type;return Dt(e)?e.indexOf(i)>=0:i===e},hasPointType:function(){var t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType:function(t){var e=Pt(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,xn.Line)},isStepType:function(t){return this.isTypeOf(t,xn.Step)},isSplineType:function(t){return this.isTypeOf(t,xn.Spline)},isAreaType:function(t){return this.isTypeOf(t,xn.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,xn.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){var e=this.config,n=e.point_pattern,i=!1;return(t==null?void 0:t.tagName)==="circle"?i=!0:i=e.point_type==="circle"&&(!n||Dt(n)&&n.length===0),i},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(e){return ht(e.value)||!!e.value}):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}},Gr=function(){function t(e){this.data={xs:{},targets:[]},this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var n=this;n.api=e,n.config=new jr,n.cache=new v0;var i=new s0;n.$el=i.getStore("element"),n.state=i.getStore("state"),n.$T=n.$T.bind(n)}return t.prototype.$T=function(e,n,i){var r=this,a=r.config,o=r.state,s=a.transition_duration,l=a.subchart_show,u=e;if(u){"tagName"in u&&(u=lt(u));var d=(n!==!1&&s||n)&&(!o.zooming||o.dragging)&&!o.resizing&&o.rendered&&!l;u=d?u.transition(i).duration(s):u}return u},t.prototype.beforeInit=function(){var e=this;e.callPluginHook("$beforeInit"),Gt(e.config.onbeforeinit,e.api)},t.prototype.afterInit=function(){var e=this;e.callPluginHook("$afterInit"),Gt(e.config.onafterinit,e.api)},t.prototype.init=function(){var e=this,n=e.config,i=e.state,r=e.$el,a=n.boost_useCssRule;if(e0(e),i.hasRadar=!i.hasAxis&&e.hasType("radar"),i.hasTreemap=!i.hasAxis&&e.hasType("treemap"),i.hasAxis=!e.hasArcType()&&!i.hasTreemap,i.datetimeId="bb-".concat(+new Date*Fn()),a){var o=zt.createElement("style");o.type="text/css",zt.head.appendChild(o),i.style={rootSelctor:".".concat(i.datetimeId),sheet:o.sheet},r.style=o}var s={element:n.bindto,classname:"bb"};Bt(n.bindto)&&(s.element=n.bindto.element||"#chart",s.classname=n.bindto.classname||s.classname),r.chart=pt(s.element.node)?n.bindto.element:lt(s.element||[]),r.chart.empty()&&(r.chart=lt(zt.body.appendChild(zt.createElement("div")))),r.chart.html("").classed(s.classname,!0).classed(i.datetimeId,a).style("position","relative"),e.initParams(),e.initToRender()},t.prototype.initToRender=function(e){var n=this,i=n.config,r=n.state,a=n.$el.chart,o=function(){return a.style("display")==="none"||a.style("visibility")==="hidden"},s=i.render.lazy||o(),l=It.MutationObserver;s&&l&&i.render.observe!==!1&&!e&&new l(function(u,d){o()||(d.disconnect(),!r.rendered&&n.initToRender(!0))}).observe(a.node(),{attributes:!0,attributeFilter:["class","style"]}),(!s||e)&&n.convertData(i,function(u){n.initWithData(u),n.afterInit()})},t.prototype.initParams=function(){var e=this,n=e.config,i=e.format,r=e.state,a=n.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),n.padding===!1&&(n.axis_x_show=!1,n.axis_y_show=!1,n.axis_y2_show=!1,n.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),r.hasAxis){e.initClip(),i.extraLineClasses=e.generateExtraLineClass(),i.dataTime=n.data_xLocaltime?wl:$l,i.axisTime=n.axis_x_localtime?Ao:Co;var o=e.config.zoom_enabled&&e.config.zoom_type==="drag";i.defaultAxisTime=function(s){var l=e.scale,u=l.x,d=l.zoom,h=o?d:d&&u.orgDomain().toString()!==d.domain().toString(),g=s.getMilliseconds()&&".%L"||s.getSeconds()&&".:%S"||s.getMinutes()&&"%I:%M"||s.getHours()&&"%I %p"||s.getDate()!==1&&"%b %d"||h&&s.getDate()===1&&"%b'%y"||s.getMonth()&&"%-m/%-d"||"%Y";return i.axisTime(g)(s)}}r.isLegendRight=n.legend_position==="right",r.isLegendInset=n.legend_position==="inset",r.isLegendTop=n.legend_inset_anchor==="top-left"||n.legend_inset_anchor==="top-right",r.isLegendLeft=n.legend_inset_anchor==="top-left"||n.legend_inset_anchor==="bottom-left",r.rotatedPadding.top=e.getResettedPadding(r.rotatedPadding.top),r.rotatedPadding.right=a&&!n.axis_x_show?0:30,r.inputType=t0(n.interaction_inputType_mouse,n.interaction_inputType_touch)},t.prototype.initWithData=function(e){var n,i,r=this,a=r.config,o=r.scale,s=r.state,l=r.$el,u=r.org,d=s.hasAxis,h=s.hasTreemap,g=a.interaction_enabled,x=r.hasType("polar");if(d&&(r.axis=r.getAxisInstance(),a.zoom_enabled&&r.initZoom()),r.data.xs={},r.data.targets=r.convertDataToTargets(e),a.data_filter&&(r.data.targets=r.data.targets.filter(a.data_filter.bind(r.api))),a.data_hide&&r.addHiddenTargetIds(a.data_hide===!0?r.mapToIds(r.data.targets):a.data_hide),a.legend_hide&&r.addHiddenLegendIds(a.legend_hide===!0?r.mapToIds(r.data.targets):a.legend_hide),r.updateSizes(),r.updateScales(!0),d){var _=o.x,T=o.y,A=o.y2,$=o.subX,S=o.subY,M=o.subY2;_&&(_.domain(ci(r.getXDomain(r.data.targets),!a.axis_x_inverted)),$.domain(_.domain()),u.xDomain=_.domain()),T&&(T.domain(r.getYDomain(r.data.targets,"y")),S.domain(T.domain())),A&&(A.domain(r.getYDomain(r.data.targets,"y2")),M&&M.domain(A.domain()))}if(l.svg=l.chart.append("svg").style("overflow","hidden").style("display","block"),g&&s.inputType){var k=s.inputType==="touch",P=a.onclick,D=a.onover,p=a.onout;l.svg.on("click",(P==null?void 0:P.bind(r.api))||null).on(k?"touchstart":"mouseenter",(D==null?void 0:D.bind(r.api))||null).on(k?"touchend":"mouseleave",(p==null?void 0:p.bind(r.api))||null)}a.svg_classname&&l.svg.attr("class",a.svg_classname);var j=pt(a.color_tiles)&&r.patterns;(d||j||x||h||a.data_labels_backgroundColors)&&(l.defs=l.svg.append("defs"),d&&["id","idXAxis","idYAxis","idGrid"].forEach(function(X){r.appendClip(l.defs,s.clip[X])}),r.generateDataLabelBackgroundColorFilter(),j&&r.patterns.forEach(function(X){return l.defs.append(function(){return X.node})})),r.updateSvgSize(),r.bindResize();var U=l.svg.append("g").classed(Et.main,!0).attr("transform",h?null:r.getTranslate("main"));if(l.main=U,a.subchart_show&&r.initSubchart(),a.tooltip_show&&r.initTooltip(),a.title_text&&r.initTitle(),!h&&a.legend_show&&r.initLegend(),a.data_empty_label_text&&U.append("text").attr("class","".concat(we.text," ").concat(Et.empty)).attr("text-anchor","middle").attr("dominant-baseline","middle"),d&&(a.regions.length&&r.initRegion(),!a.clipPath&&r.axis.init()),U.append("g").classed(Et.chart,!0).attr("clip-path",d?s.clip.path:null),r.callPluginHook("$init"),r.initChartElements(),d&&(g&&((n=r.initEventRect)===null||n===void 0||n.call(r)),r.initGrid(),a.clipPath&&((i=r.axis)===null||i===void 0||i.init())),r.updateTargets(r.data.targets),r.updateDimension(),Gt(a.oninit,r.api),r.setBackground(),r.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),a.data_onmin||a.data_onmax){var G=r.getMinMaxData();Gt(a.data_onmin,r.api,G.min),Gt(a.data_onmax,r.api,G.max)}a.tooltip_show&&r.initShowTooltip(),s.rendered=!0},t.prototype.initChartElements=function(){var e=this,n=e.state,i=n.hasAxis,r=n.hasRadar,a=n.hasTreemap,o=[];if(i){var s=["bar","bubble","candlestick","line"];e.config.bar_front&&s.push(s.shift()),s.forEach(function(u){var d=hn(u);(u==="line"&&e.hasTypeOf(d)||e.hasType(u))&&o.push(d)})}else if(a)o.push("Treemap");else{var l=e.hasType("polar");r||o.push("Arc","Pie"),e.hasType("gauge")?o.push("Gauge"):r?o.push("Radar"):l&&o.push("Polar")}o.forEach(function(u){e["init".concat(u)]()}),Wt(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},t.prototype.setChartElements=function(){var e=this,n=e.$el,i=n.chart,r=n.svg,a=n.defs,o=n.main,s=n.tooltip,l=n.legend,u=n.title,d=n.grid,h=n.needle,g=n.arcs,x=n.circle,_=n.bar,T=n.candlestick,A=n.line,$=n.area,S=n.text;e.api.$={chart:i,svg:r,defs:a,main:o,tooltip:s,legend:l,title:u,grid:d,arc:g,circles:x,bar:{bars:_},candlestick:T,line:{lines:A,areas:$},needle:h,text:{texts:S}}},t.prototype.setBackground=function(){var e=this,n=e.config.background,i=e.state,r=e.$el.svg;if(Wt(n)){var a=r.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?a.attr("href",n.imgUrl):n.color&&a.style("fill",n.color).attr("clip-path",i.clip.path),a.attr("class",n.class||null).attr("width","100%").attr("height","100%")}},t.prototype.updateTargets=function(e){var n,i=this,r=i.state,a=r.hasAxis,o=r.hasRadar,s=r.hasTreemap,l=function(h){return i["updateTargetsFor".concat(h)](e.filter(i["is".concat(h,"Type")].bind(i)))};if(i.updateTargetsForText(e),a)["bar","candlestick","line"].forEach(function(h){var g=hn(h);(h==="line"&&i.hasTypeOf(g)||i.hasType(h))&&l(g)}),i.updateTargetsForSubchart&&i.updateTargetsForSubchart(e);else if(i.hasArcType(e)){var u="Arc";o?u="Radar":i.hasType("polar")&&(u="Polar"),l(u)}else s&&l("Treemap");var d=i.hasType("bubble")||i.hasType("scatter");d&&((n=i.updateTargetForCircle)===null||n===void 0||n.call(i)),i.filterTargetsToShowAtInit(d)},t.prototype.filterTargetsToShowAtInit=function(e){e===void 0&&(e=!1);var n=this,i=n.$el.svg,r=n.$T,a=".".concat(Et.target);e&&(a+=", .".concat(he.chartCircles," > .").concat(he.circles)),r(i.selectAll(a).filter(function(o){return n.isTargetToShow(o.id)})).style("opacity",null)},t.prototype.getWithOption=function(e){var n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(i){var r=n[i];Pt(r)&&(r=n[r]),n[i]=mn(e,"with".concat(i),r)}),n},t.prototype.initialOpacity=function(e){var n=this,i=n.state.withoutFadeIn,r=n.getBaseValue(e)!==null&&i[e.id]?null:"0";return r},t.prototype.bindResize=function(){var e=this,n=e.config,i=e.state,r=_0(n.resize_timer),a=[];a.push(function(){return Gt(n.onresize,e.api)}),n.resize_auto&&a.push(function(){i.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}),a.push(function(){Gt(n.onresized,e.api),i.resizing=!1}),a.forEach(function(o){return r.add(o)}),e.resizeFunction=r,It.addEventListener("resize",e.resizeFunction=r)},t.prototype.callPluginHook=function(e){for(var n=this,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];this.config.plugins.forEach(function(a){e==="$beforeInit"&&(a.$$=n,n.api.plugins.push(a)),a[e].apply(a,i)})},t}();Me(Gr.prototype,[A0,C0,S0,R0,E0,I0,N0,k0,P0,O0,F0,B0,z0,H0,Y0,j0,G0,W0,q0,Z0]);function K0(t){var e=this.config,n,i,r,a=function(){var o=i.shift();if(o&&n&&Ke(n)&&o in n)return n=n[o],a();if(!o)return n};Object.keys(e).forEach(function(o){n=t,i=o.split("_"),r=a(),Ft(r)&&(e[o]=r)}),this.api&&(this.state.orgConfig=t)}var Q0={resize:function(t){var e=this.internal,n=e.config,i=e.state;i.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,i.resizing=!0,this.flush(!1),e.resizeFunction())},flush:function(t){var e,n,i=this.internal,r=i.state,a=i.$el.zoomResetBtn;r.rendered?(r.resizing?(e=i.brush)===null||e===void 0||e.updateResize():(n=i.axis)===null||n===void 0||n.setOrient(),a==null||a.style("display","none"),i.scale.zoom=null,t?i.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):i.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!r.resizing&&i.brush&&(i.brush.getSelection().call(i.brush.move),i.unselectRect())):i.initToRender(!0)},destroy:function(){var t=this,e=this.internal,n=e.$el,i=n.chart,r=n.style,a=n.svg;if(Wt(e)){e.callPluginHook("$willDestroy"),e.charts.splice(e.charts.indexOf(this),1),e.unbindAllEvents(),a.select("*").interrupt(),e.resizeFunction.clear(),It.removeEventListener("resize",e.resizeFunction),i.classed("bb",!1).style("position",null).selectChildren().remove(),r&&r.parentNode.removeChild(r),Object.keys(this).forEach(function(s){s==="internal"&&Object.keys(e).forEach(function(l){e[l]=null}),t[s]=null,delete t[s]});for(var o in this)this[o]=function(){}}return null},config:function(t,e,n){var i=this.internal,r=i.config,a=i.state,o=t==null?void 0:t.replace(/\./g,"_"),s;return t&&o in r?Ft(e)?(r[o]=e,s=e,n&&this.flush()):s=r[o]:(arguments.length===0||Qe(t))&&(s=a.orgConfig),s}},J0={color:function(t){return this.internal.color(t)}},Kl=function(t){var e=this.internal.data.targets;if(!ee(t)){var n=Dt(t)?t:[t];return e.filter(function(i){return n.some(function(r){return r===i.id})})}return e};Me(Kl,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e){e===void 0&&(e=!0);var n=null;if(t){var i=this.data(t);Dt(i)&&(n=[],i.forEach(function(r){var a=r.values.map(function(o){return o.value});e?n=n.concat(a):n.push(a)}))}return n},names:function(t){var e=this.internal;return e.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var ty={data:Kl},ey=function(t){var e;return(e=It.btoa)===null||e===void 0?void 0:e.call(It,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(n,i){return String.fromCharCode(Number("0x".concat(i)))}))};function ny(t,e,n){var i=e||n,r=i.width,a=i.height,o=new XMLSerializer,s=t.cloneNode(!0),l=Qx(oi(zt.styleSheets)).filter(function(x){return x.cssText}).map(function(x){return x.cssText});s.setAttribute("xmlns",ti.xhtml),s.style.margin="0",s.style.padding="0",e.preserveFontStyle&&s.querySelectorAll("text").forEach(function(x){x.innerHTML=""});var u=o.serializeToString(s),d=zt.createElement("style");d.appendChild(zt.createTextNode(l.join(`
`)));var h=o.serializeToString(d),g='<svg xmlns="'.concat(ti.svg,'" width="').concat(r,'" height="').concat(a,`"
viewBox="0 0 `).concat(n.width," ").concat(n.height,`"
preserveAspectRatio="`).concat((e==null?void 0:e.preserveAspectRatio)===!1?"none":"xMinYMid meet",`">
<foreignObject width="100%" height="100%">
`).concat(h,`
`).concat(u.replace(/(url\()[^#]+/g,"$1"),`
</foreignObject></svg>`);return"data:image/svg+xml;base64,".concat(ey(g))}function iy(t,e){var n=e.top,i=e.left,r=t.getBBox(),a=r.x,o=r.y,s=t.getScreenCTM(),l=s.a,u=s.b,d=s.c,h=s.d,g=s.e,x=s.f,_=t.getBoundingClientRect(),T=_.width,A=_.height;return{x:l*a+d*o+g-i,y:u*a+h*o+x-n+(A-Math.round(A/4)),width:T,height:A}}function ry(t){var e=t.getBoundingClientRect(),n=e.left,i=e.top,r=function(o){return o.textContent||o.childElementCount},a=[];return oi(t.querySelectorAll("text")).filter(r).forEach(function(o){var s=function(u){var d,h=It.getComputedStyle(u),g=h.fill,x=h.fontFamily,_=h.fontSize,T=h.textAnchor,A=h.transform,$=iy(u,{left:n,top:i}),S=$.x,M=$.y,k=$.width,P=$.height;return d={},d[u.textContent]={x:S,y:M,width:k,height:P,fill:g,fontFamily:x,fontSize:_,textAnchor:T,transform:A},d};if(o.childElementCount>1){var l=[];return oi(o.querySelectorAll("tspan")).filter(r).forEach(function(u){a.push(s(u))}),l}else a.push(s(o))}),a}function ay(t,e){e.forEach(function(n){Object.keys(n).forEach(function(i){var r=n[i],a=r.x,o=r.y,s=r.width,l=r.height,u=r.fill,d=r.fontFamily,h=r.fontSize,g=r.transform;if(t.save(),t.font="".concat(h," ").concat(d),t.fillStyle=u,g==="none")t.fillText(i,a,o);else{var x=g.replace(/(matrix|\(|\))/g,"").split(",");x.splice(4).every(function(_){return+_==0})?(x.push(a+s-s/4),x.push(o-l+l/3)):(x.push(a),x.push(o)),t.transform.apply(t,x),t.fillText(i,0,0)}t.restore()})})}var oy={export:function(t,e){var n=this,i=this.internal,r=i.state,a=i.$el,o=a.chart,s=a.svg,l=r.current,u=l.width,d=l.height,h=si({width:u,height:d,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),g=ny(o.node(),h,{width:u,height:d}),x=h.preserveFontStyle?ry(s.node()):[];if(e&&pt(e)){var _=new Image;_.crossOrigin="Anonymous",_.onload=function(){var T=zt.createElement("canvas"),A=T.getContext("2d");T.width=h.width||u,T.height=h.height||d,A.drawImage(_,0,0),x.length&&(ay(A,x),x.length=0),e.bind(n)(T.toDataURL(h.mimeType))},_.src=g}return g}},sy={focus:function(t){var e=this.internal,n=e.state,i=e.mapToTargetIds(t),r=e.$el.svg.selectAll(e.selectorTargets(i.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),r.classed(Xt.focused,!0).classed(Xt.defocused,!1),e.hasArcType()&&!n.hasRadar&&(e.expandArc(i),e.hasType("gauge")&&e.markOverlapped(t,e,".".concat(Ge.gaugeValue))),e.toggleFocusLegend(i,!0),n.focusedTargetIds=i,n.defocusedTargetIds=n.defocusedTargetIds.filter(function(a){return i.indexOf(a)<0})},defocus:function(t){var e=this.internal,n=e.state,i=e.mapToTargetIds(t),r=e.$el.svg.selectAll(e.selectorTargets(i.filter(e.isTargetToShow,e)));r.classed(Xt.focused,!1).classed(Xt.defocused,!0),e.hasArcType(null,["polar"])&&(e.unexpandArc(i),e.hasType("gauge")&&e.undoMarkOverlapped(e,".".concat(Ge.gaugeValue))),e.toggleFocusLegend(i,!1),n.focusedTargetIds=n.focusedTargetIds.filter(function(a){return i.indexOf(a)<0}),n.defocusedTargetIds=i},revert:function(t){var e=this.internal,n=e.config,i=e.state,r=e.$el,a=e.mapToTargetIds(t),o=r.svg.selectAll(e.selectorTargets(a));o.classed(Xt.focused,!1).classed(Xt.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(a),n.legend_show&&(e.showLegend(a.filter(e.isLegendToShow.bind(e))),r.legend.selectAll(e.selectorLegends(a)).filter(function(){return lt(this).classed(Xt.legendItemFocused)}).classed(Xt.legendItemFocused,!1)),i.focusedTargetIds=[],i.defocusedTargetIds=[]}},cy={show:function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}},ly={legend:cy},uy={load:function(t){var e=this.internal,n=e.config;t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(i){n.data_classes[i]=t.classes[i]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(i){n.data_axes[i]=t.axes[i]}),"colors"in t&&Object.keys(t.colors).forEach(function(i){n.data_colors[i]=t.colors[i]}),"unload"in t&&t.unload!==!1?e.unload(e.mapToTargetIds(t.unload===!0?null:t.unload),function(){Xl(function(){return e.loadFromArgs(t)})}):e.loadFromArgs(t)},unload:function(t){var e=this.internal,n=t||{};Qe(n)&&this.tooltip.hide(),Dt(n)?n={ids:n}:Pt(n)&&(n={ids:[n]});var i=e.mapToTargetIds(n.ids);e.unload(i,function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(i),Zl.call(e,n.done,n.resizeAfter)})}};function bc(t,e,n){var i=this,r=this.internal,a=r.mapToTargetIds(e),o=r.state.hiddenTargetIds.map(function(u){return a.indexOf(u)>-1&&u}).filter(Boolean);r.state.toggling=!0,r["".concat(t?"remove":"add","HiddenTargetIds")](a);var s=r.$el.svg.selectAll(r.selectorTargets(a)),l=t?null:"0";t&&o.length&&(s.style("display",null),Gt(r.config.data_onshown,this,o)),r.$T(s).style("opacity",l,"important").call(Dr,function(){!t&&o.length===0&&(s.style("display","none"),Gt(r.config.data_onhidden,i,a)),s.style("opacity",l)}),n.withLegend&&r["".concat(t?"show":"hide","Legend")](a),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var fy={show:function(t,e){e===void 0&&(e={}),bc.call(this,!0,t,e)},hide:function(t,e){e===void 0&&(e={}),bc.call(this,!1,t,e)},toggle:function(t,e){var n=this;e===void 0&&(e={});var i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(t).forEach(function(a){return r[i.isTargetToShow(a)?"hide":"show"].push(a)}),r.show.length&&this.show(r.show,e),r.hide.length&&setTimeout(function(){return n.hide(r.hide,e)},0)}},dy={show:function(t){var e,n,i,r=this.internal,a=r.$el,o=r.config,s=r.state,l=s.eventReceiver,u=s.hasTreemap,d=s.inputType,h,g;if(t.mouse&&(g=t.mouse),t.data){var x=t.data,_=(e=r.getYScaleById(x.id))===null||e===void 0?void 0:e(x.value);u&&x.id?l.rect=a.main.select("".concat(r.selectorTarget(x.id,void 0,"rect"))):r.isMultipleX()?g=[r.xx(x),_]:(o.tooltip_grouped||(g=[0,_]),h=(n=x.index)!==null&&n!==void 0?n:r.hasArcType()&&x.id?(i=r.getArcElementByIdOrIndex(x.id))===null||i===void 0?void 0:i.datum().index:r.getIndexByX(x.x))}else Ft(t.x)?h=r.getIndexByX(t.x):Ft(t.index)&&(h=t.index);(d==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(function(T){r.dispatchEvent(T,h,g)})},hide:function(){var t,e,n,i=this.internal,r=i.state.inputType,a=i.$el.tooltip,o=a==null?void 0:a.datum();if(o){var s=JSON.parse(o.current)[0].index;(r==="mouse"?["mouseout"]:["touchend"]).forEach(function(l){i.dispatchEvent(l,s)})}r==="touch"&&i.callOverOutForTouch(),i.hideTooltip(!0),(t=i.hideGridFocus)===null||t===void 0||t.call(i),(e=i.unexpandCircles)===null||e===void 0||e.call(i),(n=i.expandBarTypeShapes)===null||n===void 0||n.call(i,!1)}},hy={tooltip:dy},No=function(){function t(e){this.plugins=[];var n=new Gr(this);this.internal=n,function i(r,a,o){Object.keys(r).forEach(function(s){var l=pt(r[s]),u=a!==o,d=Wt(r[s]),h=d&&Object.keys(r[s]).length>0;l&&(!u&&h||u)?a[s]=r[s].bind(o):d&&!l?a[s]={}:a[s]=r[s],h&&i(r[s],a[s],o)})}(t.prototype,this,this),K0.call(n,e),n.beforeInit(),n.init()}return t}();Me(No.prototype,[Q0,J0,ty,oy,sy,ly,uy,fy,hy]);function Tc(t,e,n){var i=t.config,r=function(a,o){var s=ht(o)?o:o===!1?void 0:null;s!==null&&(i["axis_".concat(a,"_").concat(e)]=s)};Ft(n)&&(Ke(n)?Object.keys(n).forEach(function(a){r(a,n[a])}):(ht(n)||n===!1)&&["y","y2"].forEach(function(a){r(a,n)}),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function wc(t,e){var n=t.config;return{x:n["axis_x_".concat(e)],y:n["axis_y_".concat(e)],y2:n["axis_y2_".concat(e)]}}var gy={labels:function(t){var e=this.internal,n;return t&&(Object.keys(t).forEach(function(i){e.axis.setLabelText(i,t[i])}),e.axis.updateLabels()),["x","y","y2"].forEach(function(i){var r=e.axis.getLabelText(i);r&&(!n&&(n={}),n[i]=r)}),n},min:function(t){var e=this.internal;return $t(t)||t===!1?Tc(e,"min",t):wc(e,"min")},max:function(t){var e=this.internal;return $t(t)||t===!1?Tc(e,"max",t):wc(e,"max")},range:function(t){var e=this.axis;if(arguments.length){var n=t.min,i=t.max;Ft(i)&&e.max(i),Ft(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}},py={axis:gy},vy={category:function(t,e){var n=this.internal,i=n.config;return arguments.length>1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},categories:function(t){var e=this.internal,n=e.config;if(!t||!Array.isArray(t)){var i=n.axis_x_categories;return Qe(i)?Object.values(e.data.xs)[0]:i}return n.axis_x_categories=t,e.redraw(),n.axis_x_categories}};function Po(t,e){var n=this.internal,i=n.config,r=i.transition_duration&&Yi(),a="grid_".concat(e,"_lines");return t&&(i[a]=t,n.updateGrid(),n.redrawGrid(r)),i[a]}function Ql(t,e){var n="grid_".concat(e,"_lines");return Po.bind(this)(this.internal.config[n].concat(t||[]),e)}function Jl(t,e){this.internal.removeGridLines(t,e)}var tu=function(t){return Po.bind(this)(t,"x")};Me(tu,{add:function(t){return Ql.bind(this)(t,"x")},remove:function(t){return Jl.bind(this)(t,!0)}});var eu=function(t){return Po.bind(this)(t,"y")};Me(eu,{add:function(t){return Ql.bind(this)(t,"y")},remove:function(t){return Jl.bind(this)(t,!1)}});var xy={xgrids:tu,ygrids:eu},yy={groups:function(t){var e=this.internal,n=e.config;return ee(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function nu(t,e){e===void 0&&(e=!1);var n=this.internal,i=n.config,r=i.transition_duration&&Yi();return t?(i.regions=e?i.regions.concat(t):t,n.updateRegion(),n.redrawRegion(r),e?i.regions:t):i.regions}var iu=function(t){return nu.bind(this)(t)};Me(iu,{add:function(t){return nu.bind(this)(t,!0)},remove:function(t){var e=this.internal,n=e.config,i=e.$T,r=t||{},a=mn(r,"classes",[Bi.region]),o=e.$el.main.select(".".concat(Bi.regions)).selectAll(a.map(function(s){return".".concat(s)}));return i(o).style("opacity","0").remove(),o=n.regions,Object.keys(r).length?(o=o.filter(function(s){var l=!1;return s.class?(s.class.split(" ").forEach(function(u){a.indexOf(u)>=0&&(l=!0)}),!l):!0}),n.regions=o):n.regions=[],o}});var _y={regions:iu},my={x:function(t){var e=this.internal,n=e.axis,i=e.data,r=n.isCustomX()&&n.isCategorized();return Dt(t)&&(r?this.categories(t):(e.updateTargetX(i.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),r?this.categories():i.xs},xs:function(t){var e=this.internal;return Bt(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},by={flow:function(t){var e=this.internal,n;(t.json||t.rows||t.columns)&&e.convertData(t,function(r){n=r,i()});function i(){var r,a=0,o=0,s,l;if(!(e.state.redrawing||!n||!Yi())){var u=[],d=e.getMaxDataCount(),h=e.convertDataToTargets(n,!0),g=e.axis.isTimeSeries();e.data.targets.forEach(function(T){for(var A=!1,$=0;$<h.length;$++)if(T.id===h[$].id){A=!0,T.values[T.values.length-1]&&(o=T.values[T.values.length-1].index+1),a=h[$].values.length;for(var S=0;S<a;S++)h[$].values[S].index=o+S,g||(h[$].values[S].x=o+S);T.values=T.values.concat(h[$].values),h.splice($,1);break}!A&&u.push(T.id)}),e.data.targets.forEach(function(T){for(var A=0;A<u.length;A++)if(T.id===u[A]){o=T.values[T.values.length-1].index+1;for(var $=0;$<a;$++)T.values.push({id:T.id,index:o+$,x:g?e.getOtherTargetX(o+$):o+$,value:null})}}),e.data.targets.length&&h.forEach(function(T){for(var A=[],$=e.data.targets[0].values[0].index;$<o;$++)A.push({id:T.id,index:$,x:g?e.getOtherTargetX($):$,value:null});T.values.forEach(function(S){S.index+=o,g||(S.x+=o)}),T.values=A.concat(T.values)}),e.data.targets=e.data.targets.concat(h);var x=e.data.targets[0],_=x.values[0];Ft(t.to)?(a=0,l=g?Fe.call(e,t.to):t.to,x.values.forEach(function(T){T.x<l&&a++})):Ft(t.length)&&(a=t.length),d?d===1&&g&&(s=(x.values[x.values.length-1].x-_.x)/2,r=[new Date(+_.x-s),new Date(+_.x+s)]):(g?s=x.values.length>1?x.values[x.values.length-1].x-_.x:_.x-e.getXDomain(e.data.targets)[0]:s=1,r=[_.x-s,_.x]),r&&e.updateXDomain(null,!0,!0,!1,r),e.updateTargets(e.data.targets),e.redraw({flow:{index:_.index,length:a,duration:$t(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:d},withLegend:!0,withTransition:d>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}}},$c=function(){function t(e){var n=Nn(),i=e.config,r=e.params;this.owner=e,this.config=i,this.scale=n,(i.noTransition||!r.config.transition_duration)&&(i.withoutTransition=!0),i.range=this.scaleExtent((r.orgXScale||n).range())}return t.getSizeFor1Char=function(e){var n={w:5.5,h:11.5};return!e.empty()&&e.select("text").text("0").call(function(i){try{var r=i.node().getBBox(),a=r.width,o=r.height;a&&o&&(n.w=a,n.h=o)}catch{}finally{i.text("")}}),this.getSizeFor1Char=function(){return n},n},t.prototype.getTickTransformSetter=function(e){var n=this.config,i=e==="x"?function(r){return"translate(".concat(r+n.tickOffset,",0)")}:function(r){return"translate(0,".concat(r,")")};return function(r,a){r.attr("transform",function(o){return $t(o)?i(Math.ceil(a(o))):null})}},t.prototype.scaleExtent=function(e){var n=e[0],i=e[e.length-1];return n<i?[n,i]:[i,n]},t.prototype.generateTicks=function(e,n){var i=this.owner.params.tickStepSize,r=e.domain(),a=r[0],o=r[1],s=[];if(n&&i)for(var l=Math.round(a);l<=o;)s.push(l),l+=i;else if(e.ticks){var u=this.config.tickArguments;if(e.type==="log"&&!u){var d=Nn("_log").domain([a>0?a:1,o]).range(e.range());s=d.ticks();for(var h=o.toFixed().length;s.length>15;h--)s=d.ticks(h);s.splice(0,1,a),s.splice(s.length-1,1,o)}else s=e.ticks.apply(e,this.config.tickArguments||[]);s=s.map(function(g){var x=Pt(g)&&ht(g)&&!isNaN(g)&&Math.round(g*10)/10||g;return x})}return s},t.prototype.copyScale=function(){var e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e},t.prototype.textFormatted=function(e){var n=this.config.tickFormat,i=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,r=n?n(i):i;return Ft(r)?r:""},t.prototype.transitionise=function(e){var n=this.config,i=e;if(n.withoutTransition)i=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{i=e.transition(n.transition)}catch{}return i},t}(),Ty=function(){function t(e){e===void 0&&(e={});var n={innerTickSize:6,outerTickSize:e.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new $c(this)}return t.prototype.create=function(e){var n=this,i=n.config,r=n.helper,a=n.params,o=r.scale,s=i.orient,l=this.splitTickText.bind(n),u=/^(left|right)$/.test(s),d=/^(top|bottom)$/.test(s),h=r.getTickTransformSetter(d?"x":"y"),g=h===r.axisX?"y":"x",x=/^(top|left)$/.test(s)?-1:1,_=a.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():r.scaleExtent((a.orgXScale||o).range());var T=i.innerTickSize,A=i.tickLength,$=i.range,S=a.id,M=S&&/^(x|y|y2)$/.test(S)?a.config["axis_".concat(S,"_tick_text_position")]:{x:0,y:0},k=S==="subX"?"subchart_axis_x":"axis_".concat(S),P=a.config["".concat(k,"_show")],D={tick:P?a.config["".concat(k,"_tick_show")]:!1,text:P?a.config["".concat(k,"_tick_text_show")]:!1},p;e.each(function(){var j=lt(this),U=this.__chart__||o,G=r.copyScale();p=j,this.__chart__=G,i.tickOffset=a.isCategory?Math.ceil((G(1)-G(0))/2):0;var X=j.selectAll(".domain").data([0]);if(X.enter().append("path").attr("class","domain").merge(X).attr("d",function(){var Tt=i.outerTickSize*x;return d?"M".concat($[0],",").concat(Tt,"V0H").concat($[1],"V").concat(Tt):"M".concat(Tt,",").concat($[0],"H0V").concat($[1],"H").concat(Tt)}),D.tick||D.text){var Q=i.tickValues||r.generateTicks(G,u);n.generatedTicks=Q;var z=j.selectAll(".tick").data(Q,G),q=z.enter().insert("g",".domain").attr("class","tick"),Mt=z.exit().remove();z=q.merge(z),D.tick&&q.append("line"),D.text&&q.append("text");var it=$c.getSizeFor1Char(z),K=[],ft=z.select("text").selectAll("tspan").data(function(Tt,Ut){var ge=a.tickMultiline?l(Tt,G,Q,u,it.w):Dt(r.textFormatted(Tt))?r.textFormatted(Tt).concat():[r.textFormatted(Tt)];return K[Ut]=ge.length,ge.map(function(re){return{index:Ut,splitted:re}})});ft.exit().remove(),ft=ft.enter().append("tspan").merge(ft).text(function(Tt){return Tt.splitted}),ft.attr("x",d?0:A*x).attr("dx",function(){var Tt=0;return/(top|bottom)/.test(s)&&_&&(Tt=8*Math.sin(Math.PI*(_/180))*(s==="top"?-1:1)),Tt+(M.x||0)}()).attr("dy",function(Tt,Ut){var ge=".71em",re=0;return s!=="top"&&(re=it.h,Ut===0&&(re=u?-((K[Tt.index]-1)*(it.h/2)-3):M.y===0?ge:0)),ht(re)&&M.y?re+M.y:re||ge});var rt=z.select("line"),Lt=z.select("text");if(q.select("line").attr("".concat(g,"2"),T*x),q.select("text").attr(g,A*x),n.setTickLineTextPosition(rt,Lt),a.tickTitle){var Ht=Lt.select("title");(Ht.empty()?Lt.append("title"):Ht).text(function(Tt){return a.tickTitle[Tt]})}if(G.bandwidth){var ie=G,le=ie.bandwidth()/2;U=function(Tt){return ie(Tt)+le},G=U}else U.bandwidth?U=G:h(Mt,G);z=a.owner.state.flowing?r.transitionise(z):a.owner.$T(z),h(q,U),h(z.style("opacity",null),G)}}),this.g=p},t.prototype.getGeneratedTicks=function(e){var n,i=((n=this.generatedTicks)===null||n===void 0?void 0:n.length)-1,r=this.generatedTicks;if(i>e){var a=Math.round(i/e+.1);r=this.generatedTicks.map(function(o,s){return s%a===0?o:null}).filter(function(o){return o!==null}).splice(0,e)}return r},t.prototype.getTickXY=function(){var e=this.config,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n},t.prototype.getTickSize=function(e){var n=this.helper.scale,i=this.config,r=i.innerTickSize,a=i.range,o=n(e)+(i.tickCentered?0:i.tickOffset);return a[0]<o&&o<a[1]?r:0},t.prototype.setTickLineTextPosition=function(e,n){var i=this.getTickXY(),r=this.config,a=r.innerTickSize,o=r.orient,s=r.tickLength,l=r.tickOffset,u=this.params.tickTextRotate,d=function(x){var _=["start","end"];return o==="top"&&_.reverse(),x?_[x>0?0:1]:"middle"},h=function(x){return x?"rotate(".concat(x,")"):null},g=function(x){var _=x/(o==="bottom"?15:23);return x?11.5-2.5*_*(x>0?1:-1):s};switch(o){case"bottom":e.attr("x1",i.x).attr("x2",i.x).attr("y2",this.getTickSize.bind(this)),n.attr("x",0).attr("y",g(u)).style("text-anchor",d(u)).attr("transform",h(u));break;case"top":e.attr("x2",0).attr("y2",-a),n.attr("x",0).attr("y",-g(u)*2).style("text-anchor",d(u)).attr("transform",h(u));break;case"left":e.attr("x2",-a).attr("y1",i.y).attr("y2",i.y),n.attr("x",-s).attr("y",l).style("text-anchor","end");break;case"right":e.attr("x2",a).attr("y2",0),n.attr("x",s).attr("y",0).style("text-anchor","start")}},t.prototype.splitTickText=function(e,n,i,r,a){var o=this.params,s=this.helper.textFormatted(e),l=Pt(s)&&s.indexOf(`
`)>-1?s.split(`
`):[];if(l.length)return l;if(Dt(s))return s;var u=o.tickWidth;(!u||u<=0)&&(u=r?95:o.isCategory?Math.ceil(o.isInverted?n(i[0])-n(i[1]):n(i[1])-n(i[0]))-12:110);function d(h,g){for(var x,_,T,A=1;A<g.length;A++)if(g.charAt(A)===" "&&(_=A),x=g.substr(0,A+1),T=a*x.length,u<T)return d(h.concat(g.substr(0,_||A)),g.slice(_?_+1:A));return h.concat(g)}return d(l,String(s))},t.prototype.scale=function(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale},t.prototype.orient=function(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient},t.prototype.tickFormat=function(e){var n=this.config;return arguments.length?(n.tickFormat=e,this):n.tickFormat},t.prototype.tickCentered=function(e){var n=this.config;return arguments.length?(n.tickCentered=e,this):n.tickCentered},t.prototype.tickOffset=function(){return this.config.tickOffset},t.prototype.tickInterval=function(e){var n=this,i=this.config,r=i.outerTickSize,a=i.tickOffset,o=i.tickValues,s;if(this.params.isCategory)s=a*2;else{var l=this.g.select("path.domain").node().getTotalLength()-r*2;s=l/(e||this.g.selectAll("line").size());var u=o?o.map(function(d,h,g){var x=h+1;return x<g.length?n.helper.scale(g[x])-n.helper.scale(d):null}).filter(Boolean):[];s=Math.min.apply(Math,qt(qt([],u,!1),[s],!1))}return s===1/0?0:s},t.prototype.ticks=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=this.config;return e.length?(i.tickArguments=oi(e),this):i.tickArguments},t.prototype.tickCulling=function(e){var n=this.config;return arguments.length?(n.tickCulling=e,this):n.tickCulling},t.prototype.tickValues=function(e){var n=this,i=this.config;if(pt(e))i.tickValues=function(){return e(n.helper.scale.domain())};else{if(!arguments.length)return i.tickValues;i.tickValues=e}return this},t.prototype.setTransition=function(e){return this.config.transition=e,this},t}(),wy={getAxisInstance:function(){return this.axis||new $y(this)}},$y=function(){function t(e){this.axesList={},this.tick={x:null,y:null,y2:null},this.xs=[],this.orient={x:"bottom",y:"left",y2:"right",subX:"bottom"},this.owner=e,this.setOrient()}return t.prototype.getAxisClassName=function(e){return"".concat(te.axis," ").concat(te["axis".concat(hn(e))])},t.prototype.isHorizontal=function(e,n){var i=e.config.axis_rotated;return n?i:!i},t.prototype.isCategorized=function(){var e=this.owner,n=e.config,i=e.state;return n.axis_x_type.indexOf("category")>=0||i.hasRadar},t.prototype.isCustomX=function(){var e=this.owner.config;return!this.isTimeSeries()&&(e.data_x||Wt(e.data_xs))},t.prototype.isTimeSeries=function(e){return e===void 0&&(e="x"),this.owner.config["axis_".concat(e,"_type")]==="timeseries"},t.prototype.isLog=function(e){return e===void 0&&(e="x"),this.owner.config["axis_".concat(e,"_type")]==="log"},t.prototype.isTimeSeriesY=function(){return this.isTimeSeries("y")},t.prototype.getAxisType=function(e){e===void 0&&(e="x");var n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n},t.prototype.init=function(){var e=this,n=this.owner,i=n.config,r=n.$el,a=r.main,o=r.axis,s=n.state.clip,l=i.axis_rotated,u=["x","y"];i.axis_y2_show&&u.push("y2"),u.forEach(function(d){var h=e.getAxisClassName(d),g=te["axis".concat(d.toUpperCase(),"Label")];o[d]=a.append("g").attr("class",h).attr("clip-path",function(){var x=null;return d==="x"?x=s.pathXAxis:d==="y"&&(x=s.pathYAxis),x}).attr("transform",n.getTranslate(d)).style("visibility",i["axis_".concat(d,"_show")]?null:"hidden"),o[d].append("text").attr("class",g).attr("transform",["rotate(-90)",null][d==="x"?+!l:+l]).style("text-anchor",function(){return e.textAnchorForAxisLabel(d)}),e.generateAxes(d)})},t.prototype.setOrient=function(){var e=this.owner,n=e.config,i=n.axis_rotated,r=n.axis_y_inner,a=n.axis_y2_inner;this.orient={x:i?"left":"bottom",y:i?r?"top":"bottom":r?"right":"left",y2:i?a?"bottom":"top":a?"left":"right",subX:i?"left":"bottom"}},t.prototype.generateAxes=function(e){var n=this.owner,i=n.config,r=[],a=i["axis_".concat(e,"_axes")],o=i.axis_rotated,s;e==="x"?s=o?Ts:bs:e==="y"?s=o?bs:Ts:e==="y2"&&(s=o?Of:Ff),a.length&&a.forEach(function(l){var u=l.tick||{},d=n.scale[e].copy();l.domain&&d.domain(l.domain),r.push(s(d).ticks(u.count).tickFormat(pt(u.format)?u.format.bind(n.api):function(h){return h}).tickValues(u.values).tickSizeOuter(u.outer===!1?0:6))}),this.axesList[e]=r},t.prototype.updateAxes=function(){var e=this,n=this.owner,i=n.config,r=n.$el.main,a=n.$T;Object.keys(this.axesList).forEach(function(o){var s=i["axis_".concat(o,"_axes")],l=n.scale[o].copy(),u=l.range();e.axesList[o].forEach(function(d,h){var g=d.scale().range();u.every(function(T,A){return T===g[A]})||d.scale().range(u);var x="".concat(e.getAxisClassName(o),"-").concat(h+1),_=r.select(".".concat(x.replace(/\s/,".")));_.empty()?_=r.append("g").attr("class",x).style("visibility",i["axis_".concat(o,"_show")]?null:"hidden").call(d):(s[h].domain&&l.domain(s[h].domain),a(_).call(d.scale(l))),_.attr("transform",n.getTranslate(o,h+1))})})},t.prototype.setAxis=function(e,n,i,r){var a=this.owner;e!=="subX"&&(this.tick[e]=this.getTickValues(e)),this[e]=this.getAxis(e,n,i,e==="x"&&(a.scale.zoom||a.config.subchart_show||a.state.resizing)?!0:r)},t.prototype.getAxis=function(e,n,i,r,a){var o=this.owner,s=o.config,l=/^(x|subX)$/.test(e),u=l?"x":e,d=l&&this.isCategorized(),h=this.orient[e],g=a?0:o.getAxisTickRotate(u),x;if(l)x=e==="subX"?o.format.subXAxisTick:o.format.xAxisTick;else{var _=s["axis_".concat(e,"_tick_format")];pt(_)&&(x=_.bind(o.api))}var T=this.tick[u],A=si({outerTick:i,noTransition:r,config:s,id:e,tickTextRotate:g,owner:o},l&&{isCategory:d,isInverted:s.axis_x_inverted,tickMultiline:s.axis_x_tick_multiline,tickWidth:s.axis_x_tick_width,tickTitle:d&&s.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});l||(A.tickStepSize=s["axis_".concat(u,"_tick_stepSize")]);var $=new Ty(A).scale(l&&o.scale.zoom||n).orient(h);if(l&&this.isTimeSeries()&&T&&!pt(T)){var S=Fe.bind(o);T=T.map(function(k){return S(k)})}else!l&&this.isTimeSeriesY()&&($.ticks(s.axis_y_tick_time_value),T=null);T&&$.tickValues(T),$.tickFormat(x||!l&&o.isStackNormalized()&&function(k){return"".concat(k,"%")}),d&&($.tickCentered(s.axis_x_tick_centered),Qe(s.axis_x_tick_culling)&&(s.axis_x_tick_culling=!1));var M=s["axis_".concat(u,"_tick_count")];return M&&$.ticks(M),$},t.prototype.updateXAxisTickValues=function(e,n){var i,r=this.owner,a=r.config,o=a.axis_x_tick_fit,s=a.axis_x_tick_count,l;return(o||s&&o)&&(l=r.mapTargetsToUniqueXs(e),this.isCategorized()&&s>l.length&&(s=l.length),l=this.generateTickValues(l,s,this.isTimeSeries())),n?n.tickValues(l):this.x&&(this.x.tickValues(l),(i=this.subX)===null||i===void 0||i.tickValues(l)),l},t.prototype.getId=function(e){var n=this.owner,i=n.config,r=n.scale,a=i.data_axes[e];return(!a||!r[a])&&(a="y"),a},t.prototype.getXAxisTickFormat=function(e){var n=this.owner,i=n.config,r=n.format,a=e&&i.subchart_axis_x_tick_format||i.axis_x_tick_format,o=this.isTimeSeries(),s=this.isCategorized(),l;return a?pt(a)?l=a.bind(n.api):o&&(l=function(u){return u?r.axisTime(a)(u):""}):l=o?r.defaultAxisTime:s?n.categoryName:function(u){return u<0?u.toFixed(0):u},pt(l)?function(u){return l.apply(n,s?[u,n.categoryName(u)]:[u])}:l},t.prototype.getTickValues=function(e){var n=this.owner,i=n.config["axis_".concat(e,"_tick_values")],r=n["".concat(e,"Axis")];return(pt(i)?i.call(n.api):i)||(r?r.tickValues():void 0)},t.prototype.getLabelOptionByAxisId=function(e){return this.owner.config["axis_".concat(e,"_label")]},t.prototype.getLabelText=function(e){var n=this.getLabelOptionByAxisId(e);return Pt(n)?n:n?n.text:null},t.prototype.setLabelText=function(e,n){var i=this.owner,r=i.config,a=this.getLabelOptionByAxisId(e);Pt(a)?r["axis_".concat(e,"_label")]=n:a&&(a.text=n)},t.prototype.getLabelPosition=function(e,n){var i=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(e),a=Ke(r)&&r.position?r.position:n[+!i],o=function(s){return!!~a.indexOf(s)};return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}},t.prototype.getAxisLabelPosition=function(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])},t.prototype.getLabelPositionById=function(e){return this.getAxisLabelPosition(e)},t.prototype.xForAxisLabel=function(e){var n=this.owner,i=n.state,r=i.width,a=i.height,o=this.getAxisLabelPosition(e),s=o.isMiddle?-a/2:0;return this.isHorizontal(n,e!=="x")?s=o.isLeft?0:o.isCenter?r/2:r:o.isBottom&&(s=-a),s},t.prototype.dxForAxisLabel=function(e){var n=this.owner,i=this.getAxisLabelPosition(e),r=i.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?r=i.isLeft?"0.5em":i.isRight?"-0.5em":"0":i.isTop&&(r="-0.5em"),r},t.prototype.textAnchorForAxisLabel=function(e){var n=this.owner,i=this.getAxisLabelPosition(e),r=i.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?r=i.isLeft?"start":i.isCenter?"middle":"end":i.isBottom&&(r="start"),r},t.prototype.dyForAxisLabel=function(e){var n=this.owner,i=n.config,r=i.axis_rotated,a=this.getAxisLabelPosition(e).isInner,o=i["axis_".concat(e,"_tick_rotate")]?n.getHorizontalAxisHeight(e):0,s=this.getMaxTickSize(e).width,l;if(e==="x"){var u=i.axis_x_height;r?l=a?"1.2em":-25-s:a?l="-0.5em":u?l=u-10:o?l=o-10:l="3em"}else l={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],r?a?l=l[0]:o?l=o*(e==="y2"?-1:1)-l[1]:l=l[2]:l=a?l[3]:(l[4]+(i["axis_".concat(e,"_inner")]?0:s+l[4]))*(e==="y"?-1:1);return l},t.prototype.getMaxTickSize=function(e,n){var i=this.owner,r=i.config,a=i.state.current,o=i.$el,s=o.svg,l=o.chart,u=a.maxTickSize[e],d="axis_".concat(e),h={width:0,height:0};if(n||!r["".concat(d,"_show")]||u.width>0&&i.filterTargetsToShow().length===0)return u;if(s){var g=/^y2?$/.test(e),x=i.filterTargetsToShow(i.data.targets),_=i.scale[e].copy().domain(i["get".concat(g?"Y":"X","Domain")](x,e)),T=_.domain(),A=T[0]===T[1]&&T.every(function(p){return p>0}),$=Dt(u.domain)&&u.domain[0]===u.domain[1]&&u.domain.every(function(p){return p>0});if(A||$)return u.size;u.domain=T,g||u.ticks.splice(0);var S=this.getAxis(e,_,!1,!1,!0),M=r["".concat(d,"_tick_rotate")],k=r["".concat(d,"_tick_count")],P=r["".concat(d,"_tick_values")];!P&&k&&S.tickValues(this.generateTickValues(T,k,g?this.isTimeSeriesY():this.isTimeSeries())),!g&&this.updateXAxisTickValues(x,S);var D=l.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");S.create(D),D.selectAll("text").attr("transform",ht(M)?"rotate(".concat(M,")"):null).each(function(p,j){var U=this.getBoundingClientRect(),G=U.width,X=U.height;h.width=Math.max(h.width,G),h.height=Math.max(h.height,X),g||(u.ticks[j]=G)}),D.remove()}return Object.keys(h).forEach(function(p){h[p]>0&&(u[p]=h[p])}),u},t.prototype.getXAxisTickTextY2Overflow=function(e){var n=this.owner,i=n.axis,r=n.config,a=n.state,o=n.getAxisTickRotate("x"),s=o>0&&o<90;if((i.isCategorized()||i.isTimeSeries())&&r.axis_x_tick_fit&&(!r.axis_x_tick_culling||Qe(r.axis_x_tick_culling))&&!r.axis_x_tick_multiline&&s){var l=a.current.width-n.getCurrentPaddingByDirection("left"),u=this.getXAxisTickMaxOverflow(o,l-e),d=Math.max(0,u)+e;return Math.min(d,l/2)}return 0},t.prototype.getXAxisTickMaxOverflow=function(e,n){for(var i=this.owner,r=i.axis,a=i.config,o=i.state,s=r.isTimeSeries(),l=o.current.maxTickSize.x.ticks,u=l.length,d=o.axis.x.padding,h=d.left,g=d.right,x=0,_=u-(s&&a.axis_x_tick_fit?.5:0),T=0;T<u;T++){var A=T+1,$=Math.cos(Math.PI*e/180)*l[T],S=A-(s?1:.5)+h;if(!(S<=0)){var M=n-$,k=M/S,P=_-A,D=g*k,p=P*k+D,j=$-k/2-p;x=Math.max(x,j)}}var U=i.filterTargetsToShow(i.data.targets),G=0;if(!s&&a.axis_x_tick_count<=U.length&&U[0].values.length){var X=Nn(i.axis.getAxisType("x"),0,n-x).domain([h*-1,i.getXDomainMax(i.data.targets)+1+g]);G=Math.ceil((X(1)-X(0))/2)}return x+G},t.prototype.updateLabels=function(e){var n=this,i=this.owner,r=i.$el.main,a=i.$T,o={x:r.select(".".concat(te.axisX," .").concat(te.axisXLabel)),y:r.select(".".concat(te.axisY," .").concat(te.axisYLabel)),y2:r.select(".".concat(te.axisY2," .").concat(te.axisY2Label))};Object.keys(o).filter(function(s){return!o[s].empty()}).forEach(function(s){var l=o[s];a(l,e).attr("x",function(){return n.xForAxisLabel(s)}).attr("dx",function(){return n.dxForAxisLabel(s)}).attr("dy",function(){return n.dyForAxisLabel(s)}).text(function(){return n.getLabelText(s)})})},t.prototype.getPadding=function(e,n,i,r){var a=ht(e)?e:e[n];return $t(a)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",a,r):i},t.prototype.generateTickValues=function(e,n,i){var r=e;if(n){var a=pt(n)?n():n;if(a===1)r=[e[0]];else if(a===2)r=[e[0],e[e.length-1]];else if(a>2){var o=this.isCategorized(),s=a-2,l=e[0],u=e[e.length-1],d=(u-l)/(s+1),h=void 0;r=[l];for(var g=0;g<s;g++)h=+l+d*(g+1),r.push(i?new Date(h):o?Math.round(h):h);r.push(u)}}return i||(r=r.sort(function(x,_){return x-_})),r},t.prototype.generateTransitions=function(e){var n=this.owner,i=n.$el.axis,r=n.$T,a=["x","y","y2","subX"].map(function(d){return r(i[d],e)}),o=a[0],s=a[1],l=a[2],u=a[3];return{axisX:o,axisY:s,axisY2:l,axisSubX:u}},t.prototype.redraw=function(e,n,i){var r=this,a=this.owner,o=a.config,s=a.$el,l=n?"0":null;["x","y","y2","subX"].forEach(function(u){var d=r[u],h=s.axis[u];d&&h&&(!i&&!o.transition_duration&&(d.config.withoutTransition=!0),h.style("opacity",l),d.create(e["axis".concat(hn(u))]))}),this.updateAxes()},t.prototype.redrawAxis=function(e,n,i,r,a){var o=this,s,l,u,d=this.owner,h=d.config,g=d.scale,x=d.$el,_=!!g.zoom,T;!_&&this.isCategorized()&&e.length===0&&g.x.domain([0,x.axis.x.selectAll(".tick").size()]),g.x&&e.length?(!_&&d.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),h.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(s=this.subX)===null||s===void 0||s.tickValues([])),h.zoom_rescale&&!r&&(T=g.x.orgDomain()),["y","y2"].forEach(function(A){var $="axis_".concat(A,"_"),S=g[A];if(S){var M=h["".concat($,"tick_values")],k=h["".concat($,"tick_count")];if(S.domain(d.getYDomain(e,A,T)),!M&&k){var P=d.axis[A],D=S.domain();P.tickValues(o.generateTickValues(D,D.every(function(p){return p===0})?1:k,o.isTimeSeriesY()))}}}),this.redraw(i,d.hasArcType(),a),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling(),n.Y&&((l=g.subY)===null||l===void 0||l.domain(d.getYDomain(e,"y")),(u=g.subY2)===null||u===void 0||u.domain(d.getYDomain(e,"y2")))},t.prototype.setCulling=function(){var e=this.owner,n=e.config,i=e.state,r=i.clip,a=i.current,o=e.$el;["subX","x","y","y2"].forEach(function(s){var l=o.axis[s],u=s==="subX"?"x":s,d="axis_".concat(u,"_tick_culling"),h=n[d];if(l&&h){var g=l.selectAll(".tick"),x=ci(g.data()),_=x.length,T=n["".concat(d,"_max")],A=n["".concat(d,"_lines")],$;if(_){for(var S=1;S<_;S++)if(_/S<T){$=S;break}g.each(function(k){var P=A?this.querySelector("text"):this;P&&(P.style.display=x.indexOf(k)%$?"none":null)})}else g.style("display",null);if(s==="x"){var M=a.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;o.svg.selectAll(".".concat(te.axisX," .tick text")).attr("clip-path",M)}}})},t}(),Ay={initEventRect:function(){var t=this;t.$el.main.select(".".concat(Et.chart)).append("g").attr("class",Ie.eventRects).style("fill-opacity","0")},redrawEventRect:function(){var t,e=this,n=e.config,i=e.state,r=e.$el,a=e.isMultipleX(),o=n.axis_x_inverted;if(r.eventRect)e.updateEventRect(r.eventRect,!0);else if(e.data.targets.length){var s=e.$el.main.select(".".concat(Ie.eventRects)).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(Ie.eventRectsMultiple,a).classed(Ie.eventRectsSingle,!a),l=s.selectAll(".".concat(Ie.eventRect)).data([0]).enter().append("rect");e.updateEventRect(l),a?e.generateEventRectsForMultipleXs(l):e.generateEventRectsForSingleX(l),l.call(e.getDraggableSelection()),r.eventRect=l,e.state.inputType==="touch"&&!r.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),i.rendered&&e.updateEventRect(r.eventRect,!0)}if(!a){var u=e.getMaxDataCountTarget();(!n.data_xSort||o)&&u.sort(function(d,h){return o?h.x-d.x:d.x-h.x}),e.updateDataIndexByX(u),e.updateXs(u),(t=e.updatePointClass)===null||t===void 0||t.call(e,!0),i.eventReceiver.data=u}e.updateEventRectData()},bindTouchOnEventRect:function(){var t=this,e=t.config,n=t.state,i=t.$el,r=i.eventRect,a=i.svg,o=function(x){if(t.isMultipleX())t.selectRectForMultipleXs(x);else{var _=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(_),_===-1?t.unselectRect():t.selectRectForSingle(x,_)}},s=function(){t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,u=zl(l)&&l||!1,d=!isNaN(l)&&l||null,h,g=function(x){var _=x.type,T=x.changedTouches[0],A=T["client".concat(e.axis_rotated?"Y":"X")];_==="touchstart"?u?x.preventDefault():d!==null&&(h=A):_==="touchmove"&&(u||h===!0||d!==null&&Math.abs(h-A)>=d)&&(h=!0,x.preventDefault())};r.on("touchstart",function(x){n.event=x,t.updateEventRect()}).on("touchstart.eventRect touchmove.eventRect",function(x){if(n.event=x,!r.empty()&&r.classed(Ie.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||x.touches.length>1)return;g(x),o(r.node())}else s()},!0).on("touchend.eventRect",function(x){n.event=x,!r.empty()&&r.classed(Ie.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},!0),a.on("touchstart",function(x){n.event=x;var _=x.target;_&&_!==r.node()&&s()})},updateEventRect:function(t,e){e===void 0&&(e=!1);var n=this,i=n.state,r=n.$el,a=i.eventReceiver,o=i.width,s=i.height,l=i.rendered,u=i.resizing,d=t||r.eventRect,h=function(){a&&(a.rect=d.node().getBoundingClientRect())};(!l||u||e)&&(d.attr("x",0).attr("y",0).attr("width",o).attr("height",s),(!l||e)&&d.classed(Ie.eventRect,!0)),h()},updateEventRectData:function(){var t=this,e=t.config,n=t.scale,i=t.state,r=n.zoom||n.x,a=e.axis_rotated,o,s,l,u;if(t.isMultipleX())o=0,s=0,l=i.width,u=i.height;else{var d,h=void 0;if(t.axis.isCategorized())d=t.getEventRectWidth(),h=function(T){return r(T.x)-d/2};else{var g=function(T){var A=T.index;return{prev:t.getPrevX(A),next:t.getNextX(A)}};d=function(T){var A=g(T),$=r.domain(),S;return A.prev===null&&A.next===null?S=a?i.height:i.width:A.prev===null?S=(r(A.next)+r(T.x))/2:A.next===null?S=r($[1])-(r(A.prev)+r(T.x))/2:(Object.keys(A).forEach(function(M,k){var P;A[M]=(P=A[M])!==null&&P!==void 0?P:$[k]}),S=Math.max(0,(r(A.next)-r(A.prev))/2)),S},h=function(T){var A=g(T),$;return A.prev===null&&A.next===null?$=0:A.prev===null?$=r(r.domain()[0]):$=(r(T.x)+r(A.prev))/2,$}}o=a?0:h,s=a?h:0,l=a?i.width:d,u=a?d:i.height}var x=i.eventReceiver,_=function(T,A){return pt(T)?T(A):T};x.coords.splice(x.data.length),x.data.forEach(function(T,A){x.coords[A]={x:_(o,T),y:_(s,T),w:_(l,T),h:_(u,T)}})},selectRectForSingle:function(t,e){var n,i,r=this,a=r.config,o=r.$el,s=o.main,l=o.circle,u=a.data_selection_enabled,d=a.data_selection_grouped,h=a.data_selection_isselectable,g=a.tooltip_grouped,x=r.getAllValuesOnIndex(e);if(!(g&&(r.showTooltip(x,t),(n=r.showGridFocus)===null||n===void 0||n.call(r,x),!u||d))){!l&&s.selectAll(".".concat(Et.EXPANDED,":not(.").concat(ve.shape,"-").concat(e,")")).classed(Et.EXPANDED,!1);var _=s.selectAll(".".concat(ve.shape,"-").concat(e)).classed(Et.EXPANDED,!0).style("cursor",h?"pointer":null).filter(function(T){return r.isWithinShape(this,T)});_.empty()&&!g&&((i=r.hideGridFocus)===null||i===void 0||i.call(r),r.hideTooltip(),!d&&r.setExpand(e)),_.call(function(T){var A,$,S=T.data();u&&(d||h!=null&&h.bind(r.api)(S))&&(t.style.cursor="pointer"),g||(r.showTooltip(S,t),(A=r.showGridFocus)===null||A===void 0||A.call(r,S),($=r.unexpandCircles)===null||$===void 0||$.call(r),T.each(function(M){return r.setExpand(e,M.id)}))})}},selectRectForMultipleXs:function(t,e){e===void 0&&(e=!0);var n=this,i=n.config,r=n.state,a=n.filterTargetsToShow(n.data.targets);if(!(r.dragging||n.hasArcType(a))){var o=cn(r.event,t),s=n.findClosestFromTargets(a,o);if(e&&r.mouseover&&(!s||s.id!==r.mouseover.id)&&(i.data_onout.call(n.api,r.mouseover),r.mouseover=void 0),!s){n.unselectRect();return}var l=n.isBubbleType(s)||n.isScatterType(s)||!i.tooltip_grouped?[s]:n.filterByX(a,s.x),u=l.map(function(h){return n.addName(h)});n.showTooltip(u,t),n.setExpand(s.index,s.id,!0),n.showGridFocus(u);var d=n.dist(s,o);(n.isBarType(s.id)||d<n.getPointSensitivity(s))&&(n.$el.svg.select(".".concat(Ie.eventRect)).style("cursor","pointer"),e&&!r.mouseover&&(i.data_onover.call(n.api,s),r.mouseover=s))}},unselectRect:function(){var t=this,e=t.$el,n=e.circle,i=e.tooltip;t.$el.svg.select(".".concat(Ie.eventRect)).style("cursor",null),t.hideGridFocus(),i&&(t.hideTooltip(),t._handleLinkedCharts(!1)),n&&!t.isPointFocusOnly()&&t.unexpandCircles(),t.expandBarTypeShapes(!1)},generateEventRectsForSingleX:function(t){var e=this,n=e.config,i=e.state,r=i.eventReceiver,a=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(s){i.event=s;var l=r.currentIdx,u=r.data,d=u[l===-1?e.getDataIndexFromEvent(s):l];e.clickHandlerForSingleX.bind(this)(d,e)});if(i.inputType==="mouse"){var o=function(s){var l=s?e.getDataIndexFromEvent(s):r.currentIdx;return l>-1?r.data[l]:null};a.on("mouseover",function(s){i.event=s,e.updateEventRect()}).on("mousemove",function(s){var l=o(s);if(i.event=s,!!l){var u=l.index,d=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(d)){var h=e.scale.zoom||e.scale.x,g=e.axis.xs[u],x=h.invert(cn(s,this)[0]);d==="step-after"&&x<g?u-=1:d==="step-before"&&x>g&&(u+=1)}var _=n.tooltip_grouped&&u===r.currentIdx;if(i.dragging||i.flowing||e.hasArcType()||_){n.tooltip_show&&_&&e.setTooltipPosition();return}u!==r.currentIdx&&(e.setOverOut(!1,r.currentIdx),r.currentIdx=u),u===-1?e.unselectRect():e.selectRectForSingle(this,u),e.setOverOut(u!==-1,u)}}).on("mouseout",function(s){i.event=s,!(!n||e.hasArcType()||r.currentIdx===-1)&&(e.unselectRect(),e.setOverOut(!1,r.currentIdx),r.currentIdx=-1)})}return a},clickHandlerForSingleX:function(t,e){var n=e,i=n.config,r=n.state,a=n.$el.main;if(!t||n.hasArcType()||r.cancelClick){r.cancelClick&&(r.cancelClick=!1);return}var o=t.index;a.selectAll(".".concat(ve.shape,"-").concat(o)).each(function(s){var l;(i.data_selection_grouped||n.isWithinShape(this,s))&&((l=n.toggleShape)===null||l===void 0||l.call(n,this,s,o),i.data_onclick.bind(n.api)(s,this))})},generateEventRectsForMultipleXs:function(t){var e=this,n=e.state;t.on("click",function(i){n.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}),n.inputType==="mouse"&&t.on("mouseover mousemove",function(i){n.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",function(i){n.event=i,!(!e.config||e.hasArcType())&&e.unselectRect()})},clickHandlerForMultipleXS:function(t){var e=t,n=e.config,i=e.state,r=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(r)){var a=cn(i.event,this),o=e.findClosestFromTargets(r,a),s=n.point_sensitivity==="radius"?o.r:n.point_sensitivity;o&&(e.isBarType(o.id)||e.dist(o,a)<s)&&e.$el.main.selectAll(".".concat(ve.shapes).concat(e.getTargetSelectorSuffix(o.id))).selectAll(".".concat(ve.shape,"-").concat(o.index)).each(function(){var l;(n.data_selection_grouped||e.isWithinShape(this,o))&&((l=e.toggleShape)===null||l===void 0||l.call(e,this,o,o.index),n.data_onclick.bind(e.api)(o,this))})}}},Cy={generateFlow:function(t){var e=this,n=e.data,i=e.state,r=e.$el;return function(){var a=t.flow.length;i.flowing=!0,n.targets.forEach(function(s){s.values.splice(0,a)}),e.updateXGrid&&e.updateXGrid(!0);var o={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(function(s){var l=s.split("."),u=r[l[0]];u&&l.length>1&&(u=u[l[1]]),u!=null&&u.size()&&(o[s]=u)}),e.hideGridFocus(),e.setFlowList(o,t)}},setFlowList:function(t,e){var n=this,i=e.flow,r=e.targets,a=i.duration,o=a===void 0?e.duration:a,s=i.index,l=i.length,u=i.orgDataCount,d=n.getFlowTransform(r,u,s,l),h=Gl(),g;h.add(Object.keys(t).map(function(x){return g=t[x].transition().ease(lp).duration(o),x==="axis.x"?g=g.call(function(_){n.axis.x.setTransition(_).create(_)}):x==="region.list"?g=g.filter(n.isRegionOnX).attr("transform",d):g=g.attr("transform",d),g})),g.call(h,function(){n.cleanUpFlow(t,e)})},cleanUpFlow:function(t,e){var n=this,i=n.config,r=n.state,a=n.$el.svg,o=i.axis_rotated,s=e.flow,l=e.shape,u=e.xv,d=l.pos,h=d.cx,g=d.cy,x=d.xForText,_=d.yForText,T=s.done,A=T===void 0?function(){}:T,$=s.length;$&&(["circle","text","shape","eventRect"].forEach(function(S){for(var M=[],k=0;k<$;k++)M.push(".".concat(ce[S],"-").concat(k));a.selectAll(".".concat(ce["".concat(S,"s")])).selectAll(M).remove()}),a.select(".".concat(ce.xgrid)).remove()),Object.keys(t).forEach(function(S){var M=t[S];if(S!=="axis.x"&&M.attr("transform",null),S==="grid.x")M.attr(r.xgridAttr);else if(S==="gridLines.x")M.attr("x1",o?0:u).attr("x2",o?r.width:u),M.select("text").attr("x",o?r.width:0).attr("y",u);else if(/^(area|bar|line)$/.test(S))M.attr("d",l.type[S]);else if(S==="text")M.attr("x",x).attr("y",_).style("fill-opacity",n.opacityForText.bind(n));else if(S==="circle")if(n.isCirclePoint())M.attr("cx",h).attr("cy",g);else{var k=function(D){return h(D)-i.point_r},P=function(D){return g(D)-i.point_r};M.attr("x",k).attr("y",P)}else S==="region.list"&&M.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),i.interaction_enabled&&n.redrawEventRect(),A.call(n.api),r.flowing=!1},getFlowTransform:function(t,e,n,i){var r=this,a=r.data,o=r.scale.x,s=a.targets[0].values,l=r.getValueOnIndex(s,n),u=r.getValueOnIndex(s,n+i),d,h=o.domain(),g=r.updateXDomain(t,!0,!0);e?e===1||(l==null?void 0:l.x)===(u==null?void 0:u.x)?d=o(h[0])-o(g[0]):d=r.axis.isTimeSeries()?o(h[0])-o(g[0]):o((l==null?void 0:l.x)||0)-o(u.x):s.length!==1?d=o(h[0])-o(g[0]):r.axis.isTimeSeries()?(l=r.getValueOnIndex(s,0),u=r.getValueOnIndex(s,s.length-1),d=o(l.x)-o(u.x)):d=Mi(g)/2;var x=Mi(h)/Mi(g);return"translate(".concat(d,",0) scale(").concat(x,",1)")}},Sy={initClip:function(){var t=this,e=t.state,n=e.clip,i=e.datetimeId;n.id="".concat(i,"-clip"),n.idXAxis="".concat(n.id,"-xaxis"),n.idYAxis="".concat(n.id,"-yaxis"),n.idGrid="".concat(n.id,"-grid"),n.path=t.getClipPath(n.id),n.pathXAxis=t.getClipPath(n.idXAxis),n.pathYAxis=t.getClipPath(n.idYAxis),n.pathGrid=t.getClipPath(n.idGrid)},getClipPath:function(t){var e=this,n=e.config;if(!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t))return null;var i=It.navigator?It.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0:!1;return"url(".concat(i?"":zt.URL.split("#")[0],"#").concat(t,")")},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){var e=this,n=e.config,i=e.state,r=i.margin,a=i.width,o=i.height,s=n.axis_rotated,l=Math.max(30,r.left)-(s?0:20),u=(s?r.top+o+10:r.bottom)+20,d=s?-(1+l):-(l-1),h=-15,g=s?r.left+20:a+10+l;t.attr("x",d).attr("y",h).attr("width",g).attr("height",u)},setYAxisClipPath:function(t){var e=this,n=e.config,i=e.state,r=i.margin,a=i.width,o=i.height,s=n.axis_rotated,l=Math.max(30,r.left)-(s?20:0),u=n.axis_y_inner,d=u&&!s?n.axis_y_label.text?-20:-1:s?-(1+l):-(l-1),h=-(s?20:r.top),g=(s?a+15+l:r.left+20)+(u?20:0),x=(s?r.bottom+10:r.top+o)+10;t.attr("x",d).attr("y",h).attr("width",g).attr("height",x)},updateXAxisTickClip:function(){var t=this,e=t.config,n=t.state,i=n.clip,r=n.xAxisHeight,a=t.$el.defs,o=t.getHorizontalAxisHeight("x");if(a&&!i.idXAxisTickTexts){var s="".concat(i.id,"-xaxisticktexts");t.appendClip(a,s),i.pathXAxisTickTexts=t.getClipPath(i.idXAxisTickTexts),i.idXAxisTickTexts=s}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth:function(){var t=this,e=t.config,n=t.state.current.maxTickSize,i=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&i){var r=Math.sin(Math.PI/180*Math.abs(i));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/r}else n.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var t=this,e=t.state,n=e.clip,i=e.current,r=t.$el.svg;r&&r.select("#".concat(n.idXAxisTickTexts," rect")).attr("width",i.maxTickSize.x.clipPath).attr("height",30)}},ky=function(t){return $t(t.position)||"end"},Ey=function(t){return t.position==="start"?4:t.position==="middle"?0:-4};function Ac(t,e,n){return function(i){var r=t?0:e;return i.position==="start"?r=t?-n:0:i.position==="middle"&&(r=(t?-n:e)/2),r}}function Cc(t,e){e==="grid"&&t.each(function(){var n=lt(this);["x1","x2","y1","y2"].forEach(function(i){return n.attr(i,Math.ceil(+n.attr(i)))})})}var Ry={hasGrid:function(){var t=this.config;return["x","y"].some(function(e){return t["grid_".concat(e,"_show")]||t["grid_".concat(e,"_lines")].length})},initGrid:function(){var t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){var t=this,e=t.config,n=t.state.clip,i=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(i.gridLines.main=i.main.insert("g",".".concat(Et.chart).concat(e.grid_lines_front?" + *":"")).attr("clip-path",n.pathGrid).attr("class","".concat(jt.grid," ").concat(jt.gridLines)),i.gridLines.main.append("g").attr("class",jt.xgridLines),i.gridLines.main.append("g").attr("class",jt.ygridLines),i.gridLines.x=Yc([]))},updateXGrid:function(t){var e=this,n=e.config,i=e.scale,r=e.state,a=e.$el,o=a.main,s=a.grid,l=n.axis_rotated,u=e.generateGridData(n.grid_x_type,i.x),d=e.axis.isCategorized()?e.axis.x.tickOffset():0,h=function(g){return(i.zoom||i.x)(g)+d*(l?-1:1)};r.xgridAttr=l?{x1:0,x2:r.width,y1:h,y2:h}:{x1:h,x2:h,y1:0,y2:r.height},s.x=o.select(".".concat(jt.xgrids)).selectAll(".".concat(jt.xgrid)).data(u),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",jt.xgrid).merge(s.x),t||s.x.each(function(){var g=lt(this);Object.keys(r.xgridAttr).forEach(function(x){g.attr(x,r.xgridAttr[x]).style("opacity",function(){return g.attr(l?"y1":"x1")===(l?r.height:0)?"0":null})})})},updateYGrid:function(){var t=this,e=t.axis,n=t.config,i=t.scale,r=t.state,a=t.$el,o=a.grid,s=a.main,l=n.axis_rotated,u=function(h){return Math.ceil(i.y(h))},d=e.y.getGeneratedTicks(n.grid_y_ticks)||t.scale.y.ticks(n.grid_y_ticks);o.y=s.select(".".concat(jt.ygrids)).selectAll(".".concat(jt.ygrid)).data(d),o.y.exit().remove(),o.y=o.y.enter().append("line").attr("class",jt.ygrid).merge(o.y),o.y.attr("x1",l?u:0).attr("x2",l?u:r.width).attr("y1",l?0:u).attr("y2",l?r.height:u),Cc(o.y,"grid")},updateGrid:function(){var t=this,e=t.$el,n=e.grid,i=e.gridLines;!i.main&&t.initGridLines(),n.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines:function(t){var e=this,n=e.config,i=e.$el,r=i.gridLines,a=i.main,o=e.$T,s=n.axis_rotated,l=t==="x";n["grid_".concat(t,"_show")]&&e["update".concat(t.toUpperCase(),"Grid")]();var u=a.select(".".concat(jt["".concat(t,"gridLines")])).selectAll(".".concat(jt["".concat(t,"gridLine")])).data(n["grid_".concat(t,"_lines")]);o(u.exit()).style("opacity","0").remove();var d=u.enter().append("g");d.append("line").style("opacity","0"),u=d.merge(u),u.each(function(h){var g=lt(this);g.select("text").empty()&&h.text&&g.append("text").style("opacity","0")}),o(u.attr("class",function(h){return"".concat(jt["".concat(t,"gridLine")]," ").concat(h.class||"").trim()}).select("text").attr("text-anchor",ky).attr("transform",function(){return l?s?null:"rotate(-90)":s?"rotate(-90)":null}).attr("dx",Ey).attr("dy",-5)).text(function(h){var g;return(g=h.text)!==null&&g!==void 0?g:this.remove()}),r[t]=u},redrawGrid:function(t){var e=this,n=e.config.axis_rotated,i=e.state,r=i.width,a=i.height,o=e.$el.gridLines,s=e.$T,l=e.xv.bind(e),u=e.yv.bind(e),d=o.x.select("line"),h=o.x.select("text"),g=o.y.select("line"),x=o.y.select("text");return d=s(d,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:a),h=s(h,t).attr("x",Ac(!n,r,a)).attr("y",l),g=s(g,t).attr("x1",n?u:0).attr("x2",n?u:r).attr("y1",n?0:u).attr("y2",n?a:u),x=s(x,t).attr("x",Ac(n,r,a)).attr("y",u),[d.style("opacity",null),h.style("opacity",null),g.style("opacity",null),x.style("opacity",null)]},initFocusGrid:function(){var t=this,e=t.config,n=t.state.clip,i=t.$el,r=e.grid_front,a=".".concat(r&&i.gridLines.main?jt.gridLines:Et.chart).concat(r?" + *":""),o=i.main.insert("g",a).attr("clip-path",n.pathGrid).attr("class",jt.grid);i.grid.main=o,e.grid_x_show&&o.append("g").attr("class",jt.xgrids),e.grid_y_show&&o.append("g").attr("class",jt.ygrids),e.interaction_enabled&&e.grid_focus_show&&(o.append("g").attr("class",Xt.xgridFocus).append("line").attr("class",Xt.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&o.append("g").attr("class",Xt.ygridFocus).append("line").attr("class",Xt.ygridFocus))},showGridFocus:function(t){var e,n=this,i=n.config,r=n.state,a=r.width,o=r.height,s=i.axis_rotated,l=n.$el.main.selectAll("line.".concat(Xt.xgridFocus,", line.").concat(Xt.ygridFocus)),u=(t||[l.datum()]).filter(function(g){return g&&$t(n.getBaseValue(g))});if(!(!i.tooltip_show||u.length===0||n.hasType("bubble")||n.hasArcType())){var d=i.grid_focus_edge&&!i.tooltip_grouped,h=n.xx.bind(n);l.style("visibility",null).data(u.concat(u)).each(function(g){var x=lt(this),_={x:h(g),y:n.getYScaleById(g.id)(g.value)},T;if(x.classed(Xt.xgridFocus))T=s?[null,_.x,d?_.y:a,_.x]:[_.x,d?_.y:null,_.x,o];else{var A=n.axis.getId(g.id)==="y2";T=s?[_.y,d&&!A?_.x:null,_.y,d&&A?_.x:o]:[d&&A?_.x:null,_.y,d&&!A?_.x:a,_.y]}["x1","y1","x2","y2"].forEach(function($,S){return x.attr($,T[S])})}),Cc(l,"grid"),(e=n.showCircleFocus)===null||e===void 0||e.call(n,t)}},hideGridFocus:function(){var t,e=this,n=e.state,i=n.inputType,r=n.resizing,a=e.$el.main;(i==="mouse"||!r)&&(a.selectAll("line.".concat(Xt.xgridFocus,", line.").concat(Xt.ygridFocus)).style("visibility","hidden"),(t=e.hideCircleFocus)===null||t===void 0||t.call(e))},updateGridFocus:function(){var t,e=this,n=e.state,i=n.inputType,r=n.width,a=n.height,o=n.resizing,s=e.$el.grid,l=s.main.select("line.".concat(Xt.xgridFocus));if(i==="touch")l.empty()?o&&((t=e.showCircleFocus)===null||t===void 0||t.call(e)):e.showGridFocus();else{var u=e.config.axis_rotated;l.attr("x1",u?0:-10).attr("x2",u?r:-10).attr("y1",u?-10:0).attr("y2",u?-10:a)}return!0},generateGridData:function(t,e){var n=this,i=n.$el.main.select(".".concat(te.axisX)).selectAll(".tick").size(),r=[];if(t==="year")for(var a=n.getXDomain(),o=a.map(function(d){return d.getFullYear()}),s=o[0],l=o[1],u=s;u<=l;u++)r.push(new Date("".concat(u,"-01-01 00:00:00")));else r=e.ticks(10),r.length>i&&(r=r.filter(function(d){return String(d).indexOf(".")<0}));return r},getGridFilterToRemove:function(t){return t?function(e){var n=!1;return(Dt(t)?t.concat():[t]).forEach(function(i){("value"in i&&e.value===i.value||"class"in i&&e.class===i.class)&&(n=!0)}),n}:function(){return!0}},removeGridLines:function(t,e){var n=this,i=n.config,r=n.$T,a=n.getGridFilterToRemove(t),o=function(d){return!a(d)},s=e?jt.xgridLines:jt.ygridLines,l=e?jt.xgridLine:jt.ygridLine;r(n.$el.main.select(".".concat(s)).selectAll(".".concat(l)).filter(a)).style("opacity","0").remove();var u="grid_".concat(e?"x":"y","_lines");i[u]=i[u].filter(o)}},My={initRegion:function(){var t=this,e=t.$el;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",Bi.regions)},updateRegion:function(){var t=this,e=t.config,n=t.$el.region,i=t.$T;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);var r=n.main.selectAll(".".concat(Bi.region)).data(e.regions);i(r.exit()).style("opacity","0").remove();var a=r.enter().append("g");a.append("rect").style("fill-opacity","0"),n.list=a.merge(r).attr("class",t.classRegion.bind(t)),n.list.each(function(o){var s,l=lt(this);l.select("text").empty()&&(!((s=o.label)===null||s===void 0)&&s.text)&&lt(this).append("text").style("opacity","0")})},redrawRegion:function(t){var e=this,n=e.$el.region,i=e.$T,r=n.list.select("rect"),a=n.list.selectAll("text");return r=i(r,t).attr("x",e.regionX.bind(e)).attr("y",e.regionY.bind(e)).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),a=i(a,t).attr("transform",function(o){var s,l=(s=o.label)!==null&&s!==void 0?s:{},u=l.x,d=u===void 0?0:u,h=l.y,g=h===void 0?0:h,x=l.rotated,_=x===void 0?!1:x;return"translate(".concat(e.regionX.bind(e)(o)+d,", ").concat(e.regionY.bind(e)(o)+g,")").concat(_?" rotate(-90)":"")}).attr("text-anchor",function(o){var s;return!((s=o.label)===null||s===void 0)&&s.rotated?"end":null}).attr("dy","1em").style("fill",function(o){var s,l;return(l=(s=o.label)===null||s===void 0?void 0:s.color)!==null&&l!==void 0?l:null}).text(function(o){var s;return(s=o.label)===null||s===void 0?void 0:s.text}),[r.style("fill-opacity",function(o){return $t(o.opacity)?o.opacity:null}).on("end",function(){lt(this.parentNode).selectAll("rect:not([x])").remove()}),a.style("opacity",null)]},getRegionXY:function(t,e){var n=this,i=n.config,r=n.scale,a=i.axis_rotated,o=t==="x",s="start",l,u=0;return e.axis==="y"||e.axis==="y2"?(o||(s="end"),(o?a:!a)&&s in e&&(l=r[e.axis],u=l(e[s]))):(o?!a:a)&&s in e&&(l=r.zoom||r.x,u=l(n.axis.isTimeSeries()?Fe.call(n,e[s]):e[s])),u},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){var n=this,i=n.config,r=n.scale,a=n.state,o=i.axis_rotated,s=t==="width",l=n[s?"regionX":"regionY"](e),u,d="end",h=a[t];return e.axis==="y"||e.axis==="y2"?(s||(d="start"),(s?o:!o)&&d in e&&(u=r[e.axis],h=u(e[d]))):(s?!o:o)&&d in e&&(u=r.zoom||r.x,h=u(n.axis.isTimeSeries()?Fe.call(n,e[d]):e[d])),h<l?0:h-l},regionWidth:function(t){return this.getRegionSize("width",t)},regionHeight:function(t){return this.getRegionSize("height",t)},isRegionOnX:function(t){return!t.axis||t.axis==="x"}},Ly={getAxisSize:function(t){var e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId:function(t,e){var n,i,r=this;if(r.axis){var a=(n=r.axis)===null||n===void 0?void 0:n.getLabelPositionById(t),o=r.axis.getMaxTickSize(t,e).width,s=o===0?.5:0;return o+(((i=r.config.padding)===null||i===void 0?void 0:i.mode)==="fit"?a.isInner?10+s:10:a.isInner?20+s:40)}else return 40},getHorizontalAxisHeight:function(t){var e,n,i=this,r=i.config,a=i.state,o=a.rotatedPadding,s=a.isLegendRight,l=a.isLegendInset,u=r.axis_rotated,d=((e=r.padding)===null||e===void 0?void 0:e.mode)==="fit",h=r["axis_".concat(t,"_inner")],g=r["axis_".concat(t,"_label")].text,x=13,_=((n=r.padding)===null||n===void 0?void 0:n.mode)==="fit"?h&&!g?t==="y"?1:0:20:30;if(t==="x"&&!r.axis_x_show)return 8;if(t==="x"&&ht(r.axis_x_height))return r.axis_x_height;if(t==="y"&&!r.axis_y_show)return r.legend_show&&!s&&!l?10:1;if(t==="y2"&&!r.axis_y2_show)return d?0:o.top;var T=i.axis.getMaxTickSize(t);return T.height>x&&(_+=T.height-x),_+(i.axis.getLabelPositionById(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth:function(){var t=this,e=t.config,n=t.axis,i=e.axis_x_inverted,r=n.x.tickInterval();return Math.max(0,i?Math.abs(r):r)},getAxisTickRotate:function(t){var e=this,n=e.axis,i=e.config,r=e.state,a=e.$el,o=i["axis_".concat(t,"_tick_rotate")];if(t==="x"){var s=n.isCategorized()||n.isTimeSeries();if(i.axis_x_tick_fit&&s){var l=i.axis_x_tick_count,u=r.current.maxTickSize.x.ticks.length,d=0;if(l?d=l>u?u:l:u&&(d=u),d!==r.axis.x.tickCount){var h=e.data.targets;r.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(h,"min"),e.getXDomainMinMax(h,"max")],d)}r.axis.x.tickCount=d}a.svg&&i.axis_x_tick_autorotate&&i.axis_x_tick_fit&&!i.axis_x_tick_multiline&&!i.axis_x_tick_culling&&s&&(o=e.needToRotateXAxisTickTexts()?i.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts:function(){var t=this,e=t.state,n=e.axis,i=e.current,r=i.width-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),a=n.x.tickCount+n.x.padding.left+n.x.padding.right,o=t.axis.getMaxTickSize("x").width,s=a?r/a:0;return o>s}},Dy={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},Iy={axis_x_clipPath:!0,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_count:void 0,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},Ny={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},Py={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},Oy=mt(mt(mt({axis_rotated:!1},Iy),Ny),Py),Fy={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0},By=[py,vy,by,xy,yy,_y,my],Xy=[wy,Sy,Ay,Cy,Ry,My,Ly],zy=[Dy,Oy,Fy];function Sc(t){t===void 0&&(t=0);var e=this,n=e.config,i=e.state,r=e.hasMultiArcGauge(),a=i.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,o=t?Math.min(i.radiusExpanded*t-i.radius,a*.8-(1-t)*100):0;return{inner:function(s){var l=e.getRadius(s).innerRadius;return r?i.radius-a*(s.index+1):ht(l)?l:0},outer:function(s){var l=e.getRadius(s).outerRadius,u;if(r)u=i.radius-a*s.index+o;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(s,l);else if(u=l,t){var d=i.radiusExpanded;i.radius!==l&&(d-=Math.abs(i.radius-l)),u=d*t}return u},corner:function(s,l){var u=n.arc_cornerRadius_ratio,d=u===void 0?0:u,h=n.arc_cornerRadius,g=h===void 0?0:h,x=s.data.id,_=s.value,T=0;return d?T=d*l:T=ht(g)?g:g.call(e.api,x,_,l),T}}}function Da(t){return function(e){var n=function(r){var a=r.startAngle,o=a===void 0?0:a,s=r.endAngle,l=s===void 0?0:s,u=r.padAngle,d=u===void 0?0:u;return{startAngle:o,endAngle:l,padAngle:d}},i=zi(n(this._current),n(e));return this._current=e,function(r){var a=i(r),o=e.data,s=e.index,l=e.value;return t(mt(mt({},a),{data:o,index:s,value:l}))}}}var Hy={initPie:function(){var t=this,e=t.config,n=e.data_type,i=e["".concat(n,"_padding")],r=e["".concat(n,"_startingAngle")]||0,a=(i?i*.01:e["".concat(n,"_padAngle")])||0;t.pie=wx().startAngle(r).endAngle(r+2*Math.PI).padAngle(a).value(function(o){return o.values.reduce(function(s,l){return s+l.value},0)}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius:function(){var t=this,e=t.config,n=t.state,i=e.data_type,r=e["".concat(i,"_padding")],a=e.gauge_width||e.donut_width,o=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=a?(n.radius-a)/n.radius:.6,n.gaugeArcWidth=a||(o<=n.radius-n.innerRadius?n.radius-n.innerRadius:o<=n.radius?o:n.radius);var s=e.pie_innerRadius||(r?r*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:s},getRadius:function(t){var e=this,n=t==null?void 0:t.data,i=e.state,r=i.innerRadius,a=i.outerRadius;return!ht(r)&&n&&(r=r[n.id]||0),Bt(a)&&n&&n.id in a?a=a[n.id]:ht(a)||(a=e.state.radius),{innerRadius:r,outerRadius:a}},updateArc:function(){var t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){var t=this,e=t.config,n=e.gauge_arcLength*3.6,i=2*(n/360);return n<-360?i=-2:n>360&&(i=2),i*Math.PI},getGaugeStartAngle:function(){var t=this,e=t.config,n=e.gauge_fullCircle,i=-1*Math.PI/2,r=Math.PI/2,a=e.gauge_startingAngle;return!n&&a<=i?a=i:!n&&a>=r?a=r:(a>Math.PI||a<-1*Math.PI)&&(a=Math.PI),a},updateAngle:function(t){var e=this,n=e.config,i=e.state,r=e.pie,a=t,o=!1;if(!n)return null;var s=e.getGaugeStartAngle(),l=n.gauge_fullCircle?e.getArcLength():s*-2;if(a.data&&e.isGaugeType(a.data)&&!e.hasMultiArcGauge()){var u=n.gauge_min,d=n.gauge_max,h=e.getTotalDataSum(i.rendered),g=l*((h-u)/(d-u));r=r.startAngle(s).endAngle(g+s)}if(r(e.filterTargetsToShow()).forEach(function($,S){var M;!o&&$.data.id===((M=a.data)===null||M===void 0?void 0:M.id)&&(o=!0,a=$,a.index=S)}),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),a.data&&e.hasMultiArcGauge()){var x=n.gauge_min,_=n.gauge_max,T=l/(_-x),A=a.value<x?0:a.value<_?a.value-x:_-x;a.startAngle=s,a.endAngle=s+T*A}return o?a:null},getSvgArc:function(){var t=this,e=Sc.call(t),n=e.inner,i=e.outer,r=e.corner,a=uc().innerRadius(n).outerRadius(i),o=function(s,l){var u,d="M 0 0";if(s.value||s.data){var h=l?s:(u=t.updateAngle(s))!==null&&u!==void 0?u:null;h&&(d=a.cornerRadius(r(h,i(h)))(h))}return d};return o.centroid=a.centroid,o},getSvgArcExpanded:function(t){t===void 0&&(t=1);var e=this,n=Sc.call(e,t),i=n.inner,r=n.outer,a=n.corner,o=uc().innerRadius(i).outerRadius(r);return function(s){var l=e.updateAngle(s),u=r(l),d=0;return l&&(d=a(l,u)),l?o.cornerRadius(d)(l):"M 0 0"}},getArc:function(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},transformForArcLabel:function(t){var e,n=this,i=n.config,r=n.state.radiusExpanded,a=n.updateAngle(t),o="";if(a){if(n.hasMultiArcGauge()){var s=Math.sin(a.endAngle-Math.PI/2),l=Math.cos(a.endAngle-Math.PI/2)*(r+25),u=s*(r+15-Math.abs(s*10))+3;o="translate(".concat(l,",").concat(u,")")}else if(!n.hasType("gauge")||n.data.targets.length>1){var d=n.getRadius(t).outerRadius;n.hasType("polar")&&(d=n.getPolarOuterRadius(t,d));var h=this.svgArc.centroid(a),g=h.map(function($){return isNaN($)?0:$}),l=g[0],u=g[1],x=Math.sqrt(l*l+u*u),_=(e=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function($){return i["".concat($,"_label_ratio")]}))===null||e===void 0?void 0:e[0];_?_=pt(_)?_.bind(n.api)(t,d,x):_:_=d&&(x?(36/d>.375?1.175-36/d:.8)*d/x:0),o="translate(".concat(l*_,",").concat(u*_,")")}}return o},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){var e=this,n=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBackgroundColor.bind(e)).each(function(i){var r,a=lt(this),o=e.updateAngle(i),s=e.getRatio("arc",o),l=e.meetsLabelThreshold(s,(r=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))===null||r===void 0?void 0:r[0]);if(l){var u=(o||i).value,d=(e.getArcLabelFormat()||e.defaultArcValueFormat)(u,s,i.data.id).toString();Ir(a,d,[-1,1],n)}else a.text("")})},expandArc:function(t){var e=this,n=e.state.transiting,i=e.$el;if(n){var r=setInterval(function(){n||(clearInterval(r),i.legend.selectAll(".".concat(Xt.legendItemFocused)).size()>0&&e.expandArc(t))},10);return}var a=e.mapToTargetIds(t);i.svg.selectAll(e.selectorTargets(a,".".concat(Yt.chartArc))).each(function(o){if(e.shouldExpand(o.data.id)){var s=e.getExpandConfig(o.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(o.data.id,"rate"));lt(this).selectAll("path").transition().duration(s).attrTween("d",Da(e.svgArcExpanded.bind(e))).transition().duration(s*2).attrTween("d",Da(l.bind(e)))}})},unexpandArc:function(t){var e=this,n=e.state.transiting,i=e.$el.svg;if(!n){var r=e.mapToTargetIds(t);i.selectAll(e.selectorTargets(r,".".concat(Yt.chartArc))).selectAll("path").transition().duration(function(a){return e.getExpandConfig(a.data.id,"duration")}).attrTween("d",Da(e.svgArc.bind(e))),i.selectAll("".concat(Yt.arc)).style("opacity",null)}},getExpandConfig:function(t,e){var n=this,i=n.config,r={duration:50,rate:.98},a;return n.isDonutType(t)?a="donut":n.isGaugeType(t)?a="gauge":n.isPieType(t)&&(a="pie"),a?i["".concat(a,"_expand_").concat(e)]:r[e]},shouldExpand:function(t){var e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel:function(){var t=this,e=t.config;return["donut","gauge","pie","polar"].some(function(n){return t.hasType(n)&&e["".concat(n,"_label_show")]})},getArcLabelFormat:function(){var t=this,e=t.config,n=function(i){return i};return["donut","gauge","pie","polar"].filter(t.hasType.bind(t)).forEach(function(i){n=e["".concat(i,"_label_format")]}),pt(n)?n.bind(t.api):n},updateTargetsForArc:function(t){var e=this,n=e.$el,i=e.hasType("gauge"),r=e.getChartClass("Arc"),a=e.getClass("arcs",!0),o=e.classFocus.bind(e),s=n.main.select(".".concat(Yt.chartArcs)),l=s.selectAll(".".concat(Yt.chartArc)).data(e.pie(t)).attr("class",function(d){return r(d)+o(d.data)}),u=l.enter().append("g").attr("class",r).call(this.setCssRule(!1,".".concat(Yt.chartArcs," text"),["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",a).merge(l),u.append("text").attr("dy",i&&!e.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=s.selectAll(".".concat(Et.target," text"))},initArc:function(){var t=this,e=t.$el;e.arcs=e.main.select(".".concat(Et.chart)).append("g").attr("class",Yt.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){var e=this,n=t||e.getArcTitle(),i=e.hasType("gauge");if(n){var r=i?Ge.chartArcsGaugeTitle:Yt.chartArcsTitle,a=e.$el.arcs.select(".".concat(r));a.empty()&&(a=e.$el.arcs.append("text").attr("class",r).style("text-anchor","middle")),i&&a.attr("dy","-0.3em"),Ir(a,n,i?void 0:[-.6,1.35],!0)}},getArcTitle:function(){var t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config["".concat(e,"_title")]:""},getArcTitleWithNeedleValue:function(){var t=this,e=t.config,n=t.state,i=t.getArcTitle();if(i&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(i)){var r=n.current.needle;return ht(r)||(r=e.arc_needle_value),Nr(i,{NEEDLE_VALUE:ht(r)?r:0})}return!1},redrawArc:function(t,e,n){var i=this,r=i.config,a=i.state,o=i.$el.main,s=r.interaction_enabled,l=s&&r.data_selection_isselectable,u=o.selectAll(".".concat(Yt.arcs)).selectAll(".".concat(Yt.arc)).data(i.arcData.bind(i));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",i.getClass("arc",!0)).style("fill",function(d){return i.color(d.data)}).style("cursor",function(d){var h;return!((h=l==null?void 0:l.bind)===null||h===void 0)&&h.call(l,i.api)(d)?"pointer":null}).style("opacity","0").each(function(d){i.isGaugeType(d.data)&&(d.startAngle=r.gauge_startingAngle,d.endAngle=r.gauge_startingAngle),this._current=d}).merge(u),i.hasType("gauge")&&(i.updateGaugeMax(),i.hasMultiArcGauge()&&i.redrawMultiArcGauge()),u.attr("transform",function(d){return!i.isGaugeType(d.data)&&n?"scale(0)":""}).style("opacity",function(d){return d===this._current?"0":null}).each(function(){a.transiting=!0}).transition().duration(t).attrTween("d",function(d){var h=i.updateAngle(d);if(!h)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var g=zi(this._current,h);return this._current=g(0),function(x){var _=g(x);return _.data=d.data,i.getArc(_,!0)}}).attr("transform",n?"scale(1)":"").style("fill",function(d){var h;return i.levelColor?(h=i.levelColor(d.data.values[0].value),r.data_colors[d.data.id]=h):h=i.color(d.data),h}).style("opacity",null).call(Dr,function(){if(i.levelColor){var d=lt(this),h=d.datum(this._current);i.updateLegendItemColor(h.data.id,d.style("fill"))}a.transiting=!1,Gt(r.onrendered,i.api)}),s&&i.bindArcEvent(u),i.hasType("polar")&&i.redrawPolar(),i.hasType("gauge")&&i.redrawBackgroundArcs(),r.arc_needle_show&&i.redrawNeedle(),i.redrawArcText(t)},redrawNeedle:function(){var t=this,e=t.$el,n=t.config,i=t.state,r=i.hiddenTargetIds,a=i.radius,o=(a-1)/100*n.arc_needle_length,s=r.length!==t.data.targets.length,l=t.$el.arcs.select(".".concat(Yt.needle)),u=n.arc_needle_path,d=n.arc_needle_bottom_width/2,h=n.arc_needle_top_width/2,g=n.arc_needle_top_rx,x=n.arc_needle_top_ry,_=n.arc_needle_bottom_len,T=n.arc_needle_bottom_rx,A=n.arc_needle_bottom_ry,$=t.getNeedleAngle(),S=function(){var k=t.getArcTitleWithNeedleValue();k&&t.setArcTitle(k)};if(S(),l.empty()&&(l=e.arcs.append("path").classed(Yt.needle,!0),e.needle=l,e.needle.updateHelper=function(k,P){P===void 0&&(P=!1),e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform","rotate(".concat(t.getNeedleAngle(k),"deg)")).call(Dr,function(){P&&(n.arc_needle_value=k),S()})}),s){var M=pt(u)?u.call(t,o):"M-".concat(d," ").concat(_," A").concat(T," ").concat(A," 0 0 0 ").concat(d," ").concat(_," L").concat(h," -").concat(o," A").concat(g," ").concat(x," 0 0 0 -").concat(h," -").concat(o," L-").concat(d," ").concat(_," Z");t.$T(l).attr("d",M).style("fill",n.arc_needle_color).style("display",null).style("transform","rotate(".concat($,"deg)"))}else l.style("display","none")},getNeedleAngle:function(t){var e=this,n=e.config,i=e.state,r=e.getArcLength(),a=e.hasType("gauge"),o=e.getTotalDataSum(!0),s=Ft(t)?t:n.arc_needle_value,l=n["".concat(n.data_type,"_startingAngle")]||0,u=0;if(ht(s)||(s=a&&e.data.targets.length===1?o:0),i.current.needle=s,a){l=e.getGaugeStartAngle();var d=n.gauge_fullCircle?r:l*-2,h=n.gauge_min,g=n.gauge_max;u=d*((s-h)/(g-h))}else u=r*(s/o);return(l+u)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this,e=t.config,n=t.state,i=t.hasMultiArcGauge(),r=e.gauge_fullCircle,a=t.filterTargetsToShow(t.data.targets).length===0&&!!e.data_empty_label_text,o=t.getGaugeStartAngle(),s=r?o+t.getArcLength():o*-1,l=t.$el.arcs.select("".concat(i?"g":"",".").concat(Yt.chartArcsBackground));if(i){var u=0;l=l.selectAll("path.".concat(Yt.chartArcsBackground)).data(t.data.targets),l.enter().append("path").attr("class",function(d,h){return"".concat(Yt.chartArcsBackground," ").concat(Yt.chartArcsBackground,"-").concat(h)}).merge(l).style("fill",e.gauge_background||null).attr("d",function(d){var h=d.id;if(a||n.hiddenTargetIds.indexOf(h)>=0)return"M 0 0";var g={data:[{value:e.gauge_max}],startAngle:o,endAngle:s,index:u++};return t.getArc(g,!0,!0)}),l.exit().remove()}else l.attr("d",a?"M 0 0":function(){var d={data:[{value:e.gauge_max}],startAngle:o,endAngle:s};return t.getArc(d,!0,!0)})},bindArcEvent:function(t){var e=this,n=e.config,i=e.state,r=i.inputType==="touch",a=i.inputType==="mouse";function o(u,d,h){e.expandArc(h),e.api.focus(h),e.toggleFocusLegend(h,!0),e.showTooltip([d],u)}function s(u){var d=(u==null?void 0:u.id)||void 0;e.unexpandArc(d),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,d,h){var g,x=e.updateAngle(d),_;x&&(_=e.convertToArcData(x),(g=e.toggleShape)===null||g===void 0||g.call(e,this,_,h),n.data_onclick.bind(e.api)(_,this))}),a&&t.on("mouseover",function(u,d){if(!i.transiting){i.event=u;var h=e.updateAngle(d),g=h?e.convertToArcData(h):null,x=(g==null?void 0:g.id)||void 0;o(this,g,x),e.setOverOut(!0,g)}}).on("mouseout",function(u,d){if(!i.transiting){i.event=u;var h=e.updateAngle(d),g=h?e.convertToArcData(h):null;s(),e.setOverOut(!1,g)}}).on("mousemove",function(u,d){var h=e.updateAngle(d),g=h?e.convertToArcData(h):null;i.event=u,e.showTooltip([g],this)}),r&&e.hasArcType()&&!e.radars){var l=function(u){var d,h,g=(h=(d=u.changedTouches)===null||d===void 0?void 0:d[0])!==null&&h!==void 0?h:{clientX:0,clientY:0},x=g.clientX,_=g.clientY,T=lt(zt.elementFromPoint(x,_));return T};e.$el.svg.on("touchstart touchmove",function(u){if(!i.transiting){i.event=u;var d=l(u),h=d.datum(),g=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,x=g?e.convertToArcData(g):null,_=(x==null?void 0:x.id)||void 0;e.callOverOutForTouch(x),ee(_)?s():o(this,x,_)}})}},redrawArcText:function(t){var e=this,n=e.config,i=e.state,r=e.$el,a=r.main,o=r.arcs,s=e.hasType("gauge"),l=e.hasMultiArcGauge(),u;if(s&&e.data.targets.length===1&&n.gauge_title||(u=a.selectAll(".".concat(Yt.chartArc)).select("text").style("opacity","0").attr("class",function(h){return e.isGaugeType(h.data)?Ge.gaugeValue:null}).call(e.textForArcLabel.bind(e)).attr("transform",e.transformForArcLabel.bind(e)).style("font-size",function(h){return e.isGaugeType(h.data)&&e.data.targets.length===1&&!l?"".concat(Math.round(i.radius/5),"px"):null}).transition().duration(t).style("opacity",function(h){return e.isTargetToShow(h.data.id)&&e.isArcType(h.data)?null:"0"}),l&&u.attr("dy","-.1em")),a.select(".".concat(Yt.chartArcsTitle)).style("opacity",e.hasType("donut")||s?null:"0"),s){var d=n.gauge_fullCircle;d&&(u==null||u.attr("dy","".concat(l?0:Math.round(i.radius/14)))),n.gauge_label_show&&(o.select(".".concat(Ge.chartArcsGaugeUnit)).attr("dy","".concat(d?1.5:.75,"em")).text(n.gauge_units),o.select(".".concat(Ge.chartArcsGaugeMin)).attr("dx","".concat(-1*(i.innerRadius+(i.radius-i.innerRadius)/(d?1:2)),"px")).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!d&&o.select(".".concat(Ge.chartArcsGaugeMax)).attr("dx","".concat(i.innerRadius+(i.radius-i.innerRadius)/2,"px")).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e=this,n=e.$el.arcs,i=ht(t)?function(r){return r.index===t}:function(r){return r.data.id===t};return n==null?void 0:n.selectAll(".".concat(Et.target," path")).filter(i)}},Yy={initArea:function(t){var e=this,n=e.config;t.insert("g",".".concat(n.area_front?he.circles:_n.lines)).attr("class",e.getClass("areas",!0))},updateAreaColor:function(t){var e=this;return e.config.area_linearGradient?e.getGradienColortUrl(t.id):e.color(t)},updateArea:function(t,e){e===void 0&&(e=!1);var n=this,i=n.config,r=n.state,a=n.$el,o=n.$T,s=e?a.subchart:a;i.area_linearGradient&&n.updateLinearGradient();var l=s.main.selectAll(".".concat(to.areas)).selectAll(".".concat(to.area)).data(n.lineData.bind(n));o(l.exit(),t).style("opacity","0").remove(),s.area=l.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return r.orgAreaOpacity=lt(this).style("opacity"),"0"}).merge(l),l.style("opacity",r.orgAreaOpacity),n.setRatioForGroupedData(s.area.data())},redrawArea:function(t,e,n){n===void 0&&(n=!1);var i=this,r=(n?this.$el.subchart:this.$el).area,a=i.state.orgAreaOpacity;return[i.$T(r,e,Fn()).attr("d",t).style("fill",i.updateAreaColor.bind(i)).style("opacity",function(o){return String(i.isAreaRangeType(o)?a/1.75:a)})]},generateDrawArea:function(t,e){var n=this,i=n.config,r=i.line_connectNull,a=i.axis_rotated,o=n.generateGetAreaPoints(t,e),s=n.getYScaleById.bind(n),l=function(h){return(e?n.subxx:n.xx).call(n,h)},u=function(h,g){return n.isGrouped(h.id)?o(h,g)[0][1]:s(h.id,e)(n.isAreaRangeType(h)?n.getRangedData(h,"high"):n.getShapeYMin(h.id))},d=function(h,g){return n.isGrouped(h.id)?o(h,g)[1][1]:s(h.id,e)(n.isAreaRangeType(h)?n.getRangedData(h,"low"):h.value)};return function(h){var g=r?n.filterRemoveNull(h.values):h.values,x=0,_=0,T;if(n.isAreaType(h)){var A=mx();A=a?A.y(l).x0(u).x1(d):A.x(l).y0(i.area_above?0:i.area_below?n.state.height:u).y1(d),r||(A=A.defined(function($){return n.getBaseValue($)!==null})),n.isStepType(h)&&(g=n.convertValuesToStep(g)),T=A.curve(n.getCurve(h))(g)}else g[0]&&(x=n.scale.x(g[0].x),_=n.getYScaleById(h.id)(g[0].value)),T=a?"M ".concat(_," ").concat(x):"M ".concat(x," ").concat(_);return T||"M 0 0"}},generateGetAreaPoints:function(t,e){var n=this,i=n.config,r=n.getShapeX(0,t,e),a=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),s=n.getYScaleById.bind(n);return function(l,u){var d=s.call(n,l.id,e)(n.getShapeYMin(l.id)),h=o(l,u)||d,g=r(l),x=l.value,_=a(l);return i.axis_rotated&&(x>0&&_<d||x<0&&d<_)&&(_=d),[[g,h],[g,_-(d-h)],[g,_-(d-h)],[g,h]]}}},Uy={initBar:function(){var t=this,e=t.$el,n=t.config,i=t.state.clip;e.bar=e.main.select(".".concat(Et.chart)),e.bar=n.bar_front?e.bar.append("g"):e.bar.insert("g",":first-child"),e.bar.attr("class",Ne.chartBars).call(this.setCssRule(!1,".".concat(Ne.chartBars),["pointer-events:none"])),n.clipPath===!1&&(n.bar_radius||n.bar_radius_ratio)&&e.bar.attr("clip-path",i.pathXAxis.replace(/#[^)]*/,"#".concat(i.id)))},updateTargetsForBar:function(t){var e=this,n=e.config,i=e.$el,r=e.getChartClass("Bar"),a=e.getClass("bars",!0),o=e.classFocus.bind(e),s=n.interaction_enabled&&n.data_selection_isselectable;i.bar||e.initBar();var l=i.main.select(".".concat(Ne.chartBars)).selectAll(".".concat(Ne.chartBar)).data(t.filter(function(d){return d.values.some(function(h){return ht(h.value)||e.isBarRangeType(h)})})).attr("class",function(d){return r(d)+o(d)}),u=l.enter().append("g").attr("class",r).style("opacity","0").style("pointer-events",e.getStylePropValue("none"));u.append("g").attr("class",a).style("cursor",function(d){var h;return!((h=s==null?void 0:s.bind)===null||h===void 0)&&h.call(s,e.api)(d)?"pointer":null}).call(e.setCssRule(!0," .".concat(Ne.bar),["fill"],e.color))},updateBar:function(t,e){e===void 0&&(e=!1);var n=this,i=n.config,r=n.$el,a=n.$T,o=e?r.subchart:r,s=n.getClass("bar",!0),l=n.initialOpacity.bind(n);i.bar_linearGradient&&n.updateLinearGradient();var u=o.main.selectAll(".".concat(Ne.bars)).selectAll(".".concat(Ne.bar)).data(n.labelishData.bind(n));a(u.exit(),t).style("opacity","0").remove(),o.bar=u.enter().append("path").attr("class",s).style("fill",n.updateBarColor.bind(n)).merge(u).style("opacity",l),n.setRatioForGroupedData(o.bar.data())},updateBarColor:function(t){var e=this,n=e.getStylePropValue(e.color);return e.config.bar_linearGradient?e.getGradienColortUrl(t.id):n?n(t):null},redrawBar:function(t,e,n){n===void 0&&(n=!1);var i=this,r=(n?i.$el.subchart:i.$el).bar;return[i.$T(r,e,Fn()).attr("d",function(a){return(ht(a.value)||i.isBarRangeType(a))&&t(a)}).style("fill",i.updateBarColor.bind(i)).style("opacity",null)]},generateDrawBar:function(t,e){var n=this,i=n.config,r=n.generateGetBarPoints(t,e),a=i.axis_rotated,o=i.bar_radius,s=i.bar_radius_ratio,l=ht(o)&&o>0?function(){return o}:ht(s)?function(u){return u*s}:null;return function(u,d){var h=r(u,d),g=+a,x=+!g,_=u.value<0,T=i["axis_".concat(n.axis.getId(u.id),"_inverted")],A=!T&&_||T&&!_,$=["",""],S=0,M=n.isGrouped(u.id),k=l&&M?n.isStackingRadiusData(u):!1;if(l){var P=a?x:g,D=h[2][P]-h[0][P];S=!M||k?l(D):0;var p="a".concat(S,",").concat(S," ").concat(A?"1 0 0":"0 0 1"," ");$[+!a]="".concat(p).concat(S,",").concat(S),$[+a]="".concat(p).concat([-S,S][a?"sort":"reverse"]()),A&&$.reverse()}var j=a?"H".concat(h[1][g]+(A?S:-S)," ").concat($[0],"V").concat(h[2][x]-S," ").concat($[1],"H").concat(h[3][g]):"V".concat(h[1][x]+(A?-S:S)," ").concat($[0],"H").concat(h[2][g]-S," ").concat($[1],"V").concat(h[3][x]);return"M".concat(h[0][g],",").concat(h[0][x]).concat(j,"z")}},isStackingRadiusData:function(t){var e=this,n=e.$el,i=e.config,r=e.data,a=e.state,o=t.id,s=t.index,l=t.value;if(a.hiddenTargetIds.indexOf(o)>-1){var u=n.bar.filter(function(x){return x.id===o&&x.value===l});return!u.empty()&&/a\d+/i.test(u.attr("d"))}var d=i.data_groups.find(function(x){return x.indexOf(o)>-1}),h=e.orderTargets(e.filterTargetsToShow(r.targets.filter(e.isBarType,e))).filter(function(x){return d.indexOf(x.id)>-1}),g=h.map(function(x){return x.values.filter(function(_){return _.index===s&&(ht(l)&&l>0?_.value>0:_.value<0)})[0]}).filter(Boolean).map(function(x){return x.id});return l!==0&&g.indexOf(o)===g.length-1},generateGetBarPoints:function(t,e){var n=this,i=n.config,r=e?n.axis.subX:n.axis.x,a=n.getIndicesMax(t)+1,o=n.getBarW("bar",r,a),s=n.getShapeX(o,t,!!e),l=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),d=n.getYScaleById.bind(n);return function(h,g){var x=h.id,_=d.call(n,x,e)(n.getShapeYMin(x)),T=u(h,g)||_,A=ht(o)?o:o[h.id]||o._$width,$=i["axis_".concat(n.axis.getId(x),"_inverted")],S=h.value,M=s(h),k=l(h);i.axis_rotated&&!$&&(S>0&&k<_||S<0&&_<k)&&(k=_),n.isBarRangeType(h)||(k-=_-T);var P=M+A;return[[M,T],[M,k],[P,k],[P,T]]}}},Vy={initLine:function(){var t=this.$el;t.line=t.main.select(".".concat(Et.chart)).append("g").attr("class",_n.chartLines).call(this.setCssRule(!1,".".concat(_n.chartLines),["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this,n=e.$el,i=n.area,r=n.line,a=n.main,o=e.getChartClass("Line"),s=e.getClass("lines",!0),l=e.classFocus.bind(e);r||e.initLine();var u=t.filter(function(x){return!(e.isScatterType(x)||e.isBubbleType(x))}),d=a.select(".".concat(_n.chartLines)).selectAll(".".concat(_n.chartLine)).data(u).attr("class",function(x){return o(x)+l(x)}),h=d.enter().append("g").attr("class",o).style("opacity","0").style("pointer-events",e.getStylePropValue("none"));if(h.append("g").attr("class",s),e.hasTypeOf("Area")){var g=(!i&&h.empty()?d:h).filter(e.isAreaType.bind(e));e.initArea(g)}e.updateTargetForCircle(u,h)},updateLine:function(t,e){e===void 0&&(e=!1);var n=this,i=n.format.extraLineClasses,r=n.$el,a=n.$T,o=e?r.subchart:r,s=o.main.selectAll(".".concat(_n.lines)).selectAll(".".concat(_n.line)).data(n.lineData.bind(n));a(s.exit(),t).style("opacity","0").remove(),o.line=s.enter().append("path").attr("class",function(l){return"".concat(n.getClass("line",!0)(l)," ").concat(i(l)||"")}).style("stroke",n.color).merge(s).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine:function(t,e,n){n===void 0&&(n=!1);var i=this,r=i.$el,a=i.$T,o=(n?r.subchart:r).line;return[a(o,e,Fn()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this,n=e.config.axis_rotated&&e.isStepType(t);return n?function(i){var r=e.getInterpolate(t)(i);return r.orgPoint=r.point,r.pointRotated=function(a,o){this._point===1&&(this._point=2);var s=this._y*(1-this._t)+o*this._t;this._context.lineTo(this._x,s),this._context.lineTo(a,s),this._x=a,this._y=o},r.point=function(a,o){this._point===0?this.orgPoint(a,o):this.pointRotated(a,o)},r}:e.getInterpolate(t)},generateDrawLine:function(t,e){var n=this,i=n.config,r=n.scale,a=i.line_connectNull,o=i.axis_rotated,s=n.generateGetLinePoints(t,e),l=n.getYScaleById.bind(n),u=function(x){return(e?n.subxx:n.xx).call(n,x)},d=function(x,_){return n.isGrouped(x.id)?s(x,_)[0][1]:l(x.id,e)(n.getBaseValue(x))},h=kl();h=o?h.x(d).y(u):h.x(u).y(d),a||(h=h.defined(function(x){return n.getBaseValue(x)!==null}));var g=e?r.subX:r.x;return function(x){var _=l(x.id,e),T=a?n.filterRemoveNull(x.values):x.values,A=0,$=0,S;if(n.isLineType(x)){var M=i.data_regions[x.id];M?S=n.lineWithRegions(T,r.zoom||g,_,M):(n.isStepType(x)&&(T=n.convertValuesToStep(T)),S=h.curve(n.getCurve(x))(T))}else T[0]&&(A=g(T[0].x),$=_(T[0].value)),S=o?"M ".concat($," ").concat(A):"M ".concat(A," ").concat($);return S||"M 0 0"}},lineWithRegions:function(t,e,n,i){var r=this,a=r.config,o=a.axis_rotated,s=r.axis.isTimeSeries(),l=[],u="2 2",d,h,g,x;if(Ft(i))for(var _=function(K,ft){return ee(K)?ft:s?Fe.call(r,K):K},T=0,A=void 0;A=i[T];T++){var $=_(A.start,t[0].x),S=_(A.end,t[t.length-1].x),M=A.style||{dasharray:u};l[T]={start:$,end:S,style:M}}for(var k=o?function(K){return n(K.value)}:function(K){return e(K.x)},P=o?function(K){return e(K.x)}:function(K){return n(K.value)},D=function(K){return"M".concat(K[0][0],",").concat(K[0][1],"L").concat(K[1][0],",").concat(K[1][1])},p=s?function(K,ft,rt,Lt){var Ht=K.x.getTime(),ie=ft.x-K.x,le=new Date(Ht+ie*rt),Tt=new Date(Ht+ie*(rt+Lt)),Ut=o?[[n(h(rt)),e(le)],[n(h(rt+g)),e(Tt)]]:[[e(le),n(h(rt))],[e(Tt),n(h(rt+g))]];return D(Ut)}:function(K,ft,rt,Lt){var Ht=o?[[n(h(rt),!0),e(d(rt))],[n(h(rt+Lt),!0),e(d(rt+Lt))]]:[[e(d(rt),!0),n(h(rt))],[e(d(rt+Lt),!0),n(h(rt+Lt))]];return D(Ht)},j={x:r.axis.getAxisType("x"),y:r.axis.getAxisType("y")},U="",T=0,G=void 0;G=t[T];T++){var X=t[T-1],Q=X&&$t(X.value),M=r.isWithinRegions(G.x,l);if($t(G.value)){if(ee(l)||!M||!Q)U+="".concat(T&&Q?"L":"M").concat(k(G),",").concat(P(G));else if(Q){try{M=M.dasharray.split(" ")}catch{M=u.split(" ")}d=Nn(j.x,X.x,G.x),h=Nn(j.y,X.value,G.value);var z=e(G.x)-e(X.x),q=n(G.value)-n(X.value),Mt=Math.sqrt(Math.pow(z,2)+Math.pow(q,2));g=M[0]/Mt,x=g*M[1];for(var it=g;it<=1;it+=x)U+=p(X,G,it,g),it+x>=1&&(U+=p(X,G,1,0))}}}return U},isWithinRegions:function(t,e){for(var n=0,i=void 0;i=e[n];n++)if(i.start<t&&t<=i.end)return i.style;return!1},isWithinStep:function(t,e){return Math.abs(e-cn(this.state.event,t)[1])<30},shouldDrawPointsForLine:function(t){var e=this.config.line_point;return e===!0||Dt(e)&&e.indexOf(t.id)!==-1}},Wn=function(){return Fn()},ru={hasValidPointType:function(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasValidPointDrawMethods:function(t){var e=t||this.config.point_type;return Ke(e)&&pt(e.create)&&pt(e.update)},initialOpacityForCircle:function(t){var e=this,n=e.config,i=e.state.withoutFadeIn,r=n.point_opacity;return ee(r)&&(r=this.getBaseValue(t)!==null&&i[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle:function(t){var e,n=this.config,i=n.point_opacity;return ee(i)&&(i=n.point_show&&!(!((e=this.isPointFocusOnly)===null||e===void 0)&&e.call(this))?null:"0",i=$t(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":i:"0"),i},initCircle:function(){var t=this,e=t.$el.main;t.point=t.generatePoint(),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(".".concat(he.chartCircles)).empty()&&e.select(".".concat(Et.chart)).append("g").attr("class",he.chartCircles)},updateTargetForCircle:function(t,e){var n=this,i=this,r=i.config,a=i.data,o=i.$el,s=r.interaction_enabled&&r.data_selection_enabled,l=s&&r.data_selection_isselectable,u=i.getClass("circles",!0);if(r.point_show){!o.circle&&i.initCircle();var d=t,h=e;if(!d){d=a.targets.filter(function(x){return n.isScatterType(x)||n.isBubbleType(x)});var g=o.main.select(".".concat(he.chartCircles)).style("pointer-events","none").selectAll(".".concat(he.circles)).data(d);g.exit().remove(),h=g.enter()}s&&h.append("g").attr("class",function(x){return i.generateClass(Qt.selectedCircles,x.id)}),h.append("g").attr("class",u).call(function(x){i.setCssRule(!0,".".concat(he.circles),["cursor:pointer"],l)(x),i.setCssRule(!0," .".concat(he.circle),["fill","stroke"],i.color)(x)}).style("opacity",function(){var x=lt(this.parentNode);return x.attr("class").indexOf(he.chartCircles)>-1?"0":null}),s&&d.forEach(function(x){o.main.selectAll(".".concat(Qt.selectedCircles).concat(i.getTargetSelectorSuffix(x.id))).selectAll("".concat(Qt.selectedCircle)).each(function(_){_.value=x.values[_.index].value})})}},updateCircle:function(t){t===void 0&&(t=!1);var e=this,n=e.config,i=e.state,r=e.$el,a=e.isPointFocusOnly(),o=t?r.subchart:r;if(n.point_show&&!i.toggling){n.point_radialGradient&&e.updateLinearGradient();var s=o.main.selectAll(".".concat(he.circles)).selectAll(".".concat(he.circle)).data(function(l){return e.isLineType(l)&&e.shouldDrawPointsForLine(l)||e.isBubbleType(l)||e.isRadarType(l)||e.isScatterType(l)?a?[l.values[0]]:l.values:[]});s.exit().remove(),s.enter().filter(Boolean).append(e.point("create",this,e.pointR.bind(e),e.updateCircleColor.bind(e))),o.circle=o.main.selectAll(".".concat(he.circles," .").concat(he.circle)).style("stroke",e.getStylePropValue(e.color)).style("opacity",e.initialOpacityForCircle.bind(e))}},updateCircleColor:function(t){var e=this,n=e.getStylePropValue(e.color);return e.config.point_radialGradient?e.getGradienColortUrl(t.id):n?n(t):null},redrawCircle:function(t,e,n,i,r){r===void 0&&(r=!1);var a=this,o=a.state.rendered,s=a.$el,l=a.$T,u=r?s.subchart:s,d=u.main.selectAll(".".concat(Qt.selectedCircle));if(!a.config.point_show)return[];var h=a.point("update",a,t,e,a.updateCircleColor.bind(a),n,i,d),g=a.isCirclePoint()?"c":"",x=Fn(),_=a.opacityForCircle.bind(a),T=[];return u.circle.each(function(A){var $=h.bind(this)(A);$=l($,n||!o,x).style("opacity",_),T.push($)}),[T,l(d,n).attr("".concat(g,"x"),t).attr("".concat(g,"y"),e)]},showCircleFocus:function(t){var e=this,n=e.state,i=n.hasRadar,r=n.resizing,a=n.toggling,o=n.transiting,s=e.$el,l=s.circle;if(o===!1&&l&&e.isPointFocusOnly()){var u=(i?e.radarCircleX:e.circleX).bind(e),d=(i?e.radarCircleY:e.circleY).bind(e),h=a||ee(t),g=e.point("update",e,u,d,e.getStylePropValue(e.color),r?!1:h);t&&(l=l.filter(function(x){var _,T=(_=t.filter)===null||_===void 0?void 0:_.call(t,function(A){return A.id===x.id});return T.length?lt(this).datum(T[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(x){var _=x.id,T=x.index,A=x.value,$="hidden";$t(A)&&(g.bind(this)(x),e.expandCircles(T,_),$=""),this.style.visibility=$})}},hideCircleFocus:function(){var t=this,e=t.$el.circle;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){t===void 0&&(t=!1);var e=this,n=e.generateGetLinePoints(e.getShapeIndices(e.isLineType),t);return function(i,r){var a=i.id;return e.isGrouped(a)?n(i,r)[0][1]:e.getYScaleById(a,t)(e.getBaseValue(i))}},expandCircles:function(t,e,n){var i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles();var a=i.getShapeByIndex("circle",t,e).classed(Et.EXPANDED,!0),o=r(a)/i.config.point_r,s=1-o;i.isCirclePoint()?a.attr("r",r):a.each(function(){var l=lt(this);if(this.tagName==="circle")l.attr("r",r);else{var u=this.getBBox(),d=u.width,h=u.height,g=s*(+l.attr("x")+d/2),x=s*(+l.attr("y")+h/2);l.attr("transform","translate(".concat(g," ").concat(x,") scale(").concat(o,")"))}})},unexpandCircles:function(t){var e=this,n=e.pointR.bind(e),i=e.getShapeByIndex("circle",t).filter(function(){return lt(this).classed(Et.EXPANDED)}).classed(Et.EXPANDED,!1);if(i.attr("r",n),!e.isCirclePoint()){var r=n(i)/e.config.point_r;i.attr("transform",r!==1?"scale(".concat(r,")"):null)}},pointR:function(t){var e=this,n=e.config,i=n.point_r,r=i;return e.isBubbleType(t)?r=e.getBubbleR(t):pt(i)&&(r=i.bind(e.api)(t)),t.r=r,r},pointExpandedR:function(t){var e=this,n=e.config,i=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*i:e.pointR(t)},pointSelectR:function(t){var e=this,n=e.config.point_select_r;return pt(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly:function(){var t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},isWithinCircle:function(t,e){var n=this,i=n.config,r=n.state,a=cn(r.event,t),o=lt(t),s=this.isCirclePoint(t)?"c":"",l=i.point_sensitivity==="radius"?t.getAttribute("r"):i.point_sensitivity,u=+o.attr("".concat(s,"x")),d=+o.attr("".concat(s,"y"));if(!(u||d)&&t.nodeType===1){var h=gr(t),g=h.x,x=h.y;u=g,d=x}return Math.sqrt(Math.pow(u-a[0],2)+Math.pow(d-a[1],2))<(e||l)},getPointSensitivity:function(t){var e=this,n=e.config.point_sensitivity;return pt(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r),n},insertPointInfoDefs:function(t,e){var n,i=this,r=function(u,d){for(var h=u.attributes,g=0,x;x=h[g];g++)x=x.name,d.setAttribute(x,u.getAttribute(x))},a=new DOMParser().parseFromString(t,"image/svg+xml"),o=a.documentElement,s=zt.createElementNS(ti.svg,o.nodeName.toLowerCase());if(s.id=e,s.style.fill="inherit",s.style.stroke="inherit",r(o,s),!((n=o.childNodes)===null||n===void 0)&&n.length){var l=lt(s);"innerHTML"in s?l.html(o.innerHTML):oi(o.childNodes).forEach(function(u){r(u,l.append(u.tagName).node())})}i.$el.defs.node().appendChild(s)},pointFromDefs:function(t){return this.$el.defs.select("#".concat(t))},updatePointClass:function(t){var e=this,n=e.$el.circle,i=!1;return(Bt(t)||n)&&(i=t===!0?n.each(function(r){var a=e.getClass("circle",!0)(r);this.getAttribute("class").indexOf(Et.EXPANDED)>-1&&(a+=" ".concat(Et.EXPANDED)),this.setAttribute("class",a)}):e.getClass("circle",!0)(t)),i},generateGetLinePoints:function(t,e){var n=this,i=n.config,r=n.getShapeX(0,t,e),a=n.getShapeY(e),o=n.getShapeOffset(n.isLineType,t,e),s=n.getYScaleById.bind(n);return function(l,u){var d=s.call(n,l.id,e)(n.getShapeYMin(l.id)),h=o(l,u)||d,g=r(l),x=a(l);i.axis_rotated&&(l.value>0&&x<d||l.value<0&&d<x)&&(x=d);var _=[g,x-(d-h)];return[_,_,_,_]}},generatePoint:function(){var t=this,e=t.config,n=t.state.datetimeId,i=[],r=Wt(e.point_pattern)?e.point_pattern:[e.point_type];return function(a,o){for(var s=[],l=2;l<arguments.length;l++)s[l-2]=arguments[l];return function(u){var d,h=t.getTargetSelectorSuffix(u.id||((d=u.data)===null||d===void 0?void 0:d.id)||u),g=lt(this);i.indexOf(h)<0&&i.push(h);var x=r[i.indexOf(h)%r.length];if(t.hasValidPointType(x))x=t[x];else if(!t.hasValidPointDrawMethods(x)){var _="".concat(n,"-point").concat(h),T=t.pointFromDefs(_);if(T.size()<1&&t.insertPointInfoDefs(x,_),a==="create")return t.custom.create.bind(o).apply(void 0,qt([g,_],s,!1));if(a==="update")return t.custom.update.bind(o).apply(void 0,qt([g],s,!1))}return x[a].bind(o).apply(void 0,qt([g],s,!1))}}},custom:{create:function(t,e,n){return t.append("use").attr("xlink:href","#".concat(e)).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update:function(t,e,n,i,r,a,o){var s=this,l=t.node().getBBox(),u=l.width,d=l.height,h=function(_){return $t(_.value)?e(_)-u/2:0},g=function(_){return $t(_.value)?n(_)-d/2:0},x=t;return r&&(a&&x.attr("x",h),x=s.$T(x,r,Wn()),o&&s.$T(o,r,Wn())),x.attr("x",h).attr("y",g).style("fill",i)}},circle:{create:function(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update:function(t,e,n,i,r,a,o){var s=this,l=t;return s.hasType("bubble")&&l.attr("r",s.pointR.bind(s)),r&&(a&&l.attr("cx",e),l.attr("cx")&&(l=s.$T(l,r,Wn())),o&&s.$T(l,r,Wn())),l.attr("cx",e).attr("cy",n).style("fill",i)}},rectangle:{create:function(t,e,n){var i=function(r){return e(r)*2};return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",i).attr("height",i).style("fill",n).node()},update:function(t,e,n,i,r,a,o){var s=this,l=s.config.point_r,u=function(g){return e(g)-l},d=function(g){return n(g)-l},h=t;return r&&(a&&h.attr("x",u),h=s.$T(h,r,Wn()),o&&s.$T(o,r,Wn())),h.attr("x",u).attr("y",d).style("fill",i)}}},au={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},jy={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},Gy={bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0},Wy={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0},qy={scatter_zerobased:!1},Zy={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0},Ky={pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};function Oo(t,e){Me(Gr.prototype,Xy.concat(t)),Me(No.prototype,By),jr.setOptions(zy.concat(e||[]))}function ou(t,e){Oo([ru,Vy].concat(t||[])),jr.setOptions([au,Wy].concat(e||[]))}function Qy(t,e){Me(Gr.prototype,[Hy].concat(t||[])),jr.setOptions(e)}var su=function(){return ou(Yy,[jy]),(su=function(){return _t.AREA})()},cu=function(){return ou(),(cu=function(){return _t.LINE})()},lu=function(){return Qy(void 0,[Zy,Ky]),(lu=function(){return _t.PIE})()},uu=function(){return Oo([Uy],Gy),(uu=function(){return _t.BAR})()},fu=function(){return Oo([ru],[au,qy]),(fu=function(){return _t.SCATTER})()},Jy=function(t){var e,n=this.internal,i=n.axis,r=n.brush,a=n.config,o=n.scale,s=o.x,l=o.subX,u=n.state,d;if(a.subchart_show)if(d=t,Array.isArray(d)){i.isTimeSeries()&&(d=d.map(function(g){return Fe.bind(n)(g)}));var h=n.withinRange(d,n.getZoomDomain("subX",!0),n.getZoomDomain("subX"));h&&(u.domain=d,r.move(r.getSelection(),d.map(l)))}else d=(e=u.domain)!==null&&e!==void 0?e:s.orgDomain();return d};Me(Jy,{show:function(){var t,e,n=this.internal,i=n.$el.subchart,r=n.config,a=r.subchart_show;if(!a){n.unbindZoomEvent(),r.subchart_show=!a,!i.main&&n.initSubchart();var o=i.main.selectAll(".".concat(Et.target));n.data.targets.length!==o.size()&&(n.updateSizes(),n.updateTargetsForSubchart(n.data.targets),o=(t=i.main)===null||t===void 0?void 0:t.selectAll(".".concat(Et.target))),o==null||o.style("opacity",null),(e=i.main)===null||e===void 0||e.style("display",null),this.resize()}},hide:function(){var t=this.internal,e=t.$el.subchart.main,n=t.config;n.subchart_show&&(e==null?void 0:e.style("display"))!=="none"&&(n.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){var t=this.internal,e=t.config;this.subchart[e.subchart_show?"hide":"show"]()},reset:function(){var t=this.internal,e=t.brush;e.clear(e.getSelection())}});var t_=function(t){var e,n,i=this.internal,r=i.$el,a=i.axis,o=i.config,s=i.org,l=i.scale,u=i.state,d=o.axis_rotated,h=a.isCategorized(),g;if(o.zoom_enabled)if(g=t,Array.isArray(g)){a.isTimeSeries()&&(g=g.map(function($){return Fe.bind(i)($)}));var x=i.withinRange(g,i.getZoomDomain("zoom",!0),i.getZoomDomain("zoom"));if(x){if(u.domain=g,h&&(g=g.map(function($,S){return Number($)+(S===0?0:1)})),i.api.tooltip.hide(),o.subchart_show){var _=l.zoom||l.x;i.brush.getSelection().call(i.brush.move,g.map(_))}else{var _=h?l.x.orgScale():s.xScale||l.x,T=[-_(g[0]),0],A=(e=zx.scale(_.range()[1]/(_(g[1])-_(g[0])))).translate.apply(e,d?T.reverse():T);r.eventRect.call(i.zoom.transform,A)}i.setZoomResetButton()}}else g=i.zoom.getDomain();return(n=u.domain)!==null&&n!==void 0?n:g};Me(t_,{enable:function(t){var e=this.internal,n=e.config;/^(drag|wheel)$/.test(t)&&(n.zoom_type=t),n.zoom_enabled=!!t,e.zoom?t===!1&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){var e=this.internal,n=e.config,i=e.org.xDomain;return(t===0||t)&&(n.zoom_x_max=yn("max",[i[1],t])),n.zoom_x_max},min:function(t){var e=this.internal,n=e.config,i=e.org.xDomain;return(t===0||t)&&(n.zoom_x_min=yn("min",[i[0],t])),n.zoom_x_min},range:function(t){var e=this.zoom;if(Bt(t)){var n=t.min,i=t.max;Ft(n)&&e.min(n),Ft(i)&&e.max(i)}return{min:e.min(),max:e.max()}}});var e_={drag:function(t){var e=this,n=e.config,i=e.state,r=e.$el.main,a=n.data_selection_grouped,o=n.interaction_enabled&&n.data_selection_isselectable;if(!(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)){var s=i.dragStart||[0,0],l=s[0],u=s[1],d=t[0],h=t[1],g=Math.min(l,d),x=Math.max(l,d),_=a?i.margin.top:Math.min(u,h),T=a?i.height:Math.max(u,h);r.select(".".concat(En.dragarea)).attr("x",g).attr("y",_).attr("width",x-g).attr("height",T-_),r.selectAll(".".concat(ve.shapes)).selectAll(".".concat(ve.shape)).filter(function(A){return o==null?void 0:o.bind(e.api)(A)}).each(function(A,$){var S=lt(this),M=S.classed(Qt.SELECTED),k=S.classed(En.INCLUDED),P=!1,D;if(S.classed(he.circle)){var p=+S.attr("cx")*1,j=+S.attr("cy")*1;D=e.togglePoint,P=g<p&&p<x&&_<j&&j<T}else if(S.classed(Ne.bar)){var U=Gx(this),p=U.x,j=U.y,G=U.width,X=U.height;D=e.togglePath,P=!(x<p||p+G<g)&&!(T<j||j+X<_)}else return;P^k&&(S.classed(En.INCLUDED,!k),S.classed(Qt.SELECTED,!M),D.call(e,!M,S,A,$))})}},dragstart:function(t){var e=this,n=e.config,i=e.state,r=e.$el.main;e.hasArcType()||!n.data_selection_enabled||(i.dragStart=t,r.select(".".concat(Et.chart)).append("rect").attr("class",En.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend:function(){var t=this,e=t.config,n=t.$el.main,i=t.$T;t.hasArcType()||!e.data_selection_enabled||(i(n.select(".".concat(En.dragarea))).style("opacity","0").remove(),n.selectAll(".".concat(ve.shape)).classed(En.INCLUDED,!1),t.setDragStatus(!1))}};mt(mt({},e_),{selectPoint:function(t,e,n){var i=this,r=i.config,a=i.$el.main,o=i.$T,s=r.axis_rotated,l=(s?i.circleY:i.circleX).bind(i),u=(s?i.circleX:i.circleY).bind(i),d=i.pointSelectR.bind(i);Gt(r.data_onselected,i.api,e,t.node()),o(a.select(".".concat(Qt.selectedCircles).concat(i.getTargetSelectorSuffix(e.id))).selectAll(".".concat(Qt.selectedCircle,"-").concat(n)).data([e]).enter().append("circle").attr("class",function(){return i.generateClass(Qt.selectedCircle,n)}).attr("cx",l).attr("cy",u).attr("stroke",i.color).attr("r",function(h){return i.pointSelectR(h)*1.4})).attr("r",d)},unselectPoint:function(t,e,n){var i=this,r=i.config,a=i.$el.main,o=i.$T;Gt(r.data_onunselected,i.api,e,t==null?void 0:t.node()),o(a.select(".".concat(Qt.selectedCircles).concat(i.getTargetSelectorSuffix(e.id))).selectAll(".".concat(Qt.selectedCircle,"-").concat(n))).attr("r",0).remove()},togglePoint:function(t,e,n,i){var r="".concat(t?"":"un","selectPoint");this[r](e,n,i)},selectPath:function(t,e){var n=this,i=n.config;Gt(i.data_onselected,n.api,e,t.node()),i.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath:function(t,e){var n=this,i=n.config;Gt(i.data_onunselected,n.api,e,t.node()),i.interaction_brighten&&t.style("filter",null)},togglePath:function(t,e,n,i){this["".concat(t?"":"un","selectPath")](e,n,i)},getToggle:function(t,e){var n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?function(){}:n.togglePoint},toggleShape:function(t,e,n){var i,r=this,a=r.config,o=r.$el.main;if(a.data_selection_enabled&&a.data_selection_isselectable.bind(r.api)(e)){var s=lt(t),l=s.classed(Qt.SELECTED),u=r.getToggle(t,e).bind(r),d;if(!a.data_selection_multiple){var h=(i=r.isPointFocusOnly)===null||i===void 0?void 0:i.call(r),g=".".concat(h?Qt.selectedCircles:ve.shapes);a.data_selection_grouped&&(g+=r.getTargetSelectorSuffix(e.id)),o.selectAll(g).selectAll(h?".".concat(Qt.selectedCircle):".".concat(ve.shape,".").concat(Qt.SELECTED)).classed(Qt.SELECTED,!1).each(function(x){var _=lt(this);d=_,u(!1,_,x,x.index)})}(!d||d.node()!==s.node())&&(s.classed(Qt.SELECTED,!l),u(!l,s,e,n))}}});var Ia={},n_={version:"3.10.3",generate:function(t){var e=si({},Ia,t),n=new No(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return Bt(t)&&(Ia=t),Ia},instance:[],plugin:{}};const i_=t=>{r_(t.MsgQueue),kc(We(".block")),kc(We("table td"))};function r_(t){t.forEach(e=>a_(e==null?void 0:e.data))}const Na=(t,e=n=>{})=>({axis:(i=>(e(i),i))({x:{tick:{format(i){return t[0].xlabels[i]||i}}}})});function a_(t){if(!t)return;const{chartID:e,chartType:n,chartData:i}=t,r={bindto:`#${e}`};switch(n){case"lineChart":Object.assign(r,{data:{columns:i.map(a=>[a.key,...a.values.map(({y:o})=>o)]),type:cu()},...Na(i),interaction:{enabled:!0}});break;case"barChart":Object.assign(r,{data:{columns:i.map(a=>[a.key,...a.values.map(({y:o})=>o)]),type:uu()},...Na(i,a=>a.x.tick.multiline=!0)});break;case"pieChart":case"pie3DChart":Object.assign(r,{data:{columns:Object.values(i[0].xlabels).map((a,o)=>[a,i[0].values[o].y]),type:lu()}});break;case"areaChart":Object.assign(r,{data:{columns:i.map(a=>[a.key,...a.values.map(({y:o})=>o)]),type:su()},interaction:{enabled:!0},...Na(i)});break;case"scatterChart":Object.assign(r,{data:{xs:{y:"x"},columns:i.map((a,o)=>[o?"y":"x",...a]),type:fu()},axis:{x:{label:"X",showDist:!0,tick:{format:Oi(".02f")}},y:{label:"Y",showDist:!0,tick:{format:Oi(".02f")}}}});break}r.data&&n_.generate(r)}function kc(t){const e=t;for(let n=0;n<e.length;n++){const i=We(e[n]).find(".numeric-bullet-style");if(i.length>0){let r="",a="",o=0;const s=[];let l=0;const u=[];for(let d=0;d<i.length;d++){const h=We(i[d]).data("bulltname"),g=We(i[d]).data("bulltlvl");o==0?(r=h,a=g,s[l]=o,u[l]=h,o++):h==r&&g==a?(r=h,a=g,o++,s[l]=o,u[l]=h):h!=r&&g==a||h!=r&&Number(g)>Number(a)?(r=h,a=g,l++,s[l]=o,u[l]=h,o=1):h!=r&&Number(g)<Number(a)&&(r=h,a=g,l--,o=s[l]+1);const x=o_(u[l],o);We(i[d]).html(x)}}}}function o_(t,e){let n="";switch(t){case"arabicPeriod":n=e+". ";break;case"arabicParenR":n=e+") ";break;case"alphaLcParenR":n=or(e,"lowerCase")+") ";break;case"alphaLcPeriod":n=or(e,"lowerCase")+". ";break;case"alphaUcParenR":n=or(e,"upperCase")+") ";break;case"alphaUcPeriod":n=or(e,"upperCase")+". ";break;case"romanUcPeriod":n=Ec(e)+". ";break;case"romanLcParenR":n=Ec(e)+") ";break;case"hebrew2Minus":n=s_.format(e)+"-";break;default:n=String(e)}return n}function Ec(t){if(!+t)return!1;const e=String(+t).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];let i="",r=3;for(;r--;)i=(n[+(e.pop()??"")+r*10]||"")+i;return Array(+e.join("")+1).join("M")+i}const s_=c_([[1e3,""],[400,"ת"],[300,"ש"],[200,"ר"],[100,"ק"],[90,"צ"],[80,"פ"],[70,"ע"],[60,"ס"],[50,"נ"],[40,"מ"],[30,"ל"],[20,"כ"],[10,"י"],[9,"ט"],[8,"ח"],[7,"ז"],[6,"ו"],[5,"ה"],[4,"ד"],[3,"ג"],[2,"ב"],[1,"א"],[/יה/,"ט״ו"],[/יו/,"ט״ז"],[/([א-ת])([א-ת])$/,"$1״$2"],[/^([א-ת])$/,"$1׳"]]);function c_(t){return t.slice().sort(function(e,n){return n[1].length-e[1].length}),{format:function(e){let n="";return We.each(t,function(){const i=this[0];if(parseInt(i)>0)for(;e>=i;e-=i)n+=this[1];else n=n.replace(i,this[1])}),n}}}function or(t,e){t=Number(t)-1;let n="";return e=="upperCase"?n=((t/26>=1?String.fromCharCode(t/26+64):"")+String.fromCharCode(t%26+65)).toUpperCase():e=="lowerCase"&&(n=((t/26>=1?String.fromCharCode(t/26+64):"")+String.fromCharCode(t%26+65)).toLowerCase()),n}const l_={create(){return vf("pptx.worker.js").defaults(()=>new Worker(new URL(""+new URL("pptx.worker-a9caaa79.js",import.meta.url).href,self.location),{type:"module"}))}},u_=uf({__name:"PptxRender",props:{data:{},options:{type:Function,default:yf}},setup(t){const e=t,n=ff(null);return(()=>{const i={isDone:!1,thumbElement:null,worker:null,timer:null},r={startWorker(){i.worker&&i.worker.terminate(),i.timer&&clearInterval(i.timer);const a=i.worker=l_.create();a.addEventListener("message",o=>{this.processMessage(o.data)},!1),a.addEventListener("error",o=>{console.error(o)},!1),a.postMessage({type:"processPPTX",data:e.data,IE11:"MSInputMethodContext"in window&&"documentMode"in document,options:e.options()}),i.timer=setInterval(this.stopWorker,500)},stopWorker(){var a;i.isDone&&((a=i.worker)==null||a.terminate(),console.log("worker terminated"),i.timer&&clearInterval(i.timer))},resize(){if(n.value){const a=We(n.value),o=Math.max(...Array.from(a.children("section")).map(l=>l.offsetWidth)),s=a[0].offsetWidth;a.css({transform:`scale(${s/o})`,"transform-origin":"top left"})}},processMessage(a){if(i.isDone||!n.value)return;const o=We(n.value),{thumbElement:s}=i;switch(a.type){case"slide":console.log("正在处理:",a.slide_num),o.append(a.data);break;case"pptx-thumb":s&&We(s).attr("src",`data:image/jpeg;base64,${a.data}`);break;case"slideSize":break;case"globalCSS":o.append(`<style>${a.data}</style>`);break;case"ExecutionTime":case"Done":console.log("pptx渲染完成耗时",a.data),i_(a.charts),i.isDone=!0;break;case"WARN":console.warn("PPTX processing warning: ",a.data);break;case"ERROR":i.isDone=!0,console.error("PPTX processing error: ",a.data);break;case"DEBUG":console.debug("Worker: ",a.data);break;case"INFO":default:console.info("Worker: ",a.data)}}};df(()=>{r.startWorker()})})(),(i,r)=>(hf(),gf("div",{class:"pptx-wrapper",ref_key:"wrapper",ref:n},null,512))}});const h_=pf(u_,[["__scopeId","data-v-1b0d57cb"]]);export{h_ as default};