(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0cbefe"],{"4c92":function(t,a,e){"use strict";e.r(a);var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("CVselect",{attrs:{name:"SortMode",list:["Largest","Smallest","Highest","Lowest","Rightmost","Leftmost","Centermost"]},on:{input:function(a){return t.handleData("sortMode")}},model:{value:t.value.sortMode,callback:function(a){t.$set(t.value,"sortMode",a)},expression:"value.sortMode"}}),e("span",[t._v("Calibrate:")]),e("v-divider",{attrs:{dark:"",color:"white"}}),e("CVselect",{attrs:{name:"Calibration Mode",list:["None","Single point","Dual point"]},on:{input:function(a){return t.handleData("calibrationMode")}},model:{value:t.value.calibrationMode,callback:function(a){t.$set(t.value,"calibrationMode",a)},expression:"value.calibrationMode"}}),e(t.selectedComponent,{tag:"component",attrs:{"raw-point":t.rawPoint},on:{update:t.doUpdate}}),e("v-snackbar",{attrs:{timeout:3e3,top:"",color:"error"},model:{value:t.snackbar,callback:function(a){t.snackbar=a},expression:"snackbar"}},[e("span",{staticStyle:{color:"#000"}},[t._v("Points are too close")]),e("v-btn",{attrs:{color:"black",text:""},on:{click:function(a){t.snackbar=!1}}},[t._v("Close")])],1)],1)},n=[],i=e("8384"),l=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("v-row",{attrs:{align:"center",justify:"start"}},[e("v-col",{staticStyle:{"padding-right":"0"},attrs:{cols:3}},[e("v-btn",{attrs:{small:"",color:"#4baf62"},on:{click:t.takePointA}},[t._v("Take Point A")])],1),e("v-col",{staticStyle:{"margin-left":"0"},attrs:{cols:3}},[e("v-btn",{attrs:{small:"",color:"#4baf62"},on:{click:t.takePointB}},[t._v("Take Point B")])],1),e("v-col",[e("v-btn",{attrs:{small:"",color:"yellow darken-3"},on:{click:t.clearSlope}},[t._v("Clear All Points")])],1)],1)],1)},s=[],r={name:"DualCalibration",props:["rawPoint"],data(){return{pointA:void 0,pointB:void 0}},methods:{takePointA(){this.pointA=this.rawPoint,this.calcSlope()},takePointB(){this.pointB=this.rawPoint,this.calcSlope()},calcSlope(){if(void 0!==this.pointA&&void 0!==this.pointB){let t=(this.pointB[1]-this.pointA[1])/(this.pointB[0]-this.pointA[0]),a=this.pointA[1]-t*this.pointA[0];!1===isNaN(t)&&!1===isNaN(a)?this.sendSlope(t,a,!0):this.$emit("snackbar"),this.pointA=void 0,this.pointB=void 0}},sendSlope(t,a,e){this.handleInput("m",t),this.handleInput("b",a),this.$emit("update")},clearSlope(){this.sendSlope(1,0,!1),this.pointA=void 0,this.pointB=void 0}}},c=r,p=e("2877"),d=e("6544"),u=e.n(d),h=e("8336"),v=e("62ad"),b=e("0fd9"),m=Object(p["a"])(c,l,s,!1,null,"c7f473fa",null),k=m.exports;u()(m,{VBtn:h["a"],VCol:v["a"],VRow:b["a"]});var f=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("v-row",{attrs:{align:"center",justify:"start"}},[e("v-col",{staticStyle:{"padding-right":"0"},attrs:{cols:3}},[e("v-btn",{attrs:{small:"",color:"#4baf62"},on:{click:t.takePoint}},[t._v("Take Point")])],1),e("v-col",[e("v-btn",{attrs:{small:"",color:"yellow darken-3"},on:{click:t.clearPoint}},[t._v("Clear Point")])],1)],1)],1)},w=[],P={name:"SingleCalibration",props:["rawPoint"],methods:{clearPoint(){this.handleInput("point",[0,0]),this.$emit("update")},takePoint(){this.handleInput("point",this.rawPoint),this.$emit("update")}}},C=P,S=Object(p["a"])(C,f,w,!1,null,"aed760c8",null),g=S.exports;u()(S,{VBtn:h["a"],VCol:v["a"],VRow:b["a"]});var _={name:"Output",props:["value"],components:{CVselect:i["a"],SingleCalibration:g,DualCalibration:k},methods:{handleData(t){this.handleInput(t,this.value[t]),this.$emit("update")},doUpdate(){this.$emit("update")}},data(){return{snackbar:!1}},computed:{selectedComponent:{get(){switch(this.value.calibrationMode){case 0:return"";case 1:return"SingleCalibration";case 2:return"DualCalibration"}return""}},rawPoint:{get(){return this.$store.state.point.rawPoint}}}},A=_,B=e("ce7e"),V=e("2db4"),$=Object(p["a"])(A,o,n,!1,null,"fb42e886",null);a["default"]=$.exports;u()($,{VBtn:h["a"],VDivider:B["a"],VSnackbar:V["a"]})}}]);
//# sourceMappingURL=chunk-2d0cbefe.8112a72c.js.map