From f00b0e366d512f463319f38383ec56466047ae7c Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Wed, 30 Dec 2020 23:02:43 +0100 Subject: [PATCH] Changed default setting --- TODO.md | 1 + docs/index.html | 2 +- docs/js/{app.74d85d0a.js => app.a1173833.js} | 4 ++-- docs/js/{app.74d85d0a.js.map => app.a1173833.js.map} | 2 +- src/store.js | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) rename docs/js/{app.74d85d0a.js => app.a1173833.js} (81%) rename docs/js/{app.74d85d0a.js.map => app.a1173833.js.map} (82%) diff --git a/TODO.md b/TODO.md index 403ccc2..0a7cf90 100644 --- a/TODO.md +++ b/TODO.md @@ -3,6 +3,7 @@ ToDo Should have ---- +- Automatically switch to Custom direction when clicking a strip (preserving the directions currently on screen otherwise) - Highlight strips for the current board, highlight layer for the focused/hovered layer - Show list of end grain board numbers and reversed in a "Glue list" for printing - Support for fractional inches (see, not all europeans look down on freedom units!) diff --git a/docs/index.html b/docs/index.html index c5b4de6..8a30084 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -CuttingBoard
\ No newline at end of file +CuttingBoard
\ No newline at end of file diff --git a/docs/js/app.74d85d0a.js b/docs/js/app.a1173833.js similarity index 81% rename from docs/js/app.74d85d0a.js rename to docs/js/app.a1173833.js index 5838694..c578d72 100644 --- a/docs/js/app.74d85d0a.js +++ b/docs/js/app.a1173833.js @@ -1,2 +1,2 @@ -(function(t){function e(e){for(var r,a,s=e[0],c=e[1],d=e[2],u=0,b=[];u1?(Object(r["k"])(),Object(r["c"])("h2",T,"Board "+Object(r["q"])(e+1),1)):Object(r["d"])("",!0),Object(r["g"])(_,{board:t,scale:1},null,8,["board"])],64)})),256))],2),Object(r["g"])("div",{class:{hideOnPrint:!$.printCuttingList}},[I,Object(r["g"])(F)],2)])],64)})),M=(n("b0c0"),n("8a79"),Object(r["y"])("data-v-7067c7c7"));Object(r["m"])("data-v-7067c7c7");var D={class:"settings"},S=Object(r["g"])("h2",null,"Designer",-1),A=Object(r["g"])("label",{for:"units"},"Units",-1),q=Object(r["g"])("option",{value:"mm"},"Millimeters",-1),U=Object(r["g"])("option",{value:"cm"},"Centimeters",-1),_=Object(r["g"])("option",{value:"inchdecimal"},"Inches (decimal)",-1),F=Object(r["g"])("h2",null,"Tools",-1),H=Object(r["g"])("label",{for:"bladeKerf"},"Blade kerf",-1),K=Object(r["g"])("h2",null,"End grain",-1),R=Object(r["g"])("label",{for:"crosscutWidth"},"Crosscut width",-1);Object(r["l"])();var N=M((function(t,e,n,i,o,a){return Object(r["k"])(),Object(r["c"])("div",D,[S,A,Object(r["g"])("select",{id:"units",value:a.settings.units,onChange:e[1]||(e[1]=function(e){return t.$store.commit("updateSettings",{units:e.target.value})})},[q,U,_],40,["value"]),F,H,Object(r["g"])("input",{id:"bladeKerf",type:"number",value:a.settings.bladeKerf,onChange:e[2]||(e[2]=function(e){return t.$store.commit("updateSettings",{bladeKerf:a.parseFloatDef(e.target.value)})})},null,40,["value"]),K,R,Object(r["g"])("input",{id:"crosscutWidth",type:"number",value:a.settings.crosscutWidth,onChange:e[3]||(e[3]=function(e){return t.$store.commit("updateSettings",{crosscutWidth:a.parseFloatDef(e.target.value)})})},null,40,["value"])])})),V=(n("2b19"),25.4),z=10,X=1,Y={convert:function(t,e,n){var r=this.toMillimeters(t,e);return this.fromMillimeters(r,n)},toPixels:function(t,e){return Math.ceil(this.toMillimeters(t,e)*X)},toMillimeters:function(t,e){switch(e){case"mm":return t;case"cm":return t*z;case"inchdecimal":return t*V}return console.error("Invalid units type: "+e),0},fromMillimeters:function(t,e){switch(e){case"mm":return t;case"cm":return t/z;case"inchdecimal":return t/V}return console.error("Invalid units type: "+e),0},display:function(t,e){var n=this.limitDecimals(t,3);switch(e){case"mm":return n+" mm";case"cm":return n+" cm";case"inchdecimal":return n+" inch"}return console.error("Invalid units type: "+e),n},limitDecimals:function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}},J={computed:{settings:function(){return this.$store.state.settings}},methods:{parseFloatDef:function(t){var e=parseFloat(t);return Object.is(e,NaN)?0:e}}};n("e9ae");J.render=N,J.__scopeId="data-v-7067c7c7";var Q=J,Z=Object(r["y"])("data-v-01187e40");Object(r["m"])("data-v-01187e40");var tt={class:"board"},et={class:"name"},nt={class:"boardsettings"},rt=Object(r["g"])("label",{for:"boardLength"},"Board length",-1),it=Object(r["g"])("label",{for:"boardThickness"},"Board thickness",-1),ot={class:"layers"},at=Object(r["e"])('
Tip: click and drag the layer number to move a layer
 Wood speciesWidth ',5),st={class:"remove"},ct={key:0,class:"widthwarning"},dt={class:"add"},lt=Object(r["g"])("h2",null,"Preview settings",-1),ut=Object(r["g"])("label",{for:"borders"}," Show borders",-1),bt=Object(r["g"])("h2",null,"End grain layer direction",-1),ht=Object(r["g"])("label",{for:"directionUniform"}," Uniform",-1),gt=Object(r["g"])("label",{for:"directionAlternate"}," Alternate",-1),ft=Object(r["g"])("label",{for:"directionCustom"}," Custom",-1),Ot={key:0},pt=Object(r["f"])(" Click the strips in the preview to reverse their direction. "),jt={key:0},vt=Object(r["f"])("This may be easier if you "),mt=Object(r["f"])(" the 'Show borders' setting.");Object(r["l"])();var wt=Z((function(t,e,n,i,o,a){return Object(r["k"])(),Object(r["c"])(r["a"],null,[Object(r["g"])("div",tt,[Object(r["g"])("button",{onClick:e[1]||(e[1]=function(){return a.previousBoard&&a.previousBoard.apply(a,arguments)}),disabled:0==o.boardIndex},"<",8,["disabled"]),Object(r["g"])("div",et,"Board "+Object(r["q"])(o.boardIndex+1)+" of "+Object(r["q"])(a.boards.length),1),a.boards.length>1?(Object(r["k"])(),Object(r["c"])("button",{key:0,onClick:e[2]||(e[2]=function(){return a.removeBoard&&a.removeBoard.apply(a,arguments)})},"Remove")):Object(r["d"])("",!0),Object(r["g"])("button",{onClick:e[3]||(e[3]=function(){return a.addBoard&&a.addBoard.apply(a,arguments)})},"Add"),Object(r["g"])("button",{onClick:e[4]||(e[4]=function(){return a.nextBoard&&a.nextBoard.apply(a,arguments)}),disabled:o.boardIndex==a.boards.length-1},">",8,["disabled"])]),null!==a.currentBoard?(Object(r["k"])(),Object(r["c"])(r["a"],{key:0},[Object(r["g"])("div",nt,[rt,Object(r["g"])("input",{id:"boardLength",type:"number",value:a.currentBoard.length,onChange:e[5]||(e[5]=function(e){return t.$store.commit("updateBoard",{board:o.boardIndex,values:{length:a.parseFloatDef(e.target.value)}})})},null,40,["value"]),it,Object(r["g"])("input",{id:"boardThickness",type:"number",value:a.currentBoard.thickness,onChange:e[6]||(e[6]=function(e){return t.$store.commit("updateBoard",{board:o.boardIndex,values:{thickness:a.parseFloatDef(e.target.value)}})})},null,40,["value"])]),Object(r["g"])("div",ot,[at,(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.currentBoard.layers,(function(t,e){return Object(r["k"])(),Object(r["c"])(r["a"],null,[Object(r["g"])("div",{class:["index",{dropTargetAbove:o.dropTarget===e,dropTargetBelow:o.dropTarget===a.currentBoard.layers.length&&e===a.currentBoard.layers.length-1}],ref:"layer"+e,onMousedown:Object(r["x"])((function(t){return a.startDrag(e)}),["prevent"])},Object(r["q"])(e+1),43,["onMousedown"]),Object(r["w"])(Object(r["g"])("select",{"onUpdate:modelValue":function(e){return t.wood=e},class:"wood"},[(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.wood,(function(t,e){return Object(r["k"])(),Object(r["c"])("option",{value:e},Object(r["q"])(t.name),9,["value"])})),256))],8,["onUpdate:modelValue"]),[[r["s"],t.wood]]),Object(r["g"])("input",{type:"number",class:"width",value:t.width,onInput:function(e){return t.width=a.parseFloatDef(e.target.value)}},null,40,["value","onInput"]),Object(r["g"])("div",st,[Object(r["g"])("button",{onClick:function(t){return a.removeLayer(e)}},"X",8,["onClick"])])],64)})),256)),null!==a.widthWarning?(Object(r["k"])(),Object(r["c"])("div",ct,Object(r["q"])(a.widthWarning),1)):Object(r["d"])("",!0),Object(r["g"])("div",dt,[Object(r["g"])("button",{onClick:e[7]||(e[7]=function(t){return a.addLayer()})},"Add layer")])]),Object(r["g"])("div",null,[lt,Object(r["g"])("input",{id:"borders",type:"checkbox",checked:a.settings.borders,onChange:e[8]||(e[8]=function(e){return t.$store.commit("updateSettings",{borders:e.target.checked})})},null,40,["checked"]),ut]),Object(r["g"])("div",null,[bt,Object(r["g"])("div",null,[Object(r["g"])("input",{id:"directionUniform",type:"radio",checked:"uniform"===a.settings.direction,onChange:e[9]||(e[9]=function(t){return a.setDirection(t,"uniform")})},null,40,["checked"]),ht]),Object(r["g"])("div",null,[Object(r["g"])("input",{id:"directionAlternate",type:"radio",checked:"alternate"===a.settings.direction,onChange:e[10]||(e[10]=function(t){return a.setDirection(t,"alternate")})},null,40,["checked"]),gt]),Object(r["g"])("div",null,[Object(r["g"])("input",{id:"directionCustom",type:"radio",checked:"custom"===a.settings.direction,onChange:e[11]||(e[11]=function(t){return a.setDirection(t,"custom")})},null,40,["checked"]),ft,"custom"===a.settings.direction?(Object(r["k"])(),Object(r["c"])("p",Ot,[pt,a.settings.borders?Object(r["d"])("",!0):(Object(r["k"])(),Object(r["c"])("span",jt,[vt,Object(r["g"])("a",{href:"#",onClick:e[12]||(e[12]=Object(r["x"])((function(e){return t.$store.commit("updateSettings",{borders:!0})}),["prevent"]))},"turn on"),mt]))])):Object(r["d"])("",!0)])])],64)):Object(r["d"])("",!0)],64)})),yt=(n("4160"),n("d81d"),n("13d5"),n("159b"),{data:function(){return{boardIndex:0,dragIndex:null,dropTarget:null}},computed:{settings:function(){return this.$store.state.settings},wood:function(){return this.$store.state.wood},boards:function(){return this.$store.state.boards},currentBoard:function(){return this.boardIndex>=0&&this.boardIndexr)&&(r=a)})),e==r)return null;var i="Your board are not of equal width. The current board is "+Y.display(n,this.settings.units)+" ";return i+=nt?e:t}),0)}},methods:{parseFloatDef:function(t){var e=parseFloat(t);return Object.is(e,NaN)?0:e},previousBoard:function(){this.boardIndex>0&&this.boardIndex--},nextBoard:function(){this.boardIndex=this.boards.length&&(this.boardIndex=this.boards.length-1))},addLayer:function(){this.$store.commit("addLayer",this.boardIndex)},removeLayer:function(t){this.$store.commit("removeLayer",{board:this.boardIndex,layer:t})},startDrag:function(t){var e=this,n=this;n.dragIndex=t,n.dropTarget=t;var r,i=function(t){n.dropTarget=n.getTargetLayer(t.pageY)};r=function(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",r),n.dragIndex!==n.dropTarget&&n.$store.commit("moveLayer",{board:e.boardIndex,from:n.dragIndex,to:n.dropTarget}),n.dropTarget=null,n.dragIndex=null},document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)},getTargetLayer:function(t){if(null===this.currentBoard||0==this.currentBoard.layers.length)return null;var e=this.getPageOffsetRect(this.$refs.layer0),n=this.getPageOffsetRect(this.$refs["layer"+(this.currentBoard.layers.length-1)]);if(t<=e.bottom)return 0;if(t>=n.bottom)return this.currentBoard.layers.length;if(t>=n.top)return this.currentBoard.layers.length-1;if(null!==this.dropTarget&&this.dropTarget>0&&this.dropTarget=r.top&&t=o.top&&t1?(Object(r["k"])(),Object(r["c"])("div",St,"Click and drag strips to reorder them. Click once to reverse the direction.")):Object(r["d"])("",!0),(Object(r["k"])(),Object(r["c"])("svg",{width:a.viewportWidth,height:a.viewportHeight,viewBox:a.viewBox,class:{dragging:null!==o.dropTarget}},[Object(r["g"])("defs",null,[(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.boards,(function(t,e){return Object(r["k"])(),Object(r["c"])("g",{id:"strip"+e},[(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(t.layers,(function(e,n){return Object(r["k"])(),Object(r["c"])("rect",{width:a.toPixels(t.thickness),height:a.toPixels(e.width),x:"0",y:a.getBoardLayerOffset(t,n),style:a.getBoardLayerStyle(t,n)},null,12,["width","height","y"])})),256))],8,["id"])})),256)),Object(r["g"])("g",At,[Object(r["g"])("line",{x1:"0",y1:"0",x2:"0",y2:a.boardPixelHeight,style:{stroke:"white","stroke-width":"2"}},null,8,["y2"])])]),(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.endGrain,(function(t,e){return Object(r["k"])(),Object(r["c"])("use",{ref:"strip"+e,href:"#strip"+t.board,x:a.getLayerOffset(e),y:"0",transform:a.getLayerTransform(e),onMousedown:Object(r["x"])((function(t){return a.mouseDown(e,t)}),["prevent"])},null,40,["href","x","transform","onMousedown"])})),256)),null!==o.dropTarget?(Object(r["k"])(),Object(r["c"])("use",{key:0,href:"#dropTarget",x:a.getLayerOffset(o.dropTarget)},null,8,["x"])):Object(r["d"])("",!0)],10,["width","height","viewBox"]))])})),Ut=(n("a9e3"),{props:{scale:Number},data:function(){return{dragIndex:null,dropTarget:null}},computed:{settings:function(){return this.$store.state.settings},boards:function(){return this.$store.state.boards},wood:function(){return this.$store.state.wood},endGrain:function(){return this.$store.state.endGrain},boardWidth:function(){var t=this;return this.endGrain.map((function(e){return e.board>=0&&e.boardt?e:t}),0)},boardPixelWidth:function(){return this.toPixels(this.boardWidth)},boardPixelHeight:function(){return this.toPixels(this.boardHeight)},viewportWidth:function(){return Math.floor(this.boardPixelWidth*this.scale)},viewportHeight:function(){return Math.floor(this.boardPixelHeight*this.scale)},viewBox:function(){return"0 0 "+this.boardPixelWidth+" "+this.boardPixelHeight}},methods:{toPixels:function(t){return Y.toPixels(t,this.settings.units)},display:function(t){return Y.display(t,this.settings.units)},getBoardLayerOffset:function(t,e){if(e<0||e>=t.layers.length)return 0;for(var n=0,r=0;r=t.layers.length)return"fill: fuchsia";var n=t.layers[e].wood;if(n<0||n>=this.wood.length)return"";var r=this.settings.borders?"; stroke-width: 1; stroke: black":"";return"fill: "+this.wood[n].color+r},getLayerOffset:function(t){if(t<0||t>this.endGrain.length)return 0;for(var e=0,n=0;n=0&&r=0&&t=this.endGrain.length||(this.endGrain[t].reversed=!this.endGrain[t].reversed))},mouseDown:function(t,e){var n,r=this,i=e.pageX,o=!1,a=function(e){o||Math.abs(e.pageX-i)>=5&&(r.dragIndex=t,o=!0),o&&(r.dropTarget=r.getTargetStrip(e.pageX))};n=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",n),o?(r.dragIndex!==r.dropTarget&&r.$store.commit("moveEndgrain",{from:r.dragIndex,to:r.dropTarget}),r.dropTarget=null,r.dragIndex=null):r.reverseLayer(t)},document.addEventListener("mousemove",a),document.addEventListener("mouseup",n)},getTargetStrip:function(t){if(0==this.endGrain.length)return null;var e=this.getPageOffsetRect(this.$refs.strip0),n=this.getPageOffsetRect(this.$refs["strip"+(this.endGrain.length-1)]);if(t<=e.right)return 0;if(t>=n.right)return this.endGrain.length;if(t>=n.left)return this.endGrain.length-1;if(null!==this.dropTarget&&this.dropTarget>0&&this.dropTarget=r.left&&t=o.left&&t=this.layers.length)return 0;for(var e=0,n=0;n=this.layers.length)return"fill: fuchsia";var e=this.layers[t].wood;if(e<0||e>=this.wood.length)return"";var n=this.settings.borders?"; stroke-width: 1; stroke: black":"";return"fill: "+this.wood[e].color+n}}};n("6dfb");Nt.render=Rt,Nt.__scopeId="data-v-a5fd011a";var Vt=Nt,zt=Object(r["y"])("data-v-30665a8d");Object(r["m"])("data-v-30665a8d");var Xt={class:"list"},Yt=Object(r["g"])("tr",null,[Object(r["g"])("th",null,"Layer"),Object(r["g"])("th",null,"Wood species"),Object(r["g"])("th",{class:"dimension"},"Width")],-1),Jt={key:0,class:"board"},Qt={colspan:"3"},Zt={class:"dimension"},te=Object(r["g"])("h2",null,"Bill of materials",-1),ee={class:"list"},ne=Object(r["g"])("tr",null,[Object(r["g"])("th",null,"Wood species"),Object(r["g"])("th",{class:"dimension"},"Length"),Object(r["g"])("th",{class:"dimension"},"Width"),Object(r["g"])("th",{class:"dimension"},"Thickness")],-1),re={key:0,class:"board"},ie={colspan:"3"},oe={class:"dimension"},ae={class:"dimension"},se={class:"dimension"};Object(r["l"])();var ce=zt((function(t,e,n,i,o,a){return Object(r["k"])(),Object(r["c"])(r["a"],null,[Object(r["g"])("table",Xt,[Yt,(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.boards,(function(t,e){return Object(r["k"])(),Object(r["c"])(r["a"],null,[a.boards.length>1?(Object(r["k"])(),Object(r["c"])("tr",Jt,[Object(r["g"])("td",Qt,"Board "+Object(r["q"])(e+1),1)])):Object(r["d"])("",!0),(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(t.layers,(function(e,n){return Object(r["k"])(),Object(r["c"])("tr",null,[Object(r["g"])("td",null,Object(r["q"])(n+1),1),Object(r["g"])("td",null,Object(r["q"])(a.getLayerWood(t,n)),1),Object(r["g"])("td",Zt,Object(r["q"])(a.getLayerWidth(t,n)),1)])})),256))],64)})),256))]),te,Object(r["g"])("table",ee,[ne,(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.bom,(function(t,e){return Object(r["k"])(),Object(r["c"])(r["a"],null,[a.bom.length>1?(Object(r["k"])(),Object(r["c"])("tr",re,[Object(r["g"])("td",ie,"Board "+Object(r["q"])(e+1),1)])):Object(r["d"])("",!0),(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(t,(function(t){return Object(r["k"])(),Object(r["c"])("tr",null,[Object(r["g"])("td",null,Object(r["q"])(t.woodName),1),Object(r["g"])("td",oe,Object(r["q"])(a.display(t.length)),1),Object(r["g"])("td",ae,Object(r["q"])(a.display(t.width)),1),Object(r["g"])("td",se,Object(r["q"])(a.display(t.thickness)),1)])})),256))],64)})),256))])],64)})),de={computed:{settings:function(){return this.$store.state.settings},boards:function(){return this.$store.state.boards},wood:function(){return this.$store.state.wood},bom:function(){var t=this;return t.boards.map((function(e,n){var r=[],i={};for(var o in e.layers.forEach((function(e){i.hasOwnProperty(e.wood)?i[e.wood]+=e.width+t.settings.bladeKerf:i[e.wood]=e.width})),i)i.hasOwnProperty(o)&&r.push({board:n,woodName:o>=0&&o=t.layers.length)return"";var n=t.layers[e].wood;return n<0||n>=this.wood.length?"":this.wood[n].name},getLayerWidth:function(t,e){return e<0||e>=t.layers.length?"":this.display(t.layers[e].width)},display:function(t){return Y.display(t,this.settings.units)}}};n("978e");de.render=ce,de.__scopeId="data-v-30665a8d";var le=de,ue=n("21a6"),be=(n("c975"),n("d3b7"),n("5cc6"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]),he=[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];function ge(t){if(t>=he.length)throw new Error("Unable to parse base64 string.");var e=he[t];if(255===e)throw new Error("Unable to parse base64 string.");return e}function fe(t){var e,n="",r=t.length;for(e=2;e>2],n+=be[(3&t[e-2])<<4|t[e-1]>>4],n+=be[(15&t[e-1])<<2|t[e]>>6],n+=be[63&t[e]];return e===r+1&&(n+=be[t[e-2]>>2],n+=be[(3&t[e-2])<<4],n+="=="),e===r&&(n+=be[t[e-2]>>2],n+=be[(3&t[e-2])<<4|t[e-1]>>4],n+=be[(15&t[e-1])<<2],n+="="),n}function Oe(t){if(t.length%4!==0)throw new Error("Unable to parse base64 string.");var e=t.indexOf("=");if(-1!==e&&e>16,o[s+1]=n>>8&255,o[s+2]=255&n;return o.subarray(0,o.length-r)}var pe={name:"App",components:{EndGrainPreview:_t,EdgeGrainPreview:Vt,Settings:Q,Layers:kt,Wood:It,CuttingList:le},data:function(){return{tab:"settings",saveFilename:"My cutting board",printEdgeGrain:!0,printEndGrain:!0,printCuttingList:!0}},created:function(){var t=this,e=function(){if(location.hash){var e=location.hash.substring(1);try{var n=Oe(e);n&&t.$store.commit("loadMsgPack",n)}catch(r){console.error(r)}}};e(),window.addEventListener("hashchange",(function(){e()}))},computed:{boards:function(){return this.$store.state.boards},hash:function(){return fe(this.$store.getters.saveMsgPack)}},methods:{save:function(){var t=this.$store.getters.save,e=new Blob([t],{type:"text/plain; charset=utf-8"});Object(ue["saveAs"])(e,this.saveFilename+".json")},load:function(){var t=this,e=this.$refs.loadFile.files[0];if(e){this.saveFilename=e.name.toLowerCase().endsWith(".json")?e.name.substring(0,e.name.length-5):e.name;var n=new FileReader;n.addEventListener("load",(function(e){t.$store.commit("load",e.target.result)})),n.readAsBinaryString(e)}},print:function(){window.print()}},watch:{hash:function(t){history.replaceState({},"","#"+t)}}};n("6dc0"),n("20ec");pe.render=$,pe.__scopeId="data-v-5bc914fd";var je=pe,ve=(n("a434"),n("ddb0"),n("5502")),me={mm:"mm",cm:"cm",inchdecimal:"inchdecimal",isValid:function(t){switch(t){case me.mm:case me.cm:case me.inchdecimal:return!0;default:return!1}}},we={uniform:"uniform",alternate:"alternate",custom:"custom",isValid:function(t){switch(t){case we.uniform:case we.alternate:case we.custom:return t;default:return we.uniform}}},ye=n("d8b3");function ke(){return{units:me.cm,borders:!1,bladeKerf:.35,crosscutWidth:3,direction:we.uniform}}function xe(){return[{name:"Walnut",color:"#58443f"},{name:"Maple",color:"#f2e0aa"},{name:"Cherry",color:"#bb8359"},{name:"Mahogany",color:"#98473f"},{name:"Yellowheart",color:"#ffff84"},{name:"White oak",color:"#fdf4b9"},{name:"Bubinga",color:"#7e3c34"},{name:"Jatoba",color:"#9b281c"},{name:"Padouk",color:"#933350"}]}function Pe(){return[{thickness:2,length:70,layers:[{wood:8,width:1},{wood:1,width:1.5},{wood:8,width:2},{wood:1,width:2},{wood:8,width:15},{wood:1,width:2},{wood:8,width:1.5},{wood:1,width:1}]}]}function Le(){var t=ke(),e=Pe(),n=[];return Ce(n,t,e),n}var Be=Object(ve["a"])({state:{settings:ke(),wood:xe(),boards:Pe(),endGrain:Le()},mutations:{addLayer:function(t,e){e<0||e>=t.boards.length||t.boards[e].layers.push({wood:0,width:Y.fromMillimeters(20,t.settings.units)})},removeLayer:function(t,e){if(!(e.board<0||e.board>=t.boards.length)){var n=t.boards[e.board];e.layer<0||e.layer>=n.layers.length||n.layers.splice(e.layer,1)}},moveLayer:function(t,e){if(!(e.board<0||e.board>=t.boards.length)){var n=t.boards[e.board];We(n.layers,e.from,e.to)}},addWood:function(t){t.wood.push({name:"Wood #"+(t.wood.length+1),color:"#f2e0aa"})},removeWood:function(t,e){e<0||e>=t.wood.length||(t.boards.forEach((function(t){t.layers.forEach((function(t){t.wood===e?t.wood=-1:t.wood>e&&t.wood--}))})),t.wood.splice(e,1))},updateSettings:function(t,e){var n=t.settings.units;Ge(e,t.settings),n!==t.settings.units&&(t.settings.bladeKerf=Y.limitDecimals(Y.convert(t.settings.bladeKerf,n,t.settings.units),3),t.settings.crosscutWidth=Y.limitDecimals(Y.convert(t.settings.crosscutWidth,n,t.settings.units),3),t.boards.forEach((function(e){e.thickness=Y.limitDecimals(Y.convert(e.thickness,n,t.settings.units),3),e.length=Y.limitDecimals(Y.convert(e.length,n,t.settings.units),3),e.layers.forEach((function(e){e.width=Y.limitDecimals(Y.convert(e.width,n,t.settings.units),3)}))})))},addBoard:function(t,e){if(e<0||e>=t.boards.length)t.boards.push({thickness:2,length:70,layers:[]});else{var n=t.boards[e];t.boards.push({thickness:n.thickness,length:n.length,layers:n.layers.map((function(t){return{wood:t.wood,width:t.width}}))}),Ce(t.endGrain,t.settings,t.boards)}},removeBoard:function(t,e){e<0||e>=t.boards.length||(t.boards.splice(e,1),t.endGrain.forEach((function(t){t.board==e?t.board=-1:t.board>e&&t.board--})),Ce(t.endGrain,t.settings,t.boards))},updateBoard:function(t,e){if(!(e.board<0||e.board>=t.boards.length)){var n=t.boards[e.board],r=n.length;Ge(e.values,n),r!==n.length&&Ce(t.endGrain,t.settings,t.boards)}},moveEndgrain:function(t,e){We(t.endGrain,e.from,e.to)},load:function(t,e){var n=JSON.parse(e);Ie(t,n)},loadMsgPack:function(t,e){try{var n=Object(ye["deserialize"])(e);n&&Ie(t,n)}catch(r){console.error(r)}}},getters:{save:function(t){var e=De(t,!1);return JSON.stringify(e)},saveMsgPack:function(t){var e=De(t,!0);return Object(ye["serialize"])(e)}}});function We(t,e,n){if(!(e<0||e>=t.length)&&!(n<0||n>t.length))if(n==t.length)t.push(t[e]),t.splice(e,1);else{var r=t[e];t.splice(e,1),n>e&&n--,t.splice(n,0,r)}}function Ce(t,e,n){for(var r=[],i=0;i=0&&t.board=o,i&&(r[t.board]-=o)),i||a.push(e)}));for(var s=a.length-1;s>=0;s--)t.splice(a[s],1);r.forEach((function(e,n){while(e>=o)t.push({board:n,reversed:!1}),e-=o,e=Y.limitDecimals(e,3)}))}function Ge(t,e){for(var n in t)t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(e[n]=t[n])}function Ee(t){var e=parseFloat(t);return isNaN(e)?0:e}function Te(t){var e=parseInt(t);return isNaN(e)?0:e}function Ie(t,e){var n=_e(e);Ge(n.settings,t.settings),t.wood=n.wood,t.boards=n.boards,t.endGrain=n.endGrain,Ce(t.endGrain,t.settings,t.boards)}var $e={settings:{self:"settings",units:"units",borders:"borders",bladeKerf:"bladeKerf",crosscutWidth:"crosscutWidth",direction:"direction"},wood:{self:"wood",name:"name",color:"color"},boards:{self:"boards",thickness:"thickness",length:"length",layers:{self:"layers",wood:"wood",width:"width"}},endGrain:{self:"endGrain",board:"board",reversed:"reversed"}},Me={settings:{self:"s",units:"u",borders:"b",bladeKerf:"k",crosscutWidth:"c",direction:"d"},wood:{self:"w",name:"n",color:"c"},boards:{self:"b",thickness:"t",length:"x",layers:{self:"l",wood:"w",width:"x"}},endGrain:{self:"e",board:"b",reversed:"r"}};function De(t,e){var n=e?Me:$e,r={};return r[n.settings.self]=Se(t.settings,n),r[n.wood.self]=Ae(t.wood,n),r[n.boards.self]=qe(t.boards,n),r[n.endGrain.self]=Ue(t.endGrain,n),r}function Se(t,e){var n={};return n[e.settings.units]=t.units,n[e.settings.borders]=t.borders,n[e.settings.bladeKerf]=t.bladeKerf,n[e.settings.crosscutWidth]=t.crosscutWidth,n[e.settings.direction]=t.direction,n}function Ae(t,e){return 0===t.length?[]:t.map((function(t){var n={};return n[e.wood.name]=t.name,n[e.wood.color]=t.color,n}))}function qe(t,e){return t.map((function(t){var n={};return n[e.boards.length]=t.length,n[e.boards.thickness]=t.thickness,n[e.boards.layers.self]=t.layers.map((function(t){var n={};return n[e.boards.layers.wood]=t.wood,n[e.boards.layers.width]=t.width,n})),n}))}function Ue(t,e){return t.map((function(t){var n={};return n[e.endGrain.board]=t.board,n[e.endGrain.reversed]=t.reversed,n}))}function _e(t){var e=t.hasOwnProperty(Me.settings.self)?Me:$e,n={settings:Fe(t,e),wood:He(t,e),boards:Ke(t,e),endGrain:Re(t,e)};return t.hasOwnProperty("settings")&&(t.settings.hasOwnProperty("alternateDirection")&&(n.settings.direction=t.settings.alternateDirection?we.alternate:we.uniform),t.settings.hasOwnProperty("boardLength")&&(n.boards[0].length=Ee(t.settings.boardLength)),t.settings.hasOwnProperty("boardThickness")&&(n.boards[0].thickness=Ee(t.settings.boardThickness))),0===n.endGrain.length&&Ce(n.endGrain,n.settings,n.boards),n}function Fe(t,e){if(!t.hasOwnProperty(e.settings.self))return ke();var n=t[e.settings.self];return{units:me.isValid(n[e.settings.units])?n[e.settings.units]:me.cm,borders:!0===n[e.settings.borders],bladeKerf:Ee(n[e.settings.bladeKerf]),crosscutWidth:Ee(n[e.settings.crosscutWidth]),direction:we.isValid(n[e.settings.direction])?n[e.settings.direction]:we.uniform}}function He(t,e){return t.hasOwnProperty(e.wood.self)&&Array.isArray(t[e.wood.self])?t[e.wood.self].map((function(t){return{name:t[e.wood.name],color:/^#[0-9A-F]{6}$/i.test(t[e.wood.color]||"")?t[e.wood.color]:"#000000"}})):[]}function Ke(t,e){if(!t.hasOwnProperty(e.boards.self)||!Array.isArray(t[e.boards.self]))return[];var n=t[e.boards.self].map((function(t){var n={thickness:Ee(t[e.boards.thickness]),length:Ee(t[e.boards.length]),layers:[]};return t.hasOwnProperty(e.boards.layers.self)&&Array.isArray(t[e.boards.layers.self])&&(n.layers=t[e.boards.layers.self].map((function(t){return{wood:Te(t[e.boards.layers.wood]),width:Ee(t[e.boards.layers.width])}}))),n}));return n.length>0?n:{length:0,thickness:0,layers:[]}}function Re(t,e){return t.hasOwnProperty(e.endGrain.self)&&Array.isArray(t[e.endGrain.self])?t[e.endGrain.self].map((function(t){return{board:Te(t[e.endGrain.board]),reversed:!0===t[e.endGrain.reversed]}})):[]}var Ne=n("ecee"),Ve=n("c074"),ze=n("ad3d");Ne["c"].add(Ve["e"],Ve["b"],Ve["d"],Ve["c"],Ve["a"],Ve["f"]),Object(r["b"])(je).use(Be).component("font-awesome-icon",ze["a"]).mount("#app")},"6dc0":function(t,e,n){"use strict";n("43c8")},"6dfb":function(t,e,n){"use strict";n("1cce")},"8b67":function(t,e,n){"use strict";n("c355")},9279:function(t,e,n){"use strict";n("d7cc")},"978e":function(t,e,n){"use strict";n("bfd1")},"9e1e":function(t,e,n){},bfd1:function(t,e,n){},c355:function(t,e,n){},d106:function(t,e,n){},d7cc:function(t,e,n){},e909:function(t,e,n){"use strict";n("d106")},e9ae:function(t,e,n){"use strict";n("9e1e")},f248:function(t,e,n){}}); -//# sourceMappingURL=app.74d85d0a.js.map \ No newline at end of file +(function(t){function e(e){for(var r,a,s=e[0],c=e[1],d=e[2],u=0,b=[];u1?(Object(r["k"])(),Object(r["c"])("h2",T,"Board "+Object(r["q"])(e+1),1)):Object(r["d"])("",!0),Object(r["g"])(_,{board:t,scale:1},null,8,["board"])],64)})),256))],2),Object(r["g"])("div",{class:{hideOnPrint:!$.printCuttingList}},[I,Object(r["g"])(F)],2)])],64)})),M=(n("b0c0"),n("8a79"),Object(r["y"])("data-v-7067c7c7"));Object(r["m"])("data-v-7067c7c7");var D={class:"settings"},S=Object(r["g"])("h2",null,"Designer",-1),A=Object(r["g"])("label",{for:"units"},"Units",-1),q=Object(r["g"])("option",{value:"mm"},"Millimeters",-1),U=Object(r["g"])("option",{value:"cm"},"Centimeters",-1),_=Object(r["g"])("option",{value:"inchdecimal"},"Inches (decimal)",-1),F=Object(r["g"])("h2",null,"Tools",-1),H=Object(r["g"])("label",{for:"bladeKerf"},"Blade kerf",-1),K=Object(r["g"])("h2",null,"End grain",-1),R=Object(r["g"])("label",{for:"crosscutWidth"},"Crosscut width",-1);Object(r["l"])();var N=M((function(t,e,n,i,o,a){return Object(r["k"])(),Object(r["c"])("div",D,[S,A,Object(r["g"])("select",{id:"units",value:a.settings.units,onChange:e[1]||(e[1]=function(e){return t.$store.commit("updateSettings",{units:e.target.value})})},[q,U,_],40,["value"]),F,H,Object(r["g"])("input",{id:"bladeKerf",type:"number",value:a.settings.bladeKerf,onChange:e[2]||(e[2]=function(e){return t.$store.commit("updateSettings",{bladeKerf:a.parseFloatDef(e.target.value)})})},null,40,["value"]),K,R,Object(r["g"])("input",{id:"crosscutWidth",type:"number",value:a.settings.crosscutWidth,onChange:e[3]||(e[3]=function(e){return t.$store.commit("updateSettings",{crosscutWidth:a.parseFloatDef(e.target.value)})})},null,40,["value"])])})),V=(n("2b19"),25.4),z=10,X=1,Y={convert:function(t,e,n){var r=this.toMillimeters(t,e);return this.fromMillimeters(r,n)},toPixels:function(t,e){return Math.ceil(this.toMillimeters(t,e)*X)},toMillimeters:function(t,e){switch(e){case"mm":return t;case"cm":return t*z;case"inchdecimal":return t*V}return console.error("Invalid units type: "+e),0},fromMillimeters:function(t,e){switch(e){case"mm":return t;case"cm":return t/z;case"inchdecimal":return t/V}return console.error("Invalid units type: "+e),0},display:function(t,e){var n=this.limitDecimals(t,3);switch(e){case"mm":return n+" mm";case"cm":return n+" cm";case"inchdecimal":return n+" inch"}return console.error("Invalid units type: "+e),n},limitDecimals:function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}},J={computed:{settings:function(){return this.$store.state.settings}},methods:{parseFloatDef:function(t){var e=parseFloat(t);return Object.is(e,NaN)?0:e}}};n("e9ae");J.render=N,J.__scopeId="data-v-7067c7c7";var Q=J,Z=Object(r["y"])("data-v-01187e40");Object(r["m"])("data-v-01187e40");var tt={class:"board"},et={class:"name"},nt={class:"boardsettings"},rt=Object(r["g"])("label",{for:"boardLength"},"Board length",-1),it=Object(r["g"])("label",{for:"boardThickness"},"Board thickness",-1),ot={class:"layers"},at=Object(r["e"])('
Tip: click and drag the layer number to move a layer
 Wood speciesWidth ',5),st={class:"remove"},ct={key:0,class:"widthwarning"},dt={class:"add"},lt=Object(r["g"])("h2",null,"Preview settings",-1),ut=Object(r["g"])("label",{for:"borders"}," Show borders",-1),bt=Object(r["g"])("h2",null,"End grain layer direction",-1),ht=Object(r["g"])("label",{for:"directionUniform"}," Uniform",-1),gt=Object(r["g"])("label",{for:"directionAlternate"}," Alternate",-1),ft=Object(r["g"])("label",{for:"directionCustom"}," Custom",-1),Ot={key:0},pt=Object(r["f"])(" Click the strips in the preview to reverse their direction. "),jt={key:0},vt=Object(r["f"])("This may be easier if you "),mt=Object(r["f"])(" the 'Show borders' setting.");Object(r["l"])();var wt=Z((function(t,e,n,i,o,a){return Object(r["k"])(),Object(r["c"])(r["a"],null,[Object(r["g"])("div",tt,[Object(r["g"])("button",{onClick:e[1]||(e[1]=function(){return a.previousBoard&&a.previousBoard.apply(a,arguments)}),disabled:0==o.boardIndex},"<",8,["disabled"]),Object(r["g"])("div",et,"Board "+Object(r["q"])(o.boardIndex+1)+" of "+Object(r["q"])(a.boards.length),1),a.boards.length>1?(Object(r["k"])(),Object(r["c"])("button",{key:0,onClick:e[2]||(e[2]=function(){return a.removeBoard&&a.removeBoard.apply(a,arguments)})},"Remove")):Object(r["d"])("",!0),Object(r["g"])("button",{onClick:e[3]||(e[3]=function(){return a.addBoard&&a.addBoard.apply(a,arguments)})},"Add"),Object(r["g"])("button",{onClick:e[4]||(e[4]=function(){return a.nextBoard&&a.nextBoard.apply(a,arguments)}),disabled:o.boardIndex==a.boards.length-1},">",8,["disabled"])]),null!==a.currentBoard?(Object(r["k"])(),Object(r["c"])(r["a"],{key:0},[Object(r["g"])("div",nt,[rt,Object(r["g"])("input",{id:"boardLength",type:"number",value:a.currentBoard.length,onChange:e[5]||(e[5]=function(e){return t.$store.commit("updateBoard",{board:o.boardIndex,values:{length:a.parseFloatDef(e.target.value)}})})},null,40,["value"]),it,Object(r["g"])("input",{id:"boardThickness",type:"number",value:a.currentBoard.thickness,onChange:e[6]||(e[6]=function(e){return t.$store.commit("updateBoard",{board:o.boardIndex,values:{thickness:a.parseFloatDef(e.target.value)}})})},null,40,["value"])]),Object(r["g"])("div",ot,[at,(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.currentBoard.layers,(function(t,e){return Object(r["k"])(),Object(r["c"])(r["a"],null,[Object(r["g"])("div",{class:["index",{dropTargetAbove:o.dropTarget===e,dropTargetBelow:o.dropTarget===a.currentBoard.layers.length&&e===a.currentBoard.layers.length-1}],ref:"layer"+e,onMousedown:Object(r["x"])((function(t){return a.startDrag(e)}),["prevent"])},Object(r["q"])(e+1),43,["onMousedown"]),Object(r["w"])(Object(r["g"])("select",{"onUpdate:modelValue":function(e){return t.wood=e},class:"wood"},[(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.wood,(function(t,e){return Object(r["k"])(),Object(r["c"])("option",{value:e},Object(r["q"])(t.name),9,["value"])})),256))],8,["onUpdate:modelValue"]),[[r["s"],t.wood]]),Object(r["g"])("input",{type:"number",class:"width",value:t.width,onInput:function(e){return t.width=a.parseFloatDef(e.target.value)}},null,40,["value","onInput"]),Object(r["g"])("div",st,[Object(r["g"])("button",{onClick:function(t){return a.removeLayer(e)}},"X",8,["onClick"])])],64)})),256)),null!==a.widthWarning?(Object(r["k"])(),Object(r["c"])("div",ct,Object(r["q"])(a.widthWarning),1)):Object(r["d"])("",!0),Object(r["g"])("div",dt,[Object(r["g"])("button",{onClick:e[7]||(e[7]=function(t){return a.addLayer()})},"Add layer")])]),Object(r["g"])("div",null,[lt,Object(r["g"])("input",{id:"borders",type:"checkbox",checked:a.settings.borders,onChange:e[8]||(e[8]=function(e){return t.$store.commit("updateSettings",{borders:e.target.checked})})},null,40,["checked"]),ut]),Object(r["g"])("div",null,[bt,Object(r["g"])("div",null,[Object(r["g"])("input",{id:"directionUniform",type:"radio",checked:"uniform"===a.settings.direction,onChange:e[9]||(e[9]=function(t){return a.setDirection(t,"uniform")})},null,40,["checked"]),ht]),Object(r["g"])("div",null,[Object(r["g"])("input",{id:"directionAlternate",type:"radio",checked:"alternate"===a.settings.direction,onChange:e[10]||(e[10]=function(t){return a.setDirection(t,"alternate")})},null,40,["checked"]),gt]),Object(r["g"])("div",null,[Object(r["g"])("input",{id:"directionCustom",type:"radio",checked:"custom"===a.settings.direction,onChange:e[11]||(e[11]=function(t){return a.setDirection(t,"custom")})},null,40,["checked"]),ft,"custom"===a.settings.direction?(Object(r["k"])(),Object(r["c"])("p",Ot,[pt,a.settings.borders?Object(r["d"])("",!0):(Object(r["k"])(),Object(r["c"])("span",jt,[vt,Object(r["g"])("a",{href:"#",onClick:e[12]||(e[12]=Object(r["x"])((function(e){return t.$store.commit("updateSettings",{borders:!0})}),["prevent"]))},"turn on"),mt]))])):Object(r["d"])("",!0)])])],64)):Object(r["d"])("",!0)],64)})),yt=(n("4160"),n("d81d"),n("13d5"),n("159b"),{data:function(){return{boardIndex:0,dragIndex:null,dropTarget:null}},computed:{settings:function(){return this.$store.state.settings},wood:function(){return this.$store.state.wood},boards:function(){return this.$store.state.boards},currentBoard:function(){return this.boardIndex>=0&&this.boardIndexr)&&(r=a)})),e==r)return null;var i="Your board are not of equal width. The current board is "+Y.display(n,this.settings.units)+" ";return i+=nt?e:t}),0)}},methods:{parseFloatDef:function(t){var e=parseFloat(t);return Object.is(e,NaN)?0:e},previousBoard:function(){this.boardIndex>0&&this.boardIndex--},nextBoard:function(){this.boardIndex=this.boards.length&&(this.boardIndex=this.boards.length-1))},addLayer:function(){this.$store.commit("addLayer",this.boardIndex)},removeLayer:function(t){this.$store.commit("removeLayer",{board:this.boardIndex,layer:t})},startDrag:function(t){var e=this,n=this;n.dragIndex=t,n.dropTarget=t;var r,i=function(t){n.dropTarget=n.getTargetLayer(t.pageY)};r=function(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",r),n.dragIndex!==n.dropTarget&&n.$store.commit("moveLayer",{board:e.boardIndex,from:n.dragIndex,to:n.dropTarget}),n.dropTarget=null,n.dragIndex=null},document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)},getTargetLayer:function(t){if(null===this.currentBoard||0==this.currentBoard.layers.length)return null;var e=this.getPageOffsetRect(this.$refs.layer0),n=this.getPageOffsetRect(this.$refs["layer"+(this.currentBoard.layers.length-1)]);if(t<=e.bottom)return 0;if(t>=n.bottom)return this.currentBoard.layers.length;if(t>=n.top)return this.currentBoard.layers.length-1;if(null!==this.dropTarget&&this.dropTarget>0&&this.dropTarget=r.top&&t=o.top&&t1?(Object(r["k"])(),Object(r["c"])("div",St,"Click and drag strips to reorder them. Click once to reverse the direction.")):Object(r["d"])("",!0),(Object(r["k"])(),Object(r["c"])("svg",{width:a.viewportWidth,height:a.viewportHeight,viewBox:a.viewBox,class:{dragging:null!==o.dropTarget}},[Object(r["g"])("defs",null,[(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.boards,(function(t,e){return Object(r["k"])(),Object(r["c"])("g",{id:"strip"+e},[(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(t.layers,(function(e,n){return Object(r["k"])(),Object(r["c"])("rect",{width:a.toPixels(t.thickness),height:a.toPixels(e.width),x:"0",y:a.getBoardLayerOffset(t,n),style:a.getBoardLayerStyle(t,n)},null,12,["width","height","y"])})),256))],8,["id"])})),256)),Object(r["g"])("g",At,[Object(r["g"])("line",{x1:"0",y1:"0",x2:"0",y2:a.boardPixelHeight,style:{stroke:"white","stroke-width":"2"}},null,8,["y2"])])]),(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.endGrain,(function(t,e){return Object(r["k"])(),Object(r["c"])("use",{ref:"strip"+e,href:"#strip"+t.board,x:a.getLayerOffset(e),y:"0",transform:a.getLayerTransform(e),onMousedown:Object(r["x"])((function(t){return a.mouseDown(e,t)}),["prevent"])},null,40,["href","x","transform","onMousedown"])})),256)),null!==o.dropTarget?(Object(r["k"])(),Object(r["c"])("use",{key:0,href:"#dropTarget",x:a.getLayerOffset(o.dropTarget)},null,8,["x"])):Object(r["d"])("",!0)],10,["width","height","viewBox"]))])})),Ut=(n("a9e3"),{props:{scale:Number},data:function(){return{dragIndex:null,dropTarget:null}},computed:{settings:function(){return this.$store.state.settings},boards:function(){return this.$store.state.boards},wood:function(){return this.$store.state.wood},endGrain:function(){return this.$store.state.endGrain},boardWidth:function(){var t=this;return this.endGrain.map((function(e){return e.board>=0&&e.boardt?e:t}),0)},boardPixelWidth:function(){return this.toPixels(this.boardWidth)},boardPixelHeight:function(){return this.toPixels(this.boardHeight)},viewportWidth:function(){return Math.floor(this.boardPixelWidth*this.scale)},viewportHeight:function(){return Math.floor(this.boardPixelHeight*this.scale)},viewBox:function(){return"0 0 "+this.boardPixelWidth+" "+this.boardPixelHeight}},methods:{toPixels:function(t){return Y.toPixels(t,this.settings.units)},display:function(t){return Y.display(t,this.settings.units)},getBoardLayerOffset:function(t,e){if(e<0||e>=t.layers.length)return 0;for(var n=0,r=0;r=t.layers.length)return"fill: fuchsia";var n=t.layers[e].wood;if(n<0||n>=this.wood.length)return"";var r=this.settings.borders?"; stroke-width: 1; stroke: black":"";return"fill: "+this.wood[n].color+r},getLayerOffset:function(t){if(t<0||t>this.endGrain.length)return 0;for(var e=0,n=0;n=0&&r=0&&t=this.endGrain.length||(this.endGrain[t].reversed=!this.endGrain[t].reversed))},mouseDown:function(t,e){var n,r=this,i=e.pageX,o=!1,a=function(e){o||Math.abs(e.pageX-i)>=5&&(r.dragIndex=t,o=!0),o&&(r.dropTarget=r.getTargetStrip(e.pageX))};n=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",n),o?(r.dragIndex!==r.dropTarget&&r.$store.commit("moveEndgrain",{from:r.dragIndex,to:r.dropTarget}),r.dropTarget=null,r.dragIndex=null):r.reverseLayer(t)},document.addEventListener("mousemove",a),document.addEventListener("mouseup",n)},getTargetStrip:function(t){if(0==this.endGrain.length)return null;var e=this.getPageOffsetRect(this.$refs.strip0),n=this.getPageOffsetRect(this.$refs["strip"+(this.endGrain.length-1)]);if(t<=e.right)return 0;if(t>=n.right)return this.endGrain.length;if(t>=n.left)return this.endGrain.length-1;if(null!==this.dropTarget&&this.dropTarget>0&&this.dropTarget=r.left&&t=o.left&&t=this.layers.length)return 0;for(var e=0,n=0;n=this.layers.length)return"fill: fuchsia";var e=this.layers[t].wood;if(e<0||e>=this.wood.length)return"";var n=this.settings.borders?"; stroke-width: 1; stroke: black":"";return"fill: "+this.wood[e].color+n}}};n("6dfb");Nt.render=Rt,Nt.__scopeId="data-v-a5fd011a";var Vt=Nt,zt=Object(r["y"])("data-v-30665a8d");Object(r["m"])("data-v-30665a8d");var Xt={class:"list"},Yt=Object(r["g"])("tr",null,[Object(r["g"])("th",null,"Layer"),Object(r["g"])("th",null,"Wood species"),Object(r["g"])("th",{class:"dimension"},"Width")],-1),Jt={key:0,class:"board"},Qt={colspan:"3"},Zt={class:"dimension"},te=Object(r["g"])("h2",null,"Bill of materials",-1),ee={class:"list"},ne=Object(r["g"])("tr",null,[Object(r["g"])("th",null,"Wood species"),Object(r["g"])("th",{class:"dimension"},"Length"),Object(r["g"])("th",{class:"dimension"},"Width"),Object(r["g"])("th",{class:"dimension"},"Thickness")],-1),re={key:0,class:"board"},ie={colspan:"3"},oe={class:"dimension"},ae={class:"dimension"},se={class:"dimension"};Object(r["l"])();var ce=zt((function(t,e,n,i,o,a){return Object(r["k"])(),Object(r["c"])(r["a"],null,[Object(r["g"])("table",Xt,[Yt,(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.boards,(function(t,e){return Object(r["k"])(),Object(r["c"])(r["a"],null,[a.boards.length>1?(Object(r["k"])(),Object(r["c"])("tr",Jt,[Object(r["g"])("td",Qt,"Board "+Object(r["q"])(e+1),1)])):Object(r["d"])("",!0),(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(t.layers,(function(e,n){return Object(r["k"])(),Object(r["c"])("tr",null,[Object(r["g"])("td",null,Object(r["q"])(n+1),1),Object(r["g"])("td",null,Object(r["q"])(a.getLayerWood(t,n)),1),Object(r["g"])("td",Zt,Object(r["q"])(a.getLayerWidth(t,n)),1)])})),256))],64)})),256))]),te,Object(r["g"])("table",ee,[ne,(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(a.bom,(function(t,e){return Object(r["k"])(),Object(r["c"])(r["a"],null,[a.bom.length>1?(Object(r["k"])(),Object(r["c"])("tr",re,[Object(r["g"])("td",ie,"Board "+Object(r["q"])(e+1),1)])):Object(r["d"])("",!0),(Object(r["k"])(!0),Object(r["c"])(r["a"],null,Object(r["o"])(t,(function(t){return Object(r["k"])(),Object(r["c"])("tr",null,[Object(r["g"])("td",null,Object(r["q"])(t.woodName),1),Object(r["g"])("td",oe,Object(r["q"])(a.display(t.length)),1),Object(r["g"])("td",ae,Object(r["q"])(a.display(t.width)),1),Object(r["g"])("td",se,Object(r["q"])(a.display(t.thickness)),1)])})),256))],64)})),256))])],64)})),de={computed:{settings:function(){return this.$store.state.settings},boards:function(){return this.$store.state.boards},wood:function(){return this.$store.state.wood},bom:function(){var t=this;return t.boards.map((function(e,n){var r=[],i={};for(var o in e.layers.forEach((function(e){i.hasOwnProperty(e.wood)?i[e.wood]+=e.width+t.settings.bladeKerf:i[e.wood]=e.width})),i)i.hasOwnProperty(o)&&r.push({board:n,woodName:o>=0&&o=t.layers.length)return"";var n=t.layers[e].wood;return n<0||n>=this.wood.length?"":this.wood[n].name},getLayerWidth:function(t,e){return e<0||e>=t.layers.length?"":this.display(t.layers[e].width)},display:function(t){return Y.display(t,this.settings.units)}}};n("978e");de.render=ce,de.__scopeId="data-v-30665a8d";var le=de,ue=n("21a6"),be=(n("c975"),n("d3b7"),n("5cc6"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]),he=[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];function ge(t){if(t>=he.length)throw new Error("Unable to parse base64 string.");var e=he[t];if(255===e)throw new Error("Unable to parse base64 string.");return e}function fe(t){var e,n="",r=t.length;for(e=2;e>2],n+=be[(3&t[e-2])<<4|t[e-1]>>4],n+=be[(15&t[e-1])<<2|t[e]>>6],n+=be[63&t[e]];return e===r+1&&(n+=be[t[e-2]>>2],n+=be[(3&t[e-2])<<4],n+="=="),e===r&&(n+=be[t[e-2]>>2],n+=be[(3&t[e-2])<<4|t[e-1]>>4],n+=be[(15&t[e-1])<<2],n+="="),n}function Oe(t){if(t.length%4!==0)throw new Error("Unable to parse base64 string.");var e=t.indexOf("=");if(-1!==e&&e>16,o[s+1]=n>>8&255,o[s+2]=255&n;return o.subarray(0,o.length-r)}var pe={name:"App",components:{EndGrainPreview:_t,EdgeGrainPreview:Vt,Settings:Q,Layers:kt,Wood:It,CuttingList:le},data:function(){return{tab:"settings",saveFilename:"My cutting board",printEdgeGrain:!0,printEndGrain:!0,printCuttingList:!0}},created:function(){var t=this,e=function(){if(location.hash){var e=location.hash.substring(1);try{var n=Oe(e);n&&t.$store.commit("loadMsgPack",n)}catch(r){console.error(r)}}};e(),window.addEventListener("hashchange",(function(){e()}))},computed:{boards:function(){return this.$store.state.boards},hash:function(){return fe(this.$store.getters.saveMsgPack)}},methods:{save:function(){var t=this.$store.getters.save,e=new Blob([t],{type:"text/plain; charset=utf-8"});Object(ue["saveAs"])(e,this.saveFilename+".json")},load:function(){var t=this,e=this.$refs.loadFile.files[0];if(e){this.saveFilename=e.name.toLowerCase().endsWith(".json")?e.name.substring(0,e.name.length-5):e.name;var n=new FileReader;n.addEventListener("load",(function(e){t.$store.commit("load",e.target.result)})),n.readAsBinaryString(e)}},print:function(){window.print()}},watch:{hash:function(t){history.replaceState({},"","#"+t)}}};n("6dc0"),n("20ec");pe.render=$,pe.__scopeId="data-v-5bc914fd";var je=pe,ve=(n("a434"),n("ddb0"),n("5502")),me={mm:"mm",cm:"cm",inchdecimal:"inchdecimal",isValid:function(t){switch(t){case me.mm:case me.cm:case me.inchdecimal:return!0;default:return!1}}},we={uniform:"uniform",alternate:"alternate",custom:"custom",isValid:function(t){switch(t){case we.uniform:case we.alternate:case we.custom:return t;default:return we.uniform}}},ye=n("d8b3");function ke(){return{units:me.cm,borders:!1,bladeKerf:.35,crosscutWidth:3,direction:we.alternate}}function xe(){return[{name:"Walnut",color:"#58443f"},{name:"Maple",color:"#f2e0aa"},{name:"Cherry",color:"#bb8359"},{name:"Mahogany",color:"#98473f"},{name:"Yellowheart",color:"#ffff84"},{name:"White oak",color:"#fdf4b9"},{name:"Bubinga",color:"#7e3c34"},{name:"Jatoba",color:"#9b281c"},{name:"Padouk",color:"#933350"}]}function Pe(){return[{thickness:2,length:70,layers:[{wood:8,width:1},{wood:1,width:1.5},{wood:8,width:2},{wood:1,width:2},{wood:8,width:15},{wood:1,width:2},{wood:8,width:1.5},{wood:1,width:1}]}]}function Le(){var t=ke(),e=Pe(),n=[];return Ce(n,t,e),n}var Be=Object(ve["a"])({state:{settings:ke(),wood:xe(),boards:Pe(),endGrain:Le()},mutations:{addLayer:function(t,e){e<0||e>=t.boards.length||t.boards[e].layers.push({wood:0,width:Y.fromMillimeters(20,t.settings.units)})},removeLayer:function(t,e){if(!(e.board<0||e.board>=t.boards.length)){var n=t.boards[e.board];e.layer<0||e.layer>=n.layers.length||n.layers.splice(e.layer,1)}},moveLayer:function(t,e){if(!(e.board<0||e.board>=t.boards.length)){var n=t.boards[e.board];We(n.layers,e.from,e.to)}},addWood:function(t){t.wood.push({name:"Wood #"+(t.wood.length+1),color:"#f2e0aa"})},removeWood:function(t,e){e<0||e>=t.wood.length||(t.boards.forEach((function(t){t.layers.forEach((function(t){t.wood===e?t.wood=-1:t.wood>e&&t.wood--}))})),t.wood.splice(e,1))},updateSettings:function(t,e){var n=t.settings.units;Ge(e,t.settings),n!==t.settings.units&&(t.settings.bladeKerf=Y.limitDecimals(Y.convert(t.settings.bladeKerf,n,t.settings.units),3),t.settings.crosscutWidth=Y.limitDecimals(Y.convert(t.settings.crosscutWidth,n,t.settings.units),3),t.boards.forEach((function(e){e.thickness=Y.limitDecimals(Y.convert(e.thickness,n,t.settings.units),3),e.length=Y.limitDecimals(Y.convert(e.length,n,t.settings.units),3),e.layers.forEach((function(e){e.width=Y.limitDecimals(Y.convert(e.width,n,t.settings.units),3)}))})))},addBoard:function(t,e){if(e<0||e>=t.boards.length)t.boards.push({thickness:2,length:70,layers:[]});else{var n=t.boards[e];t.boards.push({thickness:n.thickness,length:n.length,layers:n.layers.map((function(t){return{wood:t.wood,width:t.width}}))}),Ce(t.endGrain,t.settings,t.boards)}},removeBoard:function(t,e){e<0||e>=t.boards.length||(t.boards.splice(e,1),t.endGrain.forEach((function(t){t.board==e?t.board=-1:t.board>e&&t.board--})),Ce(t.endGrain,t.settings,t.boards))},updateBoard:function(t,e){if(!(e.board<0||e.board>=t.boards.length)){var n=t.boards[e.board],r=n.length;Ge(e.values,n),r!==n.length&&Ce(t.endGrain,t.settings,t.boards)}},moveEndgrain:function(t,e){We(t.endGrain,e.from,e.to)},load:function(t,e){var n=JSON.parse(e);Ie(t,n)},loadMsgPack:function(t,e){try{var n=Object(ye["deserialize"])(e);n&&Ie(t,n)}catch(r){console.error(r)}}},getters:{save:function(t){var e=De(t,!1);return JSON.stringify(e)},saveMsgPack:function(t){var e=De(t,!0);return Object(ye["serialize"])(e)}}});function We(t,e,n){if(!(e<0||e>=t.length)&&!(n<0||n>t.length))if(n==t.length)t.push(t[e]),t.splice(e,1);else{var r=t[e];t.splice(e,1),n>e&&n--,t.splice(n,0,r)}}function Ce(t,e,n){for(var r=[],i=0;i=0&&t.board=o,i&&(r[t.board]-=o)),i||a.push(e)}));for(var s=a.length-1;s>=0;s--)t.splice(a[s],1);r.forEach((function(e,n){while(e>=o)t.push({board:n,reversed:!1}),e-=o,e=Y.limitDecimals(e,3)}))}function Ge(t,e){for(var n in t)t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(e[n]=t[n])}function Ee(t){var e=parseFloat(t);return isNaN(e)?0:e}function Te(t){var e=parseInt(t);return isNaN(e)?0:e}function Ie(t,e){var n=_e(e);Ge(n.settings,t.settings),t.wood=n.wood,t.boards=n.boards,t.endGrain=n.endGrain,Ce(t.endGrain,t.settings,t.boards)}var $e={settings:{self:"settings",units:"units",borders:"borders",bladeKerf:"bladeKerf",crosscutWidth:"crosscutWidth",direction:"direction"},wood:{self:"wood",name:"name",color:"color"},boards:{self:"boards",thickness:"thickness",length:"length",layers:{self:"layers",wood:"wood",width:"width"}},endGrain:{self:"endGrain",board:"board",reversed:"reversed"}},Me={settings:{self:"s",units:"u",borders:"b",bladeKerf:"k",crosscutWidth:"c",direction:"d"},wood:{self:"w",name:"n",color:"c"},boards:{self:"b",thickness:"t",length:"x",layers:{self:"l",wood:"w",width:"x"}},endGrain:{self:"e",board:"b",reversed:"r"}};function De(t,e){var n=e?Me:$e,r={};return r[n.settings.self]=Se(t.settings,n),r[n.wood.self]=Ae(t.wood,n),r[n.boards.self]=qe(t.boards,n),r[n.endGrain.self]=Ue(t.endGrain,n),r}function Se(t,e){var n={};return n[e.settings.units]=t.units,n[e.settings.borders]=t.borders,n[e.settings.bladeKerf]=t.bladeKerf,n[e.settings.crosscutWidth]=t.crosscutWidth,n[e.settings.direction]=t.direction,n}function Ae(t,e){return 0===t.length?[]:t.map((function(t){var n={};return n[e.wood.name]=t.name,n[e.wood.color]=t.color,n}))}function qe(t,e){return t.map((function(t){var n={};return n[e.boards.length]=t.length,n[e.boards.thickness]=t.thickness,n[e.boards.layers.self]=t.layers.map((function(t){var n={};return n[e.boards.layers.wood]=t.wood,n[e.boards.layers.width]=t.width,n})),n}))}function Ue(t,e){return t.map((function(t){var n={};return n[e.endGrain.board]=t.board,n[e.endGrain.reversed]=t.reversed,n}))}function _e(t){var e=t.hasOwnProperty(Me.settings.self)?Me:$e,n={settings:Fe(t,e),wood:He(t,e),boards:Ke(t,e),endGrain:Re(t,e)};return t.hasOwnProperty("settings")&&(t.settings.hasOwnProperty("alternateDirection")&&(n.settings.direction=t.settings.alternateDirection?we.alternate:we.uniform),t.settings.hasOwnProperty("boardLength")&&(n.boards[0].length=Ee(t.settings.boardLength)),t.settings.hasOwnProperty("boardThickness")&&(n.boards[0].thickness=Ee(t.settings.boardThickness))),0===n.endGrain.length&&Ce(n.endGrain,n.settings,n.boards),n}function Fe(t,e){if(!t.hasOwnProperty(e.settings.self))return ke();var n=t[e.settings.self];return{units:me.isValid(n[e.settings.units])?n[e.settings.units]:me.cm,borders:!0===n[e.settings.borders],bladeKerf:Ee(n[e.settings.bladeKerf]),crosscutWidth:Ee(n[e.settings.crosscutWidth]),direction:we.isValid(n[e.settings.direction])?n[e.settings.direction]:we.uniform}}function He(t,e){return t.hasOwnProperty(e.wood.self)&&Array.isArray(t[e.wood.self])?t[e.wood.self].map((function(t){return{name:t[e.wood.name],color:/^#[0-9A-F]{6}$/i.test(t[e.wood.color]||"")?t[e.wood.color]:"#000000"}})):[]}function Ke(t,e){if(!t.hasOwnProperty(e.boards.self)||!Array.isArray(t[e.boards.self]))return[];var n=t[e.boards.self].map((function(t){var n={thickness:Ee(t[e.boards.thickness]),length:Ee(t[e.boards.length]),layers:[]};return t.hasOwnProperty(e.boards.layers.self)&&Array.isArray(t[e.boards.layers.self])&&(n.layers=t[e.boards.layers.self].map((function(t){return{wood:Te(t[e.boards.layers.wood]),width:Ee(t[e.boards.layers.width])}}))),n}));return n.length>0?n:{length:0,thickness:0,layers:[]}}function Re(t,e){return t.hasOwnProperty(e.endGrain.self)&&Array.isArray(t[e.endGrain.self])?t[e.endGrain.self].map((function(t){return{board:Te(t[e.endGrain.board]),reversed:!0===t[e.endGrain.reversed]}})):[]}var Ne=n("ecee"),Ve=n("c074"),ze=n("ad3d");Ne["c"].add(Ve["e"],Ve["b"],Ve["d"],Ve["c"],Ve["a"],Ve["f"]),Object(r["b"])(je).use(Be).component("font-awesome-icon",ze["a"]).mount("#app")},"6dc0":function(t,e,n){"use strict";n("43c8")},"6dfb":function(t,e,n){"use strict";n("1cce")},"8b67":function(t,e,n){"use strict";n("c355")},9279:function(t,e,n){"use strict";n("d7cc")},"978e":function(t,e,n){"use strict";n("bfd1")},"9e1e":function(t,e,n){},bfd1:function(t,e,n){},c355:function(t,e,n){},d106:function(t,e,n){},d7cc:function(t,e,n){},e909:function(t,e,n){"use strict";n("d106")},e9ae:function(t,e,n){"use strict";n("9e1e")},f248:function(t,e,n){}}); +//# sourceMappingURL=app.a1173833.js.map \ No newline at end of file diff --git a/docs/js/app.74d85d0a.js.map b/docs/js/app.a1173833.js.map similarity index 82% rename from docs/js/app.74d85d0a.js.map rename to docs/js/app.a1173833.js.map index b4fc842..ba53b97 100644 --- a/docs/js/app.74d85d0a.js.map +++ b/docs/js/app.a1173833.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?8e57","webpack:///./src/App.vue","webpack:///./src/components/Settings.vue","webpack:///./src/lib/units.js","webpack:///./src/components/Settings.vue?b32f","webpack:///./src/components/Layers.vue","webpack:///./src/components/Layers.vue?f1ba","webpack:///./src/components/Wood.vue","webpack:///./src/components/Wood.vue?85c2","webpack:///./src/components/EndGrainPreview.vue","webpack:///./src/components/EndGrainPreview.vue?ab3d","webpack:///./src/components/EdgeGrainPreview.vue","webpack:///./src/components/EdgeGrainPreview.vue?0ca3","webpack:///./src/components/CuttingList.vue","webpack:///./src/components/CuttingList.vue?203c","webpack:///./src/lib/base64.js","webpack:///./src/App.vue?eabf","webpack:///./src/lib/enums.js","webpack:///./src/store.js","webpack:///./src/main.js","webpack:///./src/App.vue?61d6","webpack:///./src/components/EdgeGrainPreview.vue?d87f","webpack:///./src/components/Wood.vue?9d37","webpack:///./src/components/EndGrainPreview.vue?e4bc","webpack:///./src/components/CuttingList.vue?ff1d","webpack:///./src/components/Layers.vue?10ca","webpack:///./src/components/Settings.vue?cedc"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","class","for","type","ref","accept","href","target","tab","icon","size","fixed-width","printEndGrain","id","printEdgeGrain","printCuttingList","print","saveFilename","save","load","scale","boards","board","boardIndex","settings","units","$store","commit","$event","bladeKerf","parseFloatDef","crosscutWidth","millimetersPerInch","millimetersPerCentimeter","pixelsPerMillimeter","convert","fromUnits","toUnits","millimeters","this","toMillimeters","fromMillimeters","toPixels","Math","ceil","console","error","display","displayValue","limitDecimals","decimals","power","pow","round","computed","state","methods","parsedValue","parseFloat","is","NaN","render","__scopeId","previousBoard","disabled","removeBoard","addBoard","nextBoard","currentBoard","thickness","layers","layer","index","dropTarget","startDrag","wood","item","width","removeLayer","widthWarning","addLayer","checked","borders","direction","setDirection","dragIndex","self","minWidth","currentWidth","maxWidth","forEach","boardWidth","map","reduce","accumulator","currentValue","message","maxBoardWidth","dragMouseMove","event","getTargetLayer","pageY","document","removeEventListener","from","to","addEventListener","yPos","firstLayer","getPageOffsetRect","$refs","layer0","lastLayer","bottom","top","currentTarget","testTarget","element","clientRect","getBoundingClientRect","scrollLeft","pageXOffset","documentElement","scrollTop","pageYOffset","left","right","color","removeWood","addWood","boardHeight","viewportWidth","height","viewportHeight","viewBox","x","y","getBoardLayerOffset","style","getBoardLayerStyle","x1","y1","x2","y2","boardPixelHeight","endGrain","getLayerOffset","transform","getLayerTransform","mouseDown","props","Number","boardPixelWidth","floor","offset","woodIndex","borderStyle","reversed","reverseLayer","startX","pageX","dragging","moveEvent","abs","getTargetStrip","xPos","firstStrip","strip0","lastStrip","getLayerStyle","colspan","getLayerWood","getLayerWidth","bom","stock","woodName","woodTally","base64abc","base64codes","getBase64Code","charCode","Error","code","bytesToBase64","bytes","base64ToBytes","str","indexOf","buffer","missingOctets","endsWith","Uint8Array","charCodeAt","subarray","components","EndGrainPreview","EdgeGrainPreview","Settings","Layers","Wood","CuttingList","created","checkHash","location","hash","substring","decoded","e","getters","saveMsgPack","blob","Blob","loadFile","files","toLowerCase","reader","FileReader","readAsBinaryString","watch","newValue","history","replaceState","UnitsEnum","mm","cm","inchdecimal","DirectionEnum","uniform","alternate","custom","DefaultSettings","DefaultWood","DefaultBoards","DefaultEndGrain","updateEndGrain","createStore","mutations","payload","moveLayer","moveArrayItem","updateSettings","oldUnits","mergeObject","copyFrom","source","updateBoard","oldLength","values","moveEndgrain","parsedPayload","JSON","parse","loadObject","loadMsgPack","deserialize","serialized","serializeState","stringify","serialize","array","boardTally","cutWidth","remove","boardAvailable","remaining","isNaN","parseIntDef","parseInt","deserialized","deserializeState","SettingsNameMapJSON","SettingsNameMapMsgPack","messagePack","serializeSettings","serializeWood","serializeBoards","serializeEndgrain","boardResult","layerResult","deserializeSettings","deserializeWood","deserializeBoards","deserializeEndgrain","alternateDirection","boardLength","boardThickness","isValid","Array","isArray","test","library","add","faSlidersH","faLayerGroup","faSave","faPrint","faInfoCircle","faTree","createApp","App","use","store","component","FontAwesomeIcon","mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA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GC,OAAQ,IAIzC,SAASoN,GAAoBjC,EAAe7J,GAE1C,OAAK6J,EAAc1S,eAAe6I,EAAIqD,SAAS3D,OAAUyM,MAAMC,QAAQvC,EAAc7J,EAAIqD,SAAS3D,OAG3FmK,EAAc7J,EAAIqD,SAAS3D,MAAMM,KAAI,SAAArB,GAE1C,MAAO,CACLjD,MAAOoP,GAAYnM,EAAMqB,EAAIqD,SAAS3H,QACtCuI,UAA2C,IAAjCtF,EAAMqB,EAAIqD,SAASY,cANxB,G,2CCtpBXqI,QAAQC,IAAIC,QAAYC,QAAcC,QAAQC,QAASC,QAAcC,SAErEC,eAAUC,IACPC,IAAIC,IACJC,UAAU,oBAAqBC,SAC/BC,MAAM,S,oCCbT,W,oCCAA,W,oCCAA,W,kCCAA,W,oCCAA,W,uJCAA,W,kCCAA,W","file":"js/app.74d85d0a.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../node_modules/vue-loader-v16/dist/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./App.vue?vue&type=style&index=1&id=5bc914fd&lang=scss&scoped=true\"","\n\n\n\n\n\n\n","\r\n\r\n\r\n\r\n","const millimetersPerInch = 25.4;\r\nconst millimetersPerCentimeter = 10;\r\nconst pixelsPerMillimeter = 1;\r\n\r\n\r\n\r\nconst units = {\r\n convert(value, fromUnits, toUnits)\r\n {\r\n const millimeters = this.toMillimeters(value, fromUnits);\r\n return this.fromMillimeters(millimeters, toUnits);\r\n },\r\n\r\n\r\n toPixels(value, units)\r\n {\r\n return Math.ceil(this.toMillimeters(value, units) * pixelsPerMillimeter);\r\n },\r\n\r\n\r\n toMillimeters(value, units)\r\n {\r\n switch (units)\r\n {\r\n case 'mm': return value;\r\n case 'cm': return value * millimetersPerCentimeter;\r\n case 'inchdecimal': return value * millimetersPerInch;\r\n }\r\n\r\n console.error('Invalid units type: ' + units);\r\n return 0;\r\n },\r\n\r\n\r\n fromMillimeters(value, units)\r\n {\r\n switch (units)\r\n {\r\n case 'mm': return value;\r\n case 'cm': return value / millimetersPerCentimeter;\r\n case 'inchdecimal': return value / millimetersPerInch;\r\n }\r\n\r\n console.error('Invalid units type: ' + units);\r\n return 0;\r\n },\r\n\r\n\r\n display(value, units)\r\n {\r\n const displayValue = this.limitDecimals(value, 3);\r\n\r\n switch (units)\r\n {\r\n case 'mm': return displayValue + ' mm';\r\n case 'cm': return displayValue + ' cm';\r\n case 'inchdecimal': return displayValue + ' inch';\r\n }\r\n\r\n console.error('Invalid units type: ' + units);\r\n return displayValue;\r\n },\r\n\r\n\r\n limitDecimals(value, decimals)\r\n {\r\n // toFixed turns it into a string and pads it with zeroes\r\n const power = Math.pow(10, decimals);\r\n return Math.round(value * power) / power;\r\n }\r\n};\r\n\r\n\r\nexport { units }","import { render } from \"./Settings.vue?vue&type=template&id=7067c7c7&scoped=true\"\nimport script from \"./Settings.vue?vue&type=script&lang=js\"\nexport * from \"./Settings.vue?vue&type=script&lang=js\"\n\nimport \"./Settings.vue?vue&type=style&index=0&id=7067c7c7&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-7067c7c7\"\n\nexport default script","\r\n\r\n\r\n\r\n","import { render } from \"./Layers.vue?vue&type=template&id=01187e40&scoped=true\"\nimport script from \"./Layers.vue?vue&type=script&lang=js\"\nexport * from \"./Layers.vue?vue&type=script&lang=js\"\n\nimport \"./Layers.vue?vue&type=style&index=0&id=01187e40&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-01187e40\"\n\nexport default script","\r\n\r\n\r\n\r\n","import { render } from \"./Wood.vue?vue&type=template&id=15338ab0&scoped=true\"\nimport script from \"./Wood.vue?vue&type=script&lang=js\"\nexport * from \"./Wood.vue?vue&type=script&lang=js\"\n\nimport \"./Wood.vue?vue&type=style&index=0&id=15338ab0&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-15338ab0\"\n\nexport default script","\n\n\n\n","import { render } from \"./EndGrainPreview.vue?vue&type=template&id=61e0967d&scoped=true\"\nimport script from \"./EndGrainPreview.vue?vue&type=script&lang=js\"\nexport * from \"./EndGrainPreview.vue?vue&type=script&lang=js\"\n\nimport \"./EndGrainPreview.vue?vue&type=style&index=0&id=61e0967d&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-61e0967d\"\n\nexport default script","\n\n\n\n","import { render } from \"./EdgeGrainPreview.vue?vue&type=template&id=a5fd011a&scoped=true\"\nimport script from \"./EdgeGrainPreview.vue?vue&type=script&lang=js\"\nexport * from \"./EdgeGrainPreview.vue?vue&type=script&lang=js\"\n\nimport \"./EdgeGrainPreview.vue?vue&type=style&index=0&id=a5fd011a&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-a5fd011a\"\n\nexport default script","\r\n\r\n\r\n\r\n","import { render } from \"./CuttingList.vue?vue&type=template&id=30665a8d&scoped=true\"\nimport script from \"./CuttingList.vue?vue&type=script&lang=js\"\nexport * from \"./CuttingList.vue?vue&type=script&lang=js\"\n\nimport \"./CuttingList.vue?vue&type=style&index=0&id=30665a8d&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-30665a8d\"\n\nexport default script","/*\r\nMIT License\r\nCopyright (c) 2020 Egor Nepomnyaschih\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n*/\r\n\r\n/*\r\n// This constant can also be computed with the following algorithm:\r\nconst base64abc = [],\r\n A = \"A\".charCodeAt(0),\r\n a = \"a\".charCodeAt(0),\r\n n = \"0\".charCodeAt(0);\r\nfor (let i = 0; i < 26; ++i) {\r\n base64abc.push(String.fromCharCode(A + i));\r\n}\r\nfor (let i = 0; i < 26; ++i) {\r\n base64abc.push(String.fromCharCode(a + i));\r\n}\r\nfor (let i = 0; i < 10; ++i) {\r\n base64abc.push(String.fromCharCode(n + i));\r\n}\r\nbase64abc.push(\"+\");\r\nbase64abc.push(\"/\");\r\n*/\r\nconst base64abc = [\r\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\",\r\n \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\",\r\n \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\",\r\n \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\",\r\n \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"+\", \"/\"\r\n];\r\n\r\n/*\r\n// This constant can also be computed with the following algorithm:\r\nconst l = 256, base64codes = new Uint8Array(l);\r\nfor (let i = 0; i < l; ++i) {\r\n base64codes[i] = 255; // invalid character\r\n}\r\nbase64abc.forEach((char, index) => {\r\n base64codes[char.charCodeAt(0)] = index;\r\n});\r\nbase64codes[\"=\".charCodeAt(0)] = 0; // ignored anyway, so we just need to prevent an error\r\n*/\r\nconst base64codes = [\r\n 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\r\n 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\r\n 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63,\r\n 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255,\r\n 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\r\n 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255,\r\n 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,\r\n 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51\r\n];\r\n\r\nfunction getBase64Code(charCode) {\r\n if (charCode >= base64codes.length) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n const code = base64codes[charCode];\r\n if (code === 255) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n return code;\r\n}\r\n\r\nexport function bytesToBase64(bytes) {\r\n let result = '', i, l = bytes.length;\r\n for (i = 2; i < l; i += 3) {\r\n result += base64abc[bytes[i - 2] >> 2];\r\n result += base64abc[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)];\r\n result += base64abc[((bytes[i - 1] & 0x0F) << 2) | (bytes[i] >> 6)];\r\n result += base64abc[bytes[i] & 0x3F];\r\n }\r\n if (i === l + 1) { // 1 octet yet to write\r\n result += base64abc[bytes[i - 2] >> 2];\r\n result += base64abc[(bytes[i - 2] & 0x03) << 4];\r\n result += \"==\";\r\n }\r\n if (i === l) { // 2 octets yet to write\r\n result += base64abc[bytes[i - 2] >> 2];\r\n result += base64abc[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)];\r\n result += base64abc[(bytes[i - 1] & 0x0F) << 2];\r\n result += \"=\";\r\n }\r\n return result;\r\n}\r\n\r\nexport function base64ToBytes(str) {\r\n if (str.length % 4 !== 0) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n const index = str.indexOf(\"=\");\r\n if (index !== -1 && index < str.length - 2) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n let missingOctets = str.endsWith(\"==\") ? 2 : str.endsWith(\"=\") ? 1 : 0,\r\n n = str.length,\r\n result = new Uint8Array(3 * (n / 4)),\r\n buffer;\r\n for (let i = 0, j = 0; i < n; i += 4, j += 3) {\r\n buffer =\r\n getBase64Code(str.charCodeAt(i)) << 18 |\r\n getBase64Code(str.charCodeAt(i + 1)) << 12 |\r\n getBase64Code(str.charCodeAt(i + 2)) << 6 |\r\n getBase64Code(str.charCodeAt(i + 3));\r\n result[j] = buffer >> 16;\r\n result[j + 1] = (buffer >> 8) & 0xFF;\r\n result[j + 2] = buffer & 0xFF;\r\n }\r\n return result.subarray(0, result.length - missingOctets);\r\n}\r\n\r\nexport function base64encode(str, encoder = new TextEncoder()) {\r\n return bytesToBase64(encoder.encode(str));\r\n}\r\n\r\nexport function base64decode(str, decoder = new TextDecoder()) {\r\n return decoder.decode(base64ToBytes(str));\r\n}","import { render } from \"./App.vue?vue&type=template&id=5bc914fd&scoped=true\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\n\nimport \"./App.vue?vue&type=style&index=0&id=5bc914fd&lang=scss\"\nimport \"./App.vue?vue&type=style&index=1&id=5bc914fd&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-5bc914fd\"\n\nexport default script","const UnitsEnum = {\r\n mm: 'mm',\r\n cm: 'cm',\r\n inchdecimal: 'inchdecimal',\r\n //inchfractional: 'inchfractional'\r\n};\r\n\r\n\r\nUnitsEnum.isValid = (value) =>\r\n{\r\n switch (value)\r\n {\r\n case UnitsEnum.mm:\r\n case UnitsEnum.cm:\r\n case UnitsEnum.inchdecimal:\r\n //case UnitsEnum.inchfractional:\r\n return true;\r\n\r\n default:\r\n return false;\r\n }\r\n};\r\n\r\n\r\nconst DirectionEnum = {\r\n uniform: 'uniform',\r\n alternate: 'alternate',\r\n custom: 'custom'\r\n};\r\n\r\n\r\nDirectionEnum.isValid = (value) =>\r\n{\r\n switch (value)\r\n {\r\n case DirectionEnum.uniform:\r\n case DirectionEnum.alternate:\r\n case DirectionEnum.custom:\r\n return value;\r\n\r\n default:\r\n return DirectionEnum.uniform;\r\n }\r\n};\r\n\r\n\r\nexport {\r\n UnitsEnum,\r\n DirectionEnum\r\n}","import { createStore } from 'vuex';\nimport { units } from './lib/units';\nimport { UnitsEnum, DirectionEnum } from './lib/enums';\n\nimport { serialize, deserialize } from '@ygoe/msgpack';\n\n\n\nfunction DefaultSettings()\n{\n return {\n units: UnitsEnum.cm,\n borders: false,\n bladeKerf: 0.35,\n crosscutWidth: 3,\n direction: DirectionEnum.uniform\n };\n}\n\n\nfunction DefaultWood()\n{\n return [\n { name: 'Walnut', color: '#58443f' },\n { name: 'Maple', color: '#f2e0aa' },\n { name: 'Cherry', color: '#bb8359' },\n { name: 'Mahogany', color: '#98473f' },\n { name: 'Yellowheart', color: '#ffff84' },\n { name: 'White oak', color: '#fdf4b9' },\n { name: 'Bubinga', color: '#7e3c34' },\n { name: 'Jatoba', color: '#9b281c' },\n { name: 'Padouk', color: '#933350' }\n ];\n}\n\n\nfunction DefaultBoards()\n{\n return [\n {\n thickness: 2,\n length: 70,\n\n layers: [\n { wood: 8, width: 1 },\n { wood: 1, width: 1.5 },\n { wood: 8, width: 2 },\n { wood: 1, width: 2 },\n { wood: 8, width: 15 },\n { wood: 1, width: 2 },\n { wood: 8, width: 1.5 },\n { wood: 1, width: 1 }\n ]\n }\n ];\n}\n\n\nfunction DefaultEndGrain()\n{\n const settings = DefaultSettings();\n const boards = DefaultBoards();\n const result = [];\n\n updateEndGrain(result, settings, boards);\n\n return result;\n}\n\n\nexport default createStore({\n state: {\n settings: DefaultSettings(),\n wood: DefaultWood(),\n boards: DefaultBoards(),\n endGrain: DefaultEndGrain()\n },\n\n mutations: {\n addLayer(state, board)\n {\n if (board < 0 || board >= state.boards.length)\n return;\n\n state.boards[board].layers.push({\n wood: 0,\n width: units.fromMillimeters(20, state.settings.units)\n });\n },\n\n removeLayer(state, payload)\n {\n if (payload.board < 0 || payload.board >= state.boards.length)\n return;\n\n const board = state.boards[payload.board];\n\n if (payload.layer < 0 || payload.layer >= board.layers.length)\n return;\n\n board.layers.splice(payload.layer, 1);\n },\n\n moveLayer(state, payload)\n {\n if (payload.board < 0 || payload.board >= state.boards.length)\n return;\n\n const board = state.boards[payload.board];\n moveArrayItem(board.layers, payload.from, payload.to);\n },\n\n\n addWood(state)\n {\n state.wood.push({\n name: 'Wood #' + (state.wood.length + 1),\n color: '#f2e0aa'\n });\n },\n\n removeWood(state, index)\n {\n if (index < 0 || index >= state.wood.length)\n return;\n\n // Update all layers\n state.boards.forEach(board =>\n {\n board.layers.forEach(layer =>\n {\n if (layer.wood === index)\n layer.wood = -1\n else if (layer.wood > index)\n layer.wood--;\n });\n });\n\n state.wood.splice(index, 1);\n },\n\n\n updateSettings(state, payload)\n {\n const oldUnits = state.settings.units;\n mergeObject(payload, state.settings);\n\n if (oldUnits !== state.settings.units)\n {\n // Convert the settings\n state.settings.bladeKerf = units.limitDecimals(units.convert(state.settings.bladeKerf, oldUnits, state.settings.units), 3);\n state.settings.crosscutWidth = units.limitDecimals(units.convert(state.settings.crosscutWidth, oldUnits, state.settings.units), 3);\n\n // Convert the boards\n state.boards.forEach(board =>\n {\n board.thickness = units.limitDecimals(units.convert(board.thickness, oldUnits, state.settings.units), 3);\n board.length = units.limitDecimals(units.convert(board.length, oldUnits, state.settings.units), 3);\n\n board.layers.forEach(layer =>\n {\n layer.width = units.limitDecimals(units.convert(layer.width, oldUnits, state.settings.units), 3);\n });\n });\n }\n },\n\n\n addBoard(state, copyFrom)\n {\n if (copyFrom < 0 || copyFrom >= state.boards.length)\n {\n state.boards.push({\n thickness: 2,\n length: 70,\n layers: []\n });\n\n return;\n }\n\n const source = state.boards[copyFrom];\n\n state.boards.push({\n thickness: source.thickness,\n length: source.length,\n layers: source.layers.map(layer =>\n {\n return {\n wood: layer.wood,\n width: layer.width\n };\n })\n });\n\n updateEndGrain(state.endGrain, state.settings, state.boards);\n },\n\n\n removeBoard(state, index)\n {\n if (index < 0 || index >= state.boards.length)\n return;\n\n state.boards.splice(index, 1);\n\n // Update all references to the boards coming after\n state.endGrain.forEach(layer =>\n {\n if (layer.board == index)\n layer.board = -1;\n else if (layer.board > index)\n layer.board--;\n });\n\n updateEndGrain(state.endGrain, state.settings, state.boards);\n },\n\n\n updateBoard(state, payload)\n {\n if (payload.board < 0 || payload.board >= state.boards.length)\n return;\n\n const board = state.boards[payload.board];\n const oldLength = board.length;\n mergeObject(payload.values, board);\n\n if (oldLength !== board.length)\n updateEndGrain(state.endGrain, state.settings, state.boards);\n },\n\n\n moveEndgrain(state, payload)\n {\n moveArrayItem(state.endGrain, payload.from, payload.to);\n },\n\n\n // TODO some updates, like Wood properties and Layer width, don't go through the store yet. this works,\n // but is kinda defeating the rules of Vuex.\n\n\n load(state, payload)\n {\n const parsedPayload = JSON.parse(payload);\n loadObject(state, parsedPayload);\n },\n\n loadMsgPack(state, payload)\n {\n try\n {\n const parsedPayload = deserialize(payload);\n if (parsedPayload)\n loadObject(state, parsedPayload);\n }\n catch(e)\n {\n console.error(e);\n }\n }\n },\n\n getters: {\n save(state)\n {\n const serialized = serializeState(state, false);\n return JSON.stringify(serialized);\n },\n\n saveMsgPack(state)\n {\n const serialized = serializeState(state, true);\n return serialize(serialized);\n }\n }\n});\n\n\n\n\nfunction moveArrayItem(array, from, to)\n{\n if (from < 0 || from >= array.length)\n return;\n\n if (to < 0 || to > array.length)\n return;\n\n if (to == array.length)\n {\n // Move to end\n array.push(array[from]);\n array.splice(from, 1);\n }\n else\n {\n const item = array[from];\n array.splice(from, 1);\n\n if (to > from)\n to--;\n\n array.splice(to, 0, item);\n }\n}\n\n\nfunction stripsPerBoard(settings, board)\n{\n const stripAndKerf = settings.crosscutWidth + settings.bladeKerf;\n if (stripAndKerf === 0)\n return 0;\n\n let stripsPerBoard = (board.length + settings.bladeKerf) / stripAndKerf;\n\n // Try to account for rounding errors\n stripsPerBoard = units.limitDecimals(stripsPerBoard, 3);\n\n return Math.floor(stripsPerBoard);\n}\n\n\nfunction updateEndGrain(result, settings, boards)\n{\n const boardTally = [];\n for (let i = 0; i < boards.length; i++)\n boardTally[i] = boards[i].length + settings.bladeKerf;\n\n const cutWidth = settings.crosscutWidth + settings.bladeKerf;\n const remove = [];\n\n // Check the current configuration and see if we still have enough\n result.forEach((layer, index) =>\n {\n let boardAvailable = false;\n\n if (layer.board >= 0 && layer.board < boards.length)\n {\n boardAvailable = boardTally[layer.board] >= cutWidth;\n if (boardAvailable)\n boardTally[layer.board] -= cutWidth;\n }\n\n if (!boardAvailable)\n remove.push(index);\n });\n\n for (let i = remove.length - 1; i >= 0; i--)\n result.splice(remove[i], 1);\n\n // If we have sufficient board length left, add the layers for it\n boardTally.forEach((remaining, index) =>\n {\n while (remaining >= cutWidth)\n {\n result.push({ board: index, reversed: false });\n remaining -= cutWidth;\n\n // Try to account for rounding errors\n remaining = units.limitDecimals(remaining, 3);\n }\n });\n}\n\n\n\nfunction mergeObject(source, target)\n{\n for (const property in source)\n {\n if (!source.hasOwnProperty(property) || !target.hasOwnProperty(property))\n continue;\n\n target[property] = source[property];\n }\n}\n\n\nfunction parseFloatDef(value)\n{\n const parsedValue = parseFloat(value);\n return isNaN(parsedValue) ? 0 : parsedValue;\n}\n\n\nfunction parseIntDef(value)\n{\n const parsedValue = parseInt(value);\n return isNaN(parsedValue) ? 0 : parsedValue;\n}\n\n\nfunction loadObject(state, parsedPayload)\n{\n const deserialized = deserializeState(parsedPayload);\n\n mergeObject(deserialized.settings, state.settings);\n state.wood = deserialized.wood;\n state.boards = deserialized.boards;\n state.endGrain = deserialized.endGrain;\n\n updateEndGrain(state.endGrain, state.settings, state.boards);\n}\n\n\n// For the MessagePack version that is used in the URL, we minimize the\n// property names as well to significantly reduce the size. Do not do\n// this for the downloaded versions to make them more readable.\n// Note that this map is also used to convert older MsgPack encoded payloads,\n// as they used the same layout as the JSON data.\nconst SettingsNameMapJSON = {\n settings: {\n self: 'settings',\n units: 'units',\n borders: 'borders',\n bladeKerf: 'bladeKerf',\n crosscutWidth: 'crosscutWidth',\n direction: 'direction'\n },\n\n wood: {\n self: 'wood',\n name: 'name',\n color: 'color'\n },\n\n boards: {\n self: 'boards',\n thickness: 'thickness',\n length: 'length',\n layers: {\n self: 'layers',\n wood: 'wood',\n width: 'width'\n }\n },\n\n endGrain: {\n self: 'endGrain',\n board: 'board',\n reversed: 'reversed'\n }\n};\n\n\nconst SettingsNameMapMsgPack = {\n settings: {\n self: 's',\n units: 'u',\n borders: 'b',\n bladeKerf: 'k',\n crosscutWidth: 'c',\n direction: 'd'\n },\n\n wood: {\n self: 'w',\n name: 'n',\n color: 'c'\n },\n\n boards: {\n self: 'b',\n thickness: 't',\n length: 'x',\n layers: {\n self: 'l',\n wood: 'w',\n width: 'x'\n }\n },\n\n endGrain: {\n self: 'e',\n board: 'b',\n reversed: 'r'\n }\n};\n\n\n\n// All external input and output is done through these functions to provide backwards\n// compatibility and perform sanity checking. This means the rest of the application\n// trust that the contents of the store is as expected.\nfunction serializeState(state, messagePack)\n{\n const map = messagePack ? SettingsNameMapMsgPack : SettingsNameMapJSON;\n const result = {};\n\n result[map.settings.self] = serializeSettings(state.settings, map);\n result[map.wood.self] = serializeWood(state.wood, map);\n result[map.boards.self] = serializeBoards(state.boards, map);\n result[map.endGrain.self] = serializeEndgrain(state.endGrain, map);\n\n return result;\n}\n\n\nfunction serializeSettings(settings, map)\n{\n const result = {};\n\n result[map.settings.units] = settings.units;\n result[map.settings.borders] = settings.borders;\n result[map.settings.bladeKerf] = settings.bladeKerf;\n result[map.settings.crosscutWidth] = settings.crosscutWidth;\n result[map.settings.direction] = settings.direction;\n\n return result;\n}\n\n\nfunction serializeWood(wood, map)\n{\n if (wood.length === 0)\n return [];\n\n return wood.map(item =>\n {\n const result = {};\n\n result[map.wood.name] = item.name;\n result[map.wood.color] = item.color;\n\n return result;\n });\n}\n\n\nfunction serializeBoards(boards, map)\n{\n return boards.map(board =>\n {\n const boardResult = {};\n\n boardResult[map.boards.length] = board.length;\n boardResult[map.boards.thickness] = board.thickness;\n\n boardResult[map.boards.layers.self] = board.layers.map(layer =>\n {\n const layerResult = {};\n\n layerResult[map.boards.layers.wood] = layer.wood;\n layerResult[map.boards.layers.width] = layer.width;\n\n return layerResult;\n });\n\n return boardResult;\n });\n}\n\n\nfunction serializeEndgrain(endGrain, map)\n{\n return endGrain.map(layer =>\n {\n const layerResult = {};\n\n layerResult[map.endGrain.board] = layer.board;\n layerResult[map.endGrain.reversed] = layer.reversed;\n\n return layerResult;\n });\n}\n\n\n\nfunction deserializeState(parsedPayload)\n{\n const map = parsedPayload.hasOwnProperty(SettingsNameMapMsgPack.settings.self) ? SettingsNameMapMsgPack : SettingsNameMapJSON;\n\n const result = {\n settings: deserializeSettings(parsedPayload, map),\n wood: deserializeWood(parsedPayload, map),\n boards: deserializeBoards(parsedPayload, map),\n endGrain: deserializeEndgrain(parsedPayload, map)\n };\n\n\n // Backwards compatibility\n if (parsedPayload.hasOwnProperty('settings'))\n {\n if (parsedPayload.settings.hasOwnProperty('alternateDirection'))\n result.settings.direction = parsedPayload.settings.alternateDirection ? DirectionEnum.alternate : DirectionEnum.uniform;\n\n if (parsedPayload.settings.hasOwnProperty('boardLength'))\n result.boards[0].length = parseFloatDef(parsedPayload.settings.boardLength);\n\n if (parsedPayload.settings.hasOwnProperty('boardThickness'))\n result.boards[0].thickness = parseFloatDef(parsedPayload.settings.boardThickness);\n }\n\n if (result.endGrain.length === 0)\n updateEndGrain(result.endGrain, result.settings, result.boards);\n\n return result;\n}\n\n\nfunction deserializeSettings(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.settings.self))\n return DefaultSettings();\n\n const settings = parsedPayload[map.settings.self];\n\n return {\n units: UnitsEnum.isValid(settings[map.settings.units]) ? settings[map.settings.units] : UnitsEnum.cm,\n borders: settings[map.settings.borders] === true,\n bladeKerf: parseFloatDef(settings[map.settings.bladeKerf]),\n crosscutWidth: parseFloatDef(settings[map.settings.crosscutWidth]),\n direction: DirectionEnum.isValid(settings[map.settings.direction]) ? settings[map.settings.direction] : DirectionEnum.uniform,\n };\n}\n\n\nfunction deserializeWood(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.wood.self) || !Array.isArray(parsedPayload[map.wood.self]))\n return [];\n\n return parsedPayload[map.wood.self].map(item =>\n {\n return {\n name: item[map.wood.name],\n color: /^#[0-9A-F]{6}$/i.test(item[map.wood.color] || '') ? item[map.wood.color] : '#000000'\n };\n });\n}\n\n\nfunction deserializeBoards(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.boards.self) || !Array.isArray(parsedPayload[map.boards.self]))\n return [];\n\n const result = parsedPayload[map.boards.self].map(board =>\n {\n const boardResult = {\n thickness: parseFloatDef(board[map.boards.thickness]),\n length: parseFloatDef(board[map.boards.length]),\n layers: []\n };\n\n if (board.hasOwnProperty(map.boards.layers.self) && Array.isArray(board[map.boards.layers.self]))\n {\n boardResult.layers = board[map.boards.layers.self].map(layer =>\n {\n return {\n wood: parseIntDef(layer[map.boards.layers.wood]),\n width: parseFloatDef(layer[map.boards.layers.width])\n }\n });\n }\n\n return boardResult;\n });\n\n return result.length > 0\n ? result\n : { length: 0, thickness: 0, layers: [] };\n}\n\n\nfunction deserializeEndgrain(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.endGrain.self) || !Array.isArray(parsedPayload[map.endGrain.self]))\n return [];\n\n return parsedPayload[map.endGrain.self].map(layer =>\n {\n return {\n board: parseIntDef(layer[map.endGrain.board]),\n reversed: layer[map.endGrain.reversed] === true\n };\n });\n}","import { createApp } from 'vue';\nimport App from './App.vue';\nimport store from './store';\n\nimport { library } from '@fortawesome/fontawesome-svg-core';\nimport { faSlidersH, faLayerGroup, faSave, faPrint, faInfoCircle, faTree } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\n\nlibrary.add(faSlidersH, faLayerGroup, faSave, faPrint, faInfoCircle, faTree);\n\ncreateApp(App)\n .use(store)\n .component('font-awesome-icon', FontAwesomeIcon)\n .mount('#app');\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../node_modules/vue-loader-v16/dist/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./App.vue?vue&type=style&index=0&id=5bc914fd&lang=scss\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./EdgeGrainPreview.vue?vue&type=style&index=0&id=a5fd011a&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Wood.vue?vue&type=style&index=0&id=15338ab0&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./EndGrainPreview.vue?vue&type=style&index=0&id=61e0967d&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CuttingList.vue?vue&type=style&index=0&id=30665a8d&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Layers.vue?vue&type=style&index=0&id=01187e40&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Settings.vue?vue&type=style&index=0&id=7067c7c7&lang=scss&scoped=true\""],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?8e57","webpack:///./src/App.vue","webpack:///./src/components/Settings.vue","webpack:///./src/lib/units.js","webpack:///./src/components/Settings.vue?b32f","webpack:///./src/components/Layers.vue","webpack:///./src/components/Layers.vue?f1ba","webpack:///./src/components/Wood.vue","webpack:///./src/components/Wood.vue?85c2","webpack:///./src/components/EndGrainPreview.vue","webpack:///./src/components/EndGrainPreview.vue?ab3d","webpack:///./src/components/EdgeGrainPreview.vue","webpack:///./src/components/EdgeGrainPreview.vue?0ca3","webpack:///./src/components/CuttingList.vue","webpack:///./src/components/CuttingList.vue?203c","webpack:///./src/lib/base64.js","webpack:///./src/App.vue?eabf","webpack:///./src/lib/enums.js","webpack:///./src/store.js","webpack:///./src/main.js","webpack:///./src/App.vue?61d6","webpack:///./src/components/EdgeGrainPreview.vue?d87f","webpack:///./src/components/Wood.vue?9d37","webpack:///./src/components/EndGrainPreview.vue?e4bc","webpack:///./src/components/CuttingList.vue?ff1d","webpack:///./src/components/Layers.vue?10ca","webpack:///./src/components/Settings.vue?cedc"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","class","for","type","ref","accept","href","target","tab","icon","size","fixed-width","printEndGrain","id","printEdgeGrain","printCuttingList","print","saveFilename","save","load","scale","boards","board","boardIndex","settings","units","$store","commit","$event","bladeKerf","parseFloatDef","crosscutWidth","millimetersPerInch","millimetersPerCentimeter","pixelsPerMillimeter","convert","fromUnits","toUnits","millimeters","this","toMillimeters","fromMillimeters","toPixels","Math","ceil","console","error","display","displayValue","limitDecimals","decimals","power","pow","round","computed","state","methods","parsedValue","parseFloat","is","NaN","render","__scopeId","previousBoard","disabled","removeBoard","addBoard","nextBoard","currentBoard","thickness","layers","layer","index","dropTarget","startDrag","wood","item","width","removeLayer","widthWarning","addLayer","checked","borders","direction","setDirection","dragIndex","self","minWidth","currentWidth","maxWidth","forEach","boardWidth","map","reduce","accumulator","currentValue","message","maxBoardWidth","dragMouseMove","event","getTargetLayer","pageY","document","removeEventListener","from","to","addEventListener","yPos","firstLayer","getPageOffsetRect","$refs","layer0","lastLayer","bottom","top","currentTarget","testTarget","element","clientRect","getBoundingClientRect","scrollLeft","pageXOffset","documentElement","scrollTop","pageYOffset","left","right","color","removeWood","addWood","boardHeight","viewportWidth","height","viewportHeight","viewBox","x","y","getBoardLayerOffset","style","getBoardLayerStyle","x1","y1","x2","y2","boardPixelHeight","endGrain","getLayerOffset","transform","getLayerTransform","mouseDown","props","Number","boardPixelWidth","floor","offset","woodIndex","borderStyle","reversed","reverseLayer","startX","pageX","dragging","moveEvent","abs","getTargetStrip","xPos","firstStrip","strip0","lastStrip","getLayerStyle","colspan","getLayerWood","getLayerWidth","bom","stock","woodName","woodTally","base64abc","base64codes","getBase64Code","charCode","Error","code","bytesToBase64","bytes","base64ToBytes","str","indexOf","buffer","missingOctets","endsWith","Uint8Array","charCodeAt","subarray","components","EndGrainPreview","EdgeGrainPreview","Settings","Layers","Wood","CuttingList","created","checkHash","location","hash","substring","decoded","e","getters","saveMsgPack","blob","Blob","loadFile","files","toLowerCase","reader","FileReader","readAsBinaryString","watch","newValue","history","replaceState","UnitsEnum","mm","cm","inchdecimal","DirectionEnum","uniform","alternate","custom","DefaultSettings","DefaultWood","DefaultBoards","DefaultEndGrain","updateEndGrain","createStore","mutations","payload","moveLayer","moveArrayItem","updateSettings","oldUnits","mergeObject","copyFrom","source","updateBoard","oldLength","values","moveEndgrain","parsedPayload","JSON","parse","loadObject","loadMsgPack","deserialize","serialized","serializeState","stringify","serialize","array","boardTally","cutWidth","remove","boardAvailable","remaining","isNaN","parseIntDef","parseInt","deserialized","deserializeState","SettingsNameMapJSON","SettingsNameMapMsgPack","messagePack","serializeSettings","serializeWood","serializeBoards","serializeEndgrain","boardResult","layerResult","deserializeSettings","deserializeWood","deserializeBoards","deserializeEndgrain","alternateDirection","boardLength","boardThickness","isValid","Array","isArray","test","library","add","faSlidersH","faLayerGroup","faSave","faPrint","faInfoCircle","faTree","createApp","App","use","store","component","FontAwesomeIcon","mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrB,IAAO,GAGJK,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU6B,QAGnC,IAAIC,EAASF,EAAiB5B,GAAY,CACzCK,EAAGL,EACH+B,GAAG,EACHF,QAAS,IAUV,OANAf,E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CAA,W,uJCAA,W,kCCAA,W","file":"js/app.a1173833.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../node_modules/vue-loader-v16/dist/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./App.vue?vue&type=style&index=1&id=5bc914fd&lang=scss&scoped=true\"","\n\n\n\n\n\n\n","\r\n\r\n\r\n\r\n","const millimetersPerInch = 25.4;\r\nconst millimetersPerCentimeter = 10;\r\nconst pixelsPerMillimeter = 1;\r\n\r\n\r\n\r\nconst units = {\r\n convert(value, fromUnits, toUnits)\r\n {\r\n const millimeters = this.toMillimeters(value, fromUnits);\r\n return this.fromMillimeters(millimeters, toUnits);\r\n },\r\n\r\n\r\n toPixels(value, units)\r\n {\r\n return Math.ceil(this.toMillimeters(value, units) * pixelsPerMillimeter);\r\n },\r\n\r\n\r\n toMillimeters(value, units)\r\n {\r\n switch (units)\r\n {\r\n case 'mm': return value;\r\n case 'cm': return value * millimetersPerCentimeter;\r\n case 'inchdecimal': return value * millimetersPerInch;\r\n }\r\n\r\n console.error('Invalid units type: ' + units);\r\n return 0;\r\n },\r\n\r\n\r\n fromMillimeters(value, units)\r\n {\r\n switch (units)\r\n {\r\n case 'mm': return value;\r\n case 'cm': return value / millimetersPerCentimeter;\r\n case 'inchdecimal': return value / millimetersPerInch;\r\n }\r\n\r\n console.error('Invalid units type: ' + units);\r\n return 0;\r\n },\r\n\r\n\r\n display(value, units)\r\n {\r\n const displayValue = this.limitDecimals(value, 3);\r\n\r\n switch (units)\r\n {\r\n case 'mm': return displayValue + ' mm';\r\n case 'cm': return displayValue + ' cm';\r\n case 'inchdecimal': return displayValue + ' inch';\r\n }\r\n\r\n console.error('Invalid units type: ' + units);\r\n return displayValue;\r\n },\r\n\r\n\r\n limitDecimals(value, decimals)\r\n {\r\n // toFixed turns it into a string and pads it with zeroes\r\n const power = Math.pow(10, decimals);\r\n return Math.round(value * power) / power;\r\n }\r\n};\r\n\r\n\r\nexport { units }","import { render } from \"./Settings.vue?vue&type=template&id=7067c7c7&scoped=true\"\nimport script from \"./Settings.vue?vue&type=script&lang=js\"\nexport * from \"./Settings.vue?vue&type=script&lang=js\"\n\nimport \"./Settings.vue?vue&type=style&index=0&id=7067c7c7&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-7067c7c7\"\n\nexport default script","\r\n\r\n\r\n\r\n","import { render } from \"./Layers.vue?vue&type=template&id=01187e40&scoped=true\"\nimport script from \"./Layers.vue?vue&type=script&lang=js\"\nexport * from \"./Layers.vue?vue&type=script&lang=js\"\n\nimport \"./Layers.vue?vue&type=style&index=0&id=01187e40&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-01187e40\"\n\nexport default script","\r\n\r\n\r\n\r\n","import { render } from \"./Wood.vue?vue&type=template&id=15338ab0&scoped=true\"\nimport script from \"./Wood.vue?vue&type=script&lang=js\"\nexport * from \"./Wood.vue?vue&type=script&lang=js\"\n\nimport \"./Wood.vue?vue&type=style&index=0&id=15338ab0&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-15338ab0\"\n\nexport default script","\n\n\n\n","import { render } from \"./EndGrainPreview.vue?vue&type=template&id=61e0967d&scoped=true\"\nimport script from \"./EndGrainPreview.vue?vue&type=script&lang=js\"\nexport * from \"./EndGrainPreview.vue?vue&type=script&lang=js\"\n\nimport \"./EndGrainPreview.vue?vue&type=style&index=0&id=61e0967d&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-61e0967d\"\n\nexport default script","\n\n\n\n","import { render } from \"./EdgeGrainPreview.vue?vue&type=template&id=a5fd011a&scoped=true\"\nimport script from \"./EdgeGrainPreview.vue?vue&type=script&lang=js\"\nexport * from \"./EdgeGrainPreview.vue?vue&type=script&lang=js\"\n\nimport \"./EdgeGrainPreview.vue?vue&type=style&index=0&id=a5fd011a&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-a5fd011a\"\n\nexport default script","\r\n\r\n\r\n\r\n","import { render } from \"./CuttingList.vue?vue&type=template&id=30665a8d&scoped=true\"\nimport script from \"./CuttingList.vue?vue&type=script&lang=js\"\nexport * from \"./CuttingList.vue?vue&type=script&lang=js\"\n\nimport \"./CuttingList.vue?vue&type=style&index=0&id=30665a8d&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-30665a8d\"\n\nexport default script","/*\r\nMIT License\r\nCopyright (c) 2020 Egor Nepomnyaschih\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n*/\r\n\r\n/*\r\n// This constant can also be computed with the following algorithm:\r\nconst base64abc = [],\r\n A = \"A\".charCodeAt(0),\r\n a = \"a\".charCodeAt(0),\r\n n = \"0\".charCodeAt(0);\r\nfor (let i = 0; i < 26; ++i) {\r\n base64abc.push(String.fromCharCode(A + i));\r\n}\r\nfor (let i = 0; i < 26; ++i) {\r\n base64abc.push(String.fromCharCode(a + i));\r\n}\r\nfor (let i = 0; i < 10; ++i) {\r\n base64abc.push(String.fromCharCode(n + i));\r\n}\r\nbase64abc.push(\"+\");\r\nbase64abc.push(\"/\");\r\n*/\r\nconst base64abc = [\r\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\",\r\n \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\",\r\n \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\",\r\n \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\",\r\n \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"+\", \"/\"\r\n];\r\n\r\n/*\r\n// This constant can also be computed with the following algorithm:\r\nconst l = 256, base64codes = new Uint8Array(l);\r\nfor (let i = 0; i < l; ++i) {\r\n base64codes[i] = 255; // invalid character\r\n}\r\nbase64abc.forEach((char, index) => {\r\n base64codes[char.charCodeAt(0)] = index;\r\n});\r\nbase64codes[\"=\".charCodeAt(0)] = 0; // ignored anyway, so we just need to prevent an error\r\n*/\r\nconst base64codes = [\r\n 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\r\n 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\r\n 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63,\r\n 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255,\r\n 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\r\n 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255,\r\n 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,\r\n 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51\r\n];\r\n\r\nfunction getBase64Code(charCode) {\r\n if (charCode >= base64codes.length) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n const code = base64codes[charCode];\r\n if (code === 255) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n return code;\r\n}\r\n\r\nexport function bytesToBase64(bytes) {\r\n let result = '', i, l = bytes.length;\r\n for (i = 2; i < l; i += 3) {\r\n result += base64abc[bytes[i - 2] >> 2];\r\n result += base64abc[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)];\r\n result += base64abc[((bytes[i - 1] & 0x0F) << 2) | (bytes[i] >> 6)];\r\n result += base64abc[bytes[i] & 0x3F];\r\n }\r\n if (i === l + 1) { // 1 octet yet to write\r\n result += base64abc[bytes[i - 2] >> 2];\r\n result += base64abc[(bytes[i - 2] & 0x03) << 4];\r\n result += \"==\";\r\n }\r\n if (i === l) { // 2 octets yet to write\r\n result += base64abc[bytes[i - 2] >> 2];\r\n result += base64abc[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)];\r\n result += base64abc[(bytes[i - 1] & 0x0F) << 2];\r\n result += \"=\";\r\n }\r\n return result;\r\n}\r\n\r\nexport function base64ToBytes(str) {\r\n if (str.length % 4 !== 0) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n const index = str.indexOf(\"=\");\r\n if (index !== -1 && index < str.length - 2) {\r\n throw new Error(\"Unable to parse base64 string.\");\r\n }\r\n let missingOctets = str.endsWith(\"==\") ? 2 : str.endsWith(\"=\") ? 1 : 0,\r\n n = str.length,\r\n result = new Uint8Array(3 * (n / 4)),\r\n buffer;\r\n for (let i = 0, j = 0; i < n; i += 4, j += 3) {\r\n buffer =\r\n getBase64Code(str.charCodeAt(i)) << 18 |\r\n getBase64Code(str.charCodeAt(i + 1)) << 12 |\r\n getBase64Code(str.charCodeAt(i + 2)) << 6 |\r\n getBase64Code(str.charCodeAt(i + 3));\r\n result[j] = buffer >> 16;\r\n result[j + 1] = (buffer >> 8) & 0xFF;\r\n result[j + 2] = buffer & 0xFF;\r\n }\r\n return result.subarray(0, result.length - missingOctets);\r\n}\r\n\r\nexport function base64encode(str, encoder = new TextEncoder()) {\r\n return bytesToBase64(encoder.encode(str));\r\n}\r\n\r\nexport function base64decode(str, decoder = new TextDecoder()) {\r\n return decoder.decode(base64ToBytes(str));\r\n}","import { render } from \"./App.vue?vue&type=template&id=5bc914fd&scoped=true\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\n\nimport \"./App.vue?vue&type=style&index=0&id=5bc914fd&lang=scss\"\nimport \"./App.vue?vue&type=style&index=1&id=5bc914fd&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-5bc914fd\"\n\nexport default script","const UnitsEnum = {\r\n mm: 'mm',\r\n cm: 'cm',\r\n inchdecimal: 'inchdecimal',\r\n //inchfractional: 'inchfractional'\r\n};\r\n\r\n\r\nUnitsEnum.isValid = (value) =>\r\n{\r\n switch (value)\r\n {\r\n case UnitsEnum.mm:\r\n case UnitsEnum.cm:\r\n case UnitsEnum.inchdecimal:\r\n //case UnitsEnum.inchfractional:\r\n return true;\r\n\r\n default:\r\n return false;\r\n }\r\n};\r\n\r\n\r\nconst DirectionEnum = {\r\n uniform: 'uniform',\r\n alternate: 'alternate',\r\n custom: 'custom'\r\n};\r\n\r\n\r\nDirectionEnum.isValid = (value) =>\r\n{\r\n switch (value)\r\n {\r\n case DirectionEnum.uniform:\r\n case DirectionEnum.alternate:\r\n case DirectionEnum.custom:\r\n return value;\r\n\r\n default:\r\n return DirectionEnum.uniform;\r\n }\r\n};\r\n\r\n\r\nexport {\r\n UnitsEnum,\r\n DirectionEnum\r\n}","import { createStore } from 'vuex';\nimport { units } from './lib/units';\nimport { UnitsEnum, DirectionEnum } from './lib/enums';\n\nimport { serialize, deserialize } from '@ygoe/msgpack';\n\n\n\nfunction DefaultSettings()\n{\n return {\n units: UnitsEnum.cm,\n borders: false,\n bladeKerf: 0.35,\n crosscutWidth: 3,\n direction: DirectionEnum.alternate\n };\n}\n\n\nfunction DefaultWood()\n{\n return [\n { name: 'Walnut', color: '#58443f' },\n { name: 'Maple', color: '#f2e0aa' },\n { name: 'Cherry', color: '#bb8359' },\n { name: 'Mahogany', color: '#98473f' },\n { name: 'Yellowheart', color: '#ffff84' },\n { name: 'White oak', color: '#fdf4b9' },\n { name: 'Bubinga', color: '#7e3c34' },\n { name: 'Jatoba', color: '#9b281c' },\n { name: 'Padouk', color: '#933350' }\n ];\n}\n\n\nfunction DefaultBoards()\n{\n return [\n {\n thickness: 2,\n length: 70,\n\n layers: [\n { wood: 8, width: 1 },\n { wood: 1, width: 1.5 },\n { wood: 8, width: 2 },\n { wood: 1, width: 2 },\n { wood: 8, width: 15 },\n { wood: 1, width: 2 },\n { wood: 8, width: 1.5 },\n { wood: 1, width: 1 }\n ]\n }\n ];\n}\n\n\nfunction DefaultEndGrain()\n{\n const settings = DefaultSettings();\n const boards = DefaultBoards();\n const result = [];\n\n updateEndGrain(result, settings, boards);\n\n return result;\n}\n\n\nexport default createStore({\n state: {\n settings: DefaultSettings(),\n wood: DefaultWood(),\n boards: DefaultBoards(),\n endGrain: DefaultEndGrain()\n },\n\n mutations: {\n addLayer(state, board)\n {\n if (board < 0 || board >= state.boards.length)\n return;\n\n state.boards[board].layers.push({\n wood: 0,\n width: units.fromMillimeters(20, state.settings.units)\n });\n },\n\n removeLayer(state, payload)\n {\n if (payload.board < 0 || payload.board >= state.boards.length)\n return;\n\n const board = state.boards[payload.board];\n\n if (payload.layer < 0 || payload.layer >= board.layers.length)\n return;\n\n board.layers.splice(payload.layer, 1);\n },\n\n moveLayer(state, payload)\n {\n if (payload.board < 0 || payload.board >= state.boards.length)\n return;\n\n const board = state.boards[payload.board];\n moveArrayItem(board.layers, payload.from, payload.to);\n },\n\n\n addWood(state)\n {\n state.wood.push({\n name: 'Wood #' + (state.wood.length + 1),\n color: '#f2e0aa'\n });\n },\n\n removeWood(state, index)\n {\n if (index < 0 || index >= state.wood.length)\n return;\n\n // Update all layers\n state.boards.forEach(board =>\n {\n board.layers.forEach(layer =>\n {\n if (layer.wood === index)\n layer.wood = -1\n else if (layer.wood > index)\n layer.wood--;\n });\n });\n\n state.wood.splice(index, 1);\n },\n\n\n updateSettings(state, payload)\n {\n const oldUnits = state.settings.units;\n mergeObject(payload, state.settings);\n\n if (oldUnits !== state.settings.units)\n {\n // Convert the settings\n state.settings.bladeKerf = units.limitDecimals(units.convert(state.settings.bladeKerf, oldUnits, state.settings.units), 3);\n state.settings.crosscutWidth = units.limitDecimals(units.convert(state.settings.crosscutWidth, oldUnits, state.settings.units), 3);\n\n // Convert the boards\n state.boards.forEach(board =>\n {\n board.thickness = units.limitDecimals(units.convert(board.thickness, oldUnits, state.settings.units), 3);\n board.length = units.limitDecimals(units.convert(board.length, oldUnits, state.settings.units), 3);\n\n board.layers.forEach(layer =>\n {\n layer.width = units.limitDecimals(units.convert(layer.width, oldUnits, state.settings.units), 3);\n });\n });\n }\n },\n\n\n addBoard(state, copyFrom)\n {\n if (copyFrom < 0 || copyFrom >= state.boards.length)\n {\n state.boards.push({\n thickness: 2,\n length: 70,\n layers: []\n });\n\n return;\n }\n\n const source = state.boards[copyFrom];\n\n state.boards.push({\n thickness: source.thickness,\n length: source.length,\n layers: source.layers.map(layer =>\n {\n return {\n wood: layer.wood,\n width: layer.width\n };\n })\n });\n\n updateEndGrain(state.endGrain, state.settings, state.boards);\n },\n\n\n removeBoard(state, index)\n {\n if (index < 0 || index >= state.boards.length)\n return;\n\n state.boards.splice(index, 1);\n\n // Update all references to the boards coming after\n state.endGrain.forEach(layer =>\n {\n if (layer.board == index)\n layer.board = -1;\n else if (layer.board > index)\n layer.board--;\n });\n\n updateEndGrain(state.endGrain, state.settings, state.boards);\n },\n\n\n updateBoard(state, payload)\n {\n if (payload.board < 0 || payload.board >= state.boards.length)\n return;\n\n const board = state.boards[payload.board];\n const oldLength = board.length;\n mergeObject(payload.values, board);\n\n if (oldLength !== board.length)\n updateEndGrain(state.endGrain, state.settings, state.boards);\n },\n\n\n moveEndgrain(state, payload)\n {\n moveArrayItem(state.endGrain, payload.from, payload.to);\n },\n\n\n // TODO some updates, like Wood properties and Layer width, don't go through the store yet. this works,\n // but is kinda defeating the rules of Vuex.\n\n\n load(state, payload)\n {\n const parsedPayload = JSON.parse(payload);\n loadObject(state, parsedPayload);\n },\n\n loadMsgPack(state, payload)\n {\n try\n {\n const parsedPayload = deserialize(payload);\n if (parsedPayload)\n loadObject(state, parsedPayload);\n }\n catch(e)\n {\n console.error(e);\n }\n }\n },\n\n getters: {\n save(state)\n {\n const serialized = serializeState(state, false);\n return JSON.stringify(serialized);\n },\n\n saveMsgPack(state)\n {\n const serialized = serializeState(state, true);\n return serialize(serialized);\n }\n }\n});\n\n\n\n\nfunction moveArrayItem(array, from, to)\n{\n if (from < 0 || from >= array.length)\n return;\n\n if (to < 0 || to > array.length)\n return;\n\n if (to == array.length)\n {\n // Move to end\n array.push(array[from]);\n array.splice(from, 1);\n }\n else\n {\n const item = array[from];\n array.splice(from, 1);\n\n if (to > from)\n to--;\n\n array.splice(to, 0, item);\n }\n}\n\n\nfunction stripsPerBoard(settings, board)\n{\n const stripAndKerf = settings.crosscutWidth + settings.bladeKerf;\n if (stripAndKerf === 0)\n return 0;\n\n let stripsPerBoard = (board.length + settings.bladeKerf) / stripAndKerf;\n\n // Try to account for rounding errors\n stripsPerBoard = units.limitDecimals(stripsPerBoard, 3);\n\n return Math.floor(stripsPerBoard);\n}\n\n\nfunction updateEndGrain(result, settings, boards)\n{\n const boardTally = [];\n for (let i = 0; i < boards.length; i++)\n boardTally[i] = boards[i].length + settings.bladeKerf;\n\n const cutWidth = settings.crosscutWidth + settings.bladeKerf;\n const remove = [];\n\n // Check the current configuration and see if we still have enough\n result.forEach((layer, index) =>\n {\n let boardAvailable = false;\n\n if (layer.board >= 0 && layer.board < boards.length)\n {\n boardAvailable = boardTally[layer.board] >= cutWidth;\n if (boardAvailable)\n boardTally[layer.board] -= cutWidth;\n }\n\n if (!boardAvailable)\n remove.push(index);\n });\n\n for (let i = remove.length - 1; i >= 0; i--)\n result.splice(remove[i], 1);\n\n // If we have sufficient board length left, add the layers for it\n boardTally.forEach((remaining, index) =>\n {\n while (remaining >= cutWidth)\n {\n result.push({ board: index, reversed: false });\n remaining -= cutWidth;\n\n // Try to account for rounding errors\n remaining = units.limitDecimals(remaining, 3);\n }\n });\n}\n\n\n\nfunction mergeObject(source, target)\n{\n for (const property in source)\n {\n if (!source.hasOwnProperty(property) || !target.hasOwnProperty(property))\n continue;\n\n target[property] = source[property];\n }\n}\n\n\nfunction parseFloatDef(value)\n{\n const parsedValue = parseFloat(value);\n return isNaN(parsedValue) ? 0 : parsedValue;\n}\n\n\nfunction parseIntDef(value)\n{\n const parsedValue = parseInt(value);\n return isNaN(parsedValue) ? 0 : parsedValue;\n}\n\n\nfunction loadObject(state, parsedPayload)\n{\n const deserialized = deserializeState(parsedPayload);\n\n mergeObject(deserialized.settings, state.settings);\n state.wood = deserialized.wood;\n state.boards = deserialized.boards;\n state.endGrain = deserialized.endGrain;\n\n updateEndGrain(state.endGrain, state.settings, state.boards);\n}\n\n\n// For the MessagePack version that is used in the URL, we minimize the\n// property names as well to significantly reduce the size. Do not do\n// this for the downloaded versions to make them more readable.\n// Note that this map is also used to convert older MsgPack encoded payloads,\n// as they used the same layout as the JSON data.\nconst SettingsNameMapJSON = {\n settings: {\n self: 'settings',\n units: 'units',\n borders: 'borders',\n bladeKerf: 'bladeKerf',\n crosscutWidth: 'crosscutWidth',\n direction: 'direction'\n },\n\n wood: {\n self: 'wood',\n name: 'name',\n color: 'color'\n },\n\n boards: {\n self: 'boards',\n thickness: 'thickness',\n length: 'length',\n layers: {\n self: 'layers',\n wood: 'wood',\n width: 'width'\n }\n },\n\n endGrain: {\n self: 'endGrain',\n board: 'board',\n reversed: 'reversed'\n }\n};\n\n\nconst SettingsNameMapMsgPack = {\n settings: {\n self: 's',\n units: 'u',\n borders: 'b',\n bladeKerf: 'k',\n crosscutWidth: 'c',\n direction: 'd'\n },\n\n wood: {\n self: 'w',\n name: 'n',\n color: 'c'\n },\n\n boards: {\n self: 'b',\n thickness: 't',\n length: 'x',\n layers: {\n self: 'l',\n wood: 'w',\n width: 'x'\n }\n },\n\n endGrain: {\n self: 'e',\n board: 'b',\n reversed: 'r'\n }\n};\n\n\n\n// All external input and output is done through these functions to provide backwards\n// compatibility and perform sanity checking. This means the rest of the application\n// trust that the contents of the store is as expected.\nfunction serializeState(state, messagePack)\n{\n const map = messagePack ? SettingsNameMapMsgPack : SettingsNameMapJSON;\n const result = {};\n\n result[map.settings.self] = serializeSettings(state.settings, map);\n result[map.wood.self] = serializeWood(state.wood, map);\n result[map.boards.self] = serializeBoards(state.boards, map);\n result[map.endGrain.self] = serializeEndgrain(state.endGrain, map);\n\n return result;\n}\n\n\nfunction serializeSettings(settings, map)\n{\n const result = {};\n\n result[map.settings.units] = settings.units;\n result[map.settings.borders] = settings.borders;\n result[map.settings.bladeKerf] = settings.bladeKerf;\n result[map.settings.crosscutWidth] = settings.crosscutWidth;\n result[map.settings.direction] = settings.direction;\n\n return result;\n}\n\n\nfunction serializeWood(wood, map)\n{\n if (wood.length === 0)\n return [];\n\n return wood.map(item =>\n {\n const result = {};\n\n result[map.wood.name] = item.name;\n result[map.wood.color] = item.color;\n\n return result;\n });\n}\n\n\nfunction serializeBoards(boards, map)\n{\n return boards.map(board =>\n {\n const boardResult = {};\n\n boardResult[map.boards.length] = board.length;\n boardResult[map.boards.thickness] = board.thickness;\n\n boardResult[map.boards.layers.self] = board.layers.map(layer =>\n {\n const layerResult = {};\n\n layerResult[map.boards.layers.wood] = layer.wood;\n layerResult[map.boards.layers.width] = layer.width;\n\n return layerResult;\n });\n\n return boardResult;\n });\n}\n\n\nfunction serializeEndgrain(endGrain, map)\n{\n return endGrain.map(layer =>\n {\n const layerResult = {};\n\n layerResult[map.endGrain.board] = layer.board;\n layerResult[map.endGrain.reversed] = layer.reversed;\n\n return layerResult;\n });\n}\n\n\n\nfunction deserializeState(parsedPayload)\n{\n const map = parsedPayload.hasOwnProperty(SettingsNameMapMsgPack.settings.self) ? SettingsNameMapMsgPack : SettingsNameMapJSON;\n\n const result = {\n settings: deserializeSettings(parsedPayload, map),\n wood: deserializeWood(parsedPayload, map),\n boards: deserializeBoards(parsedPayload, map),\n endGrain: deserializeEndgrain(parsedPayload, map)\n };\n\n\n // Backwards compatibility\n if (parsedPayload.hasOwnProperty('settings'))\n {\n if (parsedPayload.settings.hasOwnProperty('alternateDirection'))\n result.settings.direction = parsedPayload.settings.alternateDirection ? DirectionEnum.alternate : DirectionEnum.uniform;\n\n if (parsedPayload.settings.hasOwnProperty('boardLength'))\n result.boards[0].length = parseFloatDef(parsedPayload.settings.boardLength);\n\n if (parsedPayload.settings.hasOwnProperty('boardThickness'))\n result.boards[0].thickness = parseFloatDef(parsedPayload.settings.boardThickness);\n }\n\n if (result.endGrain.length === 0)\n updateEndGrain(result.endGrain, result.settings, result.boards);\n\n return result;\n}\n\n\nfunction deserializeSettings(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.settings.self))\n return DefaultSettings();\n\n const settings = parsedPayload[map.settings.self];\n\n return {\n units: UnitsEnum.isValid(settings[map.settings.units]) ? settings[map.settings.units] : UnitsEnum.cm,\n borders: settings[map.settings.borders] === true,\n bladeKerf: parseFloatDef(settings[map.settings.bladeKerf]),\n crosscutWidth: parseFloatDef(settings[map.settings.crosscutWidth]),\n direction: DirectionEnum.isValid(settings[map.settings.direction]) ? settings[map.settings.direction] : DirectionEnum.uniform,\n };\n}\n\n\nfunction deserializeWood(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.wood.self) || !Array.isArray(parsedPayload[map.wood.self]))\n return [];\n\n return parsedPayload[map.wood.self].map(item =>\n {\n return {\n name: item[map.wood.name],\n color: /^#[0-9A-F]{6}$/i.test(item[map.wood.color] || '') ? item[map.wood.color] : '#000000'\n };\n });\n}\n\n\nfunction deserializeBoards(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.boards.self) || !Array.isArray(parsedPayload[map.boards.self]))\n return [];\n\n const result = parsedPayload[map.boards.self].map(board =>\n {\n const boardResult = {\n thickness: parseFloatDef(board[map.boards.thickness]),\n length: parseFloatDef(board[map.boards.length]),\n layers: []\n };\n\n if (board.hasOwnProperty(map.boards.layers.self) && Array.isArray(board[map.boards.layers.self]))\n {\n boardResult.layers = board[map.boards.layers.self].map(layer =>\n {\n return {\n wood: parseIntDef(layer[map.boards.layers.wood]),\n width: parseFloatDef(layer[map.boards.layers.width])\n }\n });\n }\n\n return boardResult;\n });\n\n return result.length > 0\n ? result\n : { length: 0, thickness: 0, layers: [] };\n}\n\n\nfunction deserializeEndgrain(parsedPayload, map)\n{\n if (!parsedPayload.hasOwnProperty(map.endGrain.self) || !Array.isArray(parsedPayload[map.endGrain.self]))\n return [];\n\n return parsedPayload[map.endGrain.self].map(layer =>\n {\n return {\n board: parseIntDef(layer[map.endGrain.board]),\n reversed: layer[map.endGrain.reversed] === true\n };\n });\n}","import { createApp } from 'vue';\nimport App from './App.vue';\nimport store from './store';\n\nimport { library } from '@fortawesome/fontawesome-svg-core';\nimport { faSlidersH, faLayerGroup, faSave, faPrint, faInfoCircle, faTree } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\n\nlibrary.add(faSlidersH, faLayerGroup, faSave, faPrint, faInfoCircle, faTree);\n\ncreateApp(App)\n .use(store)\n .component('font-awesome-icon', FontAwesomeIcon)\n .mount('#app');\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../node_modules/vue-loader-v16/dist/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./App.vue?vue&type=style&index=0&id=5bc914fd&lang=scss\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./EdgeGrainPreview.vue?vue&type=style&index=0&id=a5fd011a&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Wood.vue?vue&type=style&index=0&id=15338ab0&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./EndGrainPreview.vue?vue&type=style&index=0&id=61e0967d&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CuttingList.vue?vue&type=style&index=0&id=30665a8d&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Layers.vue?vue&type=style&index=0&id=01187e40&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Settings.vue?vue&type=style&index=0&id=7067c7c7&lang=scss&scoped=true\""],"sourceRoot":""} \ No newline at end of file diff --git a/src/store.js b/src/store.js index b281a08..b41ec9d 100644 --- a/src/store.js +++ b/src/store.js @@ -13,7 +13,7 @@ function DefaultSettings() borders: false, bladeKerf: 0.35, crosscutWidth: 3, - direction: DirectionEnum.uniform + direction: DirectionEnum.alternate }; }