@htmlbricks/hb-gauge 0.50.0-alpha.22 → 0.50.0-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.iife.js +1 -0
- package/main.iife.js.map +1 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -3,3 +3,4 @@ var _a=Object.defineProperty;var Dr=Lt=>{throw TypeError(Lt)};var ba=(Lt,zt,Pt)=
|
|
|
3
3
|
You are running Raphaël `+this.version};var I=function(p,l){if(l)for(var a in typeof p=="string"&&(p=I(p)),l)l[h](a)&&(a.substring(0,6)=="xlink:"?p.setAttributeNS(J,a.substring(6),M(l[a])):p.setAttribute(a,M(l[a])));else(p=u._g.doc.createElementNS("http://www.w3.org/2000/svg",p)).style&&(p.style.webkitTapHighlightColor="rgba(0,0,0,0)");return p},it=function(p,l){var a="linear",c=p.id+l,x=.5,C=.5,$=p.node,B=p.paper,E=$.style,z=u._g.doc.getElementById(c);if(!z){if(l=(l=M(l).replace(u._radial_gradient,function($t,bt,at){if(a="radial",bt&&at){x=F(bt);var Ft=2*((C=F(at))>.5)-1;G(x-.5,2)+G(C-.5,2)>.25&&(C=P.sqrt(.25-G(x-.5,2))*Ft+.5)&&C!=.5&&(C=C.toFixed(5)-1e-5*Ft)}return W})).split(/\s*\-\s*/),a=="linear"){var H=l.shift();if(H=-F(H),isNaN(H))return null;var nt=[0,0,P.cos(u.rad(H)),P.sin(u.rad(H))],pt=1/(K(et(nt[2]),et(nt[3]))||1);nt[2]*=pt,nt[3]*=pt,nt[2]<0&&(nt[0]=-nt[2],nt[2]=0),nt[3]<0&&(nt[1]=-nt[3],nt[3]=0)}var vt=u._parseDots(l);if(!vt)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),p.gradient&&c!=p.gradient.id&&(B.defs.removeChild(p.gradient),delete p.gradient),!p.gradient){z=I(a+"Gradient",{id:c}),p.gradient=z,I(z,a=="radial"?{fx:x,fy:C}:{x1:nt[0],y1:nt[1],x2:nt[2],y2:nt[3],gradientTransform:p.matrix.invert()}),B.defs.appendChild(z);for(var dt=0,kt=vt.length;dt<kt;dt++)z.appendChild(I("stop",{offset:vt[dt].offset?vt[dt].offset:dt?"100%":"0%","stop-color":vt[dt].color||"#fff","stop-opacity":isFinite(vt[dt].opacity)?vt[dt].opacity:1}))}}return I($,{fill:rt(c),opacity:1,"fill-opacity":1}),E.fill=W,E.opacity=1,E.fillOpacity=1,1},rt=function(p){if((l=document.documentMode)&&(l===9||l===10))return"url('#"+p+"')";var l,a=document.location;return"url('"+(a.protocol+"//"+a.host+a.pathname+a.search)+"#"+p+"')"},wt=function(p){var l=p.getBBox(1);I(p.pattern,{patternTransform:p.matrix.invert()+" translate("+l.x+","+l.y+")"})},st=function(p,l,a){if(p.type=="path"){for(var c,x,C,$,B,E=M(l).toLowerCase().split("-"),z=p.paper,H=a?"end":"start",nt=p.node,pt=p.attrs,vt=pt["stroke-width"],dt=E.length,kt="classic",$t=3,bt=3,at=5;dt--;)switch(E[dt]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":kt=E[dt];break;case"wide":bt=5;break;case"narrow":bt=2;break;case"long":$t=5;break;case"short":$t=2}if(kt=="open"?($t+=2,bt+=2,at+=2,C=1,$=a?4:1,B={fill:"none",stroke:pt.stroke}):($=C=$t/2,B={fill:pt.stroke,stroke:"none"}),p._.arrows?a?(p._.arrows.endPath&&ft[p._.arrows.endPath]--,p._.arrows.endMarker&&ft[p._.arrows.endMarker]--):(p._.arrows.startPath&&ft[p._.arrows.startPath]--,p._.arrows.startMarker&&ft[p._.arrows.startMarker]--):p._.arrows={},kt!="none"){var Ft="raphael-marker-"+kt,Bt="raphael-marker-"+H+kt+$t+bt+"-obj"+p.id;u._g.doc.getElementById(Ft)?ft[Ft]++:(z.defs.appendChild(I(I("path"),{"stroke-linecap":"round",d:lt[kt],id:Ft})),ft[Ft]=1);var Ot,At=u._g.doc.getElementById(Bt);At?(ft[Bt]++,Ot=At.getElementsByTagName("use")[0]):(At=I(I("marker"),{id:Bt,markerHeight:bt,markerWidth:$t,orient:"auto",refX:$,refY:bt/2}),Ot=I(I("use"),{"xlink:href":"#"+Ft,transform:(a?"rotate(180 "+$t/2+" "+bt/2+") ":W)+"scale("+$t/at+","+bt/at+")","stroke-width":(1/(($t/at+bt/at)/2)).toFixed(4)}),At.appendChild(Ot),z.defs.appendChild(At),ft[Bt]=1),I(Ot,B);var Jt=C*(kt!="diamond"&&kt!="oval");a?(c=p._.arrows.startdx*vt||0,x=u.getTotalLength(pt.path)-Jt*vt):(c=Jt*vt,x=u.getTotalLength(pt.path)-(p._.arrows.enddx*vt||0)),(B={})["marker-"+H]="url(#"+Bt+")",(x||c)&&(B.d=u.getSubpath(pt.path,c,x)),I(nt,B),p._.arrows[H+"Path"]=Ft,p._.arrows[H+"Marker"]=Bt,p._.arrows[H+"dx"]=Jt,p._.arrows[H+"Type"]=kt,p._.arrows[H+"String"]=l}else a?(c=p._.arrows.startdx*vt||0,x=u.getTotalLength(pt.path)-c):(c=0,x=u.getTotalLength(pt.path)-(p._.arrows.enddx*vt||0)),p._.arrows[H+"Path"]&&I(nt,{d:u.getSubpath(pt.path,c,x)}),delete p._.arrows[H+"Path"],delete p._.arrows[H+"Marker"],delete p._.arrows[H+"dx"],delete p._.arrows[H+"Type"],delete p._.arrows[H+"String"];for(B in ft)if(ft[h](B)&&!ft[B]){var Yt=u._g.doc.getElementById(B);Yt&&Yt.parentNode.removeChild(Yt)}}},U={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},Q=function(p,l,a){if(l=U[M(l).toLowerCase()]){for(var c=p.attrs["stroke-width"]||"1",x={round:c,square:c,butt:0}[p.attrs["stroke-linecap"]||a["stroke-linecap"]]||0,C=[],$=l.length;$--;)C[$]=l[$]*c+($%2?1:-1)*x;I(p.node,{"stroke-dasharray":C.join(",")})}else I(p.node,{"stroke-dasharray":"none"})},Z=function(p,l){var a=p.node,c=p.attrs,x=a.style.visibility;for(var C in a.style.visibility="hidden",l)if(l[h](C)){if(!u._availableAttrs[h](C))continue;var $=l[C];switch(c[C]=$,C){case"blur":p.blur($);break;case"title":var B=a.getElementsByTagName("title");if(B.length&&(B=B[0]))B.firstChild.nodeValue=$;else{B=I("title");var E=u._g.doc.createTextNode($);B.appendChild(E),a.appendChild(B)}break;case"href":case"target":var z=a.parentNode;if(z.tagName.toLowerCase()!="a"){var H=I("a");z.insertBefore(H,a),H.appendChild(a),z=H}C=="target"?z.setAttributeNS(J,"show",$=="blank"?"new":$):z.setAttributeNS(J,C,$);break;case"cursor":a.style.cursor=$;break;case"transform":p.transform($);break;case"arrow-start":st(p,$);break;case"arrow-end":st(p,$,1);break;case"clip-rect":var nt=M($).split(_t);if(nt.length==4){p.clip&&p.clip.parentNode.parentNode.removeChild(p.clip.parentNode);var pt=I("clipPath"),vt=I("rect");pt.id=u.createUUID(),I(vt,{x:nt[0],y:nt[1],width:nt[2],height:nt[3]}),pt.appendChild(vt),p.paper.defs.appendChild(pt),I(a,{"clip-path":"url(#"+pt.id+")"}),p.clip=vt}if(!$){var dt=a.getAttribute("clip-path");if(dt){var kt=u._g.doc.getElementById(dt.replace(/(^url\(#|\)$)/g,W));kt&&kt.parentNode.removeChild(kt),I(a,{"clip-path":W}),delete p.clip}}break;case"path":p.type=="path"&&(I(a,{d:$?c.path=u._pathToAbsolute($):"M0,0"}),p._.dirty=1,p._.arrows&&("startString"in p._.arrows&&st(p,p._.arrows.startString),"endString"in p._.arrows&&st(p,p._.arrows.endString,1)));break;case"width":if(a.setAttribute(C,$),p._.dirty=1,!c.fx)break;C="x",$=c.x;case"x":c.fx&&($=-c.x-(c.width||0));case"rx":if(C=="rx"&&p.type=="rect")break;case"cx":a.setAttribute(C,$),p.pattern&&wt(p),p._.dirty=1;break;case"height":if(a.setAttribute(C,$),p._.dirty=1,!c.fy)break;C="y",$=c.y;case"y":c.fy&&($=-c.y-(c.height||0));case"ry":if(C=="ry"&&p.type=="rect")break;case"cy":a.setAttribute(C,$),p.pattern&&wt(p),p._.dirty=1;break;case"r":p.type=="rect"?I(a,{rx:$,ry:$}):a.setAttribute(C,$),p._.dirty=1;break;case"src":p.type=="image"&&a.setAttributeNS(J,"href",$);break;case"stroke-width":p._.sx==1&&p._.sy==1||($/=K(et(p._.sx),et(p._.sy))||1),a.setAttribute(C,$),c["stroke-dasharray"]&&Q(p,c["stroke-dasharray"],l),p._.arrows&&("startString"in p._.arrows&&st(p,p._.arrows.startString),"endString"in p._.arrows&&st(p,p._.arrows.endString,1));break;case"stroke-dasharray":Q(p,$,l);break;case"fill":var $t=M($).match(u._ISURL);if($t){pt=I("pattern");var bt=I("image");pt.id=u.createUUID(),I(pt,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),I(bt,{x:0,y:0,"xlink:href":$t[1]}),pt.appendChild(bt),function(At){u._preload($t[1],function(){var Jt=this.offsetWidth,Yt=this.offsetHeight;I(At,{width:Jt,height:Yt}),I(bt,{width:Jt,height:Yt})})}(pt),p.paper.defs.appendChild(pt),I(a,{fill:"url(#"+pt.id+")"}),p.pattern=pt,p.pattern&&wt(p);break}var at=u.getRGB($);if(at.error){if((p.type=="circle"||p.type=="ellipse"||M($).charAt()!="r")&&it(p,$)){if("opacity"in c||"fill-opacity"in c){var Ft=u._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,W));if(Ft){var Bt=Ft.getElementsByTagName("stop");I(Bt[Bt.length-1],{"stop-opacity":("opacity"in c?c.opacity:1)*("fill-opacity"in c?c["fill-opacity"]:1)})}}c.gradient=$,c.fill="none";break}}else delete l.gradient,delete c.gradient,!u.is(c.opacity,"undefined")&&u.is(l.opacity,"undefined")&&I(a,{opacity:c.opacity}),!u.is(c["fill-opacity"],"undefined")&&u.is(l["fill-opacity"],"undefined")&&I(a,{"fill-opacity":c["fill-opacity"]});at[h]("opacity")&&I(a,{"fill-opacity":at.opacity>1?at.opacity/100:at.opacity});case"stroke":at=u.getRGB($),a.setAttribute(C,at.hex),C=="stroke"&&at[h]("opacity")&&I(a,{"stroke-opacity":at.opacity>1?at.opacity/100:at.opacity}),C=="stroke"&&p._.arrows&&("startString"in p._.arrows&&st(p,p._.arrows.startString),"endString"in p._.arrows&&st(p,p._.arrows.endString,1));break;case"gradient":(p.type=="circle"||p.type=="ellipse"||M($).charAt()!="r")&&it(p,$);break;case"opacity":c.gradient&&!c[h]("stroke-opacity")&&I(a,{"stroke-opacity":$>1?$/100:$});case"fill-opacity":if(c.gradient){(Ft=u._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,W)))&&(Bt=Ft.getElementsByTagName("stop"),I(Bt[Bt.length-1],{"stop-opacity":$}));break}default:C=="font-size"&&($=X($,10)+"px");var Ot=C.replace(/(\-.)/g,function(At){return At.substring(1).toUpperCase()});a.style[Ot]=$,p._.dirty=1,a.setAttribute(C,$)}}ot(p,l),a.style.visibility=x},ot=function(p,l){if(p.type=="text"&&(l[h]("text")||l[h]("font")||l[h]("font-size")||l[h]("x")||l[h]("y"))){var a=p.attrs,c=p.node,x=c.firstChild?X(u._g.doc.defaultView.getComputedStyle(c.firstChild,W).getPropertyValue("font-size"),10):10;if(l[h]("text")){for(a.text=l.text;c.firstChild;)c.removeChild(c.firstChild);for(var C,$=M(l.text).split(`
|
|
4
4
|
`),B=[],E=0,z=$.length;E<z;E++)C=I("tspan"),E&&I(C,{dy:1.2*x,x:a.x}),C.appendChild(u._g.doc.createTextNode($[E])),c.appendChild(C),B[E]=C}else for(E=0,z=(B=c.getElementsByTagName("tspan")).length;E<z;E++)E?I(B[E],{dy:1.2*x,x:a.x}):I(B[0],{dy:0});I(c,{x:a.x,y:a.y}),p._.dirty=1;var H=p._getBBox(),nt=a.y-(H.y+H.height/2);nt&&u.is(nt,"finite")&&I(B[0],{dy:nt})}},yt=function(p){return p.parentNode&&p.parentNode.tagName.toLowerCase()==="a"?p.parentNode:p},Et=function(p,l){this[0]=this.node=p,p.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),p.raphaelid=this.id,this.matrix=u.matrix(),this.realPath=null,this.paper=l,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!l.bottom&&(l.bottom=this),this.prev=l.top,l.top&&(l.top.next=this),l.top=this,this.next=null},ct=u.el;Et.prototype=ct,ct.constructor=Et,u._engine.path=function(p,l){var a=I("path");l.canvas&&l.canvas.appendChild(a);var c=new Et(a,l);return c.type="path",Z(c,{fill:"none",stroke:"#000",path:p}),c},ct.rotate=function(p,l,a){if(this.removed)return this;if((p=M(p).split(_t)).length-1&&(l=F(p[1]),a=F(p[2])),p=F(p[0]),a==null&&(l=a),l==null||a==null){var c=this.getBBox(1);l=c.x+c.width/2,a=c.y+c.height/2}return this.transform(this._.transform.concat([["r",p,l,a]])),this},ct.scale=function(p,l,a,c){if(this.removed)return this;if((p=M(p).split(_t)).length-1&&(l=F(p[1]),a=F(p[2]),c=F(p[3])),p=F(p[0]),l==null&&(l=p),c==null&&(a=c),a==null||c==null)var x=this.getBBox(1);return a=a??x.x+x.width/2,c=c??x.y+x.height/2,this.transform(this._.transform.concat([["s",p,l,a,c]])),this},ct.translate=function(p,l){return this.removed?this:((p=M(p).split(_t)).length-1&&(l=F(p[1])),p=F(p[0])||0,l=+l||0,this.transform(this._.transform.concat([["t",p,l]])),this)},ct.transform=function(p){var l=this._;if(p==null)return l.transform;if(u._extractTransform(this,p),this.clip&&I(this.clip,{transform:this.matrix.invert()}),this.pattern&&wt(this),this.node&&I(this.node,{transform:this.matrix}),l.sx!=1||l.sy!=1){var a=this.attrs[h]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":a})}return this},ct.hide=function(){return this.removed||(this.node.style.display="none"),this},ct.show=function(){return this.removed||(this.node.style.display=""),this},ct.remove=function(){var p=yt(this.node);if(!this.removed&&p.parentNode){var l=this.paper;for(var a in l.__set__&&l.__set__.exclude(this),Mt.unbind("raphael.*.*."+this.id),this.gradient&&l.defs.removeChild(this.gradient),u._tear(this,l),p.parentNode.removeChild(p),this.removeData(),this)this[a]=typeof this[a]=="function"?u._removedFactory(a):null;this.removed=!0}},ct._getBBox=function(){if(this.node.style.display=="none"){this.show();var p=!0}var l,a=!1;this.paper.canvas.parentElement?l=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(l=this.paper.canvas.parentNode.style),l&&l.display=="none"&&(a=!0,l.display="");var c={};try{c=this.node.getBBox()}catch{c={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{c=c||{},a&&(l.display="none")}return p&&this.hide(),c},ct.attr=function(p,l){if(this.removed)return this;if(p==null){var a={};for(var c in this.attrs)this.attrs[h](c)&&(a[c]=this.attrs[c]);return a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient,a.transform=this._.transform,a}if(l==null&&u.is(p,"string")){if(p=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(p=="transform")return this._.transform;for(var x=p.split(_t),C={},$=0,B=x.length;$<B;$++)(p=x[$])in this.attrs?C[p]=this.attrs[p]:u.is(this.paper.customAttributes[p],"function")?C[p]=this.paper.customAttributes[p].def:C[p]=u._availableAttrs[p];return B-1?C:C[x[0]]}if(l==null&&u.is(p,"array")){for(C={},$=0,B=p.length;$<B;$++)C[p[$]]=this.attr(p[$]);return C}if(l!=null){var E={};E[p]=l}else p!=null&&u.is(p,"object")&&(E=p);for(var z in E)Mt("raphael.attr."+z+"."+this.id,this,E[z]);for(z in this.paper.customAttributes)if(this.paper.customAttributes[h](z)&&E[h](z)&&u.is(this.paper.customAttributes[z],"function")){var H=this.paper.customAttributes[z].apply(this,[].concat(E[z]));for(var nt in this.attrs[z]=E[z],H)H[h](nt)&&(E[nt]=H[nt])}return Z(this,E),this},ct.toFront=function(){if(this.removed)return this;var p=yt(this.node);p.parentNode.appendChild(p);var l=this.paper;return l.top!=this&&u._tofront(this,l),this},ct.toBack=function(){if(this.removed)return this;var p=yt(this.node),l=p.parentNode;return l.insertBefore(p,l.firstChild),u._toback(this,this.paper),this.paper,this},ct.insertAfter=function(p){if(this.removed||!p)return this;var l=yt(this.node),a=yt(p.node||p[p.length-1].node);return a.nextSibling?a.parentNode.insertBefore(l,a.nextSibling):a.parentNode.appendChild(l),u._insertafter(this,p,this.paper),this},ct.insertBefore=function(p){if(this.removed||!p)return this;var l=yt(this.node),a=yt(p.node||p[0].node);return a.parentNode.insertBefore(l,a),u._insertbefore(this,p,this.paper),this},ct.blur=function(p){var l=this;if(+p!=0){var a=I("filter"),c=I("feGaussianBlur");l.attrs.blur=p,a.id=u.createUUID(),I(c,{stdDeviation:+p||1.5}),a.appendChild(c),l.paper.defs.appendChild(a),l._blur=a,I(l.node,{filter:"url(#"+a.id+")"})}else l._blur&&(l._blur.parentNode.removeChild(l._blur),delete l._blur,delete l.attrs.blur),l.node.removeAttribute("filter");return l},u._engine.circle=function(p,l,a,c){var x=I("circle");p.canvas&&p.canvas.appendChild(x);var C=new Et(x,p);return C.attrs={cx:l,cy:a,r:c,fill:"none",stroke:"#000"},C.type="circle",I(x,C.attrs),C},u._engine.rect=function(p,l,a,c,x,C){var $=I("rect");p.canvas&&p.canvas.appendChild($);var B=new Et($,p);return B.attrs={x:l,y:a,width:c,height:x,rx:C||0,ry:C||0,fill:"none",stroke:"#000"},B.type="rect",I($,B.attrs),B},u._engine.ellipse=function(p,l,a,c,x){var C=I("ellipse");p.canvas&&p.canvas.appendChild(C);var $=new Et(C,p);return $.attrs={cx:l,cy:a,rx:c,ry:x,fill:"none",stroke:"#000"},$.type="ellipse",I(C,$.attrs),$},u._engine.image=function(p,l,a,c,x,C){var $=I("image");I($,{x:a,y:c,width:x,height:C,preserveAspectRatio:"none"}),$.setAttributeNS(J,"href",l),p.canvas&&p.canvas.appendChild($);var B=new Et($,p);return B.attrs={x:a,y:c,width:x,height:C,src:l},B.type="image",B},u._engine.text=function(p,l,a,c){var x=I("text");p.canvas&&p.canvas.appendChild(x);var C=new Et(x,p);return C.attrs={x:l,y:a,"text-anchor":"middle",text:c,"font-family":u._availableAttrs["font-family"],"font-size":u._availableAttrs["font-size"],stroke:"none",fill:"#000"},C.type="text",Z(C,C.attrs),C},u._engine.setSize=function(p,l){return this.width=p||this.width,this.height=l||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},u._engine.create=function(){var p=u._getContainer.apply(0,arguments),l=p&&p.container;if(!l)throw new Error("SVG container not found.");var a,c=p.x,x=p.y,C=p.width,$=p.height,B=I("svg"),E="overflow:hidden;";return c=c||0,x=x||0,I(B,{height:$=$||342,version:1.1,width:C=C||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),l==1?(B.style.cssText=E+"position:absolute;left:"+c+"px;top:"+x+"px",u._g.doc.body.appendChild(B),a=1):(B.style.cssText=E+"position:relative",l.firstChild?l.insertBefore(B,l.firstChild):l.appendChild(B)),(l=new u._Paper).width=C,l.height=$,l.canvas=B,l.clear(),l._left=l._top=0,a&&(l.renderfix=function(){}),l.renderfix(),l},u._engine.setViewBox=function(p,l,a,c,x){Mt("raphael.setViewBox",this,this._viewBox,[p,l,a,c,x]);var C,$,B=this.getSize(),E=K(a/B.width,c/B.height),z=this.top,H=x?"xMidYMid meet":"xMinYMin";for(p==null?(this._vbSize&&(E=1),delete this._vbSize,C="0 0 "+this.width+L+this.height):(this._vbSize=E,C=p+L+l+L+a+L+c),I(this.canvas,{viewBox:C,preserveAspectRatio:H});E&&z;)$="stroke-width"in z.attrs?z.attrs["stroke-width"]:1,z.attr({"stroke-width":$}),z._.dirty=1,z._.dirtyT=1,z=z.prev;return this._viewBox=[p,l,a,c,!!x],this},u.prototype.renderfix=function(){var p,l=this.canvas,a=l.style;try{p=l.getScreenCTM()||l.createSVGMatrix()}catch{p=l.createSVGMatrix()}var c=-p.e%1,x=-p.f%1;(c||x)&&(c&&(this._left=(this._left+c)%1,a.left=this._left+"px"),x&&(this._top=(this._top+x)%1,a.top=this._top+"px"))},u.prototype.clear=function(){u.eve("raphael.clear",this);for(var p=this.canvas;p.firstChild;)p.removeChild(p.firstChild);this.bottom=this.top=null,(this.desc=I("desc")).appendChild(u._g.doc.createTextNode("Created with Raphaël "+u.version)),p.appendChild(this.desc),p.appendChild(this.defs=I("defs"))},u.prototype.remove=function(){for(var p in Mt("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[p]=typeof this[p]=="function"?u._removedFactory(p):null};var xt=u.st;for(var Qt in ct)ct[h](Qt)&&!xt[h](Qt)&&(xt[Qt]=function(p){return function(){var l=arguments;return this.forEach(function(a){a[p].apply(a,l)})}}(Qt))}}).apply(w,_))===void 0||(f.exports=k)},function(f,w,y){var _,k;_=[y(0)],(k=(function(u){if(!u||u.vml){var h="hasOwnProperty",M=String,F=parseFloat,X=Math,P=X.round,K=X.max,et=X.min,G=X.abs,_t=/[, ]+/,Mt=u.eve,W=" ",L="",J={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},lt=/([clmz]),?([^clmz]*)/gi,ft=/ progid:\S+Blur\([^\)]+\)/g,I=/-?[^,\s-]+/g,it="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",rt=21600,wt={path:1,rect:1,image:1},st={circle:1,ellipse:1},U=function(l,a,c){var x=u.matrix();return x.rotate(-l,.5,.5),{dx:x.x(a,c),dy:x.y(a,c)}},Q=function(l,a,c,x,C,$){var B=l._,E=l.matrix,z=B.fillpos,H=l.node,nt=H.style,pt=1,vt="",dt=rt/a,kt=rt/c;if(nt.visibility="hidden",a&&c){if(H.coordsize=G(dt)+W+G(kt),nt.rotation=$*(a*c<0?-1:1),$){var $t=U($,x,C);x=$t.dx,C=$t.dy}if(a<0&&(vt+="x"),c<0&&(vt+=" y")&&(pt=-1),nt.flip=vt,H.coordorigin=x*-dt+W+C*-kt,z||B.fillsize){var bt=H.getElementsByTagName("fill");bt=bt&&bt[0],H.removeChild(bt),z&&($t=U($,E.x(z[0],z[1]),E.y(z[0],z[1])),bt.position=$t.dx*pt+W+$t.dy*pt),B.fillsize&&(bt.size=B.fillsize[0]*G(a)+W+B.fillsize[1]*G(c)),H.appendChild(bt)}nt.visibility="visible"}};u.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
|
|
5
5
|
You are running Raphaël `+this.version};var Z,ot=function(l,a,c){for(var x=M(a).toLowerCase().split("-"),C=c?"end":"start",$=x.length,B="classic",E="medium",z="medium";$--;)switch(x[$]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":B=x[$];break;case"wide":case"narrow":z=x[$];break;case"long":case"short":E=x[$]}var H=l.node.getElementsByTagName("stroke")[0];H[C+"arrow"]=B,H[C+"arrowlength"]=E,H[C+"arrowwidth"]=z},yt=function(l,a){l.attrs=l.attrs||{};var c=l.node,x=l.attrs,C=c.style,$=wt[l.type]&&(a.x!=x.x||a.y!=x.y||a.width!=x.width||a.height!=x.height||a.cx!=x.cx||a.cy!=x.cy||a.rx!=x.rx||a.ry!=x.ry||a.r!=x.r),B=st[l.type]&&(x.cx!=a.cx||x.cy!=a.cy||x.r!=a.r||x.rx!=a.rx||x.ry!=a.ry),E=l;for(var z in a)a[h](z)&&(x[z]=a[z]);if($&&(x.path=u._getPath[l.type](l),l._.dirty=1),a.href&&(c.href=a.href),a.title&&(c.title=a.title),a.target&&(c.target=a.target),a.cursor&&(C.cursor=a.cursor),"blur"in a&&l.blur(a.blur),(a.path&&l.type=="path"||$)&&(c.path=function(Vt){var Me=/[ahqstv]/gi,Ze=u._pathToAbsolute;if(M(Vt).match(Me)&&(Ze=u._path2curve),Me=/[clmz]/g,Ze==u._pathToAbsolute&&!M(Vt).match(Me)){var ne=M(Vt).replace(lt,function(br,Je,ti){var Fe=[],Vi=Je.toLowerCase()=="m",Be=J[Je];return ti.replace(I,function(Ii){Vi&&Fe.length==2&&(Be+=Fe+J[Je=="m"?"l":"L"],Fe=[]),Fe.push(P(Ii*rt))}),Be+Fe});return ne}var Ke,se,di=Ze(Vt);ne=[];for(var Qe=0,pi=di.length;Qe<pi;Qe++){Ke=di[Qe],(se=di[Qe][0].toLowerCase())=="z"&&(se="x");for(var Ee=1,Xt=Ke.length;Ee<Xt;Ee++)se+=P(Ke[Ee]*rt)+(Ee!=Xt-1?",":L);ne.push(se)}return ne.join(W)}(~M(x.path).toLowerCase().indexOf("r")?u._pathToAbsolute(x.path):x.path),l._.dirty=1,l.type=="image"&&(l._.fillpos=[x.x,x.y],l._.fillsize=[x.width,x.height],Q(l,1,1,0,0,0))),"transform"in a&&l.transform(a.transform),B){var H=+x.cx,nt=+x.cy,pt=+x.rx||+x.r||0,vt=+x.ry||+x.r||0;c.path=u.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",P((H-pt)*rt),P((nt-vt)*rt),P((H+pt)*rt),P((nt+vt)*rt),P(H*rt)),l._.dirty=1}if("clip-rect"in a){var dt=M(a["clip-rect"]).split(_t);if(dt.length==4){dt[2]=+dt[2]+ +dt[0],dt[3]=+dt[3]+ +dt[1];var kt=c.clipRect||u._g.doc.createElement("div"),$t=kt.style;$t.clip=u.format("rect({1}px {2}px {3}px {0}px)",dt),c.clipRect||($t.position="absolute",$t.top=0,$t.left=0,$t.width=l.paper.width+"px",$t.height=l.paper.height+"px",c.parentNode.insertBefore(kt,c),kt.appendChild(c),c.clipRect=kt)}a["clip-rect"]||c.clipRect&&(c.clipRect.style.clip="auto")}if(l.textpath){var bt=l.textpath.style;a.font&&(bt.font=a.font),a["font-family"]&&(bt.fontFamily='"'+a["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,L)+'"'),a["font-size"]&&(bt.fontSize=a["font-size"]),a["font-weight"]&&(bt.fontWeight=a["font-weight"]),a["font-style"]&&(bt.fontStyle=a["font-style"])}if("arrow-start"in a&&ot(E,a["arrow-start"]),"arrow-end"in a&&ot(E,a["arrow-end"],1),a.opacity!=null||a.fill!=null||a.src!=null||a.stroke!=null||a["stroke-width"]!=null||a["stroke-opacity"]!=null||a["fill-opacity"]!=null||a["stroke-dasharray"]!=null||a["stroke-miterlimit"]!=null||a["stroke-linejoin"]!=null||a["stroke-linecap"]!=null){var at=c.getElementsByTagName("fill");if(!(at=at&&at[0])&&(at=Z("fill")),l.type=="image"&&a.src&&(at.src=a.src),a.fill&&(at.on=!0),at.on!=null&&a.fill!="none"&&a.fill!==null||(at.on=!1),at.on&&a.fill){var Ft=M(a.fill).match(u._ISURL);if(Ft){at.parentNode==c&&c.removeChild(at),at.rotate=!0,at.src=Ft[1],at.type="tile";var Bt=l.getBBox(1);at.position=Bt.x+W+Bt.y,l._.fillpos=[Bt.x,Bt.y],u._preload(Ft[1],function(){l._.fillsize=[this.offsetWidth,this.offsetHeight]})}else at.color=u.getRGB(a.fill).hex,at.src=L,at.type="solid",u.getRGB(a.fill).error&&(E.type in{circle:1,ellipse:1}||M(a.fill).charAt()!="r")&&Et(E,a.fill,at)&&(x.fill="none",x.gradient=a.fill,at.rotate=!1)}if("fill-opacity"in a||"opacity"in a){var Ot=((+x["fill-opacity"]+1||2)-1)*((+x.opacity+1||2)-1)*((+u.getRGB(a.fill).o+1||2)-1);Ot=et(K(Ot,0),1),at.opacity=Ot,at.src&&(at.color="none")}c.appendChild(at);var At=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0],Jt=!1;!At&&(Jt=At=Z("stroke")),(a.stroke&&a.stroke!="none"||a["stroke-width"]||a["stroke-opacity"]!=null||a["stroke-dasharray"]||a["stroke-miterlimit"]||a["stroke-linejoin"]||a["stroke-linecap"])&&(At.on=!0),(a.stroke=="none"||a.stroke===null||At.on==null||a.stroke==0||a["stroke-width"]==0)&&(At.on=!1);var Yt=u.getRGB(a.stroke);At.on&&a.stroke&&(At.color=Yt.hex),Ot=((+x["stroke-opacity"]+1||2)-1)*((+x.opacity+1||2)-1)*((+Yt.o+1||2)-1);var Ce=.75*(F(a["stroke-width"])||1);if(Ot=et(K(Ot,0),1),a["stroke-width"]==null&&(Ce=x["stroke-width"]),a["stroke-width"]&&(At.weight=Ce),Ce&&Ce<1&&(Ot*=Ce)&&(At.weight=1),At.opacity=Ot,a["stroke-linejoin"]&&(At.joinstyle=a["stroke-linejoin"]||"miter"),At.miterlimit=a["stroke-miterlimit"]||8,a["stroke-linecap"]&&(At.endcap=a["stroke-linecap"]=="butt"?"flat":a["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in a){var fi={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};At.dashstyle=fi[h](a["stroke-dasharray"])?fi[a["stroke-dasharray"]]:L}Jt&&c.appendChild(At)}if(E.type=="text"){E.paper.canvas.style.display=L;var $e=E.paper.span,Ge=x.font&&x.font.match(/\d+(?:\.\d*)?(?=px)/);C=$e.style,x.font&&(C.font=x.font),x["font-family"]&&(C.fontFamily=x["font-family"]),x["font-weight"]&&(C.fontWeight=x["font-weight"]),x["font-style"]&&(C.fontStyle=x["font-style"]),Ge=F(x["font-size"]||Ge&&Ge[0])||10,C.fontSize=100*Ge+"px",E.textpath.string&&($e.innerHTML=M(E.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var Ue=$e.getBoundingClientRect();E.W=x.w=(Ue.right-Ue.left)/100,E.H=x.h=(Ue.bottom-Ue.top)/100,E.X=x.x,E.Y=x.y+E.H/2,("x"in a||"y"in a)&&(E.path.v=u.format("m{0},{1}l{2},{1}",P(x.x*rt),P(x.y*rt),P(x.x*rt)+1));for(var ci=["x","y","text","font","font-family","font-weight","font-style","font-size"],We=0,Pi=ci.length;We<Pi;We++)if(ci[We]in a){E._.dirty=1;break}switch(x["text-anchor"]){case"start":E.textpath.style["v-text-align"]="left",E.bbx=E.W/2;break;case"end":E.textpath.style["v-text-align"]="right",E.bbx=-E.W/2;break;default:E.textpath.style["v-text-align"]="center",E.bbx=0}E.textpath.style["v-text-kern"]=!0}},Et=function(l,a,c){l.attrs=l.attrs||{},l.attrs;var x=Math.pow,C="linear",$=".5 .5";if(l.attrs.gradient=a,a=(a=M(a).replace(u._radial_gradient,function(pt,vt,dt){return C="radial",vt&&dt&&(vt=F(vt),dt=F(dt),x(vt-.5,2)+x(dt-.5,2)>.25&&(dt=X.sqrt(.25-x(vt-.5,2))*(2*(dt>.5)-1)+.5),$=vt+W+dt),L})).split(/\s*\-\s*/),C=="linear"){var B=a.shift();if(B=-F(B),isNaN(B))return null}var E=u._parseDots(a);if(!E)return null;if(l=l.shape||l.node,E.length){l.removeChild(c),c.on=!0,c.method="none",c.color=E[0].color,c.color2=E[E.length-1].color;for(var z=[],H=0,nt=E.length;H<nt;H++)E[H].offset&&z.push(E[H].offset+W+E[H].color);c.colors=z.length?z.join():"0% "+c.color,C=="radial"?(c.type="gradientTitle",c.focus="100%",c.focussize="0 0",c.focusposition=$,c.angle=0):(c.type="gradient",c.angle=(270-B)%360),l.appendChild(c)}return 1},ct=function(l,a){this[0]=this.node=l,l.raphael=!0,this.id=u._oid++,l.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=a,this.matrix=u.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!a.bottom&&(a.bottom=this),this.prev=a.top,a.top&&(a.top.next=this),a.top=this,this.next=null},xt=u.el;ct.prototype=xt,xt.constructor=ct,xt.transform=function(l){if(l==null)return this._.transform;var a,c=this.paper._viewBoxShift,x=c?"s"+[c.scale,c.scale]+"-1-1t"+[c.dx,c.dy]:L;c&&(a=l=M(l).replace(/\.{3}|\u2026/g,this._.transform||L)),u._extractTransform(this,x+l);var C,$=this.matrix.clone(),B=this.skew,E=this.node,z=~M(this.attrs.fill).indexOf("-"),H=!M(this.attrs.fill).indexOf("url(");if($.translate(1,1),H||z||this.type=="image")if(B.matrix="1 0 0 1",B.offset="0 0",C=$.split(),z&&C.noRotation||!C.isSimple){E.style.filter=$.toFilter();var nt=this.getBBox(),pt=this.getBBox(1),vt=nt.x-pt.x,dt=nt.y-pt.y;E.coordorigin=vt*-rt+W+dt*-rt,Q(this,1,1,vt,dt,0)}else E.style.filter=L,Q(this,C.scalex,C.scaley,C.dx,C.dy,C.rotate);else E.style.filter=L,B.matrix=M($),B.offset=$.offset();return a!==null&&(this._.transform=a,u._extractTransform(this,a)),this},xt.rotate=function(l,a,c){if(this.removed)return this;if(l!=null){if((l=M(l).split(_t)).length-1&&(a=F(l[1]),c=F(l[2])),l=F(l[0]),c==null&&(a=c),a==null||c==null){var x=this.getBBox(1);a=x.x+x.width/2,c=x.y+x.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",l,a,c]])),this}},xt.translate=function(l,a){return this.removed?this:((l=M(l).split(_t)).length-1&&(a=F(l[1])),l=F(l[0])||0,a=+a||0,this._.bbox&&(this._.bbox.x+=l,this._.bbox.y+=a),this.transform(this._.transform.concat([["t",l,a]])),this)},xt.scale=function(l,a,c,x){if(this.removed)return this;if((l=M(l).split(_t)).length-1&&(a=F(l[1]),c=F(l[2]),x=F(l[3]),isNaN(c)&&(c=null),isNaN(x)&&(x=null)),l=F(l[0]),a==null&&(a=l),x==null&&(c=x),c==null||x==null)var C=this.getBBox(1);return c=c??C.x+C.width/2,x=x??C.y+C.height/2,this.transform(this._.transform.concat([["s",l,a,c,x]])),this._.dirtyT=1,this},xt.hide=function(){return!this.removed&&(this.node.style.display="none"),this},xt.show=function(){return!this.removed&&(this.node.style.display=L),this},xt.auxGetBBox=u.el.getBBox,xt.getBBox=function(){var l=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var a={},c=1/this.paper._viewBoxShift.scale;return a.x=l.x-this.paper._viewBoxShift.dx,a.x*=c,a.y=l.y-this.paper._viewBoxShift.dy,a.y*=c,a.width=l.width*c,a.height=l.height*c,a.x2=a.x+a.width,a.y2=a.y+a.height,a}return l},xt._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},xt.remove=function(){if(!this.removed&&this.node.parentNode){for(var l in this.paper.__set__&&this.paper.__set__.exclude(this),u.eve.unbind("raphael.*.*."+this.id),u._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[l]=typeof this[l]=="function"?u._removedFactory(l):null;this.removed=!0}},xt.attr=function(l,a){if(this.removed)return this;if(l==null){var c={};for(var x in this.attrs)this.attrs[h](x)&&(c[x]=this.attrs[x]);return c.gradient&&c.fill=="none"&&(c.fill=c.gradient)&&delete c.gradient,c.transform=this._.transform,c}if(a==null&&u.is(l,"string")){if(l=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var C=l.split(_t),$={},B=0,E=C.length;B<E;B++)(l=C[B])in this.attrs?$[l]=this.attrs[l]:u.is(this.paper.customAttributes[l],"function")?$[l]=this.paper.customAttributes[l].def:$[l]=u._availableAttrs[l];return E-1?$:$[C[0]]}if(this.attrs&&a==null&&u.is(l,"array")){for($={},B=0,E=l.length;B<E;B++)$[l[B]]=this.attr(l[B]);return $}var z;for(var H in a!=null&&((z={})[l]=a),a==null&&u.is(l,"object")&&(z=l),z)Mt("raphael.attr."+H+"."+this.id,this,z[H]);if(z){for(H in this.paper.customAttributes)if(this.paper.customAttributes[h](H)&&z[h](H)&&u.is(this.paper.customAttributes[H],"function")){var nt=this.paper.customAttributes[H].apply(this,[].concat(z[H]));for(var pt in this.attrs[H]=z[H],nt)nt[h](pt)&&(z[pt]=nt[pt])}z.text&&this.type=="text"&&(this.textpath.string=z.text),yt(this,z)}return this},xt.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&u._tofront(this,this.paper),this},xt.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),u._toback(this,this.paper)),this)},xt.insertAfter=function(l){return this.removed?this:(l.constructor==u.st.constructor&&(l=l[l.length-1]),l.node.nextSibling?l.node.parentNode.insertBefore(this.node,l.node.nextSibling):l.node.parentNode.appendChild(this.node),u._insertafter(this,l,this.paper),this)},xt.insertBefore=function(l){return this.removed?this:(l.constructor==u.st.constructor&&(l=l[0]),l.node.parentNode.insertBefore(this.node,l.node),u._insertbefore(this,l,this.paper),this)},xt.blur=function(l){var a=this.node.runtimeStyle,c=a.filter;return c=c.replace(ft,L),+l!=0?(this.attrs.blur=l,a.filter=c+W+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+l||1.5)+")",a.margin=u.format("-{0}px 0 0 -{0}px",P(+l||1.5))):(a.filter=c,a.margin=0,delete this.attrs.blur),this},u._engine.path=function(l,a){var c=Z("shape");c.style.cssText=it,c.coordsize=rt+W+rt,c.coordorigin=a.coordorigin;var x=new ct(c,a),C={fill:"none",stroke:"#000"};l&&(C.path=l),x.type="path",x.path=[],x.Path=L,yt(x,C),a.canvas&&a.canvas.appendChild(c);var $=Z("skew");return $.on=!0,c.appendChild($),x.skew=$,x.transform(L),x},u._engine.rect=function(l,a,c,x,C,$){var B=u._rectPath(a,c,x,C,$),E=l.path(B),z=E.attrs;return E.X=z.x=a,E.Y=z.y=c,E.W=z.width=x,E.H=z.height=C,z.r=$,z.path=B,E.type="rect",E},u._engine.ellipse=function(l,a,c,x,C){var $=l.path();return $.attrs,$.X=a-x,$.Y=c-C,$.W=2*x,$.H=2*C,$.type="ellipse",yt($,{cx:a,cy:c,rx:x,ry:C}),$},u._engine.circle=function(l,a,c,x){var C=l.path();return C.attrs,C.X=a-x,C.Y=c-x,C.W=C.H=2*x,C.type="circle",yt(C,{cx:a,cy:c,r:x}),C},u._engine.image=function(l,a,c,x,C,$){var B=u._rectPath(c,x,C,$),E=l.path(B).attr({stroke:"none"}),z=E.attrs,H=E.node,nt=H.getElementsByTagName("fill")[0];return z.src=a,E.X=z.x=c,E.Y=z.y=x,E.W=z.width=C,E.H=z.height=$,z.path=B,E.type="image",nt.parentNode==H&&H.removeChild(nt),nt.rotate=!0,nt.src=a,nt.type="tile",E._.fillpos=[c,x],E._.fillsize=[C,$],H.appendChild(nt),Q(E,1,1,0,0,0),E},u._engine.text=function(l,a,c,x){var C=Z("shape"),$=Z("path"),B=Z("textpath");a=a||0,c=c||0,x=x||"",$.v=u.format("m{0},{1}l{2},{1}",P(a*rt),P(c*rt),P(a*rt)+1),$.textpathok=!0,B.string=M(x),B.on=!0,C.style.cssText=it,C.coordsize=rt+W+rt,C.coordorigin="0 0";var E=new ct(C,l),z={fill:"#000",stroke:"none",font:u._availableAttrs.font,text:x};E.shape=C,E.path=$,E.textpath=B,E.type="text",E.attrs.text=M(x),E.attrs.x=a,E.attrs.y=c,E.attrs.w=1,E.attrs.h=1,yt(E,z),C.appendChild(B),C.appendChild($),l.canvas.appendChild(C);var H=Z("skew");return H.on=!0,C.appendChild(H),E.skew=H,E.transform(L),E},u._engine.setSize=function(l,a){var c=this.canvas.style;return this.width=l,this.height=a,l==+l&&(l+="px"),a==+a&&(a+="px"),c.width=l,c.height=a,c.clip="rect(0 "+l+" "+a+" 0)",this._viewBox&&u._engine.setViewBox.apply(this,this._viewBox),this},u._engine.setViewBox=function(l,a,c,x,C){u.eve("raphael.setViewBox",this,this._viewBox,[l,a,c,x,C]);var $,B,E=this.getSize(),z=E.width,H=E.height;return C&&(c*($=H/x)<z&&(l-=(z-c*$)/2/$),x*(B=z/c)<H&&(a-=(H-x*B)/2/B)),this._viewBox=[l,a,c,x,!!C],this._viewBoxShift={dx:-l,dy:-a,scale:E},this.forEach(function(nt){nt.transform("...")}),this},u._engine.initWin=function(l){var a=l.document;a.styleSheets.length<31?a.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):a.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!a.namespaces.rvml&&a.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),Z=function(c){return a.createElement("<rvml:"+c+' class="rvml">')}}catch{Z=function(x){return a.createElement("<"+x+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},u._engine.initWin(u._g.win),u._engine.create=function(){var l=u._getContainer.apply(0,arguments),a=l.container,c=l.height,x=l.width,C=l.x,$=l.y;if(!a)throw new Error("VML container not found.");var B=new u._Paper,E=B.canvas=u._g.doc.createElement("div"),z=E.style;return C=C||0,$=$||0,x=x||512,c=c||342,B.width=x,B.height=c,x==+x&&(x+="px"),c==+c&&(c+="px"),B.coordsize=216e5+W+216e5,B.coordorigin="0 0",B.span=u._g.doc.createElement("span"),B.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",E.appendChild(B.span),z.cssText=u.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",x,c),a==1?(u._g.doc.body.appendChild(E),z.left=C+"px",z.top=$+"px",z.position="absolute"):a.firstChild?a.insertBefore(E,a.firstChild):a.appendChild(E),B.renderfix=function(){},B},u.prototype.clear=function(){u.eve("raphael.clear",this),this.canvas.innerHTML=L,this.span=u._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},u.prototype.remove=function(){for(var l in u.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[l]=typeof this[l]=="function"?u._removedFactory(l):null;return!0};var Qt=u.st;for(var p in xt)xt[h](p)&&!Qt[h](p)&&(Qt[p]=function(l){return function(){var a=arguments;return this.forEach(function(c){c[l].apply(c,a)})}}(p))}}).apply(w,_))===void 0||(f.exports=k)}])})}(on)),on.exports}var sa=ra();const Oi=fr(sa);class aa{constructor(r){if(fe(r))throw new Error("* justgage: Make sure to pass options to the constructor!");this.events={},this.node=r.element;const f=this.node.dataset?this.node.dataset:{};(fe(r.defaults)?!1:r.defaults)!==!1&&(r=oa({}),delete r.defaults),this.config={element:r.element,classId:la(),value:ht("value",r,f,0,"float"),defaults:ht("defaults",r,f,0,!1),parentNode:ht("parentNode",r,f,null),width:ht("width",r,f,null),height:ht("height",r,f,null),valueFontColor:ht("valueFontColor",r,f,"#010101"),valueFontFamily:ht("valueFontFamily",r,f,"Arial"),symbol:ht("symbol",r,f,""),min:ht("min",r,f,0,"float"),minTxt:ht("minTxt",r,f,!1),max:ht("max",r,f,100,"float"),maxTxt:ht("maxTxt",r,f,!1),reverse:ht("reverse",r,f,!1),humanFriendlyDecimal:ht("humanFriendlyDecimal",r,f,0),textRenderer:ht("textRenderer",r,f,null),onAnimationEnd:ht("onAnimationEnd",r,f,null),gaugeWidthScale:ht("gaugeWidthScale",r,f,1),gaugeColor:ht("gaugeColor",r,f,"#edebeb"),label:ht("label",r,f,""),labelFontColor:ht("labelFontColor",r,f,"#b3b3b3"),labelFontFamily:ht("labelFontFamily",r,f,"Arial"),shadowOpacity:ht("shadowOpacity",r,f,.2),shadowSize:ht("shadowSize",r,f,5),shadowVerticalOffset:ht("shadowVerticalOffset",r,f,3),levelColors:ht("levelColors",r,f,["#a9d70b","#f9c802","#ff0000"],"array"),startAnimationTime:ht("startAnimationTime",r,f,700),startAnimationType:ht("startAnimationType",r,f,">"),refreshAnimationTime:ht("refreshAnimationTime",r,f,700),refreshAnimationType:ht("refreshAnimationType",r,f,">"),donutStartAngle:ht("donutStartAngle",r,f,90),valueMinFontSize:ht("valueMinFontSize",r,f,16),labelMinFontSize:ht("labelMinFontSize",r,f,10),minLabelMinFontSize:ht("minLabelMinFontSize",r,f,10),maxLabelMinFontSize:ht("maxLabelMinFontSize",r,f,10),hideValue:ht("hideValue",r,f,!1),hideMinMax:ht("hideMinMax",r,f,!1),showInnerShadow:ht("showInnerShadow",r,f,!1),humanFriendly:ht("humanFriendly",r,f,!1),noGradient:ht("noGradient",r,f,!1),donut:ht("donut",r,f,!1),relativeGaugeSize:ht("relativeGaugeSize",r,f,!1),counter:ht("counter",r,f,!1),decimals:ht("decimals",r,f,0),customSectors:ht("customSectors",r,f,{}),formatNumber:ht("formatNumber",r,f,!1),pointer:ht("pointer",r,f,!1),pointerOptions:ht("pointerOptions",r,f,{}),displayRemaining:ht("displayRemaining",r,f,!1)};let y,_,k,u,h,M,F,X,P,K,et,G,_t,Mt,W,L,J,lt,ft;this.config.value>this.config.max&&(this.config.value=this.config.max),this.config.value<this.config.min&&(this.config.value=this.config.min),this.originalValue=ht("value",r,f,-1,"float"),this.canvas=Oi(this.config.element,"100%","100%"),this.config.relativeGaugeSize===!0?this.config.donut===!0?(this.canvas.setViewBox(0,0,200,200,!0),y=200,_=200):(this.canvas.setViewBox(0,0,200,100,!0),y=200,_=100):this.config.width!==null&&this.config.height!==null?(y=this.config.width,_=this.config.height):this.config.parentNode!==null?(this.canvas.setViewBox(0,0,200,100,!0),y=200,_=100):(y=Number(vr(this.config.element,"width").slice(0,-2))*1,_=Number(vr(this.config.element,"height").slice(0,-2))*1),this.config.donut===!0?(y>_?(u=_,k=u):(y<_,k=y,u=k),M=(y-k)/2,F=(_-u)/2,X=u/6.4>16?u/5.4:18,P=M+k/2,this.config.label!==""?K=F+u/1.85:K=F+u/1.7,et=u/16>10?u/16:10,G=M+k/2,_t=K+et,Mt=u/16>10?u/16:10,W=M+k/10+k/6.666666666666667*this.config.gaugeWidthScale/2,L=_t,J=u/16>10?u/16:10,lt=M+k-k/10-k/6.666666666666667*this.config.gaugeWidthScale/2,ft=_t):(y>_?(u=_,k=u*2,k>y&&(h=k/y,k=k/h,u=u/h)):y<_?(k=y,u=k/2):(k=y,u=k*.5),M=(y-k)/2,F=(_-u)/2,X=u/6.5>this.config.valueMinFontSize?u/6.5:this.config.valueMinFontSize,P=M+k/2,K=F+u/1.275,et=u/16>this.config.labelMinFontSize?u/16:this.config.labelMinFontSize,G=M+k/2,_t=K+X/2+5,Mt=u/16>this.config.minLabelMinFontSize?u/16:this.config.minLabelMinFontSize,W=M+k/10+k/6.666666666666667*this.config.gaugeWidthScale/2,L=_t,J=u/16>this.config.maxLabelMinFontSize?u/16:this.config.maxLabelMinFontSize,lt=M+k-k/10-k/6.666666666666667*this.config.gaugeWidthScale/2,ft=_t),this.params={canvasW:y,canvasH:_,widgetW:k,widgetH:u,dx:M,dy:F,valueFontSize:X,valueX:P,valueY:K,labelFontSize:et,labelX:G,labelY:_t,minFontSize:Mt,minX:W,minY:L,maxFontSize:J,maxX:lt,maxY:ft},this.canvas.customAttributes.pki=U=>{let Q=this.config.min,Z=this.config.max;const ot=this.params.widgetW,yt=this.params.widgetH,Et=this.params.dx,ct=this.params.dy,xt=this.config.gaugeWidthScale,Qt=this.config.donut;let p,l,a,c,x,C,$,B,E,z;return Q<0&&(Z-=Q,U-=Q,Q=0),Qt?(p=(1-2*(U-Q)/(Z-Q))*Math.PI,l=ot/2-ot/30,a=l-ot/6.666666666666667*xt,c=ot/2+Et,x=yt/2+ct,C=c+l*Math.cos(p),$=x-l*Math.sin(p),B=c+a*Math.cos(p),E=x-a*Math.sin(p),z="M"+(c-a)+","+x+" ",z+="L"+(c-l)+","+x+" ",U-Q>(Z-Q)/2&&(z+="A"+l+","+l+" 0 0 1 "+(c+l)+","+x+" "),z+="A"+l+","+l+" 0 0 1 "+C+","+$+" ",z+="L"+B+","+E+" ",U-Q>(Z-Q)/2&&(z+="A"+a+","+a+" 0 0 0 "+(c+a)+","+x+" "),z+="A"+a+","+a+" 0 0 0 "+(c-a)+","+x+" ",z+="Z ",{path:z}):(p=(1-(U-Q)/(Z-Q))*Math.PI,l=ot/2-ot/10,a=l-ot/6.666666666666667*xt,c=ot/2+Et,x=yt/1.25+ct,C=c+l*Math.cos(p),$=x-l*Math.sin(p),B=c+a*Math.cos(p),E=x-a*Math.sin(p),z="M"+(c-a)+","+x+" ",z+="L"+(c-l)+","+x+" ",z+="A"+l+","+l+" 0 0 1 "+C+","+$+" ",z+="L"+B+","+E+" ",z+="A"+a+","+a+" 0 0 0 "+(c-a)+","+x+" ",z+="Z ",{path:z})},this.canvas.customAttributes.ndl=function(U){const Q=this.config.min,Z=this.config.max,ot=this.params.widgetW,yt=this.params.widgetH,Et=this.params.dx,ct=this.params.dy,xt=this.config.gaugeWidthScale,Qt=this.config.donut;let p=ot*3.5/100,l=ot/15,a=ot/100;this.config.pointerOptions.toplength!=null&&this.config.pointerOptions.toplength!==void 0&&(p=this.config.pointerOptions.toplength),this.config.pointerOptions.bottomlength!=null&&this.config.pointerOptions.bottomlength!==void 0&&(l=this.config.pointerOptions.bottomlength),this.config.pointerOptions.bottomwidth!=null&&this.config.pointerOptions.bottomwidth!==void 0&&(a=this.config.pointerOptions.bottomwidth);let c,x,C,$,B,E,z,H,nt,pt,vt,dt,kt,$t,bt,at,Ft;return Qt?(c=(1-2*(U-Q)/(Z-Q))*Math.PI,x=ot/2-ot/30,C=x-ot/6.666666666666667*xt,$=yt/2+ct,B=ot/2+Et+x*Math.cos(c),E=yt-(yt-$)-x*Math.sin(c),z=ot/2+Et+C*Math.cos(c),H=yt-(yt-$)-C*Math.sin(c),nt=B+p*Math.cos(c),pt=E-p*Math.sin(c),vt=z-l*Math.cos(c),dt=H+l*Math.sin(c),kt=vt+a*Math.sin(c),$t=dt+a*Math.cos(c),bt=vt-a*Math.sin(c),at=dt-a*Math.cos(c),Ft="M"+kt+","+$t+" ",Ft+="L"+bt+","+at+" ",Ft+="L"+nt+","+pt+" ",Ft+="Z ",{path:Ft}):(c=(1-(U-Q)/(Z-Q))*Math.PI,x=ot/2-ot/10,C=x-ot/6.666666666666667*xt,$=yt/1.25+ct,B=ot/2+Et+x*Math.cos(c),E=yt-(yt-$)-x*Math.sin(c),z=ot/2+Et+C*Math.cos(c),H=yt-(yt-$)-C*Math.sin(c),nt=B+p*Math.cos(c),pt=E-p*Math.sin(c),vt=z-l*Math.cos(c),dt=H+l*Math.sin(c),kt=vt+a*Math.sin(c),$t=dt+a*Math.cos(c),bt=vt-a*Math.sin(c),at=dt-a*Math.cos(c),Ft="M"+kt+","+$t+" ",Ft+="L"+bt+","+at+" ",Ft+="L"+nt+","+pt+" ",Ft+="Z ",{path:Ft})},this.gauge=this.canvas.path().attr({stroke:"none",fill:this.config.gaugeColor,pki:[this.config.max]}),this.level=this.canvas.path().attr({stroke:"none",fill:gr(this.config.value,(this.config.value-this.config.min)/(this.config.max-this.config.min),this.config.levelColors,this.config.noGradient,this.config.customSectors),pki:[this.config.min]}),this.config.donut&&this.level.transform("r"+this.config.donutStartAngle+", "+(this.params.widgetW/2+this.params.dx)+", "+(this.params.widgetH/2+this.params.dy)),this.config.pointer&&(this.needle=this.canvas.path().attr({stroke:fe(this.config.pointerOptions.stroke)?"none":this.config.pointerOptions.stroke,"stroke-width":fe(this.config.pointerOptions.stroke_width)?0:this.config.pointerOptions.stroke_width,"stroke-linecap":fe(this.config.pointerOptions.stroke_linecap)?"square":this.config.pointerOptions.stroke_linecap,fill:fe(this.config.pointerOptions.color)?"#000000":this.config.pointerOptions.color,ndl:[this.config.min]}),this.config.donut&&this.needle.transform("r"+this.config.donutStartAngle+", "+(this.params.widgetW/2+this.params.dx)+", "+(this.params.widgetH/2+this.params.dy))),this.txtValue=this.canvas.text(this.params.valueX,this.params.valueY,0),this.txtValue.attr({"font-size":this.params.valueFontSize,"font-weight":"bold","font-family":this.config.valueFontFamily,fill:this.config.valueFontColor,"fill-opacity":"0"}),Kt(this.txtValue,this.params.valueFontSize,this.params.valueY),this.txtLabel=this.canvas.text(this.params.labelX,this.params.labelY,this.config.label),this.txtLabel.attr({"font-size":this.params.labelFontSize,"font-weight":"normal","font-family":this.config.labelFontFamily,fill:this.config.labelFontColor,"fill-opacity":"0"}),Kt(this.txtLabel,this.params.labelFontSize,this.params.labelY);let I=this.config.min;this.config.reverse&&(I=this.config.max),this.txtMinimum=I,this.config.minTxt?this.txtMinimum=this.config.minTxt:this.config.humanFriendly?this.txtMinimum=Le(I,this.config.humanFriendlyDecimal):this.config.formatNumber&&(this.txtMinimum=ze(I)),this.txtMin=this.canvas.text(this.params.minX,this.params.minY,this.txtMinimum),this.txtMin.attr({"font-size":this.params.minFontSize,"font-weight":"normal","font-family":this.config.labelFontFamily,fill:this.config.labelFontColor,"fill-opacity":this.config.hideMinMax||this.config.donut?"0":"1"}),Kt(this.txtMin,this.params.minFontSize,this.params.minY);let it=this.config.max;this.config.reverse&&(it=this.config.min),this.txtMaximum=it,this.config.maxTxt?this.txtMaximum=this.config.maxTxt:this.config.humanFriendly?this.txtMaximum=Le(it,this.config.humanFriendlyDecimal):this.config.formatNumber&&(this.txtMaximum=ze(it)),this.txtMax=this.canvas.text(this.params.maxX,this.params.maxY,this.txtMaximum),this.txtMax.attr({"font-size":this.params.maxFontSize,"font-weight":"normal","font-family":this.config.labelFontFamily,fill:this.config.labelFontColor,"fill-opacity":this.config.hideMinMax||this.config.donut?"0":"1"}),Kt(this.txtMax,this.params.maxFontSize,this.params.maxY);const rt=this.canvas.canvas.childNodes[1],wt="http://www.w3.org/2000/svg";if(hi!==void 0&&hi<9||(hi!==void 0?xr(()=>{this.generateShadow(wt,rt)}):this.generateShadow(wt,rt)),this.config.textRenderer&&this.config.textRenderer(this.originalValue)!==!1?this.originalValue=this.config.textRenderer(this.originalValue):this.config.humanFriendly?this.originalValue=Le(this.originalValue,this.config.humanFriendlyDecimal)+this.config.symbol:this.config.formatNumber?this.originalValue=ze(this.originalValue)+this.config.symbol:this.config.displayRemaining?this.originalValue=((this.config.max-this.originalValue)*1).toFixed(this.config.decimals)+this.config.symbol:this.originalValue=(this.originalValue*1).toFixed(this.config.decimals)+this.config.symbol,this.config.counter===!0){const U=()=>{let Z=this.level.attr("pki")[0];this.config.reverse&&(Z=this.config.max*1+this.config.min*1-this.level.attr("pki")[0]*1),this.config.textRenderer&&this.config.textRenderer(Math.floor(Z))!==!1?this.txtValue.attr("text",this.config.textRenderer(Math.floor(Z))):this.config.humanFriendly?this.txtValue.attr("text",Le(Math.floor(Z),this.config.humanFriendlyDecimal)+this.config.symbol):this.config.formatNumber?this.txtValue.attr("text",ze(Math.floor(Z))+this.config.symbol):this.config.displayRemaining?this.txtValue.attr("text",((this.config.max-Z)*1).toFixed(this.config.decimals)+this.config.symbol):this.txtValue.attr("text",(Z*1).toFixed(this.config.decimals)+this.config.symbol),Kt(this.txtValue,this.params.valueFontSize,this.params.valueY),Z=null},Q=()=>{this.txtValue.attr({text:this.originalValue}),Kt(this.txtValue,this.params.valueFontSize,this.params.valueY)};this.bindEvent("raphael.anim.finish",Q),this.bindEvent("raphael.anim.frame",U)}else{const U=()=>{this.txtValue.attr({text:this.originalValue}),Kt(this.txtValue,this.params.valueFontSize,this.params.valueY)};this.bindEvent("raphael.anim.start",U)}let st=this.config.value;this.config.reverse&&(st=this.config.max*1+this.config.min*1-this.config.value*1),this.level.animate({pki:[st]},this.config.startAnimationTime,this.config.startAnimationType,this.config.onAnimationEnd),this.config.pointer&&this.needle.animate({ndl:[st]},this.config.startAnimationTime,this.config.startAnimationType),this.txtValue.animate({"fill-opacity":this.config.hideValue?"0":"1"},this.config.startAnimationTime,this.config.startAnimationType),this.txtLabel.animate({"fill-opacity":"1"},this.config.startAnimationTime,this.config.startAnimationType)}bindEvent(r,f){r+="."+this.level.id,this.events[r]&&Oi.eve.off(r,this.events[r]),Oi.eve.on(r,f),this.events[r]=f}refresh(r,f,w,y){let _;f=yr(f)?f:null,w=yr(w)?w:null,y=y||null,y!==null&&(this.config.label=y,this.txtLabel.attr({text:this.config.label}),Kt(this.txtLabel,this.params.labelFontSize,this.params.labelY)),w!==null&&(this.config.min=w,this.txtMinimum=this.config.min,this.config.minTxt?this.txtMinimum=this.config.minTxt:this.config.humanFriendly?this.txtMinimum=Le(this.config.min,this.config.humanFriendlyDecimal):this.config.formatNumber&&(this.txtMinimum=ze(this.config.min)),this.config.reverse?(this.txtMax.attr({text:this.txtMinimum}),Kt(this.txtMax,this.params.minFontSize,this.params.minY)):(this.txtMin.attr({text:this.txtMinimum}),Kt(this.txtMin,this.params.minFontSize,this.params.minY))),f!==null&&(this.config.max=f,this.txtMaximum=this.config.max,this.config.maxTxt?this.txtMaximum=this.config.maxTxt:this.config.humanFriendly?this.txtMaximum=Le(this.config.max,this.config.humanFriendlyDecimal):this.config.formatNumber&&(this.txtMaximum=ze(this.config.max)),this.config.reverse?(this.txtMin.attr({text:this.txtMaximum}),Kt(this.txtMin,this.params.maxFontSize,this.params.maxY)):(this.txtMax.attr({text:this.txtMaximum}),Kt(this.txtMax,this.params.maxFontSize,this.params.maxY))),_=r,r*1>this.config.max*1&&(r=this.config.max*1),r*1<this.config.min*1&&(r=this.config.min*1);const k=gr(r,(r-this.config.min)/(this.config.max-this.config.min),this.config.levelColors,this.config.noGradient,this.config.customSectors);this.config.textRenderer&&this.config.textRenderer(_)!==!1?_=this.config.textRenderer(_):this.config.humanFriendly?_=Le(_,this.config.humanFriendlyDecimal)+this.config.symbol:this.config.formatNumber?_=ze((_*1).toFixed(this.config.decimals))+this.config.symbol:this.config.displayRemaining?_=((this.config.max-_)*1).toFixed(this.config.decimals)+this.config.symbol:_=(_*1).toFixed(this.config.decimals)+this.config.symbol,this.originalValue=_,this.config.value=r*1,this.config.counter||(this.txtValue.attr({text:_}),Kt(this.txtValue,this.params.valueFontSize,this.params.valueY));let u=this.config.value;this.config.reverse&&(u=this.config.max*1+this.config.min*1-this.config.value*1),this.level.animate({pki:[u],fill:k},this.config.refreshAnimationTime,this.config.refreshAnimationType,this.config.onAnimationEnd),this.config.pointer&&this.needle.animate({ndl:[u]},this.config.refreshAnimationTime,this.config.refreshAnimationType)}update(r,f){const w=this;if(r instanceof Object)for(const y in r)f=r[y],pr(w,y,f);else pr(w,r,f)}destroy(){this.node&&this.node.parentNode&&(this.node.innerHTML="");for(const r in this.events)Oi.eve.off(r,this.events[r]);this.events={}}generateShadow(r,f){const w="inner-shadow-"+(this.config.element.id||this.config.classId),y=document.createElementNS(r,"filter");y.setAttribute("id",w),f.appendChild(y);const _=document.createElementNS(r,"feOffset");_.setAttribute("dx","0"),_.setAttribute("dy",this.config.shadowVerticalOffset),y.appendChild(_);const k=document.createElementNS(r,"feGaussianBlur");k.setAttribute("result","offset-blur"),k.setAttribute("stdDeviation",this.config.shadowSize),y.appendChild(k);const u=document.createElementNS(r,"feComposite");u.setAttribute("operator","out"),u.setAttribute("in","SourceGraphic"),u.setAttribute("in2","offset-blur"),u.setAttribute("result","inverse"),y.appendChild(u);const h=document.createElementNS(r,"feFlood");h.setAttribute("flood-color","black"),h.setAttribute("flood-opacity",this.config.shadowOpacity),h.setAttribute("result","color"),y.appendChild(h);const M=document.createElementNS(r,"feComposite");M.setAttribute("operator","in"),M.setAttribute("in","color"),M.setAttribute("in2","inverse"),M.setAttribute("result","shadow"),y.appendChild(M);const F=document.createElementNS(r,"feComposite");F.setAttribute("operator","over"),F.setAttribute("in","shadow"),F.setAttribute("in2","SourceGraphic"),y.appendChild(F),this.config.showInnerShadow&&(this.canvas.canvas.childNodes[2].setAttribute("filter","url(#"+w+")"),this.canvas.canvas.childNodes[3].setAttribute("filter","url(#"+w+")"))}}function pr(s,r,f){switch(r){case"valueFontColor":if(!mr(f)){console.log("* justgage: the updated valueFontColor value is not a valid hex color");break}s.txtValue.attr({fill:f});break;case"labelFontColor":if(!mr(f)){console.log("* justgage: the updated labelFontColor value is not a valid hex color");break}s.txtMin.attr({fill:f}),s.txtMax.attr({fill:f}),s.txtLabel.attr({fill:f});break;default:console.log(`* justgage: "${r}" is not a supported update setting`)}}function ht(s,r,f,w,y,_){let k=w,u=!1;if(!fe(s)&&(!fe(f)&&typeof f=="object"&&s in f?(k=f[s],u=!0):!fe(r)&&typeof r=="object"&&s in r?(k=r[s],u=!0):k=w,u===!0&&!fe(y)))switch(y){case"int":k=parseInt(k,10);break;case"float":k=parseFloat(k);break}return k}function fe(s){return s==null}function gr(s,r,f,w,y){let _,k,u,h,M,F,X,P,K,et,G;const _t=y&&y.ranges&&y.ranges.length>0;if(w=w||_t,_t){y.percents===!0&&(s=r*100);for(let J=0;J<y.ranges.length;J++)if(s>=y.ranges[J].lo&&s<=y.ranges[J].hi)return y.ranges[J].color}const Mt=f.length;if(Mt===1)return f[0];const W=w?1/Mt:1/(Mt-1),L=[];for(let J=0;J<f.length;J++)_=w?W*(J+1):W*J,k=parseInt(ln(f[J]).substring(0,2),16),u=parseInt(ln(f[J]).substring(2,4),16),h=parseInt(ln(f[J]).substring(4,6),16),L[J]={pct:_,color:{r:k,g:u,b:h}};if(r===0)return"rgb("+[L[0].color.r,L[0].color.g,L[0].color.b].join(",")+")";for(let J=0;J<L.length;J++)if(r<=L[J].pct)return w?"rgb("+[L[J].color.r,L[J].color.g,L[J].color.b].join(",")+")":(M=L[J-1],F=L[J],X=F.pct-M.pct,P=(r-M.pct)/X,K=1-P,et=P,G={r:Math.floor(M.color.r*K+F.color.r*et),g:Math.floor(M.color.g*K+F.color.g*et),b:Math.floor(M.color.b*K+F.color.b*et)},"rgb("+[G.r,G.g,G.b].join(",")+")")}function Kt(s,r,f){(!hi||hi>9)&&s.node.firstChild.attributes.dy&&(s.node.firstChild.attributes.dy.value=0)}function ln(s){return s.charAt(0)==="#"?s.substring(1,7):s}function mr(s){return typeof s=="string"&&/^#([0-9A-Fa-f]{3}){1,2}$/.test(s)}function Le(s,r){const f=Math.pow(10,r),w=" KMGTPE";let y=0;const _=1e3;for(;(s>=_||s<=-1e3)&&++y<w.length;)s=s/_;return y=y>=w.length?w.length-1:y,Math.round(s*f)/f+w[y]}function ze(s){const r=s.toString().split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.join(".")}function vr(s,r){let f="";return document.defaultView&&document.defaultView.getComputedStyle?f=document.defaultView.getComputedStyle(s,"").getPropertyValue(r):s.currentStyle&&(r=r.replace(/-(\w)/g,function(w,y){return y.toUpperCase()}),f=s.currentStyle[r]),f}function xr(s){document.createElementNS!==void 0?s():setTimeout(function(){xr(s)},100)}const hi=function(){let s=3;const r=document.createElement("div"),f=r.getElementsByTagName("i");for(;f[0];)r.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->";return s>4?s:void 0}();function oa(s){s=s||{};for(let r=1;r<arguments.length;r++)if(arguments[r])for(const f in arguments[r])Object.prototype.hasOwnProperty.call(arguments[r],f)&&(s[f]=arguments[r][f]);return s}function yr(s){return s!=null&&!isNaN(s)}function la(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){const r=Math.random()*16|0;return(s==="x"?r:r&3|8).toString(16)})}var ua=Hs('<div part="gauge" style="width:100%" id="gauge"></div>');const ha={hash:"svelte-45h",code:""};function _r(s,r){ir(r,!0),Ws(s,ha);let f=Mn(void 0),w=Mn(void 0),y=an(r,"id",7,""),_=an(r,"style"),k=an(r,"options");Un(()=>{k()&&typeof k()=="string"&&k(JSON.parse(k())),Rt(f)&&Rt(w)&&u()});function u(){Rt(w)&&Rt(w).destroy(),qt(w,void 0),h()}function h(){if(!k()||!Rt(f))return console.error("cannot create gauge");if(Rt(w))console.error("cannot create html gauge");else{const X=Object.assign({element:Rt(f)},k());qt(w,Te(new aa(X)))}}ur(()=>{qt(f,Te(r.$$host.querySelector("#gauge"))),h()}),Zs(()=>{Rt(w)&&Rt(w).destroy(),qt(w,void 0)});var M=ua(),F=Sn(()=>na(u,200));return qs("resize",Zi,function(...X){var P;(P=Rt(F))==null||P.apply(this,X)}),ar(s,M),nr({get id(){return y()},set id(X=""){y(X),li()},get style(){return _()},set style(X){_(X),li()},get options(){return k()},set options(X){k(X),li()}})}customElements.define("hb-gauge",ta(_r,{id:{},style:{},options:{}},[],[],!0)),Lt.Component=_r,Object.defineProperty(Lt,Symbol.toStringTag,{value:"Module"})})(this.gauge=this.gauge||{});
|
|
6
|
+
//# sourceMappingURL=main.iife.js.map
|