this.primereact=this.primereact||{},this.primereact.knob=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;nthis.maxRadians)n=this.mapRange(e,this.minRadians,this.maxRadians,this.props.min,this.props.max);else{if(!(e0&&this.props.max>0?this.props.min:0,this.props.min,this.props.max,this.minRadians,this.maxRadians)}},{key:"valueRadians",value:function(){return this.mapRange(this.props.value,this.props.min,this.props.max,this.minRadians,this.maxRadians)}},{key:"minX",value:function(){return this.midX+Math.cos(this.minRadians)*this.radius}},{key:"minY",value:function(){return this.midY-Math.sin(this.minRadians)*this.radius}},{key:"maxX",value:function(){return this.midX+Math.cos(this.maxRadians)*this.radius}},{key:"maxY",value:function(){return this.midY-Math.sin(this.maxRadians)*this.radius}},{key:"zeroX",value:function(){return this.midX+Math.cos(this.zeroRadians())*this.radius}},{key:"zeroY",value:function(){return this.midY-Math.sin(this.zeroRadians())*this.radius}},{key:"valueX",value:function(){return this.midX+Math.cos(this.valueRadians())*this.radius}},{key:"valueY",value:function(){return this.midY-Math.sin(this.valueRadians())*this.radius}},{key:"largeArc",value:function(){return Math.abs(this.zeroRadians()-this.valueRadians())this.zeroRadians()?0:1}},{key:"valueToDisplay",value:function(){return this.props.valueTemplate.replace("{value}",this.props.value.toString())}},{key:"render",value:function(){var e=this,t=n.classNames("p-knob p-component",{"p-disabled":this.props.disabled},this.props.className),i=this.props.showValue&&o.default.createElement("text",{x:50,y:57,textAnchor:"middle",fill:this.props.textColor,className:"p-knob-text",name:this.props.name},this.valueToDisplay());return o.default.createElement("div",{id:this.props.id,className:t,style:this.props.style,ref:function(t){return e.element=t}},o.default.createElement("svg",{viewBox:"0 0 100 100",width:this.props.size,height:this.props.size,onClick:this.onClick,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchEnd:this.onTouchEnd},o.default.createElement("path",{d:this.rangePath(),strokeWidth:this.props.strokeWidth,stroke:this.props.rangeColor,className:"p-knob-range"}),o.default.createElement("path",{d:this.valuePath(),strokeWidth:this.props.strokeWidth,stroke:this.props.valueColor,className:"p-knob-value"}),i))}}])&&a(u.prototype,l),f&&a(u,f),Object.defineProperty(u,"prototype",{writable:!1}),m}(t.Component);return m={id:null,style:null,className:null,value:null,size:100,disabled:!1,readOnly:!1,showValue:!0,step:1,min:0,max:100,strokeWidth:14,name:null,valueColor:"var(--primary-color, Black)",rangeColor:"var(--surface-d, LightGray)",textColor:"var(--text-color-secondary, Black)",valueTemplate:"{value}",onChange:null},(v="defaultProps")in(f=y)?Object.defineProperty(f,v,{value:m,enumerable:!0,configurable:!0,writable:!0}):f[v]=m,e.Knob=y,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);